fixing 3D

This commit is contained in:
Kbz-8
2024-05-07 18:31:14 +02:00
parent 16bcf88544
commit c2aafe9a42
2 changed files with 26 additions and 31 deletions

View File

@ -23,12 +23,6 @@ function renderCube(ctx, x, y, z, angle = 0, sx = 1, sy = 1, sz = 1)
[sx, sy, sz]
);
mat4.translate(
modelMatrix,
modelMatrix,
[-1, 0, 0] // wtf, this works ?
);
const normalMatrix = mat4.create();
mat4.invert(normalMatrix, modelMatrix);
mat4.transpose(normalMatrix, normalMatrix);