itowns 2.45.1 → 2.45.2-next.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 (220) hide show
  1. package/dist/455.js +1 -1
  2. package/dist/455.js.map +1 -1
  3. package/dist/debug.js +1 -1
  4. package/dist/debug.js.LICENSE.txt +8 -2
  5. package/dist/debug.js.map +1 -1
  6. package/dist/itowns.js +1 -1
  7. package/dist/itowns.js.LICENSE.txt +1 -1
  8. package/dist/itowns.js.map +1 -1
  9. package/dist/itowns_lasparser.js +1 -1
  10. package/dist/itowns_lasparser.js.map +1 -1
  11. package/dist/itowns_lasworker.js +1 -1
  12. package/dist/itowns_lasworker.js.map +1 -1
  13. package/dist/itowns_potree2worker.js +1 -1
  14. package/dist/itowns_potree2worker.js.map +1 -1
  15. package/dist/itowns_widgets.js +1 -1
  16. package/dist/itowns_widgets.js.map +1 -1
  17. package/examples/copc_simple_loader.html +3 -3
  18. package/examples/entwine_3d_loader.html +2 -2
  19. package/examples/entwine_simple_loader.html +10 -6
  20. package/examples/view_3d_map_webxr.html +2 -5
  21. package/lib/Controls/FirstPersonControls.d.ts +90 -0
  22. package/lib/Controls/FlyControls.d.ts +36 -0
  23. package/lib/Controls/GlobeControls.d.ts +274 -0
  24. package/lib/Controls/PlanarControls.d.ts +339 -0
  25. package/lib/Controls/StateControl.d.ts +140 -0
  26. package/lib/Controls/StreetControls.d.ts +134 -0
  27. package/lib/Controls/VRControls.d.ts +56 -0
  28. package/lib/Controls/VRControls.js +409 -0
  29. package/lib/Converter/Feature2Mesh.d.ts +42 -0
  30. package/lib/Converter/Feature2Texture.d.ts +5 -0
  31. package/lib/Converter/convertToTile.d.ts +5 -0
  32. package/lib/Converter/convertToTile.js +2 -2
  33. package/lib/Converter/textureConverter.d.ts +4 -0
  34. package/lib/Core/3DTiles/C3DTBatchTable.d.ts +49 -0
  35. package/lib/Core/3DTiles/C3DTBatchTableHierarchyExtension.d.ts +37 -0
  36. package/lib/Core/3DTiles/C3DTBoundingVolume.d.ts +39 -0
  37. package/lib/Core/3DTiles/C3DTExtensions.d.ts +75 -0
  38. package/lib/Core/3DTiles/C3DTFeature.d.ts +47 -0
  39. package/lib/Core/3DTiles/C3DTilesEnums.d.ts +14 -0
  40. package/lib/Core/3DTiles/C3DTileset.d.ts +46 -0
  41. package/lib/Core/3DTiles/utils/BinaryPropertyAccessor.d.ts +14 -0
  42. package/lib/Core/AnimationPlayer.d.ts +53 -0
  43. package/lib/Core/CopcNode.d.ts +67 -0
  44. package/lib/Core/CopcNode.js +50 -69
  45. package/lib/Core/Deprecated/Undeprecator.d.ts +6 -0
  46. package/lib/Core/EntwinePointTileNode.d.ts +58 -0
  47. package/lib/Core/EntwinePointTileNode.js +6 -34
  48. package/lib/Core/Feature.d.ts +323 -0
  49. package/lib/Core/Geographic/GeoidGrid.d.ts +86 -0
  50. package/lib/Core/Label.d.ts +86 -0
  51. package/lib/Core/MainLoop.d.ts +23 -0
  52. package/lib/Core/Picking.d.ts +6 -0
  53. package/lib/Core/Picking.js +4 -0
  54. package/lib/Core/PointCloudNode.d.ts +14 -0
  55. package/lib/Core/PointCloudNode.js +28 -0
  56. package/lib/Core/Potree2Node.d.ts +11 -0
  57. package/lib/Core/Potree2Node.js +3 -57
  58. package/lib/Core/Potree2PointAttributes.d.ts +97 -0
  59. package/lib/Core/PotreeNode.d.ts +13 -0
  60. package/lib/Core/PotreeNode.js +17 -17
  61. package/lib/Core/Prefab/Globe/Atmosphere.d.ts +66 -0
  62. package/lib/Core/Prefab/Globe/Atmosphere.js +10 -5
  63. package/lib/Core/Prefab/Globe/GlobeLayer.d.ts +48 -0
  64. package/lib/Core/Prefab/Globe/GlobeTileBuilder.d.ts +38 -0
  65. package/lib/Core/Prefab/Globe/SkyShader.d.ts +5 -0
  66. package/lib/Core/Prefab/Globe/SkyShader.js +3 -3
  67. package/lib/Core/Prefab/GlobeView.d.ts +65 -0
  68. package/lib/Core/Prefab/GlobeView.js +9 -0
  69. package/lib/Core/Prefab/Planar/PlanarLayer.d.ts +38 -0
  70. package/lib/Core/Prefab/Planar/PlanarTileBuilder.d.ts +32 -0
  71. package/lib/Core/Prefab/PlanarView.d.ts +33 -0
  72. package/lib/Core/Prefab/TileBuilder.d.ts +63 -0
  73. package/lib/Core/Prefab/computeBufferTileGeometry.d.ts +17 -0
  74. package/lib/Core/Scheduler/Cache.d.ts +25 -0
  75. package/lib/Core/Scheduler/CancelledCommandException.d.ts +12 -0
  76. package/lib/Core/Scheduler/Scheduler.d.ts +106 -0
  77. package/lib/Core/Style.d.ts +248 -0
  78. package/lib/Core/StyleOptions.d.ts +455 -0
  79. package/lib/Core/System/Capabilities.d.ts +9 -0
  80. package/lib/Core/Tile/Tile.d.ts +70 -0
  81. package/lib/Core/Tile/TileGrid.d.ts +12 -0
  82. package/lib/Core/TileGeometry.d.ts +46 -0
  83. package/lib/Core/TileMesh.d.ts +50 -0
  84. package/lib/Core/TileMesh.js +2 -4
  85. package/lib/Core/View.d.ts +403 -0
  86. package/lib/Core/View.js +1 -7
  87. package/lib/Layer/C3DTilesLayer.d.ts +140 -0
  88. package/lib/Layer/ColorLayer.d.ts +128 -0
  89. package/lib/Layer/ColorLayer.js +4 -4
  90. package/lib/Layer/CopcLayer.d.ts +42 -0
  91. package/lib/Layer/CopcLayer.js +3 -6
  92. package/lib/Layer/ElevationLayer.d.ts +96 -0
  93. package/lib/Layer/ElevationLayer.js +3 -3
  94. package/lib/Layer/EntwinePointTileLayer.d.ts +56 -0
  95. package/lib/Layer/EntwinePointTileLayer.js +4 -3
  96. package/lib/Layer/FeatureGeometryLayer.d.ts +62 -0
  97. package/lib/Layer/GeoidLayer.d.ts +41 -0
  98. package/lib/Layer/GeometryLayer.d.ts +120 -0
  99. package/lib/Layer/InfoLayer.d.ts +24 -0
  100. package/lib/Layer/InfoLayer.js +1 -1
  101. package/lib/Layer/LabelLayer.d.ts +93 -0
  102. package/lib/Layer/LabelLayer.js +2 -2
  103. package/lib/Layer/Layer.d.ts +185 -0
  104. package/lib/Layer/LayerUpdateState.d.ts +24 -0
  105. package/lib/Layer/LayerUpdateStrategy.d.ts +11 -0
  106. package/lib/Layer/LayerUpdateStrategy.js +2 -7
  107. package/lib/Layer/OGC3DTilesLayer.d.ts +277 -0
  108. package/lib/Layer/OGC3DTilesLayer.js +21 -0
  109. package/lib/Layer/OrientedImageLayer.d.ts +53 -0
  110. package/lib/Layer/PointCloudLayer.d.ts +103 -0
  111. package/lib/Layer/PointCloudLayer.js +1 -1
  112. package/lib/Layer/Potree2Layer.d.ts +56 -0
  113. package/lib/Layer/PotreeLayer.d.ts +55 -0
  114. package/lib/Layer/RasterLayer.d.ts +8 -0
  115. package/lib/Layer/RasterLayer.js +2 -2
  116. package/lib/Layer/ReferencingLayerProperties.d.ts +2 -0
  117. package/lib/Layer/ReferencingLayerProperties.js +0 -12
  118. package/lib/Layer/TiledGeometryLayer.d.ts +192 -0
  119. package/lib/Layer/TiledGeometryLayer.js +4 -3
  120. package/lib/Main.d.ts +89 -0
  121. package/lib/Main.js +3 -1
  122. package/lib/Parser/B3dmParser.d.ts +26 -0
  123. package/lib/Parser/CameraCalibrationParser.d.ts +32 -0
  124. package/lib/Parser/GDFParser.d.ts +24 -0
  125. package/lib/Parser/GTXParser.d.ts +28 -0
  126. package/lib/Parser/GeoJsonParser.d.ts +12 -0
  127. package/lib/Parser/GpxParser.d.ts +12 -0
  128. package/lib/Parser/ISGParser.d.ts +23 -0
  129. package/lib/Parser/KMLParser.d.ts +12 -0
  130. package/lib/Parser/LASParser.d.ts +61 -0
  131. package/lib/Parser/MapBoxUrlParser.d.ts +9 -0
  132. package/lib/Parser/PntsParser.d.ts +4 -0
  133. package/lib/Parser/Potree2BinParser.d.ts +8 -0
  134. package/lib/Parser/PotreeBinParser.d.ts +4 -0
  135. package/lib/Parser/PotreeCinParser.d.ts +4 -0
  136. package/lib/Parser/ShapefileParser.d.ts +25 -0
  137. package/lib/Parser/VectorTileParser.d.ts +34 -0
  138. package/lib/Parser/XbilParser.d.ts +18 -0
  139. package/lib/Parser/deprecated/LegacyGLTFLoader.d.ts +32 -0
  140. package/lib/Parser/iGLTFLoader.d.ts +104 -0
  141. package/lib/Process/3dTilesProcessing.d.ts +43 -0
  142. package/lib/Process/FeatureProcessing.d.ts +4 -0
  143. package/lib/Process/LayeredMaterialNodeProcessing.d.ts +3 -0
  144. package/lib/Process/LayeredMaterialNodeProcessing.js +12 -12
  145. package/lib/Process/ObjectRemovalHelper.d.ts +32 -0
  146. package/lib/Process/handlerNodeError.d.ts +1 -0
  147. package/lib/Provider/3dTilesProvider.d.ts +7 -0
  148. package/lib/Provider/DataSourceProvider.d.ts +4 -0
  149. package/lib/Provider/Fetcher.d.ts +101 -0
  150. package/lib/Provider/PointCloudProvider.d.ts +4 -0
  151. package/lib/Provider/TileProvider.d.ts +4 -0
  152. package/lib/Provider/URLBuilder.d.ts +28 -0
  153. package/lib/Renderer/Camera.d.ts +95 -0
  154. package/lib/Renderer/Color.d.ts +3 -0
  155. package/lib/Renderer/ColorLayersOrdering.d.ts +38 -0
  156. package/lib/Renderer/ColorLayersOrdering.js +2 -2
  157. package/lib/Renderer/CommonMaterial.d.ts +6 -0
  158. package/lib/Renderer/Label2DRenderer.d.ts +31 -0
  159. package/lib/Renderer/LayeredMaterial.d.ts +121 -0
  160. package/lib/Renderer/LayeredMaterial.js +221 -141
  161. package/lib/Renderer/OBB.d.ts +65 -0
  162. package/lib/Renderer/OrientedImageCamera.d.ts +36 -0
  163. package/lib/Renderer/OrientedImageMaterial.d.ts +68 -0
  164. package/lib/Renderer/PointsMaterial.d.ts +226 -0
  165. package/lib/Renderer/PointsMaterial.js +60 -22
  166. package/lib/Renderer/RasterTile.d.ts +53 -0
  167. package/lib/Renderer/RasterTile.js +8 -9
  168. package/lib/Renderer/RenderMode.d.ts +11 -0
  169. package/lib/Renderer/RenderMode.js +1 -0
  170. package/lib/Renderer/Shader/ShaderChunk.d.ts +78 -0
  171. package/lib/Renderer/Shader/ShaderUtils.d.ts +5 -0
  172. package/lib/Renderer/WebXR.d.ts +33 -0
  173. package/lib/Renderer/WebXR.js +128 -47
  174. package/lib/Renderer/c3DEngine.d.ts +55 -0
  175. package/lib/Renderer/c3DEngine.js +5 -1
  176. package/lib/Source/C3DTilesGoogleSource.d.ts +38 -0
  177. package/lib/Source/C3DTilesIonSource.d.ts +31 -0
  178. package/lib/Source/C3DTilesSource.d.ts +17 -0
  179. package/lib/Source/CopcSource.d.ts +79 -0
  180. package/lib/Source/EntwinePointTileSource.d.ts +40 -0
  181. package/lib/Source/EntwinePointTileSource.js +0 -5
  182. package/lib/Source/FileSource.d.ts +118 -0
  183. package/lib/Source/OGC3DTilesGoogleSource.d.ts +24 -0
  184. package/lib/Source/OGC3DTilesIonSource.d.ts +26 -0
  185. package/lib/Source/OGC3DTilesSource.d.ts +21 -0
  186. package/lib/Source/OrientedImageSource.d.ts +48 -0
  187. package/lib/Source/Potree2Source.d.ts +157 -0
  188. package/lib/Source/PotreeSource.d.ts +69 -0
  189. package/lib/Source/Source.d.ts +122 -0
  190. package/lib/Source/TMSSource.d.ts +77 -0
  191. package/lib/Source/VectorTilesSource.d.ts +56 -0
  192. package/lib/Source/WFSSource.d.ts +110 -0
  193. package/lib/Source/WMSSource.d.ts +85 -0
  194. package/lib/Source/WMTSSource.d.ts +65 -0
  195. package/lib/ThreeExtended/capabilities/WebGL.d.ts +9 -0
  196. package/lib/ThreeExtended/libs/ktx-parse.module.d.ts +274 -0
  197. package/lib/ThreeExtended/libs/motion-controllers.module.d.ts +64 -0
  198. package/lib/ThreeExtended/libs/motion-controllers.module.js +375 -0
  199. package/lib/ThreeExtended/libs/zstddec.module.d.ts +6 -0
  200. package/lib/ThreeExtended/loaders/DDSLoader.js +40 -1
  201. package/lib/ThreeExtended/loaders/DRACOLoader.d.ts +41 -0
  202. package/lib/ThreeExtended/loaders/GLTFLoader.d.ts +16 -0
  203. package/lib/ThreeExtended/loaders/GLTFLoader.js +22 -3
  204. package/lib/ThreeExtended/loaders/KTX2Loader.d.ts +116 -0
  205. package/lib/ThreeExtended/loaders/KTX2Loader.js +9 -2
  206. package/lib/ThreeExtended/math/ColorSpaces.d.ts +56 -0
  207. package/lib/ThreeExtended/utils/BufferGeometryUtils.d.ts +62 -0
  208. package/lib/ThreeExtended/utils/BufferGeometryUtils.js +2 -2
  209. package/lib/ThreeExtended/utils/WorkerPool.d.ts +19 -0
  210. package/lib/ThreeExtended/webxr/XRControllerModelFactory.d.ts +25 -0
  211. package/lib/ThreeExtended/webxr/XRControllerModelFactory.js +209 -0
  212. package/lib/Utils/CameraUtils.d.ts +132 -0
  213. package/lib/Utils/DEMUtils.d.ts +84 -0
  214. package/lib/Utils/DEMUtils.js +2 -2
  215. package/lib/Utils/FeaturesUtils.d.ts +17 -0
  216. package/lib/Utils/Gradients.d.ts +13 -0
  217. package/lib/Utils/ThreeUtils.d.ts +14 -0
  218. package/lib/Utils/placeObjectOnGround.d.ts +28 -0
  219. package/lib/global.d.js +0 -0
  220. package/package.json +18 -15
@@ -0,0 +1,26 @@
1
+ declare namespace _default {
2
+ /** Parse b3dm buffer and extract THREE.Scene and batch table
3
+ * @param {ArrayBuffer} buffer - the b3dm buffer.
4
+ * @param {Object} options - additional properties.
5
+ * @param {string=} [options.gltfUpAxis='Y'] - embedded glTF model up axis.
6
+ * @param {string} options.urlBase - the base url of the b3dm file (used to fetch textures for the embedded glTF model).
7
+ * @param {boolean=} [options.doNotPatchMaterial=false] - disable patching material with logarithmic depth buffer support.
8
+ * @param {float} [options.opacity=1.0] - the b3dm opacity.
9
+ * @param {boolean=} [options.frustumCulled=false] - enable frustum culling.
10
+ * @param {boolean|Material=} [options.overrideMaterials=false] - override b3dm's embedded glTF materials. If
11
+ * true, a threejs [MeshBasicMaterial](https://threejs.org/docs/index.html?q=meshbasic#api/en/materials/MeshBasicMaterial)
12
+ * is set up. config.overrideMaterials can also be a threejs [Material](https://threejs.org/docs/index.html?q=material#api/en/materials/Material)
13
+ * in which case it will be the material used to override.
14
+ * @return {Promise} - a promise that resolves with an object containig a THREE.Scene (gltf) and a batch table (batchTable).
15
+ *
16
+ */
17
+ function parse(buffer: ArrayBuffer, options: {
18
+ gltfUpAxis?: string | undefined;
19
+ urlBase: string;
20
+ doNotPatchMaterial?: boolean | undefined;
21
+ opacity?: any;
22
+ frustumCulled?: boolean | undefined;
23
+ overrideMaterials?: (boolean | Material) | undefined;
24
+ }): Promise<any>;
25
+ }
26
+ export default _default;
@@ -0,0 +1,32 @@
1
+ declare namespace _default {
2
+ /**
3
+ * Description of a camera calibration in a JSON file.
4
+ *
5
+ * @typedef CameraCalibrationJson
6
+ * @type {Object}
7
+ *
8
+ * @property {number[]} projection - projection matrix,
9
+ * @property {number[]} size - image size in pixel.
10
+ * @property {number[]} position - position of the camera.
11
+ * @property {number[]} rotation - rotation matrix
12
+ * @property {Object} [distorsion={}] - distorsion
13
+ * @property {number[]} [distorsion.pps]
14
+ * @property {number[]} [distorsion.poly357]
15
+ * @property {number[]} [distorsion.limit]
16
+ * @property {number[]} [distorsion.l1l2]
17
+ * @property {number[]} [distorsion.etat]
18
+ */
19
+ /**
20
+ * Parser a JSON array of camera calibrations and return an array of {@link OrientedImageCamera}.
21
+ * @param {string|JSON} json - the json content of the calibration file.
22
+ * @param {Object} [options={}] - Options controlling the parsing.
23
+ * @param {string} [options.near=0.1] - Near of the created cameras. Default value comes from created {@link OrientedImageCamera}
24
+ * @param {string} [options.far=1000] - Far of the created cameras. Default value comes from created {@link OrientedImageCamera}
25
+ * @return {Promise} - A promise resolving with an array of {@link OrientedImageCamera}.
26
+ */
27
+ function parse(json: string | JSON, options?: {
28
+ near?: string | undefined;
29
+ far?: string | undefined;
30
+ }): Promise<any>;
31
+ }
32
+ export default _default;
@@ -0,0 +1,24 @@
1
+ export function getHeaderAttribute(header: any, attributeName: any): number;
2
+ declare namespace _default {
3
+ /**
4
+ * Parses a GDF file content and returns a corresponding {@link GeoidGrid}.
5
+ *
6
+ * @param {string} gdf The content of the GDF file to parse.
7
+ * @param {Object} options An object gathering the optional parameters to pass to
8
+ * the parser.
9
+ * @param {Object} [options.in={}] Information on the GDF data.
10
+ * @param {string} [options.in.crs='EPSG:4326'] The Coordinates Reference System (CRS) of the GDF data.
11
+ * It must be a geographic CRS, and must be given as an EPSG
12
+ * code.
13
+ *
14
+ * @returns {Promise<GeoidGrid>} A promise resolving with a {@link GeoidGrid}, which contains all the necessary
15
+ * attributes and methods to access GDF file data.
16
+ */
17
+ function parse(gdf: string, options?: {
18
+ in?: {
19
+ crs?: string | undefined;
20
+ } | undefined;
21
+ }): Promise<GeoidGrid>;
22
+ }
23
+ export default _default;
24
+ import GeoidGrid from '../Core/Geographic/GeoidGrid';
@@ -0,0 +1,28 @@
1
+ export const BYTES_PER_DOUBLE: 8;
2
+ export const BYTES_PER_FLOAT: 4;
3
+ declare namespace _default {
4
+ /**
5
+ * Parses a GTX file content and returns a corresponding {@link GeoidGrid}.
6
+ *
7
+ * @param {ArrayBuffer} gtx The content of the GTX file to parse.
8
+ * @param {Object} options An object gathering the optional parameters to pass to
9
+ * the parser.
10
+ * @param {Object} [options.in={}] Information on the GTX data.
11
+ * @param {string} [options.in.crs='EPSG:4326'] The Coordinates Reference System (CRS) of the GTX data.
12
+ * It must be a geographic CRS, and must be given as an
13
+ * EPSG code.
14
+ * @param {string} [options.in.dataType='float'] The encoding of geoid height data within the GTX file.
15
+ * Must be `'float'` or `'double'`.
16
+ *
17
+ * @returns {Promise<GeoidGrid>} A promise resolving with a {@link GeoidGrid}, which contains all the necessary
18
+ * attributes and methods to access GTX file data.
19
+ */
20
+ function parse(gtx: ArrayBuffer, options?: {
21
+ in?: {
22
+ crs?: string | undefined;
23
+ dataType?: string | undefined;
24
+ } | undefined;
25
+ }): Promise<GeoidGrid>;
26
+ }
27
+ export default _default;
28
+ import GeoidGrid from '../Core/Geographic/GeoidGrid';
@@ -0,0 +1,12 @@
1
+ declare namespace _default {
2
+ /**
3
+ * Parse a GeoJSON file content and return a {@link FeatureCollection}.
4
+ *
5
+ * @param {string} json - The GeoJSON file content to parse.
6
+ * @param {ParsingOptions} options - Options controlling the parsing.
7
+
8
+ * @return {Promise} A promise resolving with a {@link FeatureCollection}.
9
+ */
10
+ function parse(json: string, options?: ParsingOptions): Promise<any>;
11
+ }
12
+ export default _default;
@@ -0,0 +1,12 @@
1
+ declare namespace _default {
2
+ /**
3
+ * Parse a GPX file content and return a {@link FeatureCollection}.
4
+ *
5
+ * @param {XMLDocument} gpxFile - The GPX file content to parse.
6
+ * @param {ParsingOptions} options - Options controlling the parsing.
7
+ *
8
+ * @return {Promise} A promise resolving with a {@link FeatureCollection}.
9
+ */
10
+ function parse(gpxFile: XMLDocument, options: ParsingOptions): Promise<any>;
11
+ }
12
+ export default _default;
@@ -0,0 +1,23 @@
1
+ declare namespace _default {
2
+ /**
3
+ * Parses an ISG file content and returns a corresponding {@link GeoidGrid}.
4
+ *
5
+ * @param {string} isg The content of the ISG file to parse.
6
+ * @param {Object} options An object gathering the optional parameters to pass to
7
+ * the parser.
8
+ * @param {Object} [options.in={}] Information on the ISG data.
9
+ * @param {string} [options.in.crs='EPSG:4326'] The Coordinates Reference System (CRS) of the ISG data.
10
+ * It must be a geographic CRS, and must be given as an EPSG
11
+ * code.
12
+ *
13
+ * @returns {Promise<GeoidGrid>} A promise resolving with a {@link GeoidGrid}, which contains all the necessary
14
+ * attributes and methods to access ISG file data.
15
+ */
16
+ function parse(isg: string, options?: {
17
+ in?: {
18
+ crs?: string | undefined;
19
+ } | undefined;
20
+ }): Promise<GeoidGrid>;
21
+ }
22
+ export default _default;
23
+ import GeoidGrid from '../Core/Geographic/GeoidGrid';
@@ -0,0 +1,12 @@
1
+ declare namespace _default {
2
+ /**
3
+ * Parse a KML file content and return a {@link FeatureCollection}.
4
+ *
5
+ * @param {XMLDocument} kmlFile - The KML file content to parse.
6
+ * @param {ParsingOptions} options - Options controlling the parsing.
7
+ *
8
+ * @return {Promise} A promise resolving with a {@link FeatureCollection}.
9
+ */
10
+ function parse(kmlFile: XMLDocument, options: ParsingOptions): Promise<any>;
11
+ }
12
+ export default _default;
@@ -0,0 +1,61 @@
1
+ declare namespace _default {
2
+ function enableLazPerf(path: any): void;
3
+ /**
4
+ * Terminate all worker instances.
5
+ * @returns {Promise<void>}
6
+ */
7
+ function terminate(): Promise<void>;
8
+ /**
9
+ * Parses a chunk of a LAS or LAZ (LASZip) and returns the corresponding
10
+ * `THREE.BufferGeometry`.
11
+ *
12
+ * @param {ArrayBuffer} data - The file content to parse.
13
+ * @param {Object} options
14
+ * @param {Object} options.in - Options to give to the parser.
15
+ * @param {number} options.in.pointCount - Number of points encoded in this
16
+ * data chunk.
17
+ * @param {Object} options.in.header - Partial LAS file header.
18
+ * @param {number} options.in.header.pointDataRecordFormat - Type of Point
19
+ * Data Record contained in the LAS file.
20
+ * @param {number} options.in.header.pointDataRecordLength - Size (in bytes)
21
+ * of the Point Data Record.
22
+ * @param {Object} [options.eb] - Extra bytes LAS VLRs headers.
23
+ * @param { 8 | 16 } [options.in.colorDepth] - Color depth (in bits).
24
+ * Defaults to 8 bits for LAS 1.2 and 16 bits for later versions
25
+ * (as mandatory by the specification)
26
+ *
27
+ * @return {Promise<THREE.BufferGeometry>} A promise resolving with a
28
+ * `THREE.BufferGeometry`.
29
+ */
30
+ function parseChunk(data: ArrayBuffer, options?: {
31
+ in: {
32
+ pointCount: number;
33
+ header: {
34
+ pointDataRecordFormat: number;
35
+ pointDataRecordLength: number;
36
+ };
37
+ };
38
+ eb?: Object | undefined;
39
+ }): Promise<THREE.BufferGeometry>;
40
+ /**
41
+ * Parses a LAS file or a LAZ (LASZip) file and return the corresponding
42
+ * `THREE.BufferGeometry`.
43
+ *
44
+ * @param {ArrayBuffer} data - The file content to parse.
45
+ * @param {Object} [options]
46
+ * @param {Object} [options.in] - Options to give to the parser.
47
+ * @param { 8 | 16 } [options.in.colorDepth] - Color depth (in bits).
48
+ * Defaults to 8 bits for LAS 1.2 and 16 bits for later versions
49
+ * (as mandatory by the specification)
50
+ *
51
+ * @return {Promise} A promise resolving with a `THREE.BufferGeometry`. The
52
+ * header of the file is contained in `userData`.
53
+ */
54
+ function parse(data: ArrayBuffer, options?: {
55
+ in?: {
56
+ colorDepth?: 8 | 16 | undefined;
57
+ } | undefined;
58
+ }): Promise<any>;
59
+ }
60
+ export default _default;
61
+ import * as THREE from 'three';
@@ -0,0 +1,9 @@
1
+ declare namespace _default {
2
+ export { normalizeStyleURL };
3
+ export { normalizeSourceURL };
4
+ export { normalizeSpriteURL };
5
+ }
6
+ export default _default;
7
+ declare function normalizeStyleURL(url: any, accessToken: any): any;
8
+ declare function normalizeSourceURL(url: any, accessToken: any): any;
9
+ declare function normalizeSpriteURL(url: any, format: any, extension: any, accessToken: any): string;
@@ -0,0 +1,4 @@
1
+ declare namespace _default {
2
+ function parse(buffer: ArrayBuffer, registeredExtensions: Object): Promise<any>;
3
+ }
4
+ export default _default;
@@ -0,0 +1,8 @@
1
+ declare namespace _default {
2
+ /**
3
+ * @return {Promise<void>}
4
+ */
5
+ function terminate(): Promise<void>;
6
+ function parse(buffer: ArrayBuffer, options: Object): Promise<any>;
7
+ }
8
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare namespace _default {
2
+ function parse(buffer: ArrayBuffer, options: Object): Promise<any>;
3
+ }
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare namespace _default {
2
+ function parse(buffer: ArrayBuffer): Promise<any>;
3
+ }
4
+ export default _default;
@@ -0,0 +1,25 @@
1
+ declare namespace _default {
2
+ /**
3
+ * Parse a bunch of Shapefile files and return a {@link FeatureCollection}.
4
+ *
5
+ * @param {Object} data - All the data that can be specified in a shapefile.
6
+ * @param {ArrayBuffer} data.shp - Data from the shapefile itself,
7
+ * containing the feature geometry itself.
8
+ * @param {ArrayBuffer} data.shx - A positional index of the feature
9
+ * geometry.
10
+ * @param {ArrayBuffer} data.dbf - Columnar attributes for each shape, in
11
+ * [dBase](https://en.wikipedia.org/wiki/DBase) IV format.
12
+ * @param {string} [data.prj] - The coordinate system and crs projection
13
+ * information.
14
+ * @param {ParsingOptions} [options]
15
+ *
16
+ * @return {Promise} A promise resolving with a {@link FeatureCollection}.
17
+ */
18
+ function parse(data: {
19
+ shp: ArrayBuffer;
20
+ shx: ArrayBuffer;
21
+ dbf: ArrayBuffer;
22
+ prj?: string | undefined;
23
+ }, options?: ParsingOptions): Promise<any>;
24
+ }
25
+ export default _default;
@@ -0,0 +1,34 @@
1
+ declare namespace _default {
2
+ /**
3
+ * Parse a vector tile file and return a [Feature]{@link module:GeoJsonParser.Feature}
4
+ * or an array of Features. While multiple formats of vector tile are
5
+ * available, the only one supported for the moment is the
6
+ * [Mapbox Vector Tile](https://www.mapbox.com/vector-tiles/specification/).
7
+ *
8
+ * @param {ArrayBuffer} file - The vector tile file to parse.
9
+ *
10
+ * @param {Object} options - Options controlling the parsing {@link ParsingOptions}.
11
+ *
12
+ * @param {Object} options.in - Object containing all styles,
13
+ * layers and informations data, see {@link InformationsData}.
14
+ *
15
+ * @param {Object} options.in.styles - Object containing subobject with
16
+ * informations on a specific style layer. Styles available is by `layer.id` and by zoom.
17
+ *
18
+ * @param {Object} options.in.layers - Object containing subobject with
19
+ *
20
+ * @param {FeatureBuildingOptions} options.out - options indicates how the features should be built,
21
+ * see {@link FeatureBuildingOptions}.
22
+ *
23
+ * @return {Promise} A Promise resolving with a Feature or an array a
24
+ * Features.
25
+ */
26
+ function parse(file: ArrayBuffer, options: {
27
+ in: {
28
+ styles: Object;
29
+ layers: Object;
30
+ };
31
+ out: FeatureBuildingOptions;
32
+ }): Promise<any>;
33
+ }
34
+ export default _default;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Calculates the minimum maximum texture elevation with xbil data
3
+ *
4
+ * @param {THREE.Texture} texture The texture to parse
5
+ * @param {THREE.Vector4} pitch The pitch, restrict zone to parse
6
+ * @param {Object} options No data value and clamp values
7
+ * @param {number} options.noDataValue No data value
8
+ * @param {number} [options.zmin] The minimum elevation value after which it will be clamped
9
+ * @param {number} [options.zmax] The maximum elevation value after which it will be clamped
10
+ * @return {Object} The minimum and maximum elevation.
11
+ */
12
+ export function computeMinMaxElevation(texture: THREE.Texture, pitch: THREE.Vector4, options: {
13
+ noDataValue: number;
14
+ zmin?: number | undefined;
15
+ zmax?: number | undefined;
16
+ }): Object;
17
+ export function checkNodeElevationTextureValidity(data: any, noDataValue: any): boolean;
18
+ export function insertSignificantValuesFromParent(data: any, dataParent: () => number, noDataValue: any): void;
@@ -0,0 +1,32 @@
1
+ export default threeExamples.LegacyGLTFLoader;
2
+ declare var LegacyGLTFLoader: {
3
+ new (manager: any): {
4
+ load(url: any, onLoad: any, onProgress: any, onError: any): void;
5
+ parse(data: any, path: any, callback: any): void;
6
+ crossOrigin: string;
7
+ withCredentials: boolean;
8
+ path: string;
9
+ resourcePath: string;
10
+ manager: THREE.LoadingManager;
11
+ requestHeader: {
12
+ [header: string]: string;
13
+ };
14
+ loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<any>;
15
+ setCrossOrigin(crossOrigin: string): /*elided*/ any;
16
+ setWithCredentials(value: boolean): /*elided*/ any;
17
+ setPath(path: string): /*elided*/ any;
18
+ setResourcePath(resourcePath: string): /*elided*/ any;
19
+ setRequestHeader(requestHeader: {
20
+ [header: string]: string;
21
+ }): /*elided*/ any;
22
+ };
23
+ Shaders: {
24
+ update: () => void;
25
+ };
26
+ Animations: {
27
+ update: () => void;
28
+ };
29
+ DEFAULT_MATERIAL_NAME: string;
30
+ };
31
+ declare namespace threeExamples { }
32
+ import * as THREE from 'three';
@@ -0,0 +1,104 @@
1
+ export default iGLTFLoader;
2
+ declare class iGLTFLoader extends THREE.Loader<any, string> {
3
+ /**
4
+ * Parses [glTF](https://www.khronos.org/gltf/) 1.0 and 2.0 files.
5
+ *
6
+ * Under the hood, glTF 2.0 files are parsed with THREE.GLTFLoader and GLTF 1.0 are parsed with the previous THREE
7
+ * GltfLoader (for 1.0 glTF) that has been kept and maintained in iTowns.
8
+ *
9
+ * Beware that gltf convention is y-up while itowns is z-up. You can apply a PI/2 rotation around the X axis to the
10
+ * loaded model to transform from y-up to z-up. Note that you can also use Coordinates.geodesicNormal to get the normal
11
+ * to a position on the globe (i.e. in GlobeView) to correctly orient a model on a GlobeView.
12
+ *
13
+ * @param {THREE.LoadingManager} [manager] - The loadingManager for the loader to use. Default is THREE.DefaultLoadingManager.
14
+ */
15
+ constructor(manager?: THREE.LoadingManager);
16
+ legacyGLTFLoader: {
17
+ load(url: any, onLoad: any, onProgress: any, onError: any): void;
18
+ parse(data: any, path: any, callback: any): void;
19
+ crossOrigin: string;
20
+ withCredentials: boolean;
21
+ path: string;
22
+ resourcePath: string;
23
+ manager: THREE.LoadingManager;
24
+ requestHeader: {
25
+ [header: string]: string;
26
+ };
27
+ loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<any>;
28
+ setCrossOrigin(crossOrigin: string): /*elided*/ any;
29
+ setWithCredentials(value: boolean): /*elided*/ any;
30
+ setPath(path: string): /*elided*/ any;
31
+ setResourcePath(resourcePath: string): /*elided*/ any;
32
+ setRequestHeader(requestHeader: {
33
+ [header: string]: string;
34
+ }): /*elided*/ any;
35
+ };
36
+ glTFLoader: GLTFLoader;
37
+ /**
38
+ * Loads a gltf model from url and call the callback function with the parsed response content.
39
+ * Adapted from threejs.
40
+ * @param {String} url - the path/URL of the .gltf or .glb file.
41
+ * @param {Function} onLoad - A function to be called after the loading is successfully completed. The function
42
+ * receives the loaded JSON response returned from {@link parse}.
43
+ * @param {Function} onProgress
44
+ * @param {Function} onError
45
+ */
46
+ load(url: string, onLoad: Function, onProgress: Function, onError: Function): void;
47
+ /**
48
+ * Sets the draco loader instance for this gltf parser. Enable loading files with
49
+ * [Draco](https://google.github.io/draco/) geometry extension. See Threejs
50
+ * [DracoLoader](https://threejs.org/docs/index.html#examples/en/loaders/DRACOLoader) for more information.
51
+ * Only works for GLTF 2.0 files.
52
+ * @param {THREE.DracoLoader} dracoLoader - the threejs DracoLoader instance.
53
+ */
54
+ setDRACOLoader(dracoLoader: THREE.DracoLoader): void;
55
+ /**
56
+ * Sets the KTX2 loader instance for this gltf parser. Enable loading files with
57
+ * [KTX2](https://www.khronos.org/ktx/) texture extension. See Threejs
58
+ * [KTX2Loader](https://threejs.org/docs/index.html?q=KTX2#examples/en/loaders/KTX2Loader) for more information.
59
+ * Only works for GLTF 2.0 files.
60
+ * @param {THREE.KTX2Loader} ktx2Loader - the threejs KTX2Loader instance.
61
+ */
62
+ setKTX2Loader(ktx2Loader: THREE.KTX2Loader): void;
63
+ /**
64
+ * Sets the Mesh Optimizer decoder instance for this gltf parser. Enable loading files with
65
+ * [MeshOptimizer](https://meshoptimizer.org/) geometry extension.
66
+ * Only works for GLTF 2.0 files.
67
+ * @param {Object} meshoptDecoder - the threejs meshopt decoder instance.
68
+ */
69
+ setMeshoptDecoder(meshoptDecoder: Object): void;
70
+ /**
71
+ * Registers a callback to load specific unknown or not standard GLTF extensions.
72
+ * See Threejs [GltfLoader](https://threejs.org/docs/?q=gltflo#examples/en/loaders/GLTFLoader) for more
73
+ * information.
74
+ * @param {Function} callback - the callback function
75
+ */
76
+ register(callback: Function): void;
77
+ /**
78
+ * Unregisters a load callback.
79
+ * See Threejs [GltfLoader](https://threejs.org/docs/?q=gltflo#examples/en/loaders/GLTFLoader) for more
80
+ * information.
81
+ * @param {Function} callback - the callback function
82
+ */
83
+ unregister(callback: Function): void;
84
+ /** Parse a glTF-based ArrayBuffer, JSON string or object and fire onLoad callback when complete.
85
+ * Calls Threejs [GLTFLoader.parse](https://threejs.org/docs/?q=gltflo#examples/en/loaders/GLTFLoader.parse) for
86
+ * glTF 2.0 files and LegacyGLTFLoader.parse for gtTF 1.0 files.
87
+ * @param {ArrayBuffer|String|Object} buffer - the glTF asset to parse, as an ArrayBuffer, JSON string or object.
88
+ * @param {String} path - the base path from which to find subsequent glTF resources such as textures and .bin data files.
89
+ * @param {Function} onLoad — A function to be called when parse completes. The argument to the onLoad function will
90
+ * be an Object that contains loaded parts: .scene, .scenes, .cameras, .animations, and .asset.
91
+ * @param {Function} [onError] — A function to be called if an error occurs during parsing. The function receives error as an argument.
92
+ */
93
+ parse(buffer: ArrayBuffer | string | Object, path: string, onLoad: Function, onError?: Function): void;
94
+ /**
95
+ * Async promise-based parsing of a glTF-based ArrayBuffer, JSON string or object.
96
+ * @param {ArrayBuffer|String|Object} data - the glTF asset to parse, as an ArrayBuffer, JSON string or object.
97
+ * @param {String} path - the base path from which to find subsequent glTF resources such as textures and .bin data files.
98
+ * @returns {Promise<Object>} A promise that resolves an Object that contains loaded parts:
99
+ * .scene, .scenes, .cameras, .animations, and .asset, when parsing is done.
100
+ */
101
+ parseAsync(data: ArrayBuffer | string | Object, path: string): Promise<Object>;
102
+ }
103
+ import * as THREE from 'three';
104
+ import { GLTFLoader } from '../ThreeExtended/loaders/GLTFLoader';
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Check if the node is visible in the camera.
3
+ *
4
+ * @param {C3DTilesLayer} layer node 3D tiles layer
5
+ * @param {Camera} camera camera
6
+ * @param {THREE.Object3D} node The 3d tile node to check.
7
+ * @param {THREE.Matrix4} tileMatrixWorld The node matrix world
8
+ * @return {boolean} return true if the node is visible
9
+ */
10
+ export function $3dTilesCulling(layer: C3DTilesLayer, camera: Camera, node: THREE.Object3D, tileMatrixWorld: THREE.Matrix4): boolean;
11
+ export function pre3dTilesUpdate(context: any): any[];
12
+ export class pre3dTilesUpdate {
13
+ constructor(context: any);
14
+ scale: any;
15
+ }
16
+ export function computeNodeSSE(camera: any, node: any): number;
17
+ export function init3dTilesLayer(view: any, scheduler: any, layer: any, rootTile: any): any;
18
+ /**
19
+ * This funcion builds the method to update 3d tiles node.
20
+ *
21
+ * The returned method checks the 3d tile visibility with `cullingTest` function.
22
+ * It subdivises visible node if `subdivisionTest` return `true`.
23
+ *
24
+ * @param {Function} [cullingTest=$3dTilesCulling] The culling test method.
25
+ * @param {Function} [subdivisionTest=$3dTilesSubdivisionControl] The subdivision test method.
26
+ * @return {Function} { description_of_the_return_value }
27
+ */
28
+ export function process3dTilesNode(cullingTest?: Function, subdivisionTest?: Function): Function;
29
+ /**
30
+ *
31
+ *
32
+ * the method returns true if the `node` should be subivised.
33
+ *
34
+ * @param {object} context The current context
35
+ * @param {Camera} context.camera The current camera
36
+ * @param {C3DTilesLayer} layer The 3d tile layer
37
+ * @param {THREE.Object3D} node The 3d tile node
38
+ * @return {boolean}
39
+ */
40
+ export function $3dTilesSubdivisionControl(context: {
41
+ camera: Camera;
42
+ }, layer: C3DTilesLayer, node: THREE.Object3D): boolean;
43
+ import * as THREE from 'three';
@@ -0,0 +1,4 @@
1
+ declare namespace _default {
2
+ function update(context: any, layer: any, node: any): any;
3
+ }
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export function updateLayeredMaterialNodeImagery(context: any, layer: any, node: any, parent: any): any;
2
+ export function updateLayeredMaterialNodeElevation(context: any, layer: any, node: any, parent: any): any;
3
+ export function removeLayeredMaterialNodeTile(tileId: any): (node: TileMesh) => void;
@@ -15,7 +15,7 @@ function refinementCommandCancellationFn(cmd) {
15
15
  // Cancel the command if the tile already has a better texture.
16
16
  // This is only needed for elevation layers, because we may have several
17
17
  // concurrent layers but we can only use one texture.
18
- if (cmd.layer.isElevationLayer && cmd.requester.material.getElevationLayer() && cmd.targetLevel <= cmd.requester.material.getElevationLayer().level) {
18
+ if (cmd.layer.isElevationLayer && cmd.requester.material.getElevationTile() && cmd.targetLevel <= cmd.requester.material.getElevationTile().level) {
19
19
  return true;
20
20
  }
21
21
 
@@ -50,7 +50,7 @@ export function updateLayeredMaterialNodeImagery(context, layer, node, parent) {
50
50
  if (zoom > layer.zoom.max || zoom < layer.zoom.min) {
51
51
  return;
52
52
  }
53
- let nodeLayer = material.getLayer(layer.id);
53
+ let nodeLayer = material.getTile(layer.id);
54
54
 
55
55
  // Initialisation
56
56
  if (node.layerUpdateState[layer.id] === undefined) {
@@ -59,7 +59,7 @@ export function updateLayeredMaterialNodeImagery(context, layer, node, parent) {
59
59
  // we also need to check that tile's parent doesn't have a texture for this layer,
60
60
  // because even if this tile is outside of the layer, it could inherit it's
61
61
  // parent texture
62
- if (!(!layer.noTextureParentOutsideLimit && parent.material && parent.material.getLayer && parent.material.getLayer(layer.id))) {
62
+ if (!(!layer.noTextureParentOutsideLimit && parent.material && parent.material.getTile && parent.material.getTile(layer.id))) {
63
63
  node.layerUpdateState[layer.id].noMoreUpdatePossible();
64
64
  return;
65
65
  } // ok, we're going to inherit our parent's texture
@@ -69,7 +69,7 @@ export function updateLayeredMaterialNodeImagery(context, layer, node, parent) {
69
69
  nodeLayer = layer.setupRasterNode(node);
70
70
 
71
71
  // Init the node by parent
72
- const parentLayer = parent.material?.getLayer(layer.id);
72
+ const parentLayer = parent.material?.getTile(layer.id);
73
73
  nodeLayer.initFromParent(parentLayer, extentsDestination);
74
74
  }
75
75
 
@@ -157,13 +157,13 @@ export function updateLayeredMaterialNodeElevation(context, layer, node, parent)
157
157
  return;
158
158
  }
159
159
  // Init elevation layer, and inherit from parent if possible
160
- let nodeLayer = material.getElevationLayer();
160
+ let nodeLayer = material.getElevationTile();
161
161
  if (!nodeLayer) {
162
162
  nodeLayer = layer.setupRasterNode(node);
163
163
  }
164
164
  if (node.layerUpdateState[layer.id] === undefined) {
165
165
  node.layerUpdateState[layer.id] = new LayerUpdateState();
166
- const parentLayer = parent.material?.getLayer(layer.id);
166
+ const parentLayer = parent.material?.getTile(layer.id);
167
167
  nodeLayer.initFromParent(parentLayer, extentsDestination);
168
168
  if (nodeLayer.level >= layer.source.zoom.min) {
169
169
  context.view.notifyChange(node, false);
@@ -208,22 +208,22 @@ export function updateLayeredMaterialNodeElevation(context, layer, node, parent)
208
208
  node.layerUpdateState[layer.id].success();
209
209
  }, err => handlingError(err, node, layer, targetLevel, context.view));
210
210
  }
211
- export function removeLayeredMaterialNodeLayer(layerId) {
211
+ export function removeLayeredMaterialNodeTile(tileId) {
212
212
  /**
213
213
  * @param {TileMesh} node - The node to udpate.
214
214
  */
215
215
  return function (node) {
216
- if (node.material?.removeLayer) {
217
- if (node.material.elevationLayerIds.indexOf(layerId) > -1) {
216
+ if (node.material?.removeTile) {
217
+ if (node.material.elevationTile !== undefined) {
218
218
  node.setBBoxZ({
219
219
  min: 0,
220
220
  max: 0
221
221
  });
222
222
  }
223
- node.material.removeLayer(layerId);
223
+ node.material.removeTile(tileId);
224
224
  }
225
- if (node.layerUpdateState && node.layerUpdateState[layerId]) {
226
- delete node.layerUpdateState[layerId];
225
+ if (node.layerUpdateState && node.layerUpdateState[tileId]) {
226
+ delete node.layerUpdateState[tileId];
227
227
  }
228
228
  };
229
229
  }