GameFlash

Open in new tab

Methods

.effectCallback({ scene, lastRoundPassed })
.define(tag, registry)
.subscribe(context, callback)

Custom States

StateDescription
:state(pass)The flash is showing a pass (green) pulse
:state(fail)The flash is showing a fail (red) pulse

CSS Custom Properties

PropertyDefaultDescription
--game-flash-passrgba(50, 220, 120, 0.35)Flash color on a passed round
--game-flash-failrgba(230, 40, 40, 0.3)Flash color on a failed round

A full-screen pass/fail flash overlay. Observes game signals and briefly flashes green or red when a round completes. Uses ElementInternals custom states for styling, so per-game CSS can restyle the flash without modifying the component.

Signal Access

Signal Usage
Shell signals Reads scene and lastRoundPassed signals to trigger flashes

Usage

<game-flash when-some-scene="playing between paused"></game-flash>

Override colors for a light theme:

game-flash {
  --game-flash-pass: rgba(0, 200, 100, 0.25);
  --game-flash-fail: rgba(255, 0, 0, 0.2);
}