Fix panic due to malformed mesh in specialized_mesh_pipeline (#15899)

# Objective

Fixes #15891

## Solution

Just remove the invalid triangle. I'm assuming that line of code was
originally copied from one that was drawing a quad.

## Testing

- `cargo run --example specialized_mesh_pipeline`
- hover over over the triangles

Tested on macos
This commit is contained in:
Rob Parrett 2024-10-14 19:34:33 -07:00 committed by GitHub
parent f602edad09
commit d17de6c105
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,7 @@ fn setup(mut commands: Commands, mut meshes: ResMut<Assets<Mesh>>) {
PrimitiveTopology::TriangleList,
RenderAssetUsages::default(),
)
.with_inserted_indices(Indices::U32(vec![0, 1, 2, 0, 2, 3]))
.with_inserted_indices(Indices::U32(vec![0, 1, 2]))
.with_inserted_attribute(
Mesh::ATTRIBUTE_POSITION,
vec![