Skip to main content

SceneControl

Trait SceneControl 

Source
pub trait SceneControl {
    // Required methods
    fn update_visibility(&mut self, draw_idx: usize, visible: bool);
    fn set_fade(&mut self, fade: f32);
}
Expand description

Backend operations required to drive scene visibility and fade transitions.

Required Methods§

Source

fn update_visibility(&mut self, draw_idx: usize, visible: bool)

Show or hide one draw slot.

Source

fn set_fade(&mut self, fade: f32)

Fade the composited image to black by fade in [0, 1]: 0 leaves the frame untouched, 1 renders it fully black. Applied in the composite pass so the whole image fades, not just the pixels no geometry covers.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§