glTF examples
The engine's glTF examples: what each one shows, whether it runs in a browser and the command that runs it.
Loading glTF scenes, meshes, materials and their extensions. There are 9 examples on this page. For the concepts behind them, see glTF.
Run any of them from the engine core's workspace (the folder of the engine source that holds the neo crate's Cargo.toml); see Run an example.
Examples#
| Example | What it shows | Web | Run |
|---|---|---|---|
| Custom glTF vertex attribute 2D | Renders a glTF mesh in 2D with a custom vertex attribute | Yes | cargo run --example custom_gltf_vertex_attribute |
| Edit glTF Material | Showcases changing materials of a glTF after Scene spawn | Yes | cargo run --example edit_material_on_gltf |
| glTF extension AnimationGraph | Uses glTF data to build an AnimationGraph via extension processing | Yes | cargo run --example gltf_extension_animation_graph |
| glTF extension processing to build Mesh2ds from glTF data | Uses glTF extension data to convert incoming Mesh3d/MeshMaterial3d assets to 2d | Yes | cargo run --example gltf_extension_mesh_2d |
| glTF Skinned Mesh | Skinned mesh example with mesh and joints data loaded from a glTF file | Yes | cargo run --example gltf_skinned_mesh |
| Load glTF | Loads and renders a glTF file as a scene | Yes | cargo run --example load_gltf |
| Load glTF extras | Loads and renders a glTF file as a scene, including the gltf extras | Yes | cargo run --example load_gltf_extras |
| Query glTF primitives | Query primitives in a glTF scene | Yes | cargo run --example query_gltf_primitives |
| Update glTF Scene | Update a scene from a glTF file, either by spawning the scene as a child of another entity, or by accessing the entities of the scene | Yes | cargo run --example update_gltf_scene |