itowns 2.43.2-next.0 → 2.43.2-next.10

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.
Files changed (67) hide show
  1. package/README.md +2 -0
  2. package/dist/debug.js +1 -1
  3. package/dist/debug.js.map +1 -1
  4. package/dist/itowns.js +1 -1
  5. package/dist/itowns.js.map +1 -1
  6. package/dist/itowns_widgets.js +1 -1
  7. package/dist/itowns_widgets.js.map +1 -1
  8. package/examples/3dtiles_25d.html +1 -1
  9. package/examples/3dtiles_basic.html +2 -2
  10. package/examples/3dtiles_batch_table.html +1 -3
  11. package/examples/3dtiles_pointcloud.html +9 -15
  12. package/examples/config.json +2 -1
  13. package/examples/copc_simple_loader.html +128 -0
  14. package/examples/entwine_3d_loader.html +1 -1
  15. package/examples/entwine_simple_loader.html +1 -1
  16. package/examples/js/plugins/COGParser.js +84 -50
  17. package/examples/js/plugins/COGSource.js +7 -4
  18. package/examples/layers/JSONLayers/OPENSM.json +1 -1
  19. package/examples/potree_25d_map.html +1 -1
  20. package/examples/potree_3d_map.html +1 -1
  21. package/examples/source_file_cog.html +22 -5
  22. package/lib/Controls/FirstPersonControls.js +0 -1
  23. package/lib/Controls/FlyControls.js +0 -1
  24. package/lib/Converter/Feature2Mesh.js +2 -4
  25. package/lib/Converter/textureConverter.js +1 -1
  26. package/lib/Core/3DTiles/C3DTBatchTable.js +1 -1
  27. package/lib/Core/3DTiles/C3DTFeature.js +0 -1
  28. package/lib/Core/CopcNode.js +174 -0
  29. package/lib/Core/Feature.js +1 -2
  30. package/lib/Core/Geographic/CoordStars.js +0 -1
  31. package/lib/Core/Label.js +0 -1
  32. package/lib/Core/MainLoop.js +0 -1
  33. package/lib/Core/Prefab/Globe/Atmosphere.js +0 -4
  34. package/lib/Core/Prefab/Globe/GlobeLayer.js +3 -3
  35. package/lib/Core/Style.js +2 -4
  36. package/lib/Core/View.js +2 -4
  37. package/lib/Layer/C3DTilesLayer.js +3 -1
  38. package/lib/Layer/CopcLayer.js +59 -0
  39. package/lib/Layer/ElevationLayer.js +2 -3
  40. package/lib/Layer/GeoidLayer.js +1 -2
  41. package/lib/Layer/LabelLayer.js +8 -17
  42. package/lib/Layer/Layer.js +4 -2
  43. package/lib/Layer/PointCloudLayer.js +4 -7
  44. package/lib/Layer/ReferencingLayerProperties.js +3 -3
  45. package/lib/Layer/TiledGeometryLayer.js +2 -3
  46. package/lib/Main.js +2 -0
  47. package/lib/Parser/GeoJsonParser.js +2 -3
  48. package/lib/Parser/LASLoader.js +45 -1
  49. package/lib/Parser/LASParser.js +57 -25
  50. package/lib/Parser/deprecated/LegacyGLTFLoader.js +1 -2
  51. package/lib/Process/FeatureProcessing.js +1 -2
  52. package/lib/Process/LayeredMaterialNodeProcessing.js +3 -9
  53. package/lib/Process/ObjectRemovalHelper.js +1 -2
  54. package/lib/Provider/3dTilesProvider.js +1 -0
  55. package/lib/Renderer/ColorLayersOrdering.js +1 -2
  56. package/lib/Renderer/Label2DRenderer.js +1 -4
  57. package/lib/Renderer/PointsMaterial.js +14 -9
  58. package/lib/Renderer/RenderMode.js +0 -1
  59. package/lib/Source/CopcSource.js +118 -0
  60. package/lib/Source/Source.js +3 -1
  61. package/lib/ThreeExtended/loaders/DDSLoader.js +11 -1
  62. package/lib/ThreeExtended/loaders/DRACOLoader.js +0 -1
  63. package/lib/ThreeExtended/loaders/GLTFLoader.js +1 -0
  64. package/lib/Utils/DEMUtils.js +2 -2
  65. package/lib/Utils/OrientationUtils.js +0 -1
  66. package/lib/Utils/gui/Searchbar.js +1 -2
  67. package/package.json +8 -7
@@ -255,6 +255,7 @@ function _readZCorrect(layer, texture, uv, tileDimensions, tileOwnerDimensions)
255
255
 
256
256
  // Determine if we're going to read the vertices from the top-left or lower-right triangle
257
257
  // (low-right = on the line 21-22 or under the diagonal lu = 1 - lv)
258
+
258
259
  const tri = new THREE.Triangle(new THREE.Vector3(u1, v2), new THREE.Vector3(u2, v1), lv == 1 || lu / (1 - lv) >= 1 ? new THREE.Vector3(u2, v2) : new THREE.Vector3(u1, v1));
259
260
 
260
261
  // bary holds the respective weight of each vertices of the triangles
@@ -287,11 +288,10 @@ function offsetInExtent(point, extent) {
287
288
  return target.set(originX, originY);
288
289
  }
289
290
  function _readZ(layer, method, coord, nodes, cache) {
290
- var _cache$tile;
291
291
  const pt = coord.as(layer.extent.crs, temp.coord1);
292
292
  let tileWithValidElevationTexture = null;
293
293
  // first check in cache
294
- if (cache !== null && cache !== void 0 && (_cache$tile = cache.tile) !== null && _cache$tile !== void 0 && _cache$tile.material) {
294
+ if (cache?.tile?.material) {
295
295
  tileWithValidElevationTexture = tileAt(pt, cache.tile);
296
296
  }
297
297
  for (let i = 0; !tileWithValidElevationTexture && i < nodes.length; i++) {
@@ -71,7 +71,6 @@ export default {
71
71
  // return this.setFromEuler(euler.set(pitch, roll, heading , 'ZXY')).conjugate();
72
72
  return target.setFromEuler(euler.set(-pitch, -roll, -heading, 'YXZ')); // optimized version of above
73
73
  },
74
-
75
74
  /**
76
75
  * From
77
76
  * [DocMicMac](https://github.com/micmacIGN/Documentation/raw/master/DocMicMac.pdf),
@@ -9,7 +9,6 @@ const DEFAULT_OPTIONS = {
9
9
  placeholder: 'Search location'
10
10
  };
11
11
  function addActive(htmlElements, index) {
12
- var _htmlElements$index;
13
12
  if (!htmlElements) {
14
13
  return index;
15
14
  }
@@ -19,7 +18,7 @@ function addActive(htmlElements, index) {
19
18
  } else if (index < 0) {
20
19
  index = htmlElements.length - 1;
21
20
  }
22
- (_htmlElements$index = htmlElements[index]) === null || _htmlElements$index === void 0 ? void 0 : _htmlElements$index.classList.add('active');
21
+ htmlElements[index]?.classList.add('active');
23
22
  return index;
24
23
  }
25
24
  function removeAllActives(htmlElements) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itowns",
3
- "version": "2.43.2-next.0",
3
+ "version": "2.43.2-next.10",
4
4
  "description": "A JS/WebGL framework for 3D geospatial data visualization",
5
5
  "type": "module",
6
6
  "main": "lib/Main.js",
@@ -72,10 +72,11 @@
72
72
  "three": "^0.159.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@babel/cli": "^7.22.5",
76
- "@babel/plugin-transform-runtime": "^7.22.5",
77
- "@babel/preset-env": "^7.22.5",
78
- "@babel/register": "^7.22.5",
75
+ "@babel/cli": "^7.24.6",
76
+ "@babel/core": "^7.24.6",
77
+ "@babel/plugin-transform-runtime": "^7.24.6",
78
+ "@babel/preset-env": "^7.24.6",
79
+ "@babel/register": "^7.24.6",
79
80
  "@types/three": "^0.159.0",
80
81
  "@xmldom/xmldom": "^0.8.10",
81
82
  "babel-inline-import-loader": "^1.0.1",
@@ -96,7 +97,7 @@
96
97
  "cross-env": "^7.0.3",
97
98
  "eslint": "^8.55.0",
98
99
  "eslint-config-airbnb-base": "^15.0.0",
99
- "eslint-import-resolver-webpack": "^0.13.8",
100
+ "eslint-import-resolver-babel-module": "^5.3.2",
100
101
  "eslint-plugin-import": "^2.29.0",
101
102
  "eslint-webpack-plugin": "^4.0.1",
102
103
  "github-url-from-git": "^1.5.0",
@@ -108,7 +109,7 @@
108
109
  "mocha": "^10.2.0",
109
110
  "node-fetch": "^2.7.0",
110
111
  "proj4": "^2.9.2",
111
- "puppeteer": "^21.6.0",
112
+ "puppeteer": "^22.11.2",
112
113
  "q": "^1.5.1",
113
114
  "replace-in-file": "^7.0.2",
114
115
  "sinon": "^17.0.1",