Просмотр исходного кода

Global: Remove deprecated code. (#31254)

Michael Herzog 11 месяцев назад
Родитель
Сommit
ca6d896fd8

+ 0 - 27
examples/jsm/capabilities/WebGL.js

@@ -108,33 +108,6 @@ class WebGL {
 
 
 	}
 	}
 
 
-	// @deprecated, r168
-
-	static isWebGLAvailable() {
-
-		console.warn( 'isWebGLAvailable() has been deprecated and will be removed in r178. Use isWebGL2Available() instead.' );
-
-		try {
-
-			const canvas = document.createElement( 'canvas' );
-			return !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) );
-
-		} catch ( e ) {
-
-			return false;
-
-		}
-
-	}
-
-	static getWebGLErrorMessage() {
-
-		console.warn( 'getWebGLErrorMessage() has been deprecated and will be removed in r178. Use getWebGL2ErrorMessage() instead.' );
-
-		return this._getErrorMessage( 1 );
-
-	}
-
 }
 }
 
 
 export default WebGL;
 export default WebGL;

+ 0 - 16
src/nodes/accessors/UniformArrayNode.js

@@ -346,19 +346,3 @@ export default UniformArrayNode;
  * @returns {UniformArrayNode}
  * @returns {UniformArrayNode}
  */
  */
 export const uniformArray = ( values, nodeType ) => nodeObject( new UniformArrayNode( values, nodeType ) );
 export const uniformArray = ( values, nodeType ) => nodeObject( new UniformArrayNode( values, nodeType ) );
-
-/**
- * @tsl
- * @function
- * @deprecated since r168. Use {@link uniformArray} instead.
- *
- * @param {Array<any>} values - Array-like data.
- * @param {string} nodeType - The data type of the array elements.
- * @returns {UniformArrayNode}
- */
-export const uniforms = ( values, nodeType ) => { // @deprecated, r168
-
-	console.warn( 'THREE.TSL: uniforms() has been renamed to uniformArray().' );
-	return nodeObject( new UniformArrayNode( values, nodeType ) );
-
-};

+ 0 - 16
src/nodes/core/NodeBuilder.js

@@ -2776,22 +2776,6 @@ class NodeBuilder {
 	 */
 	 */
 	*[ Symbol.iterator ]() { }
 	*[ Symbol.iterator ]() { }
 
 
-	// Deprecated
-
-	/**
-	 * @function
-	 * @deprecated since r168. Use `new NodeMaterial()` instead, with targeted node material name.
-	 *
-	 * @param {string} [type='NodeMaterial'] - The node material type.
-	 * @throws {Error}
-	 */
-	createNodeMaterial( type = 'NodeMaterial' ) { // @deprecated, r168
-
-		throw new Error( `THREE.NodeBuilder: createNodeMaterial() was deprecated. Use new ${ type }() instead.` );
-
-	}
-
-
 }
 }
 
 
 export default NodeBuilder;
 export default NodeBuilder;

+ 0 - 29
src/nodes/core/StackNode.js

@@ -286,35 +286,6 @@ class StackNode extends Node {
 
 
 	}
 	}
 
 
-	// Deprecated
-
-	/**
-	 * @function
-	 * @deprecated since r168. Use {@link StackNode#Else} instead.
-	 *
-	 * @param {...any} params
-	 * @returns {StackNode}
-	 */
-	else( ...params ) { // @deprecated, r168
-
-		console.warn( 'THREE.TSL: .else() has been renamed to .Else().' );
-		return this.Else( ...params );
-
-	}
-
-	/**
-	 * @deprecated since r168. Use {@link StackNode#ElseIf} instead.
-	 *
-	 * @param {...any} params
-	 * @returns {StackNode}
-	 */
-	elseif( ...params ) { // @deprecated, r168
-
-		console.warn( 'THREE.TSL: .elseif() has been renamed to .ElseIf().' );
-		return this.ElseIf( ...params );
-
-	}
-
 }
 }
 
 
 export default StackNode;
 export default StackNode;

+ 0 - 26
src/nodes/display/ScreenNode.js

@@ -258,29 +258,3 @@ export const viewportResolution = /*@__PURE__*/ ( Fn( () => { // @deprecated, r1
 	return screenSize;
 	return screenSize;
 
 
 }, 'vec2' ).once() )();
 }, 'vec2' ).once() )();
-
-/**
- * @tsl
- * @deprecated since r168. Use {@link screenUV} instead.
- * @type {Node<vec2>}
- */
-export const viewportTopLeft = /*@__PURE__*/ ( Fn( () => { // @deprecated, r168
-
-	console.warn( 'THREE.TSL: "viewportTopLeft" is deprecated. Use "screenUV" instead.' );
-
-	return screenUV;
-
-}, 'vec2' ).once() )();
-
-/**
- * @tsl
- * @deprecated since r168. Use `screenUV.flipY()` instead.
- * @type {Node<vec2>}
- */
-export const viewportBottomLeft = /*@__PURE__*/ ( Fn( () => { // @deprecated, r168
-
-	console.warn( 'THREE.TSL: "viewportBottomLeft" is deprecated. Use "screenUV.flipY()" instead.' );
-
-	return screenUV.flipY();
-
-}, 'vec2' ).once() )();

+ 0 - 19
src/nodes/math/ConditionalNode.js

@@ -226,22 +226,3 @@ export default ConditionalNode;
 export const select = /*@__PURE__*/ nodeProxy( ConditionalNode ).setParameterLength( 2, 3 );
 export const select = /*@__PURE__*/ nodeProxy( ConditionalNode ).setParameterLength( 2, 3 );
 
 
 addMethodChaining( 'select', select );
 addMethodChaining( 'select', select );
-
-// Deprecated
-
-/**
- * @tsl
- * @function
- * @deprecated since r168. Use {@link select} instead.
- *
- * @param {...any} params
- * @returns {ConditionalNode}
- */
-export const cond = ( ...params ) => { // @deprecated, r168
-
-	console.warn( 'THREE.TSL: cond() has been renamed to select().' );
-	return select( ...params );
-
-};
-
-addMethodChaining( 'cond', cond );

+ 0 - 17
src/nodes/math/OperatorNode.js

@@ -730,22 +730,6 @@ addMethodChaining( 'decrementBefore', decrementBefore );
 addMethodChaining( 'increment', increment );
 addMethodChaining( 'increment', increment );
 addMethodChaining( 'decrement', decrement );
 addMethodChaining( 'decrement', decrement );
 
 
-/**
- * @tsl
- * @function
- * @deprecated since r168. Use {@link mod} instead.
- *
- * @param {Node} a - The first input.
- * @param {Node} b - The second input.
- * @returns {OperatorNode}
- */
-export const remainder = ( a, b ) => { // @deprecated, r168
-
-	console.warn( 'THREE.TSL: "remainder()" is deprecated. Use "mod( int( ... ) )" instead.' );
-	return mod( a, b );
-
-};
-
 /**
 /**
  * @tsl
  * @tsl
  * @function
  * @function
@@ -762,5 +746,4 @@ export const modInt = ( a, b ) => { // @deprecated, r175
 
 
 };
 };
 
 
-addMethodChaining( 'remainder', remainder );
 addMethodChaining( 'modInt', modInt );
 addMethodChaining( 'modInt', modInt );

+ 0 - 14
src/nodes/tsl/TSLCore.js

@@ -855,17 +855,3 @@ addMethodChaining( 'append', ( node ) => { // @deprecated, r176
 
 
 } );
 } );
 
 
-/**
- * @tsl
- * @function
- * @deprecated since r168. Use {@link Fn} instead.
- *
- * @param {...any} params
- * @returns {Function}
- */
-export const tslFn = ( ...params ) => { // @deprecated, r168
-
-	console.warn( 'THREE.TSL: tslFn() has been renamed to Fn().' );
-	return Fn( ...params );
-
-};

+ 0 - 17
src/nodes/utils/LoopNode.js

@@ -351,20 +351,3 @@ export const Continue = () => expression( 'continue' ).toStack();
  * @returns {ExpressionNode}
  * @returns {ExpressionNode}
  */
  */
 export const Break = () => expression( 'break' ).toStack();
 export const Break = () => expression( 'break' ).toStack();
-
-// Deprecated
-
-/**
- * @tsl
- * @function
- * @deprecated since r168. Use {@link Loop} instead.
- *
- * @param {...any} params
- * @returns {LoopNode}
- */
-export const loop = ( ...params ) => { // @deprecated, r168
-
-	console.warn( 'THREE.TSL: loop() has been renamed to Loop().' );
-	return Loop( ...params );
-
-};

粤ICP备19079148号