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).
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
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 tonow - (now-before - interval)
which is justbefore += interval
Also changed name interval to minInterval, because its only a cap. Actual interval can be longer (readability).