itowns 2.45.1 → 2.45.2-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.
- package/dist/455.js +1 -1
- package/dist/455.js.map +1 -1
- package/dist/debug.js +1 -1
- package/dist/debug.js.LICENSE.txt +8 -2
- package/dist/debug.js.map +1 -1
- package/dist/itowns.js +1 -1
- package/dist/itowns.js.LICENSE.txt +1 -1
- package/dist/itowns.js.map +1 -1
- package/dist/itowns_lasparser.js +1 -1
- package/dist/itowns_lasparser.js.map +1 -1
- package/dist/itowns_lasworker.js +1 -1
- package/dist/itowns_lasworker.js.map +1 -1
- package/dist/itowns_potree2worker.js +1 -1
- package/dist/itowns_potree2worker.js.map +1 -1
- package/dist/itowns_widgets.js +1 -1
- package/dist/itowns_widgets.js.map +1 -1
- package/examples/copc_simple_loader.html +3 -3
- package/examples/entwine_3d_loader.html +2 -2
- package/examples/entwine_simple_loader.html +10 -6
- package/examples/potree2_25d_map.html +2 -2
- package/examples/potree_25d_map.html +2 -2
- package/examples/potree_3d_map.html +2 -2
- package/examples/view_3d_map_webxr.html +2 -5
- package/lib/Controls/FirstPersonControls.d.ts +90 -0
- package/lib/Controls/FlyControls.d.ts +36 -0
- package/lib/Controls/GlobeControls.d.ts +274 -0
- package/lib/Controls/PlanarControls.d.ts +339 -0
- package/lib/Controls/StateControl.d.ts +140 -0
- package/lib/Controls/StreetControls.d.ts +134 -0
- package/lib/Controls/VRControls.d.ts +56 -0
- package/lib/Controls/VRControls.js +409 -0
- package/lib/Converter/Feature2Mesh.d.ts +42 -0
- package/lib/Converter/Feature2Texture.d.ts +5 -0
- package/lib/Converter/convertToTile.d.ts +5 -0
- package/lib/Converter/convertToTile.js +2 -2
- package/lib/Converter/textureConverter.d.ts +4 -0
- package/lib/Core/3DTiles/C3DTBatchTable.d.ts +49 -0
- package/lib/Core/3DTiles/C3DTBatchTableHierarchyExtension.d.ts +37 -0
- package/lib/Core/3DTiles/C3DTBoundingVolume.d.ts +39 -0
- package/lib/Core/3DTiles/C3DTExtensions.d.ts +75 -0
- package/lib/Core/3DTiles/C3DTFeature.d.ts +47 -0
- package/lib/Core/3DTiles/C3DTilesEnums.d.ts +14 -0
- package/lib/Core/3DTiles/C3DTileset.d.ts +46 -0
- package/lib/Core/3DTiles/utils/BinaryPropertyAccessor.d.ts +14 -0
- package/lib/Core/AnimationPlayer.d.ts +53 -0
- package/lib/Core/CopcNode.d.ts +68 -0
- package/lib/Core/CopcNode.js +57 -74
- package/lib/Core/Deprecated/Undeprecator.d.ts +6 -0
- package/lib/Core/EntwinePointTileNode.d.ts +59 -0
- package/lib/Core/EntwinePointTileNode.js +16 -41
- package/lib/Core/Feature.d.ts +323 -0
- package/lib/Core/Geographic/GeoidGrid.d.ts +86 -0
- package/lib/Core/Label.d.ts +86 -0
- package/lib/Core/MainLoop.d.ts +23 -0
- package/lib/Core/Picking.d.ts +6 -0
- package/lib/Core/Picking.js +4 -0
- package/lib/Core/PointCloudNode.d.ts +16 -0
- package/lib/Core/PointCloudNode.js +34 -4
- package/lib/Core/Potree2Node.d.ts +11 -0
- package/lib/Core/Potree2Node.js +5 -60
- package/lib/Core/Potree2PointAttributes.d.ts +97 -0
- package/lib/Core/PotreeNode.d.ts +14 -0
- package/lib/Core/PotreeNode.js +28 -18
- package/lib/Core/Prefab/Globe/Atmosphere.d.ts +66 -0
- package/lib/Core/Prefab/Globe/Atmosphere.js +10 -5
- package/lib/Core/Prefab/Globe/GlobeLayer.d.ts +48 -0
- package/lib/Core/Prefab/Globe/GlobeTileBuilder.d.ts +38 -0
- package/lib/Core/Prefab/Globe/SkyShader.d.ts +5 -0
- package/lib/Core/Prefab/Globe/SkyShader.js +3 -3
- package/lib/Core/Prefab/GlobeView.d.ts +65 -0
- package/lib/Core/Prefab/GlobeView.js +9 -0
- package/lib/Core/Prefab/Planar/PlanarLayer.d.ts +38 -0
- package/lib/Core/Prefab/Planar/PlanarTileBuilder.d.ts +32 -0
- package/lib/Core/Prefab/PlanarView.d.ts +33 -0
- package/lib/Core/Prefab/TileBuilder.d.ts +63 -0
- package/lib/Core/Prefab/computeBufferTileGeometry.d.ts +17 -0
- package/lib/Core/Scheduler/Cache.d.ts +25 -0
- package/lib/Core/Scheduler/CancelledCommandException.d.ts +12 -0
- package/lib/Core/Scheduler/Scheduler.d.ts +106 -0
- package/lib/Core/Style.d.ts +248 -0
- package/lib/Core/StyleOptions.d.ts +455 -0
- package/lib/Core/System/Capabilities.d.ts +9 -0
- package/lib/Core/Tile/Tile.d.ts +70 -0
- package/lib/Core/Tile/TileGrid.d.ts +12 -0
- package/lib/Core/TileGeometry.d.ts +46 -0
- package/lib/Core/TileMesh.d.ts +50 -0
- package/lib/Core/TileMesh.js +2 -4
- package/lib/Core/View.d.ts +403 -0
- package/lib/Core/View.js +1 -7
- package/lib/Layer/C3DTilesLayer.d.ts +140 -0
- package/lib/Layer/ColorLayer.d.ts +128 -0
- package/lib/Layer/ColorLayer.js +4 -4
- package/lib/Layer/CopcLayer.d.ts +42 -0
- package/lib/Layer/CopcLayer.js +3 -6
- package/lib/Layer/ElevationLayer.d.ts +96 -0
- package/lib/Layer/ElevationLayer.js +3 -3
- package/lib/Layer/EntwinePointTileLayer.d.ts +56 -0
- package/lib/Layer/EntwinePointTileLayer.js +4 -3
- package/lib/Layer/FeatureGeometryLayer.d.ts +62 -0
- package/lib/Layer/GeoidLayer.d.ts +41 -0
- package/lib/Layer/GeometryLayer.d.ts +120 -0
- package/lib/Layer/InfoLayer.d.ts +24 -0
- package/lib/Layer/InfoLayer.js +1 -1
- package/lib/Layer/LabelLayer.d.ts +93 -0
- package/lib/Layer/LabelLayer.js +2 -2
- package/lib/Layer/Layer.d.ts +185 -0
- package/lib/Layer/LayerUpdateState.d.ts +24 -0
- package/lib/Layer/LayerUpdateStrategy.d.ts +11 -0
- package/lib/Layer/LayerUpdateStrategy.js +2 -7
- package/lib/Layer/OGC3DTilesLayer.d.ts +277 -0
- package/lib/Layer/OGC3DTilesLayer.js +21 -0
- package/lib/Layer/OrientedImageLayer.d.ts +53 -0
- package/lib/Layer/PointCloudLayer.d.ts +103 -0
- package/lib/Layer/PointCloudLayer.js +8 -11
- package/lib/Layer/Potree2Layer.d.ts +56 -0
- package/lib/Layer/Potree2Layer.js +0 -2
- package/lib/Layer/PotreeLayer.d.ts +55 -0
- package/lib/Layer/RasterLayer.d.ts +8 -0
- package/lib/Layer/RasterLayer.js +2 -2
- package/lib/Layer/ReferencingLayerProperties.d.ts +2 -0
- package/lib/Layer/ReferencingLayerProperties.js +0 -12
- package/lib/Layer/TiledGeometryLayer.d.ts +192 -0
- package/lib/Layer/TiledGeometryLayer.js +4 -3
- package/lib/Main.d.ts +89 -0
- package/lib/Main.js +3 -1
- package/lib/Parser/B3dmParser.d.ts +26 -0
- package/lib/Parser/CameraCalibrationParser.d.ts +32 -0
- package/lib/Parser/GDFParser.d.ts +24 -0
- package/lib/Parser/GTXParser.d.ts +28 -0
- package/lib/Parser/GeoJsonParser.d.ts +12 -0
- package/lib/Parser/GpxParser.d.ts +12 -0
- package/lib/Parser/ISGParser.d.ts +23 -0
- package/lib/Parser/KMLParser.d.ts +12 -0
- package/lib/Parser/LASParser.d.ts +61 -0
- package/lib/Parser/MapBoxUrlParser.d.ts +9 -0
- package/lib/Parser/PntsParser.d.ts +4 -0
- package/lib/Parser/Potree2BinParser.d.ts +8 -0
- package/lib/Parser/PotreeBinParser.d.ts +4 -0
- package/lib/Parser/PotreeCinParser.d.ts +4 -0
- package/lib/Parser/ShapefileParser.d.ts +25 -0
- package/lib/Parser/VectorTileParser.d.ts +34 -0
- package/lib/Parser/XbilParser.d.ts +18 -0
- package/lib/Parser/deprecated/LegacyGLTFLoader.d.ts +32 -0
- package/lib/Parser/iGLTFLoader.d.ts +104 -0
- package/lib/Process/3dTilesProcessing.d.ts +43 -0
- package/lib/Process/FeatureProcessing.d.ts +4 -0
- package/lib/Process/LayeredMaterialNodeProcessing.d.ts +3 -0
- package/lib/Process/LayeredMaterialNodeProcessing.js +12 -12
- package/lib/Process/ObjectRemovalHelper.d.ts +32 -0
- package/lib/Process/handlerNodeError.d.ts +1 -0
- package/lib/Provider/3dTilesProvider.d.ts +7 -0
- package/lib/Provider/DataSourceProvider.d.ts +4 -0
- package/lib/Provider/Fetcher.d.ts +101 -0
- package/lib/Provider/PointCloudProvider.d.ts +4 -0
- package/lib/Provider/TileProvider.d.ts +4 -0
- package/lib/Provider/URLBuilder.d.ts +28 -0
- package/lib/Renderer/Camera.d.ts +95 -0
- package/lib/Renderer/Color.d.ts +3 -0
- package/lib/Renderer/ColorLayersOrdering.d.ts +38 -0
- package/lib/Renderer/ColorLayersOrdering.js +2 -2
- package/lib/Renderer/CommonMaterial.d.ts +6 -0
- package/lib/Renderer/Label2DRenderer.d.ts +31 -0
- package/lib/Renderer/LayeredMaterial.d.ts +121 -0
- package/lib/Renderer/LayeredMaterial.js +221 -141
- package/lib/Renderer/OBB.d.ts +65 -0
- package/lib/Renderer/OrientedImageCamera.d.ts +36 -0
- package/lib/Renderer/OrientedImageMaterial.d.ts +68 -0
- package/lib/Renderer/PointsMaterial.d.ts +226 -0
- package/lib/Renderer/PointsMaterial.js +60 -22
- package/lib/Renderer/RasterTile.d.ts +53 -0
- package/lib/Renderer/RasterTile.js +8 -9
- package/lib/Renderer/RenderMode.d.ts +11 -0
- package/lib/Renderer/RenderMode.js +1 -0
- package/lib/Renderer/Shader/ShaderChunk.d.ts +78 -0
- package/lib/Renderer/Shader/ShaderUtils.d.ts +5 -0
- package/lib/Renderer/WebXR.d.ts +33 -0
- package/lib/Renderer/WebXR.js +128 -47
- package/lib/Renderer/c3DEngine.d.ts +55 -0
- package/lib/Renderer/c3DEngine.js +5 -1
- package/lib/Source/C3DTilesGoogleSource.d.ts +38 -0
- package/lib/Source/C3DTilesIonSource.d.ts +31 -0
- package/lib/Source/C3DTilesSource.d.ts +17 -0
- package/lib/Source/CopcSource.d.ts +79 -0
- package/lib/Source/EntwinePointTileSource.d.ts +40 -0
- package/lib/Source/EntwinePointTileSource.js +0 -5
- package/lib/Source/FileSource.d.ts +118 -0
- package/lib/Source/OGC3DTilesGoogleSource.d.ts +24 -0
- package/lib/Source/OGC3DTilesIonSource.d.ts +26 -0
- package/lib/Source/OGC3DTilesSource.d.ts +21 -0
- package/lib/Source/OrientedImageSource.d.ts +48 -0
- package/lib/Source/Potree2Source.d.ts +157 -0
- package/lib/Source/PotreeSource.d.ts +69 -0
- package/lib/Source/Source.d.ts +122 -0
- package/lib/Source/TMSSource.d.ts +77 -0
- package/lib/Source/VectorTilesSource.d.ts +56 -0
- package/lib/Source/WFSSource.d.ts +110 -0
- package/lib/Source/WMSSource.d.ts +85 -0
- package/lib/Source/WMTSSource.d.ts +65 -0
- package/lib/ThreeExtended/capabilities/WebGL.d.ts +9 -0
- package/lib/ThreeExtended/libs/ktx-parse.module.d.ts +274 -0
- package/lib/ThreeExtended/libs/motion-controllers.module.d.ts +64 -0
- package/lib/ThreeExtended/libs/motion-controllers.module.js +375 -0
- package/lib/ThreeExtended/libs/zstddec.module.d.ts +6 -0
- package/lib/ThreeExtended/loaders/DDSLoader.js +40 -1
- package/lib/ThreeExtended/loaders/DRACOLoader.d.ts +41 -0
- package/lib/ThreeExtended/loaders/GLTFLoader.d.ts +16 -0
- package/lib/ThreeExtended/loaders/GLTFLoader.js +22 -3
- package/lib/ThreeExtended/loaders/KTX2Loader.d.ts +116 -0
- package/lib/ThreeExtended/loaders/KTX2Loader.js +9 -2
- package/lib/ThreeExtended/math/ColorSpaces.d.ts +56 -0
- package/lib/ThreeExtended/utils/BufferGeometryUtils.d.ts +62 -0
- package/lib/ThreeExtended/utils/BufferGeometryUtils.js +2 -2
- package/lib/ThreeExtended/utils/WorkerPool.d.ts +19 -0
- package/lib/ThreeExtended/webxr/XRControllerModelFactory.d.ts +25 -0
- package/lib/ThreeExtended/webxr/XRControllerModelFactory.js +209 -0
- package/lib/Utils/CameraUtils.d.ts +132 -0
- package/lib/Utils/DEMUtils.d.ts +84 -0
- package/lib/Utils/DEMUtils.js +2 -2
- package/lib/Utils/FeaturesUtils.d.ts +17 -0
- package/lib/Utils/Gradients.d.ts +13 -0
- package/lib/Utils/ThreeUtils.d.ts +14 -0
- package/lib/Utils/placeObjectOnGround.d.ts +28 -0
- package/lib/global.d.js +0 -0
- package/package.json +18 -15
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export function readTextureValueWithBilinearFiltering(metadata: any, texture: any, vertexU: any, vertexV: any): any;
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
/**
|
|
4
|
+
* Gives the elevation value of a {@link TiledGeometryLayer}, at a specific
|
|
5
|
+
* {@link Coordinates}.
|
|
6
|
+
*
|
|
7
|
+
* @param {TiledGeometryLayer} layer - The tile layer owning the elevation
|
|
8
|
+
* textures we're going to query. This is typically a `GlobeLayer` or
|
|
9
|
+
* `PlanarLayer` (accessible through `view.tileLayer`).
|
|
10
|
+
* @param {Coordinates} coord - The coordinates that we're interested in.
|
|
11
|
+
* @param {number} [method=FAST_READ_Z] - There are two available methods:
|
|
12
|
+
* `FAST_READ_Z` (default) or `PRECISE_READ_Z`. The first one is faster,
|
|
13
|
+
* while the second one is slower but gives better precision.
|
|
14
|
+
* @param {TileMesh[]} [tileHint] - Optional array of tiles to speed up the
|
|
15
|
+
* process. You can give candidates tiles likely to contain `coord`.
|
|
16
|
+
* Otherwise the lookup process starts from the root of `layer`.
|
|
17
|
+
*
|
|
18
|
+
* @return {number} If found, a value in meters is returned; otherwise
|
|
19
|
+
* `undefined`.
|
|
20
|
+
*/
|
|
21
|
+
export function getElevationValueAt(layer: TiledGeometryLayer, coord: Coordinates, method?: number, tileHint?: TileMesh[]): number;
|
|
22
|
+
/**
|
|
23
|
+
* @typedef Terrain
|
|
24
|
+
* @type {Object}
|
|
25
|
+
*
|
|
26
|
+
* @property {Coordinates} coord - Pick coordinate with the elevation in coord.z.
|
|
27
|
+
* @property {THREE.Texture} texture - the picked elevation texture.
|
|
28
|
+
* The texture where the `z` value has been read from
|
|
29
|
+
* @property {TileMesh} tile - the picked tile and the tile containing the texture
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Gives a {@link Terrain} object, at a specific {@link Coordinates}. The returned
|
|
33
|
+
* object is as follow:
|
|
34
|
+
* - `coord`, Coordinate, coord.z is the value in meters of the elevation at the coordinates
|
|
35
|
+
* - `texture`, the texture where the `z` value has been read from
|
|
36
|
+
* - `tile`, the tile containing the texture
|
|
37
|
+
* @example
|
|
38
|
+
* // place mesh on the ground
|
|
39
|
+
* const coord = new Coordinates('EPSG:4326', 6, 45);
|
|
40
|
+
* const result = DEMUtils.getTerrainObjectAt(view.tileLayer, coord)
|
|
41
|
+
* mesh.position.copy(result.coord.as(view.referenceCrs));
|
|
42
|
+
* view.scene.add(mesh);
|
|
43
|
+
* mesh.updateMatrixWorld();
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
* @param {TiledGeometryLayer} layer - The tile layer owning the elevation
|
|
47
|
+
* textures we're going to query. This is typically a `GlobeLayer` or
|
|
48
|
+
* `PlanarLayer` (accessible through `view.tileLayer`).
|
|
49
|
+
* @param {Coordinates} coord - The coordinates that we're interested in.
|
|
50
|
+
* @param {number} [method=FAST_READ_Z] - There are two available methods:
|
|
51
|
+
* `FAST_READ_Z` (default) or `PRECISE_READ_Z`. The first one is faster,
|
|
52
|
+
* while the second one is slower but gives better precision.
|
|
53
|
+
* @param {TileMesh[]} [tileHint] - Optional array of tiles to speed up the
|
|
54
|
+
* process. You can give candidates tiles likely to contain `coord`.
|
|
55
|
+
* Otherwise the lookup process starts from the root of `layer`.
|
|
56
|
+
* @param {Object} [cache] - Object to cache previous result and speed up the next `getTerrainObjectAt`` use.
|
|
57
|
+
*
|
|
58
|
+
* @return {Terrain} - The {@link Terrain} object.
|
|
59
|
+
*/
|
|
60
|
+
export function getTerrainObjectAt(layer: TiledGeometryLayer, coord: Coordinates, method?: number, tileHint?: TileMesh[], cache?: Object): {
|
|
61
|
+
/**
|
|
62
|
+
* - Pick coordinate with the elevation in coord.z.
|
|
63
|
+
*/
|
|
64
|
+
coord: Coordinates;
|
|
65
|
+
/**
|
|
66
|
+
* - the picked elevation texture.
|
|
67
|
+
* The texture where the `z` value has been read from
|
|
68
|
+
*/
|
|
69
|
+
texture: THREE.Texture;
|
|
70
|
+
/**
|
|
71
|
+
* - the picked tile and the tile containing the texture
|
|
72
|
+
*/
|
|
73
|
+
tile: TileMesh;
|
|
74
|
+
};
|
|
75
|
+
export { FAST_READ_Z };
|
|
76
|
+
export { PRECISE_READ_Z };
|
|
77
|
+
export { placeObjectOnGround };
|
|
78
|
+
}
|
|
79
|
+
export default _default;
|
|
80
|
+
import { Coordinates } from '@itowns/geographic';
|
|
81
|
+
import * as THREE from 'three';
|
|
82
|
+
declare const FAST_READ_Z: 0;
|
|
83
|
+
declare const PRECISE_READ_Z: 1;
|
|
84
|
+
import placeObjectOnGround from '../Utils/placeObjectOnGround';
|
package/lib/Utils/DEMUtils.js
CHANGED
|
@@ -98,7 +98,7 @@ function tileAt(pt, tile) {
|
|
|
98
98
|
return t;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
const tileLayer = tile.material.
|
|
101
|
+
const tileLayer = tile.material.getElevationTile();
|
|
102
102
|
if (tileLayer && tileLayer.level >= 0) {
|
|
103
103
|
return tile;
|
|
104
104
|
}
|
|
@@ -302,7 +302,7 @@ function _readZ(layer, method, coord, nodes, cache) {
|
|
|
302
302
|
return;
|
|
303
303
|
}
|
|
304
304
|
const tile = tileWithValidElevationTexture;
|
|
305
|
-
const tileLayer = tile.material.
|
|
305
|
+
const tileLayer = tile.material.getElevationTile();
|
|
306
306
|
const src = tileLayer.textures[0];
|
|
307
307
|
|
|
308
308
|
// check cache value if existing
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
/**
|
|
3
|
+
* Filter from a list of features, features that are under a coordinate.
|
|
4
|
+
*
|
|
5
|
+
* @param {Coordinates} coordinate - The coordinate for the filter
|
|
6
|
+
* condition.
|
|
7
|
+
* @param {Feature|FeatureCollection} collection - A single feature or a
|
|
8
|
+
* collection of them, to filter given the previous coordinate.
|
|
9
|
+
* @param {number} [epsilon=0.1] Tolerance around the coordinate (in
|
|
10
|
+
* coordinate's unit).
|
|
11
|
+
*
|
|
12
|
+
* @return {Feature[]} Array of filtered features.
|
|
13
|
+
*/
|
|
14
|
+
function filterFeaturesUnderCoordinate(coordinate: Coordinates, collection: Feature | FeatureCollection, epsilon?: number): Feature[];
|
|
15
|
+
}
|
|
16
|
+
export default _default;
|
|
17
|
+
import { Coordinates } from '@itowns/geographic';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let SPECTRAL: (number | THREE.Color)[][];
|
|
3
|
+
let PLASMA: (number | THREE.Color)[][];
|
|
4
|
+
let YELLOW_GREEN: (number | THREE.Color)[][];
|
|
5
|
+
let VIRIDIS: (number | THREE.Color)[][];
|
|
6
|
+
let INFERNO: (number | THREE.Color)[][];
|
|
7
|
+
let GRAYSCALE: (number | THREE.Color)[][];
|
|
8
|
+
let TURBO: (number | THREE.Color)[][];
|
|
9
|
+
let RAINBOW: (number | THREE.Color)[][];
|
|
10
|
+
let CONTOUR: (number | THREE.Color)[][];
|
|
11
|
+
}
|
|
12
|
+
export default _default;
|
|
13
|
+
import * as THREE from 'three';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes a material and its textures, memory will be freed.
|
|
3
|
+
* IMPORTANT NOTE: the material and the texture must not be referenced by other threejs objects, otherwise the memory
|
|
4
|
+
* won't be freed.
|
|
5
|
+
* @param {Material} material the material to remove
|
|
6
|
+
*/
|
|
7
|
+
export default function disposeThreeMaterial(material: Material): void;
|
|
8
|
+
/**
|
|
9
|
+
* Merge groups of an object3D when it can to reduce number of them + remove unused materials
|
|
10
|
+
* Reduce draw call https://threejs.org/docs/index.html?q=geometry#api/en/core/BufferGeometry.groups
|
|
11
|
+
*
|
|
12
|
+
* @param {THREE.Object3D} object3D - object to get optimize
|
|
13
|
+
*/
|
|
14
|
+
export function optimizeGeometryGroups(object3D: THREE.Object3D): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default placeObjectOnGround;
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated
|
|
4
|
+
* Helper method that will position an object directly on the ground.
|
|
5
|
+
*
|
|
6
|
+
* @param {TiledGeometryLayer} layer - The tile layer owning the elevation
|
|
7
|
+
* textures we're going to query. This is typically a `GlobeLayer` or
|
|
8
|
+
* `PlanarLayer` (accessible through `view.tileLayer`).
|
|
9
|
+
* @param {string} crs - The CRS used by the object coordinates. You
|
|
10
|
+
* probably want to use `view.referenceCRS` here.
|
|
11
|
+
* @param {Object3D} obj - the object we want to modify.
|
|
12
|
+
* @param {Object} options
|
|
13
|
+
* @param {number} [options.method=FAST_READ_Z] - There are two available methods:
|
|
14
|
+
* `FAST_READ_Z` (default) or `PRECISE_READ_Z`. The first one is faster,
|
|
15
|
+
* while the second one is slower but gives better precision.
|
|
16
|
+
* @param {boolean} options.modifyGeometry - if unset/false, this function
|
|
17
|
+
* will modify object.position. If true, it will modify
|
|
18
|
+
* `obj.geometry.vertices` or `obj.geometry.attributes.position`.
|
|
19
|
+
* @param {TileMesh[]} [tileHint] - Optional array of tiles to speed up the
|
|
20
|
+
* process. You can give candidates tiles likely to contain `coord`.
|
|
21
|
+
* Otherwise the lookup process starts from the root of `layer`.
|
|
22
|
+
*
|
|
23
|
+
* @return {boolean} true if successful, false if we couldn't lookup the elevation at the given coords
|
|
24
|
+
*/
|
|
25
|
+
declare function placeObjectOnGround(layer: TiledGeometryLayer, crs: string, obj: Object3D, options?: {
|
|
26
|
+
method?: number | undefined;
|
|
27
|
+
modifyGeometry: boolean;
|
|
28
|
+
}, tileHint?: TileMesh[]): boolean;
|
package/lib/global.d.js
ADDED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itowns",
|
|
3
|
-
"version": "2.45.1",
|
|
3
|
+
"version": "2.45.2-next.1",
|
|
4
4
|
"description": "A JS/WebGL framework for 3D geospatial data visualization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/Main.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./lib/Main.d.ts",
|
|
10
|
+
"default": "./lib/Main.js"
|
|
11
|
+
},
|
|
9
12
|
"./widgets": "./lib/Utils/gui/Main.js"
|
|
10
13
|
},
|
|
11
14
|
"scripts": {
|
|
12
15
|
"lint": "eslint \"src/**/*.{js,ts,tsx}\" \"test/**/*.js\"",
|
|
13
|
-
"
|
|
16
|
+
"types": "tsc && tsc-alias",
|
|
17
|
+
"transpile": "npm run types && cross-env BABEL_DISABLE_CACHE=1 babel src --out-dir lib --extensions .js,.ts",
|
|
14
18
|
"test-unit": "npm run base-test-unit test/unit",
|
|
15
19
|
"base-test-unit": "cross-env BABEL_DISABLE_CACHE=1 mocha --timeout 5000 --file test/unit/bootstrap.js --import=../../config/babel-register/register.mjs",
|
|
16
20
|
"test-with-coverage": "c8 -n src -r html cross-env npm run test-unit",
|
|
@@ -19,9 +23,8 @@
|
|
|
19
23
|
"prepublishOnly": "npx copyfiles -u 1 \"../../examples/**/*\" ./examples/ && npx copyfiles -u 1 \"../../docs/**/*\" ./docs/ && npx copyfiles -u 1 \"../../dist/**/*\" ./dist/ ",
|
|
20
24
|
"postpublish": "node clean.cjs",
|
|
21
25
|
"publish-latest": "npm publish --access public --tag=latest --provenance",
|
|
22
|
-
"prerelease-next": "npm version prerelease --preid next",
|
|
23
26
|
"publish-next": "npm publish --access public --tag=next --provenance",
|
|
24
|
-
"
|
|
27
|
+
"version": "cross-env-shell npm install @itowns/geographic@$npm_package_version && node scripts/version.mjs"
|
|
25
28
|
},
|
|
26
29
|
"c8": {
|
|
27
30
|
"exclude": [
|
|
@@ -48,27 +51,27 @@
|
|
|
48
51
|
"url": "https://github.com/iTowns/itowns/issues"
|
|
49
52
|
},
|
|
50
53
|
"dependencies": {
|
|
51
|
-
"@itowns/geographic": "^2.45.1",
|
|
54
|
+
"@itowns/geographic": "^2.45.2-next.1",
|
|
52
55
|
"@mapbox/vector-tile": "^2.0.3",
|
|
53
|
-
"@maplibre/maplibre-gl-style-spec": "^
|
|
54
|
-
"@tmcw/togeojson": "^
|
|
56
|
+
"@maplibre/maplibre-gl-style-spec": "^23.1.0",
|
|
57
|
+
"@tmcw/togeojson": "^7.0.0",
|
|
55
58
|
"@tweenjs/tween.js": "^25.0.0",
|
|
56
|
-
"3d-tiles-renderer": "^0.4.
|
|
59
|
+
"3d-tiles-renderer": "^0.4.7",
|
|
57
60
|
"brotli-compress": "^1.3.3",
|
|
58
|
-
"copc": "^0.0.
|
|
59
|
-
"earcut": "^3.0.
|
|
61
|
+
"copc": "^0.0.8",
|
|
62
|
+
"earcut": "^3.0.1",
|
|
60
63
|
"js-priority-queue": "^0.1.5",
|
|
61
|
-
"lru-cache": "^11.0.
|
|
64
|
+
"lru-cache": "^11.0.2",
|
|
62
65
|
"pbf": "^4.0.1",
|
|
63
66
|
"shpjs": "^6.1.0",
|
|
64
67
|
"threads": "^1.7.0"
|
|
65
68
|
},
|
|
66
69
|
"peerDependencies": {
|
|
67
|
-
"proj4": "^2.
|
|
68
|
-
"three": "^0.
|
|
70
|
+
"proj4": "^2.19.3",
|
|
71
|
+
"three": "^0.174.0"
|
|
69
72
|
},
|
|
70
73
|
"devDependencies": {
|
|
71
|
-
"chalk": "^5.
|
|
74
|
+
"chalk": "^5.4.1",
|
|
72
75
|
"copyfiles": "^2.4.1"
|
|
73
76
|
},
|
|
74
77
|
"homepage": "https://itowns.github.io/"
|