Rotate faster on lower FPS

This commit is contained in:
Ivan Danyliuk 2018-10-20 21:38:33 +02:00
parent c7d4a5d014
commit c72c092286
No known key found for this signature in database
GPG Key ID: 97ED33CE024E1DBF

View File

@ -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 {