diff options
Diffstat (limited to 'site/main.mjs')
| -rw-r--r-- | site/main.mjs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/site/main.mjs b/site/main.mjs index 6bd2093..e049dea 100644 --- a/site/main.mjs +++ b/site/main.mjs @@ -61,7 +61,7 @@ function renderVars(vm) { e.removeChild(e.lastChild); } - ['out', 'heading', 'velocity', 'doppler'].forEach(name => { + ['out', 'heading', 'speed', 'doppler'].forEach(name => { const dt = document.createElement('dt'); dt.textContent = name; e.appendChild(dt); @@ -90,11 +90,11 @@ function renderArena(robos) { robos.forEach(robo => { let heading = robo.vm.heading(); - let velocity = robo.vm.velocity(); + let speed = robo.vm.speed(); let [velx, vely] = [ Math.cos(2 * Math.PI * heading / 360), Math.sin(2 * Math.PI * heading / 360) - ].map(x => velocity * x); + ].map(x => speed * x); renderRobo(ctx, robo.x, robo.y); robo.x += velx; |
