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

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 (120) hide show
  1. package/dist/web-ifc.wasm +0 -0
  2. package/dist/xeokit-sdk.cjs.js +87051 -79967
  3. package/dist/xeokit-sdk.es.js +87051 -79967
  4. package/dist/xeokit-sdk.min.cjs.js +1 -1
  5. package/dist/xeokit-sdk.min.es.js +1 -1
  6. package/package.json +18 -22
  7. package/types/extras/ContextMenu/ContextMenu.d.ts +125 -0
  8. package/types/extras/ContextMenu/index.d.ts +1 -0
  9. package/types/extras/index.d.ts +1 -0
  10. package/types/index.d.ts +3 -0
  11. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +144 -0
  12. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +67 -0
  13. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +99 -0
  14. package/types/plugins/AngleMeasurementsPlugin/index.d.ts +1 -0
  15. package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -0
  16. package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +150 -0
  17. package/types/plugins/AnnotationsPlugin/index.d.ts +2 -0
  18. package/types/plugins/AxisGizmoPlugin/AxisGizmoPlugin.d.ts +28 -0
  19. package/types/plugins/AxisGizmoPlugin/index.d.ts +1 -0
  20. package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +146 -0
  21. package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -0
  22. package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +81 -0
  23. package/types/plugins/CityJSONLoaderPlugin/index.d.ts +1 -0
  24. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +137 -0
  25. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +65 -0
  26. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +135 -0
  27. package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +1 -0
  28. package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +203 -0
  29. package/types/plugins/FastNavPlugin/index.d.ts +1 -0
  30. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +140 -0
  31. package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -0
  32. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +146 -0
  33. package/types/plugins/LASLoaderPlugin/index.d.ts +1 -0
  34. package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +160 -0
  35. package/types/plugins/NavCubePlugin/index.d.ts +1 -0
  36. package/types/plugins/OBJLoaderPlugin/OBJLoaderPlugin.d.ts +44 -0
  37. package/types/plugins/OBJLoaderPlugin/index.d.ts +1 -0
  38. package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +88 -0
  39. package/types/plugins/STLLoaderPlugin/index.d.ts +1 -0
  40. package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +103 -0
  41. package/types/plugins/SectionPlanesPlugin/index.d.ts +1 -0
  42. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +34 -0
  43. package/types/plugins/SkyboxesPlugin/index.d.ts +1 -0
  44. package/types/plugins/StoreyViewsPlugin/Storey.d.ts +47 -0
  45. package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -0
  46. package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -0
  47. package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -0
  48. package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -0
  49. package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +66 -0
  50. package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +150 -0
  51. package/types/plugins/TreeViewPlugin/index.d.ts +1 -0
  52. package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -0
  53. package/types/plugins/ViewCullPlugin/index.d.ts +1 -0
  54. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +230 -0
  55. package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -0
  56. package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +277 -0
  57. package/types/plugins/XKTLoaderPlugin/index.d.ts +1 -0
  58. package/types/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.d.ts +65 -0
  59. package/types/plugins/XML3DLoaderPlugin/index.d.ts +1 -0
  60. package/types/plugins/index.d.ts +34 -0
  61. package/types/viewer/Configs.d.ts +20 -0
  62. package/types/viewer/Plugin.d.ts +69 -0
  63. package/types/viewer/Viewer.d.ts +212 -0
  64. package/types/viewer/index.d.ts +6 -0
  65. package/types/viewer/localization/LocaleService.d.ts +183 -0
  66. package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -0
  67. package/types/viewer/metadata/MetaModel.d.ts +65 -0
  68. package/types/viewer/metadata/MetaObject.d.ts +74 -0
  69. package/types/viewer/metadata/MetaScene.d.ts +135 -0
  70. package/types/viewer/metadata/Property.d.ts +29 -0
  71. package/types/viewer/metadata/PropertySet.d.ts +31 -0
  72. package/types/viewer/metadata/index.d.ts +6 -0
  73. package/types/viewer/scene/CameraControl/CameraControl.d.ts +681 -0
  74. package/types/viewer/scene/Component.d.ts +155 -0
  75. package/types/viewer/scene/Entity.d.ts +394 -0
  76. package/types/viewer/scene/camera/Camera.d.ts +364 -0
  77. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -0
  78. package/types/viewer/scene/camera/CameraPath.d.ts +28 -0
  79. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -0
  80. package/types/viewer/scene/camera/CustomProjection.d.ts +57 -0
  81. package/types/viewer/scene/camera/Frustum.d.ts +166 -0
  82. package/types/viewer/scene/camera/Ortho.d.ts +115 -0
  83. package/types/viewer/scene/camera/Perspective.d.ts +136 -0
  84. package/types/viewer/scene/camera/index.d.ts +4 -0
  85. package/types/viewer/scene/geometry/Geometry.d.ts +7 -0
  86. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -0
  87. package/types/viewer/scene/geometry/index.d.ts +1 -0
  88. package/types/viewer/scene/index.d.ts +17 -0
  89. package/types/viewer/scene/marker/Marker.d.ts +136 -0
  90. package/types/viewer/scene/marker/index.d.ts +1 -0
  91. package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -0
  92. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -0
  93. package/types/viewer/scene/materials/Fresnel.d.ts +148 -0
  94. package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -0
  95. package/types/viewer/scene/materials/Material.d.ts +3 -0
  96. package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -0
  97. package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -0
  98. package/types/viewer/scene/materials/Texture.d.ts +260 -0
  99. package/types/viewer/scene/materials/index.d.ts +6 -0
  100. package/types/viewer/scene/math/math.d.ts +56 -0
  101. package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -0
  102. package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -0
  103. package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -0
  104. package/types/viewer/scene/mementos/index.d.ts +3 -0
  105. package/types/viewer/scene/mesh/Mesh.d.ts +786 -0
  106. package/types/viewer/scene/mesh/index.d.ts +1 -0
  107. package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +622 -0
  108. package/types/viewer/scene/models/PerformanceModel/PerformanceNode.d.ts +302 -0
  109. package/types/viewer/scene/models/PerformanceModel/index.d.ts +2 -0
  110. package/types/viewer/scene/models/index.d.ts +1 -0
  111. package/types/viewer/scene/nodes/Node.d.ts +664 -0
  112. package/types/viewer/scene/nodes/index.d.ts +1 -0
  113. package/types/viewer/scene/postfx/SAO.d.ts +209 -0
  114. package/types/viewer/scene/scene/Scene.d.ts +771 -0
  115. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +93 -0
  116. package/types/viewer/scene/sectionPlane/index.d.ts +1 -0
  117. package/types/viewer/scene/viewport/Viewport.d.ts +23 -0
  118. package/types/viewer/scene/viewport/index.d.ts +1 -0
  119. package/types/viewer/scene/webgl/PickResult.d.ts +103 -0
  120. package/types/viewer/scene/webgl/index.d.ts +1 -0
@@ -0,0 +1,664 @@
1
+ import { Component } from "../Component";
2
+ import { Entity } from "../Entity";
3
+ import { Mesh } from "../mesh";
4
+
5
+ export declare type NodeConfiguration = {
6
+ /** Optional ID, unique among all components in the parent scene, generated automatically when omitted. */
7
+ id?: string;
8
+ /** Specify ````true```` if this Mesh represents a model, in which case the Mesh will be registered by {@link Mesh.id} in {@link Scene.models} and may also have a corresponding {@link MetaModel} with matching {@link MetaModel.id}, registered by that ID in {@link MetaScene.metaModels}. */
9
+ isModel?: boolean;
10
+ /** Specify ````true```` if this Mesh represents an object, in which case the Mesh will be registered by {@link Mesh.id} in {@link Scene.objects} and may also have a corresponding {@link MetaObject} with matching {@link MetaObject.id}, registered by that ID in {@link MetaScene.metaObjects}. */
11
+ isObject?: boolean;
12
+ /** The parent Node. */
13
+ parent?: Node;
14
+ /** World-space origin for this Node. */
15
+ origin?: number[];
16
+ /** Local 3D position.*/
17
+ position?: number[];
18
+ /** Local scale. */
19
+ scale?: number[];
20
+ /** Local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis. */
21
+ rotation?: number[];
22
+ /** Local modelling transform matrix. Overrides the position, scale and rotation parameters. */
23
+ matrix?: number[];
24
+ /** World-space 3D translation offset. Translates the Node in World space, after modelling transforms. */
25
+ offset?: number[];
26
+ /** Indicates if the Node is initially visible.*/
27
+ visible?: boolean;
28
+ /** Indicates if the Node is initially culled from view. */
29
+ culled?: boolean;
30
+ /** Indicates if the Node is initially pickable. */
31
+ pickable?: boolean;
32
+ /** Indicates if the Node is initially clippable. */
33
+ clippable?: boolean;
34
+ /** Indicates if the Node is initially included in boundary calculations. */
35
+ collidable?: boolean;
36
+ /** Indicates if the Node initially casts shadows. */
37
+ castsShadow?: boolean;
38
+ /** Indicates if the Node initially receives shadows. */
39
+ receivesShadow?: boolean;
40
+ /** Indicates if the Node is initially xrayed. */
41
+ xrayed?: boolean;
42
+ /** Indicates if the Node is initially highlighted. */
43
+ highlighted?: boolean;
44
+ /** Indicates if the Mesh is initially selected. */
45
+ selected?: boolean;
46
+ /** Indicates if the Node's edges are initially emphasized. */
47
+ edges?: boolean;
48
+ /** Node's initial RGB colorize color, multiplies by the rendered fragment colors. */
49
+ colorize: number[];
50
+ /** Node's initial opacity factor, multiplies by the rendered fragment alpha. */
51
+ opacity: number;
52
+ /** Child Nodes or {@link Mesh}es to add initially. */
53
+ children?: (Node | Mesh)[];
54
+ /** Indicates if children given to this constructor should inherit rendering state from this parent as they are added. */
55
+ inheritStates?: boolean;
56
+ };
57
+
58
+ /**
59
+ * An {@link Entity} that is a scene graph node that can have child Nodes and {@link Mesh}es.
60
+ */
61
+ export declare class Node extends Component implements Omit<Entity, "parent"> {
62
+ /**
63
+ * @constructor
64
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
65
+ * @param {NodeConfiguration} [cfg] Configs
66
+ */
67
+ constructor(owner: Component, cfg?: NodeConfiguration);
68
+
69
+ /**
70
+ * ID of the corresponding object within the originating system, if any.
71
+ *
72
+ * @type {String}
73
+ */
74
+ get originalSystemId(): string;
75
+
76
+ /**
77
+ * Sets the Node's local modeling transform matrix.
78
+ *
79
+ * Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
80
+ *
81
+ * @type {Number[]}
82
+ */
83
+ set matrix(arg: number[]);
84
+
85
+ /**
86
+ * Gets the Node's local modeling transform matrix.
87
+ *
88
+ * Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
89
+ *
90
+ * @type {Number[]}
91
+ */
92
+ get matrix(): number[];
93
+
94
+ /**
95
+ * Sets the Node's local scale.
96
+ *
97
+ * Default value is ````[1,1,1]````.
98
+ *
99
+ * @type {Number[]}
100
+ */
101
+ set scale(arg: number[]);
102
+
103
+ /**
104
+ * Gets the Node's local scale.
105
+ *
106
+ * Default value is ````[1,1,1]````.
107
+ *
108
+ * @type {Number[]}
109
+ */
110
+ get scale(): number[];
111
+
112
+ /**
113
+ * Sets the Node's local translation.
114
+ *
115
+ * Default value is ````[0,0,0]````.
116
+ *
117
+ * @type {Number[]}
118
+ */
119
+ set position(arg: number[]);
120
+
121
+ /**
122
+ * Gets the Node's local translation.
123
+ *
124
+ * Default value is ````[0,0,0]````.
125
+ *
126
+ * @type {Number[]}
127
+ */
128
+ get position(): number[];
129
+
130
+ /**
131
+ * Sets the Node's local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
132
+ *
133
+ * Default value is ````[0,0,0]````.
134
+ *
135
+ * @type {Number[]}
136
+ */
137
+ set rotation(arg: number[]);
138
+
139
+ /**
140
+ * Gets the Node's local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
141
+ *
142
+ * Default value is ````[0,0,0]````.
143
+ *
144
+ * @type {Number[]}
145
+ */
146
+ get rotation(): number[];
147
+
148
+ /**
149
+ * Sets the World-space origin for this Node.
150
+ *
151
+ * @type {Float64Array}
152
+ */
153
+ set origin(arg: Float64Array);
154
+
155
+ /**
156
+ * Gets the World-space origin for this Node.
157
+ *
158
+ * @type {Float64Array}
159
+ */
160
+ get origin(): Float64Array;
161
+
162
+ /**
163
+ * Sets if this Node and all child Nodes and {@link Mesh}es are visible.
164
+ *
165
+ * Only rendered both {@link Node.visible} is ````true```` and {@link Node.culled} is ````false````.
166
+ *
167
+ * When {@link Node.isObject} and {@link Node.visible} are both ````true```` the Node will be
168
+ * registered by {@link Node.id} in {@link Scene.visibleObjects}.
169
+ *
170
+ * @type {Boolean}
171
+ */
172
+ set visible(arg: boolean);
173
+
174
+ /**
175
+ * Gets if this Node is visible.
176
+ *
177
+ * Child Nodes and {@link Mesh}es may have different values for this property.
178
+ *
179
+ * When {@link Node.isObject} and {@link Node.visible} are both ````true```` the Node will be
180
+ * registered by {@link Node.id} in {@link Scene.visibleObjects}.
181
+ *
182
+ * @type {Boolean}
183
+ */
184
+ get visible(): boolean;
185
+
186
+ /**
187
+ * Sets if this Node and all child Nodes and {@link Mesh}es are culled.
188
+ *
189
+ * @type {Boolean}
190
+ */
191
+ set culled(arg: boolean);
192
+
193
+ /**
194
+ * Gets if this Node is culled.
195
+ *
196
+ * @type {Boolean}
197
+ */
198
+ get culled(): boolean;
199
+
200
+ /**
201
+ * Sets if this Node and all child Nodes and {@link Mesh}es are pickable.
202
+ *
203
+ * Picking is done via calls to {@link Scene.pick}.
204
+ *
205
+ * @type {Boolean}
206
+ */
207
+ set pickable(arg: boolean);
208
+
209
+ /**
210
+ * Gets if to this Node is pickable.
211
+ *
212
+ * Picking is done via calls to {@link Scene.pick}.
213
+ *
214
+ * Child Nodes and {@link Mesh}es may have different values for this property.
215
+ *
216
+ * @type {Boolean}
217
+ */
218
+ get pickable(): boolean;
219
+
220
+ /**
221
+ * Sets if this Node and all child Nodes and {@link Mesh}es are clippable.
222
+ *
223
+ * Clipping is done by the {@link SectionPlane}s in {@link Scene.clips}.
224
+ *
225
+ * @type {Boolean}
226
+ */
227
+ set clippable(arg: boolean);
228
+
229
+ /**
230
+ * Gets if this Node is clippable.
231
+ *
232
+ * Clipping is done by the {@link SectionPlane}s in {@link Scene.clips}.
233
+ *
234
+ * Child Nodes and {@link Mesh}es may have different values for this property.
235
+ *
236
+ * @type {Boolean}
237
+ */
238
+ get clippable(): boolean;
239
+
240
+ /**
241
+ * Sets if this Node and all child Nodes and {@link Mesh}es are included in boundary calculations.
242
+ *
243
+ * @type {Boolean}
244
+ */
245
+ set collidable(arg: boolean);
246
+
247
+ /**
248
+ * Gets if this Node is included in boundary calculations.
249
+ *
250
+ * Child Nodes and {@link Mesh}es may have different values for this property.
251
+ *
252
+ * @type {Boolean}
253
+ */
254
+ get collidable(): boolean;
255
+
256
+ /**
257
+ * Sets if this Node and all child Nodes and {@link Mesh}es cast shadows.
258
+ *
259
+ * @type {Boolean}
260
+ */
261
+ set castsShadow(arg: boolean);
262
+
263
+ /**
264
+ * Gets if this Node casts shadows.
265
+ *
266
+ * Child Nodes and {@link Mesh}es may have different values for this property.
267
+ *
268
+ * @type {Boolean}
269
+ */
270
+ get castsShadow(): boolean;
271
+
272
+ /**
273
+ * Sets if this Node and all child Nodes and {@link Mesh}es can have shadows cast upon them.
274
+ *
275
+ * @type {Boolean}
276
+ */
277
+ set receivesShadow(arg: boolean);
278
+
279
+ /**
280
+ * Whether or not to this Node can have shadows cast upon it.
281
+ *
282
+ * Child Nodes and {@link Mesh}es may have different values for this property.
283
+ *
284
+ * @type {Boolean}
285
+ */
286
+ get receivesShadow(): boolean;
287
+
288
+ /**
289
+ * Sets if this Node and all child Nodes and {@link Mesh}es are xrayed.
290
+ *
291
+ * When {@link Node.isObject} and {@link Node.xrayed} are both ````true```` the Node will be
292
+ * registered by {@link Node.id} in {@link Scene.xrayedObjects}.
293
+ *
294
+ * @type {Boolean}
295
+ */
296
+ set xrayed(arg: boolean);
297
+
298
+ /**
299
+ * Gets if this Node is xrayed.
300
+ *
301
+ * When {@link Node.isObject} and {@link Node.xrayed} are both ````true```` the Node will be
302
+ * registered by {@link Node.id} in {@link Scene.xrayedObjects}.
303
+ *
304
+ * Child Nodes and {@link Mesh}es may have different values for this property.
305
+ *
306
+ * @type {Boolean}
307
+ */
308
+ get xrayed(): boolean;
309
+
310
+ /**
311
+ * Sets if this Node and all child Nodes and {@link Mesh}es are highlighted.
312
+ *
313
+ * When {@link Node.isObject} and {@link Node.highlighted} are both ````true```` the Node will be
314
+ * registered by {@link Node.id} in {@link Scene.highlightedObjects}.
315
+ *
316
+ * @type {Boolean}
317
+ */
318
+ set highlighted(arg: boolean);
319
+
320
+ /**
321
+ * Gets if this Node is highlighted.
322
+ *
323
+ * When {@link Node.isObject} and {@link Node.highlighted} are both ````true```` the Node will be
324
+ * registered by {@link Node.id} in {@link Scene.highlightedObjects}.
325
+ *
326
+ * Child Nodes and {@link Mesh}es may have different values for this property.
327
+ *
328
+ * @type {Boolean}
329
+ */
330
+ get highlighted(): boolean;
331
+
332
+ /**
333
+ * Sets if this Node and all child Nodes and {@link Mesh}es are selected.
334
+ *
335
+ * When {@link Node.isObject} and {@link Node.selected} are both ````true```` the Node will be
336
+ * registered by {@link Node.id} in {@link Scene.selectedObjects}.
337
+ *
338
+ * @type {Boolean}
339
+ */
340
+ set selected(arg: boolean);
341
+
342
+ /**
343
+ * Gets if this Node is selected.
344
+ *
345
+ * When {@link Node.isObject} and {@link Node.selected} are both ````true```` the Node will be
346
+ * registered by {@link Node.id} in {@link Scene.selectedObjects}.
347
+ *
348
+ * Child Nodes and {@link Mesh}es may have different values for this property.
349
+ *
350
+ * @type {Boolean}
351
+ */
352
+ get selected(): boolean;
353
+
354
+ /**
355
+ * Sets if this Node and all child Nodes and {@link Mesh}es are edge-enhanced.
356
+ *
357
+ * @type {Boolean}
358
+ */
359
+ set edges(arg: boolean);
360
+
361
+ /**
362
+ * Gets if this Node's edges are enhanced.
363
+ *
364
+ * Child Nodes and {@link Mesh}es may have different values for this property.
365
+ *
366
+ * @type {Boolean}
367
+ */
368
+ get edges(): boolean;
369
+
370
+ /**
371
+ * Sets the RGB colorize color for this Node and all child Nodes and {@link Mesh}es}.
372
+ *
373
+ * Multiplies by rendered fragment colors.
374
+ *
375
+ * Each element of the color is in range ````[0..1]````.
376
+ *
377
+ * @type {Number[]}
378
+ */
379
+ set colorize(arg: number[]);
380
+
381
+ /**
382
+ * Gets the RGB colorize color for this Node.
383
+ *
384
+ * Each element of the color is in range ````[0..1]````.
385
+ *
386
+ * Child Nodes and {@link Mesh}es may have different values for this property.
387
+ *
388
+ * @type {Number[]}
389
+ */
390
+ get colorize(): number[];
391
+
392
+ /**
393
+ * Sets the opacity factor for this Node and all child Nodes and {@link Mesh}es.
394
+ *
395
+ * This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
396
+ *
397
+ * @type {Number}
398
+ */
399
+ set opacity(arg: number);
400
+
401
+ /**
402
+ * Gets this Node's opacity factor.
403
+ *
404
+ * This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
405
+ *
406
+ * Child Nodes and {@link Mesh}es may have different values for this property.
407
+ *
408
+ * @type {Number}
409
+ */
410
+ get opacity(): number;
411
+
412
+ /**
413
+ * Sets the 3D World-space offset for this Node and all child Nodes and {@link Mesh}es}.
414
+ *
415
+ * The offset dynamically translates those components in World-space.
416
+ *
417
+ * Default value is ````[0, 0, 0]````.
418
+ *
419
+ * Note that child Nodes and {@link Mesh}es may subsequently be given different values for this property.
420
+ *
421
+ * @type {Number[]}
422
+ */
423
+ set offset(arg: number[]);
424
+
425
+ /**
426
+ * Gets the Node's 3D World-space offset.
427
+ *
428
+ * Default value is ````[0, 0, 0]````.
429
+ *
430
+ * Child Nodes and {@link Mesh}es may have different values for this property.
431
+ *
432
+ * @type {Number[]}
433
+ */
434
+ get offset(): number[];
435
+
436
+ /**
437
+ * Returns true to indicate that this Component is an Entity.
438
+ * @type {Boolean}
439
+ */
440
+ get isEntity(): boolean;
441
+
442
+ /**
443
+ * Returns ````true```` if this Mesh represents a model.
444
+ *
445
+ * When this returns ````true````, the Mesh will be registered by {@link Mesh.id} in {@link Scene.models} and
446
+ * may also have a corresponding {@link MetaModel}.
447
+ *
448
+ * @type {Boolean}
449
+ */
450
+ get isModel(): boolean;
451
+
452
+ /**
453
+ * Returns ````true```` if this Node represents an object.
454
+ *
455
+ * When ````true```` the Node will be registered by {@link Node.id} in
456
+ * {@link Scene.objects} and may also have a {@link MetaObject} with matching {@link MetaObject.id}.
457
+ *
458
+ * @type {Boolean}
459
+ * @abstract
460
+ */
461
+ get isObject(): boolean;
462
+
463
+ /**
464
+ * Gets the Node's World-space 3D axis-aligned bounding box.
465
+ *
466
+ * Represented by a six-element Float64Array containing the min/max extents of the
467
+ * axis-aligned volume, ie. ````[xmin, ymin,zmin,xmax,ymax, zmax]````.
468
+ *
469
+ * @type {Number[]}
470
+ */
471
+ get aabb(): number[];
472
+
473
+ /**
474
+ * Sets the World-space origin for this Node.
475
+ *
476
+ * Deprecated and replaced by {@link Node.origin}.
477
+ *
478
+ * @deprecated
479
+ * @type {Float64Array}
480
+ */
481
+ set rtcCenter(arg: Float64Array);
482
+
483
+ /**
484
+ * Gets the World-space origin for this Node.
485
+ *
486
+ * Deprecated and replaced by {@link Node.origin}.
487
+ *
488
+ * @deprecated
489
+ * @type {Float64Array}
490
+ */
491
+ get rtcCenter(): Float64Array;
492
+
493
+ /**
494
+ * The number of triangles in this Node.
495
+ *
496
+ * @type {Number}
497
+ */
498
+ get numTriangles(): number;
499
+
500
+ /**
501
+ * Gets if this Node can have Scalable Ambient Obscurance (SAO) applied to it.
502
+ *
503
+ * SAO is configured by {@link SAO}.
504
+ *
505
+ * @type {Boolean}
506
+ * @abstract
507
+ */
508
+ get saoEnabled(): boolean;
509
+
510
+ /**
511
+ * Returns true to indicate that this Component is a Node.
512
+ * @type {Boolean}
513
+ */
514
+ get isNode(): boolean;
515
+
516
+ /**
517
+ * Adds a child Node or {@link Mesh}.
518
+ *
519
+ * The child must be a Node or {@link Mesh} in the same {@link Scene}.
520
+ *
521
+ * If the child already has a parent, will be removed from that parent first.
522
+ *
523
+ * Does nothing if already a child.
524
+ *
525
+ * @param {Node|Mesh|String} child Instance or ID of the child to add.
526
+ * @param [inheritStates=false] Indicates if the child should inherit rendering states from this parent as it is added. Rendering state includes {@link Node.visible}, {@link Node.culled}, {@link Node.pickable}, {@link Node.clippable}, {@link Node.castsShadow}, {@link Node.receivesShadow}, {@link Node.selected}, {@link Node.highlighted}, {@link Node.colorize} and {@link Node.opacity}.
527
+ * @returns {Node|Mesh} The child.
528
+ */
529
+ addChild(child: Node | Mesh | string, inheritStates?: any): Node | Mesh;
530
+
531
+ /**
532
+ * Removes the given child Node or {@link Mesh}.
533
+ *
534
+ * @param {Node|Mesh} child Child to remove.
535
+ */
536
+ removeChild(child: Node | Mesh): void;
537
+
538
+ /**
539
+ * Removes all child Nodes and {@link Mesh}es.
540
+ */
541
+ removeChildren(): void;
542
+
543
+ /**
544
+ * Number of child Nodes or {@link Mesh}es.
545
+ *
546
+ * @type {Number}
547
+ */
548
+ get numChildren(): number;
549
+
550
+ /**
551
+ * Array of child Nodes or {@link Mesh}es.
552
+ *
553
+ * @type {Array}
554
+ */
555
+ get children(): (Node | Mesh)[];
556
+
557
+ /**
558
+ * The parent Node.
559
+ *
560
+ * The parent Node may also be set by passing the Node to the parent's {@link Node.addChild} method.
561
+ *
562
+ * @type {Node}
563
+ */
564
+ set parent(arg: Node);
565
+
566
+ /**
567
+ * The parent Node.
568
+ *
569
+ * @type {Node}
570
+ */
571
+ get parent(): Node;
572
+
573
+ /**
574
+ * Sets the Node's local rotation quaternion.
575
+ *
576
+ * Default value is ````[0,0,0,1]````.
577
+ *
578
+ * @type {Number[]}
579
+ */
580
+ set quaternion(arg: number[]);
581
+
582
+ /**
583
+ * Gets the Node's local rotation quaternion.
584
+ *
585
+ * Default value is ````[0,0,0,1]````.
586
+ *
587
+ * @type {Number[]}
588
+ */
589
+ get quaternion(): number[];
590
+
591
+ /**
592
+ * Gets the Node's World matrix.
593
+ *
594
+ * @property worldMatrix
595
+ * @type {Number[]}
596
+ */
597
+ get worldMatrix(): number[];
598
+
599
+ /**
600
+ * Rotates the Node about the given local axis by the given increment.
601
+ *
602
+ * @param {Number[]} axis Local axis about which to rotate.
603
+ * @param {Number} angle Angle increment in degrees.
604
+ */
605
+ rotate(axis: number[], angle: number): Node;
606
+
607
+ /**
608
+ * Rotates the Node about the given World-space axis by the given increment.
609
+ *
610
+ * @param {Number[]} axis Local axis about which to rotate.
611
+ * @param {Number} angle Angle increment in degrees.
612
+ */
613
+ rotateOnWorldAxis(axis: number[], angle: number): Node;
614
+
615
+ /**
616
+ * Rotates the Node about the local X-axis by the given increment.
617
+ *
618
+ * @param {Number} angle Angle increment in degrees.
619
+ */
620
+ rotateX(angle: number): Node;
621
+
622
+ /**
623
+ * Rotates the Node about the local Y-axis by the given increment.
624
+ *
625
+ * @param {Number} angle Angle increment in degrees.
626
+ */
627
+ rotateY(angle: number): Node;
628
+
629
+ /**
630
+ * Rotates the Node about the local Z-axis by the given increment.
631
+ *
632
+ * @param {Number} angle Angle increment in degrees.
633
+ */
634
+ rotateZ(angle: number): Node;
635
+
636
+ /**
637
+ * Translates the Node along local space vector by the given increment.
638
+ *
639
+ * @param {Number[]} axis Normalized local space 3D vector along which to translate.
640
+ * @param {Number} distance Distance to translate along the vector.
641
+ */
642
+ translate(axis: number[], distance: number): Node;
643
+
644
+ /**
645
+ * Translates the Node along the local X-axis by the given increment.
646
+ *
647
+ * @param {Number} distance Distance to translate along the X-axis.
648
+ */
649
+ translateX(distance: number): Node;
650
+
651
+ /**
652
+ * Translates the Node along the local Y-axis by the given increment.
653
+ *
654
+ * @param {Number} distance Distance to translate along the Y-axis.
655
+ */
656
+ translateY(distance: number): Node;
657
+
658
+ /**
659
+ * Translates the Node along the local Z-axis by the given increment.
660
+ *
661
+ * @param {Number} distance Distance to translate along the Z-axis.
662
+ */
663
+ translateZ(distance: number): Node;
664
+ }
@@ -0,0 +1 @@
1
+ export * from "./Node";