@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
@@ -1,15 +1,15 @@
1
1
  import { Plugin, Viewer, PerformanceModel, IFCObjectDefaults } from "../../viewer";
2
2
 
3
3
  export declare type XKTLoaderPluginConfiguration = {
4
- /** Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. */
4
+ /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
5
5
  id?: string;
6
6
  /** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}.*/
7
7
  objectDefaults?: IFCObjectDefaults;
8
8
  /** A custom data source through which the XKTLoaderPlugin can load model and metadata files. Defaults to an instance of {@link XKTDefaultDataSource}, which loads uover HTTP. */
9
9
  dataSource?: IXKTDefaultDataSource;
10
- /** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list. */
10
+ /** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
11
11
  includeTypes?: string[];
12
- /** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list. */
12
+ /** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
13
13
  excludeTypes?: string[];
14
14
  /** When loading metadata and this is ````true````, will only load {@link Entity}s that have {@link MetaObject}s (that are not excluded). This is useful when we don't want Entitys in the Scene that are not represented within IFC navigation components, such as {@link TreeViewPlugin}. */
15
15
  excludeUnclassifiedObjects?: boolean;
@@ -20,7 +20,7 @@ export declare type XKTLoaderPluginConfiguration = {
20
20
  };
21
21
 
22
22
  export declare type LoadXKTModel = {
23
- /** ID to assign to the root {@link Entity#id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
23
+ /** ID to assign to the root {@link Entity.id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
24
24
  id?: string;
25
25
  /** Path to a *````.xkt````* file, as an alternative to the ````xkt```` parameter. */
26
26
  src?: string;
@@ -32,9 +32,9 @@ export declare type LoadXKTModel = {
32
32
  metaModelData?: any;
33
33
  /** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
34
34
  objectDefaults?: object;
35
- /** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list. */
35
+ /** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
36
36
  includeTypes?: string[]
37
- /** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list. */
37
+ /** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
38
38
  excludeTypes?: string[];
39
39
  /** Whether or not xeokit renders the model with edges emphasized. */
40
40
  edges?: boolean;
@@ -48,15 +48,15 @@ export declare type LoadXKTModel = {
48
48
  rotation?: number[];
49
49
  /** The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````.*/
50
50
  matrix?: number[];
51
- /** Indicates if Scalable Ambient Obscurance (SAO) will apply to the model. SAO is configured by the Scene's {@link SAO} component. Only works when {@link SAO#enabled} is also ````true```` */
51
+ /** Indicates if Scalable Ambient Obscurance (SAO) will apply to the model. SAO is configured by the Scene's {@link SAO} component. Only works when {@link SAO.enabled} is also ````true```` */
52
52
  saoEnabled?: boolean;
53
- /** Indicates if physically-based rendering (PBR) will apply to the model. Only works when {@link Scene#pbrEnabled} is also ````true````. */
53
+ /** Indicates if physically-based rendering (PBR) will apply to the model. Only works when {@link Scene.pbrEnabled} is also ````true````. */
54
54
  pbrEnabled?: boolean;
55
55
  /** When we set this ````true````, then we force rendering of backfaces for the model. */
56
56
  backfaces?: boolean;
57
57
  /** When loading metadata and this is ````true````, will only load {@link Entity}s that have {@link MetaObject}s (that are not excluded). */
58
58
  excludeUnclassifiedObjects?: boolean;
59
- /** Indicates whether to globalize each {@link Entity#id} and {@link MetaObject#id}, in case you need to prevent ID clashes with other models. */
59
+ /** Indicates whether to globalize each {@link Entity.id} and {@link MetaObject.id}, in case you need to prevent ID clashes with other models. */
60
60
  globalizeObjectIds?: boolean;
61
61
  /** Indicates whether to enable geometry reuse */
62
62
  reuseGeometries?: boolean;
@@ -131,7 +131,7 @@ export declare interface IXKTDefaultDataSource {
131
131
  * Sets the whitelist of the IFC types loaded by this XKTLoaderPlugin.
132
132
  *
133
133
  * When loading models with metadata, causes this XKTLoaderPlugin to only load objects whose types are in this
134
- * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject#type}.
134
+ * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
135
135
  *
136
136
  * Default value is ````undefined````.
137
137
  *
@@ -143,7 +143,7 @@ export declare interface IXKTDefaultDataSource {
143
143
  * Gets the whitelist of the IFC types loaded by this XKTLoaderPlugin.
144
144
  *
145
145
  * When loading models with metadata, causes this XKTLoaderPlugin to only load objects whose types are in this
146
- * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject#type}.
146
+ * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
147
147
  *
148
148
  * Default value is ````undefined````.
149
149
  *
@@ -156,7 +156,7 @@ export declare interface IXKTDefaultDataSource {
156
156
  * Sets the blacklist of IFC types that are never loaded by this XKTLoaderPlugin.
157
157
  *
158
158
  * When loading models with metadata, causes this XKTLoaderPlugin to **not** load objects whose types are in this
159
- * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject#type}.
159
+ * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
160
160
  *
161
161
  * Default value is ````undefined````.
162
162
  *
@@ -168,7 +168,7 @@ export declare interface IXKTDefaultDataSource {
168
168
  * Gets the blacklist of IFC types that are never loaded by this XKTLoaderPlugin.
169
169
  *
170
170
  * When loading models with metadata, causes this XKTLoaderPlugin to **not** load objects whose types are in this
171
- * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject#type}.
171
+ * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
172
172
  *
173
173
  * Default value is ````undefined````.
174
174
  *
@@ -211,7 +211,7 @@ export declare interface IXKTDefaultDataSource {
211
211
  *
212
212
  * The result will be be less WebGL draw calls (which are expensive), at the cost of increased memory footprint.
213
213
  *
214
- * See [#769](https://github.com/xeokit/xeokit-sdk/issues/769) for more info.
214
+ * See [.769](https://github.com/xeokit/xeokit-sdk/issues/769) for more info.
215
215
  *
216
216
  * @type {Boolean}
217
217
  */
@@ -233,15 +233,15 @@ export declare interface IXKTDefaultDataSource {
233
233
  get supportedVersions(): string[];
234
234
 
235
235
  /**
236
- * Sets whether XKTLoaderPlugin globalizes each {@link Entity#id} and {@link MetaObject#id} as it loads a model.
236
+ * Sets whether XKTLoaderPlugin globalizes each {@link Entity.id} and {@link MetaObject.id} as it loads a model.
237
237
  *
238
238
  * Set this ````true```` when you need to load multiple instances of the same model, to avoid ID clashes
239
239
  * between the objects in the different instances.
240
240
  *
241
- * When we load a model with this set ````true````, then each {@link Entity#id} and {@link MetaObject#id} will be
242
- * prefixed by the ID of the model, ie. ````<modelId>#<objectId>````.
241
+ * When we load a model with this set ````true````, then each {@link Entity.id} and {@link MetaObject.id} will be
242
+ * prefixed by the ID of the model, ie. ````<modelId>.<objectId>````.
243
243
  *
244
- * {@link Entity#originalSystemId} and {@link MetaObject#originalSystemId} will always hold the original, un-prefixed, ID values.
244
+ * {@link Entity.originalSystemId} and {@link MetaObject.originalSystemId} will always hold the original, un-prefixed, ID values.
245
245
  *
246
246
  * Default value is ````false````.
247
247
  *
@@ -252,7 +252,7 @@ export declare interface IXKTDefaultDataSource {
252
252
  set globalizeObjectIds(arg: boolean);
253
253
 
254
254
  /**
255
- * Gets whether XKTLoaderPlugin globalizes each {@link Entity#id} and {@link MetaObject#id} as it loads a model.
255
+ * Gets whether XKTLoaderPlugin globalizes each {@link Entity.id} and {@link MetaObject.id} as it loads a model.
256
256
  *
257
257
  * Default value is ````false````.
258
258
  *
@@ -271,7 +271,7 @@ export declare interface IXKTDefaultDataSource {
271
271
  * in data pipelines), then that metamodel will be loaded and the metamodel in the XKT 8 file will be ignored.
272
272
  *
273
273
  * @param {LoadXKTModel} params Loading parameters.
274
- * @returns {PerformanceModel} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}.
274
+ * @returns {PerformanceModel} Entity representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}.
275
275
  */
276
276
  load(params: LoadXKTModel): PerformanceModel;
277
277
  }
@@ -1,13 +1,13 @@
1
1
  import { Plugin, Viewer, PerformanceModel } from "../../viewer";
2
2
 
3
3
  export declare type XML3DLoaderPluginConfiguration = {
4
- /** Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. */
4
+ /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
5
5
  id?: string;
6
6
  /** Path to the directory that contains the bundled [zip.js](https://gildas-lormeau.github.io/zip.js/) archive */
7
7
  workerScriptsPath: string;
8
8
  /** What type of materials to create while loading */
9
9
  materialType?: "MetallicMaterial" | "SpecularMaterial" | "PhongMaterial";
10
- /** When true, will create a {@link MetaModel} for the model in {@link MetaScene#metaModels}. */
10
+ /** When true, will create a {@link MetaModel} for the model in {@link MetaScene.metaModels}. */
11
11
  createMetaModel?: boolean;
12
12
  }
13
13
 
@@ -32,7 +32,7 @@ export declare type LoadXML3DModel = {
32
32
  edgeThreshold?: number;
33
33
  /** What type of materials to create while loading: "MetallicMaterial" to create {@link MetallicMaterial}s, "SpecularMaterial" to create {@link SpecularMaterial}s or "PhongMaterial" to create {@link PhongMaterial}s. As it loads XML3D's Phong materials, the XMLLoaderPlugin will do its best approximate conversion of those to the specified workflow. */
34
34
  materialType?: "MetallicMaterial" | "SpecularMaterial" | "PhongMaterial";
35
- /** When true, will create a {@link MetaModel} for the model in {@link MetaScene#metaModels}. */
35
+ /** When true, will create a {@link MetaModel} for the model in {@link MetaScene.metaModels}. */
36
36
  createMetaModel?: boolean;
37
37
  };
38
38
 
@@ -59,7 +59,7 @@ export declare class XML3DLoaderPlugin extends Plugin {
59
59
  * Creates a tree of {@link Entity}s within the Viewer's {@link Scene} that represents the model.
60
60
  *
61
61
  * @param {LoadXML3DModel} params Loading parameters.
62
- * @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}
62
+ * @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}
63
63
  */
64
64
  load(params: LoadXML3DModel): PerformanceModel;
65
65
  }
@@ -28,16 +28,16 @@ export declare abstract class Plugin {
28
28
  viewer: Viewer;
29
29
 
30
30
  /**
31
- Subscribes to an event fired at this Plugin.
32
- @param {String} event The event
33
- @param {Function} callback Callback fired on the event
31
+ * Subscribes to an event fired at this Plugin.
32
+ * @param {String} event The event
33
+ * @param {Function} callback Callback fired on the event
34
34
  */
35
35
  on(event: string, callback: ()=> void): void;
36
36
 
37
37
  /**
38
- Fires an event at this Plugin.
39
- @param {String} event The event type name
40
- @param {Object} value The event parameters
38
+ * Fires an event at this Plugin.
39
+ * @param {String} event The event type name
40
+ * @param {Object} value The event parameters
41
41
  */
42
42
  fire(event: string, value: any): void;
43
43
 
@@ -1,27 +1,27 @@
1
1
  import { LocaleService } from "./localization/LocaleService";
2
2
  import { Scene } from "./scene/scene/Scene";
3
3
  import { MetaScene } from "./metadata/MetaScene";
4
- import { Camera } from "./scene/Camera";
5
- import { CameraFlightAnimation } from "./scene/Camera/CameraFlightAnimation";
4
+ import { Camera } from "./scene/camera/Camera";
5
+ import { CameraFlightAnimation } from "./scene/camera/CameraFlightAnimation";
6
6
  import { CameraControl } from "./scene/CameraControl/CameraControl";
7
7
  import { Plugin } from "./Plugin";
8
8
 
9
9
  export declare type ViewerConfiguration = {
10
- /** Optional ID for this Viewer, defaults to the ID of {@link Viewer#scene}, which xeokit automatically generates. */
10
+ /** Optional ID for this Viewer, defaults to the ID of {@link Viewer.scene}, which xeokit automatically generates. */
11
11
  id?: string;
12
- /** ID of an existing HTML canvas for the {@link Viewer#scene} - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID. */
12
+ /** ID of an existing HTML canvas for the {@link Viewer.scene} - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID. */
13
13
  canvasId?: string;
14
- /** Reference of an existing HTML canvas for the {@link Viewer#scene} - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID. */
14
+ /** Reference of an existing HTML canvas for the {@link Viewer.scene} - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID. */
15
15
  canvasElement?: HTMLCanvasElement;
16
16
  /** Optional reference to HTML element on which key events should be handled. Defaults to the HTML Document. */
17
17
  keyboardEventsElement?: HTMLElement;
18
18
  /** ID of existing HTML element to show the {@link Spinner} - internally creates a default element automatically if this is omitted. */
19
19
  spinnerElementId?: string;
20
- /** The number of times the {@link Viewer#scene} renders per frame. */
20
+ /** The number of times the {@link Viewer.scene} renders per frame. */
21
21
  passes?: number;
22
22
  /** When doing multiple passes per frame, specifies if to clear the canvas before each pass (true) or just before the first pass (false). */
23
23
  clearEachPass?: boolean;
24
- /** Whether or not to preserve the WebGL drawing buffer. This needs to be ````true```` for {@link Viewer#getSnapshot} to work.*/
24
+ /** Whether or not to preserve the WebGL drawing buffer. This needs to be ````true```` for {@link Viewer.getSnapshot} to work.*/
25
25
  preserveDrawingBuffer?: boolean;
26
26
  /** Whether or not the canvas is transparent. */
27
27
  transparent?: boolean;
@@ -35,7 +35,7 @@ export declare type ViewerConfiguration = {
35
35
  gammaFactor?: number;
36
36
  /** Sets the canvas background color to use when ````transparent```` is false. */
37
37
  backgroundColor?: number[];
38
- /**When ````transparent```` is false, set this ````true```` to derive the canvas background color from {@link AmbientLight#color}, or ````false```` to set the canvas background to ````backgroundColor````. */
38
+ /**When ````transparent```` is false, set this ````true```` to derive the canvas background color from {@link AmbientLight.color}, or ````false```` to set the canvas background to ````backgroundColor````. */
39
39
  backgroundColorFromAmbientLight?: boolean;
40
40
  /** The measurement unit type. */
41
41
  units?: "meters" | "centimeters" | "millimeters" | "yards" | "feet" | "inches" ;
@@ -49,9 +49,9 @@ export declare type ViewerConfiguration = {
49
49
  antialias?: boolean;
50
50
  /** Whether writing into the depth buffer is enabled or disabled when rendering transparent objects. */
51
51
  alphaDepthMask?: boolean;
52
- /** Whether to enable {@link Entity#offset}. For best performance, only set this ````true```` when you need to use {@link Entity#offset}. */
52
+ /** Whether to enable {@link Entity.offset}. For best performance, only set this ````true```` when you need to use {@link Entity.offset}. */
53
53
  entityOffsetsEnabled?: boolean;
54
- /** Whether to enable full-precision accuracy when surface picking with {@link Scene#pick}. */
54
+ /** Whether to enable full-precision accuracy when surface picking with {@link Scene.pick}. */
55
55
  pickSurfacePrecisionEnabled?: boolean;
56
56
  /** Whether to enable logarithmic depth buffer. */
57
57
  logarithmicDepthBufferEnabled?: boolean;
@@ -109,7 +109,7 @@ export declare class Viewer {
109
109
  id: string | number;
110
110
 
111
111
  /**
112
- * The Viewer's {@link Camera}. This is also found on {@link Scene#camera}.
112
+ * The Viewer's {@link Camera}. This is also found on {@link Scene.camera}.
113
113
  * @property camera
114
114
  * @type {Camera}
115
115
  */
@@ -166,14 +166,14 @@ export declare class Viewer {
166
166
  *
167
167
  * @private
168
168
  */
169
- addPlugin(plugin: Plugin);
169
+ addPlugin(plugin: Plugin): void;
170
170
 
171
171
  /**
172
172
  * Enter snapshot mode.
173
173
  *
174
174
  * Switches rendering to a hidden snapshot canvas.
175
175
  *
176
- * Exit snapshot mode using {@link Viewer#endSnapshot}.
176
+ * Exit snapshot mode using {@link Viewer.endSnapshot}.
177
177
  */
178
178
  beginSnapshot(): void;
179
179
 
@@ -7,170 +7,177 @@ export declare type LocaleServiceConfiguration = {
7
7
  * Localization service for a {@link Viewer}.
8
8
  */
9
9
  export declare class LocaleService {
10
- /**
11
- * @constructor
12
- * @param {LocaleServiceConfiguration} cfg LocaleService configuration
13
- */
14
- constructor(cfg?: LocaleServiceConfiguration);
10
+ /**
11
+ * @constructor
12
+ * @param {LocaleServiceConfiguration} cfg LocaleService configuration
13
+ */
14
+ constructor(cfg?: LocaleServiceConfiguration);
15
15
 
16
- /**
17
- * Replaces the current set of locale translations.
18
- *
19
- * * Fires an "updated" event when done.
20
- * * Automatically refreshes any plugins that depend on the translations.
21
- * * Does not change the current locale.
22
- *
23
- * ## Usage
24
- *
25
- * ````javascript
26
- * viewer.localeService.setMessages({
27
- * messages: {
28
- * "en": { // English
29
- * "NavCube": {
30
- * "front": "Front",
31
- * "back": "Back",
32
- * "top": "Top",
33
- * "bottom": "Bottom",
34
- * "left": "Left",
35
- * "right": "Right"
36
- * }
37
- * },
38
- * "mi": { // Māori
39
- * "NavCube": {
40
- * "front": "Mua",
41
- * "back": "Tuarā",
42
- * "top": "Runga",
43
- * "bottom": "Raro",
44
- * "left": "Mauī",
45
- * "right": "Tika"
46
- * }
47
- * }
48
- * }
49
- * });
50
- * ````
51
- *
52
- * @param {*} messages The new translations.
53
- */
16
+ /**
17
+ * Replaces the current set of locale translations.
18
+ *
19
+ * * Fires an "updated" event when done.
20
+ * * Automatically refreshes any plugins that depend on the translations.
21
+ * * Does not change the current locale.
22
+ *
23
+ * ## Usage
24
+ *
25
+ * ````javascript
26
+ * viewer.localeService.setMessages({
27
+ * messages: {
28
+ * "en": { // English
29
+ * "NavCube": {
30
+ * "front": "Front",
31
+ * "back": "Back",
32
+ * "top": "Top",
33
+ * "bottom": "Bottom",
34
+ * "left": "Left",
35
+ * "right": "Right"
36
+ * }
37
+ * },
38
+ * "mi": { // Māori
39
+ * "NavCube": {
40
+ * "front": "Mua",
41
+ * "back": "Tuarā",
42
+ * "top": "Runga",
43
+ * "bottom": "Raro",
44
+ * "left": "Mauī",
45
+ * "right": "Tika"
46
+ * }
47
+ * }
48
+ * }
49
+ * });
50
+ * ````
51
+ *
52
+ * @param {*} messages The new translations.
53
+ */
54
54
 
55
- set messages(arg: any);
55
+ set messages(arg: any);
56
56
 
57
- /**
58
- * Sets the current locale.
59
- *
60
- * * Fires an "updated" event when done.
61
- * * The given locale does not need to be in the list of available locales returned by {@link LocaleService#locales}, since
62
- * this method assumes that you may want to load the locales at a later point.
63
- * * Automatically refreshes any plugins that depend on the translations.
64
- * * We can then get translations for the locale, if translations have been loaded for it, via {@link LocaleService#translate} and {@link LocaleService#translatePlurals}.
65
- *
66
- * @param {String} locale The new current locale.
67
- */
68
- set locale(arg: string);
57
+ /**
58
+ * Sets the current locale.
59
+ *
60
+ * * Fires an "updated" event when done.
61
+ * * The given locale does not need to be in the list of available locales returned by {@link LocaleService.locales}, since
62
+ * this method assumes that you may want to load the locales at a later point.
63
+ * * Automatically refreshes any plugins that depend on the translations.
64
+ * * We can then get translations for the locale, if translations have been loaded for it, via {@link LocaleService.translate} and {@link LocaleService.translatePlurals}.
65
+ *
66
+ * @param {String} locale The new current locale.
67
+ */
68
+ set locale(arg: string);
69
69
 
70
- /**
71
- * Gets the current locale.
72
- *
73
- * @returns {String} The current locale.
74
- */
75
- get locale(): string;
70
+ /**
71
+ * Gets the current locale.
72
+ *
73
+ * @returns {String} The current locale.
74
+ */
75
+ get locale(): string;
76
76
 
77
- /**
78
- * Loads a new set of locale translations, adding them to the existing translations.
79
- *
80
- * * Fires an "updated" event when done.
81
- * * Automatically refreshes any plugins that depend on the translations.
82
- * * Does not change the current locale.
83
- *
84
- * ## Usage
85
- *
86
- * ````javascript
87
- * viewer.localeService.loadMessages({
88
- * "jp": { // Japanese
89
- * "NavCube": {
90
- * "front": "前部",
91
- * "back": "裏",
92
- * "top": "上",
93
- * "bottom": "底",
94
- * "left": "左",
95
- * "right": "右"
96
- * }
97
- * }
98
- * });
99
- * ````
100
- *
101
- * @param {*} messages The new translations.
102
- */
103
- loadMessages(messages?: any): void;
77
+ /**
78
+ * Loads a new set of locale translations, adding them to the existing translations.
79
+ *
80
+ * * Fires an "updated" event when done.
81
+ * * Automatically refreshes any plugins that depend on the translations.
82
+ * * Does not change the current locale.
83
+ *
84
+ * ## Usage
85
+ *
86
+ * ````javascript
87
+ * viewer.localeService.loadMessages({
88
+ * "jp": { // Japanese
89
+ * "NavCube": {
90
+ * "front": "前部",
91
+ * "back": "裏",
92
+ * "top": "上",
93
+ * "bottom": "底",
94
+ * "left": "左",
95
+ * "right": "右"
96
+ * }
97
+ * }
98
+ * });
99
+ * ````
100
+ *
101
+ * @param {*} messages The new translations.
102
+ */
103
+ loadMessages(messages?: any): void;
104
104
 
105
- /**
106
- * Clears all locale translations.
107
- *
108
- * * Fires an "updated" event when done.
109
- * * Does not change the current locale.
110
- * * Automatically refreshes any plugins that depend on the translations, which will cause those
111
- * plugins to fall back on their internal hard-coded text values, since this method removes all
112
- * our translations.
113
- */
114
- clearMessages(): void;
105
+ /**
106
+ * Clears all locale translations.
107
+ *
108
+ * * Fires an "updated" event when done.
109
+ * * Does not change the current locale.
110
+ * * Automatically refreshes any plugins that depend on the translations, which will cause those
111
+ * plugins to fall back on their internal hard-coded text values, since this method removes all
112
+ * our translations.
113
+ */
114
+ clearMessages(): void;
115
115
 
116
- /**
117
- * Gets the list of available locales.
118
- *
119
- * These are derived from the currently configured set of translations.
120
- *
121
- * @returns {String[]} The list of available locales.
122
- */
116
+ /**
117
+ * Gets the list of available locales.
118
+ *
119
+ * These are derived from the currently configured set of translations.
120
+ *
121
+ * @returns {String[]} The list of available locales.
122
+ */
123
123
 
124
- get locales(): string[];
125
- /**
126
- * Translates the given string according to the current locale.
127
- *
128
- * Returns null if no translation can be found.
129
- *
130
- * @param {String} msg String to translate.
131
- * @param {*} [args] Extra parameters.
132
- * @returns {String|null} Translated string if found, else null.
133
- */
124
+ get locales(): string[];
125
+ /**
126
+ * Translates the given string according to the current locale.
127
+ *
128
+ * Returns null if no translation can be found.
129
+ *
130
+ * @param {String} msg String to translate.
131
+ * @param {*} [args] Extra parameters.
132
+ * @returns {String|null} Translated string if found, else null.
133
+ */
134
134
 
135
- translate(msg: string, args?: any): string | null;
135
+ translate(msg: string, args?: any): string | null;
136
136
 
137
- /**
138
- * Translates the given phrase according to the current locale.
139
- *
140
- * Returns null if no translation can be found.
141
- *
142
- * @param {String} msg Phrase to translate.
143
- * @param {Number} count The plural number.
144
- * @param {*} [args] Extra parameters.
145
- * @returns {String|null} Translated string if found, else null.
146
- */
147
- translatePlurals(msg: string, count: number, args?: any): string | null;
137
+ /**
138
+ * Translates the given phrase according to the current locale.
139
+ *
140
+ * Returns null if no translation can be found.
141
+ *
142
+ * @param {String} msg Phrase to translate.
143
+ * @param {Number} count The plural number.
144
+ * @param {*} [args] Extra parameters.
145
+ * @returns {String|null} Translated string if found, else null.
146
+ */
147
+ translatePlurals(msg: string, count: number, args?: any): string | null;
148
148
 
149
- /**
150
- * Fires an event on this LocaleService.
151
- *
152
- * Notifies existing subscribers to the event, optionally retains the event to give to
153
- * any subsequent notifications on the event as they are made.
154
- *
155
- * @param {String} event The event type name.
156
- * @param {Object} value The event parameters.
157
- * @param {Boolean} [forget=false] When true, does not retain for subsequent subscribers.
158
- */
159
- fire(event: string, value: any, forget?: boolean): void;
149
+ /**
150
+ * Fires an event on this LocaleService.
151
+ *
152
+ * Notifies existing subscribers to the event, optionally retains the event to give to
153
+ * any subsequent notifications on the event as they are made.
154
+ *
155
+ * @param {String} event The event type name.
156
+ * @param {Object} value The event parameters.
157
+ * @param {Boolean} [forget=false] When true, does not retain for subsequent subscribers.
158
+ */
159
+ fire(event: string, value: any, forget?: boolean): void;
160
160
 
161
- /**
162
- * Subscribes to an event on this LocaleService.
163
- *
164
- * @param {String} event The event
165
- * @param {Function} callback Callback fired on the event
166
- * @return {String} Handle to the subscription, which may be used to unsubscribe with {@link #off}.
167
- */
168
- on(event: string, callback: Function): string;
161
+ /**
162
+ * Subscribes to an event on this LocaleService.
163
+ *
164
+ * @param {String} event The event
165
+ * @param {Function} callback Callback fired on the event
166
+ * @return {String} Handle to the subscription, which may be used to unsubscribe with {@link .off}.
167
+ */
168
+ on(event: string, callback: Function): string;
169
169
 
170
- /**
171
- * Cancels an event subscription that was previously made with {@link LocaleService#on}.
172
- *
173
- * @param {String} subId Subscription ID
174
- */
175
- off(subId: string): void;
170
+ /**
171
+ * Cancels an event subscription that was previously made with {@link LocaleService.on}.
172
+ *
173
+ * @param {String} subId Subscription ID
174
+ */
175
+ off(subId: string): void;
176
+
177
+ /**
178
+ * Fires when the messages or the locale are updated
179
+ * @param event The loaded event
180
+ * @param callback Called fired on the event
181
+ */
182
+ on(event: "updated", callback: (e: LocaleService | string) => void): string
176
183
  }
@@ -9,9 +9,9 @@ export declare class MetaModel {
9
9
  /**
10
10
  * Globally-unique ID.
11
11
  *
12
- * MetaModels are registered by ID in {@link MetaScene#metaModels}.
12
+ * MetaModels are registered by ID in {@link MetaScene.metaModels}.
13
13
  *
14
- * When this MetaModel corresponds to an {@link Entity} then this ID will match the {@link Entity#id}.
14
+ * When this MetaModel corresponds to an {@link Entity} then this ID will match the {@link Entity.id}.
15
15
  *
16
16
  */
17
17
  id: string | number;