Skip to content

Commit

Permalink
scale height and length by tile values
Browse files Browse the repository at this point in the history
  • Loading branch information
cesswairimu committed Jan 29, 2024
1 parent 515e72e commit f7598b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ async function createGLFTAsset(baseImage, textureImage, normalImage, repeatImage
let vertex_hash = [];
for (let i = 0; i < vertices.length; i += 5) {
const vertex = new GLTFUtils.Vertex();
vertex.x = vertices[i];
vertex.y = vertices[i + 1];
vertex.x = vertices[i] * repeatImage[0];
vertex.y = vertices[i + 1] * repeatImage[1];
vertex.z = vertices[i + 2];
vertex.u = vertices[i + 3] * repeatImage[0]; // texture co-ord
vertex.v = vertices[i + 4] * repeatImage[1]; // texture co-ord
Expand Down

0 comments on commit f7598b5

Please sign in to comment.