From 5756b8f49040a16559da19c1148b8b331f8a6eb0 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Tue, 18 Jul 2017 14:14:39 -0700 Subject: [PATCH] WebGLRenderer: Deprecated getPrecision() and getMaxAnisotropy(). --- src/Three.Legacy.js | 16 +++++++++++++++- src/renderers/WebGLRenderer.js | 12 ------------ src/renderers/webgl/WebGLPrograms.js | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Three.Legacy.js b/src/Three.Legacy.js index 42fdfcfa82..7a4bb55230 100644 --- a/src/Three.Legacy.js +++ b/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\' ).' ); diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index dc33c52547..ef40d08aab 100644 --- a/src/renderers/WebGLRenderer.js +++ b/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; diff --git a/src/renderers/webgl/WebGLPrograms.js b/src/renderers/webgl/WebGLPrograms.js index ae6b120ab5..ab24bc0637 100644 --- a/src/renderers/webgl/WebGLPrograms.js +++ b/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 ) { -- GitLab