Explorar o código

WebGLRenderer: Fixed setAnimationLoop not sending time to the callback.

Mr.doob %!s(int64=7) %!d(string=hai) anos
pai
achega
a345b875f2
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 2 2
      src/renderers/WebGLRenderer.js
  2. 1 1
      src/renderers/webvr/WebXRManager.js

+ 2 - 2
src/renderers/WebGLRenderer.js

@@ -1020,10 +1020,10 @@ function WebGLRenderer( parameters ) {
 
 	var onAnimationFrameCallback = null;
 
-	function onAnimationFrame() {
+	function onAnimationFrame( time ) {
 
 		if ( vr.isPresenting() ) return;
-		if ( onAnimationFrameCallback ) onAnimationFrameCallback();
+		if ( onAnimationFrameCallback ) onAnimationFrameCallback( time );
 
 	}
 

+ 1 - 1
src/renderers/webvr/WebXRManager.js

@@ -177,7 +177,7 @@ function WebXRManager( renderer ) {
 
 		}
 
-		if ( onAnimationFrameCallback ) onAnimationFrameCallback();
+		if ( onAnimationFrameCallback ) onAnimationFrameCallback( time );
 
 	}