Skip to content

Commit

Permalink
fix cube
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Dec 15, 2023
1 parent ebcead3 commit 9b8c20d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/primitives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ export function createCubeVertices({size = 1} = {}) {

// Each face needs all four vertices because the normals and texture
// coordinates are not all the same.
positions.push(position);
normals.push(normal);
texcoords.push(uv);
positions.push(...position);
normals.push(...normal);
texcoords.push(...uv);

}
// Two triangles make a square face.
Expand Down

0 comments on commit 9b8c20d

Please sign in to comment.