@xeokit/xeokit-sdk 2.6.78-rc2-no-las → 2.6.78

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 (78) hide show
  1. package/dist/xeokit-sdk.cjs.js +32532 -15213
  2. package/dist/xeokit-sdk.es.js +32531 -15214
  3. package/dist/xeokit-sdk.es5.js +29446 -30855
  4. package/dist/xeokit-sdk.min.cjs.js +8 -8
  5. package/dist/xeokit-sdk.min.es.js +8 -8
  6. package/dist/xeokit-sdk.min.es5.js +33 -34
  7. package/package.json +4 -7
  8. package/src/plugins/CxConverterIFCLoaderPlugin/CxConverterIFCLoaderPlugin.js +68 -68
  9. package/src/plugins/CxConverterIFCLoaderPlugin/index.js +1 -1
  10. package/src/plugins/LASLoaderPlugin/index.js +1 -1
  11. package/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +5 -5
  12. package/src/plugins/XKTLoaderPlugin/parsers/ParserV10.js +5 -5
  13. package/src/plugins/XKTLoaderPlugin/parsers/ParserV12.js +9 -9
  14. package/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +5 -5
  15. package/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +5 -5
  16. package/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +5 -5
  17. package/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +5 -5
  18. package/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +5 -5
  19. package/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +5 -5
  20. package/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +5 -5
  21. package/src/plugins/XKTLoaderPlugin/parsers/ParserV9.js +5 -5
  22. package/src/plugins/index.js +2 -2
  23. package/src/viewer/scene/Entity.js +6 -0
  24. package/src/viewer/scene/model/SceneModelEntity.js +26 -0
  25. package/src/viewer/scene/model/vbo/batching/triangles/VBOBatchingTrianglesLayer.js +44 -0
  26. package/src/viewer/scene/model/vbo/instancing/triangles/VBOInstancingTrianglesLayer.js +58 -0
  27. package/src/viewer/scene/sectionCaps/SectionCaps.js +33 -27
  28. package/src/viewer/scene/webgl/ArrayBuf.js +20 -0
  29. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +108 -26
  30. package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +14 -3
  31. package/types/plugins/DotBIMLoaderPlugin/DotBIMLoaderPlugin.d.ts +23 -5
  32. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +25 -5
  33. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +100 -20
  34. package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +14 -3
  35. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +83 -18
  36. package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +106 -21
  37. package/types/viewer/Configs.d.ts +24 -6
  38. package/types/viewer/scene/CameraControl/CameraControl.d.ts +445 -66
  39. package/types/viewer/scene/Component.d.ts +1 -1
  40. package/types/viewer/scene/Entity.d.ts +191 -40
  41. package/types/viewer/scene/camera/Camera.d.ts +170 -50
  42. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +57 -8
  43. package/types/viewer/scene/camera/CameraPath.d.ts +13 -8
  44. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +22 -4
  45. package/types/viewer/scene/camera/CustomProjection.d.ts +21 -6
  46. package/types/viewer/scene/camera/Frustum.d.ts +90 -18
  47. package/types/viewer/scene/camera/Ortho.d.ts +54 -14
  48. package/types/viewer/scene/camera/Perspective.d.ts +70 -16
  49. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +25 -21
  50. package/types/viewer/scene/geometry/VBOGeometry.d.ts +7 -7
  51. package/types/viewer/scene/lights/AmbientLight.d.ts +26 -4
  52. package/types/viewer/scene/lights/DirLight.d.ts +52 -8
  53. package/types/viewer/scene/lights/PointLight.d.ts +93 -14
  54. package/types/viewer/scene/materials/EdgeMaterial.d.ts +37 -12
  55. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +119 -22
  56. package/types/viewer/scene/materials/Fresnel.d.ts +50 -10
  57. package/types/viewer/scene/materials/LambertMaterial.d.ts +90 -16
  58. package/types/viewer/scene/materials/LinesMaterial.d.ts +25 -7
  59. package/types/viewer/scene/materials/MetallicMaterial.d.ts +127 -40
  60. package/types/viewer/scene/materials/PhongMaterial.d.ts +185 -52
  61. package/types/viewer/scene/materials/PointsMaterial.d.ts +101 -20
  62. package/types/viewer/scene/materials/SpecularMaterial.d.ts +117 -41
  63. package/types/viewer/scene/materials/Texture.d.ts +62 -22
  64. package/types/viewer/scene/models/SceneModel.d.ts +233 -76
  65. package/types/viewer/scene/models/SceneModelEntity.d.ts +217 -51
  66. package/types/viewer/scene/models/SceneModelMesh.d.ts +4 -4
  67. package/types/viewer/scene/models/SceneModelTransform.d.ts +59 -14
  68. package/types/viewer/scene/paths/CubicBezierCurve.d.ts +73 -12
  69. package/types/viewer/scene/paths/Curve.d.ts +19 -6
  70. package/types/viewer/scene/paths/Path.d.ts +57 -10
  71. package/types/viewer/scene/paths/QuadraticBezierCurve.d.ts +57 -10
  72. package/types/viewer/scene/paths/SplineCurve.d.ts +32 -6
  73. package/types/viewer/scene/scene/Scene.d.ts +196 -94
  74. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +69 -12
  75. package/types/viewer/scene/viewport/Viewport.d.ts +14 -4
  76. package/types/viewer/scene/webgl/PickResult.d.ts +28 -13
  77. package/dist/xeokit-sdk.es5.js.map +0 -1
  78. package/dist/xeokit-sdk.min.es5.js.map +0 -1
@@ -51,7 +51,7 @@ export abstract class Component {
51
51
  * @property owner
52
52
  * @type {Component}
53
53
  */
54
- readonly owner: Component;
54
+ get owner(): Component;
55
55
 
56
56
  /**
57
57
  * Tests if this component is of the given type, or is a subclass of the given type.
@@ -12,7 +12,7 @@ export declare abstract class Entity {
12
12
  * @type {Number|String}
13
13
  * @abstract
14
14
  */
15
- readonly id: string | number;
15
+ get id(): string | number;
16
16
 
17
17
  /**
18
18
  * ID of the corresponding object within the originating system, if any.
@@ -24,14 +24,14 @@ export declare abstract class Entity {
24
24
  *
25
25
  * @type {String}
26
26
  */
27
- readonly originalSystemId: string;
27
+ get originalSystemId(): string;
28
28
 
29
29
  /**
30
30
  * Returns true to indicate that this is an Entity.
31
31
  *
32
32
  * @returns {Boolean}
33
33
  */
34
- readonly isEntity: boolean;
34
+ get isEntity(): boolean;
35
35
 
36
36
  /**
37
37
  * Returns ````true```` if this Entity represents a model.
@@ -42,7 +42,7 @@ export declare abstract class Entity {
42
42
  * @type {Boolean}
43
43
  * @abstract
44
44
  */
45
- readonly isModel: boolean;
45
+ get isModel(): boolean;
46
46
 
47
47
  /**
48
48
  * Returns ````true```` if this Entity represents an object.
@@ -53,18 +53,26 @@ export declare abstract class Entity {
53
53
  * @type {Boolean}
54
54
  * @abstract
55
55
  */
56
- readonly isObject: boolean;
56
+ get isObject(): boolean;
57
57
 
58
58
  /** Returns the parent Entity, if any. */
59
- readonly parent: void;
59
+ get parent(): void;
60
60
 
61
61
  /**
62
- * The 3D World-space origin for this Entity.
62
+ * Sets the 3D World-space origin for this Entity.
63
63
  *
64
64
  * @type {Float64Array}
65
65
  * @abstract
66
66
  */
67
- origin: Float64Array;
67
+ set origin(arg: Float64Array);
68
+
69
+ /**
70
+ * Gets the 3D World-space origin for this Entity.
71
+ *
72
+ * @type {Float64Array}
73
+ * @abstract
74
+ */
75
+ get origin(): Float64Array;
68
76
 
69
77
  /**
70
78
  * World-space 3D axis-aligned bounding box (AABB) of this Entity.
@@ -75,7 +83,7 @@ export declare abstract class Entity {
75
83
  * @type {Float64Array}
76
84
  * @abstract
77
85
  */
78
- readonly aabb: number[];
86
+ get aabb(): number[];
79
87
 
80
88
  /**
81
89
  * The approximate number of triangles in this Entity.
@@ -83,10 +91,23 @@ export declare abstract class Entity {
83
91
  * @type {Number}
84
92
  * @abstract
85
93
  */
86
- readonly numTriangles: number;
94
+ get numTriangles(): number;
95
+
96
+ /**
97
+ * Sets if this Entity is visible.
98
+ *
99
+ * Only rendered when {@link Entity.visible} is ````true```` and {@link Entity.culled} is ````false````.
100
+ *
101
+ * When {@link Entity.isObject} and {@link Entity.visible} are both ````true```` the Entity will be
102
+ * registered by {@link Entity.id} in {@link Scene.visibleObjects}.
103
+ *
104
+ * @type {Boolean}
105
+ * @abstract
106
+ */
107
+ set visible(arg: boolean);
87
108
 
88
109
  /**
89
- * Whether this Entity is visible.
110
+ * Gets if this Entity is visible.
90
111
  *
91
112
  * Only rendered when {@link Entity.visible} is ````true```` and {@link Entity.culled} is ````false````.
92
113
  *
@@ -96,10 +117,10 @@ export declare abstract class Entity {
96
117
  * @type {Boolean}
97
118
  * @abstract
98
119
  */
99
- visible: boolean;
120
+ get visible(): boolean;
100
121
 
101
122
  /**
102
- * Whether this Entity is xrayed.
123
+ * Sets if this Entity is xrayed.
103
124
  *
104
125
  * When {@link Entity.isObject} and {@link Entity.xrayed} are both ````true``` the Entity will be
105
126
  * registered by {@link Entity.id} in {@link Scene.xrayedObjects}.
@@ -107,10 +128,21 @@ export declare abstract class Entity {
107
128
  * @type {Boolean}
108
129
  * @abstract
109
130
  */
110
- xrayed: boolean;
131
+ set xrayed(arg: boolean);
111
132
 
112
133
  /**
113
- * Whether this Entity is highlighted.
134
+ * Gets if this Entity is xrayed.
135
+ *
136
+ * When {@link Entity.isObject} and {@link Entity.xrayed} are both ````true``` the Entity will be
137
+ * registered by {@link Entity.id} in {@link Scene.xrayedObjects}.
138
+ *
139
+ * @type {Boolean}
140
+ * @abstract
141
+ */
142
+ get xrayed(): boolean;
143
+
144
+ /**
145
+ * Sets if this Entity is highlighted.
114
146
  *
115
147
  * When {@link Entity.isObject} and {@link Entity.highlighted} are both ````true```` the Entity will be
116
148
  * registered by {@link Entity.id} in {@link Scene.highlightedObjects}.
@@ -118,10 +150,21 @@ export declare abstract class Entity {
118
150
  * @type {Boolean}
119
151
  * @abstract
120
152
  */
121
- highlighted: boolean;
153
+ set highlighted(arg: boolean);
122
154
 
123
155
  /**
124
- * Whether this Entity is selected.
156
+ * Gets if this Entity is highlighted.
157
+ *
158
+ * When {@link Entity.isObject} and {@link Entity.highlighted} are both ````true```` the Entity will be
159
+ * registered by {@link Entity.id} in {@link Scene.highlightedObjects}.
160
+ *
161
+ * @type {Boolean}
162
+ * @abstract
163
+ */
164
+ get highlighted(): boolean;
165
+
166
+ /**
167
+ * Sets if this Entity is selected.
125
168
  *
126
169
  * When {@link Entity.isObject} and {@link Entity.selected} are both ````true``` the Entity will be
127
170
  * registered by {@link Entity.id} in {@link Scene.selectedObjects}.
@@ -129,102 +172,195 @@ export declare abstract class Entity {
129
172
  * @type {Boolean}
130
173
  * @abstract
131
174
  */
132
- selected: boolean;
175
+ set selected(arg: boolean);
133
176
 
134
177
  /**
135
- * Whether this Entity's edges are enhanced.
178
+ * Gets if this Entity is selected.
179
+ *
180
+ * When {@link Entity.isObject} and {@link Entity.selected} are both ````true``` the Entity will be
181
+ * registered by {@link Entity.id} in {@link Scene.selectedObjects}.
136
182
  *
137
183
  * @type {Boolean}
138
184
  * @abstract
139
185
  */
140
- edges: boolean;
186
+ get selected(): boolean;
141
187
 
142
188
  /**
143
- * Whether this Entity is culled.
189
+ * Sets if this Entity's edges are enhanced.
190
+ *
191
+ * @type {Boolean}
192
+ * @abstract
193
+ */
194
+ set edges(arg: boolean);
195
+
196
+ /**
197
+ * Gets if this Entity's edges are enhanced.
198
+ *
199
+ * @type {Boolean}
200
+ * @abstract
201
+ */
202
+ get edges(): boolean;
203
+
204
+ /**
205
+ * Sets if this Entity is culled.
206
+ *
207
+ * Only rendered when {@link Entity.visible} is ````true```` and {@link Entity.culled} is ````false````.
208
+ *
209
+ * @type {Boolean}
210
+ * @abstract
211
+ */
212
+ set culled(arg: boolean);
213
+
214
+ /**
215
+ * Gets if this Entity is culled.
144
216
  *
145
217
  * Only rendered when {@link Entity.visible} is ````true```` and {@link Entity.culled} is ````false````.
146
218
  *
147
219
  * @type {Boolean}
148
220
  * @abstract
149
221
  */
150
- culled: boolean;
222
+ get culled(): boolean;
223
+
224
+ /**
225
+ * Sets if this Entity is clippable.
226
+ *
227
+ * Clipping is done by the {@link SectionPlane}s in {@link Scene.sectionPlanes}.
228
+ *
229
+ * @type {Boolean}
230
+ * @abstract
231
+ */
232
+ set clippable(arg: boolean);
151
233
 
152
234
  /**
153
- * Whether this Entity is clippable.
235
+ * Gets if this Entity is clippable.
154
236
  *
155
237
  * Clipping is done by the {@link SectionPlane}s in {@link Scene.sectionPlanes}.
156
238
  *
157
239
  * @type {Boolean}
158
240
  * @abstract
159
241
  */
160
- clippable: boolean;
242
+ get clippable(): boolean;
243
+
244
+ /**
245
+ * Sets if this Entity is included in boundary calculations.
246
+ *
247
+ * @type {Boolean}
248
+ * @abstract
249
+ */
250
+ set collidable(arg: boolean);
251
+
252
+ /**
253
+ * Gets if this Entity is included in boundary calculations.
254
+ *
255
+ * @type {Boolean}
256
+ * @abstract
257
+ */
258
+ get collidable(): boolean;
161
259
 
162
260
  /**
163
- * Whether this Entity is included in boundary calculations.
261
+ * Sets if this Entity is pickable.
262
+ *
263
+ * Picking is done via calls to {@link Scene.pick}.
164
264
  *
165
265
  * @type {Boolean}
166
266
  * @abstract
167
267
  */
168
- collidable: boolean;
268
+ set pickable(arg: boolean);
169
269
 
170
270
  /**
171
- * Whether this Entity is pickable.
271
+ * Gets if this Entity is pickable.
172
272
  *
173
273
  * Picking is done via calls to {@link Scene.pick}.
174
274
  *
175
275
  * @type {Boolean}
176
276
  * @abstract
177
277
  */
178
- pickable: boolean;
278
+ get pickable(): boolean;
179
279
 
180
280
  /**
181
- * The Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.
281
+ * Sets the Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.
182
282
  *
183
283
  * Each element of the color is in range ````[0..1]````.
184
284
  *
185
285
  * @type {Number[]}
186
286
  * @abstract
187
287
  */
188
- colorize: number[];
288
+ set colorize(arg: number[]);
189
289
 
190
290
  /**
191
- * The Entity's opacity factor, multiplies by the Entity's rendered fragment alphas.
291
+ * Gets the Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.
292
+ *
293
+ * Each element of the color is in range ````[0..1]````.
294
+ *
295
+ * @type {Number[]}
296
+ * @abstract
297
+ */
298
+ get colorize(): number[];
299
+
300
+ /**
301
+ * Sets the Entity's opacity factor, multiplies by the Entity's rendered fragment alphas.
192
302
  *
193
303
  * This is a factor in range ````[0..1]````.
194
304
  *
195
305
  * @type {Number}
196
306
  * @abstract
197
307
  */
198
- opacity: number;
308
+ set opacity(arg: number);
199
309
 
200
310
  /**
201
- * Whether this Entity casts shadows.
311
+ * Gets the Entity's opacity factor.
312
+ *
313
+ * This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
314
+ *
315
+ * @type {Number}
316
+ * @abstract
317
+ */
318
+ get opacity(): number;
319
+
320
+ /**
321
+ * Sets if this Entity casts shadows.
202
322
  *
203
323
  * @type {Boolean}
204
324
  * @abstract
205
325
  */
206
- castsShadow: boolean;
326
+ set castsShadow(arg: boolean);
207
327
 
208
328
  /**
209
- * Whether this Entity can have shadows cast upon it
329
+ * Gets if this Entity casts shadows.
210
330
  *
211
331
  * @type {Boolean}
212
332
  * @abstract
213
333
  */
214
- receivesShadow: boolean;
334
+ get castsShadow(): boolean;
215
335
 
216
336
  /**
217
- * Whether this Entity can have Scalable Ambient Obscurance (SAO) applied to it.
337
+ * Sets if to this Entity can have shadows cast upon it
338
+ *
339
+ * @type {Boolean}
340
+ * @abstract
341
+ */
342
+ set receivesShadow(arg: boolean);
343
+
344
+ /**
345
+ * Gets if this Entity can have shadows cast upon it
346
+ *
347
+ * @type {Boolean}
348
+ * @abstract
349
+ */
350
+ get receivesShadow(): boolean;
351
+
352
+ /**
353
+ * Gets if this Entity can have Scalable Ambient Obscurance (SAO) applied to it.
218
354
  *
219
355
  * SAO is configured by {@link SAO}.
220
356
  *
221
357
  * @type {Boolean}
222
358
  * @abstract
223
359
  */
224
- readonly saoEnabled: boolean;
360
+ get saoEnabled(): boolean;
225
361
 
226
362
  /**
227
- * The Entity's 3D World-space offset.
363
+ * Sets the Entity's 3D World-space offset.
228
364
  *
229
365
  * Since offsetting Entities comes with memory and rendering overhead on some systems, this feature
230
366
  * only works when {@link Viewer} is configured with ````entityOffsetsEnabled: true````.
@@ -239,7 +375,17 @@ export declare abstract class Entity {
239
375
  * @abstract
240
376
  * @type {Number[]}
241
377
  */
242
- offset: number[];
378
+ set offset(arg: number[]);
379
+
380
+ /**
381
+ * Gets the Entity's 3D World-space offset.
382
+ *
383
+ * Default value is ````[0,0,0]````.
384
+ *
385
+ * @abstract
386
+ * @type {Number[]}
387
+ */
388
+ get offset(): number[];
243
389
 
244
390
  /**
245
391
  * Gets the World, View and Canvas-space positions of each vertex in a callback.
@@ -248,6 +394,11 @@ export declare abstract class Entity {
248
394
  */
249
395
  getEachVertex(callback: any): void;
250
396
 
397
+ /**
398
+ * Gets the complete geometry of this entity.
399
+ */
400
+ getGeometryData(): {indices: number[],positions:number[]}
401
+
251
402
  /**
252
403
  * Destroys this Entity.
253
404
  */