@xtctwins/tctwins-core 1.0.5 → 1.0.6
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.
- package/package.json +1 -1
- package/types/extras/ContextMenu/ContextMenu.d.ts +0 -2
- package/types/extras/PointerLens/PointerLens.d.ts +144 -0
- package/types/extras/PointerLens/index.d.ts +1 -0
- package/types/extras/index.d.ts +1 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +78 -56
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +93 -0
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +2 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +86 -54
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +71 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +16 -2
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +2 -0
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +0 -20
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +2 -0
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +22 -0
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +0 -34
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +12 -14
- package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -0
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +235 -239
- package/types/viewer/Configs.d.ts +26 -0
- package/types/viewer/Viewer.d.ts +5 -5
- package/types/viewer/metadata/MetaScene.d.ts +2 -2
- package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -0
- package/types/viewer/scene/Bitmap/index.d.ts +1 -0
- package/types/viewer/scene/LineSet/LineSet.d.ts +114 -0
- package/types/viewer/scene/LineSet/index.d.ts +1 -0
- package/types/viewer/scene/index.d.ts +3 -3
- package/types/viewer/scene/input/input.d.ts +0 -5
- package/types/viewer/scene/math/math.d.ts +4 -47
- package/types/viewer/scene/mesh/Mesh.d.ts +7 -0
- package/types/viewer/scene/scene/Scene.d.ts +1 -28
- package/types/viewer/scene/webgl/PickResult.d.ts +12 -0
|
@@ -1,285 +1,281 @@
|
|
|
1
|
-
import { Plugin,
|
|
1
|
+
import {IFCObjectDefaults, Plugin, VBOSceneModel, Viewer} from "../../viewer";
|
|
2
2
|
|
|
3
3
|
export declare type XKTLoaderPluginConfiguration = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/** Transcoder used internally to transcode KTX2 */
|
|
21
|
-
textureTranscoder?: any;
|
|
4
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}.*/
|
|
7
|
+
objectDefaults?: IFCObjectDefaults;
|
|
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
|
+
dataSource?: IXKTDefaultDataSource;
|
|
10
|
+
/** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
11
|
+
includeTypes?: string[];
|
|
12
|
+
/** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
13
|
+
excludeTypes?: string[];
|
|
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
|
+
excludeUnclassifiedObjects?: boolean;
|
|
16
|
+
/** Indicates whether to enable geometry reuse */
|
|
17
|
+
reuseGeometries?: boolean;
|
|
18
|
+
/** Maximum geometry batch size, as number of vertices. */
|
|
19
|
+
maxGeometryBatchSize?: number;
|
|
22
20
|
};
|
|
23
21
|
|
|
24
22
|
export declare type LoadXKTModel = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/** where appropriate, to represent the returned model. */
|
|
70
|
-
dtxEnabled?: boolean;
|
|
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
|
+
id?: string;
|
|
25
|
+
/** Path or URL to a *````.xkt````* file, as an alternative to the ````xkt```` parameter. */
|
|
26
|
+
src?: string;
|
|
27
|
+
/** The *````.xkt````* file data, as an alternative to the ````src```` parameter. */
|
|
28
|
+
xkt?: ArrayBuffer;
|
|
29
|
+
/** Path or URL to an optional metadata file, as an alternative to the ````metaModelData```` parameter. */
|
|
30
|
+
metaModelSrc?: string;
|
|
31
|
+
/** JSON model metadata, as an alternative to the ````metaModelSrc```` parameter. */
|
|
32
|
+
metaModelData?: any;
|
|
33
|
+
/** Path or URL to a JSON manifest file that provides paths or URLs to ````.xkt```` files to load as parts of the model. Use this option to load models that have been split intomultiple XKT files. See [tutorial](https://www.notion.so/xeokit/Automatically-Splitting-Large-Models-for-Better-Performance-165fc022e94742cf966ee50003572259) for more info.*/
|
|
34
|
+
manifestSrc?: any;
|
|
35
|
+
/** A JSON manifest object (as an alternative to a path or URL) that provides paths or URLs to ````.xkt```` files to load as parts of the model. Use this option to load models that have been split intomultiple XKT files. See [tutorial](https://www.notion.so/xeokit/Automatically-Splitting-Large-Models-for-Better-Performance-165fc022e94742cf966ee50003572259) for more info. */
|
|
36
|
+
manifest?: object;
|
|
37
|
+
/** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
|
|
38
|
+
objectDefaults?: object;
|
|
39
|
+
/** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
40
|
+
includeTypes?: string[]
|
|
41
|
+
/** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
42
|
+
excludeTypes?: string[];
|
|
43
|
+
/** Whether or not xeokit renders the model with edges emphasized. */
|
|
44
|
+
edges?: boolean;
|
|
45
|
+
/** The model's World-space double-precision 3D origin. Use this to position the model within xeokit's World coordinate system, using double-precision coordinates. */
|
|
46
|
+
origin?: number[];
|
|
47
|
+
/** The model single-precision 3D position, relative to the ````origin```` parameter. */
|
|
48
|
+
position?: number[];
|
|
49
|
+
/** The model's scale. */
|
|
50
|
+
scale?: number[];
|
|
51
|
+
/** The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis. */
|
|
52
|
+
rotation?: number[];
|
|
53
|
+
/** The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````.*/
|
|
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```` */
|
|
56
|
+
saoEnabled?: boolean;
|
|
57
|
+
/** Indicates if physically-based rendering (PBR) will apply to the model. Only works when {@link Scene.pbrEnabled} is also ````true````. */
|
|
58
|
+
pbrEnabled?: boolean;
|
|
59
|
+
/** When we set this ````true````, then we force rendering of backfaces for the model. */
|
|
60
|
+
backfaces?: boolean;
|
|
61
|
+
/** When loading metadata and this is ````true````, will only load {@link Entity}s that have {@link MetaObject}s (that are not excluded). */
|
|
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. */
|
|
64
|
+
globalizeObjectIds?: boolean;
|
|
65
|
+
/** Indicates whether to enable geometry reuse */
|
|
66
|
+
reuseGeometries?: boolean;
|
|
71
67
|
}
|
|
72
68
|
|
|
73
69
|
export declare interface IXKTDefaultDataSource {
|
|
74
|
-
|
|
70
|
+
/**
|
|
75
71
|
* Gets metamodel JSON.
|
|
76
72
|
*
|
|
77
73
|
* @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
|
|
78
74
|
* @param {Function(*)} ok Fired on successful loading of the metamodel JSON asset.
|
|
79
75
|
* @param {Function(*)} error Fired on error while loading the metamodel JSON asset.
|
|
80
76
|
*/
|
|
81
|
-
|
|
77
|
+
getMetaModel(metaModelSrc: string | number, ok: (json: any) => void, error: (e: Error) => void): void;
|
|
82
78
|
|
|
83
|
-
|
|
79
|
+
/**
|
|
84
80
|
* Gets the contents of the given ````.xkt```` file in an arraybuffer.
|
|
85
81
|
*
|
|
86
82
|
* @param {String|Number} src Path or ID of an ````.xkt```` file.
|
|
87
83
|
* @param {Function} ok Callback fired on success, argument is the ````.xkt```` file in an arraybuffer.
|
|
88
84
|
* @param {Function} error Callback fired on error.
|
|
89
85
|
*/
|
|
90
|
-
|
|
86
|
+
getXKT(src: string | number, ok: (buffer: ArrayBuffer) => void, error: (e: Error) => void): void;
|
|
91
87
|
}
|
|
92
88
|
|
|
93
89
|
/**
|
|
94
90
|
* {@link Viewer} plugin that loads models from xeokit's optimized *````.XKT````* format.
|
|
95
91
|
*
|
|
96
92
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
export declare class XKTLoaderPlugin extends Plugin {
|
|
94
|
+
/**
|
|
95
|
+
* @constructor
|
|
96
|
+
*
|
|
97
|
+
* @param {Viewer} viewer The Viewer.
|
|
98
|
+
* @param {XKTLoaderPluginConfiguration} cfg Plugin configuration.
|
|
99
|
+
*/
|
|
100
|
+
constructor(viewer: Viewer, cfg?: XKTLoaderPluginConfiguration);
|
|
105
101
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Sets a custom data source through which the XKTLoaderPlugin can load models and metadata.
|
|
104
|
+
*
|
|
105
|
+
* Default value is {@link XKTDefaultDataSource}, which loads via HTTP.
|
|
106
|
+
*
|
|
107
|
+
* @type {IXKTDefaultDataSource}
|
|
108
|
+
*/
|
|
109
|
+
set dataSource(arg: IXKTDefaultDataSource);
|
|
114
110
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Gets the custom data source through which the XKTLoaderPlugin can load models and metadata.
|
|
113
|
+
*
|
|
114
|
+
* Default value is {@link XKTDefaultDataSource}, which loads via HTTP.
|
|
115
|
+
*
|
|
116
|
+
* @type {IXKTDefaultDataSource}
|
|
117
|
+
*/
|
|
118
|
+
get dataSource(): IXKTDefaultDataSource;
|
|
123
119
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Sets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
122
|
+
*
|
|
123
|
+
* @type {IFCObjectDefaults}
|
|
124
|
+
*/
|
|
125
|
+
set objectDefaults(arg: IFCObjectDefaults);
|
|
130
126
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Gets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
129
|
+
*
|
|
130
|
+
* @type {IFCObjectDefaults}
|
|
131
|
+
*/
|
|
132
|
+
get objectDefaults(): IFCObjectDefaults;
|
|
137
133
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Sets the whitelist of the IFC types loaded by this XKTLoaderPlugin.
|
|
136
|
+
*
|
|
137
|
+
* When loading models with metadata, causes this XKTLoaderPlugin to only load objects whose types are in this
|
|
138
|
+
* list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
|
|
139
|
+
*
|
|
140
|
+
* Default value is ````undefined````.
|
|
141
|
+
*
|
|
142
|
+
* @type {String[]}
|
|
143
|
+
*/
|
|
144
|
+
set includeTypes(arg: string[]);
|
|
149
145
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
146
|
+
/**
|
|
147
|
+
* Gets the whitelist of the IFC types loaded by this XKTLoaderPlugin.
|
|
148
|
+
*
|
|
149
|
+
* When loading models with metadata, causes this XKTLoaderPlugin to only load objects whose types are in this
|
|
150
|
+
* list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
|
|
151
|
+
*
|
|
152
|
+
* Default value is ````undefined````.
|
|
153
|
+
*
|
|
154
|
+
* @type {String[]}
|
|
155
|
+
*/
|
|
160
156
|
|
|
161
|
-
|
|
157
|
+
get includeTypes(): string[];
|
|
162
158
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
159
|
+
/**
|
|
160
|
+
* Sets the blacklist of IFC types that are never loaded by this XKTLoaderPlugin.
|
|
161
|
+
*
|
|
162
|
+
* When loading models with metadata, causes this XKTLoaderPlugin to **not** load objects whose types are in this
|
|
163
|
+
* list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
|
|
164
|
+
*
|
|
165
|
+
* Default value is ````undefined````.
|
|
166
|
+
*
|
|
167
|
+
* @type {String[]}
|
|
168
|
+
*/
|
|
169
|
+
set excludeTypes(arg: string[]);
|
|
174
170
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
171
|
+
/**
|
|
172
|
+
* Gets the blacklist of IFC types that are never loaded by this XKTLoaderPlugin.
|
|
173
|
+
*
|
|
174
|
+
* When loading models with metadata, causes this XKTLoaderPlugin to **not** load objects whose types are in this
|
|
175
|
+
* list. An object's type is indicated by its {@link MetaObject}'s {@link MetaObject.type}.
|
|
176
|
+
*
|
|
177
|
+
* Default value is ````undefined````.
|
|
178
|
+
*
|
|
179
|
+
* @type {String[]}
|
|
180
|
+
*/
|
|
181
|
+
get excludeTypes(): string[];
|
|
186
182
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
183
|
+
/**
|
|
184
|
+
* Sets whether we load objects that don't have IFC types.
|
|
185
|
+
*
|
|
186
|
+
* When loading models with metadata and this is ````true````, XKTLoaderPlugin will not load objects
|
|
187
|
+
* that don't have IFC types.
|
|
188
|
+
*
|
|
189
|
+
* Default value is ````false````.
|
|
190
|
+
*
|
|
191
|
+
* @type {Boolean}
|
|
192
|
+
*/
|
|
193
|
+
set excludeUnclassifiedObjects(arg: boolean);
|
|
198
194
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
195
|
+
/**
|
|
196
|
+
* Gets whether we load objects that don't have IFC types.
|
|
197
|
+
*
|
|
198
|
+
* When loading models with metadata and this is ````true````, XKTLoaderPlugin will not load objects
|
|
199
|
+
* that don't have IFC types.
|
|
200
|
+
*
|
|
201
|
+
* Default value is ````false````.
|
|
202
|
+
*
|
|
203
|
+
* @type {Boolean}
|
|
204
|
+
*/
|
|
205
|
+
get excludeUnclassifiedObjects(): boolean;
|
|
210
206
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
207
|
+
/**
|
|
208
|
+
* Sets whether XKTLoaderPlugin enables geometry reuse when loading models.
|
|
209
|
+
*
|
|
210
|
+
* Default value is ````true````.
|
|
211
|
+
*
|
|
212
|
+
* Geometry reuse saves memory, but can impact Viewer performance when there are many reused geometries. For
|
|
213
|
+
* this reason, we can set this ````false```` to disable geometry reuse for models loaded by this XKTLoaderPlugin
|
|
214
|
+
* (which will then "expand" the geometry instances into batches instead).
|
|
215
|
+
*
|
|
216
|
+
* The result will be be less WebGL draw calls (which are expensive), at the cost of increased memory footprint.
|
|
217
|
+
*
|
|
218
|
+
* See [.769](https://github.com/xeokit/xeokit-sdk/issues/769) for more info.
|
|
219
|
+
*
|
|
220
|
+
* @type {Boolean}
|
|
221
|
+
*/
|
|
222
|
+
set reuseGeometries(arg: boolean);
|
|
227
223
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
224
|
+
/**
|
|
225
|
+
* Gets whether XKTLoaderPlugin enables geometry reuse when loading models.
|
|
226
|
+
*
|
|
227
|
+
* Default value is ````true````.
|
|
228
|
+
*
|
|
229
|
+
* @type {Boolean}
|
|
230
|
+
*/
|
|
231
|
+
get reuseGeometries(): boolean;
|
|
236
232
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Gets the ````.xkt```` format versions supported by this XKTLoaderPlugin/
|
|
235
|
+
* @returns {string[]}
|
|
236
|
+
*/
|
|
237
|
+
get supportedVersions(): string[];
|
|
242
238
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
239
|
+
/**
|
|
240
|
+
* Sets whether XKTLoaderPlugin globalizes each {@link Entity.id} and {@link MetaObject.id} as it loads a model.
|
|
241
|
+
*
|
|
242
|
+
* Set this ````true```` when you need to load multiple instances of the same model, to avoid ID clashes
|
|
243
|
+
* between the objects in the different instances.
|
|
244
|
+
*
|
|
245
|
+
* When we load a model with this set ````true````, then each {@link Entity.id} and {@link MetaObject.id} will be
|
|
246
|
+
* prefixed by the ID of the model, ie. ````<modelId>.<objectId>````.
|
|
247
|
+
*
|
|
248
|
+
* {@link Entity.originalSystemId} and {@link MetaObject.originalSystemId} will always hold the original, un-prefixed, ID values.
|
|
249
|
+
*
|
|
250
|
+
* Default value is ````false````.
|
|
251
|
+
*
|
|
252
|
+
* See the main {@link XKTLoaderPlugin} class documentation for usage info.
|
|
253
|
+
*
|
|
254
|
+
* @type {Boolean}
|
|
255
|
+
*/
|
|
256
|
+
set globalizeObjectIds(arg: boolean);
|
|
261
257
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
258
|
+
/**
|
|
259
|
+
* Gets whether XKTLoaderPlugin globalizes each {@link Entity.id} and {@link MetaObject.id} as it loads a model.
|
|
260
|
+
*
|
|
261
|
+
* Default value is ````false````.
|
|
262
|
+
*
|
|
263
|
+
* @type {Boolean}
|
|
264
|
+
*/
|
|
265
|
+
get globalizeObjectIds(): boolean;
|
|
270
266
|
|
|
271
267
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
268
|
+
/**
|
|
269
|
+
* Loads an ````.xkt```` model into this XKTLoaderPlugin's {@link Viewer}.
|
|
270
|
+
*
|
|
271
|
+
* Since xeokit/xeokit-sdk 1.9.0, XKTLoaderPlugin has supported XKT 8, which bundles the metamodel
|
|
272
|
+
* data (eg. an IFC element hierarchy) in the XKT file itself. For XKT 8, we therefore no longer need to
|
|
273
|
+
* load the metamodel data from a separate accompanying JSON file, as we did with previous XKT versions.
|
|
274
|
+
* However, if we do choose to specify a separate metamodel JSON file to load (eg. for backward compatibility
|
|
275
|
+
* in data pipelines), then that metamodel will be loaded and the metamodel in the XKT 8 file will be ignored.
|
|
276
|
+
*
|
|
277
|
+
* @param {LoadXKTModel} params Loading parameters.
|
|
278
|
+
* @returns {VBOSceneModel} Entity representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}.
|
|
279
|
+
*/
|
|
280
|
+
load(params: LoadXKTModel): VBOSceneModel;
|
|
285
281
|
}
|
|
@@ -17,4 +17,30 @@ export declare abstract class Configs {
|
|
|
17
17
|
* @returns {Boolean}
|
|
18
18
|
*/
|
|
19
19
|
get doublePrecisionEnabled(): boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Sets the maximum data texture height.
|
|
23
|
+
*
|
|
24
|
+
* Should be a multiple of 1024. Default is 4096, which is the maximum allowed value.
|
|
25
|
+
*/
|
|
26
|
+
set maxDataTextureHeight(value: number);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Gets maximum data texture height.
|
|
30
|
+
*/
|
|
31
|
+
get maxDataTextureHeight(): number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Sets the maximum batched geometry VBO size.
|
|
35
|
+
*
|
|
36
|
+
* Default value is 5000000, which is the maximum size.
|
|
37
|
+
*
|
|
38
|
+
* Minimum size is 100000.
|
|
39
|
+
*/
|
|
40
|
+
set maxGeometryBatchSize(value: number);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Gets the maximum batched geometry VBO size.
|
|
44
|
+
*/
|
|
45
|
+
get maxGeometryBatchSize(): number;
|
|
20
46
|
}
|
package/types/viewer/Viewer.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare type ViewerConfiguration = {
|
|
|
38
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
|
-
units?: "meters" | "centimeters" | "millimeters" | "yards" | "feet" | "inches"
|
|
41
|
+
units?: "meters" | "centimeters" | "millimeters" | "yards" | "feet" | "inches";
|
|
42
42
|
/** The number of Real-space units in each World-space coordinate system unit. */
|
|
43
43
|
scale?: number;
|
|
44
44
|
/** The Real-space 3D origin, in current measurement units, at which the World-space coordinate origin ````[0,0,0]```` sits. */
|
|
@@ -63,7 +63,7 @@ export declare type ViewerConfiguration = {
|
|
|
63
63
|
localeService?: LocaleService;
|
|
64
64
|
/** Whether to enable data texture-based (DTX) scene representation within the Viewer. */
|
|
65
65
|
dtxEnabled?: boolean;
|
|
66
|
-
/** Enhances the efficiency of SectionPlane creation by proactively allocating Viewer resources for a specified quantity of SectionPlanes
|
|
66
|
+
/** Enhances the efficiency of SectionPlane creation by proactively allocating Viewer resources for a specified quantity of SectionPlanes.*/
|
|
67
67
|
numCachedSectionPlanes?: number;
|
|
68
68
|
};
|
|
69
69
|
|
|
@@ -202,7 +202,7 @@ export declare class Viewer {
|
|
|
202
202
|
* @param {Boolean} [params.includeGizmos=false] When true, will include gizmos like {@link SectionPlane} in the snapshot.
|
|
203
203
|
* @returns {String} String-encoded image data URI.
|
|
204
204
|
*/
|
|
205
|
-
getSnapshot(params: { width?: number, height?: number, format?: "jpeg" | "png"| "bmp", includeGizmos?: boolean }): string;
|
|
205
|
+
getSnapshot(params: { width?: number, height?: number, format?: "jpeg" | "png" | "bmp", includeGizmos?: boolean }): string;
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
208
|
* Gets a snapshot of this Viewer's {@link Scene} as a Base64-encoded image which includes
|
|
@@ -230,8 +230,8 @@ export declare class Viewer {
|
|
|
230
230
|
* @param {Boolean} [params.includeGizmos=false] When true, will include gizmos like {@link SectionPlane} in the snapshot.
|
|
231
231
|
* @returns {Promise} Promise which returns a string-encoded image data URI.
|
|
232
232
|
*/
|
|
233
|
-
getSnapshotWithPlugins(params: { width?: number, height?: number, format?: "jpeg" | "png"| "bmp", includeGizmos?: boolean }): Promise<String>;
|
|
234
|
-
|
|
233
|
+
getSnapshotWithPlugins(params: { width?: number, height?: number, format?: "jpeg" | "png" | "bmp", includeGizmos?: boolean }): Promise<String>;
|
|
234
|
+
|
|
235
235
|
/**
|
|
236
236
|
* Exits snapshot mode.
|
|
237
237
|
*
|
|
@@ -48,7 +48,7 @@ export declare class MetaScene {
|
|
|
48
48
|
*
|
|
49
49
|
* @type {{String:MetaObject}}
|
|
50
50
|
*/
|
|
51
|
-
metaObjectsByType: {[key: string]: MetaObject};
|
|
51
|
+
metaObjectsByType: {[key: string]: {[key: string]: MetaObject} };
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Subscribes to an event fired at this Viewer.
|
|
@@ -131,5 +131,5 @@ export declare class MetaScene {
|
|
|
131
131
|
* @param {String} id ID of root {@link MetaObject}.
|
|
132
132
|
* @param {Function} callback Callback fired at each {@link MetaObject}.
|
|
133
133
|
*/
|
|
134
|
-
withMetaObjectsInSubtree(id: string, callback: (
|
|
134
|
+
withMetaObjectsInSubtree(id: string, callback: ()=> void): void;
|
|
135
135
|
}
|