pub trait SceneConstructor: Send + Sync {
// Required method
fn construct(&self, r: &mut RanimScene);
// Provided method
fn build_scene(&self) -> SealedRanimScene { ... }
}Expand description
A scene constructor
It can be a simple fn pointer of fn(&mut RanimScene),
or any type implements Fn(&mut RanimScene) + Send + Sync.
Required Methods§
Sourcefn construct(&self, r: &mut RanimScene)
fn construct(&self, r: &mut RanimScene)
The construct logic
Provided Methods§
Sourcefn build_scene(&self) -> SealedRanimScene
fn build_scene(&self) -> SealedRanimScene
Use the constructor to build a SealedRanimScene