Explorar el Código

src: Remove deprecated code (#33886)

林炳权 hace 1 semana
padre
commit
afffd2a4c4
Se han modificado 3 ficheros con 1 adiciones y 25 borrados
  1. 0 1
      src/Three.TSL.js
  2. 0 8
      src/extras/Controls.js
  3. 1 16
      src/nodes/display/ScreenNode.js

+ 0 - 1
src/Three.TSL.js

@@ -625,7 +625,6 @@ export const viewportDepthTexture = TSL.viewportDepthTexture;
 export const viewportLinearDepth = TSL.viewportLinearDepth;
 export const viewportMipTexture = TSL.viewportMipTexture;
 export const viewportOpaqueMipTexture = TSL.viewportOpaqueMipTexture;
-export const viewportResolution = TSL.viewportResolution;
 export const viewportSafeUV = TSL.viewportSafeUV;
 export const viewportSharedTexture = TSL.viewportSharedTexture;
 export const viewportSize = TSL.viewportSize;

+ 0 - 8
src/extras/Controls.js

@@ -1,5 +1,4 @@
 import { EventDispatcher } from '../core/EventDispatcher.js';
-import { warn } from '../utils.js';
 
 /**
  * Abstract base class for controls.
@@ -83,13 +82,6 @@ class Controls extends EventDispatcher {
 	 */
 	connect( element ) {
 
-		if ( element === undefined ) {
-
-			warn( 'Controls: connect() now requires an element.' ); // @deprecated, the warning can be removed with r185
-			return;
-
-		}
-
 		if ( this.domElement !== null ) this.disconnect();
 
 		this.domElement = element;

+ 1 - 16
src/nodes/display/ScreenNode.js

@@ -1,12 +1,9 @@
 import Node from '../core/Node.js';
-import StackTrace from '../core/StackTrace.js';
 import { NodeUpdateType } from '../core/constants.js';
 import { uniform } from '../core/UniformNode.js';
-import { Fn, nodeImmutable, vec2 } from '../tsl/TSLBase.js';
-
+import { nodeImmutable, vec2 } from '../tsl/TSLBase.js';
 import { Vector2 } from '../../math/Vector2.js';
 import { Vector4 } from '../../math/Vector4.js';
-import { warn } from '../../utils.js';
 
 let _screenSizeVec, _viewportVec;
 
@@ -278,15 +275,3 @@ export const viewportCoordinate = /*@__PURE__*/ screenCoordinate.sub( viewport.x
  */
 export const viewportUV = /*@__PURE__*/ viewportCoordinate.div( viewportSize );
 
-// Deprecated
-
-/**
- * @deprecated since r169. Use {@link screenSize} instead.
- */
-export const viewportResolution = /*@__PURE__*/ ( Fn( () => { // @deprecated, r169
-
-	warn( 'TSL: "viewportResolution" is deprecated. Use "screenSize" instead.', new StackTrace() );
-
-	return screenSize;
-
-}, 'vec2' ).once() )();

粤ICP备19079148号