pub struct LazyWaterScene { /* private fields */ }Expand description
Zero-boot-cost lazy GameScene wrapper deferring GyroLiquidGameScene allocation until /water is visited.
Implementations§
Source§impl LazyWaterScene
impl LazyWaterScene
pub fn get_scene_cell(&self) -> &Rc<RefCell<Option<GyroLiquidGameScene>>>
pub fn get_signals_cell(&self) -> &Rc<Cell<Option<WaterSignals>>>
Trait Implementations§
Source§impl Clone for LazyWaterScene
impl Clone for LazyWaterScene
Source§impl Debug for LazyWaterScene
impl Debug for LazyWaterScene
Source§impl GameScene for LazyWaterScene
GameScene delegation forwarding fixed physics steps and zero-copy optical rendering to the lazily initialized GyroLiquidGameScene.
impl GameScene for LazyWaterScene
GameScene delegation forwarding fixed physics steps and zero-copy optical rendering to the lazily initialized GyroLiquidGameScene.
Source§fn fixed_update(&mut self, dt: f32, input: &InputState)
fn fixed_update(&mut self, dt: f32, input: &InputState)
Steps the SI PBF liquid simulation and mirrors live GyroLiquidStats into /water signals.
§Arguments
&Self- Mutable lazy water scene wrapper.f32- Fixed simulation timestep in seconds.&InputState- Real-time polled pointer and keyboard input state.
Source§fn render(&mut self, alpha: f32, ctx: &mut GameRenderContext<'_>)
fn render(&mut self, alpha: f32, ctx: &mut GameRenderContext<'_>)
Renders the optical liquid frame into ctx and mirrors updated frame timings into /water signals.
§Arguments
&Self- Mutable lazy water scene wrapper.f32- Interpolation alpha in[0.0, 1.0].&mut GameRenderContext<'_>- Active viewport draw surface.
Auto Trait Implementations§
impl !RefUnwindSafe for LazyWaterScene
impl !Send for LazyWaterScene
impl !Sync for LazyWaterScene
impl !UnwindSafe for LazyWaterScene
impl Forget for LazyWaterScene
impl Freeze for LazyWaterScenewhere
*const RcInner<RefCell<Option<GyroLiquidGameScene>>> is !null: Freeze,
PhantomData<RcInner<RefCell<Option<GyroLiquidGameScene>>>>: Freeze,
*const RcInner<Cell<Option<WaterSignals>>> is !null: Freeze,
PhantomData<RcInner<Cell<Option<WaterSignals>>>>: Freeze,
impl Move for LazyWaterScene
impl Unpin for LazyWaterScene
impl UnsafeUnpin for LazyWaterScenewhere
*const RcInner<RefCell<Option<GyroLiquidGameScene>>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<Option<GyroLiquidGameScene>>>>: UnsafeUnpin,
*const RcInner<Cell<Option<WaterSignals>>> is !null: UnsafeUnpin,
PhantomData<RcInner<Cell<Option<WaterSignals>>>>: UnsafeUnpin,
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