adjust origin cube and camera drawing thresholds

This commit is contained in:
Luca Conte 2025-04-27 16:48:29 +02:00
parent 2d7fb37165
commit c4599824c6
1 changed files with 2 additions and 2 deletions

View File

@ -589,7 +589,7 @@ async function draw() {
gl.bindBuffer(gl.ARRAY_BUFFER, cameraVertexBuffer); gl.bindBuffer(gl.ARRAY_BUFFER, cameraVertexBuffer);
setAttribPointers(); setAttribPointers();
if (displayMatricesVirtually && interpolateProjection < 0.01) { if (displayMatricesVirtually && interpolateProjection <= 0) {
gl.drawArrays(gl.TRIANGLES, 0, cameraVertices.length / 6); gl.drawArrays(gl.TRIANGLES, 0, cameraVertices.length / 6);
} }
@ -618,7 +618,7 @@ async function draw() {
// draw origin cube // draw origin cube
if (interpolateProjection < 0.99 && interpolateLookAt > 0.01) { if (interpolateProjection < 1 && interpolateLookAt > 0) {
gl.bindBuffer(gl.ARRAY_BUFFER, lineCubeVertexBuffer); gl.bindBuffer(gl.ARRAY_BUFFER, lineCubeVertexBuffer);
setAttribPointers(); setAttribPointers();
gl.uniform3fv(colorOverrideLocation, [1, 0, 0]); gl.uniform3fv(colorOverrideLocation, [1, 0, 0]);