bevy/crates/bevy_gltf/src
devil ira 48ac955afd Fix loading non-TriangleList meshes without normals in gltf loader (#4376)
# Objective
Make it so that loading in a mesh without normals that is not a `TriangleList` succeeds.

## Solution
Flat normals can only be calculated on a mesh made of triangles.
Check whether the mesh is a `TriangleList` before trying to compute missing normals.

## Additional changes
The panic condition in `duplicate_vertices` did not make sense to me. I moved it to `compute_flat_normals` where the algorithm would produce incorrect results if the mesh is not a `TriangleList`.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
2022-03-31 20:43:01 +00:00
..
lib.rs Gltf animations (#3751) 2022-03-22 02:26:34 +00:00
loader.rs Fix loading non-TriangleList meshes without normals in gltf loader (#4376) 2022-03-31 20:43:01 +00:00