Problem with uvs on custom mesh

I am totally stuck on creating a custom mesh. I have the mesh, I set the UVs - the mesh shows fine, but the material is not showing.
I am creating a simple plane. I also do a plane using vertexData.createplane - I print out the values from mine and the vertex data one, and they seem the same. But the vertexdata.createPlane works perfectly, but my created one shows a flat color material.

VertexData {positions: Array(12), indices: Array(6), uvs: Array(8),
normals: Array(12)}
indices: (6) [0, 1, 2, 0, 2, 3]
normals: (12) [0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1]
positions: (12) [0, 0, 0, 10, 0, 0, 10, 10, 0, 0, 10, 0]
uvs: (8) [0, 0, 1, 0, 1, 1, 0, 1][[Prototype]]: Object

Thats probably not helpful but its the console.log of the 2 vertexData objects.

I don’t understand what is missing in the version I created myself. Also I played with the one in the playground and it works great. Really tearing my hair out here…

1 Like

Well posted the problem just 5 mins before I solved it. And of course the answer was staring my right in the face the whole time. after 2 hours. OK should be more careful next time, please ignore.

1 Like

No worries! If you think the solution might be useful to others, you could definitely share it here - this post may come up when people with a similar problem try Googling :slight_smile:

1 Like