diff --git a/examples/Animated/Space.html b/examples/Animated/Space.html
index 47ef1d56..4f649594 100644
--- a/examples/Animated/Space.html
+++ b/examples/Animated/Space.html
@@ -10,11 +10,12 @@
var count = 150;
// Create a symbol, which we will use to place instances of later:
- var path = new Path.Circle(new Point(0, 0), 5);
- path.style = {
+ var path = new Path.Circle({
+ center: new Point(0, 0),
+ radius: 5,
fillColor: 'white',
strokeColor: 'black'
- };
+ });
var symbol = new Symbol(path);
@@ -23,11 +24,11 @@
// The center position is a random point in the view:
var center = Point.random() * view.size;
var placed = symbol.place(center);
- placed.scale(i / count);
- placed.data = {};
+ var scale = (i + 1) / count;
+ placed.scale(scale);
placed.data.vector = new Point({
angle: Math.random() * 360,
- length : (i / count) * Math.random() / 5
+ length : scale * Math.random() / 5
});
}
diff --git a/examples/Animated/SpaceUsingShapes.html b/examples/Animated/SpaceUsingShapes.html
index 6fe9f49d..a125816c 100644
--- a/examples/Animated/SpaceUsingShapes.html
+++ b/examples/Animated/SpaceUsingShapes.html
@@ -17,10 +17,11 @@
for (var i = 0; i < count; i++) {
// The center position is a random point in the view:
var center = Point.random() * view.size;
- var path = new Shape.Circle(center, 5 * (i / count));
+ var scale = (i + 1) / count;
+ var path = new Shape.Circle(center, 5 * scale);
path.data.vector = new Point({
angle: Math.random() * 360,
- length : (i / count) * Math.random() / 5
+ length : scale * Math.random() / 5
});
}