jonoxia / rpgbase

Generic Node.js/HTML5 role-playing game client/server
8 stars 6 forks source link

Animation is noticeably slower in Safari than Firefox. #15

Open jonoxia opened 11 years ago

jonoxia commented 11 years ago

Maybe try using the requestAnimationFrame shim to get more consistent performance?

It goes like this:

// shim layer with setTimeout fallback // Written by Paul Irish window.requestAnimFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(/* function / callback, / DOMElement */ element){ window.setTimeout(callback, 1000 / 60); }; })();

Googleshng commented 11 years ago

Right this second, both seem to be running equally well. Not sure if this is due to a recent change, or I just didn't notice that once animation was recoded, the speed I set was under the limit of what Safari could handle.