Skip to content

Commit

Permalink
Remove deprecated classes (#896)
Browse files Browse the repository at this point in the history
* Remove deprecated renderers

* Remove deprecated functions

* Replace Matrix2 with three.js version

* Remove deprecated functions

* Remove unused plugins
  • Loading branch information
gkjohnson authored Dec 24, 2024
1 parent ac0449f commit 0a9aee3
Show file tree
Hide file tree
Showing 16 changed files with 1 addition and 407 deletions.
12 changes: 0 additions & 12 deletions src/base/plugins/ImplicitTilingPlugin.js

This file was deleted.

11 changes: 0 additions & 11 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// three.js
export { DebugTilesRenderer } from './three/DebugTilesRenderer';
export { TilesRenderer } from './three/TilesRenderer';
export { TilesGroup } from './three/TilesGroup';
export { B3DMLoader, B3DMScene } from './three/loaders/B3DMLoader';
Expand All @@ -12,16 +11,6 @@ export { Ellipsoid } from './three/math/Ellipsoid';
export { EllipsoidRegion } from './three/math/EllipsoidRegion';
export * as GeoUtils from './three/math/GeoUtils';
export * from './three/math/GeoConstants';
export * from './three/renderers/GoogleTilesRenderer';
export * from './three/renderers/CesiumIonTilesRenderer';

// three.js plugins
export { CesiumIonAuthPlugin } from './three/plugins/CesiumIonAuthPlugin';
export { GoogleCloudAuthPlugin } from './three/plugins/GoogleCloudAuthPlugin';
export * from './three/plugins/DebugTilesPlugin';

// common plugins
export { ImplicitTilingPlugin } from './base/plugins/ImplicitTilingPlugin';

// common
export { TilesRendererBase } from './base/TilesRendererBase';
Expand Down
3 changes: 0 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// three.js
export { DebugTilesRenderer } from './three/DebugTilesRenderer.js';
export { TilesRenderer } from './three/TilesRenderer.js';
export { B3DMLoader } from './three/loaders/B3DMLoader.js';
export { PNTSLoader } from './three/loaders/PNTSLoader.js';
Expand All @@ -14,8 +13,6 @@ export * from './three/math/Ellipsoid.js';
export * from './three/math/EllipsoidRegion.js';
export * as GeoUtils from './three/math/GeoUtils.js';
export * from './three/math/GeoConstants.js';
export * from './three/renderers/GoogleTilesRenderer.js';
export * from './three/renderers/CesiumIonTilesRenderer.js';

// three.js controls
export { GlobeControls } from './three/controls/GlobeControls.js';
Expand Down
55 changes: 0 additions & 55 deletions src/plugins/three/gltf/metadata/math/Matrix2.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import {
Vector2,
Vector3,
Vector4,
Matrix2,
Matrix3,
Matrix4,
} from 'three';
import { Matrix2 } from '../math/Matrix2.js';

// returns the field in the object with a resolved default
export function getField( object, key, def ) {
Expand Down
28 changes: 0 additions & 28 deletions src/three/DebugTilesRenderer.d.ts

This file was deleted.

58 changes: 0 additions & 58 deletions src/three/DebugTilesRenderer.js

This file was deleted.

52 changes: 0 additions & 52 deletions src/three/TilesRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,6 @@ export class TilesRenderer extends TilesRendererBase {
}

/* Public API */
getBounds( ...args ) {

console.warn( 'TilesRenderer: getBounds has been renamed to getBoundingBox.' );
return this.getBoundingBox( ...args );

}

getOrientedBounds( ...args ) {

console.warn( 'TilesRenderer: getOrientedBounds has been renamed to getOrientedBoundingBox.' );
return this.getOrientedBoundingBox( ...args );

}

getBoundingBox( target ) {

if ( ! this.root ) {
Expand Down Expand Up @@ -996,41 +982,3 @@ export class TilesRenderer extends TilesRendererBase {
}

}


[
[ 'onLoadTileSet', 'load-tile-set' ],
[ 'onLoadModel', 'load-model' ],
[ 'onDisposeModel', 'dispose-model' ],
[ 'onTileVisibilityChange', 'tile-visibility-change' ],
].forEach( ( [ methodName, eventName ] ) => {

const cachedName = Symbol( methodName );
Object.defineProperty(
TilesRenderer.prototype,
methodName,
{
get() {

return this[ cachedName ] || null;

},

set( cb ) {

console.warn( `TilesRenderer: "${ methodName }" has been deprecated in favor of the "${ eventName }" event.` );

if ( this[ cachedName ] ) {

this.removeEventListener( eventName, this[ cachedName ] );

}

this[ cachedName ] = cb;
this.addEventListener( eventName, cb );

}
}
);

} );
11 changes: 0 additions & 11 deletions src/three/math/Ellipsoid.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const _spherical = new Spherical();
const _norm = new Vector3();
const _vec = new Vector3();
const _vec2 = new Vector3();
const _vec3 = new Vector3();
const _matrix = new Matrix4();
const _matrix2 = new Matrix4();
const _sphere = new Sphere();
Expand Down Expand Up @@ -73,16 +72,6 @@ export class Ellipsoid {

}

getNorthernTangent( lat, lon, target, westTarget = _vec3 ) {

console.log( 'Ellipsoid: getNorthernTangent has been deprecated. Use getEastNorthUpAxes instead.' );

this.getEastNorthUpAxes( lat, lon, westTarget, target, _vecZ );
westTarget.multiplyScalar( - 1 );
return target;

}

// azimuth: measured off of true north, increasing towards "east"
// elevation: measured off of the horizon, increasing towards sky
// roll: rotation around northern axis
Expand Down
12 changes: 0 additions & 12 deletions src/three/plugins/CesiumIonAuthPlugin.js

This file was deleted.

26 changes: 0 additions & 26 deletions src/three/plugins/DebugTilesPlugin.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/three/plugins/GoogleCloudAuthPlugin.js

This file was deleted.

14 changes: 0 additions & 14 deletions src/three/renderers/CesiumIonTilesRenderer.d.ts

This file was deleted.

21 changes: 0 additions & 21 deletions src/three/renderers/CesiumIonTilesRenderer.js

This file was deleted.

Loading

0 comments on commit 0a9aee3

Please sign in to comment.