Browse Source

WebGLRenderer: Fixed missing method in dispose()

Mr.doob 7 years ago
parent
commit
53cfc2e2e0
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/renderers/WebGLRenderer.js

+ 3 - 3
src/renderers/WebGLRenderer.js

@@ -505,7 +505,7 @@ function WebGLRenderer( parameters ) {
 
 
 		vr.dispose();
 		vr.dispose();
 
 
-		stopAnimation();
+		animation.stop();
 
 
 	};
 	};
 
 
@@ -1032,10 +1032,10 @@ function WebGLRenderer( parameters ) {
 	this.setAnimationLoop = function ( callback ) {
 	this.setAnimationLoop = function ( callback ) {
 
 
 		onAnimationFrameCallback = callback;
 		onAnimationFrameCallback = callback;
-		animation.start();
-
 		vr.setAnimationLoop( callback );
 		vr.setAnimationLoop( callback );
 
 
+		animation.start();
+
 	};
 	};
 
 
 	// Rendering
 	// Rendering