Skip to main content

Skyboxes

Trait Skyboxes 

Source
pub trait Skyboxes:
    Catalog
    + Clone
    + Debug
    + Eq
    + Hash {
    // Required method
    fn build(&self, assets: &Assets) -> SkyboxData;
}
Expand description

Turns a game’s value into a skybox.

Values are cache keys: equal values must build the same sky. Catalog proves every named asset loads before the first frame, and a startup error names a skybox by its Debug.

Required Methods§

Source

fn build(&self, assets: &Assets) -> SkyboxData

Builds this value’s sky, the first time a frame is drawn by it.

Must not read a file or the network; loaded data is in assets.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§