File tree Expand file tree Collapse file tree 3 files changed +4
-24
lines changed Expand file tree Collapse file tree 3 files changed +4
-24
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ class GlobeLayer extends TiledGeometryLayer {
4343 * level for this tiled layer.
4444 * @param {number } [config.sseSubdivisionThreshold=1] - Threshold level for
4545 * the SSE.
46- * @param {number } [config.maxDeltaElevationLevel=4] - Maximum delta between
47- * two elevations tile.
4846 *
4947 * @throws {Error } `object3d` must be a valid `THREE.Object3d`.
5048 */
@@ -67,8 +65,6 @@ class GlobeLayer extends TiledGeometryLayer {
6765 this . options . defaultPickingRadius = 5 ;
6866 this . minSubdivisionLevel = this . minSubdivisionLevel == undefined ? 2 : this . minSubdivisionLevel ;
6967 this . maxSubdivisionLevel = this . maxSubdivisionLevel == undefined ? 19 : this . maxSubdivisionLevel ;
70- this . maxDeltaElevationLevel = this . maxDeltaElevationLevel || 4.0 ;
71-
7268 this . extent = this . schemeTile [ 0 ] . clone ( ) ;
7369
7470 for ( let i = 1 ; i < this . schemeTile . length ; i ++ ) {
Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ class PlanarLayer extends TiledGeometryLayer {
3131 * name.
3232 * @param {number } [config.maxSubdivisionLevel=5] - Maximum subdivision
3333 * level for this tiled layer.
34- * @param {number } [config.maxDeltaElevationLevel=4] - Maximum delta between
35- * two elevations tile.
3634 *
3735 * @throws {Error } `object3d` must be a valid `THREE.Object3d`.
3836 */
@@ -49,7 +47,6 @@ class PlanarLayer extends TiledGeometryLayer {
4947 this . extent = extent ;
5048 this . minSubdivisionLevel = this . minSubdivisionLevel == undefined ? 0 : this . minSubdivisionLevel ;
5149 this . maxSubdivisionLevel = this . maxSubdivisionLevel == undefined ? 5 : this . maxSubdivisionLevel ;
52- this . maxDeltaElevationLevel = this . maxDeltaElevationLevel || 4.0 ;
5350 }
5451}
5552
Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ class TiledGeometryLayer extends GeometryLayer {
8585 throw new Error ( `Cannot init tiled layer without builder for layer ${ this . id } ` ) ;
8686 }
8787
88+ if ( config . maxDeltaElevationLevel ) {
89+ console . warn ( 'Config using maxDeltaElevationLevel is deprecated. The parameter maxDeltaElevationLevel is not longer used' ) ;
90+ }
91+
8892 this . level0Nodes = [ ] ;
8993 const promises = [ ] ;
9094
@@ -414,23 +418,6 @@ class TiledGeometryLayer extends GeometryLayer {
414418 if ( this . maxSubdivisionLevel <= node . level ) {
415419 return false ;
416420 }
417-
418- // Prevent to subdivise the node if the current elevation level
419- // we must avoid a tile, with level 20, inherits a level 3 elevation texture.
420- // The induced geometric error is much too large and distorts the SSE
421- const nodeLayer = node . material . getElevationLayer ( ) ;
422- if ( nodeLayer ) {
423- const currentTexture = nodeLayer . textures [ 0 ] ;
424- if ( currentTexture && currentTexture . extent ) {
425- const offsetScale = nodeLayer . offsetScales [ 0 ] ;
426- const ratio = offsetScale . z ;
427- // ratio is node size / texture size
428- if ( ratio < 1 / 2 ** this . maxDeltaElevationLevel ) {
429- return false ;
430- }
431- }
432- }
433-
434421 subdivisionVector . setFromMatrixScale ( node . matrixWorld ) ;
435422 boundingSphereCenter . copy ( node . boundingSphere . center ) . applyMatrix4 ( node . matrixWorld ) ;
436423 const distance = Math . max (
You can’t perform that action at this time.
0 commit comments