<div dir="ltr">Thank you for these suggestions. I'll study them attentively.<div><br></div><div><div>Regards</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/8 Manuel Quiñones <span dir="ltr"><<a href="mailto:manuq@laptop.org" target="_blank">manuq@laptop.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2014/1/7 Daniel Narvaez <<a href="mailto:dwnarvaez@gmail.com">dwnarvaez@gmail.com</a>>:<br>
> I'm not an expert of graphics performance or web technologies, but my<br>
> understanding is that you don't want to be the one setting the FPS. The<br>
> system will know much better when it's time to draw.<br>
><br>
> And that seems the philosophy behind this API<br>
><br>
> <a href="https://developer.mozilla.org/en/docs/Web/API/window.requestAnimationFrame" target="_blank">https://developer.mozilla.org/en/docs/Web/API/window.requestAnimationFrame</a><br>
> <a href="https://hacks.mozilla.org/2011/08/animating-with-javascript-from-setinterval-to-requestanimationframe/" target="_blank">https://hacks.mozilla.org/2011/08/animating-with-javascript-from-setinterval-to-requestanimationframe/</a><br>

<br>
Yes, requestAnimationFrame is the preferred way to do it in JS.  To<br>
reach a constant speed in your animations you can use Date.now()<br>
inside the callback.  Further, you can use a tweener lib like TweenJS.<br>
<br>
For browser compatibility you should use a polyfill like this one:<br>
<a href="https://gist.github.com/paulirish/1579671" target="_blank">https://gist.github.com/paulirish/1579671</a><br>
<br>
I have to add that to Clock Web.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
.. manuq ..<br>
</font></span></blockquote></div><br></div>