From 0026741e17c89b8881074c7a5ef2eb0ce13370b8 Mon Sep 17 00:00:00 2001 From: gbrochar Date: Wed, 25 Nov 2020 14:00:51 +0100 Subject: [PATCH] fix normal bug --- src/client/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/main.ts b/src/client/main.ts index 636565e..4806fee 100644 --- a/src/client/main.ts +++ b/src/client/main.ts @@ -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.