Blast Effect

The blast effect creates a one-shot explosion of particles from an item’s center.

Usage

app.applyEffect(item, 'blast', {
  color: '#ef4444',
  radius: 100,
  count: 20
});

Parameters

Parameter Type Default Description
color string '#ef4444' Particle color
radius number 100 Blast radius/speed
count number 20 Number of particles

Example

const star = app.create({
  type: 'star',
  position: [400, 300],
  radius: 30,
  fillColor: '#fbbf24'
});

// Trigger blast
app.applyEffect(star, 'blast', {
  color: '#fbbf24',
  radius: 150,
  count: 30
});

How It Works

  1. Particles spawn at the item’s center
  2. Particles explode outward
  3. Particles fade and are removed
  4. Effect is one-shot (not looping)

Persistence

Blast effects are transient - they are not saved with the scene since they are one-shot animations.

Use Cases

  • Celebration/reward feedback
  • Impact effects
  • Attention grabbing
  • Transition effects