[Sugar-devel] What should be the ideal range for animations FPS ?

laurent bernabe laurent.bernabe at gmail.com
Wed Jan 8 05:30:03 EST 2014


Thank you for these suggestions. I'll study them attentively.

Regards


2014/1/8 Manuel Quiñones <manuq at laptop.org>

> 2014/1/7 Daniel Narvaez <dwnarvaez at gmail.com>:
> > I'm not an expert of graphics performance or web technologies, but my
> > understanding is that you don't want to be the one setting the FPS. The
> > system will know much better when it's time to draw.
> >
> > And that seems the philosophy behind this API
> >
> >
> https://developer.mozilla.org/en/docs/Web/API/window.requestAnimationFrame
> >
> https://hacks.mozilla.org/2011/08/animating-with-javascript-from-setinterval-to-requestanimationframe/
>
> Yes, requestAnimationFrame is the preferred way to do it in JS.  To
> reach a constant speed in your animations you can use Date.now()
> inside the callback.  Further, you can use a tweener lib like TweenJS.
>
> For browser compatibility you should use a polyfill like this one:
> https://gist.github.com/paulirish/1579671
>
> I have to add that to Clock Web.
>
> --
> .. manuq ..
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140108/d7f97da3/attachment.html>


More information about the Sugar-devel mailing list