pub struct SceneGraph {Show 18 fields
pub width: u32,
pub height: u32,
pub theme: Theme,
pub tod: TimeOfDay,
pub buddy: bool,
pub seed: u64,
pub family: PaletteFamily,
pub grid: GridSpec,
pub cells: Vec<Cell>,
pub lighting: Lighting,
pub activity: Option<String>,
pub props: Vec<SpriteInstance>,
pub unattended: Vec<SpriteInstance>,
pub character: Option<CharacterTrack>,
pub emitters: Vec<Emitter>,
pub ground_y: i32,
pub t_hero_ms: u64,
pub loop_ms: u64,
}Expand description
Everything needed to render one scene at one size and theme.
Fields§
§width: u32§height: u32§theme: Theme§tod: TimeOfDay§buddy: bool§seed: u64The recipe seed (drives the character’s state machine).
family: PaletteFamilyNot stored in scene packages (playback uses the package’s palette).
grid: GridSpec§cells: Vec<Cell>Row-major, grid.cols * grid.rows. Not stored in scene packages,
which keep the baked background instead.
lighting: Lighting§activity: Option<String>The activity id, or None for an archetype-first fallback scene.
props: Vec<SpriteInstance>Activity props, drawn in both Buddy states.
unattended: Vec<SpriteInstance>Unattended variant, drawn only with Buddy off.
character: Option<CharacterTrack>The character’s track (always laid out; drawn only with Buddy on).
emitters: Vec<Emitter>§ground_y: i32Pixel y of the platform’s top surface (where feet stand).
t_hero_ms: u64Hero time in milliseconds: the frame used for stills and thumbnails.
loop_ms: u64Seamless loop length for periodic elements.
Implementations§
Source§impl SceneGraph
impl SceneGraph
pub fn cell(&self, col: u32, row: u32) -> Cell
Sourcepub fn sprites_at(&self, t_ms: u64) -> Vec<SpriteInstance>
pub fn sprites_at(&self, t_ms: u64) -> Vec<SpriteInstance>
Sprites to draw at t, back to front: props, then the character (Buddy
on) or the unattended variant (Buddy off).