fix normal bug

This commit is contained in:
gbrochar 2020-11-25 14:00:51 +01:00
parent e4fc439d01
commit 0026741e17
1 changed files with 3 additions and 3 deletions

View File

@ -514,6 +514,9 @@ function drawScene(gl: any,
mat4.rotateZ(normalModelMatrix,
normalModelMatrix,
params.rot.z);
mat4.rotateY(normalModelMatrix,
normalModelMatrix,
squareRotation);
const modelMatrix = mat4.create();
mat4.translate(modelMatrix,
@ -523,9 +526,6 @@ function drawScene(gl: any,
-params.avg.y,
-params.avg.z,
]);
mat4.rotateY(modelMatrix,
modelMatrix,
squareRotation);
// Set the drawing position to the "identity" point, which is
// the center of the scene.