I experimented with Greensock TweenMax JS and Three.js . Since both libraries use requestAnimationFrame (rAF), I needed to decide which library should handle this.
If I use rAF built into Three.js , it runs at about 30 frames per second and is pretty smooth.
If I use TweenMax for example: TweenMax.ticker.addEventListener('tick', animate); It runs at about 55-60 frames per second, but is a bit volatile.
I can change the fps in TweenMax to TweenMax.ticker.fps(30); which is expected to be similar to the tr.js rAF version.
My question is, which method is preferred and considered best practice over another? Also, if I choose Three.js, can I change the fps in its rAF implementation?
Finally, how would you define fps to fit a wider audience? Limiting to 30 frames per second seems nice, but a little arbitrary, some users may have much higher rates than I assume.
UPDATE:
From the feedback from mrdoob and jack, I tried both rAFs in three .js and rAFs using TweenMax with turning anti-aliasing on and off.
antialias on:
Three.js rAF (default) - 30fps smooth.
http://jsfiddle.net/cR7Lx/21/
TweenMax rAF (default) - 55-60fps slightly choppy.
http://jsfiddle.net/cR7Lx/23/
TweenMax rAF (fps(30)) - 30fps smooth.
http://jsfiddle.net/cR7Lx/24/
antialias off:
Three.js rAF (default) - 30 - 60fps slightly choppy. TweenMax rAF (default) - 92-120fps slightly choppy. TweenMax rAF (fps(30)) - 30fps smooth.
Maybe with someone who knows how requestAnimationFrame works under the hood to help explain the differences, now I will use either TweenMax 30fps or Three.js with antialiases.