diff options
Diffstat (limited to 'levelSelect.js')
-rw-r--r-- | levelSelect.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/levelSelect.js b/levelSelect.js index 997bbb2..6af87fa 100644 --- a/levelSelect.js +++ b/levelSelect.js @@ -1,3 +1,5 @@ +const DEBUG = true; + import{ setupLevel, setupLevelUi } from './level.js'; @@ -62,6 +64,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) { @@ -69,8 +77,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'); |