Improve RoundedRectangles example.

This commit is contained in:
Jonathan Puckey 2011-06-21 20:10:23 +02:00
parent 115d12f6ce
commit 52175da3e9

View file

@ -17,14 +17,9 @@
path.fillColor = colors[i % 4];
var scale = (1 - i / amount) * 20;
path.scale(scale);
new PlacedSymbol(path);
}
function onMouseDown(event) {
mousePoint = event.point;
}
function onMouseDrag(event) {
function onMouseMove(event) {
mousePoint = event.point;
}
@ -35,7 +30,7 @@
var delta = (mousePoint - item.position) / (i + 5);
item.rotate(Math.sin((event.count + i) / 10) * 7);
if (delta.length > 0.1)
item.translate(delta);
item.position += delta;
}
}
</script>