2011-02-21 08:31:26 -05:00
|
|
|
<!DOCTYPE html>
|
2011-02-07 14:16:51 -05:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
2011-06-30 09:57:17 -04:00
|
|
|
<title>Rounded Rectangle</title>
|
2011-05-05 11:25:17 -04:00
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
2011-06-12 14:03:18 -04:00
|
|
|
<script type="text/javascript" src="../../dist/paper.js"></script>
|
2011-03-04 06:38:38 -05:00
|
|
|
<script type="text/paperscript" canvas="canvas">
|
2011-05-15 13:12:56 -04:00
|
|
|
var path;
|
2011-07-07 10:09:02 -04:00
|
|
|
|
2011-05-15 13:12:56 -04:00
|
|
|
function onFrame(event) {
|
2011-05-06 10:03:21 -04:00
|
|
|
if (path)
|
|
|
|
path.remove();
|
2013-04-19 15:36:49 -04:00
|
|
|
path = new Path.Rectangle({
|
2013-03-09 10:02:11 -05:00
|
|
|
radius: Math.abs(Math.sin(event.count / 40)) * 150 + 10,
|
|
|
|
rectangle: {
|
|
|
|
size: [300, 300]
|
|
|
|
},
|
|
|
|
fillColor: 'black'
|
|
|
|
});
|
2011-05-16 07:51:20 -04:00
|
|
|
path.position = view.center;
|
2011-02-07 14:16:51 -05:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2011-06-29 07:44:06 -04:00
|
|
|
<canvas id="canvas" resize></canvas>
|
2011-05-30 18:27:39 -04:00
|
|
|
</body>
|
|
|
|
</html>
|