From 909a3c49fb48361b65dceb437b4182380d3b8277 Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 6 Jul 2024 22:10:00 -0500 Subject: add more levels --- levelSelect.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'levelSelect.js') diff --git a/levelSelect.js b/levelSelect.js index 238639c..30285e7 100644 --- a/levelSelect.js +++ b/levelSelect.js @@ -19,6 +19,10 @@ const levels = { ['parabolic 0'], buildLevel(t => -0.5*(t-3)**2 + 4, t => t-3, [...Array(8).keys()].map(x => x - 2)), ], + 'logarithmic': [ + ['parabolic 0'], + buildLevel(t => t-3, t => 4*Math.log(t), [...Array(8).keys()].map(x => x - 2)), + ], 'orbital': [ ['parabolic 0', 'sinusoidal'], buildLevel(t => 8*Math.cos(t), t => 8*Math.sin(t), [...Array(8).keys()].map(x => Math.PI * x / 4)), @@ -39,8 +43,8 @@ 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 (allDependenciesSatisfied) { + // if (true) { const button = document.createElement('input'); button.type = 'button'; button.value = name; -- cgit v1.2.1