Browse Source

Fixed example relying on old requestAnimationFrame.

Mr.doob 12 năm trước cách đây
mục cha
commit
3256f31398
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      examples/webgl_loader_collada_keyframe.html

+ 2 - 1
examples/webgl_loader_collada_keyframe.html

@@ -202,8 +202,9 @@
 
 			}
 
-			function animate( timestamp ) {
+			function animate() {
 
+				var timestamp = Date.now();
 				var frameTime = ( timestamp - lastTimestamp ) * 0.001; // seconds
 
 				if ( progress >= 0 && progress < 48 ) {