Skip to content

hitFlash

const hitFlash: EffectDefinition<HitFlashHandle, HitFlashOptions>

Defined in: effects/src/hitFlash.ts:27

White (or any color) flash overlay — common damage-impact polish. The trigger() ramp drives itself through the engine’s process scheduler: pauses with the owning scene, time-scales with it, auto-cancels on remove(). No caller-side step(dt) wiring required.

The flash is implemented via a ColorMatrixFilter whose tint additive is animated through setIntensity, so fadeIn/fadeOut work too — trigger() is the convenience wrapper for the full up-and-back ramp.

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/effects.md.