issue with resize
yelouafi opened this issue · comments
Yassine Elouafi commented
I tried to handle resizes but got some weird results
window.onresize = () => {
canvas.width = innerWidth / downsample;
canvas.height = innerHeight / downsample;
projectionMatrix = getProjectionMatrix(
camera.fx / downsample,
camera.fy / downsample,
canvas.width,
canvas.height,
);
gl.uniformMatrix4fv(u_projection, false, projectionMatrix);
gl.uniform2fv(u_viewport, new Float32Array([canvas.width, canvas.height]));
};