Lines example: use new notation for creating paths.

This commit is contained in:
Jonathan Puckey 2013-03-02 20:51:44 +01:00
parent 4a7972ce0c
commit 1346b7d4c0

View file

@ -8,10 +8,11 @@
<script type="text/paperscript" canvas="canvas">
var amount = 180;
for (var i = 0; i < amount; i++) {
var path = new Path();
path.fillColor = new HsbColor(1, 1, Math.random());
path.strokeCap = 'round';
path.closed = true;
var path = new Path({
fillColor: new HsbColor(1, 1, Math.random()),
strokeCap: 'round',
closed: true
});
}
var position = view.center;
@ -21,7 +22,7 @@
function iterate() {
count++;
var delta = (mousePos - position);
var delta = mousePos - position;
position += delta / 10;
for (var i = 1; i < amount; i++) {
var path = children[i];