the current renderer instance
Optionaloptions: { color?: number[]; intensity?: number } = {}effect options
Optionalcolor?: number[]flash color as [r, g, b] (0.0–1.0)
Optionalintensity?: numberinitial flash intensity (0.0–1.0)
Readonlydestroyedtrue once destroy has been called. Distinct from
enabled — which also toggles transiently across a context
lost / restored cycle — to give callers a stable signal for
"this effect has been explicitly released."
whether this effect is active (false in Canvas mode, false after
destroy, and false while the WebGL context is suspended
between an ONCONTEXT_LOST and the matching ONCONTEXT_RESTORED
event).
destroy this shader effect. Idempotent — calling destroy twice is safe. Unsubscribes from the renderer's context-lost / restored events so a destroyed effect is not auto-reactivated.
set the flash color
flash color as [r, g, b] (0.0–1.0)
set the flash intensity
flash intensity (0.0 = no flash, 1.0 = fully colored)
Set the uniform to the given value
the uniform name
the value to assign to that uniform
A shader effect that flashes the sprite with a solid color. Commonly used for hit feedback — flash white when the player takes damage. The
intensityuniform controls how much of the flash color is mixed in (0.0 = original sprite, 1.0 = fully colored).See
Renderable.shader for usage
Example
Example