Skip to content

Commit

Permalink
always end a rocket with a bang even if the value is zero. shorten th…
Browse files Browse the repository at this point in the history
…e bang.
  • Loading branch information
skeltoac committed Dec 14, 2011
1 parent fcd350f commit 70439e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/canvas.js
Expand Up @@ -287,8 +287,8 @@
particle.img = particle.fireworks.imgs.explosion.random();
particle.vel = new Vector3(0, 0, 0);
particle.grav = 0;
var x = Math.sqrt(particle.data[0]) / 10;
particle.scales = [1,2,4,5,5,5,4,4,4,3,3,2,2,0].map(function(s){return s*x;});
var x = Math.max(Math.sqrt(particle.data[0]) / 10, 0.25);
particle.scales = [2,4,5,5,4,4,3,3,2,2,0].map(function(s){return s*x;});
particle.cont = function(particle) { return particle.scale = particle.scales.shift(); };
return true;
}
Expand Down

0 comments on commit 70439e3

Please sign in to comment.