itowns 2.44.2-next.5 → 2.44.2

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 (76) hide show
  1. package/changelog.md +27 -0
  2. package/dist/itowns.js +1 -1
  3. package/dist/itowns.js.map +1 -1
  4. package/lib/Controls/FirstPersonControls.js +0 -1
  5. package/lib/Controls/FlyControls.js +0 -1
  6. package/lib/Controls/GlobeControls.js +5 -5
  7. package/lib/Controls/StreetControls.js +1 -2
  8. package/lib/Converter/Feature2Mesh.js +2 -2
  9. package/lib/Core/3DTiles/C3DTBatchTable.js +1 -1
  10. package/lib/Core/3DTiles/C3DTBatchTableHierarchyExtension.js +0 -1
  11. package/lib/Core/3DTiles/C3DTBoundingVolume.js +1 -2
  12. package/lib/Core/3DTiles/C3DTExtensions.js +3 -3
  13. package/lib/Core/3DTiles/C3DTileset.js +1 -1
  14. package/lib/Core/Feature.js +5 -5
  15. package/lib/Core/Geographic/Coordinates.js +15 -15
  16. package/lib/Core/Geographic/Extent.js +3 -0
  17. package/lib/Core/Geographic/GeoidGrid.js +19 -19
  18. package/lib/Core/Prefab/Globe/Atmosphere.js +1 -2
  19. package/lib/Core/Prefab/Globe/GlobeLayer.js +0 -1
  20. package/lib/Core/Prefab/GlobeView.js +2 -3
  21. package/lib/Core/Prefab/Planar/PlanarLayer.js +0 -1
  22. package/lib/Core/Prefab/PlanarView.js +2 -3
  23. package/lib/Core/Style.js +11 -20
  24. package/lib/Core/TileMesh.js +0 -1
  25. package/lib/Core/View.js +6 -8
  26. package/lib/Layer/C3DTilesLayer.js +3 -4
  27. package/lib/Layer/ColorLayer.js +2 -3
  28. package/lib/Layer/CopcLayer.js +0 -1
  29. package/lib/Layer/ElevationLayer.js +0 -1
  30. package/lib/Layer/EntwinePointTileLayer.js +0 -1
  31. package/lib/Layer/FeatureGeometryLayer.js +0 -1
  32. package/lib/Layer/GeometryLayer.js +3 -5
  33. package/lib/Layer/LabelLayer.js +0 -1
  34. package/lib/Layer/Layer.js +6 -6
  35. package/lib/Layer/OGC3DTilesLayer.js +0 -2
  36. package/lib/Layer/OrientedImageLayer.js +3 -3
  37. package/lib/Layer/PointCloudLayer.js +0 -1
  38. package/lib/Layer/Potree2Layer.js +0 -1
  39. package/lib/Layer/PotreeLayer.js +0 -1
  40. package/lib/Layer/TiledGeometryLayer.js +0 -1
  41. package/lib/Main.js +1 -1
  42. package/lib/Parser/GDFParser.js +2 -2
  43. package/lib/Parser/GTXParser.js +3 -3
  44. package/lib/Parser/GeoJsonParser.js +2 -2
  45. package/lib/Parser/GpxParser.js +2 -4
  46. package/lib/Parser/ISGParser.js +2 -2
  47. package/lib/Parser/KMLParser.js +2 -4
  48. package/lib/Parser/ShapefileParser.js +3 -4
  49. package/lib/Parser/VectorTileParser.js +3 -3
  50. package/lib/Parser/iGLTFLoader.js +0 -1
  51. package/lib/Provider/Fetcher.js +22 -21
  52. package/lib/Renderer/OBB.js +4 -3
  53. package/lib/Renderer/OrientedImageCamera.js +1 -2
  54. package/lib/Renderer/OrientedImageMaterial.js +4 -5
  55. package/lib/Renderer/PointsMaterial.js +6 -7
  56. package/lib/Renderer/RasterTile.js +1 -1
  57. package/lib/Source/C3DTilesGoogleSource.js +0 -2
  58. package/lib/Source/C3DTilesIonSource.js +0 -2
  59. package/lib/Source/C3DTilesSource.js +0 -2
  60. package/lib/Source/CopcSource.js +2 -5
  61. package/lib/Source/EntwinePointTileSource.js +0 -3
  62. package/lib/Source/FileSource.js +0 -3
  63. package/lib/Source/OGC3DTilesGoogleSource.js +0 -3
  64. package/lib/Source/OGC3DTilesIonSource.js +0 -3
  65. package/lib/Source/OGC3DTilesSource.js +0 -3
  66. package/lib/Source/OrientedImageSource.js +3 -3
  67. package/lib/Source/Potree2Source.js +0 -5
  68. package/lib/Source/PotreeSource.js +0 -5
  69. package/lib/Source/Source.js +10 -11
  70. package/lib/Source/TMSSource.js +5 -8
  71. package/lib/Source/VectorTilesSource.js +0 -2
  72. package/lib/Source/WFSSource.js +1 -4
  73. package/lib/Source/WMSSource.js +3 -6
  74. package/lib/Source/WMTSSource.js +1 -4
  75. package/lib/Utils/OrientationUtils.js +10 -11
  76. package/package.json +1 -1
@@ -1,7 +1,6 @@
1
1
  import OGC3DTilesSource from "./OGC3DTilesSource.js";
2
2
  class OGC3DTilesIonSource extends OGC3DTilesSource {
3
3
  /**
4
- * @classdesc
5
4
  * An object defining the source connection to a 3DTiles asset of a [Cesium ion server](https://cesium.com/learn/ion/).
6
5
  *
7
6
  * @extends Source
@@ -11,8 +10,6 @@ class OGC3DTilesIonSource extends OGC3DTilesSource {
11
10
  * @property {string} accessToken - The Cesium ion access token used to retrieve the resource.
12
11
  * @property {string} assetId - The id of the asset on Cesium ion.
13
12
  *
14
- * @constructor
15
- *
16
13
  * @param {Object} source An object that can contain all properties of an OGC3DTilesIonSource and {@link Source}.
17
14
  * Only `accessToken` and `assetId` are mandatory.
18
15
  * @param {string} source.accessToken - The Cesium ion access token used to retrieve the resource.
@@ -1,7 +1,6 @@
1
1
  import Source from "./Source.js";
2
2
  class OGC3DTilesSource extends Source {
3
3
  /**
4
- * @classdesc
5
4
  * An object defining the source connection to a 3DTiles dataset from a web server.
6
5
  *
7
6
  * @extends Source
@@ -10,8 +9,6 @@ class OGC3DTilesSource extends Source {
10
9
  * You should not change this, as it is used internally for optimisation.
11
10
  * @property {string} url - The URL of the tileset json.
12
11
  *
13
- * @constructor
14
- *
15
12
  * @param {Object} source An object that can contain all properties of OGC3DTilesSource and of {@link Source}.
16
13
  * Only `url` is mandatory.
17
14
  * @param {string} source.url - The URL of the tileset json.
@@ -2,17 +2,17 @@ import Source from "./Source.js";
2
2
  import Fetcher from "../Provider/Fetcher.js";
3
3
 
4
4
  /**
5
- * @classdesc OrientedImageSource is a specific source used to load oriented images.
5
+ * OrientedImageSource is a specific source used to load oriented images.
6
6
  * @extends Source
7
7
  */
8
8
  class OrientedImageSource extends Source {
9
9
  /**
10
- * @constructor
11
10
  * @param { Object } source - Configuration object
12
11
  * @param { string } source.url - Url for all the textures.
13
12
  * @param { string } source.orientationsUrl - Json Url, using GeoJSon format to represent points,
14
13
  * it's a set of panoramic position and orientation.
15
- * @param { string } source.calibrationUrl - Json url, representing a set of camera. see [CameraCalibrationParser]{@link module:CameraCalibrationParser}
14
+ * @param { string } source.calibrationUrl - Json url, representing a set of camera.
15
+ * see {@link CameraCalibrationParser}
16
16
  * This Url must contains {sensorId} and {cameraId}, and these pattern will be replaced to build the Url,
17
17
  * to find the good texture for each camera for each panoramic.
18
18
  */
@@ -3,10 +3,7 @@ import Fetcher from "../Provider/Fetcher.js";
3
3
  import Potree2BinParser from "../Parser/Potree2BinParser.js";
4
4
 
5
5
  /**
6
- * @classdesc
7
6
  * Potree2Source are object containing informations on how to fetch potree 2.0 points cloud resources.
8
- *
9
- *
10
7
  */
11
8
 
12
9
  class Potree2Source extends Source {
@@ -149,8 +146,6 @@ class Potree2Source extends Source {
149
146
  * ```
150
147
  *
151
148
  * @extends Source
152
- *
153
- * @constructor
154
149
  */
155
150
  constructor(source) {
156
151
  if (!source.file) {
@@ -4,10 +4,7 @@ import PotreeBinParser from "../Parser/PotreeBinParser.js";
4
4
  import PotreeCinParser from "../Parser/PotreeCinParser.js";
5
5
 
6
6
  /**
7
- * @classdesc
8
7
  * PotreeSource are object containing informations on how to fetch points cloud resources.
9
- *
10
- *
11
8
  */
12
9
 
13
10
  class PotreeSource extends Source {
@@ -61,8 +58,6 @@ class PotreeSource extends Source {
61
58
  * ```
62
59
  *
63
60
  * @extends Source
64
- *
65
- * @constructor
66
61
  */
67
62
  constructor(source) {
68
63
  if (!source.file) {
@@ -9,6 +9,8 @@ import VectorTileParser from "../Parser/VectorTileParser.js";
9
9
  import Fetcher from "../Provider/Fetcher.js";
10
10
  import Cache from "../Core/Scheduler/Cache.js";
11
11
  import CRS from "../Core/Geographic/Crs.js";
12
+
13
+ /** @private */
12
14
  export const supportedParsers = new Map([['application/geo+json', GeoJsonParser.parse], ['application/json', GeoJsonParser.parse], ['application/kml', KMLParser.parse], ['application/gpx', GpxParser.parse], ['application/x-protobuf;type=mapbox-vector', VectorTileParser.parse], ['application/gtx', GTXParser.parse], ['application/isg', ISGParser.parse], ['application/gdf', GDFParser.parse]]);
13
15
  const noCache = {
14
16
  getByArray: () => {},
@@ -21,8 +23,8 @@ const noCache = {
21
23
  * @property {boolean} isInverted - This option is to be set to the
22
24
  * correct value, true or false (default being false), if the computation of
23
25
  * the coordinates needs to be inverted to same scheme as OSM, Google Maps
24
- * or other system. See [this link]{@link
25
- * https://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates}
26
+ * or other system. See [this link](
27
+ * https://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates)
26
28
  * for more informations.
27
29
  *
28
30
  */
@@ -40,16 +42,15 @@ class InformationsData {
40
42
  }
41
43
  }
42
44
  /**
43
- * This class describes parsing options.
44
- * @property {InformationsData|Source} in - data informations contained in the file.
45
+ * This interface describes parsing options.
46
+ * @typedef {Object} ParsingOptions
47
+ * @property {Source} in - data informations contained in the file.
45
48
  * @property {FeatureBuildingOptions|Layer} out - options indicates how the features should be built.
46
49
  */
47
- // eslint-disable-next-line
48
- class /* istanbul ignore next */ParsingOptions {}
50
+
49
51
  let uid = 0;
50
52
 
51
53
  /**
52
- * @classdesc
53
54
  * Sources are object containing informations on how to fetch resources, from a
54
55
  * set source.
55
56
  *
@@ -71,8 +72,8 @@ let uid = 0;
71
72
  * fetched resource. If this property is set, it overrides the chosen fetcher
72
73
  * method with `format`.
73
74
  * @property {Object} networkOptions - Fetch options (passed directly to
74
- * `fetch()`), see [the syntax for more information]{@link
75
- * https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Syntax}.
75
+ * `fetch()`), see [the syntax for more information](
76
+ * https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Syntax).
76
77
  * By default, set to `{ crossOrigin: 'anonymous' }`.
77
78
  * @property {string} crs - The crs projection of the resources.
78
79
  * @property {string} attribution - The intellectual property rights for the
@@ -97,8 +98,6 @@ class Source extends InformationsData {
97
98
  /**
98
99
  * @param {Object} source - An object that can contain all properties of a
99
100
  * Source. Only the `url` property is mandatory.
100
- *
101
- * @constructor
102
101
  */
103
102
  constructor(source) {
104
103
  super(source);
@@ -5,10 +5,9 @@ import CRS from "../Core/Geographic/Crs.js";
5
5
  const extent = new Extent(CRS.tms_4326, 0, 0, 0);
6
6
 
7
7
  /**
8
- * @classdesc
9
- * An object defining the source of resources to get from a [TMS]{@link
10
- * https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification} server. It
11
- * inherits from {@link Source}.
8
+ * An object defining the source of resources to get from a
9
+ * [TMS](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification) server.
10
+ * It inherits from {@link Source}.
12
11
  *
13
12
  * @extends Source
14
13
  *
@@ -18,8 +17,8 @@ const extent = new Extent(CRS.tms_4326, 0, 0, 0);
18
17
  * @property {boolean} isInverted - The isInverted property is to be set to the
19
18
  * correct value, true or false (default being false) if the computation of the
20
19
  * coordinates needs to be inverted to match the same scheme as OSM, Google Maps
21
- * or other system. See [this link]{@link
22
- * https://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates/}
20
+ * or other system. See [this link](
21
+ * https://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates/)
23
22
  * for more information.
24
23
  * @property {Object} tileMatrixSetLimits - it describes the available tile for this layer
25
24
  * @property {Object} extentSetlimits - these are the extents of the set of identical zoom tiles.
@@ -73,8 +72,6 @@ class TMSSource extends Source {
73
72
  /**
74
73
  * @param {Object} source - An object that can contain all properties of a
75
74
  * TMSSource and {@link Source}. Only `url` is mandatory.
76
- *
77
- * @constructor
78
75
  */
79
76
  constructor(source) {
80
77
  source.format = source.format || 'image/png';
@@ -21,7 +21,6 @@ function mergeCollections(collections) {
21
21
  }
22
22
 
23
23
  /**
24
- * @classdesc
25
24
  * VectorTilesSource are object containing informations on how to fetch vector
26
25
  * tiles resources.
27
26
  *
@@ -56,7 +55,6 @@ class VectorTilesSource extends TMSSource {
56
55
  * Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/)
57
56
  * for more informations.
58
57
  * @param {string} [source.accessToken] - Mapbox access token
59
- * @constructor
60
58
  */
61
59
  constructor(source) {
62
60
  source.format = 'application/x-protobuf;type=mapbox-vector';
@@ -3,9 +3,8 @@ import URLBuilder from "../Provider/URLBuilder.js";
3
3
  import CRS from "../Core/Geographic/Crs.js";
4
4
 
5
5
  /**
6
- * @classdesc
7
6
  * An object defining the source of resources to get from a
8
- * [WFS]{@link http://www.opengeospatial.org/standards/wfs} server. It inherits
7
+ * [WFS](http://www.opengeospatial.org/standards/wfs) server. It inherits
9
8
  * from {@link Source}.
10
9
  *
11
10
  * @extends Source
@@ -101,8 +100,6 @@ class WFSSource extends Source {
101
100
  * @param {Object} source - An object that can contain all properties of a
102
101
  * WFSSource and {@link Source}. `url`, `typeName` and `crs` are
103
102
  * mandatory.
104
- *
105
- * @constructor
106
103
  */
107
104
  constructor(source) {
108
105
  if (source.projection) {
@@ -2,9 +2,8 @@ import Source from "./Source.js";
2
2
  import URLBuilder from "../Provider/URLBuilder.js";
3
3
 
4
4
  /**
5
- * @classdesc
6
5
  * An object defining the source of images to get from a
7
- * [WMS]{@link http://www.opengeospatial.org/standards/wms} server. It inherits
6
+ * [WMS](http://www.opengeospatial.org/standards/wms) server. It inherits
8
7
  * from {@link Source}.
9
8
  *
10
9
  * @extends Source
@@ -35,8 +34,8 @@ import URLBuilder from "../Provider/URLBuilder.js";
35
34
  * is 21.
36
35
  * @property {string} bboxDigits - The bbox digits precision used in URL
37
36
  * @property {Object} vendorSpecific - An object containing vendor specific
38
- * parameters. See for example a [list of these parameters for GeoServer]{@link
39
- * https://docs.geoserver.org/latest/en/user/services/wms/vendor.html}. This
37
+ * parameters. See for example a [list of these parameters for GeoServer](
38
+ * https://docs.geoserver.org/latest/en/user/services/wms/vendor.html). This
40
39
  * object is read simply with the `key` being the name of the parameter and
41
40
  * `value` being the value of the parameter. If used, this property should be
42
41
  * set in the constructor parameters.
@@ -71,8 +70,6 @@ class WMSSource extends Source {
71
70
  * @param {Object} source - An object that can contain all properties of
72
71
  * WMSSource and {@link Source}. `url`, `name`, `extent` and `crs`
73
72
  * are mandatory.
74
- *
75
- * @constructor
76
73
  */
77
74
  constructor(source) {
78
75
  if (!source.name) {
@@ -1,9 +1,8 @@
1
1
  import TMSSource from "./TMSSource.js";
2
2
 
3
3
  /**
4
- * @classdesc
5
4
  * An object defining the source of resources to get from a
6
- * [WMTS]{@link http://www.opengeospatial.org/standards/wmts} server. It inherits
5
+ * [WMTS](http://www.opengeospatial.org/standards/wmts) server. It inherits
7
6
  * from {@link TMSSource}.
8
7
  *
9
8
  * @extends TMSSource
@@ -63,8 +62,6 @@ class WMTSSource extends TMSSource {
63
62
  /**
64
63
  * @param {Object} source - An object that can contain all properties of a
65
64
  * WMTSSource and {@link Source}. Only `url`, `name` and `crs` are mandatory.
66
- *
67
- * @constructor
68
65
  */
69
66
  constructor(source) {
70
67
  if (!source.name) {
@@ -123,17 +123,16 @@ export default {
123
123
  return target.set(0, 0, 0, 1);
124
124
  },
125
125
  /**
126
- * FunctionOrQuaternion is either a THREE.Quaternion or a function that accepts
127
- * arguments `(coordinates, target)` and returns the quaternion that models a rotation
128
- * around the point of origin. If target is not provided, a new quaternion is
129
- * created and returned instead.
130
- *
131
- * @typedef {function|THREE.Quaternion} FunctionOrQuaternion
126
+ * @typedef {Function|THREE.Quaternion} FunctionOrQuaternion - Either a
127
+ * THREE.Quaternion or a function that accepts arguments `(coordinates,
128
+ * target)` and returns the quaternion that models a rotation around the
129
+ * point of origin. If target is not provided, a new quaternion is created
130
+ * and returned instead.
132
131
  *
133
132
  * @property {Coordinates} coordinates the origin of the local East North Up
134
133
  * (ENU) frame
135
134
  * @property {THREE.Quaternion} [target=new THREE.Quaternion()] output Quaternion.
136
- */
135
+ */
137
136
 
138
137
  /**
139
138
  * A Projection object models a Coordinate Reference System (CRS).
@@ -202,7 +201,7 @@ export default {
202
201
  * between the ENU and LCC frames.
203
202
  * This is a generally small rotation around Z.
204
203
  *
205
- * @param {Projection} proj the lcc projection (may be parsed using proj4)
204
+ * @param {Object} proj the lcc projection (may be parsed using proj4)
206
205
  * @param {number} proj.lat0 - the latitude of origin
207
206
  * @param {number} proj.long0 - the longitude of the central meridian
208
207
  * @param {Coordinates} [coordinates] coordinates the origin of the local East North Up
@@ -229,7 +228,7 @@ export default {
229
228
  * between the ENU and LCC frames.
230
229
  * This is a generally small rotation around Z.
231
230
  *
232
- * @param {Projection} proj the lcc projection (may be parsed using proj4)
231
+ * @param {Object} proj the lcc projection (may be parsed using proj4)
233
232
  * @param {number} proj.lat0 - the latitude of origin
234
233
  * @param {number} proj.long0 - the longitude of the central meridian
235
234
  * @param {Coordinates} [coordinates] coordinates the origin of the local East North Up
@@ -255,7 +254,7 @@ export default {
255
254
  * between the ENU and TMerc frames.
256
255
  * This is a generally small rotation around Z.
257
256
  *
258
- * @param {Projection} proj the tmerc projection (may be parsed using proj4)
257
+ * @param {Object} proj the tmerc projection (may be parsed using proj4)
259
258
  * @param {number} proj.e - the excentricity of the ellipsoid (supersedes {proj.a} and {proj.b})
260
259
  * @param {number} proj.a - the semimajor radius of the ellipsoid axis
261
260
  * @param {number} proj.b - the semiminor radius of the ellipsoid axis
@@ -296,7 +295,7 @@ export default {
296
295
  * between the ENU and TMerc frames.
297
296
  * This is a generally small rotation around Z.
298
297
  *
299
- * @param {Projection} proj the tmerc projection (may be parsed using proj4)
298
+ * @param {Object} proj the tmerc projection (may be parsed using proj4)
300
299
  * @param {number} proj.e - the excentricity of the ellipsoid (supersedes
301
300
  * {proj.a} and {proj.b})
302
301
  * @param {number} proj.a - the semimajor radius of the ellipsoid axis
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itowns",
3
- "version": "2.44.2-next.5",
3
+ "version": "2.44.2",
4
4
  "description": "A JS/WebGL framework for 3D geospatial data visualization",
5
5
  "type": "module",
6
6
  "main": "lib/Main.js",