initTransforms

As you can see, the Model-View matrix, the Camera matrix, the Projection matrix, and the Normal matrix are set up here:

function initTransforms() {
mat4.identity(modelViewMatrix);
mat4.translate(modelViewMatrix, modelViewMatrix, home);

mat4.identity(cameraMatrix);
mat4.invert(cameraMatrix, modelViewMatrix);

mat4.identity(projectionMatrix);

mat4.identity(normalMatrix);
mat4.copy(normalMatrix, modelViewMatrix);
mat4.invert(normalMatrix, normalMatrix);
mat4.transpose(normalMatrix, normalMatrix);
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.34.178