itowns 2.41.1-next.9 → 2.42.0

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 (177) hide show
  1. package/README.md +4 -0
  2. package/changelog.md +109 -0
  3. package/dist/debug.js +1 -1
  4. package/dist/debug.js.LICENSE.txt +1 -1
  5. package/dist/debug.js.map +1 -1
  6. package/dist/itowns.js +1 -1
  7. package/dist/itowns.js.LICENSE.txt +0 -2
  8. package/dist/itowns.js.map +1 -1
  9. package/dist/itowns_widgets.js +1 -1
  10. package/dist/itowns_widgets.js.map +1 -1
  11. package/examples/config.json +3 -1
  12. package/examples/css/example.css +1 -1
  13. package/examples/effects_stereo.html +56 -38
  14. package/examples/js/plugins/COGParser.js +223 -0
  15. package/examples/js/plugins/COGSource.js +128 -0
  16. package/examples/js/plugins/FeatureToolTip.js +16 -20
  17. package/examples/libs/laz-perf/laz-perf.wasm +0 -0
  18. package/examples/misc_collada.html +23 -15
  19. package/examples/source_file_cog.html +80 -0
  20. package/examples/source_file_gpx_3d.html +10 -10
  21. package/examples/view_2d_map.html +1 -1
  22. package/examples/view_3d_map_webxr.html +78 -0
  23. package/examples/view_multi_25d.html +56 -50
  24. package/lib/Controls/FirstPersonControls.js +193 -246
  25. package/lib/Controls/FlyControls.js +54 -100
  26. package/lib/Controls/GlobeControls.js +889 -1028
  27. package/lib/Controls/PlanarControls.js +746 -823
  28. package/lib/Controls/StateControl.js +231 -265
  29. package/lib/Controls/StreetControls.js +249 -301
  30. package/lib/Converter/Feature2Mesh.js +314 -401
  31. package/lib/Converter/Feature2Texture.js +66 -131
  32. package/lib/Converter/convertToTile.js +22 -23
  33. package/lib/Converter/textureConverter.js +12 -13
  34. package/lib/Core/3DTiles/C3DTBatchTable.js +50 -55
  35. package/lib/Core/3DTiles/C3DTBatchTableHierarchyExtension.js +33 -53
  36. package/lib/Core/3DTiles/C3DTBoundingVolume.js +136 -102
  37. package/lib/Core/3DTiles/C3DTExtensions.js +61 -77
  38. package/lib/Core/3DTiles/C3DTFeature.js +43 -60
  39. package/lib/Core/3DTiles/{C3DTilesTypes.js → C3DTilesEnums.js} +9 -4
  40. package/lib/Core/3DTiles/C3DTileset.js +48 -66
  41. package/lib/Core/3DTiles/utils/BinaryPropertyAccessor.js +13 -13
  42. package/lib/Core/AnimationPlayer.js +90 -122
  43. package/lib/Core/Deprecated/Undeprecator.js +13 -13
  44. package/lib/Core/EntwinePointTileNode.js +72 -96
  45. package/lib/Core/Feature.js +259 -367
  46. package/lib/Core/Geographic/CoordStars.js +29 -28
  47. package/lib/Core/Geographic/Coordinates.js +225 -265
  48. package/lib/Core/Geographic/Crs.js +24 -26
  49. package/lib/Core/Geographic/Extent.js +592 -651
  50. package/lib/Core/Geographic/GeoidGrid.js +22 -30
  51. package/lib/Core/Label.js +110 -139
  52. package/lib/Core/MainLoop.js +134 -219
  53. package/lib/Core/Math/Ellipsoid.js +132 -156
  54. package/lib/Core/Picking.js +78 -113
  55. package/lib/Core/PointCloudNode.js +40 -65
  56. package/lib/Core/PotreeNode.js +94 -121
  57. package/lib/Core/Prefab/Globe/Atmosphere.js +203 -227
  58. package/lib/Core/Prefab/Globe/BuilderEllipsoidTile.js +81 -101
  59. package/lib/Core/Prefab/Globe/GlobeLayer.js +86 -117
  60. package/lib/Core/Prefab/Globe/SkyShader.js +28 -39
  61. package/lib/Core/Prefab/GlobeView.js +57 -82
  62. package/lib/Core/Prefab/Planar/PlanarLayer.js +16 -30
  63. package/lib/Core/Prefab/Planar/PlanarTileBuilder.js +49 -69
  64. package/lib/Core/Prefab/PlanarView.js +26 -45
  65. package/lib/Core/Prefab/TileBuilder.js +30 -32
  66. package/lib/Core/Prefab/computeBufferTileGeometry.js +61 -67
  67. package/lib/Core/Scheduler/Cache.js +171 -191
  68. package/lib/Core/Scheduler/CancelledCommandException.js +8 -16
  69. package/lib/Core/Scheduler/Scheduler.js +64 -104
  70. package/lib/Core/Style.js +587 -688
  71. package/lib/Core/System/Capabilities.js +28 -25
  72. package/lib/Core/TileGeometry.js +20 -34
  73. package/lib/Core/TileMesh.js +71 -119
  74. package/lib/Core/View.js +854 -1093
  75. package/lib/Layer/C3DTilesLayer.js +305 -398
  76. package/lib/Layer/ColorLayer.js +45 -52
  77. package/lib/Layer/ElevationLayer.js +37 -58
  78. package/lib/Layer/EntwinePointTileLayer.js +22 -40
  79. package/lib/Layer/FeatureGeometryLayer.js +17 -34
  80. package/lib/Layer/GeoidLayer.js +42 -65
  81. package/lib/Layer/GeometryLayer.js +121 -153
  82. package/lib/Layer/InfoLayer.js +34 -63
  83. package/lib/Layer/LabelLayer.js +352 -461
  84. package/lib/Layer/Layer.js +145 -194
  85. package/lib/Layer/LayerUpdateState.js +59 -83
  86. package/lib/Layer/LayerUpdateStrategy.js +12 -14
  87. package/lib/Layer/OrientedImageLayer.js +120 -183
  88. package/lib/Layer/PointCloudLayer.js +220 -287
  89. package/lib/Layer/PotreeLayer.js +25 -42
  90. package/lib/Layer/RasterLayer.js +22 -51
  91. package/lib/Layer/ReferencingLayerProperties.js +12 -28
  92. package/lib/Layer/TiledGeometryLayer.js +296 -400
  93. package/lib/Main.js +185 -180
  94. package/lib/MainBundle.js +5 -6
  95. package/lib/Parser/B3dmParser.js +58 -75
  96. package/lib/Parser/CameraCalibrationParser.js +22 -25
  97. package/lib/Parser/GDFParser.js +26 -48
  98. package/lib/Parser/GTXParser.js +18 -19
  99. package/lib/Parser/GeoJsonParser.js +51 -89
  100. package/lib/Parser/GpxParser.js +4 -4
  101. package/lib/Parser/ISGParser.js +27 -54
  102. package/lib/Parser/KMLParser.js +4 -4
  103. package/lib/Parser/LASLoader.js +139 -0
  104. package/lib/Parser/LASParser.js +51 -41
  105. package/lib/Parser/MapBoxUrlParser.js +22 -24
  106. package/lib/Parser/PntsParser.js +32 -33
  107. package/lib/Parser/PotreeBinParser.js +27 -53
  108. package/lib/Parser/PotreeCinParser.js +12 -13
  109. package/lib/Parser/ShapefileParser.js +10 -12
  110. package/lib/Parser/VectorTileParser.js +61 -85
  111. package/lib/Parser/XbilParser.js +32 -36
  112. package/lib/Parser/deprecated/LegacyGLTFLoader.js +113 -126
  113. package/lib/Process/3dTilesProcessing.js +66 -129
  114. package/lib/Process/FeatureProcessing.js +15 -17
  115. package/lib/Process/LayeredMaterialNodeProcessing.js +36 -48
  116. package/lib/Process/ObjectRemovalHelper.js +19 -49
  117. package/lib/Process/handlerNodeError.js +5 -5
  118. package/lib/Provider/3dTilesProvider.js +33 -37
  119. package/lib/Provider/DataSourceProvider.js +7 -9
  120. package/lib/Provider/Fetcher.js +50 -79
  121. package/lib/Provider/PointCloudProvider.js +16 -17
  122. package/lib/Provider/TileProvider.js +10 -22
  123. package/lib/Provider/URLBuilder.js +22 -15
  124. package/lib/Renderer/Camera.js +122 -159
  125. package/lib/Renderer/Color.js +34 -34
  126. package/lib/Renderer/ColorLayersOrdering.js +25 -43
  127. package/lib/Renderer/CommonMaterial.js +13 -18
  128. package/lib/Renderer/Label2DRenderer.js +133 -163
  129. package/lib/Renderer/LayeredMaterial.js +151 -228
  130. package/lib/Renderer/OBB.js +118 -144
  131. package/lib/Renderer/OrientedImageCamera.js +88 -119
  132. package/lib/Renderer/OrientedImageMaterial.js +101 -131
  133. package/lib/Renderer/PointsMaterial.js +138 -167
  134. package/lib/Renderer/RasterTile.js +153 -248
  135. package/lib/Renderer/RenderMode.js +13 -16
  136. package/lib/Renderer/Shader/ShaderChunk.js +110 -126
  137. package/lib/Renderer/Shader/ShaderUtils.js +18 -18
  138. package/lib/Renderer/SphereHelper.js +5 -6
  139. package/lib/Renderer/WebXR.js +60 -0
  140. package/lib/Renderer/c3DEngine.js +112 -130
  141. package/lib/Source/C3DTilesIonSource.js +19 -32
  142. package/lib/Source/C3DTilesSource.js +10 -23
  143. package/lib/Source/EntwinePointTileSource.js +21 -35
  144. package/lib/Source/FileSource.js +54 -82
  145. package/lib/Source/OrientedImageSource.js +31 -53
  146. package/lib/Source/PotreeSource.js +16 -28
  147. package/lib/Source/Source.js +123 -163
  148. package/lib/Source/TMSSource.js +56 -78
  149. package/lib/Source/VectorTilesSource.js +47 -73
  150. package/lib/Source/WFSSource.js +44 -66
  151. package/lib/Source/WMSSource.js +34 -50
  152. package/lib/Source/WMTSSource.js +15 -28
  153. package/lib/ThreeExtended/capabilities/WebGL.js +61 -69
  154. package/lib/ThreeExtended/libs/ktx-parse.module.js +111 -155
  155. package/lib/ThreeExtended/libs/zstddec.module.js +22 -40
  156. package/lib/ThreeExtended/loaders/DDSLoader.js +177 -166
  157. package/lib/ThreeExtended/loaders/DRACOLoader.js +247 -306
  158. package/lib/ThreeExtended/loaders/GLTFLoader.js +2112 -2328
  159. package/lib/ThreeExtended/loaders/KTX2Loader.js +372 -467
  160. package/lib/ThreeExtended/utils/BufferGeometryUtils.js +274 -263
  161. package/lib/ThreeExtended/utils/WorkerPool.js +57 -78
  162. package/lib/Utils/CameraUtils.js +285 -361
  163. package/lib/Utils/DEMUtils.js +101 -112
  164. package/lib/Utils/FeaturesUtils.js +57 -80
  165. package/lib/Utils/OrientationUtils.js +84 -81
  166. package/lib/Utils/ThreeUtils.js +18 -35
  167. package/lib/Utils/gui/C3DTilesStyle.js +92 -184
  168. package/lib/Utils/gui/Main.js +12 -12
  169. package/lib/Utils/gui/Minimap.js +35 -48
  170. package/lib/Utils/gui/Navigation.js +80 -114
  171. package/lib/Utils/gui/Scale.js +40 -58
  172. package/lib/Utils/gui/Searchbar.js +44 -66
  173. package/lib/Utils/gui/Widget.js +29 -47
  174. package/lib/Utils/placeObjectOnGround.js +39 -40
  175. package/package.json +25 -30
  176. package/examples/js/ThreeLoader.js +0 -77
  177. package/lib/Utils/Utf8Decoder.js +0 -11
package/README.md CHANGED
@@ -15,6 +15,10 @@ different data formats (3dTiles, GeoJSON, Vector Tiles, GPX and much more). A
15
15
  complete list of features and supported data formats is [available on the
16
16
  wiki](https://github.com/iTowns/itowns/wiki/Supported-Features).
17
17
 
18
+ It officially targets the last two major versions of both Firefox, Safari and
19
+ Chromium-based browsers (Chrome, Edge, ...) at the date of each release. Older
20
+ browsers supporting WebGL 2.0 may work but we do not offer support.
21
+
18
22
  ![iTowns screenshot](https://raw.githubusercontent.com/iTowns/itowns.github.io/master/images/itownsReleaseXS.jpg)
19
23
 
20
24
  ## Documentation and examples
package/changelog.md CHANGED
@@ -1,3 +1,112 @@
1
+ <a name="2.42.0"></a>
2
+ # [2.42.0](https://github.com/iTowns/itowns/compare/v2.41.0...v2.42.0) (2024-02-05)
3
+
4
+
5
+ ### Features
6
+
7
+ * Add bboxUrlPrecision parameter ([09a037d](https://github.com/iTowns/itowns/commit/09a037d))
8
+ * Add Cloud Optimized GeoTIFF (COG) sample ([#2250](https://github.com/iTowns/itowns/issues/2250)) ([f707e26](https://github.com/iTowns/itowns/commit/f707e26))
9
+ * **controls:** add meta key support in state controls ([74f8b50](https://github.com/iTowns/itowns/commit/74f8b50))
10
+ * **Coordinates:** add toArray method. ([ebadc9c](https://github.com/iTowns/itowns/commit/ebadc9c))
11
+ * **deps:** Update proj4 from 2.9.0 to 2.9.2 ([24eac28](https://github.com/iTowns/itowns/commit/24eac28))
12
+ * **deps:** Update three from 0.154.0 to 0.159.0 ([a2f9105](https://github.com/iTowns/itowns/commit/a2f9105))
13
+ * drop support of old browsers ([e81e117](https://github.com/iTowns/itowns/commit/e81e117))
14
+ * **Feature2Mesh:** Stylize points mesh. ([b7538b0](https://github.com/iTowns/itowns/commit/b7538b0))
15
+ * **LASParser:** change lasparser package from loaders.gl to copc ([aa9d97e](https://github.com/iTowns/itowns/commit/aa9d97e))
16
+ * **View:** add getters for threejs renderer and camera ([57ed8d3](https://github.com/iTowns/itowns/commit/57ed8d3))
17
+ * **view:** add WebXR support. ([1d10290](https://github.com/iTowns/itowns/commit/1d10290))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **C3DTilesLayer:** handle tileContent with several child containing C3DTFeature. ([219e015](https://github.com/iTowns/itowns/commit/219e015))
23
+ * **ColorLayer:** Fix rendering issue on white to invisible effect ([04cad6c](https://github.com/iTowns/itowns/commit/04cad6c)), closes [#2236](https://github.com/iTowns/itowns/issues/2236)
24
+ * **examples:** change watercolor tile url ([1bfd639](https://github.com/iTowns/itowns/commit/1bfd639))
25
+ * **examples:** Fix stereo effects example ([3919b72](https://github.com/iTowns/itowns/commit/3919b72)), closes [/github.com/mrdoob/three.js/wiki/Migration-Guide#147--148](https://github.com//github.com/mrdoob/three.js/wiki/Migration-Guide/issues/147--148)
26
+ * **package-lock.json:** Restore resolved and integrity properties ([6737c93](https://github.com/iTowns/itowns/commit/6737c93)), closes [npm/cli#4263](https://github.com/npm/cli/issues/4263)
27
+ * **pointcloud:** Add SSE calculation for orthographic projections ([cae9463](https://github.com/iTowns/itowns/commit/cae9463))
28
+ * **points:** Correct orthographic vertex projection ([e6e1d80](https://github.com/iTowns/itowns/commit/e6e1d80))
29
+ * **StateControl:** use uncaught key event ([7fae54c](https://github.com/iTowns/itowns/commit/7fae54c))
30
+ * **tests:** prevent overwriting `navigator.userAgent` ([f146262](https://github.com/iTowns/itowns/commit/f146262))
31
+ * **VectorTile:** loading texture on VectorTile when node.pendingSubdivision !need improvement! ([e464bdc](https://github.com/iTowns/itowns/commit/e464bdc))
32
+
33
+
34
+ ### Performance Improvements
35
+
36
+ * **3dtiles:** Transform 3d tiles region bounding volumes to spheres ([f0eaf96](https://github.com/iTowns/itowns/commit/f0eaf96))
37
+
38
+
39
+ ### Code Refactoring
40
+
41
+ * **bboxDigits:** Apply code review ([b118942](https://github.com/iTowns/itowns/commit/b118942))
42
+ * **Feature2Mesh:** add gestion feature with variable size ([4d44cd3](https://github.com/iTowns/itowns/commit/4d44cd3))
43
+ * **FeatureContext:** use Context on LabelLayer and Feature2Texture ([4abab9b](https://github.com/iTowns/itowns/commit/4abab9b))
44
+ * **FeatureCtx:** move class FeatureContext to Style and rename ([2428d56](https://github.com/iTowns/itowns/commit/2428d56))
45
+ * **Feature:** remove geometry.properties.style -> use style fct at Feature level ([b736f72](https://github.com/iTowns/itowns/commit/b736f72))
46
+ * **FeatureToolTip:** update with new gestion of Style ([356e695](https://github.com/iTowns/itowns/commit/356e695))
47
+ * **points:** Uniformize naming with three's points shader ([d46cd44](https://github.com/iTowns/itowns/commit/d46cd44))
48
+ * **Style:** change setFromGeojsonProperties() to static ([8cf99b6](https://github.com/iTowns/itowns/commit/8cf99b6))
49
+ * **style:** change Style.drawingFromContext(ctx) to Style.getFromContext(ctx) for hierarchization of style properties ([17bbe88](https://github.com/iTowns/itowns/commit/17bbe88))
50
+ * **Style:** change Style.setFromVectorTileLayer to static ([5f22009](https://github.com/iTowns/itowns/commit/5f22009))
51
+ * **StyleContext:** add setFeature to access feature.type ([6b44ef9](https://github.com/iTowns/itowns/commit/6b44ef9))
52
+ * **Style:** fuse drawStylefromContext() and symbolStylefromContext() into applyContext() ([db3e455](https://github.com/iTowns/itowns/commit/db3e455))
53
+ * **Style:** homogenize gestion fill.pattern between all existing ([396edfb](https://github.com/iTowns/itowns/commit/396edfb))
54
+ * **Style:** Style hierachisation in Layer.Style instanciation ([55849f6](https://github.com/iTowns/itowns/commit/55849f6))
55
+ * **Style:** supp collection.style and delete notion of style.parent ([40f83b3](https://github.com/iTowns/itowns/commit/40f83b3))
56
+ * **Style:** supp getTextFromProperties() ad it's done with getContext() ([565dd63](https://github.com/iTowns/itowns/commit/565dd63))
57
+
58
+
59
+ ### Workflow and chores
60
+
61
+ * release v2.42.0 ([ec812b4](https://github.com/iTowns/itowns/commit/ec812b4))
62
+ * **babel:** remove nullish coalescing operator transform ([691a859](https://github.com/iTowns/itowns/commit/691a859))
63
+ * **deps-dev:** bump [@babel](https://github.com/babel)/traverse from 7.22.5 to 7.23.2 ([66171c7](https://github.com/iTowns/itowns/commit/66171c7))
64
+ * **deps-dev:** bump follow-redirects from 1.15.2 to 1.15.4 ([9761d58](https://github.com/iTowns/itowns/commit/9761d58))
65
+ * **deps-dev:** Update conventional-changelog from 3.0.0 to 4.1.0 ([5f084bf](https://github.com/iTowns/itowns/commit/5f084bf))
66
+ * **deps-dev:** Update eslint and its plugins ([1e9371e](https://github.com/iTowns/itowns/commit/1e9371e))
67
+ * **deps-dev:** Update some developer dependencies ([4d74d4a](https://github.com/iTowns/itowns/commit/4d74d4a))
68
+ * **deps-dev:** Update webpack and its loaders ([cdaf12f](https://github.com/iTowns/itowns/commit/cdaf12f))
69
+ * **deps:** add copc.js dependency ([f89df8c](https://github.com/iTowns/itowns/commit/f89df8c))
70
+ * **deps:** supp package loaders.gl/las ([14884f3](https://github.com/iTowns/itowns/commit/14884f3))
71
+ * **deps:** Update [@loaders](https://github.com/loaders).gl/las from 3.4.4 to 4.0.4 ([30ded56](https://github.com/iTowns/itowns/commit/30ded56))
72
+ * **deps:** Update [@tmcw](https://github.com/tmcw)/togeojson from 5.6.2 to 5.8.1 ([e52fba6](https://github.com/iTowns/itowns/commit/e52fba6))
73
+ * **deps:** Update regenerator-runtime from 0.13.11 to 0.14.0 ([878a256](https://github.com/iTowns/itowns/commit/878a256))
74
+ * **dev-deps:** Update puppeteer from 19.4.0 to 21.6.0 ([a681103](https://github.com/iTowns/itowns/commit/a681103))
75
+ * **dev-deps:** Update semver due to moderate vulnerability ([5a6c7e3](https://github.com/iTowns/itowns/commit/5a6c7e3))
76
+ * **examples:** ESMify collada example ([b82622d](https://github.com/iTowns/itowns/commit/b82622d))
77
+ * **examples:** ESMify multiple 2.5D maps ([ac9cea4](https://github.com/iTowns/itowns/commit/ac9cea4))
78
+ * **Feature:** rename base_altitudeDefault to camelCase ([658992d](https://github.com/iTowns/itowns/commit/658992d))
79
+ * **polyfills:** remove polyfill for async/await ([abc6bbb](https://github.com/iTowns/itowns/commit/abc6bbb))
80
+ * **polyfills:** remove polyfill for TextDecoder ([356811e](https://github.com/iTowns/itowns/commit/356811e))
81
+ * **README:** add browser support notice ([f31fec9](https://github.com/iTowns/itowns/commit/f31fec9))
82
+ * **test:** fix bootstrap to follow ES semantics ([4d4e28f](https://github.com/iTowns/itowns/commit/4d4e28f))
83
+ * **webpack:** remove fetch polyfill on bundle ([96b870a](https://github.com/iTowns/itowns/commit/96b870a))
84
+ * **webpack:** remove URL polyfill on bundle ([1928986](https://github.com/iTowns/itowns/commit/1928986))
85
+ * **webpack:** stop watching node modules in dev mode ([47d0c7c](https://github.com/iTowns/itowns/commit/47d0c7c))
86
+
87
+
88
+ ### Documentation
89
+
90
+ * **ColorLayer:** Update doc on effect_type and effect_parameter ([d508831](https://github.com/iTowns/itowns/commit/d508831))
91
+ * **README:** remove typo ([6329129](https://github.com/iTowns/itowns/commit/6329129))
92
+ * **style:** specify features supported with labels ([de88737](https://github.com/iTowns/itowns/commit/de88737))
93
+ * **View:** document View properties ([ef8d3f4](https://github.com/iTowns/itowns/commit/ef8d3f4))
94
+
95
+
96
+ ### BREAKING CHANGES
97
+
98
+ * iTowns now officially supports only the two last
99
+ versions + versions with >0.5% market share of popular browsers as
100
+ well as the lastest version of Firefox ESR. WebGL2.0 support is also
101
+ mandatory.
102
+ * **3dtiles:** Remove region, box and sphere properties of C3DTBoundingVolume.
103
+ They have been replaced by volume property which contains a THREE.Box3 (for
104
+ box) or a THREE.Sphere (for sphere or region). Initial bounding volume type
105
+ can be retrieved with the initialVolumeType property.
106
+ * **C3DTilesLayer:** C3DTFeature constructor changed from (tileId, batchId, groups, info, userData) to (tileId, batchId, groups, info, userData, object3d)
107
+
108
+
109
+
1
110
  <a name="2.41.0"></a>
2
111
  # [2.41.0](https://github.com/iTowns/itowns/compare/v2.40.0...v2.41.0) (2023-10-16)
3
112