diff --git a/shader.mjs b/shader.mjs index be42fe4..919e5f2 100644 --- a/shader.mjs +++ b/shader.mjs @@ -125,8 +125,8 @@ function updateCamera(gl, program) { // Rotation const rot = gl.getUniformLocation(program, "camera_rot"); - let M1 = calcRotationMatrix([0, 1, 0], mouse_pos[0]); - let M2 = calcRotationMatrix([1, 0, 0], mouse_pos[1]); + let M1 = calcRotationMatrix([0, -1, 0], mouse_pos[0]); + let M2 = calcRotationMatrix([-1, 0, 0], mouse_pos[1]); let rot_mat = glMatrix.mat3.create(); glMatrix.mat3.mul(rot_mat, M1, M2);