Browse files

Subtle moving

  • Loading branch information...
1 parent 17cb266 commit 392abfe94a02ffc4edb8bbe7718bb9b4bf59560f @gfx committed May 11, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 Fireworks.dart
View
6 Fireworks.dart
@@ -21,7 +21,7 @@ class Random { // drand48
return x * (1.0/(0xFFFFFFFFFFFF+1));
}
}
-num random() => Random.next();
+num random() => Math.random(); // Random.next();
String randomColor() {
final List<int> rgb = new List<int>(3);
@@ -51,8 +51,8 @@ class Spark {
}
bool draw(FireworkView view) {
- posX += velX;
- posY += velY + Config.gravity;
+ posX += velX + (random() - 0.5);
+ posY += velY + (random() - 0.5) + Config.gravity;
velX *= Config.decay;
velY *= Config.decay;

0 comments on commit 392abfe

Please sign in to comment.