3 ms·
I got nice quality on Chrome 21. Substitute the window.requestAnimationFrame directive with: window.requestAnimationFrame = (function() { return window.r
by program 14y ago
I got nice quality on Chrome 21. Substitute the window.requestAnimationFrame directive with:
window.requestAnimationFrame = (function() {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame || window.oRequestAnimationFrame ||
window.msRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60); };
})();
and it will work in Opera 12 too.
- cbrandolino_ 14y agoWow, I was sure they implemented requestAnimationFrame already! Anyway, I limited myself to trying out the various vendors' prefixes; this being mainly an experiment/preview I'd rather keep the code clean than support non-cutting-edge browsers. I'll update the paragraph about the compatibility though; thanks for the heads up!