Adding Solid Color to BufferGeometry Mesh

Hello, I am currently attempting to make a mesh by culling block objects I have together, but I don’t see it when I add it to the scene.

Full Github: GitHub - TacoError/minecraft-clone: Attempt at making a minecraft clone, but using javascript.
Function In Question: minecraft-clone/chunk.ts at 963f32a9c1c7dd05b9ce2f529ce096d5e97884b3 · TacoError/minecraft-clone · GitHub

If anyone can find why this isn’t showing as a bright green mesh, please let me know. Thanks!

Here are some debugging hints (in case you have not tried them yet):

  • test with a very simple configuration, for example, two block objects next to each other, one chunk only
  • print in the console the values of attribute buffers (positions, normals, uvs)
  • check orientations of faces
  • use a very simple material (like MeshBasicMaterial or MeshNormalMaterial) to see whether the geometry is correct
  • check whether all the data is included in the final mesh (for example, you prepare indices, but do not include them in the geometry)

Thanks for the suggestions, I never actually figured it out. I’m going to be honest and say that I am confused about how the BufferGeometries work and the positions and indicies confuse me.

I am going to stick with instanced meshing right now