Open hnc01 opened 3 months ago
I added code to set the initial view as cameras[0] or cameras[1] by doing this:
const fr = new FileReader(); fr.onload = () => { cameras = JSON.parse(fr.result); viewMatrix = getViewMatrix(cameras[1]); projectionMatrix = getProjectionMatrix( camera.fx / downsample, camera.fy / downsample, canvas.width, canvas.height, ); gl.uniformMatrix4fv(u_projection, false, projectionMatrix); console.log("Loaded Cameras"); }; fr.readAsText(data);
I do this onload of page but the initial view is not changing. Is there anything else I should be doing?
I added code to set the initial view as cameras[0] or cameras[1] by doing this:
I do this onload of page but the initial view is not changing. Is there anything else I should be doing?