Skip to content

shockwave

const shockwave: EffectDefinition<ShockwaveHandle, ShockwaveOptions>

Defined in: effects/src/shockwave.ts:168

Concentric-ring ripple via pixi-filters’ ShockwaveFilter — the impact polish for explosions, slams, blast waves.

Best applied at scene scope: the ring expands outward from center and is naturally clipped at the host’s bounds, so a component-scoped shockwave on a small sprite reads as a tiny “bump” rather than a ring.

Coords are in the filter target’s local space — virtual pixels for scene/layer-scope effects, sprite-local for component-scope. Applies uniformly to trigger(x, y) AND to every dimensional option (amplitude, wavelength, radius, speed). The wrapper rescales to the input-texture pixel space the shader actually samples in every frame, using the target container’s live worldTransform. Resize the canvas, zoom the camera, attach the filter at a different scope — both the trigger point and the visual ring size track your intent.

The filter starts in a “parked” state (time pushed past every visible pixel) so toggling on is invisible until you trigger(). The trigger ramp drives itself through the engine’s process scheduler — pauses with the owning scene, time-scales with it, auto-cancels on remove().

setIntensity cross-fades amplitude × brightness from 0 to the configured values so fadeIn/fadeOut work the same as on every other preset.