Clean ups.

This commit is contained in:
Jürg Lehni 2011-05-16 13:42:23 +01:00
parent cfe968d30e
commit 378952666a
2 changed files with 6 additions and 6 deletions

View file

@ -13,13 +13,13 @@
count: 34,
points: 32
};
for (var i = 0; i < values.count; i++) {
var offset = new Point(20 + 10 * i, 0);
var path = new Path();
path.fillColor = i % 2 ? 'red' : 'black';
path.closed = true;
var l = offset.length;
for (var j = 0; j < values.points * 2; j++) {
offset.angle += 360 / values.points;
@ -39,7 +39,7 @@
item.rotate(angle);
}
}
// Reposition the paths whenever the window is resized:
function onResize(event) {
project.activeLayer.position = view.center;

View file

@ -19,7 +19,7 @@
var mousePos = position;
var children = project.activeLayer.children;
var count = 0;
function iterate() {
count++;
var delta = (mousePos - position);
@ -35,11 +35,11 @@
path.fillColor.hue = count - length;
}
}
function onFrame() {
iterate();
}
function onMouseMove(event) {
iterate();
mousePos = event.point;