API Reference › Fx › Fx.sparks
method

Fx.sparks

Fx.sparks(x: px, y: px, color: c, count: n)

Spawns count sparks at (x, y), each with a random velocity of up to 3px per frame on each axis and a lifetime of 18 to 26 frames; they are drawn as 1 to 3 pixel squares in color.

Example

# doc-check: skip — illustrative
@On(Died) handler Burst { Fx.sparks(x: center(e).x, y: center(e).y, color: Color.Crimson, count: 10) }
← All symbols