Skip to content

Commit 50891bb

Browse files
Helgahlg
authored andcommitted
fix three.js inclusion
1 parent 7faa38b commit 50891bb

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

Client/RequestAnimationFrame.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Provides requestAnimationFrame in a cross browser way.
3+
* http://paulirish.com/2011/requestanimationframe-for-smart-animating/
4+
*/
5+
6+
if ( !window.requestAnimationFrame ) {
7+
8+
window.requestAnimationFrame = ( function() {
9+
10+
return window.webkitRequestAnimationFrame ||
11+
window.mozRequestAnimationFrame ||
12+
window.oRequestAnimationFrame ||
13+
window.msRequestAnimationFrame ||
14+
function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element ) {
15+
16+
window.setTimeout( callback, 1000 / 60 );
17+
18+
};
19+
20+
} )();
21+
22+
}

Client/index_sprint.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
}
1212
</script>
1313
<script src="Three.js"></script>
14-
<script src="extras/io/JSONLoader.js"></script>
15-
<script src="examples/js/RequestAnimationFrame.js"></script>
14+
<script src="RequestAnimationFrame.js"></script>
1615
<script src="ThreeJsViewer.js"></script>
1716
<script>
1817
$(document).ready(function() {

0 commit comments

Comments
 (0)