itowns 2.44.2-next.6 → 2.44.3-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 (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
@@ -63,7 +63,6 @@ function moveCameraVerticalGlobe(value) {
63
63
  }
64
64
  class FirstPersonControls extends THREE.EventDispatcher {
65
65
  /**
66
- * @Constructor
67
66
  * @param {View} view
68
67
  * @param {object} options
69
68
  * @param {boolean} options.focusOnClick - whether or not to focus the renderer domElement on click
@@ -112,7 +112,6 @@ function onDocumentMouseWheel(event) {
112
112
  */
113
113
  class FlyControls extends THREE.EventDispatcher {
114
114
  /**
115
- * @Constructor
116
115
  * @param {View} view
117
116
  * @param {object} options
118
117
  * @param {boolean} options.focusOnClick - whether or not to focus the renderer domElement on click
@@ -1090,11 +1090,11 @@ class GlobeControls extends THREE.EventDispatcher {
1090
1090
  * Zoom parameter is ignored if range is set
1091
1091
  * The tilt's interval is between 4 and 89.5 degree
1092
1092
  *
1093
- * @param {CameraUtils~CameraTransformOptions|Extent} params camera transformation to apply
1094
- * @param {number} [params.zoom] zoom
1095
- * @param {number} [params.scale] scale
1096
- * @param {boolean} isAnimated Indicates if animated
1097
- * @return {Promise} A promise that resolves when transformation is complete
1093
+ * @param {CameraUtils~CameraTransformOptions|Extent} [params] - camera transformation to apply
1094
+ * @param {number} [params.zoom] - zoom
1095
+ * @param {number} [params.scale] - scale
1096
+ * @param {boolean} [isAnimated] - Indicates if animated
1097
+ * @return {Promise} A promise that resolves when transformation is complete
1098
1098
  */
1099
1099
  lookAtCoordinate() {
1100
1100
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -78,7 +78,7 @@ function computeTime(distance) {
78
78
  }
79
79
 
80
80
  /**
81
- * @classdesc Camera controls that can follow a path.
81
+ * Camera controls that can follow a path.
82
82
  * It is used to simulate a street view.
83
83
  * It stores a currentPosition and nextPosition, and do a camera traveling to go to next position.
84
84
  * It also manages picking on the ground and on other object, like building.
@@ -112,7 +112,6 @@ function computeTime(distance) {
112
112
  */
113
113
  class StreetControls extends FirstPersonControls {
114
114
  /**
115
- * @constructor
116
115
  * @param { View } view - View where this control will be used
117
116
  * @param { Object } options - Configuration of this controls
118
117
  * @param { number } [options.wallMaxDistance=1000] - Maximum distance to click on a wall, in meter.
@@ -465,7 +465,7 @@ function createInstancedMesh(mesh, count, ptsIn) {
465
465
  }
466
466
 
467
467
  /**
468
- * Convert a [Feature]{@link Feature} of type POINT to a Instanced meshes
468
+ * Convert a {@link Feature} of type POINT to a Instanced meshes
469
469
  *
470
470
  * @param {Object} feature
471
471
  * @returns {THREE.Mesh} mesh or GROUP of THREE.InstancedMesh
@@ -488,7 +488,7 @@ function pointsToInstancedMeshes(feature) {
488
488
  }
489
489
 
490
490
  /**
491
- * Convert a [Feature]{@link Feature} to a Mesh
491
+ * Convert a {@link Feature} to a Mesh
492
492
  * @param {Feature} feature - the feature to convert
493
493
  * @param {Object} options - options controlling the conversion
494
494
  *
@@ -2,7 +2,7 @@ import binaryPropertyAccessor from "./utils/BinaryPropertyAccessor.js";
2
2
  import { C3DTilesTypes } from "./C3DTilesEnums.js";
3
3
  const utf8Decoder = new TextDecoder();
4
4
 
5
- /** @classdesc
5
+ /**
6
6
  * A 3D Tiles
7
7
  * [batch
8
8
  * table](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/BatchTable).
@@ -1,5 +1,4 @@
1
1
  /**
2
- * @classdesc
3
2
  * Batch Table part of the 3D Tiles
4
3
  * [Batch Table Hierarchy Extension](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/extensions/3DTILES_batch_table_hierarchy)
5
4
  * @property {object} classes - The classes as defined in the specification.
@@ -78,7 +78,6 @@ function initFromSphere(sphere) {
78
78
  }
79
79
 
80
80
  /**
81
- * @classdesc 3D Tiles
82
81
  * [bounding volume](https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/specification/schema/boundingVolume.schema.json)
83
82
  * Used to represent bounding volumes and viewer request volumes. The input bounding volume (from the dataset) can be a
84
83
  * box, a sphere or a region. Regions are transformed to spheres internally for simplification of parsing and to speed
@@ -132,7 +131,7 @@ class C3DTBoundingVolume {
132
131
  }
133
132
 
134
133
  /**
135
- * Checks if the camera is inside the [viewer request volumes](@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#viewer-request-volume).
134
+ * Checks if the camera is inside the [viewer request volumes](https://github.com/CesiumGS/3d-tiles/tree/main/specification#viewer-request-volume).
136
135
  * @param {Camera} camera - the camera to perform culling for
137
136
  * @param {THREE.Matrix4} tileMatrixWorld - the world matrix of the tile
138
137
  * @returns {boolean} true if the camera is outside the viewer request volume, false otherwise.
@@ -1,11 +1,11 @@
1
- /** @classdesc
1
+ /**
2
2
  * Class for managing
3
3
  * [3D Tiles extensions](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/extensions).
4
4
  * Extensions used in a 3D Tiles tileset must be registered in the iTowns' layer
5
5
  * holding the tileset by the user with the {@link registerExtension}
6
6
  * method. The extension must be registered together with a class holding the
7
7
  * code to interpret the extension.
8
- * An example of extension class is {@link $3DTBatchTableHierarchyExtension}.
8
+ * An example of extension class is {@link C3DTBatchTableHierarchyExtension}.
9
9
  * This extension has only one part situated in the batch table (but other
10
10
  * extensions can have multiple parts, stored in different 3D Tiles classes
11
11
  * such as tileset or bounding volume).
@@ -40,7 +40,7 @@ class C3DTExtensions {
40
40
  * corresponding to this class. These extension managers should be able
41
41
  * to parse the extension fragment (done in the constructor) and should
42
42
  * have a getInfoById method if they are related to the batch table class.
43
- * See {@link $3DTBatchTableHierarchyExtension} for an example of
43
+ * See {@link C3DTBatchTableHierarchyExtension} for an example of
44
44
  * extension class.
45
45
  */
46
46
  registerExtension(extensionName, extensionManagers) {
@@ -8,7 +8,7 @@ import { C3DTilesTypes } from "./C3DTilesEnums.js";
8
8
  // to a reference local to the tile.
9
9
  const tileMatrixInverse = new THREE.Matrix4();
10
10
 
11
- /** @classdesc
11
+ /**
12
12
  * A 3D Tiles
13
13
  * [Tileset](https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/specification/schema/tileset.schema.json).
14
14
  * @property {C3DTilesTypes} type - Used by 3D Tiles extensions
@@ -26,6 +26,7 @@ export const FEATURE_TYPES = {
26
26
  };
27
27
 
28
28
  /**
29
+ * @typedef {Object} FeatureBuildingOptions
29
30
  * @property {string} crs - The CRS to convert the input coordinates to.
30
31
  * @property {string} [structure='2d'] - data structure type : 2d or 3d.
31
32
  * If the structure is 3d, the feature have 3 dimensions by vertices positions and
@@ -42,8 +43,7 @@ export const FEATURE_TYPES = {
42
43
  * @property {Style} style - The style to inherit when creating
43
44
  * style for all new features.
44
45
  *
45
- */
46
- export class FeatureBuildingOptions {}
46
+ */
47
47
 
48
48
  /**
49
49
  * @property {Extent} extent - The 2D extent containing all the points
@@ -322,8 +322,8 @@ const alignYtoEast = new THREE.Quaternion();
322
322
  * @property {boolean} isInverted - This option is to be set to the
323
323
  * correct value, true or false (default being false), if the computation of
324
324
  * the coordinates needs to be inverted to same scheme as OSM, Google Maps
325
- * or other system. See [this link]{@link
326
- * https://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates}
325
+ * or other system. See [this link](
326
+ * https://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates)
327
327
  * for more informations.
328
328
  * @property {THREE.Matrix4} matrixWorldInverse - The matrix world inverse.
329
329
  * @property {Coordinates} center - The local center coordinates in `EPSG:4326`.
@@ -422,7 +422,7 @@ export class FeatureCollection extends THREE.Object3D {
422
422
  }
423
423
 
424
424
  /**
425
- * Remove features that don't have [FeatureGeometry]{@link FeatureGeometry}.
425
+ * Remove features that don't have {@link FeatureGeometry}.
426
426
  */
427
427
  removeEmptyFeature() {
428
428
  this.features = this.features.filter(feature => feature.geometries.length);
@@ -20,11 +20,23 @@ function proj4cache(crsIn, crsOut) {
20
20
  }
21
21
 
22
22
  /**
23
- * A Coordinates object, defined by a [crs]{@link http://inspire.ec.europa.eu/theme/rs}
23
+ * A Coordinates object, defined by a [crs](http://inspire.ec.europa.eu/theme/rs)
24
24
  * and three values. These values are accessible through `x`, `y` and `z`,
25
25
  * although it can also be accessible through `latitude`, `longitude` and
26
26
  * `altitude`. To change a value, prefer the `set()` method below.
27
27
  *
28
+ * `EPSG:4978` and `EPSG:4326` are supported by default. To use another CRS,
29
+ * you have to declare it with `proj4`. You can find most projections and their
30
+ * proj4 code at [epsg.io](https://epsg.io/).
31
+ *
32
+ * @example
33
+ * new Coordinates('EPSG:4978', 20885167, 849862, 23385912); //Geocentric coordinates
34
+ * new Coordinates('EPSG:4326', 2.33, 48.24, 24999549); //Geographic coordinates
35
+ *
36
+ * @example
37
+ * // Declare EPSG:3946 with proj4
38
+ * itowns.proj4.defs('EPSG:3946', '+proj=lcc +lat_1=45.25 +lat_2=46.75 +lat_0=46 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs');
39
+ *
28
40
  * @property {boolean} isCoordinates - Used to checkout whether this coordinates
29
41
  * is a Coordinates. Default is true. You should not change this, as it is used
30
42
  * internally for optimisation.
@@ -40,22 +52,10 @@ function proj4cache(crsIn, crsOut) {
40
52
  * @property {number} altitude - The third value of the coordinate.
41
53
  * @property {THREE.Vector3} geodesicNormal - The geodesic normal of the
42
54
  * coordinate.
43
- *
44
- * @example
45
- * new Coordinates('EPSG:4978', 20885167, 849862, 23385912); //Geocentric coordinates
46
- *
47
- * @example
48
- * new Coordinates('EPSG:4326', 2.33, 48.24, 24999549); //Geographic coordinates
49
55
  */
50
56
  class Coordinates {
51
57
  /**
52
- * @constructor
53
- *
54
- * @param {string} crs - A supported Coordinate Reference System. 'EPSG:4978' and 'EPSG:4326' are
55
- * supported by default. To use another CRS, you have to declare it with proj4. For instance:
56
- * @example
57
- * itowns.proj4.defs('EPSG:3946', '+proj=lcc +lat_1=45.25 +lat_2=46.75 +lat_0=46 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs');
58
- * You can find most projections and their proj4 code at [epsg.io]{@link https://epsg.io/}
58
+ * @param {string} crs - A supported Coordinate Reference System.
59
59
  * @param {number|Array<number>|Coordinates|THREE.Vector3} [v0=0] -
60
60
  * x or longitude value, or a more complex one: it can be an array of three
61
61
  * numbers, being x/lon, y/lat, z/alt, or it can be `THREE.Vector3`. It can
@@ -277,7 +277,7 @@ class Coordinates {
277
277
  }
278
278
 
279
279
  /**
280
- * Returns coordinates in the wanted [CRS]{@link http://inspire.ec.europa.eu/theme/rs}.
280
+ * Returns coordinates in the wanted [CRS](http://inspire.ec.europa.eu/theme/rs).
281
281
  *
282
282
  * @param {string} crs - The CRS to convert the Coordinates into.
283
283
  * @param {Coordinates} [target] - The target to put the converted
@@ -39,7 +39,10 @@ for (let i = cardinals.length - 1; i >= 0; i--) {
39
39
  cardinals[i] = new Coordinates('EPSG:4326', 0, 0, 0, 0);
40
40
  }
41
41
  const _c = new Coordinates('EPSG:4326', 0, 0);
42
+
43
+ /** @private */
42
44
  export const globalExtentTMS = new Map();
45
+ /** @private */
43
46
  export const schemeTiles = new Map();
44
47
  function getInfoTms(crs) {
45
48
  const epsg = CRS.formatToEPSG(crs);
@@ -13,13 +13,13 @@ function biLinearInterpolation(indexes, getData) {
13
13
 
14
14
  /**
15
15
  * An instance of `GeoidGrid` allows accessing some geoid height grid data from geographic instances (like some
16
- * `{@link Coordinates}`). The geoid height grid data must contain geoid height values for a set of geographic points
16
+ * {@link Coordinates}). The geoid height grid data must contain geoid height values for a set of geographic points
17
17
  * regularly dispatched on a planar surface.
18
18
  *
19
19
  * @property {Extent} extent The geographic extent of the geoid height grid data.
20
20
  * @property {THREE.Vector2} step The distance between two consecutive points of the geoid height grid. The
21
- * `x` value stands for the distance along the West-East direction, and the
22
- * `y` value stands for the distance along the South-North direction.
21
+ * `x` value stands for the distance along the West-East direction, and the
22
+ * `y` value stands for the distance along the South-North direction.
23
23
  * @property {THREE.Vector2} dimensions The planar dimensions of the geoid height grid data extent.
24
24
  * @property {THREE.Vector2} dataSize The number of values in the gridded data along the West-East direction (`x`
25
25
  * axis) and the South-North direction (`y` axis).
@@ -61,21 +61,21 @@ class GeoidGrid {
61
61
  /**
62
62
  * @param {Extent} extent The geographic extent of the geoid height grid data.
63
63
  * @param {THREE.Vector2} step The distance between two consecutive points of the geoid height grid. The
64
- * `x` value stands for the distance along the West-East direction, and the
65
- * `y` value stands for the distance along the South-North direction.
64
+ * `x` value stands for the distance along the West-East direction, and the
65
+ * `y` value stands for the distance along the South-North direction.
66
66
  * @param {function} getData A method that allows reading a value in the geoid height grid from its
67
- * vertical and horizontal indexes. The lower an index, the lower the
68
- * coordinate on the corresponding axis - 0 being the index of the minimal
69
- * coordinate of the gridded data on a given axis. In other words :
70
- * - `getData(0, 0)` must return the geoid height value at the SOUTH-WEST
71
- * corner of your data extent.
72
- * - `getData(0, j)` must return a geoid height on the southern limit of your
73
- * data extent.
74
- * - `getData(i, 0)` must return a geoid height on the western limit of your
75
- * data extent.
76
- * - if your gridded data has dimensions (rowNumber, colNumber),
77
- * `getData(rowNumber - 1, colNumber - 1)` must return the geoid height at
78
- * the NORTH-EAST corner of your data extent.
67
+ * vertical and horizontal indexes. The lower an index, the lower the
68
+ * coordinate on the corresponding axis - 0 being the index of the minimal
69
+ * coordinate of the gridded data on a given axis. In other words :
70
+ * - `getData(0, 0)` must return the geoid height value at the SOUTH-WEST
71
+ * corner of your data extent.
72
+ * - `getData(0, j)` must return a geoid height on the southern limit of your
73
+ * data extent.
74
+ * - `getData(i, 0)` must return a geoid height on the western limit of your
75
+ * data extent.
76
+ * - if your gridded data has dimensions (rowNumber, colNumber),
77
+ * `getData(rowNumber - 1, colNumber - 1)` must return the geoid height at
78
+ * the NORTH-EAST corner of your data extent.
79
79
  */
80
80
  constructor(extent, step, getData) {
81
81
  CRS.isGeographic(extent.crs);
@@ -87,12 +87,12 @@ class GeoidGrid {
87
87
  }
88
88
 
89
89
  /**
90
- * Get the value of the geoid height at given geographic `{@link Coordinates}`. The geoid height value is
90
+ * Get the value of the geoid height at given geographic {@link Coordinates}. The geoid height value is
91
91
  * bi-linearly interpolated from the gridded data accessed by the `GeoidGrid` instance.
92
92
  *
93
93
  * @param {Coordinates} coordinates Geographic coordinates to get the geoid height value at.
94
94
  *
95
- * @returns {number} The geoid height value at the given `{@link Coordinates}`, bi-interpolated from the gridded
95
+ * @returns {number} The geoid height value at the given {@link Coordinates}, bi-interpolated from the gridded
96
96
  * data accessed by the `GeoidGrid` instance.
97
97
  */
98
98
  getHeightAtCoordinates(coordinates) {
@@ -38,9 +38,8 @@ class Atmosphere extends GeometryLayer {
38
38
  *
39
39
  * The atmospheric-scattering it is taken from :
40
40
  * * [Atmosphere Shader From Space (Atmospheric scattering)](http://stainlessbeer.weebly.com/planets-9-atmospheric-scattering.html)
41
- * * [Accurate Atmospheric Scattering (NVIDIA GPU Gems 2)]{@link https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering}.
41
+ * * [Accurate Atmospheric Scattering (NVIDIA GPU Gems 2)](https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering).
42
42
  *
43
- * @constructor
44
43
  * @extends GeometryLayer
45
44
  *
46
45
  * @param {string} id - The id of the layer Atmosphere.
@@ -24,7 +24,6 @@ class GlobeLayer extends TiledGeometryLayer {
24
24
  * A {@link TiledGeometryLayer} to use with a {@link GlobeView}. It has
25
25
  * specific method for updating and subdivising its grid.
26
26
  *
27
- * @constructor
28
27
  * @extends TiledGeometryLayer
29
28
  *
30
29
  * @param {string} id - The id of the layer, that should be unique. It is
@@ -63,7 +63,6 @@ class GlobeView extends View {
63
63
  /**
64
64
  * Creates a view of a globe.
65
65
  *
66
- * @constructor
67
66
  * @extends View
68
67
  *
69
68
  * @example <caption><b>Instance GlobeView.</b></caption>
@@ -77,8 +76,8 @@ class GlobeView extends View {
77
76
  * @param {HTMLDivElement} viewerDiv - Where to attach the view and display it
78
77
  * in the DOM.
79
78
  * @param {CameraTransformOptions|Extent} placement - An object to place view
80
- * @param {object=} options - See options of {@link View}.
81
- * @param {Object} options.controls - See options of {@link GlobeControls}
79
+ * @param {object} [options] - See options of {@link View}.
80
+ * @param {Object} [options.controls] - See options of {@link GlobeControls}
82
81
  */
83
82
  constructor(viewerDiv) {
84
83
  let placement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -14,7 +14,6 @@ class PlanarLayer extends TiledGeometryLayer {
14
14
  * A {@link TiledGeometryLayer} to use with a {@link PlanarView}. It has
15
15
  * specific method for updating and subdivising its grid.
16
16
  *
17
- * @constructor
18
17
  * @extends TiledGeometryLayer
19
18
  *
20
19
  * @param {string} id - The id of the layer, that should be unique. It is
@@ -5,7 +5,6 @@ import PlanarControls from "../../Controls/PlanarControls.js";
5
5
  import PlanarLayer from "./Planar/PlanarLayer.js";
6
6
  class PlanarView extends View {
7
7
  /**
8
- * @constructor
9
8
  * @extends View
10
9
  *
11
10
  * @example <caption><b>Instance with placement on the ground.</b></caption>
@@ -16,9 +15,9 @@ class PlanarView extends View {
16
15
  * @param {HTMLDivElement} viewerDiv - Where to attach the view and display it
17
16
  * in the DOM.
18
17
  * @param {Extent} extent - The ground extent.
19
- * @param {object=} options - See options of {@link View}.
18
+ * @param {Object} [options] - See options of {@link View}.
20
19
  * @param {boolean} [options.noControls=false] - If true, no controls are associated to the view.
21
- * @param {object=} [options.controls] - options for the {@link PlanarControls} associated to the view, if
20
+ * @param {Object} [options.controls] - options for the {@link PlanarControls} associated to the view, if
22
21
  * `options.noControls` is false.
23
22
  * @param {CameraUtils~CameraTransformOptions|Extent} [options.placement] - The
24
23
  * {@link CameraUtils~CameraTransformOptions} to apply to view's camera or the extent it must display at
package/lib/Core/Style.js CHANGED
@@ -7,7 +7,7 @@ import { deltaE } from "../Renderer/Color.js";
7
7
  import Coordinates from "./Geographic/Coordinates.js";
8
8
  /* babel-plugin-inline-import './StyleChunk/itowns_stroke_single_before.css' */
9
9
  const itowns_stroke_single_before = ".itowns-stroke-single:before {\n display: var(--text_stroke_display);\n content: attr(data-before);\n opacity: 1;\n position: absolute;\n -webkit-text-stroke-width: var(--text_stroke_width);\n -webkit-text-stroke-color: var(--text_stroke_color);\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: -1;\n white-space: inherit;\n overflow-wrap: inherit;\n letter-spacing: inherit;\n text-align: inherit;\n padding: inherit;\n font-family: inherit;\n text-transform: inherit;\n max-width: inherit;\n font-size: inherit;\n}\n";
10
- export const cacheStyle = new Cache();
10
+ const cacheStyle = new Cache();
11
11
  const matrix = document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGMatrix();
12
12
  const canvas = document.createElement('canvas');
13
13
  const inv255 = 1 / 255;
@@ -177,8 +177,7 @@ function defineStyleProperty(style, category, parameter, userValue, defaultValue
177
177
  }
178
178
 
179
179
  /**
180
- * @class
181
- * @classdesc StyleContext stores metadata of one FeatureGeometry that are needed for its style computation:
180
+ * StyleContext stores metadata of one FeatureGeometry that are needed for its style computation:
182
181
  * type of feature and what is needed (fill, stroke or draw a point, etc.) as well as where to get its
183
182
  * properties and its coordinates (for base_altitude).
184
183
  *
@@ -295,8 +294,11 @@ function _addIcon(icon, domElement, opt) {
295
294
  }
296
295
 
297
296
  /**
297
+ * An object that can contain any properties (order, zoom, fill, stroke, point,
298
+ * text or/and icon) and sub properties of a Style.<br/>
299
+ * Used for the instanciation of a {@link Style}.
300
+ *
298
301
  * @typedef {Object} StyleOptions
299
- * @memberof StyleOptions
300
302
  *
301
303
  * @property {Number} [order] - Order of the features that will be associated to
302
304
  * the style. It can helps sorting and prioritizing features if needed.
@@ -313,12 +315,12 @@ function _addIcon(icon, domElement, opt) {
313
315
  * @property {Image|Canvas|String|Object|Function} [fill.pattern] - Defines a pattern to fill the
314
316
  * surface with. It can be an `Image` to use directly, an url to fetch the pattern or an object containing
315
317
  * the url of the image to fetch and the transformation to apply.
316
- * from. See [this example] (http://www.itowns-project.org/itowns/examples/#source_file_geojson_raster)
318
+ * from. See [this example](http://www.itowns-project.org/itowns/examples/#source_file_geojson_raster)
317
319
  * for how to use.
318
320
  * @property {Image|String} [fill.pattern.source] - The image or the url to fetch the pattern image
319
321
  * @property {Object} [fill.pattern.cropValues] - The x, y, width and height (in pixel) of the sub image to use.
320
- * @property {THREE.Color} [fill.pattern.color] - Can be any [valid color string]
321
- * (https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
322
+ * @property {THREE.Color} [fill.pattern.color] - Can be any
323
+ * [valid color string](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
322
324
  * It will change the color of the white pixels of the source image.
323
325
  * @property {Number|Function} [fill.opacity] - The opacity of the color or of the
324
326
  * pattern. Can be between `0.0` and `1.0`. Default is `1.0`.
@@ -439,17 +441,7 @@ function _addIcon(icon, domElement, opt) {
439
441
  */
440
442
 
441
443
  /**
442
- * @description An object that can contain any properties
443
- * (order, zoom, fill, stroke, point, text or/and icon)
444
- * and sub properties of a Style.<br/>
445
- * Used for the instanciation of a {@link Style}.
446
- * @hideconstructor
447
- */
448
- export class StyleOptions {}
449
-
450
- /**
451
- * @class
452
- * @classdesc A Style is a class that defines the visual appearance of {@link
444
+ * A Style is a class that defines the visual appearance of {@link
453
445
  * FeatureCollection} and {@link Feature}. It is taken into account when drawing
454
446
  * them in textures that will be placed onto tiles.
455
447
  *
@@ -620,8 +612,7 @@ class Style {
620
612
  /**
621
613
  * @param {StyleOptions} [params={}] An object that contain any properties
622
614
  * (order, zoom, fill, stroke, point, text or/and icon)
623
- * and sub properties of a Style (@see {@link StyleOptions}).
624
- * @constructor
615
+ * and sub properties of a Style ({@link StyleOptions}).
625
616
  */
626
617
  constructor() {
627
618
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -5,7 +5,6 @@ import { geoidLayerIsVisible } from "../Layer/GeoidLayer.js";
5
5
  /**
6
6
  * A TileMesh is a THREE.Mesh with a geometricError and an OBB
7
7
  * The objectId property of the material is the with the id of the TileMesh
8
- * @constructor
9
8
  * @param {TileGeometry} geometry - the tile geometry
10
9
  * @param {THREE.Material} material - a THREE.Material compatible with THREE.Mesh
11
10
  * @param {Layer} layer - the layer the tile is added to
package/lib/Core/View.js CHANGED
@@ -138,21 +138,19 @@ class View extends THREE.EventDispatcher {
138
138
  *
139
139
  * @param {string} crs - The default CRS of Three.js coordinates. Should be a cartesian CRS.
140
140
  * @param {HTMLElement} viewerDiv - Where to instanciate the Three.js scene in the DOM
141
- * @param {Object=} options - Optional properties.
141
+ * @param {Object} [options] - Optional properties.
142
142
  * @param {object} [options.camera] - Options for the camera associated to the view. See {@link Camera} options.
143
- * @param {?MainLoop} options.mainLoop - {@link MainLoop} instance to use, otherwise a default one will be constructed
144
- * @param {?(WebGLRenderer|object)} options.renderer - {@link WebGLRenderer} instance to use, otherwise
143
+ * @param {MainLoop} [options.mainLoop] - {@link MainLoop} instance to use, otherwise a default one will be constructed
144
+ * @param {WebGLRenderer|Object} [options.renderer] - {@link WebGLRenderer} instance to use, otherwise
145
145
  * a default one will be constructed. In this case, if options.renderer is an object, it will be used to
146
146
  * configure the renderer (see {@link c3DEngine}. If not present, a new &lt;canvas> will be created and
147
147
  * added to viewerDiv (mutually exclusive with mainLoop)
148
- * @param {boolean|Object} [options.webXR=false] - enable webxr button to switch on VR visualization.
148
+ * @param {Object} [options.webXR] - enable webxr button to switch on VR visualization.
149
149
  * @param {number} [options.webXR.scale=1.0] - apply webxr scale tranformation.
150
- * @param {?Scene} [options.scene3D] - [THREE.Scene](https://threejs.org/docs/#api/en/scenes/Scene) instance to use, otherwise a default one will be constructed
151
- * @param {?Color} options.diffuse - [THREE.Color](https://threejs.org/docs/?q=color#api/en/math/Color) Diffuse color terrain material.
150
+ * @param {Scene} [options.scene3D] - [THREE.Scene](https://threejs.org/docs/#api/en/scenes/Scene) instance to use, otherwise a default one will be constructed
151
+ * @param {Color} [options.diffuse] - [THREE.Color](https://threejs.org/docs/?q=color#api/en/math/Color) Diffuse color terrain material.
152
152
  * This color is applied to terrain if there isn't color layer on terrain extent (by example on pole).
153
153
  * @param {boolean} [options.enableFocusOnStart=true] - enable focus on dom element on start.
154
- *
155
- * @constructor
156
154
  */
157
155
  constructor(crs, viewerDiv) {
158
156
  let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -55,7 +55,6 @@ class C3DTilesLayer extends GeometryLayer {
55
55
  #fillColorMaterialsBuffer;
56
56
  /**
57
57
  * @deprecated Deprecated 3D Tiles layer. Use {@link OGC3DTilesLayer} instead.
58
- * @constructor
59
58
  * @extends GeometryLayer
60
59
  *
61
60
  * @example
@@ -92,11 +91,11 @@ class C3DTilesLayer extends GeometryLayer {
92
91
  * @param {Number} [config.cleanupDelay=1000] The time (in ms) after which a tile content (and its children) are
93
92
  * removed from the scene.
94
93
  * @param {C3DTExtensions} [config.registeredExtensions] 3D Tiles extensions managers registered for this tileset.
95
- * @param {String} [config.pntsMode= PNTS_MODE.COLOR] {@link PointsMaterials} Point cloud coloring mode.
94
+ * @param {String} [config.pntsMode= PNTS_MODE.COLOR] {@link PointsMaterial} Point cloud coloring mode.
96
95
  * Only 'COLOR' or 'CLASSIFICATION' are possible. COLOR uses RGB colors of the points,
97
96
  * CLASSIFICATION uses a classification property of the batch table to color points.
98
97
  * @param {String} [config.pntsShape= PNTS_SHAPE.CIRCLE] Point cloud point shape. Only 'CIRCLE' or 'SQUARE' are possible.
99
- * @param {String} [config.pntsSizeMode= PNTS_SIZE_MODE.VALUE] {@link PointsMaterials} Point cloud size mode. Only 'VALUE' or 'ATTENUATED' are possible. VALUE use constant size, ATTENUATED compute size depending on distance from point to camera.
98
+ * @param {String} [config.pntsSizeMode= PNTS_SIZE_MODE.VALUE] {@link PointsMaterial} Point cloud size mode. Only 'VALUE' or 'ATTENUATED' are possible. VALUE use constant size, ATTENUATED compute size depending on distance from point to camera.
100
99
  * @param {Number} [config.pntsMinAttenuatedSize=3] Minimum scale used by 'ATTENUATED' size mode
101
100
  * @param {Number} [config.pntsMaxAttenuatedSize=10] Maximum scale used by 'ATTENUATED' size mode
102
101
  * @param {Style} [config.style=null] - style used for this layer
@@ -248,7 +247,7 @@ class C3DTilesLayer extends GeometryLayer {
248
247
  }
249
248
 
250
249
  /**
251
- * Call by {@link 3dTilesProcessing} which handle load and unload of 3DTiles
250
+ * Called when a tile content is loaded
252
251
  * @param {THREE.Object3D} tileContent - tile as THREE.Object3D
253
252
  */
254
253
  onTileContentLoaded(tileContent) {
@@ -51,7 +51,6 @@ class ColorLayer extends RasterLayer {
51
51
  * it can be an aerial view of the ground or a simple transparent layer with the
52
52
  * roads displayed.
53
53
  *
54
- * @constructor
55
54
  * @extends Layer
56
55
  *
57
56
  * @param {string} id - The id of the layer, that should be unique. It is
@@ -65,13 +64,13 @@ class ColorLayer extends RasterLayer {
65
64
  * @param {Source} [config.source] - Description and options of the source.
66
65
  * @param {number} [config.magFilter] - How the texture is sampled when a texel covers more than one pixel. [see](https://threejs.org/docs/?q=texture#api/en/textures/Texture.magFilter)
67
66
  * @param {number} [config.minFilter] - How the texture is sampled when a texel covers less than one pixel. [see](https://threejs.org/docs/?q=texture#api/en/textures/Texture.minFilter)
68
- * @param {number} [effect_type=0] - type effect to apply on raster color.
67
+ * @param {number} [config.effect_type=0] - type effect to apply on raster color.
69
68
  * if `effect_type` equals:
70
69
  * * `0`: no special effect.
71
70
  * * `1`: light color to invisible effect.
72
71
  * * `2`: white color to invisible effect.
73
72
  * * `3`: custom shader effect (defined `ShaderChunk.customBodyColorLayer` and `ShaderChunk.customHeaderColorLayer`).
74
- * @param {number} [effect_parameter=1.0] - amount value used with effect applied on raster color.
73
+ * @param {number} [config.effect_parameter=1.0] - amount value used with effect applied on raster color.
75
74
  *
76
75
  * @example
77
76
  * // Create a ColorLayer
@@ -3,7 +3,6 @@ import CopcNode from "../Core/CopcNode.js";
3
3
  import PointCloudLayer from "./PointCloudLayer.js";
4
4
 
5
5
  /**
6
- * @classdesc
7
6
  * A layer for [Cloud Optimised Point Cloud](https://copc.io) (COPC) datasets.
8
7
  * See {@link PointCloudLayer} class for documentation on base properties.
9
8
  *
@@ -28,7 +28,6 @@ class ElevationLayer extends RasterLayer {
28
28
  * A simple layer, managing an elevation texture to add some reliefs on the
29
29
  * plane or globe view for example.
30
30
  *
31
- * @constructor
32
31
  * @extends Layer
33
32
  *
34
33
  * @param {string} id - The id of the layer, that should be unique. It is
@@ -15,7 +15,6 @@ class EntwinePointTileLayer extends PointCloudLayer {
15
15
  /**
16
16
  * Constructs a new instance of Entwine Point Tile layer.
17
17
  *
18
- * @constructor
19
18
  * @extends PointCloudLayer
20
19
  *
21
20
  * @example
@@ -15,7 +15,6 @@ import Feature2Mesh from "../Converter/Feature2Mesh.js";
15
15
  */
16
16
  class FeatureGeometryLayer extends GeometryLayer {
17
17
  /**
18
- * @constructor
19
18
  * @extends GeometryLayer
20
19
  *
21
20
  * @param {string} id - The id of the layer, that should be unique. It is
@@ -14,16 +14,15 @@ import ObjectRemovalHelper from "../Process/ObjectRemovalHelper.js";
14
14
  * internally for optimisation.
15
15
  * @property {number} [zoom.max=Infinity] - this is the maximum zoom beyond which it'll be hidden.
16
16
  * The `max` is constant and the value is `Infinity` because there's no maximum display level after which it is hidden.
17
- * This property is used only if the layer is attached to [TiledGeometryLayer]{@link TiledGeometryLayer}.
17
+ * This property is used only if the layer is attached to {@link TiledGeometryLayer}.
18
18
  * @property {number} [zoom.min=0] - this is the minimum zoom from which it'll be visible.
19
- * This property is used only if the layer is attached to [TiledGeometryLayer]{@link TiledGeometryLayer}.
19
+ * This property is used only if the layer is attached to {@link TiledGeometryLayer}.
20
20
  */
21
21
  class GeometryLayer extends Layer {
22
22
  /**
23
23
  * A layer usually managing a geometry to display on a view. For example, it
24
24
  * can be a layer of buildings extruded from a a WFS stream.
25
25
  *
26
- * @constructor
27
26
  * @extends Layer
28
27
  *
29
28
  * @param {string} id - The id of the layer, that should be unique. It is
@@ -183,8 +182,7 @@ class GeometryLayer extends Layer {
183
182
  }
184
183
 
185
184
  /**
186
- * Picking method for this layer. It uses the {@link Picking#pickObjectsAt}
187
- * method.
185
+ * Picking method for this layer.
188
186
  *
189
187
  * @param {View} view - The view instance.
190
188
  * @param {Object} coordinates - The coordinates to pick in the view. It