thothbot / parallax

Cross-platform Java 3D SDK
http://thothbot.github.io
MIT License
84 stars 26 forks source link

[SUGGESTION] Configurable frame rate for Animations #60

Open ghost opened 8 years ago

ghost commented 8 years ago

Frame rate for Animations must be configurable in 2.0. It should not kill the browser with 60fps all the time. Developers should be able to set the frame rate of the animated scene.

thothbot commented 8 years ago

We use requestAnimationFrame for this, do you have any issues in browser?

ghost commented 8 years ago

Consider multiple animations on a single page. requestAnimationFrame kicks in every 16 milliseconds (60 frames per second). That may choke the browser/machine if there are multiple separate animations running on the same page. You may put some sort of fps controller. I think there are some made in javascript as a library out there.

thothbot commented 8 years ago

I see, we need to test it for multiple frames, I'll add to dev plan