summaryrefslogtreecommitdiff
path: root/levelSelect.js
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2024-07-06 22:10:00 -0500
committersanine <sanine.not@pm.me>2024-07-06 22:10:00 -0500
commit909a3c49fb48361b65dceb437b4182380d3b8277 (patch)
treeb3cb9ede70e682183e200652593cb219da0973f1 /levelSelect.js
parentc012fec2870757990080e823d42dd91031e64f25 (diff)
add more levels
Diffstat (limited to 'levelSelect.js')
-rw-r--r--levelSelect.js8
1 files changed, 6 insertions, 2 deletions
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;