Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Computer Graphics with WebGL / Project / menu.js
diff options
context:
space:
mode:
1 files changed, 7 insertions, 0 deletions
-rw-r--r--Year 2/Computer Graphics with WebGL/Project/menu.js7
diff --git a/Year 2/Computer Graphics with WebGL/Project/menu.js b/Year 2/Computer Graphics with WebGL/Project/menu.js
index 83a8e3c..1a9555f 100644
--- a/Year 2/Computer Graphics with WebGL/Project/menu.js
+++ b/Year 2/Computer Graphics with WebGL/Project/menu.js
@@ -50,3 +50,10 @@ function levelChange() {
levels[this.value].load();
}
levelSelect.addEventListener('change', levelChange);
+
+const animPause = document.getElementById('pause-movement');
+function pauseMovement() {
+ pauseAnimations = this.checked;
+}
+pauseMovement.call(animPause);
+animPause.addEventListener('change', pauseMovement);