domitry / elegans

Elegant 3D plots generator with WebGL.
http://elegans.readthedocs.org/
Other
59 stars 20 forks source link

Fixed fps cap #15

Closed fl4p closed 8 years ago

fl4p commented 8 years ago

The FPS cap in World.animate is a bit off. The real frame rate will always be lower than the given interval, because the before is wrongly updated. It needs to be set to now - (now-before - interval) which is just before += interval

Also changed name interval to minInterval, because its only a cap. Actual interval can be longer (readability).

fl4p commented 8 years ago

I dont think a framerate cap is necessary, though. The Browser usually limits rate to 60 FPS. User experience is more "awesome" then. See https://github.com/domitry/elegans/issues/16

domitry commented 8 years ago

Thanks a lot! Merged.