Skip to content

Commit 1d47886

Browse files
authored
Legacy: Remove more deprercated methods to improve tree-shaking (#21649)
* Legacy: remove some blocking methods * Legacy: remove MeshPhysicalMaterial.transparency method * Legacy: remove unused imports
1 parent 6d9fadb commit 1d47886

File tree

1 file changed

+0
-96
lines changed

1 file changed

+0
-96
lines changed

src/Three.Legacy.js

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ import {
2222
BufferAttribute
2323
} from './core/BufferAttribute.js';
2424
import { BufferGeometry } from './core/BufferGeometry.js';
25-
import { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
2625
import { InterleavedBuffer } from './core/InterleavedBuffer.js';
2726
import { Object3D } from './core/Object3D.js';
2827
import { Uniform } from './core/Uniform.js';
29-
import { Raycaster } from './core/Raycaster.js';
3028
import { Curve } from './extras/core/Curve.js';
3129
import { Path } from './extras/core/Path.js';
3230
import { AxesHelper } from './helpers/AxesHelper.js';
@@ -47,7 +45,6 @@ import { DataTextureLoader } from './loaders/DataTextureLoader.js';
4745
import { TextureLoader } from './loaders/TextureLoader.js';
4846
import { Material } from './materials/Material.js';
4947
import { LineBasicMaterial } from './materials/LineBasicMaterial.js';
50-
import { MeshPhysicalMaterial } from './materials/MeshPhysicalMaterial.js';
5148
import { PointsMaterial } from './materials/PointsMaterial.js';
5249
import { ShaderMaterial } from './materials/ShaderMaterial.js';
5350
import { Box2 } from './math/Box2.js';
@@ -941,23 +938,6 @@ SkinnedMesh.prototype.initBones = function () {
941938

942939
};
943940

944-
Object.defineProperty( Curve.prototype, '__arcLengthDivisions', {
945-
946-
get: function () {
947-
948-
console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
949-
return this.arcLengthDivisions;
950-
951-
},
952-
set: function ( value ) {
953-
954-
console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
955-
this.arcLengthDivisions = value;
956-
957-
}
958-
959-
} );
960-
961941
//
962942

963943
PerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {
@@ -1221,63 +1201,6 @@ Object.defineProperties( BufferGeometry.prototype, {
12211201

12221202
} );
12231203

1224-
Object.defineProperties( InstancedBufferGeometry.prototype, {
1225-
1226-
maxInstancedCount: {
1227-
get: function () {
1228-
1229-
console.warn( 'THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.' );
1230-
return this.instanceCount;
1231-
1232-
},
1233-
set: function ( value ) {
1234-
1235-
console.warn( 'THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.' );
1236-
this.instanceCount = value;
1237-
1238-
}
1239-
}
1240-
1241-
} );
1242-
1243-
Object.defineProperties( Raycaster.prototype, {
1244-
1245-
linePrecision: {
1246-
get: function () {
1247-
1248-
console.warn( 'THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.' );
1249-
return this.params.Line.threshold;
1250-
1251-
},
1252-
set: function ( value ) {
1253-
1254-
console.warn( 'THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.' );
1255-
this.params.Line.threshold = value;
1256-
1257-
}
1258-
}
1259-
1260-
} );
1261-
1262-
Object.defineProperties( InterleavedBuffer.prototype, {
1263-
1264-
dynamic: {
1265-
get: function () {
1266-
1267-
console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
1268-
return this.usage === DynamicDrawUsage;
1269-
1270-
},
1271-
set: function ( value ) {
1272-
1273-
console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
1274-
this.setUsage( value );
1275-
1276-
}
1277-
}
1278-
1279-
} );
1280-
12811204
InterleavedBuffer.prototype.setDynamic = function ( value ) {
12821205

12831206
console.warn( 'THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.' );
@@ -1399,25 +1322,6 @@ Object.defineProperties( Material.prototype, {
13991322

14001323
} );
14011324

1402-
Object.defineProperties( MeshPhysicalMaterial.prototype, {
1403-
1404-
transparency: {
1405-
get: function () {
1406-
1407-
console.warn( 'THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.' );
1408-
return this.transmission;
1409-
1410-
},
1411-
set: function ( value ) {
1412-
1413-
console.warn( 'THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.' );
1414-
this.transmission = value;
1415-
1416-
}
1417-
}
1418-
1419-
} );
1420-
14211325
Object.defineProperties( ShaderMaterial.prototype, {
14221326

14231327
derivatives: {

0 commit comments

Comments
 (0)