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">
|
|
|
|
<title>Example</title>
|
2011-05-05 11:25:17 -04:00
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
2011-03-07 20:07:26 -05:00
|
|
|
<script type="text/javascript">var root = '../../'</script>
|
2011-03-07 18:11:41 -05:00
|
|
|
<script type="text/javascript" src="../../src/load.js"></script>
|
2011-03-04 06:38:38 -05:00
|
|
|
<script type="text/paperscript" canvas="canvas">
|
2011-02-07 14:16:51 -05:00
|
|
|
var count = 0;
|
2011-03-04 06:38:38 -05:00
|
|
|
setInterval(draw, 30);
|
2011-02-07 14:16:51 -05:00
|
|
|
function draw() {
|
|
|
|
count++;
|
2011-03-04 06:38:38 -05:00
|
|
|
document.activeLayer.children = [];
|
2011-02-07 14:16:51 -05:00
|
|
|
var rect = new Rectangle([150, 150], [300, 300]);
|
|
|
|
var size = Math.abs(Math.sin(count / 40)) * 150 + 10;
|
|
|
|
var path = new Path.RoundRectangle(rect, size);
|
|
|
|
path.fillColor = 'black';
|
2011-03-04 06:38:38 -05:00
|
|
|
document.redraw();
|
2011-02-07 14:16:51 -05:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2011-05-05 15:08:13 -04:00
|
|
|
<canvas id='canvas' resize></canvas>
|
2011-02-07 14:16:51 -05:00
|
|
|
</body>
|