bevy/assets/models
Robin KAY d74533b407
Add support for custom glTF vertex attributes. (#5370)
# Objective

The objective is to be able to load data from "application-specific"
(see glTF spec 3.7.2.1.) vertex attribute semantics from glTF files into
Bevy meshes.

## Solution

Rather than probe the glTF for the specific attributes supported by
Bevy, this PR changes the loader to iterate through all the attributes
and map them onto `MeshVertexAttribute`s. This mapping includes all the
previously supported attributes, plus it is now possible to add mappings
using the `add_custom_vertex_attribute()` method on `GltfPlugin`.

## Changelog

- Add support for loading custom vertex attributes from glTF files.
- Add the `custom_gltf_vertex_attribute.rs` example to illustrate
loading custom vertex attributes.

## Migration Guide

- If you were instantiating `GltfPlugin` using the unit-like struct
syntax, you must instead use `GltfPlugin::default()` as the type is no
longer unit-like.
2023-04-24 14:20:13 +00:00
..
AlienCake add an example using UI & states to create a game menu (#2960) 2022-01-14 19:09:42 +00:00
animated animation player (#4375) 2022-04-02 22:36:02 +00:00
barycentric Add support for custom glTF vertex attributes. (#5370) 2023-04-24 14:20:13 +00:00
cube Hot asset reloading 2020-05-16 20:18:30 -07:00
FlightHelmet Asset system rework and GLTF scene loading (#693) 2020-10-18 13:48:15 -07:00
monkey Asset system rework and GLTF scene loading (#693) 2020-10-18 13:48:15 -07:00
SimpleSkin Mesh Skinning. Attempt #3 (#4238) 2022-03-29 18:31:13 +00:00
sphere Hot asset reloading 2020-05-16 20:18:30 -07:00
terrain Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
Box0.bin organize examples and add ecs guide 2020-05-01 13:12:47 -07:00