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: PaletteFamily§grid: GridSpec§cells: Vec<Cell>Row-major, grid.cols * grid.rows.
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).
Trait Implementations§
Source§impl Clone for SceneGraph
impl Clone for SceneGraph
Auto Trait Implementations§
impl Forget for SceneGraph
impl Freeze for SceneGraph
impl Move for SceneGraph
impl RefUnwindSafe for SceneGraph
impl Send for SceneGraph
impl Sync for SceneGraph
impl Unpin for SceneGraph
impl UnsafeUnpin for SceneGraph
impl UnwindSafe for SceneGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more