@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
@@ -2,7 +2,7 @@ import { Plugin, Viewer } from "../../viewer";
2
2
  import { SectionPlane } from "../../viewer/scene/sectionPlane";
3
3
 
4
4
  export declare type SectionPlanesPluginConfiguration = {
5
- /** Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. */
5
+ /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
6
6
  id?: string;
7
7
  /** ID of a canvas element to display the overview. */
8
8
  overviewCanvasId?: string;
@@ -38,14 +38,14 @@ export declare class SectionPlanesPlugin extends Plugin {
38
38
  /**
39
39
  * Returns a map of the {@link SectionPlane}s created by this SectionPlanesPlugin.
40
40
  *
41
- * @returns {{String:SectionPlane}} A map containing the {@link SectionPlane}s, each mapped to its {@link SectionPlane#id}.
41
+ * @returns {{String:SectionPlane}} A map containing the {@link SectionPlane}s, each mapped to its {@link SectionPlane.id}.
42
42
  */
43
43
  get sectionPlanes(): { [key:string]: SectionPlane };
44
44
 
45
45
  /**
46
46
  * Creates a {@link SectionPlane}.
47
47
  *
48
- * The {@link SectionPlane} will be registered by {@link SectionPlane#id} in {@link SectionPlanesPlugin#sectionPlanes}.
48
+ * The {@link SectionPlane} will be registered by {@link SectionPlane.id} in {@link SectionPlanesPlugin.sectionPlanes}.
49
49
  *
50
50
  * @param {Object} params {@link SectionPlane} configuration.
51
51
  * @param {String} [params.id] Unique ID to assign to the {@link SectionPlane}. Must be unique among all components in the {@link Viewer}'s {@link Scene}. Auto-generated when omitted.
@@ -62,7 +62,7 @@ export declare class SectionPlanesPlugin extends Plugin {
62
62
  }): SectionPlane;
63
63
 
64
64
  /**
65
- * Inverts the direction of {@link SectionPlane#dir} on every existing SectionPlane.
65
+ * Inverts the direction of {@link SectionPlane.dir} on every existing SectionPlane.
66
66
  *
67
67
  * Inverts all SectionPlanes, including those that were not created with SectionPlanesPlugin.
68
68
  */
@@ -3,7 +3,7 @@ import { Plugin, Viewer } from "../../viewer";
3
3
  /**
4
4
  * {@link Viewer} plugin that manages skyboxes
5
5
  */
6
- export class SkyboxesPlugin extends Plugin {
6
+ export declare class SkyboxesPlugin extends Plugin {
7
7
  /**
8
8
  * @constructor
9
9
  * @param {Viewer} viewer The Viewer.
@@ -12,7 +12,7 @@ export declare type IFCStoreyPlanObjectStates = {
12
12
  };
13
13
 
14
14
  export declare type StoreyViewsPluginConfiguration = {
15
- /** Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. */
15
+ /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
16
16
  id?: string;
17
17
  /** Map of visual states for the {@link Entity}s as rendered within each {@link Storey}. Default value is {@link IFCStoreyPlanObjectStates}. */
18
18
  objectStates?: IFCStoreyPlanObjectStates;
@@ -22,152 +22,159 @@ export declare type StoreyViewsPluginConfiguration = {
22
22
  * A {@link Viewer} plugin that provides methods for visualizing IfcBuildingStoreys.
23
23
  */
24
24
  export declare class StoreyViewsPlugin extends Plugin {
25
- /**
26
- * @constructor
27
- *
28
- * @param {Viewer} viewer The Viewer.
29
- * @param {StoreyViewsPluginConfiguration} cfg Plugin configuration.
30
- */
31
- constructor(viewer: Viewer, cfg?: StoreyViewsPluginConfiguration);
32
-
33
- /**
34
- * A {@link Storey} for each ````IfcBuildingStorey```.
35
- *
36
- * There will be a {@link Storey} for every existing {@link MetaObject} whose {@link MetaObject#type} equals "IfcBuildingStorey".
37
- *
38
- * These are created and destroyed automatically as models are loaded and destroyed.
39
- *
40
- * @type {{String:Storey}}
41
- */
42
- storeys: {[key: string]: Storey };
43
-
44
- /**
45
- * A set of {@link Storey}s for each {@link MetaModel}.
46
- *
47
- * These are created and destroyed automatically as models are loaded and destroyed.
48
- *
49
- * @type {{String: {String:Storey}}}
50
- */
51
- modelStoreys: {[key: string]: { [key: string]: Storey} };
52
-
53
- /**
54
- * Sets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
55
- *
56
- * Default value is {@link IFCStoreyPlanObjectStates}.
57
- *
58
- * @type {IFCStoreyPlanObjectStates}
59
- */
60
- set objectStates(arg: IFCStoreyPlanObjectStates);
61
-
62
- /**
63
- * Gets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
64
- *
65
- * Default value is {@link IFCStoreyPlanObjectStates}.
66
- *
67
- * @type {IFCStoreyPlanObjectStates}
68
- */
69
- get objectStates(): IFCStoreyPlanObjectStates;
70
-
71
- /**
72
- * Arranges the {@link Camera} for a 3D orthographic view of the {@link Entity}s within the given storey.
73
- *
74
- * See also: {@link CameraMemento}, which saves and restores the state of the {@link Scene}'s {@link Camera}
75
- *
76
- * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
77
- * @param {*} [options] Options for arranging the Camera.
78
- * @param {String} [options.projection] Projection type to transition the Camera to. Accepted values are "perspective" and "ortho".
79
- * @param {Function} [options.done] Callback to fire when the Camera has arrived. When provided, causes an animated flight to the saved state. Otherwise jumps to the saved state.
80
- */
81
- gotoStoreyCamera(storeyId: string, options?: {
82
- projection?: string;
83
- done?: Function
84
- }): void;
85
-
86
- /**
87
- * Shows the {@link Entity}s within the given storey.
88
- *
89
- * Optionally hides all other Entitys.
90
- *
91
- * Optionally sets the visual appearance of each of the Entitys according to its IFC type. The appearance of
92
- * IFC types in plan views is configured by {@link StoreyViewsPlugin#objectStates}.
93
- *
94
- * See also: {@link ObjectsMemento}, which saves and restores a memento of the visual state
95
- * of the {@link Entity}'s that represent objects within a {@link Scene}.
96
- *
97
- * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
98
- * @param {*} [options] Options for showing the Entitys within the storey.
99
- * @param {Boolean} [options.hideOthers=false] When ````true````, hide all other {@link Entity}s.
100
- * @param {Boolean} [options.useObjectStates=false] When ````true````, apply the custom visibilities and appearances configured for IFC types in {@link StoreyViewsPlugin#objectStates}.
101
- */
102
- showStoreyObjects(storeyId: string, options?: {
103
- hideOthers?: boolean;
104
- useObjectStates?: boolean
105
- }): void;
106
-
107
- /**
108
- * Executes a callback on each of the objects within the given storey.
109
- *
110
- *
111
- * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
112
- * @param {Function} callback The callback.
113
- */
114
- withStoreyObjects(storeyId: string, callback: Function): void;
115
-
116
- /**
117
- * Creates a 2D map of the given storey.
118
- *
119
- * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
120
- * @param {*} [options] Options for creating the image.
121
- * @param {Number} [options.width=300] Image width in pixels. Height will be automatically determined from this, if not given.
122
- * @param {Number} [options.height=300] Image height in pixels, as an alternative to width. Width will be automatically determined from this, if not given.
123
- * @param {String} [options.format="png"] Image format. Accepted values are "png" and "jpeg".
124
- * @returns {StoreyMap} The StoreyMap.
125
- */
126
- createStoreyMap(storeyId: string, options?: {
127
- width?: number;
128
- height?: number;
129
- format?: "png" | "jpeg";
130
- }): StoreyMap;
131
-
132
- /**
133
- * Attempts to pick an {@link Entity} at the given pixel coordinates within a StoreyMap image.
134
- *
135
- * @param {StoreyMap} storeyMap The StoreyMap.
136
- * @param {Number[]} imagePos 2D pixel coordinates within the bounds of {@link StoreyMap#imageData}.
137
- * @param {*} [options] Picking options.
138
- * @param {Boolean} [options.pickSurface=false] Whether to return the picked position on the surface of the Entity.
139
- * @returns {PickResult} The pick result, if an Entity was successfully picked, else null.
140
- */
141
- pickStoreyMap(storeyMap: StoreyMap, imagePos: number[], options?: {
142
- pickSurface?: boolean;
143
- }): PickResult;
144
-
145
- /**
146
- * Gets the ID of the storey that contains the given 3D World-space position.
147
- *.
148
- * @param {Number[]} worldPos 3D World-space position.
149
- * @returns {String} ID of the storey containing the position, or null if the position falls outside all the storeys.
150
- */
151
- getStoreyContainingWorldPos(worldPos: number[]): string;
152
-
153
- /**
154
- * Converts a 3D World-space position to a 2D position within a StoreyMap image.
155
- *
156
- * Use {@link StoreyViewsPlugin#pickStoreyMap} to convert 2D image positions to 3D world-space.
157
- *
158
- * @param {StoreyMap} storeyMap The StoreyMap.
159
- * @param {Number[]} worldPos 3D World-space position within the storey.
160
- * @param {Number[]} imagePos 2D pixel position within the {@link StoreyMap#imageData}.
161
- * @returns {Boolean} True if ````imagePos```` is within the bounds of the {@link StoreyMap#imageData}, else ````false```` if it falls outside.
162
- */
163
- worldPosToStoreyMap(storeyMap: StoreyMap, worldPos: number[], imagePos: number[]): boolean;
164
-
165
- /**
166
- * Converts a 3D World-space direction vector to a 2D vector within a StoreyMap image.
167
- *
168
- * @param {StoreyMap} storeyMap The StoreyMap.
169
- * @param {Number[]} worldDir 3D World-space direction vector.
170
- * @param {Number[]} imageDir Normalized 2D direction vector.
171
- */
172
- worldDirToStoreyMap(storeyMap: StoreyMap, worldDir: number[], imageDir: number[]): void;
25
+ /**
26
+ * @constructor
27
+ *
28
+ * @param {Viewer} viewer The Viewer.
29
+ * @param {StoreyViewsPluginConfiguration} cfg Plugin configuration.
30
+ */
31
+ constructor(viewer: Viewer, cfg?: StoreyViewsPluginConfiguration);
32
+
33
+ /**
34
+ * A {@link Storey} for each ````IfcBuildingStorey```.
35
+ *
36
+ * There will be a {@link Storey} for every existing {@link MetaObject} whose {@link MetaObject.type} equals "IfcBuildingStorey".
37
+ *
38
+ * These are created and destroyed automatically as models are loaded and destroyed.
39
+ *
40
+ * @type {{String:Storey}}
41
+ */
42
+ storeys: {[key: string]: Storey };
43
+
44
+ /**
45
+ * A set of {@link Storey}s for each {@link MetaModel}.
46
+ *
47
+ * These are created and destroyed automatically as models are loaded and destroyed.
48
+ *
49
+ * @type {{String: {String:Storey}}}
50
+ */
51
+ modelStoreys: {[key: string]: { [key: string]: Storey} };
52
+
53
+ /**
54
+ * Sets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
55
+ *
56
+ * Default value is {@link IFCStoreyPlanObjectStates}.
57
+ *
58
+ * @type {IFCStoreyPlanObjectStates}
59
+ */
60
+ set objectStates(arg: IFCStoreyPlanObjectStates);
61
+
62
+ /**
63
+ * Gets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
64
+ *
65
+ * Default value is {@link IFCStoreyPlanObjectStates}.
66
+ *
67
+ * @type {IFCStoreyPlanObjectStates}
68
+ */
69
+ get objectStates(): IFCStoreyPlanObjectStates;
70
+
71
+ /**
72
+ * Arranges the {@link Camera} for a 3D orthographic view of the {@link Entity}s within the given storey.
73
+ *
74
+ * See also: {@link CameraMemento}, which saves and restores the state of the {@link Scene}'s {@link Camera}
75
+ *
76
+ * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
77
+ * @param {*} [options] Options for arranging the Camera.
78
+ * @param {String} [options.projection] Projection type to transition the Camera to. Accepted values are "perspective" and "ortho".
79
+ * @param {Function} [options.done] Callback to fire when the Camera has arrived. When provided, causes an animated flight to the saved state. Otherwise jumps to the saved state.
80
+ */
81
+ gotoStoreyCamera(storeyId: string, options?: {
82
+ projection?: string;
83
+ done?: Function
84
+ }): void;
85
+
86
+ /**
87
+ * Shows the {@link Entity}s within the given storey.
88
+ *
89
+ * Optionally hides all other Entitys.
90
+ *
91
+ * Optionally sets the visual appearance of each of the Entitys according to its IFC type. The appearance of
92
+ * IFC types in plan views is configured by {@link StoreyViewsPlugin.objectStates}.
93
+ *
94
+ * See also: {@link ObjectsMemento}, which saves and restores a memento of the visual state
95
+ * of the {@link Entity}'s that represent objects within a {@link Scene}.
96
+ *
97
+ * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
98
+ * @param {*} [options] Options for showing the Entitys within the storey.
99
+ * @param {Boolean} [options.hideOthers=false] When ````true````, hide all other {@link Entity}s.
100
+ * @param {Boolean} [options.useObjectStates=false] When ````true````, apply the custom visibilities and appearances configured for IFC types in {@link StoreyViewsPlugin.objectStates}.
101
+ */
102
+ showStoreyObjects(storeyId: string, options?: {
103
+ hideOthers?: boolean;
104
+ useObjectStates?: boolean
105
+ }): void;
106
+
107
+ /**
108
+ * Executes a callback on each of the objects within the given storey.
109
+ *
110
+ *
111
+ * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
112
+ * @param {Function} callback The callback.
113
+ */
114
+ withStoreyObjects(storeyId: string, callback: Function): void;
115
+
116
+ /**
117
+ * Creates a 2D map of the given storey.
118
+ *
119
+ * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
120
+ * @param {*} [options] Options for creating the image.
121
+ * @param {Number} [options.width=300] Image width in pixels. Height will be automatically determined from this, if not given.
122
+ * @param {Number} [options.height=300] Image height in pixels, as an alternative to width. Width will be automatically determined from this, if not given.
123
+ * @param {String} [options.format="png"] Image format. Accepted values are "png" and "jpeg".
124
+ * @returns {StoreyMap} The StoreyMap.
125
+ */
126
+ createStoreyMap(storeyId: string, options?: {
127
+ width?: number;
128
+ height?: number;
129
+ format?: "png" | "jpeg";
130
+ }): StoreyMap;
131
+
132
+ /**
133
+ * Attempts to pick an {@link Entity} at the given pixel coordinates within a StoreyMap image.
134
+ *
135
+ * @param {StoreyMap} storeyMap The StoreyMap.
136
+ * @param {Number[]} imagePos 2D pixel coordinates within the bounds of {@link StoreyMap.imageData}.
137
+ * @param {*} [options] Picking options.
138
+ * @param {Boolean} [options.pickSurface=false] Whether to return the picked position on the surface of the Entity.
139
+ * @returns {PickResult} The pick result, if an Entity was successfully picked, else null.
140
+ */
141
+ pickStoreyMap(storeyMap: StoreyMap, imagePos: number[], options?: {
142
+ pickSurface?: boolean;
143
+ }): PickResult;
144
+
145
+ /**
146
+ * Gets the ID of the storey that contains the given 3D World-space position.
147
+ *.
148
+ * @param {Number[]} worldPos 3D World-space position.
149
+ * @returns {String} ID of the storey containing the position, or null if the position falls outside all the storeys.
150
+ */
151
+ getStoreyContainingWorldPos(worldPos: number[]): string;
152
+
153
+ /**
154
+ * Converts a 3D World-space position to a 2D position within a StoreyMap image.
155
+ *
156
+ * Use {@link StoreyViewsPlugin.pickStoreyMap} to convert 2D image positions to 3D world-space.
157
+ *
158
+ * @param {StoreyMap} storeyMap The StoreyMap.
159
+ * @param {Number[]} worldPos 3D World-space position within the storey.
160
+ * @param {Number[]} imagePos 2D pixel position within the {@link StoreyMap.imageData}.
161
+ * @returns {Boolean} True if ````imagePos```` is within the bounds of the {@link StoreyMap.imageData}, else ````false```` if it falls outside.
162
+ */
163
+ worldPosToStoreyMap(storeyMap: StoreyMap, worldPos: number[], imagePos: number[]): boolean;
164
+
165
+ /**
166
+ * Converts a 3D World-space direction vector to a 2D vector within a StoreyMap image.
167
+ *
168
+ * @param {StoreyMap} storeyMap The StoreyMap.
169
+ * @param {Number[]} worldDir 3D World-space direction vector.
170
+ * @param {Number[]} imageDir Normalized 2D direction vector.
171
+ */
172
+ worldDirToStoreyMap(storeyMap: StoreyMap, worldDir: number[], imageDir: number[]): void;
173
+
174
+ /**
175
+ * Fires when the storeys are updated (after a model is added or removed).
176
+ * @param {String} event The storeys event
177
+ * @param {Function} callback Callback fired on the event
178
+ */
179
+ on(event: "storeys", callback: (storyes: {[key: string]: Storey })=> void): void;
173
180
  }
@@ -5,7 +5,7 @@ import { TreeViewNode } from "./TreeViewNode";
5
5
  export declare type TreeViewPluginConfiguration = {
6
6
  /** DOM element to contain the TreeViewPlugin. */
7
7
  containerElement: HTMLElement;
8
- /** When ````true```` (default), will automatically add each model as it's created. Set this ````false```` if you want to manually add models using {@link TreeViewPlugin#addModel} instead. */
8
+ /** When ````true```` (default), will automatically add each model as it's created. Set this ````false```` if you want to manually add models using {@link TreeViewPlugin.addModel} instead. */
9
9
  autoAddModels?: boolean;
10
10
  /** Optional depth to which to initially expand the tree. */
11
11
  autoExpandDepth?: number;
@@ -62,14 +62,14 @@ export declare class TreeViewPlugin extends Plugin {
62
62
  * To automatically add each model as it's created, instead of manually calling this method each time,
63
63
  * provide a ````autoAddModels: true```` to the TreeViewPlugin constructor.
64
64
  *
65
- * @param {String} modelId ID of a model {@link Entity} in {@link Scene#models}.
65
+ * @param {String} modelId ID of a model {@link Entity} in {@link Scene.models}.
66
66
  * @param {Object} [options] Options for model in the tree view.
67
67
  * @param {String} [options.rootName] Optional display name for the root node. Ordinary, for "containment"
68
68
  * and "storeys" hierarchy types, the tree would derive the root node name from the model's "IfcProject" element
69
69
  * name. This option allows to override that name when it is not suitable as a display name.
70
70
  * @returns {ModelTreeView} ModelTreeView for the newly-added model. If this method succeeded in adding the model,
71
- * then {@link ModelTreeView#valid} will equal ````true````. Otherwise, that property will be ````false````
72
- * and {@link ModelTreeView#errors} will contain error messages.
71
+ * then {@link ModelTreeView.valid} will equal ````true````. Otherwise, that property will be ````false````
72
+ * and {@link ModelTreeView.errors} will contain error messages.
73
73
  */
74
74
  addModel(modelId: string, options?: {
75
75
  rootName?: string;
@@ -80,7 +80,7 @@ export declare class TreeViewPlugin extends Plugin {
80
80
  *
81
81
  * Does nothing if model not currently in tree view.
82
82
  *
83
- * @param {String} modelId ID of a model {@link Entity} in {@link Scene#models}.
83
+ * @param {String} modelId ID of a model {@link Entity} in {@link Scene.models}.
84
84
  */
85
85
  removeModel(modelId: string): void;
86
86
 
@@ -108,7 +108,7 @@ export declare class TreeViewPlugin extends Plugin {
108
108
  showNode(objectId: string): void;
109
109
 
110
110
  /**
111
- * De-highlights the node previously shown with {@link TreeViewPlugin#showNode}.
111
+ * De-highlights the node previously shown with {@link TreeViewPlugin.showNode}.
112
112
  *
113
113
  * Does nothing if no node is currently shown.
114
114
  *
@@ -133,4 +133,18 @@ export declare class TreeViewPlugin extends Plugin {
133
133
  * @param {Function} callback Callback called at each {@link TreeViewNode}, with the TreeViewNode given as the argument.
134
134
  */
135
135
  withNodeTree(node: TreeViewNode, callback: (node: TreeViewNode) => void): void;
136
+
137
+ /**
138
+ * Fires on right click to show contextmenu.
139
+ * @param {String} event The contextmenu event
140
+ * @param {Function} callback Callback fired on the event
141
+ */
142
+ on(event: "contextmenu", callback: (data: {event: MouseEvent, viewer: Viewer, treeViewPlugin: TreeViewPlugin, treeViewNode: TreeViewNode })=> void): void;
143
+
144
+ /**
145
+ * Fires when an title is clicked.
146
+ * @param {String} event The nodeTitleClicked event
147
+ * @param {Function} callback Callback fired on the event
148
+ */
149
+ on(event: "nodeTitleClicked", callback: (data: {event: MouseEvent, viewer: Viewer, treeViewPlugin: TreeViewPlugin, treeViewNode: TreeViewNode })=> void): void;
136
150
  }
@@ -1,7 +1,7 @@
1
1
  import { Plugin, Viewer } from "../../viewer";
2
2
 
3
3
  export declare type ViewCullPluginConfiguration = {
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
  /** Maximum depth of the kd-tree. */
7
7
  maxTreeDepth?: number;
@@ -10,7 +10,7 @@ export declare type ViewCullPluginConfiguration = {
10
10
  /**
11
11
  * {@link Viewer} plugin that performs view frustum culling to accelerate rendering performance.
12
12
  */
13
- export class ViewCullPlugin extends Plugin {
13
+ export declare class ViewCullPlugin extends Plugin {
14
14
  /**
15
15
  * @constructor
16
16
  * @param {Viewer} viewer The Viewer.
@@ -26,7 +26,7 @@ export declare type WebIFCLoaderPluginConfiguration = {
26
26
  };
27
27
 
28
28
  export declare type LoadWebIFCModel = {
29
- /** ID to assign to the root {@link Entity#id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
29
+ /** ID to assign to the root {@link Entity.id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
30
30
  id?: string;
31
31
  /** Path to a IFC file, as an alternative to the ````ifc```` parameter. */
32
32
  src?: string;
@@ -36,9 +36,9 @@ export declare type LoadWebIFCModel = {
36
36
  loadMetadata?: boolean;
37
37
  /** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
38
38
  objectDefaults?: IFCObjectDefaults;
39
- /** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list. */
39
+ /** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
40
40
  includeTypes?: string[];
41
- /** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list. */
41
+ /** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
42
42
  excludeTypes?: string[];
43
43
  /** Whether or not xeokit renders the model with edges emphasized. */
44
44
  edges?: boolean;
@@ -52,15 +52,15 @@ export declare type LoadWebIFCModel = {
52
52
  rotation?: number[];
53
53
  /** The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````. */
54
54
  matrix?: number[];
55
- /** 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```` */
55
+ /** 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```` */
56
56
  saoEnabled?: boolean;
57
- /** Indicates if physically-based rendering (PBR) will apply to the model. Only works when {@link Scene#pbrEnabled} is also ````true````. */
57
+ /** Indicates if physically-based rendering (PBR) will apply to the model. Only works when {@link Scene.pbrEnabled} is also ````true````. */
58
58
  pbrEnabled?: boolean;
59
59
  /** When we set this ````true````, then we force rendering of backfaces for the model. When we leave this ````false````, then we allow the Viewer to decide when to render backfaces. In that case, the Viewer will hide backfaces on watertight meshes, show backfaces on open meshes, and always show backfaces on meshes when we slice them open with {@link SectionPlane}s. */
60
60
  backfaces?: boolean;
61
61
  /** 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}. */
62
62
  excludeUnclassifiedObjects?: boolean;
63
- /** Indicates whether to globalize each {@link Entity#id} and {@link MetaObject#id}, in case you need to prevent ID clashes with other models. */
63
+ /** Indicates whether to globalize each {@link Entity.id} and {@link MetaObject.id}, in case you need to prevent ID clashes with other models. */
64
64
  globalizeObjectIds?: boolean;
65
65
  /** Collects model statistics. */
66
66
  stats?: ModelStats;
@@ -118,7 +118,7 @@ export declare class WebIFCLoaderPlugin extends Plugin {
118
118
  * Sets the whitelist of the IFC types loaded by this WebIFCLoaderPlugin.
119
119
  *
120
120
  * When loading IFC models, causes this WebIFCLoaderPlugin to only load objects whose types are in this
121
- * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject#type}.
121
+ * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
122
122
  *
123
123
  * Default value is ````undefined````.
124
124
  *
@@ -130,7 +130,7 @@ export declare class WebIFCLoaderPlugin extends Plugin {
130
130
  * Gets the whitelist of the IFC types loaded by this WebIFCLoaderPlugin.
131
131
  *
132
132
  * When loading IFC models, causes this WebIFCLoaderPlugin to only load objects whose types are in this
133
- * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject#type}.
133
+ * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
134
134
  *
135
135
  * Default value is ````undefined````.
136
136
  *
@@ -142,7 +142,7 @@ export declare class WebIFCLoaderPlugin extends Plugin {
142
142
  * Sets the blacklist of IFC types that are never loaded by this WebIFCLoaderPlugin.
143
143
  *
144
144
  * When IFC models, causes this WebIFCLoaderPlugin to **not** load objects whose types are in this
145
- * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject#type}.
145
+ * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
146
146
  *
147
147
  * Default value is ````undefined````.
148
148
  *
@@ -154,7 +154,7 @@ export declare class WebIFCLoaderPlugin extends Plugin {
154
154
  * Gets the blacklist of IFC types that are never loaded by this WebIFCLoaderPlugin.
155
155
  *
156
156
  * When loading IFC models, causes this WebIFCLoaderPlugin to **not** load objects whose types are in this
157
- * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject#type}.
157
+ * list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
158
158
  *
159
159
  * Default value is ````undefined````.
160
160
  *
@@ -193,15 +193,15 @@ export declare class WebIFCLoaderPlugin extends Plugin {
193
193
  get supportedVersions(): string[];
194
194
 
195
195
  /**
196
- * Sets whether WebIFCLoaderPlugin globalizes each {@link Entity#id} and {@link MetaObject#id} as it loads a model.
196
+ * Sets whether WebIFCLoaderPlugin globalizes each {@link Entity.id} and {@link MetaObject.id} as it loads a model.
197
197
  *
198
198
  * Set this ````true```` when you need to load multiple instances of the same model, to avoid ID clashes
199
199
  * between the objects in the different instances.
200
200
  *
201
- * When we load a model with this set ````true````, then each {@link Entity#id} and {@link MetaObject#id} will be
202
- * prefixed by the ID of the model, ie. ````<modelId>#<objectId>````.
201
+ * When we load a model with this set ````true````, then each {@link Entity.id} and {@link MetaObject.id} will be
202
+ * prefixed by the ID of the model, ie. ````<modelId>.<objectId>````.
203
203
  *
204
- * {@link Entity#originalSystemId} and {@link MetaObject#originalSystemId} will always hold the original, un-prefixed, ID values.
204
+ * {@link Entity.originalSystemId} and {@link MetaObject.originalSystemId} will always hold the original, un-prefixed, ID values.
205
205
  *
206
206
  * Default value is ````false````.
207
207
  *
@@ -212,7 +212,7 @@ export declare class WebIFCLoaderPlugin extends Plugin {
212
212
  set globalizeObjectIds(arg: boolean);
213
213
 
214
214
  /**
215
- * Gets whether WebIFCLoaderPlugin globalizes each {@link Entity#id} and {@link MetaObject#id} as it loads a model.
215
+ * Gets whether WebIFCLoaderPlugin globalizes each {@link Entity.id} and {@link MetaObject.id} as it loads a model.
216
216
  *
217
217
  * Default value is ````false````.
218
218
  *
@@ -224,7 +224,7 @@ export declare class WebIFCLoaderPlugin extends Plugin {
224
224
  * Loads an ````IFC```` model into this WebIFCLoaderPlugin's {@link Viewer}.
225
225
  *
226
226
  * @param {LoadWebIFCModel} params Loading parameters.
227
- * @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}.
227
+ * @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}.
228
228
  */
229
229
  load(params?: LoadWebIFCModel): PerformanceModel;
230
230
  }