mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
moved files towards new structure. fixes #22
This commit is contained in:
parent
8cf8f057bb
commit
9de3147406
40 changed files with 0 additions and 110 deletions
25
app/lib/Utilities/RequestAnimFrame.js
Normal file
25
app/lib/Utilities/RequestAnimFrame.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
define(['Chuck/Settings'], function(Settings) {
|
||||
|
||||
var requestAnimFrame = (function(){
|
||||
|
||||
var _setTimeout = function( callback ){
|
||||
setTimeout(callback, Settings.BOX2D_TIME_STEP * 1000);
|
||||
}
|
||||
|
||||
if (typeof window != 'undefined') {
|
||||
|
||||
return window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
window.oRequestAnimationFrame ||
|
||||
window.msRequestAnimationFrame ||
|
||||
_setTimeout;
|
||||
|
||||
} else {
|
||||
return _setTimeout;
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
return requestAnimFrame;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue