fix visual bug of ms per frame and ship departing from wrong planet

This commit is contained in:
ajuvercr 2019-09-25 11:06:33 +02:00
parent 814f0fb0ff
commit d6ff2ea1e9
3 changed files with 4 additions and 4 deletions

View file

@ -55,8 +55,8 @@ impl Circle {
x = x3 - (r.powi(2)-(q/2.0).powi(2)).sqrt() * (y1-y2)/q;
y = y3 - (r.powi(2)-(q/2.0).powi(2)).sqrt() * (x2-x1)/q;
a2 = (y - y1).atan2(x - x1);
a1 = (y - y2).atan2(x - x2);
a1 = (y - y1).atan2(x - x1);
a2 = (y - y2).atan2(x - x2);
}
let distance = q.ceil() as usize + 1;

View file

@ -20,7 +20,7 @@
</div>
<div>
<span>Ms per frame:&nbsp;</span>
<input type="number" id="speed" value="500">
<input type="number" id="speed" value="100">
</div>
<div class="slidecontainer">
<input type="range" min="0" max="1" value="1" class="slider" id="turnSlider">

View file

@ -51,7 +51,7 @@ const RESOLUTION = [CANVAS.width, CANVAS.height];
const GL = CANVAS.getContext("webgl");
var ms_per_frame = 100;
var ms_per_frame = parseInt(SPEED.value);
resizeCanvasToDisplaySize(CANVAS);