Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Computer Graphics with WebGL / Project / menu.js
diff options
context:
space:
mode:
Commitd31ecfbf0e16069163e82ee33f815174de2391f6 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-08-27 16:24:25 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-08-27 16:24:25 +0300
Filesfff6bea135b5688c2338fdf3745c19c7c324a923 /Year 2/Computer Graphics with WebGL/Project/menu.js
uni-projects-d31ecfbf0e16069163e82ee33f815174de2391f6.tar
uni-projects-d31ecfbf0e16069163e82ee33f815174de2391f6.tar.gz
uni-projects-d31ecfbf0e16069163e82ee33f815174de2391f6.zip
Parent034d9301fdd5cc70648e2cd9a6ae202b89eebe39 (diff)
[WGL/P] Added coordinates in the top left corner
1 files changed, 11 insertions, 0 deletions
-rw-r--r--Year 2/Computer Graphics with WebGL/Project/menu.js11
diff --git a/Year 2/Computer Graphics with WebGL/Project/menu.js b/Year 2/Computer Graphics with WebGL/Project/menu.js
index 9b61ef7..0b56d2b 100644
--- a/Year 2/Computer Graphics with WebGL/Project/menu.js
+++ b/Year 2/Computer Graphics with WebGL/Project/menu.js
@@ -30,6 +30,17 @@ function verChange() {
verChange.call(onlyVerticalCB);
onlyVerticalCB.addEventListener('change', verChange);
+coordsElem = document.getElementById('coordinates');
+const coordsCB = document.getElementById('coordinates-cb');
+function coordscbChange() {
+ if (this.checked)
+ coordsElem.classList.remove('hide');
+ else
+ coordsElem.classList.add('hide');
+}
+coordscbChange.call(coordsCB);
+coordsCB.addEventListener('change', coordscbChange);
+
/* Levels */
const levelSelect = document.getElementById('level-select');