Expand description
Platform-agnostic active-scene state and transition logic. Scenes are pure content groupings; changes are imperative jumps (UI actions, Behaviors), so this module tracks only which scene is active and drives fade transitions. The SceneControl trait decouples this module from any specific backend; callers supply a concrete backend that implements the two mutation methods.
Structs§
- Scene
Flow - The active scene and any transition in flight.
- Scene
Visibility - Per-prop scene visibility pairs, flattened so a per-frame refresh during a
fade reuses its buffers instead of allocating a slot list per prop: prop
i’s draw slots are thespans[i]range ofdraws, its scene isscenes[i](None= always visible).
Enums§
- Fade
Phase - A scene transition’s fade phase.
Traits§
- Scene
Control - Backend operations required to drive scene visibility and fade transitions.
Functions§
- jump_
to_ scene - Imperatively jump to a named scene. Ignored with a warning if the target scene is not declared, or no scenes exist.
- set_
scene_ visibility - Set draw-object visibility according to which scene is currently active. Props with no scene association (scene == None) are always visible.
- tick_
transitions - Advance any in-flight fade transition, updating the composite fade and switching visibility to the target scene mid-fade.