PURPOSE
Stock-behavior fallback module for the reward-cinematic registry. Exports a CinematicModule with id: 'default' and zero hooks, so any reward family that doesn’t ship its own cinematic gets the unmodified pre-registry hud.ts rendering. Implementers are explicitly directed (via in-file doc comment) not to add behavior here — custom cinematics ship in their own files and register themselves in index.ts.
OWNS
- The exported constant
defaultCinematicModule(aCinematicModulewhose only field is the literal id string'default'). - The implicit contract that omitting all hooks is equivalent to the legacy pre-registry rendering path — i.e. that absent hooks behave as pass-throughs.
READS FROM
./registry— imports theCinematicModuletype definition (type-only import).
PUSHES TO
- Nothing at runtime. The module is a constant data object; it has no side effects, no registration call, and no internal state. It does not call
registerCinematic.
DOES NOT
- Does not register itself for any reward family. (The barrel
index.tsregisters onlylevel_up,weapon_box,artifact_box, andshooting_star; families with no entry fall back to the_noopsentinel insideregistry.ts, not to this module.) - Does not implement any of the optional hooks (
onStart,onUpdate,onStateTransition,drawBackdrop,drawCardOverride,drawOverlay,onEnd). - Does not paint, animate, time-track, or hold per-reveal state.
- Does not import or use the canvas, the HUD scale factor, the reward state machine, or the audio module.
Signals
- None outgoing. None incoming. The module is a pure constant — its presence in the bundle has no observable runtime effect unless something explicitly imports
defaultCinematicModuleand registers it.
Entry points
defaultCinematicModule— the only export. ACinematicModuleliteral. Consumable by any caller that wants an explicit no-op module reference (e.g. for tests, registry resets, or future fallback wiring).
Pattern notes
- The file documents an explicit “do not add behavior here” rule in its header doc comment. Custom cinematics belong in dedicated files (see
level-up-slot.ts,shooting-star.ts,weapon-chest.ts,artifact-glitch.tsfor the live wired modules). - Pass-through semantics rely on optional chaining at the call site in
hud.ts— every hook onCinematicModuleis declared optional inregistry.ts, so an empty module is safe to invoke unconditionally. - The
_noopsentinel insideregistry.ts({ id: 'noop' }) duplicates this module’s shape but is a separate object;getCinematicFor()returns the sentinel, notdefaultCinematicModule, when a family is unregistered. This file therefore functions as a documented reference / template rather than an active runtime path. - Adding behavior to this file would silently apply it to every unregistered family. The header comment is the only guard against that drift.