From b648eaffe1f9a33280ef4486474ca0aa52dac9f8 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 7 Jul 2024 12:47:00 -0500 Subject: update path speed --- level.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'level.js') diff --git a/level.js b/level.js index 0d62adc..f5aa29c 100644 --- a/level.js +++ b/level.js @@ -6,7 +6,7 @@ const X_START = '0'; const Y_START = 't'; const PATH_LEN = 20; -const PATH_STEP = PATH_LEN/1000; +const PATH_STEP = PATH_LEN/500; const SLOW_RAMP = 1; const FAST_RAMP = 0.01; @@ -177,7 +177,7 @@ function stepLevel(ui, level, index) { render(ui.ctx, level, 0); } else if (level.running && index < level.path.length-1) { const distNext = distance(pos, level.path[index+1] || pos); - setTimeout(() => stepLevel(ui, level, index+1), 50*distNext); + setTimeout(() => stepLevel(ui, level, index+1), distNext); } else { if (index >= level.path.length-1) { finishLevel(ui, level, true); -- cgit v1.2.1