Skip to main content

Crate wde_gltf

Crate wde_gltf 

Source
Expand description

GLTF Loader for WaterDropEngine

This crate provides functionality to load and parse glTF files, converting them into assets that can be used within the WaterDropEngine. It supports loading meshes, materials, and textures defined in glTF files and integrates them with the engine’s rendering system.

§Example

To load a glTF model, you can use the GltfLoader in your setup system as follows:

let gltf_asset = asset_server.load("models/model.gltf");
GltfLoader::spawn(&mut gltf_spawn_queue, gltf_asset);

Note that the gltf_asset handle will be enqueued for spawning once it is loaded. The actual spawning of the model into the world will happen automatically in the background, and you can check for its presence using the asset handle. The rendering of the loaded model is then managed by the wde_pbr crate, which handles the materials and shaders for the meshes.

Structs§

GltfAsset
Representation of a 3D GLTF model asset. This will spawn the model and return the parent entity ID. See the crate documentation for usage examples.
GltfLoader
Manager to load glTF models into the Bevy world. See the crate documentation for usage examples.
GltfLoaderSettings
Options for loading a glTF model.
GltfPlugin
GltfSpawnQueue
Queue of glTF assets to spawn once they are loaded.

Enums§

GltfError
Errors that can occur during glTF loading and parsing.