From c72c092286e0b70c78eea41c4df933789154235d Mon Sep 17 00:00:00 2001 From: Ivan Danyliuk Date: Sat, 20 Oct 2018 21:38:33 +0200 Subject: [PATCH] Rotate faster on lower FPS --- animate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/animate.go b/animate.go index 8aded59..0895aad 100644 --- a/animate.go +++ b/animate.go @@ -29,7 +29,8 @@ func (w *WebGLScene) animate() { if w.autoRotate { pos := w.graphGroup.Object.Get("rotation") - pos.Set("y", pos.Get("y").Float()+float64(0.001)) + coeff := 60 / FPS * 0.001 // rotate faster on lower FPS + pos.Set("y", pos.Get("y").Float()+coeff) } if w.wobble {