itowns 2.44.3-next.0 → 2.44.3-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,8 +43,6 @@ class GlobeLayer extends TiledGeometryLayer {
43
43
  * level for this tiled layer.
44
44
  * @param {number} [config.sseSubdivisionThreshold=1] - Threshold level for
45
45
  * the SSE.
46
- * @param {number} [config.maxDeltaElevationLevel=4] - Maximum delta between
47
- * two elevations tile.
48
46
  *
49
47
  * @throws {Error} `object3d` must be a valid `THREE.Object3d`.
50
48
  */
@@ -66,7 +64,6 @@ class GlobeLayer extends TiledGeometryLayer {
66
64
  this.options.defaultPickingRadius = 5;
67
65
  this.minSubdivisionLevel = this.minSubdivisionLevel == undefined ? 2 : this.minSubdivisionLevel;
68
66
  this.maxSubdivisionLevel = this.maxSubdivisionLevel == undefined ? 19 : this.maxSubdivisionLevel;
69
- this.maxDeltaElevationLevel = this.maxDeltaElevationLevel || 4.0;
70
67
  this.extent = this.schemeTile[0].clone();
71
68
  for (let i = 1; i < this.schemeTile.length; i++) {
72
69
  this.extent.union(this.schemeTile[i]);
@@ -30,8 +30,6 @@ class PlanarLayer extends TiledGeometryLayer {
30
30
  * name.
31
31
  * @param {number} [config.maxSubdivisionLevel=5] - Maximum subdivision
32
32
  * level for this tiled layer.
33
- * @param {number} [config.maxDeltaElevationLevel=4] - Maximum delta between
34
- * two elevations tile.
35
33
  *
36
34
  * @throws {Error} `object3d` must be a valid `THREE.Object3d`.
37
35
  */
@@ -50,7 +48,6 @@ class PlanarLayer extends TiledGeometryLayer {
50
48
  this.extent = extent;
51
49
  this.minSubdivisionLevel = this.minSubdivisionLevel == undefined ? 0 : this.minSubdivisionLevel;
52
50
  this.maxSubdivisionLevel = this.maxSubdivisionLevel == undefined ? 5 : this.maxSubdivisionLevel;
53
- this.maxDeltaElevationLevel = this.maxDeltaElevationLevel || 4.0;
54
51
  }
55
52
  }
56
53
  export default PlanarLayer;
@@ -77,6 +77,9 @@ class TiledGeometryLayer extends GeometryLayer {
77
77
  if (!this.builder) {
78
78
  throw new Error(`Cannot init tiled layer without builder for layer ${this.id}`);
79
79
  }
80
+ if (config.maxDeltaElevationLevel) {
81
+ console.warn('Config using maxDeltaElevationLevel is deprecated. The parameter maxDeltaElevationLevel is not longer used');
82
+ }
80
83
  this.level0Nodes = [];
81
84
  const promises = [];
82
85
  for (const root of this.schemeTile) {
@@ -378,22 +381,6 @@ class TiledGeometryLayer extends GeometryLayer {
378
381
  if (this.maxSubdivisionLevel <= node.level) {
379
382
  return false;
380
383
  }
381
-
382
- // Prevent to subdivise the node if the current elevation level
383
- // we must avoid a tile, with level 20, inherits a level 3 elevation texture.
384
- // The induced geometric error is much too large and distorts the SSE
385
- const nodeLayer = node.material.getElevationLayer();
386
- if (nodeLayer) {
387
- const currentTexture = nodeLayer.textures[0];
388
- if (currentTexture && currentTexture.extent) {
389
- const offsetScale = nodeLayer.offsetScales[0];
390
- const ratio = offsetScale.z;
391
- // ratio is node size / texture size
392
- if (ratio < 1 / 2 ** this.maxDeltaElevationLevel) {
393
- return false;
394
- }
395
- }
396
- }
397
384
  subdivisionVector.setFromMatrixScale(node.matrixWorld);
398
385
  boundingSphereCenter.copy(node.boundingSphere.center).applyMatrix4(node.matrixWorld);
399
386
  const distance = Math.max(0.0, context.camera.camera3D.position.distanceTo(boundingSphereCenter) - node.boundingSphere.radius * subdivisionVector.x);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itowns",
3
- "version": "2.44.3-next.0",
3
+ "version": "2.44.3-next.1",
4
4
  "description": "A JS/WebGL framework for 3D geospatial data visualization",
5
5
  "type": "module",
6
6
  "main": "lib/Main.js",