@xeokit/xeokit-sdk 2.2.5-beta-2 → 2.2.5-beta-3

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 (67) hide show
  1. package/dist/xeokit-sdk.cjs.js +16 -16
  2. package/dist/xeokit-sdk.es.js +16 -16
  3. package/package.json +7 -4
  4. package/types/extras/ContextMenu/ContextMenu.d.ts +8 -8
  5. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +1 -1
  6. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +26 -1
  7. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +76 -62
  8. package/types/plugins/AnnotationsPlugin/Annotation.d.ts +11 -10
  9. package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +32 -18
  10. package/types/plugins/AnnotationsPlugin/index.d.ts +1 -0
  11. package/types/plugins/AxisGizmoPlugin/AxisGizmoPlugin.d.ts +1 -1
  12. package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +10 -10
  13. package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +2 -2
  14. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +6 -6
  15. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +26 -1
  16. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +22 -7
  17. package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +9 -9
  18. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +8 -8
  19. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +4 -4
  20. package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +6 -6
  21. package/types/plugins/OBJLoaderPlugin/OBJLoaderPlugin.d.ts +2 -2
  22. package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +2 -2
  23. package/types/plugins/STLLoaderPlugin/index.d.ts +0 -1
  24. package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +4 -4
  25. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +1 -1
  26. package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +156 -149
  27. package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +20 -6
  28. package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +2 -2
  29. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +16 -16
  30. package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +20 -20
  31. package/types/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.d.ts +4 -4
  32. package/types/viewer/Plugin.d.ts +6 -6
  33. package/types/viewer/Viewer.d.ts +13 -13
  34. package/types/viewer/localization/LocaleService.d.ts +160 -153
  35. package/types/viewer/metadata/MetaModel.d.ts +2 -2
  36. package/types/viewer/metadata/MetaObject.d.ts +5 -5
  37. package/types/viewer/metadata/MetaScene.d.ts +11 -11
  38. package/types/viewer/metadata/index.d.ts +1 -1
  39. package/types/viewer/scene/CameraControl/CameraControl.d.ts +27 -19
  40. package/types/viewer/scene/Component.d.ts +6 -6
  41. package/types/viewer/scene/Entity.d.ts +29 -29
  42. package/types/viewer/scene/PerformanceModel/PerformanceModel.d.ts +45 -28
  43. package/types/viewer/scene/PerformanceModel/PerformanceNode.d.ts +26 -26
  44. package/types/viewer/scene/camera/Camera.d.ts +28 -28
  45. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +19 -19
  46. package/types/viewer/scene/camera/CustomProjection.d.ts +5 -5
  47. package/types/viewer/scene/camera/Frustum.d.ts +15 -15
  48. package/types/viewer/scene/camera/Ortho.d.ts +5 -5
  49. package/types/viewer/scene/camera/Perspective.d.ts +5 -5
  50. package/types/viewer/scene/index.d.ts +2 -1
  51. package/types/viewer/scene/marker/Marker.d.ts +15 -15
  52. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +3 -3
  53. package/types/viewer/scene/materials/Fresnel.d.ts +2 -3
  54. package/types/viewer/scene/materials/LinesMaterial.d.ts +1 -1
  55. package/types/viewer/scene/materials/PhongMaterial.d.ts +26 -26
  56. package/types/viewer/scene/materials/PointsMaterial.d.ts +14 -14
  57. package/types/viewer/scene/materials/Texture.d.ts +14 -15
  58. package/types/viewer/scene/materials/index.d.ts +1 -0
  59. package/types/viewer/scene/math/math.d.ts +28 -28
  60. package/types/viewer/scene/mesh/Mesh.d.ts +786 -0
  61. package/types/viewer/scene/mesh/index.d.ts +1 -0
  62. package/types/viewer/scene/nodes/Node.d.ts +664 -0
  63. package/types/viewer/scene/nodes/index.d.ts +1 -0
  64. package/types/viewer/scene/scene/Scene.d.ts +155 -111
  65. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +3 -3
  66. package/types/viewer/scene/viewport/Viewport.d.ts +2 -2
  67. package/types/viewer/scene/webgl/PickResult.d.ts +2 -2
@@ -6956,7 +6956,7 @@ function Core() {
6956
6956
  Existing {@link Scene}s , mapped to their IDs
6957
6957
  @property scenes
6958
6958
  @namespace xeokit
6959
- @type {{Scene}}
6959
+ @type {Scene}
6960
6960
  */
6961
6961
  this.scenes = {};
6962
6962
 
@@ -12025,7 +12025,7 @@ class Canvas extends Component {
12025
12025
  * ````
12026
12026
  *
12027
12027
  * @property boundary
12028
- * @type {{Number[]}}
12028
+ * @type {Number[]}
12029
12029
  * @final
12030
12030
  */
12031
12031
  this.boundary = [
@@ -39819,8 +39819,8 @@ class GLTFDefaultDataSource {
39819
39819
  * Gets metamodel JSON.
39820
39820
  *
39821
39821
  * @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
39822
- * @param {{Function(*)}} ok Fired on successful loading of the metamodel JSON asset.
39823
- * @param {{Function(*)}} error Fired on error while loading the metamodel JSON asset.
39822
+ * @param {Function} ok Fired on successful loading of the metamodel JSON asset.
39823
+ * @param {Function} error Fired on error while loading the metamodel JSON asset.
39824
39824
  */
39825
39825
  getMetaModel(metaModelSrc, ok, error) {
39826
39826
  utils.loadJSON(metaModelSrc,
@@ -71533,8 +71533,8 @@ class GLTFLoaderPlugin extends Plugin {
71533
71533
  * @param {String} [params.metaModelSrc] Path to an optional metadata file, as an alternative to the ````metaModelData```` parameter.
71534
71534
  * @param {*} [params.metaModelData] JSON model metadata, as an alternative to the ````metaModelSrc```` parameter.
71535
71535
  * @param {{String:Object}} [params.objectDefaults] Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}.
71536
- * @params {String[]} [params.includeTypes] When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
71537
- * @params {String[]} [params.excludeTypes] When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
71536
+ * @param {String[]} [params.includeTypes] When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
71537
+ * @param {String[]} [params.excludeTypes] When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
71538
71538
  * @param {Boolean} [params.edges=false] Whether or not xeokit renders the model with edges emphasized.
71539
71539
  * @param {Number[]} [params.origin=[0,0,0]] The double-precision World-space origin of the model's coordinates.
71540
71540
  * @param {Number[]} [params.position=[0,0,0]] The single-precision position, relative to ````origin````.
@@ -71543,7 +71543,7 @@ class GLTFLoaderPlugin extends Plugin {
71543
71543
  * @param {Number[]} [params.matrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]] The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````.
71544
71544
  * @param {Boolean} [params.backfaces=false] When true, allows visible backfaces, wherever specified in the glTF. When false, ignores backfaces.
71545
71545
  * @param {Number} [params.edgeThreshold=10] When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.
71546
- * @params {Boolean} [params.performance=true] Set ````false```` to load all the materials and textures provided by the glTF file, otherwise leave ````true```` to load the default high-performance representation optimized for low memory usage and efficient rendering.
71546
+ * @param {Boolean} [params.performance=true] Set ````false```` to load all the materials and textures provided by the glTF file, otherwise leave ````true```` to load the default high-performance representation optimized for low memory usage and efficient rendering.
71547
71547
  * @returns {Entity} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}
71548
71548
  */
71549
71549
  load(params = {}) {
@@ -80293,8 +80293,8 @@ class XKTDefaultDataSource {
80293
80293
  * Gets metamodel JSON.
80294
80294
  *
80295
80295
  * @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
80296
- * @param {{Function(*)}} ok Fired on successful loading of the metamodel JSON asset.
80297
- * @param {{Function(*)}} error Fired on error while loading the metamodel JSON asset.
80296
+ * @param {Function} ok Fired on successful loading of the metamodel JSON asset.
80297
+ * @param {Function} error Fired on error while loading the metamodel JSON asset.
80298
80298
  */
80299
80299
  getMetaModel(metaModelSrc, ok, error) {
80300
80300
  utils.loadJSON(metaModelSrc,
@@ -137510,7 +137510,7 @@ class Curve extends Component {
137510
137510
  /**
137511
137511
  * Gets the tangent on this Curve at position {@link Curve#t}.
137512
137512
  *
137513
- * @returns {{Number[]}} The tangent.
137513
+ * @returns {Number[]} The tangent.
137514
137514
  */
137515
137515
  get tangent() {
137516
137516
  return this.getTangent(this._t);
@@ -137530,7 +137530,7 @@ class Curve extends Component {
137530
137530
  * Returns a normalized tangent vector on this Curve at the given position.
137531
137531
  *
137532
137532
  * @param {Number} t Position to get tangent at.
137533
- * @returns {{Number[]}} Normalized tangent vector
137533
+ * @returns {Number[]} Normalized tangent vector
137534
137534
  */
137535
137535
  getTangent(t) {
137536
137536
  var delta = 0.0001;
@@ -142800,7 +142800,7 @@ class CubicBezierCurve extends Curve {
142800
142800
  *
142801
142801
  * @param {Number} t Position to get point at.
142802
142802
  *
142803
- * @returns {{Number[]}} The point at the given position.
142803
+ * @returns {Number[]} The point at the given position.
142804
142804
  */
142805
142805
  get point() {
142806
142806
  return this.getPoint(this._t);
@@ -142811,7 +142811,7 @@ class CubicBezierCurve extends Curve {
142811
142811
  *
142812
142812
  * @param {Number} t Position to get point at.
142813
142813
  *
142814
- * @returns {{Number[]}} The point at the given position.
142814
+ * @returns {Number[]} The point at the given position.
142815
142815
  */
142816
142816
  getPoint(t) {
142817
142817
 
@@ -142988,7 +142988,7 @@ class Path extends Curve {
142988
142988
  /**
142989
142989
  * Gets point on this Path corresponding to the current value of {@link Path#t}.
142990
142990
  *
142991
- * @returns {{Number[]}} The point.
142991
+ * @returns {Number[]} The point.
142992
142992
  */
142993
142993
  get point() {
142994
142994
  return this.getPoint(this._t);
@@ -143008,7 +143008,7 @@ class Path extends Curve {
143008
143008
  * Gets a point on this Path corresponding to the given progress position.
143009
143009
  *
143010
143010
  * @param {Number} t Indicates point of progress along this curve, in the range [0..1].
143011
- * @returns {{Number[]}}
143011
+ * @returns {Number[]}
143012
143012
  */
143013
143013
  getPoint(t) {
143014
143014
  var d = t * this.length;
@@ -143197,7 +143197,7 @@ class QuadraticBezierCurve extends Curve {
143197
143197
  Point on this QuadraticBezierCurve at position {@link QuadraticBezierCurve/t}.
143198
143198
 
143199
143199
  @property point
143200
- @type {{Number[]}}
143200
+ @type {Number[]}
143201
143201
  */
143202
143202
  get point() {
143203
143203
  return this.getPoint(this._t);
@@ -6952,7 +6952,7 @@ function Core() {
6952
6952
  Existing {@link Scene}s , mapped to their IDs
6953
6953
  @property scenes
6954
6954
  @namespace xeokit
6955
- @type {{Scene}}
6955
+ @type {Scene}
6956
6956
  */
6957
6957
  this.scenes = {};
6958
6958
 
@@ -12021,7 +12021,7 @@ class Canvas extends Component {
12021
12021
  * ````
12022
12022
  *
12023
12023
  * @property boundary
12024
- * @type {{Number[]}}
12024
+ * @type {Number[]}
12025
12025
  * @final
12026
12026
  */
12027
12027
  this.boundary = [
@@ -39815,8 +39815,8 @@ class GLTFDefaultDataSource {
39815
39815
  * Gets metamodel JSON.
39816
39816
  *
39817
39817
  * @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
39818
- * @param {{Function(*)}} ok Fired on successful loading of the metamodel JSON asset.
39819
- * @param {{Function(*)}} error Fired on error while loading the metamodel JSON asset.
39818
+ * @param {Function} ok Fired on successful loading of the metamodel JSON asset.
39819
+ * @param {Function} error Fired on error while loading the metamodel JSON asset.
39820
39820
  */
39821
39821
  getMetaModel(metaModelSrc, ok, error) {
39822
39822
  utils.loadJSON(metaModelSrc,
@@ -71529,8 +71529,8 @@ class GLTFLoaderPlugin extends Plugin {
71529
71529
  * @param {String} [params.metaModelSrc] Path to an optional metadata file, as an alternative to the ````metaModelData```` parameter.
71530
71530
  * @param {*} [params.metaModelData] JSON model metadata, as an alternative to the ````metaModelSrc```` parameter.
71531
71531
  * @param {{String:Object}} [params.objectDefaults] Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}.
71532
- * @params {String[]} [params.includeTypes] When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
71533
- * @params {String[]} [params.excludeTypes] When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
71532
+ * @param {String[]} [params.includeTypes] When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
71533
+ * @param {String[]} [params.excludeTypes] When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
71534
71534
  * @param {Boolean} [params.edges=false] Whether or not xeokit renders the model with edges emphasized.
71535
71535
  * @param {Number[]} [params.origin=[0,0,0]] The double-precision World-space origin of the model's coordinates.
71536
71536
  * @param {Number[]} [params.position=[0,0,0]] The single-precision position, relative to ````origin````.
@@ -71539,7 +71539,7 @@ class GLTFLoaderPlugin extends Plugin {
71539
71539
  * @param {Number[]} [params.matrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]] The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````.
71540
71540
  * @param {Boolean} [params.backfaces=false] When true, allows visible backfaces, wherever specified in the glTF. When false, ignores backfaces.
71541
71541
  * @param {Number} [params.edgeThreshold=10] When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.
71542
- * @params {Boolean} [params.performance=true] Set ````false```` to load all the materials and textures provided by the glTF file, otherwise leave ````true```` to load the default high-performance representation optimized for low memory usage and efficient rendering.
71542
+ * @param {Boolean} [params.performance=true] Set ````false```` to load all the materials and textures provided by the glTF file, otherwise leave ````true```` to load the default high-performance representation optimized for low memory usage and efficient rendering.
71543
71543
  * @returns {Entity} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}
71544
71544
  */
71545
71545
  load(params = {}) {
@@ -80289,8 +80289,8 @@ class XKTDefaultDataSource {
80289
80289
  * Gets metamodel JSON.
80290
80290
  *
80291
80291
  * @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
80292
- * @param {{Function(*)}} ok Fired on successful loading of the metamodel JSON asset.
80293
- * @param {{Function(*)}} error Fired on error while loading the metamodel JSON asset.
80292
+ * @param {Function} ok Fired on successful loading of the metamodel JSON asset.
80293
+ * @param {Function} error Fired on error while loading the metamodel JSON asset.
80294
80294
  */
80295
80295
  getMetaModel(metaModelSrc, ok, error) {
80296
80296
  utils.loadJSON(metaModelSrc,
@@ -137506,7 +137506,7 @@ class Curve extends Component {
137506
137506
  /**
137507
137507
  * Gets the tangent on this Curve at position {@link Curve#t}.
137508
137508
  *
137509
- * @returns {{Number[]}} The tangent.
137509
+ * @returns {Number[]} The tangent.
137510
137510
  */
137511
137511
  get tangent() {
137512
137512
  return this.getTangent(this._t);
@@ -137526,7 +137526,7 @@ class Curve extends Component {
137526
137526
  * Returns a normalized tangent vector on this Curve at the given position.
137527
137527
  *
137528
137528
  * @param {Number} t Position to get tangent at.
137529
- * @returns {{Number[]}} Normalized tangent vector
137529
+ * @returns {Number[]} Normalized tangent vector
137530
137530
  */
137531
137531
  getTangent(t) {
137532
137532
  var delta = 0.0001;
@@ -142796,7 +142796,7 @@ class CubicBezierCurve extends Curve {
142796
142796
  *
142797
142797
  * @param {Number} t Position to get point at.
142798
142798
  *
142799
- * @returns {{Number[]}} The point at the given position.
142799
+ * @returns {Number[]} The point at the given position.
142800
142800
  */
142801
142801
  get point() {
142802
142802
  return this.getPoint(this._t);
@@ -142807,7 +142807,7 @@ class CubicBezierCurve extends Curve {
142807
142807
  *
142808
142808
  * @param {Number} t Position to get point at.
142809
142809
  *
142810
- * @returns {{Number[]}} The point at the given position.
142810
+ * @returns {Number[]} The point at the given position.
142811
142811
  */
142812
142812
  getPoint(t) {
142813
142813
 
@@ -142984,7 +142984,7 @@ class Path extends Curve {
142984
142984
  /**
142985
142985
  * Gets point on this Path corresponding to the current value of {@link Path#t}.
142986
142986
  *
142987
- * @returns {{Number[]}} The point.
142987
+ * @returns {Number[]} The point.
142988
142988
  */
142989
142989
  get point() {
142990
142990
  return this.getPoint(this._t);
@@ -143004,7 +143004,7 @@ class Path extends Curve {
143004
143004
  * Gets a point on this Path corresponding to the given progress position.
143005
143005
  *
143006
143006
  * @param {Number} t Indicates point of progress along this curve, in the range [0..1].
143007
- * @returns {{Number[]}}
143007
+ * @returns {Number[]}
143008
143008
  */
143009
143009
  getPoint(t) {
143010
143010
  var d = t * this.length;
@@ -143193,7 +143193,7 @@ class QuadraticBezierCurve extends Curve {
143193
143193
  Point on this QuadraticBezierCurve at position {@link QuadraticBezierCurve/t}.
143194
143194
 
143195
143195
  @property point
143196
- @type {{Number[]}}
143196
+ @type {Number[]}
143197
143197
  */
143198
143198
  get point() {
143199
143199
  return this.getPoint(this._t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xeokit/xeokit-sdk",
3
- "version": "2.2.5-beta-2",
3
+ "version": "2.2.5-beta-3",
4
4
  "description": "Web Programming Toolkit for 3D/2D BIM and AEC Graphics",
5
5
  "module": "/dist/xeokit-sdk.es.js",
6
6
  "main": "/dist/xeokit-sdk.cjs.js",
@@ -9,6 +9,7 @@
9
9
  "build": "rollup --config rollup.config.js; rollup --config rollup.minified.config.js; cp node_modules/web-ifc/web-ifc.wasm dist/.",
10
10
  "test": "percy exec -- node ./snapshots.js",
11
11
  "docs": "rm -Rf ./docs/*; ./node_modules/.bin/esdoc",
12
+ "typedocs": "rm -Rf ./docs/*; typedoc --tsconfig tsconfig.json",
12
13
  "publish": "npm publish --access public"
13
14
  },
14
15
  "repository": {
@@ -45,9 +46,9 @@
45
46
  },
46
47
  "homepage": "https://xeokit.io",
47
48
  "dependencies": {
48
- "web-ifc": "0.0.30",
49
49
  "@loaders.gl/core": "^3.0.13",
50
- "@loaders.gl/las": "^3.0.13"
50
+ "@loaders.gl/las": "^3.0.13",
51
+ "web-ifc": "0.0.30"
51
52
  },
52
53
  "devDependencies": {
53
54
  "@babel/cli": "^7.15.7",
@@ -66,9 +67,11 @@
66
67
  "http-server": "^0.12.3",
67
68
  "jest": "^27.2.2",
68
69
  "jest-webgl-canvas-mock": "^0.2.3",
70
+ "parse5": "^6.0.1",
69
71
  "rollup": "^2.46.0",
70
72
  "rollup-plugin-node-resolve": "^5.2.0",
71
- "rollup-plugin-terser": "^7.0.2"
73
+ "rollup-plugin-terser": "^7.0.2",
74
+ "typedoc": "^0.22.13"
72
75
  },
73
76
  "files": [
74
77
  "/dist",
@@ -1,9 +1,9 @@
1
1
  export declare type ContextMenuConfiguration = {
2
- /** The context menu items. These can also be dynamically set on {@link ContextMenu#items}. See the class documentation for an example. */
2
+ /** The context menu items. These can also be dynamically set on {@link ContextMenu.items}. See the class documentation for an example. */
3
3
  items?: any;
4
- /** The context, which is passed into the item callbacks. This can also be dynamically set on {@link ContextMenu#context}. This must be set before calling {@link ContextMenu#show}. */
4
+ /** The context, which is passed into the item callbacks. This can also be dynamically set on {@link ContextMenu.context}. This must be set before calling {@link ContextMenu.show}. */
5
5
  context?: any;
6
- /** Whether this ````ContextMenu```` is initially enabled. {@link ContextMenu#show} does nothing while this is ````false````. */
6
+ /** Whether this ````ContextMenu```` is initially enabled. {@link ContextMenu.show} does nothing while this is ````false````. */
7
7
  enabled?: boolean;
8
8
  /** Whether this ````ContextMenu```` automatically hides whenever we mouse-down or tap anywhere in the page. */
9
9
  hideOnMouseDown?: boolean;
@@ -41,9 +41,9 @@ export declare class ContextMenu {
41
41
  /**
42
42
  * Sets the ````ContextMenu```` context.
43
43
  *
44
- * The context can be any object that you need to be provides to the callbacks configured on {@link ContextMenu#items}.
44
+ * The context can be any object that you need to be provides to the callbacks configured on {@link ContextMenu.items}.
45
45
  *
46
- * This must be set before calling {@link ContextMenu#show}.
46
+ * This must be set before calling {@link ContextMenu.show}.
47
47
  *
48
48
  * @type {Object}
49
49
  */
@@ -68,7 +68,7 @@ export declare class ContextMenu {
68
68
  /**
69
69
  * Gets whether this ````ContextMenu```` is enabled.
70
70
  *
71
- * {@link ContextMenu#show} does nothing while this is ````false````.
71
+ * {@link ContextMenu.show} does nothing while this is ````false````.
72
72
  *
73
73
  * @type {Boolean}
74
74
  */
@@ -93,9 +93,9 @@ export declare class ContextMenu {
93
93
  /**
94
94
  * Shows this ````ContextMenu```` at the given page coordinates.
95
95
  *
96
- * Does nothing when {@link ContextMenu#enabled} is ````false````.
96
+ * Does nothing when {@link ContextMenu.enabled} is ````false````.
97
97
  *
98
- * Logs error to console and does nothing if {@link ContextMenu#context} has not been set.
98
+ * Logs error to console and does nothing if {@link ContextMenu.context} has not been set.
99
99
  *
100
100
  * Fires a "shown" event when shown.
101
101
  *
@@ -5,7 +5,7 @@ import { Marker } from "../../viewer/scene/marker";
5
5
  /**
6
6
  * @desc Measures the angle indicated by three 3D points.
7
7
  */
8
- export class AngleMeasurement extends Component {
8
+ export declare class AngleMeasurement extends Component {
9
9
  /**
10
10
  * The {@link AngleMeasurementsPlugin} that owns this AngleMeasurement.
11
11
  * @type {AngleMeasurementsPlugin}
@@ -1,4 +1,5 @@
1
1
  import { Component } from "../../viewer/scene/Component";
2
+ import { AngleMeasurement } from "./AngleMeasurement";
2
3
  import { AngleMeasurementsPlugin } from "./AngleMeasurementsPlugin";
3
4
 
4
5
  /**
@@ -6,7 +7,7 @@ import { AngleMeasurementsPlugin } from "./AngleMeasurementsPlugin";
6
7
  *
7
8
  * Once the AngleMeasurementControl is activated, the first click on any {@link Entity} begins constructing a {@link AngleMeasurement}, fixing its origin to that Entity. The next click on any Entity will complete the AngleMeasurement, fixing its target to that second Entity. The AngleMeasurementControl will then wait for the next click on any Entity, to begin constructing another AngleMeasurement, and so on, until deactivated.
8
9
  */
9
- export class AngleMeasurementsControl extends Component {
10
+ export declare class AngleMeasurementsControl extends Component {
10
11
  /**
11
12
  * The {@link AngleMeasurementsPlugin} that owns this AngleMeasurementsControl.
12
13
  * @type {AngleMeasurementsPlugin}
@@ -39,4 +40,28 @@ export class AngleMeasurementsControl extends Component {
39
40
  * Does nothing if the AngleMeasurementsControl is not active.
40
41
  */
41
42
  reset(): void;
43
+
44
+ /**
45
+ * Fires when the measurement is ended.
46
+ * @param event The measurementEnd event
47
+ * @param callback Called fired on the event
48
+ * @param scope Scope for the callback
49
+ */
50
+ on(event: "measurementEnd", callback: (measurement: AngleMeasurement) => void, scope?: any): string
51
+
52
+ /**
53
+ * Fires when the measurement is cancelled.
54
+ * @param event The measurementCancel event
55
+ * @param callback Called fired on the event
56
+ * @param scope Scope for the callback
57
+ */
58
+ on(event: "measurementCancel", callback: (measurement: AngleMeasurement) => void, scope?: any): string
59
+
60
+ /**
61
+ * Fires when the measurement is started.
62
+ * @param event The measurementStart event
63
+ * @param callback Called fired on the event
64
+ * @param scope Scope for the callback
65
+ */
66
+ on(event: "measurementStart", callback: (measurement: AngleMeasurement) => void, scope?: any): string
42
67
  }
@@ -3,7 +3,7 @@ import { AngleMeasurement } from "./AngleMeasurement";
3
3
  import { AngleMeasurementsControl } from "./AngleMeasurementsControl";
4
4
 
5
5
  export declare type AngleMeasurementsPluginConfiguration = {
6
- /** Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. */
6
+ /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
7
7
  id?: string;
8
8
  /** Container DOM element for markers and labels. Defaults to ````document.body````. */
9
9
  container?: HTMLElement;
@@ -17,69 +17,83 @@ export declare type AngleMeasurementsPluginConfiguration = {
17
17
  * {@link Viewer} plugin for measuring angles.
18
18
  */
19
19
  export declare class AngleMeasurementsPlugin extends Plugin {
20
- /**
21
- * @constructor
22
- * @param {Viewer} viewer The Viewer.
23
- * @param {AngleMeasurementsPluginConfiguration} [cfg] Plugin configuration.
24
- */
25
- constructor(viewer: Viewer, cfg?: AngleMeasurementsPluginConfiguration);
20
+ /**
21
+ * @constructor
22
+ * @param {Viewer} viewer The Viewer.
23
+ * @param {AngleMeasurementsPluginConfiguration} [cfg] Plugin configuration.
24
+ */
25
+ constructor(viewer: Viewer, cfg?: AngleMeasurementsPluginConfiguration);
26
26
 
27
- /**
28
- * Gets the {@link AngleMeasurementsControl}, which creates {@link AngleMeasurement}s from user input.
29
- *
30
- * @type {AngleMeasurementsControl}
31
- */
32
- get control(): AngleMeasurementsControl;
27
+ /**
28
+ * Gets the {@link AngleMeasurementsControl}, which creates {@link AngleMeasurement}s from user input.
29
+ *
30
+ * @type {AngleMeasurementsControl}
31
+ */
32
+ get control(): AngleMeasurementsControl;
33
33
 
34
- /**
35
- * Gets the existing {@link AngleMeasurement}s, each mapped to its {@link AngleMeasurement#id}.
36
- *
37
- * @type {{String:AngleMeasurement}}
38
- */
39
- get measurements(): { [key:string]: AngleMeasurement};
34
+ /**
35
+ * Gets the existing {@link AngleMeasurement}s, each mapped to its {@link AngleMeasurement.id}.
36
+ *
37
+ * @type {{String:AngleMeasurement}}
38
+ */
39
+ get measurements(): { [key:string]: AngleMeasurement};
40
40
 
41
- /**
42
- * Creates an {@link AngleMeasurement}.
43
- *
44
- * The AngleMeasurement is then registered by {@link AngleMeasurement#id} in {@link AngleMeasurementsPlugin#measurements}.
45
- *
46
- * @param {Object} params {@link AngleMeasurement} configuration.
47
- * @param {String} params.id Unique ID to assign to {@link AngleMeasurement#id}. The AngleMeasurement will be registered by this in {@link AngleMeasurementsPlugin#measurements} and {@link Scene.components}. Must be unique among all components in the {@link Viewer}.
48
- * @param {Number[]} params.origin.worldPos Origin World-space 3D position.
49
- * @param {Entity} params.origin.entity Origin Entity.
50
- * @param {Number[]} params.corner.worldPos Corner World-space 3D position.
51
- * @param {Entity} params.corner.entity Corner Entity.
52
- * @param {Number[]} params.target.worldPos Target World-space 3D position.
53
- * @param {Entity} params.target.entity Target Entity.
54
- * @param {Boolean} [params.visible=true] Whether to initially show the {@link AngleMeasurement}.
55
- * @returns {AngleMeasurement} The new {@link AngleMeasurement}.
56
- */
57
- createMeasurement(params?: {
58
- id: string;
59
- origin: {
60
- entity: Entity;
61
- worldPos: number[];
62
- },
63
- corner: {
64
- entity: Entity;
65
- worldPos: number[];
66
- },
67
- target: {
68
- entity: Entity;
69
- worldPos: number[];
70
- },
71
- visible?: boolean;
72
- }): AngleMeasurement;
41
+ /**
42
+ * Creates an {@link AngleMeasurement}.
43
+ *
44
+ * The AngleMeasurement is then registered by {@link AngleMeasurement.id} in {@link AngleMeasurementsPlugin.measurements}.
45
+ *
46
+ * @param {Object} params {@link AngleMeasurement} configuration.
47
+ * @param {String} params.id Unique ID to assign to {@link AngleMeasurement.id}. The AngleMeasurement will be registered by this in {@link AngleMeasurementsPlugin.measurements} and {@link Scene.components}. Must be unique among all components in the {@link Viewer}.
48
+ * @param {Number[]} params.origin.worldPos Origin World-space 3D position.
49
+ * @param {Entity} params.origin.entity Origin Entity.
50
+ * @param {Number[]} params.corner.worldPos Corner World-space 3D position.
51
+ * @param {Entity} params.corner.entity Corner Entity.
52
+ * @param {Number[]} params.target.worldPos Target World-space 3D position.
53
+ * @param {Entity} params.target.entity Target Entity.
54
+ * @param {Boolean} [params.visible=true] Whether to initially show the {@link AngleMeasurement}.
55
+ * @returns {AngleMeasurement} The new {@link AngleMeasurement}.
56
+ */
57
+ createMeasurement(params?: {
58
+ id: string;
59
+ origin: {
60
+ entity: Entity;
61
+ worldPos: number[];
62
+ },
63
+ corner: {
64
+ entity: Entity;
65
+ worldPos: number[];
66
+ },
67
+ target: {
68
+ entity: Entity;
69
+ worldPos: number[];
70
+ },
71
+ visible?: boolean;
72
+ }): AngleMeasurement;
73
73
 
74
- /**
75
- * Destroys a {@link AngleMeasurement}.
76
- *
77
- * @param {String} id ID of AngleMeasurement to destroy.
78
- */
79
- destroyMeasurement(id: string): void;
80
-
81
- /**
82
- * Destroys all {@link AngleMeasurement}s.
83
- */
84
- clear(): void;
74
+ /**
75
+ * Destroys a {@link AngleMeasurement}.
76
+ *
77
+ * @param {String} id ID of AngleMeasurement to destroy.
78
+ */
79
+ destroyMeasurement(id: string): void;
80
+
81
+ /**
82
+ * Destroys all {@link AngleMeasurement}s.
83
+ */
84
+ clear(): void;
85
+
86
+ /**
87
+ * Fires when a measurement is created.
88
+ * @param {String} event The measurementCreated event
89
+ * @param {Function} callback Callback fired on the event
90
+ */
91
+ on(event: "measurementCreated", callback: (measurement: AngleMeasurement)=> void): void;
92
+
93
+ /**
94
+ * Fires when a measurement is destroyed.
95
+ * @param {String} event The measurementDestroyed event
96
+ * @param {Function} callback Callback fired on the event
97
+ */
98
+ on(event: "measurementDestroyed", callback: (measurement: AngleMeasurement)=> void): void;
85
99
  }
@@ -1,9 +1,10 @@
1
+ import { Marker } from "../../viewer/scene/marker";
1
2
  import { AnnotationsPlugin } from "./AnnotationsPlugin";
3
+
2
4
  /**
3
5
  * A {@link Marker} with an HTML label attached to it, managed by an {@link AnnotationsPlugin}.
4
6
  */
5
- export class Annotation {
6
-
7
+ export declare class Annotation extends Marker {
7
8
  /**
8
9
  * The {@link AnnotationsPlugin} this Annotation was created by.
9
10
  * @type {AnnotationsPlugin}
@@ -11,7 +12,7 @@ export class Annotation {
11
12
  plugin: AnnotationsPlugin;
12
13
 
13
14
  /**
14
- * Optional World-space position for {@link Camera#eye}, used when this Annotation is associated with a {@link Camera} position.
15
+ * Optional World-space position for {@link Camera.eye}, used when this Annotation is associated with a {@link Camera} position.
15
16
  *
16
17
  * Undefined by default.
17
18
  *
@@ -20,7 +21,7 @@ export class Annotation {
20
21
  eye: number[];
21
22
 
22
23
  /**
23
- * Optional World-space position for {@link Camera#look}, used when this Annotation is associated with a {@link Camera} position.
24
+ * Optional World-space position for {@link Camera.look}, used when this Annotation is associated with a {@link Camera} position.
24
25
  *
25
26
  * Undefined by default.
26
27
  *
@@ -29,7 +30,7 @@ export class Annotation {
29
30
  look: number[];
30
31
 
31
32
  /**
32
- * Optional World-space position for {@link Camera#up}, used when this Annotation is associated with a {@link Camera} position.
33
+ * Optional World-space position for {@link Camera.up}, used when this Annotation is associated with a {@link Camera} position.
33
34
  *
34
35
  * Undefined by default.
35
36
  *
@@ -38,7 +39,7 @@ export class Annotation {
38
39
  up: number[];
39
40
 
40
41
  /**
41
- * Optional projection type for {@link Camera#projection}, used when this Annotation is associated with a {@link Camera} position.
42
+ * Optional projection type for {@link Camera.projection}, used when this Annotation is associated with a {@link Camera} position.
42
43
  *
43
44
  * Undefined by default.
44
45
  *
@@ -51,7 +52,7 @@ export class Annotation {
51
52
  *
52
53
  * The marker shows the Annotation's position.
53
54
  *
54
- * The marker is only visible when both this property and {@link Annotation#visible} are ````true````.
55
+ * The marker is only visible when both this property and {@link Annotation.visible} are ````true````.
55
56
  *
56
57
  * See {@link AnnotationsPlugin} for more info.
57
58
  *
@@ -64,7 +65,7 @@ export class Annotation {
64
65
  *
65
66
  * The marker shows the Annotation's position.
66
67
  *
67
- * The marker is only visible when both this property and {@link Annotation#visible} are ````true````.
68
+ * The marker is only visible when both this property and {@link Annotation.visible} are ````true````.
68
69
  *
69
70
  * See {@link AnnotationsPlugin} for more info.
70
71
  *
@@ -75,7 +76,7 @@ export class Annotation {
75
76
  /**
76
77
  * Sets whether or not to show this Annotation's label.
77
78
  *
78
- * The label is only visible when both this property and {@link Annotation#visible} are ````true````.
79
+ * The label is only visible when both this property and {@link Annotation.visible} are ````true````.
79
80
  *
80
81
  * See {@link AnnotationsPlugin} for more info.
81
82
  *
@@ -86,7 +87,7 @@ export class Annotation {
86
87
  /**
87
88
  * Gets whether or not to show this Annotation's label.
88
89
  *
89
- * The label is only visible when both this property and {@link Annotation#visible} are ````true````.
90
+ * The label is only visible when both this property and {@link Annotation.visible} are ````true````.
90
91
  *
91
92
  * See {@link AnnotationsPlugin} for more info.
92
93
  *