itowns 2.42.1-next.8 → 2.43.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.
- package/changelog.md +90 -0
- package/dist/debug.js +1 -1
- package/dist/debug.js.map +1 -1
- package/dist/itowns.js +1 -1
- package/dist/itowns.js.map +1 -1
- package/dist/itowns_widgets.js +1 -1
- package/dist/itowns_widgets.js.map +1 -1
- package/examples/{.eslintrc.js → .eslintrc.cjs} +1 -1
- package/examples/effects_stereo.html +2 -2
- package/examples/misc_collada.html +2 -2
- package/examples/source_stream_wfs_25d.html +11 -11
- package/examples/source_stream_wfs_3d.html +1 -1
- package/examples/view_25d_map.html +2 -2
- package/examples/view_3d_map.html +2 -2
- package/examples/view_3d_map_webxr.html +1 -1
- package/examples/view_3d_mns_map.html +2 -2
- package/examples/view_immersive.html +1 -1
- package/examples/view_multi_25d.html +2 -2
- package/examples/widgets_searchbar.html +2 -2
- package/lib/Controls/FirstPersonControls.js +5 -12
- package/lib/Controls/FlyControls.js +4 -13
- package/lib/Controls/GlobeControls.js +33 -43
- package/lib/Controls/PlanarControls.js +9 -20
- package/lib/Controls/StateControl.js +2 -11
- package/lib/Controls/StreetControls.js +14 -24
- package/lib/Converter/Feature2Mesh.js +28 -38
- package/lib/Converter/Feature2Texture.js +15 -25
- package/lib/Converter/convertToTile.js +16 -26
- package/lib/Converter/textureConverter.js +9 -19
- package/lib/Core/3DTiles/C3DTBatchTable.js +5 -13
- package/lib/Core/3DTiles/C3DTBatchTableHierarchyExtension.js +1 -8
- package/lib/Core/3DTiles/C3DTBoundingVolume.js +17 -27
- package/lib/Core/3DTiles/C3DTExtensions.js +1 -8
- package/lib/Core/3DTiles/C3DTFeature.js +3 -10
- package/lib/Core/3DTiles/C3DTilesEnums.js +3 -11
- package/lib/Core/3DTiles/C3DTileset.js +7 -16
- package/lib/Core/3DTiles/utils/BinaryPropertyAccessor.js +5 -11
- package/lib/Core/AnimationPlayer.js +2 -11
- package/lib/Core/Deprecated/Undeprecator.js +9 -20
- package/lib/Core/EntwinePointTileNode.js +6 -16
- package/lib/Core/Feature.js +16 -30
- package/lib/Core/Geographic/CoordStars.js +3 -12
- package/lib/Core/Geographic/Coordinates.js +12 -22
- package/lib/Core/Geographic/Crs.js +7 -15
- package/lib/Core/Geographic/Extent.js +36 -47
- package/lib/Core/Geographic/GeoidGrid.js +6 -16
- package/lib/Core/Label.js +7 -17
- package/lib/Core/MainLoop.js +7 -16
- package/lib/Core/Math/Ellipsoid.js +6 -17
- package/lib/Core/Picking.js +10 -20
- package/lib/Core/PointCloudNode.js +2 -11
- package/lib/Core/PotreeNode.js +4 -13
- package/lib/Core/Prefab/Globe/Atmosphere.js +17 -26
- package/lib/Core/Prefab/Globe/BuilderEllipsoidTile.js +6 -16
- package/lib/Core/Prefab/Globe/GlobeLayer.js +19 -28
- package/lib/Core/Prefab/Globe/SkyShader.js +2 -11
- package/lib/Core/Prefab/GlobeView.js +27 -45
- package/lib/Core/Prefab/Planar/PlanarLayer.js +11 -20
- package/lib/Core/Prefab/Planar/PlanarTileBuilder.js +6 -16
- package/lib/Core/Prefab/PlanarView.js +10 -25
- package/lib/Core/Prefab/TileBuilder.js +13 -22
- package/lib/Core/Prefab/computeBufferTileGeometry.js +12 -16
- package/lib/Core/Scheduler/Cache.js +2 -10
- package/lib/Core/Scheduler/CancelledCommandException.js +1 -8
- package/lib/Core/Scheduler/Scheduler.js +15 -23
- package/lib/Core/Style.js +24 -38
- package/lib/Core/System/Capabilities.js +2 -13
- package/lib/Core/TileGeometry.js +13 -15
- package/lib/Core/TileMesh.js +6 -15
- package/lib/Core/View.js +43 -58
- package/lib/Layer/C3DTilesLayer.js +29 -41
- package/lib/Layer/ColorLayer.js +10 -16
- package/lib/Layer/ElevationLayer.js +7 -14
- package/lib/Layer/EntwinePointTileLayer.js +9 -18
- package/lib/Layer/FeatureGeometryLayer.js +9 -16
- package/lib/Layer/GeoidLayer.js +6 -15
- package/lib/Layer/GeometryLayer.js +11 -17
- package/lib/Layer/InfoLayer.js +5 -14
- package/lib/Layer/LabelLayer.js +22 -32
- package/lib/Layer/Layer.js +16 -26
- package/lib/Layer/LayerUpdateState.js +1 -8
- package/lib/Layer/LayerUpdateStrategy.js +7 -18
- package/lib/Layer/OrientedImageLayer.js +15 -25
- package/lib/Layer/PointCloudLayer.js +9 -19
- package/lib/Layer/PotreeLayer.js +8 -18
- package/lib/Layer/RasterLayer.js +9 -17
- package/lib/Layer/ReferencingLayerProperties.js +1 -8
- package/lib/Layer/TiledGeometryLayer.js +37 -33
- package/lib/Main.js +87 -708
- package/lib/MainBundle.js +4 -34
- package/lib/Parser/B3dmParser.js +80 -131
- package/lib/Parser/CameraCalibrationParser.js +5 -14
- package/lib/Parser/GDFParser.js +11 -22
- package/lib/Parser/GLTFParser.js +88 -0
- package/lib/Parser/GTXParser.js +9 -21
- package/lib/Parser/GeoJsonParser.js +14 -22
- package/lib/Parser/GpxParser.js +7 -14
- package/lib/Parser/ISGParser.js +19 -28
- package/lib/Parser/KMLParser.js +7 -14
- package/lib/Parser/LASLoader.js +20 -21
- package/lib/Parser/LASParser.js +6 -15
- package/lib/Parser/MapBoxUrlParser.js +2 -9
- package/lib/Parser/PntsParser.js +4 -14
- package/lib/Parser/PotreeBinParser.js +8 -16
- package/lib/Parser/PotreeCinParser.js +3 -12
- package/lib/Parser/ShapefileParser.js +11 -18
- package/lib/Parser/VectorTileParser.js +23 -31
- package/lib/Parser/XbilParser.js +5 -13
- package/lib/Parser/deprecated/LegacyGLTFLoader.js +2 -12
- package/lib/Process/3dTilesProcessing.js +14 -27
- package/lib/Process/FeatureProcessing.js +14 -22
- package/lib/Process/LayeredMaterialNodeProcessing.js +14 -26
- package/lib/Process/ObjectRemovalHelper.js +2 -9
- package/lib/Process/handlerNodeError.js +1 -7
- package/lib/Provider/3dTilesProvider.js +32 -29
- package/lib/Provider/DataSourceProvider.js +2 -9
- package/lib/Provider/Fetcher.js +40 -22
- package/lib/Provider/PointCloudProvider.js +7 -19
- package/lib/Provider/TileProvider.js +4 -12
- package/lib/Provider/URLBuilder.js +4 -12
- package/lib/Renderer/Camera.js +7 -17
- package/lib/Renderer/Color.js +3 -11
- package/lib/Renderer/ColorLayersOrdering.js +14 -22
- package/lib/Renderer/CommonMaterial.js +3 -12
- package/lib/Renderer/Label2DRenderer.js +5 -16
- package/lib/Renderer/LayeredMaterial.js +33 -53
- package/lib/Renderer/OBB.js +12 -21
- package/lib/Renderer/OrientedImageCamera.js +2 -11
- package/lib/Renderer/OrientedImageMaterial.js +17 -35
- package/lib/Renderer/PointsMaterial.js +37 -60
- package/lib/Renderer/RasterTile.js +16 -29
- package/lib/Renderer/RenderMode.js +2 -9
- package/lib/Renderer/Shader/ShaderChunk.js +5 -23
- package/lib/Renderer/Shader/ShaderUtils.js +2 -9
- package/lib/Renderer/SphereHelper.js +2 -11
- package/lib/Renderer/WebXR.js +2 -11
- package/lib/Renderer/c3DEngine.js +20 -53
- package/lib/Source/C3DTilesGoogleSource.js +76 -0
- package/lib/Source/C3DTilesIonSource.js +6 -13
- package/lib/Source/C3DTilesSource.js +5 -12
- package/lib/Source/EntwinePointTileSource.js +12 -19
- package/lib/Source/FileSource.js +7 -14
- package/lib/Source/OrientedImageSource.js +6 -14
- package/lib/Source/PotreeSource.js +9 -16
- package/lib/Source/Source.js +26 -39
- package/lib/Source/TMSSource.js +11 -22
- package/lib/Source/VectorTilesSource.js +75 -34
- package/lib/Source/WFSSource.js +7 -14
- package/lib/Source/WMSSource.js +5 -12
- package/lib/Source/WMTSSource.js +3 -10
- package/lib/ThreeExtended/capabilities/WebGL.js +1 -8
- package/lib/ThreeExtended/libs/ktx-parse.module.js +2 -256
- package/lib/ThreeExtended/libs/zstddec.module.js +2 -8
- package/lib/ThreeExtended/loaders/DDSLoader.js +10 -16
- package/lib/ThreeExtended/loaders/DRACOLoader.js +14 -19
- package/lib/ThreeExtended/loaders/GLTFLoader.js +124 -129
- package/lib/ThreeExtended/loaders/KTX2Loader.js +73 -78
- package/lib/ThreeExtended/utils/BufferGeometryUtils.js +40 -59
- package/lib/ThreeExtended/utils/WorkerPool.js +2 -9
- package/lib/Utils/CameraUtils.js +32 -44
- package/lib/Utils/DEMUtils.js +8 -19
- package/lib/Utils/FeaturesUtils.js +8 -16
- package/lib/Utils/Gradients.js +3 -12
- package/lib/Utils/OrientationUtils.js +8 -18
- package/lib/Utils/ThreeUtils.js +2 -9
- package/lib/Utils/gui/C3DTilesStyle.js +7 -15
- package/lib/Utils/gui/Main.js +7 -48
- package/lib/Utils/gui/Minimap.js +12 -20
- package/lib/Utils/gui/Navigation.js +6 -14
- package/lib/Utils/gui/Scale.js +11 -19
- package/lib/Utils/gui/Searchbar.js +5 -13
- package/lib/Utils/gui/Widget.js +1 -8
- package/lib/Utils/placeObjectOnGround.js +13 -23
- package/package.json +13 -8
package/lib/Utils/gui/Scale.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _GlobeControls = require("../../Controls/GlobeControls");
|
|
9
|
-
var _GlobeView = require("../../Core/Prefab/GlobeView");
|
|
10
|
-
var _PlanarControls = require("../../Controls/PlanarControls");
|
|
11
|
-
var _View = require("../../Core/View");
|
|
12
|
-
var _Widget = _interopRequireDefault(require("./Widget"));
|
|
1
|
+
import { CONTROL_EVENTS } from "../../Controls/GlobeControls.js";
|
|
2
|
+
import { GLOBE_VIEW_EVENTS } from "../../Core/Prefab/GlobeView.js";
|
|
3
|
+
import { PLANAR_CONTROL_EVENT } from "../../Controls/PlanarControls.js";
|
|
4
|
+
import { VIEW_EVENTS } from "../../Core/View.js";
|
|
5
|
+
import Widget from "./Widget.js";
|
|
13
6
|
const DEFAULT_OPTIONS = {
|
|
14
7
|
width: 200,
|
|
15
8
|
height: 30,
|
|
@@ -30,7 +23,7 @@ const DEFAULT_OPTIONS = {
|
|
|
30
23
|
* @property {HTMLElement} domElement An html div containing the scale.
|
|
31
24
|
* @property {HTMLElement} parentElement The parent HTML container of `this.domElement`.
|
|
32
25
|
*/
|
|
33
|
-
class Scale extends
|
|
26
|
+
class Scale extends Widget {
|
|
34
27
|
/**
|
|
35
28
|
* @param {View} view The iTowns view the scale should be
|
|
36
29
|
* linked to. If it is a
|
|
@@ -74,17 +67,17 @@ class Scale extends _Widget.default {
|
|
|
74
67
|
this.domElement.innerHTML = 'Scale';
|
|
75
68
|
this.width = options.width || DEFAULT_OPTIONS.width;
|
|
76
69
|
if (this.view.isGlobeView) {
|
|
77
|
-
this.view.addEventListener(
|
|
70
|
+
this.view.addEventListener(GLOBE_VIEW_EVENTS.GLOBE_INITIALIZED, () => {
|
|
78
71
|
this.update();
|
|
79
72
|
});
|
|
80
|
-
this.view.controls.addEventListener(
|
|
73
|
+
this.view.controls.addEventListener(CONTROL_EVENTS.RANGE_CHANGED, () => {
|
|
81
74
|
this.update();
|
|
82
75
|
});
|
|
83
76
|
} else if (this.view.isPlanarView) {
|
|
84
|
-
this.view.addEventListener(
|
|
77
|
+
this.view.addEventListener(VIEW_EVENTS.INITIALIZED, () => {
|
|
85
78
|
this.update();
|
|
86
79
|
});
|
|
87
|
-
this.view.addEventListener(
|
|
80
|
+
this.view.addEventListener(PLANAR_CONTROL_EVENT.MOVED, () => {
|
|
88
81
|
this.update();
|
|
89
82
|
});
|
|
90
83
|
} else {
|
|
@@ -111,5 +104,4 @@ class Scale extends _Widget.default {
|
|
|
111
104
|
this.domElement.style.width = `${pixelDistance}px`;
|
|
112
105
|
}
|
|
113
106
|
}
|
|
114
|
-
|
|
115
|
-
exports.default = _default;
|
|
107
|
+
export default Scale;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _Fetcher = _interopRequireDefault(require("../../Provider/Fetcher"));
|
|
9
|
-
var _Widget = _interopRequireDefault(require("./Widget"));
|
|
1
|
+
import Fetcher from "../../Provider/Fetcher.js";
|
|
2
|
+
import Widget from "./Widget.js";
|
|
10
3
|
const DEFAULT_OPTIONS = {
|
|
11
4
|
width: 300,
|
|
12
5
|
height: 38,
|
|
@@ -54,7 +47,7 @@ function eraseSuggestionList(form) {
|
|
|
54
47
|
* @property {HTMLElement} domElement An html div containing the searchbar.
|
|
55
48
|
* @property {HTMLElement} parentElement The parent HTML container of `this.domElement`.
|
|
56
49
|
*/
|
|
57
|
-
class Searchbar extends
|
|
50
|
+
class Searchbar extends Widget {
|
|
58
51
|
#_onSelected;
|
|
59
52
|
|
|
60
53
|
/**
|
|
@@ -146,7 +139,7 @@ class Searchbar extends _Widget.default {
|
|
|
146
139
|
return false;
|
|
147
140
|
}
|
|
148
141
|
geocodingOptions.url.searchParams.set('text', value);
|
|
149
|
-
|
|
142
|
+
Fetcher.json(geocodingOptions.url).then(geocodingResult => {
|
|
150
143
|
const result = geocodingOptions.parser(geocodingResult);
|
|
151
144
|
let i = 0;
|
|
152
145
|
result.forEach((info, location) => {
|
|
@@ -239,5 +232,4 @@ class Searchbar extends _Widget.default {
|
|
|
239
232
|
});
|
|
240
233
|
}
|
|
241
234
|
}
|
|
242
|
-
|
|
243
|
-
exports.default = _default;
|
|
235
|
+
export default Searchbar;
|
package/lib/Utils/gui/Widget.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
1
|
/**
|
|
8
2
|
* An interface that stores common methods for all specific widgets.
|
|
9
3
|
*
|
|
@@ -83,5 +77,4 @@ class Widget {
|
|
|
83
77
|
this.domElement.style.display = 'none';
|
|
84
78
|
}
|
|
85
79
|
}
|
|
86
|
-
|
|
87
|
-
exports.default = _default;
|
|
80
|
+
export default Widget;
|
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
9
|
-
var _DEMUtils = _interopRequireDefault(require("./DEMUtils"));
|
|
10
|
-
var _Coordinates = _interopRequireDefault(require("../Core/Geographic/Coordinates"));
|
|
11
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import DEMUtils from "./DEMUtils.js";
|
|
3
|
+
import Coordinates from "../Core/Geographic/Coordinates.js";
|
|
13
4
|
const temp = {
|
|
14
5
|
v: new THREE.Vector3(),
|
|
15
|
-
coord1: new
|
|
16
|
-
coord2: new
|
|
6
|
+
coord1: new Coordinates('EPSG:4978'),
|
|
7
|
+
coord2: new Coordinates('EPSG:4978'),
|
|
17
8
|
offset: new THREE.Vector2()
|
|
18
9
|
};
|
|
19
10
|
function _updateVector3(layer, method, nodes, vecCRS, vec, offset) {
|
|
20
11
|
let matrices = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
|
|
21
12
|
let coords = arguments.length > 7 ? arguments[7] : undefined;
|
|
22
13
|
let cache = arguments.length > 8 ? arguments[8] : undefined;
|
|
23
|
-
const coord = coords || new
|
|
14
|
+
const coord = coords || new Coordinates(vecCRS);
|
|
24
15
|
if (matrices.worldFromLocal) {
|
|
25
16
|
coord.setFromVector3(temp.v.copy(vec).applyMatrix4(matrices.worldFromLocal));
|
|
26
17
|
} else {
|
|
27
18
|
coord.setFromVector3(vec);
|
|
28
19
|
}
|
|
29
|
-
const result =
|
|
20
|
+
const result = DEMUtils.getTerrainObjectAt(layer, coord, method, nodes, cache);
|
|
30
21
|
if (result) {
|
|
31
22
|
result.coord.z += offset;
|
|
32
23
|
result.coord.as(vecCRS, temp.coord2).toVector3(vec);
|
|
@@ -83,7 +74,7 @@ function placeObjectOnGround(layer, crs, obj) {
|
|
|
83
74
|
worldFromLocal: obj.parent ? obj.parent.matrixWorld : undefined,
|
|
84
75
|
localFromWorld: obj.parent ? new THREE.Matrix4().copy(obj.parent.matrixWorld).invert() : undefined
|
|
85
76
|
};
|
|
86
|
-
const result = _updateVector3(layer, options.method ||
|
|
77
|
+
const result = _updateVector3(layer, options.method || DEMUtils.FAST_READ_Z, tiles, crs, obj.position, options.offset || 0, matrices, undefined, options.cache ? options.cache[0] : undefined);
|
|
87
78
|
if (result) {
|
|
88
79
|
if (options.cache) {
|
|
89
80
|
options.cache[0] = result;
|
|
@@ -103,10 +94,10 @@ function placeObjectOnGround(layer, crs, obj) {
|
|
|
103
94
|
options.cache.length = geometry.vertices.length;
|
|
104
95
|
}
|
|
105
96
|
let success = true;
|
|
106
|
-
const coord = new
|
|
97
|
+
const coord = new Coordinates(crs);
|
|
107
98
|
for (let i = 0; i < geometry.vertices.length; i++) {
|
|
108
99
|
const cached = options.cache ? options.cache[i] : undefined;
|
|
109
|
-
const result = _updateVector3(layer, options.method ||
|
|
100
|
+
const result = _updateVector3(layer, options.method || DEMUtils.FAST_READ_Z, tiles, crs, geometry.vertices[i], options.offset || 0, matrices, coord, cached);
|
|
110
101
|
if (options.cache) {
|
|
111
102
|
options.cache[i] = result;
|
|
112
103
|
}
|
|
@@ -122,12 +113,12 @@ function placeObjectOnGround(layer, crs, obj) {
|
|
|
122
113
|
}
|
|
123
114
|
let success = true;
|
|
124
115
|
const tmp = new THREE.Vector3();
|
|
125
|
-
const coord = new
|
|
116
|
+
const coord = new Coordinates(crs);
|
|
126
117
|
for (let i = 0; i < geometry.attributes.position.count; i++) {
|
|
127
118
|
const cached = options.cache ? options.cache[i] : undefined;
|
|
128
119
|
tmp.fromBufferAttribute(geometry.attributes.position, i);
|
|
129
120
|
const prev = tmp.z;
|
|
130
|
-
const result = _updateVector3(layer, options.method ||
|
|
121
|
+
const result = _updateVector3(layer, options.method || DEMUtils.FAST_READ_Z, tiles, crs, tmp, options.offset || 0, matrices, coord, cached);
|
|
131
122
|
if (options.cache) {
|
|
132
123
|
options.cache[i] = result;
|
|
133
124
|
}
|
|
@@ -143,5 +134,4 @@ function placeObjectOnGround(layer, crs, obj) {
|
|
|
143
134
|
}
|
|
144
135
|
}
|
|
145
136
|
}
|
|
146
|
-
|
|
147
|
-
exports.default = _default;
|
|
137
|
+
export default placeObjectOnGround;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itowns",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.43.0",
|
|
4
4
|
"description": "A JS/WebGL framework for 3D geospatial data visualization",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "lib/Main.js",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": "./lib/Main.js",
|
|
@@ -15,9 +16,9 @@
|
|
|
15
16
|
"test-dev": "npm run lint -- --max-warnings=0 && npm run build-dev && npm run test-with-coverage && npm run test-functional",
|
|
16
17
|
"test-unit": "npm run base-test-unit test/unit",
|
|
17
18
|
"test-functional": "mocha -t 100000 --require test/hooks_functional.js --recursive test/functional",
|
|
18
|
-
"test-with-coverage": "
|
|
19
|
-
"test-with-coverage_lcov": "
|
|
20
|
-
"base-test-unit": "cross-env BABEL_DISABLE_CACHE=1 mocha --
|
|
19
|
+
"test-with-coverage": "c8 -n src -r html cross-env npm run test-unit",
|
|
20
|
+
"test-with-coverage_lcov": "c8 -n src --reporter=lcov cross-env npm run test-unit",
|
|
21
|
+
"base-test-unit": "cross-env BABEL_DISABLE_CACHE=1 mocha --file test/unit/bootstrap.js --loader=babel-register-esm",
|
|
21
22
|
"build": "cross-env NODE_ENV=production webpack",
|
|
22
23
|
"build-dev": "cross-env NODE_ENV=development webpack",
|
|
23
24
|
"transpile": "cross-env BABEL_DISABLE_CACHE=1 babel src --out-dir lib",
|
|
@@ -27,12 +28,12 @@
|
|
|
27
28
|
"prepublishOnly": "npm run build && npm run transpile",
|
|
28
29
|
"prepare": "cross-env NO_UPDATE_NOTIFIER=true node ./config/prepare.mjs && node ./config/replace.config.mjs",
|
|
29
30
|
"watch": "cross-env BABEL_DISABLE_CACHE=1 babel --watch src --out-dir lib",
|
|
30
|
-
"changelog": "conventional-changelog -n ./config/conventionalChangelog/config.
|
|
31
|
+
"changelog": "conventional-changelog -n ./config/conventionalChangelog/config.cjs -i changelog.md -s",
|
|
31
32
|
"bump": "if [ -z $npm_config_level ]; then grunt bump:minor; else grunt bump:$npm_config_level; fi && npm run changelog && npm install && git add -A && git commit --amend --no-edit",
|
|
32
33
|
"publish-next": "npm version prerelease --preid next && npm publish --access public --tag=next --provenance",
|
|
33
34
|
"publish-latest": "npm publish --access public --tag=latest --provenance"
|
|
34
35
|
},
|
|
35
|
-
"
|
|
36
|
+
"c8": {
|
|
36
37
|
"exclude": [
|
|
37
38
|
"**/*ThreeExtended",
|
|
38
39
|
"**/*src/Utils/placeObjectOnGround.js",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"@mapbox/vector-tile": "^1.3.1",
|
|
61
62
|
"@tmcw/togeojson": "^5.8.1",
|
|
62
63
|
"@tweenjs/tween.js": "^18.6.4",
|
|
63
|
-
"copc": "^0.0.
|
|
64
|
+
"copc": "^0.0.6",
|
|
64
65
|
"earcut": "^2.2.4",
|
|
65
66
|
"js-priority-queue": "^0.1.5",
|
|
66
67
|
"pbf": "^3.2.1",
|
|
@@ -76,12 +77,16 @@
|
|
|
76
77
|
"@babel/preset-env": "^7.22.5",
|
|
77
78
|
"@babel/register": "^7.22.5",
|
|
78
79
|
"@types/three": "^0.159.0",
|
|
80
|
+
"@xmldom/xmldom": "^0.8.10",
|
|
79
81
|
"babel-inline-import-loader": "^1.0.1",
|
|
80
82
|
"babel-loader": "^9.1.3",
|
|
81
83
|
"babel-plugin-inline-import": "^3.0.0",
|
|
82
84
|
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
|
|
83
85
|
"babel-plugin-minify-replace": "^0.5.0",
|
|
86
|
+
"babel-plugin-module-extension-resolver": "^1.0.0",
|
|
84
87
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
88
|
+
"babel-register-esm": "^1.2.5",
|
|
89
|
+
"c8": "^9.1.0",
|
|
85
90
|
"chalk": "^5.3.0",
|
|
86
91
|
"chart.js": "^4.4.1",
|
|
87
92
|
"compare-func": "^2.0.0",
|
|
@@ -102,11 +107,11 @@
|
|
|
102
107
|
"marked": "^11.0.1",
|
|
103
108
|
"mocha": "^10.2.0",
|
|
104
109
|
"node-fetch": "^2.7.0",
|
|
105
|
-
"nyc": "^15.1.0",
|
|
106
110
|
"proj4": "^2.9.2",
|
|
107
111
|
"puppeteer": "^21.6.0",
|
|
108
112
|
"q": "^1.5.1",
|
|
109
113
|
"replace-in-file": "^7.0.2",
|
|
114
|
+
"sinon": "^17.0.1",
|
|
110
115
|
"three": "^0.159.0",
|
|
111
116
|
"typescript": "^5.3.3",
|
|
112
117
|
"webpack": "^5.89.0",
|