Browse Source

WebGLRenderer: Renamed animate() to setAnimationLoop().

Mr.doob 7 years ago
parent
commit
b55374012d
2 changed files with 8 additions and 1 deletions
  1. 7 0
      src/Three.Legacy.js
  2. 1 1
      src/renderers/WebGLRenderer.js

+ 7 - 0
src/Three.Legacy.js

@@ -1329,6 +1329,13 @@ Object.defineProperties( ShaderMaterial.prototype, {
 
 Object.assign( WebGLRenderer.prototype, {
 
+	animate: function ( callback ) {
+
+		console.warn( 'THREE.WebGLRenderer: .animate() is now .setAnimationLoop().' );
+		this.setAnimationLoop( callback );
+
+	},
+
 	getCurrentRenderTarget: function () {
 
 		console.warn( 'THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().' );

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -1058,7 +1058,7 @@ function WebGLRenderer( parameters ) {
 
 	}
 
-	this.animate = function ( callback ) {
+	this.setAnimationLoop = function ( callback ) {
 
 		onAnimationFrame = callback;
 		onAnimationFrame !== null ? startAnimation() : stopAnimation();