From d3a74283d15fdb5dfc76f0f4456d3de145dacfa3 Mon Sep 17 00:00:00 2001 From: George Corney Date: Tue, 16 Sep 2014 11:24:10 +0100 Subject: [PATCH] Added requestAnimationFrame To fix the warning " 'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead. " in more recent versions of Chrome --- src/dat/utils/requestAnimationFrame.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dat/utils/requestAnimationFrame.js b/src/dat/utils/requestAnimationFrame.js index 2954316..ee1f27d 100644 --- a/src/dat/utils/requestAnimationFrame.js +++ b/src/dat/utils/requestAnimationFrame.js @@ -19,7 +19,8 @@ define([ * http://paulirish.com/2011/requestanimationframe-for-smart-animating/ */ - return window.webkitRequestAnimationFrame || + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || @@ -28,4 +29,4 @@ define([ window.setTimeout(callback, 1000 / 60); }; -}); \ No newline at end of file +});