From 5883c6c20ba0904eeeb05b228a8235367f9cf933 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Tue, 2 Jan 2024 17:06:18 +0100 Subject: [PATCH] Remove deprecated code. (#27467) * Remove deprecated code. * Clean up. * Examples: Bump version of `web-ifc-three`. --- examples/jsm/utils/BufferGeometryUtils.js | 16 ------------ examples/webgl_loader_ifc.html | 2 +- src/math/Triangle.js | 30 ----------------------- src/objects/SkinnedMesh.js | 8 ------ test/unit/src/math/Triangle.tests.js | 8 +++--- 5 files changed, 5 insertions(+), 59 deletions(-) diff --git a/examples/jsm/utils/BufferGeometryUtils.js b/examples/jsm/utils/BufferGeometryUtils.js index 087878da3e5f59..4182e1f96957b5 100644 --- a/examples/jsm/utils/BufferGeometryUtils.js +++ b/examples/jsm/utils/BufferGeometryUtils.js @@ -1345,26 +1345,10 @@ function toCreasedNormals( geometry, creaseAngle = Math.PI / 3 /* 60 degrees */ } -function mergeBufferGeometries( geometries, useGroups = false ) { - - console.warn( 'THREE.BufferGeometryUtils: mergeBufferGeometries() has been renamed to mergeGeometries().' ); // @deprecated, r151 - return mergeGeometries( geometries, useGroups ); - -} - -function mergeBufferAttributes( attributes ) { - - console.warn( 'THREE.BufferGeometryUtils: mergeBufferAttributes() has been renamed to mergeAttributes().' ); // @deprecated, r151 - return mergeAttributes( attributes ); - -} - export { computeMikkTSpaceTangents, mergeGeometries, - mergeBufferGeometries, mergeAttributes, - mergeBufferAttributes, interleaveAttributes, estimateBytesUsed, mergeVertices, diff --git a/examples/webgl_loader_ifc.html b/examples/webgl_loader_ifc.html index 871a5d77abe7d2..61773d64cf0382 100644 --- a/examples/webgl_loader_ifc.html +++ b/examples/webgl_loader_ifc.html @@ -25,7 +25,7 @@ "three/examples/jsm/utils/BufferGeometryUtils": "./jsm/utils/BufferGeometryUtils.js", "three-mesh-bvh": "https://unpkg.com/three-mesh-bvh@0.5.23/build/index.module.js", "web-ifc": "https://unpkg.com/web-ifc@0.0.36/web-ifc-api.js", - "web-ifc-three": "https://unpkg.com/web-ifc-three@0.0.125/IFCLoader.js" + "web-ifc-three": "https://unpkg.com/web-ifc-three@0.0.126/IFCLoader.js" } } diff --git a/src/math/Triangle.js b/src/math/Triangle.js index 27c9dd98a9d4b2..fdb1f3609c1ee3 100644 --- a/src/math/Triangle.js +++ b/src/math/Triangle.js @@ -12,8 +12,6 @@ const _vap = /*@__PURE__*/ new Vector3(); const _vbp = /*@__PURE__*/ new Vector3(); const _vcp = /*@__PURE__*/ new Vector3(); -let warnedGetUV = false; - class Triangle { constructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) { @@ -87,20 +85,6 @@ class Triangle { } - static getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) { // @deprecated, r151 - - if ( warnedGetUV === false ) { - - console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' ); - - warnedGetUV = true; - - } - - return this.getInterpolation( point, p1, p2, p3, uv1, uv2, uv3, target ); - - } - static getInterpolation( point, p1, p2, p3, v1, v2, v3, target ) { if ( this.getBarycoord( point, p1, p2, p3, _v3 ) === null ) { @@ -211,20 +195,6 @@ class Triangle { } - getUV( point, uv1, uv2, uv3, target ) { // @deprecated, r151 - - if ( warnedGetUV === false ) { - - console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' ); - - warnedGetUV = true; - - } - - return Triangle.getInterpolation( point, this.a, this.b, this.c, uv1, uv2, uv3, target ); - - } - getInterpolation( point, v1, v2, v3, target ) { return Triangle.getInterpolation( point, this.a, this.b, this.c, v1, v2, v3, target ); diff --git a/src/objects/SkinnedMesh.js b/src/objects/SkinnedMesh.js index bde678af9aca6c..1fc327a567a850 100644 --- a/src/objects/SkinnedMesh.js +++ b/src/objects/SkinnedMesh.js @@ -252,14 +252,6 @@ class SkinnedMesh extends Mesh { } - boneTransform( index, vector ) { // @deprecated, r151 - - console.warn( 'THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151.' ); - return this.applyBoneTransform( index, vector ); - - } - - } export { SkinnedMesh }; diff --git a/test/unit/src/math/Triangle.tests.js b/test/unit/src/math/Triangle.tests.js index 180f3fe6ae5cc2..f518d1d60d5157 100644 --- a/test/unit/src/math/Triangle.tests.js +++ b/test/unit/src/math/Triangle.tests.js @@ -49,10 +49,10 @@ export default QUnit.module( 'Maths', () => { } ); - QUnit.todo( 'getUV', ( assert ) => { + QUnit.todo( 'getInterpolation', ( assert ) => { // static version of class member below - // getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) + // getInterpolation( point, p1, p2, p3, uv1, uv2, uv3, target ) assert.ok( false, 'everything\'s gonna be alright' ); } ); @@ -244,10 +244,10 @@ export default QUnit.module( 'Maths', () => { } ); - QUnit.todo( 'getUV', ( assert ) => { + QUnit.todo( 'getInterpolation', ( assert ) => { // class member version - // getUV( point, uv1, uv2, uv3, target ) + // getInterpolation( point, uv1, uv2, uv3, target ) assert.ok( false, 'everything\'s gonna be alright' ); } );