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

View file

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