diff --git a/src/script.js b/src/script.js index 9345170..e059098 100644 --- a/src/script.js +++ b/src/script.js @@ -72,6 +72,13 @@ async function init() { }); document.getElementById("displayMatricesVirtually").addEventListener("input", (e) => { displayMatricesVirtually = e.target.checked; + if (!displayMatricesVirtually) { + document.getElementById("invertZAxis").checked = true; + document.getElementById("invertZAxis").disabled = true; + } else { + document.getElementById("invertZAxis").checked = invertZAxis; + document.getElementById("invertZAxis").disabled = false; + } }); document.getElementById("backfaceCulling").addEventListener("input", (e) => { if (e.target.checked) { @@ -479,7 +486,7 @@ async function draw() { let virtualProjectionMatrix = []; - mat4BuildPerspective(virtualProjectionMatrix, 90.0 / 180.0 * Math.PI, cv.width / cv.height, 1, 5); + mat4BuildPerspective(virtualProjectionMatrix, 90.0 / 180.0 * Math.PI, cv.width / cv.height, 0.9, 5); if (!invertZAxis) { let zAxisFlipMatrix = [];