2011-02-21 08:31:26 -05:00
|
|
|
<!DOCTYPE html>
|
2011-02-07 13:28:09 -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-05-16 07:51:20 -04:00
|
|
|
var point = view.center;
|
2011-03-04 06:38:38 -05:00
|
|
|
for (var i = 0; i < 30; i++) {
|
|
|
|
var vector = new Point(10 + 20 * i, 0).rotate(i);
|
|
|
|
var l = vector.length;
|
|
|
|
var path = new Path();
|
|
|
|
path.fillColor = i % 2 ? 'red' : 'black';
|
|
|
|
path.closed = true;
|
|
|
|
for (var j = 0; j < 17; j++) {
|
|
|
|
vector = vector.rotate(45 / 2);
|
|
|
|
if (j == 0) {
|
|
|
|
path.add(point + vector);
|
|
|
|
} else {
|
|
|
|
path.arcTo(point + vector, true);
|
2011-02-07 13:28:09 -05:00
|
|
|
}
|
|
|
|
}
|
2011-05-16 08:33:15 -04:00
|
|
|
project.activeLayer.appendBottom(path);
|
2011-02-07 13:28:09 -05:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2011-05-14 06:04:02 -04:00
|
|
|
<canvas id="canvas" resize keepalive="true"></canvas>
|
2011-02-07 13:28:09 -05:00
|
|
|
</body>
|