Skip to content

Out-of-range panic when generating a basic procedural mesh #5257

Answered by afonsolage
luca-aurelia asked this question in Q&A
Discussion options

You must be logged in to vote

Mesh::ATTRIBUTE_UV_0 has the type VertexFormat::Float32x2 so you should use a [f32; 2].

Here is the problem:

uvs.push([0.0, 0.0, 1.0]);

Just set to:

uvs.push([0.0, 0.0]);

And it should work fine.

Edit: This question was already answered on Discord by IceSentry, which already sent an PR to solve this issue.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by IceSentry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants