diff options
-rw-r--r-- | level.js | 2 | ||||
-rw-r--r-- | levelSelect.js | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -60,6 +60,7 @@ export function setupLevelUi(level, root, sfx) { } catch(err) { } level.running = false; level.path = computePath(level.equations); + level.resources.forEach(x => x.collected = false); render(ui.ctx, level, 0); }; ui.xeq.onkeydown = ui.xeq.onchange; @@ -77,6 +78,7 @@ export function setupLevelUi(level, root, sfx) { } catch(err) { } level.running = false; level.path = computePath(level.equations); + level.resources.forEach(x => x.collected = false); render(ui.ctx, level, 0); }; ui.yeq.onkeydown = ui.yeq.onchange; diff --git a/levelSelect.js b/levelSelect.js index 9d45346..f441f06 100644 --- a/levelSelect.js +++ b/levelSelect.js @@ -11,6 +11,9 @@ const levels = { 'initial jump': [ [], setupLevel([], [8, 0]) ], 'monopole harvesting': [ ['initial jump'], setupLevel([[3, 3]], [8,8]) ], + 'inverted': [ ['initial jump'], setupLevel([[-3, -3]], [-8,-8]) ], + 'double inverted': [ ['initial jump'], setupLevel([[-8, -8]], [-3,-3]) ], + 'parabolic 0': [ ['monopole harvesting'], buildLevel(t => t, t => t**2, [...Array(4).keys()].map(x => x)), @@ -50,7 +53,7 @@ const levels = { ], 'spiral': [ ['orbital'], - buildLevel(t => 8*Math.cos(t)*t*0.1, t => 8*Math.sin(t)*t*0.1, [...Array(7).keys()].map(x => 0.3 * Math.PI * x)), + buildLevel(t => Math.cos(t)*t, t => Math.sin(t)*t, [...Array(8).keys()].map(x => 0.25 * Math.PI * x)), ], }; |