Browse Source

WebGLRenderer: Deprecated getPrecision() and getMaxAnisotropy().

Mr.doob 8 years ago
parent
commit
5756b8f490
3 changed files with 16 additions and 14 deletions
  1. 15 1
      src/Three.Legacy.js
  2. 0 12
      src/renderers/WebGLRenderer.js
  3. 1 1
      src/renderers/webgl/WebGLPrograms.js

+ 15 - 1
src/Three.Legacy.js

@@ -322,7 +322,7 @@ GridHelper.prototype.setColors = function () {
 SkeletonHelper.prototype.update = function () {
 
 	console.error( 'THREE.SkeletonHelper: update() no longer needs to be called.' );
-	
+
 };
 
 export function WireframeHelper( object, hex ) {
@@ -1101,6 +1101,20 @@ Object.assign( WebGLRenderer.prototype, {
 
 	},
 
+	getMaxAnisotropy: function () {
+
+		console.warn( 'THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().' );
+		return this.capabilities.getMaxAnisotropy();
+
+	},
+
+	getPrecision: function () {
+
+		console.warn( 'THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.' );
+		return this.capabilities.precision;
+
+	},
+
 	supportsFloatTextures: function () {
 
 		console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );

+ 0 - 12
src/renderers/WebGLRenderer.js

@@ -343,18 +343,6 @@ function WebGLRenderer( parameters ) {
 
 	};
 
-	this.getMaxAnisotropy = function () {
-
-		return capabilities.getMaxAnisotropy();
-
-	};
-
-	this.getPrecision = function () {
-
-		return capabilities.precision;
-
-	};
-
 	this.getPixelRatio = function () {
 
 		return _pixelRatio;

+ 1 - 1
src/renderers/webgl/WebGLPrograms.js

@@ -111,7 +111,7 @@ function WebGLPrograms( renderer, capabilities ) {
 		// (not to blow over maxLights budget)
 
 		var maxBones = object.isSkinnedMesh ? allocateBones( object ) : 0;
-		var precision = renderer.getPrecision();
+		var precision = capabilities.precision;
 
 		if ( material.precision !== null ) {