From d6ff2ea1e9240a5108ed2fb1936b3867a7e78df0 Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Wed, 25 Sep 2019 11:06:33 +0200 Subject: [PATCH] fix visual bug of ms per frame and ship departing from wrong planet --- frontend/src/lib.rs | 4 ++-- frontend/www/index.html | 2 +- frontend/www/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib.rs b/frontend/src/lib.rs index 8a4987c..86240ac 100644 --- a/frontend/src/lib.rs +++ b/frontend/src/lib.rs @@ -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; diff --git a/frontend/www/index.html b/frontend/www/index.html index 557728d..d9e0aa5 100644 --- a/frontend/www/index.html +++ b/frontend/www/index.html @@ -20,7 +20,7 @@
Ms per frame:  - +
diff --git a/frontend/www/index.ts b/frontend/www/index.ts index a4a79d5..f38f8e8 100644 --- a/frontend/www/index.ts +++ b/frontend/www/index.ts @@ -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);