Thumbnail for Splosion

Splosion creates some coloured objects that go flying in different directions from the given starting point

The method takes an options argument which allows you to override the default behaviour of the projectiles. In the following example it sets the exploding blocks to blue and the spawn object to a sphere

//create a splosion where the ball is
splosion(ball.obj.position, timerBehaviour, { 
  spawn: function() { return Primitive.sphere(); }, 
  modifyProjectile: function(obj) { obj.setColor(Color.blue); return obj; } 
});
Urls
splosion.js
An error has occurred. This application may no longer respond until reloaded. Reload 🗙