Skip to main content

WorldLoader

Trait WorldLoader 

Source
pub trait WorldLoader {
    // Required method
    fn load(
        &mut self,
        manifest: &WorldManifest,
        assets: &AssetSource,
        anchor: Vec3,
    ) -> LoadedWorldMeta;
}
Expand description

The rendering seam. A browser implements this to place a validated manifest into its renderer and hand back the navigation metadata. The Navigator owns everything else (resolution, arming, cooldown, focus).

Required Methods§

Source

fn load( &mut self, manifest: &WorldManifest, assets: &AssetSource, anchor: Vec3, ) -> LoadedWorldMeta

Place manifest (already parsed + validated) into the renderer, resolving its glTF/texture assets through assets (which fetches remote URLs from a cache), and return the navigation metadata. The anchor is where the player will stand (for e.g. a void floor).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§