Skip to content

Commit 1044f86

Browse files
authored
Global: Remove deprecated code. (mrdoob#32569)
1 parent 877da70 commit 1044f86

7 files changed

Lines changed: 3 additions & 199 deletions

File tree

src/nodes/accessors/StorageBufferNode.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { varying } from '../tsl/TSLBase.js';
44
import { storageElement } from '../utils/StorageArrayElementNode.js';
55
import { NodeAccess } from '../core/constants.js';
66
import { getTypeFromLength } from '../core/NodeUtils.js';
7-
import { warn } from '../../utils.js';
87

98
/**
109
* This node is used in context of compute shaders and allows to define a
@@ -398,21 +397,3 @@ export default StorageBufferNode;
398397
* @returns {StorageBufferNode}
399398
*/
400399
export const storage = ( value, type = null, count = 0 ) => new StorageBufferNode( value, type, count );
401-
402-
/**
403-
* @tsl
404-
* @function
405-
* @deprecated since r171. Use `storage().setPBO( true )` instead.
406-
*
407-
* @param {StorageBufferAttribute|StorageInstancedBufferAttribute|BufferAttribute} value - The buffer data.
408-
* @param {?string} type - The buffer type (e.g. `'vec3'`).
409-
* @param {number} count - The buffer count.
410-
* @returns {StorageBufferNode}
411-
*/
412-
export const storageObject = ( value, type, count ) => { // @deprecated, r171
413-
414-
warn( 'TSL: "storageObject()" is deprecated. Use "storage().setPBO( true )" instead.' );
415-
416-
return storage( value, type, count ).setPBO( true );
417-
418-
};

src/nodes/accessors/TextureNode.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -605,21 +605,6 @@ class TextureNode extends UniformNode {
605605

606606
// @TODO: Move to TSL
607607

608-
/**
609-
* @function
610-
* @deprecated since r172. Use {@link TextureNode#sample} instead.
611-
*
612-
* @param {Node} uvNode - The uv node.
613-
* @return {TextureNode} A texture node representing the texture sample.
614-
*/
615-
uv( uvNode ) { // @deprecated, r172
616-
617-
warn( 'TextureNode: .uv() has been renamed. Use .sample() instead.' );
618-
619-
return this.sample( uvNode );
620-
621-
}
622-
623608
/**
624609
* Samples the texture with the given uv node.
625610
*

src/nodes/display/BlendModes.js

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Fn, If, vec4 } from '../tsl/TSLBase.js';
22
import { mix, min, step } from '../math/MathNode.js';
3-
import { warn } from '../../utils.js';
43

54
/**
65
* Represents a "Color Burn" blend mode.
@@ -170,66 +169,3 @@ export const unpremultiplyAlpha = /*@__PURE__*/ Fn( ( [ color ] ) => {
170169
return vec4( color.rgb.div( color.a ), color.a );
171170

172171
}, { color: 'vec4', return: 'vec4' } );
173-
174-
175-
// Deprecated
176-
177-
/**
178-
* @tsl
179-
* @function
180-
* @deprecated since r171. Use {@link blendBurn} instead.
181-
*
182-
* @param {...any} params
183-
* @returns {Function}
184-
*/
185-
export const burn = ( ...params ) => { // @deprecated, r171
186-
187-
warn( 'TSL: "burn" has been renamed. Use "blendBurn" instead.' );
188-
return blendBurn( params );
189-
190-
};
191-
192-
/**
193-
* @tsl
194-
* @function
195-
* @deprecated since r171. Use {@link blendDodge} instead.
196-
*
197-
* @param {...any} params
198-
* @returns {Function}
199-
*/
200-
export const dodge = ( ...params ) => { // @deprecated, r171
201-
202-
warn( 'TSL: "dodge" has been renamed. Use "blendDodge" instead.' );
203-
return blendDodge( params );
204-
205-
};
206-
207-
/**
208-
* @tsl
209-
* @function
210-
* @deprecated since r171. Use {@link blendScreen} instead.
211-
*
212-
* @param {...any} params
213-
* @returns {Function}
214-
*/
215-
export const screen = ( ...params ) => { // @deprecated, r171
216-
217-
warn( 'TSL: "screen" has been renamed. Use "blendScreen" instead.' );
218-
return blendScreen( params );
219-
220-
};
221-
222-
/**
223-
* @tsl
224-
* @function
225-
* @deprecated since r171. Use {@link blendOverlay} instead.
226-
*
227-
* @param {...any} params
228-
* @returns {Function}
229-
*/
230-
export const overlay = ( ...params ) => { // @deprecated, r171
231-
232-
warn( 'TSL: "overlay" has been renamed. Use "blendOverlay" instead.' );
233-
return blendOverlay( params );
234-
235-
};

src/nodes/fog/Fog.js

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { positionView } from '../accessors/Position.js';
22
import { smoothstep } from '../math/MathNode.js';
33
import { Fn, output, vec4 } from '../tsl/TSLBase.js';
4-
import { warn } from '../../utils.js';
54

65
/**
76
* Returns a node that represents the `z` coordinate in view space
@@ -77,38 +76,3 @@ export const fog = Fn( ( [ color, factor ] ) => {
7776
return vec4( factor.toFloat().mix( output.rgb, color.toVec3() ), output.a );
7877

7978
} );
80-
81-
// Deprecated
82-
83-
/**
84-
* @tsl
85-
* @function
86-
* @deprecated since r171. Use `fog( color, rangeFogFactor( near, far ) )` instead.
87-
*
88-
* @param {Node} color
89-
* @param {Node} near
90-
* @param {Node} far
91-
* @returns {Function}
92-
*/
93-
export function rangeFog( color, near, far ) { // @deprecated, r171
94-
95-
warn( 'TSL: "rangeFog( color, near, far )" is deprecated. Use "fog( color, rangeFogFactor( near, far ) )" instead.' );
96-
return fog( color, rangeFogFactor( near, far ) );
97-
98-
}
99-
100-
/**
101-
* @tsl
102-
* @function
103-
* @deprecated since r171. Use `fog( color, densityFogFactor( density ) )` instead.
104-
*
105-
* @param {Node} color
106-
* @param {Node} density
107-
* @returns {Function}
108-
*/
109-
export function densityFog( color, density ) { // @deprecated, r171
110-
111-
warn( 'TSL: "densityFog( color, density )" is deprecated. Use "fog( color, densityFogFactor( density ) )" instead.' );
112-
return fog( color, densityFogFactor( density ) );
113-
114-
}

src/nodes/lighting/ShadowNode.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { resetRendererAndSceneState, restoreRendererAndSceneState } from '../../
1919
import { getDataFromObject } from '../core/NodeUtils.js';
2020
import { getShadowMaterial, disposeShadowMaterial, BasicShadowFilter, PCFShadowFilter, PCFSoftShadowFilter, VSMShadowFilter } from './ShadowFilterNode.js';
2121
import ChainMap from '../../renderers/common/ChainMap.js';
22-
import { warn } from '../../utils.js';
2322
import { textureSize } from '../accessors/TextureSizeNode.js';
2423
import { uv } from '../accessors/UV.js';
2524

@@ -604,12 +603,6 @@ class ShadowNode extends ShadowBaseNode {
604603

605604
}
606605

607-
if ( builder.material.shadowNode ) { // @deprecated, r171
608-
609-
warn( 'NodeMaterial: ".shadowNode" is deprecated. Use ".castShadowNode" instead.' );
610-
611-
}
612-
613606
if ( builder.material.receivedShadowNode ) {
614607

615608
node = builder.material.receivedShadowNode( node );

src/nodes/math/MathNode.js

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import TempNode from '../core/TempNode.js';
2-
import { sub, mul, div, mod, equal } from './OperatorNode.js';
2+
import { sub, mul, div, mod } from './OperatorNode.js';
33
import { addMethodChaining, nodeObject, nodeProxyIntent, float, vec2, vec3, vec4, Fn } from '../tsl/TSLCore.js';
44
import { WebGLCoordinateSystem, WebGPUCoordinateSystem } from '../../constants.js';
55
import { warn } from '../../utils.js';
@@ -784,23 +784,6 @@ export const inverse = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.INVERSE
784784

785785
// 2 inputs
786786

787-
/**
788-
* Returns `true` if `x` equals `y`.
789-
*
790-
* @tsl
791-
* @function
792-
* @param {Node | number} x - The first parameter.
793-
* @param {Node | number} y - The second parameter.
794-
* @deprecated since r175. Use {@link equal} instead.
795-
* @returns {Node<bool>}
796-
*/
797-
export const equals = ( x, y ) => { // @deprecated, r172
798-
799-
warn( 'TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"' );
800-
return equal( x, y );
801-
802-
};
803-
804787
/**
805788
* Returns the least of the given values.
806789
*
@@ -1081,24 +1064,6 @@ export const smoothstepElement = ( x, low, high ) => smoothstep( low, high, x );
10811064
*/
10821065
export const stepElement = ( x, edge ) => step( edge, x );
10831066

1084-
/**
1085-
* Returns the arc-tangent of the quotient of its parameters.
1086-
*
1087-
* @tsl
1088-
* @function
1089-
* @deprecated since r172. Use {@link atan} instead.
1090-
*
1091-
* @param {Node | number} y - The y parameter.
1092-
* @param {Node | number} x - The x parameter.
1093-
* @returns {Node}
1094-
*/
1095-
export const atan2 = ( y, x ) => { // @deprecated, r172
1096-
1097-
warn( 'TSL: "atan2" is overloaded. Use "atan" instead.' );
1098-
return atan( y, x );
1099-
1100-
};
1101-
11021067
// GLSL alias function
11031068

11041069
export const faceforward = faceForward;
@@ -1108,7 +1073,6 @@ export const inversesqrt = inverseSqrt;
11081073

11091074
addMethodChaining( 'all', all );
11101075
addMethodChaining( 'any', any );
1111-
addMethodChaining( 'equals', equals );
11121076

11131077
addMethodChaining( 'radians', radians );
11141078
addMethodChaining( 'degrees', degrees );
@@ -1140,7 +1104,6 @@ addMethodChaining( 'round', round );
11401104
addMethodChaining( 'reciprocal', reciprocal );
11411105
addMethodChaining( 'trunc', trunc );
11421106
addMethodChaining( 'fwidth', fwidth );
1143-
addMethodChaining( 'atan2', atan2 );
11441107
addMethodChaining( 'min', min );
11451108
addMethodChaining( 'max', max );
11461109
addMethodChaining( 'step', stepElement );

src/renderers/WebGLRenderer.js

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,27 +3172,9 @@ class WebGLRenderer {
31723172
* @param {?(Box2|Box3)} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional.
31733173
* @param {?(Vector2|Vector3)} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional.
31743174
* @param {number} [srcLevel=0] - The source mipmap level to copy.
3175-
* @param {?number} [dstLevel=null] - The destination mipmap level.
3175+
* @param {?number} [dstLevel=0] - The destination mipmap level.
31763176
*/
3177-
this.copyTextureToTexture = function ( srcTexture, dstTexture, srcRegion = null, dstPosition = null, srcLevel = 0, dstLevel = null ) {
3178-
3179-
// support the previous signature with just a single dst mipmap level
3180-
if ( dstLevel === null ) {
3181-
3182-
if ( srcLevel !== 0 ) {
3183-
3184-
// @deprecated, r171
3185-
warnOnce( 'WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.' );
3186-
dstLevel = srcLevel;
3187-
srcLevel = 0;
3188-
3189-
} else {
3190-
3191-
dstLevel = 0;
3192-
3193-
}
3194-
3195-
}
3177+
this.copyTextureToTexture = function ( srcTexture, dstTexture, srcRegion = null, dstPosition = null, srcLevel = 0, dstLevel = 0 ) {
31963178

31973179
// gather the necessary dimensions to copy
31983180
let width, height, depth, minX, minY, minZ;

0 commit comments

Comments
 (0)