From 553218a6214b0473f1ac8bad9e832fc5ea84199c Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 7 Jul 2024 12:28:58 -0500 Subject: make debug param nicer --- levelSelect.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'levelSelect.js') diff --git a/levelSelect.js b/levelSelect.js index 04c65a6..7f0a629 100644 --- a/levelSelect.js +++ b/levelSelect.js @@ -1,3 +1,5 @@ +const DEBUG = false; + import{ setupLevel, setupLevelUi } from './level.js'; @@ -63,8 +65,7 @@ export function setupLevelSelectUi(root, sfx) { const levelPicker = name => { const [ dependencies, level ] = levels[name]; const allDependenciesSatisfied = dependencies.map(x => levels[x][1].completed).reduce((acc, x) => acc && x, true); - // if (allDependenciesSatisfied) { - if (true) { + if (DEBUG || allDependenciesSatisfied) { sfx.listAppearAudio.currentTime = 0; sfx.listAppearAudio.play(); const button = document.createElement('input'); -- cgit v1.2.1 From c6c473e03c7b9a993ccaf28bcff2d87fbdf9c931 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 7 Jul 2024 14:30:00 -0500 Subject: add lissajous figure level --- levelSelect.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'levelSelect.js') diff --git a/levelSelect.js b/levelSelect.js index 7f0a629..cdbca2b 100644 --- a/levelSelect.js +++ b/levelSelect.js @@ -1,4 +1,4 @@ -const DEBUG = false; +const DEBUG = true; import{ setupLevel, setupLevelUi } from './level.js'; @@ -58,6 +58,12 @@ const levels = { buildLevel(t => Math.cos(t)*t, t => Math.sin(t)*t, [...Array(8).keys()].map(x => 0.25 * Math.PI * x)), ], + 'lissajous 0': [ + ['orbital'], + buildLevel(t => 8*Math.cos(t), t => 8*Math.sin(2*t), [...Array(8).keys()].map(x => 0.25 * Math.PI * x)), + ], + + }; export function setupLevelSelectUi(root, sfx) { -- cgit v1.2.1