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:
if let Ok(gltf_model) = GltfLoader::load("models/model.gltf", &asset_server) {
commands.spawn((
Transform::from_translation(Vec3::ZERO).with_scale(Vec3::splat(1.0)),
PbrModel(gltf_model.models)
));
}The rendering of the loaded model is then managed by the wde_pbr crate, which handles the materials and shaders for the meshes.
Structs§
- Gltf
Asset - 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.
- Gltf
Loader - Manager to load glTF models into the Bevy world. See the crate documentation for usage examples.
Enums§
- Gltf
Error - Errors that can occur during glTF loading and parsing.