Skip to main content

Module scene_flow

Module scene_flow 

Source
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§

SceneFlow
The active scene and any transition in flight.
SceneVisibility
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 the spans[i] range of draws, its scene is scenes[i] (None = always visible).

Enums§

FadePhase
A scene transition’s fade phase.

Traits§

SceneControl
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.