@xtctwins/tctwins-core 1.1.19 → 1.1.21

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 (151) hide show
  1. package/README.md +4 -4
  2. package/dist/tctwins-core.es5.js +27557 -27494
  3. package/dist/tctwins-core.min.es5.js +4 -4
  4. package/package.json +84 -84
  5. package/types/extras/ContextMenu/ContextMenu.d.ts +127 -127
  6. package/types/extras/ContextMenu/index.d.ts +1 -1
  7. package/types/extras/PointerCircle/PointerCircle.d.ts +51 -51
  8. package/types/extras/PointerCircle/index.d.ts +1 -1
  9. package/types/extras/PointerLens/PointerLens.d.ts +146 -146
  10. package/types/extras/index.d.ts +3 -3
  11. package/types/index.d.ts +3 -3
  12. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +204 -204
  13. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +91 -91
  14. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +125 -125
  15. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +151 -151
  16. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsSimulateMouseControl.d.ts +86 -86
  17. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsTouchControl.d.ts +124 -124
  18. package/types/plugins/AngleMeasurementsPlugin/index.d.ts +5 -5
  19. package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -135
  20. package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +172 -172
  21. package/types/plugins/AnnotationsPlugin/index.d.ts +2 -2
  22. package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +148 -148
  23. package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -1
  24. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +253 -253
  25. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +96 -96
  26. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +102 -102
  27. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +192 -192
  28. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsSimulateMouseControl.d.ts +83 -83
  29. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsTouchControl.d.ts +103 -103
  30. package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +5 -5
  31. package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +223 -223
  32. package/types/plugins/FastNavPlugin/index.d.ts +1 -1
  33. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +142 -142
  34. package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -1
  35. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +240 -240
  36. package/types/plugins/LASLoaderPlugin/index.d.ts +1 -1
  37. package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +177 -177
  38. package/types/plugins/NavCubePlugin/index.d.ts +1 -1
  39. package/types/plugins/ObjectEditPlugin/ObjectEditPlugin.d.ts +242 -242
  40. package/types/plugins/ObjectEditPlugin/index.d.ts +1 -1
  41. package/types/plugins/SectionPlanesPlugin/SectionBoxControl.d.ts +36 -36
  42. package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +186 -186
  43. package/types/plugins/SectionPlanesPlugin/index.d.ts +2 -2
  44. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +66 -66
  45. package/types/plugins/SkyboxesPlugin/index.d.ts +1 -1
  46. package/types/plugins/StoreyViewsPlugin/Storey.d.ts +69 -69
  47. package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -41
  48. package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -180
  49. package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -1
  50. package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -24
  51. package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +71 -71
  52. package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +267 -267
  53. package/types/plugins/TreeViewPlugin/index.d.ts +1 -1
  54. package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -128
  55. package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -34
  56. package/types/plugins/ViewCullPlugin/index.d.ts +1 -1
  57. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +236 -236
  58. package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -1
  59. package/types/plugins/XTCLoaderPlugin/XTCLoaderPlugin.d.ts +288 -288
  60. package/types/plugins/XTCLoaderPlugin/index.d.ts +1 -1
  61. package/types/plugins/index.d.ts +30 -30
  62. package/types/viewer/Configs.d.ts +46 -46
  63. package/types/viewer/Plugin.d.ts +69 -69
  64. package/types/viewer/Viewer.d.ts +282 -282
  65. package/types/viewer/index.d.ts +6 -6
  66. package/types/viewer/localization/LocaleService.d.ts +183 -183
  67. package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -9
  68. package/types/viewer/metadata/MetaModel.d.ts +94 -102
  69. package/types/viewer/metadata/MetaObject.d.ts +74 -74
  70. package/types/viewer/metadata/MetaScene.d.ts +135 -135
  71. package/types/viewer/metadata/Property.d.ts +29 -29
  72. package/types/viewer/metadata/PropertySet.d.ts +31 -31
  73. package/types/viewer/metadata/index.d.ts +6 -6
  74. package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -255
  75. package/types/viewer/scene/CameraControl/CameraControl.d.ts +777 -777
  76. package/types/viewer/scene/Component.d.ts +155 -155
  77. package/types/viewer/scene/Entity.d.ts +401 -401
  78. package/types/viewer/scene/LineSet/LineSet.d.ts +111 -111
  79. package/types/viewer/scene/camera/Camera.d.ts +364 -364
  80. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -167
  81. package/types/viewer/scene/camera/CameraPath.d.ts +28 -28
  82. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -95
  83. package/types/viewer/scene/camera/CustomProjection.d.ts +57 -57
  84. package/types/viewer/scene/camera/Frustum.d.ts +166 -166
  85. package/types/viewer/scene/camera/Ortho.d.ts +115 -115
  86. package/types/viewer/scene/camera/Perspective.d.ts +136 -136
  87. package/types/viewer/scene/camera/index.d.ts +4 -4
  88. package/types/viewer/scene/geometry/Geometry.d.ts +7 -7
  89. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -95
  90. package/types/viewer/scene/geometry/VBOGeometry.d.ts +62 -62
  91. package/types/viewer/scene/geometry/builders/buildBoxGeometry.d.ts +21 -21
  92. package/types/viewer/scene/geometry/builders/buildBoxLinesGeometry.d.ts +21 -21
  93. package/types/viewer/scene/geometry/builders/buildCylinderGeometry.d.ts +27 -27
  94. package/types/viewer/scene/geometry/builders/buildGridGeometry.d.ts +17 -17
  95. package/types/viewer/scene/geometry/builders/buildPlaneGeometry.d.ts +21 -21
  96. package/types/viewer/scene/geometry/builders/buildSphereGeometry.d.ts +21 -21
  97. package/types/viewer/scene/geometry/builders/buildTorusGeometry.d.ts +25 -25
  98. package/types/viewer/scene/geometry/builders/buildVectorTextGeometry.d.ts +21 -21
  99. package/types/viewer/scene/geometry/builders/index.d.ts +8 -8
  100. package/types/viewer/scene/geometry/index.d.ts +2 -2
  101. package/types/viewer/scene/index.d.ts +23 -23
  102. package/types/viewer/scene/input/input.d.ts +69 -69
  103. package/types/viewer/scene/lights/AmbientLight.d.ts +19 -19
  104. package/types/viewer/scene/lights/DirLight.d.ts +25 -25
  105. package/types/viewer/scene/lights/Light.d.ts +3 -3
  106. package/types/viewer/scene/lights/PointLight.d.ts +30 -30
  107. package/types/viewer/scene/lights/index.d.ts +2 -2
  108. package/types/viewer/scene/marker/Marker.d.ts +136 -136
  109. package/types/viewer/scene/marker/SpriteMarker.d.ts +185 -185
  110. package/types/viewer/scene/marker/index.d.ts +2 -2
  111. package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -83
  112. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -241
  113. package/types/viewer/scene/materials/Fresnel.d.ts +148 -148
  114. package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -71
  115. package/types/viewer/scene/materials/Material.d.ts +3 -3
  116. package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -468
  117. package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -206
  118. package/types/viewer/scene/materials/Texture.d.ts +260 -260
  119. package/types/viewer/scene/materials/index.d.ts +6 -6
  120. package/types/viewer/scene/math/Frustum.d.ts +41 -41
  121. package/types/viewer/scene/math/index.d.ts +1 -1
  122. package/types/viewer/scene/math/math.d.ts +104 -104
  123. package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -28
  124. package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -44
  125. package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -39
  126. package/types/viewer/scene/mementos/index.d.ts +3 -3
  127. package/types/viewer/scene/mesh/Mesh.d.ts +793 -793
  128. package/types/viewer/scene/mesh/index.d.ts +1 -1
  129. package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +9 -9
  130. package/types/viewer/scene/models/PerformanceModel/index.d.ts +1 -1
  131. package/types/viewer/scene/models/SceneModel.d.ts +757 -762
  132. package/types/viewer/scene/models/SceneModelEntity.d.ts +417 -417
  133. package/types/viewer/scene/models/SceneModelMesh.d.ts +68 -68
  134. package/types/viewer/scene/models/SceneModelTexture.d.ts +16 -16
  135. package/types/viewer/scene/models/SceneModelTextureSet.d.ts +51 -51
  136. package/types/viewer/scene/models/SceneModelTransform.d.ts +197 -197
  137. package/types/viewer/scene/models/VBOSceneModel/VBOSceneModel.d.ts +7 -7
  138. package/types/viewer/scene/models/index.d.ts +7 -7
  139. package/types/viewer/scene/nodes/Node.d.ts +664 -664
  140. package/types/viewer/scene/nodes/index.d.ts +1 -1
  141. package/types/viewer/scene/postfx/CrossSections.d.ts +42 -42
  142. package/types/viewer/scene/postfx/SAO.d.ts +209 -209
  143. package/types/viewer/scene/scene/Scene.d.ts +1068 -1068
  144. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +110 -110
  145. package/types/viewer/scene/sectionPlane/index.d.ts +1 -1
  146. package/types/viewer/scene/stats.d.ts +40 -40
  147. package/types/viewer/scene/viewport/Viewport.d.ts +23 -23
  148. package/types/viewer/scene/viewport/index.d.ts +1 -1
  149. package/types/viewer/scene/webgl/PickResult.d.ts +115 -115
  150. package/types/viewer/scene/webgl/index.d.ts +1 -1
  151. package/dist/tctwins-core.umd.js +0 -37
@@ -1,1068 +1,1068 @@
1
- import { Component } from "../Component";
2
- import { Camera } from "../camera/Camera";
3
- import { PickResult } from "../webgl/PickResult";
4
- import { SAO } from "../postfx/SAO";
5
- import { Entity } from "../Entity";
6
- import { ReadableGeometry } from "../geometry";
7
- import { EdgeMaterial, EmphasisMaterial, PhongMaterial, PointsMaterial, LinesMaterial } from "../materials";
8
- import { Viewport } from "../viewport/Viewport";
9
- import { VBOSceneModel } from "../models/VBOSceneModel/VBOSceneModel";
10
- import { Mesh } from "../mesh";
11
- import { Node } from "../nodes";
12
- import { Input } from "../input/input";
13
- import { SceneModel } from "../models";
14
-
15
- export declare type TickEvent = {
16
- /** The ID of this Scene. */
17
- sceneID: string;
18
- /** The time in seconds since 1970 that this Scene was instantiated. */
19
- startTime: Number;
20
- /** The time in seconds since 1970 of this "tick" event. */
21
- time: Number;
22
- /** The time of the previous "tick" event from this Scene.. */
23
- prevTime: Number;
24
- /** The time in seconds since the previous "tick" event from this Scene. */
25
- deltaTime: Number;
26
- };
27
-
28
- export declare class Scene extends Component {
29
- /**
30
- * Fires when a model is loaded
31
- * @param event The loaded event
32
- * @param callback Called fired on the event
33
- * @param scope Scope for the callback
34
- */
35
- on(event: "modelLoaded", callback: (modelId: string) => void, scope?: any): string;
36
-
37
- /**
38
- * Fires when a model is unloaded
39
- * @param event The loaded event
40
- * @param callback Called fired on the event
41
- * @param scope Scope for the callback
42
- */
43
- on(event: "modelUnloaded", callback: (modelId: string) => void, scope?: any): string;
44
-
45
- /**
46
- * Fired when about to render a frame for a Scene.
47
- * @param event The rendering event
48
- * @param callback Called fired on the event
49
- * @param scope Scope for the callback
50
- */
51
- on(event: "rendering", callback: (renderEvent: { sceneId: number; pass: number }) => void, scope?: any): string;
52
-
53
- /**
54
- * Fired when we have just rendered a frame for a Scene.
55
- * @param event The rendered event
56
- * @param callback Called fired on the event
57
- * @param scope Scope for the callback
58
- */
59
- on(event: "rendered", callback: (renderEvent: { sceneId: number; pass: number }) => void, scope?: any): string;
60
-
61
- /**
62
- * Fires when the entity visibility is updated.
63
- * @param event The rendered event
64
- * @param callback Called fired on the event
65
- * @param scope Scope for the callback
66
- */
67
- on(
68
- event: "objectVisibility" | "objectXRayed" | "objectHighlighted" | "objectSelected",
69
- callback: (entity: VBOSceneModel | Mesh | Node) => void,
70
- scope?: any
71
- ): string;
72
-
73
- /**
74
- * Fired on each game loop iteration.
75
- * @event event The tick event
76
- * @param callback Called fired on the event
77
- * @param scope Scope for the callback
78
- */
79
- on(event: "tick", callback: (tickEvent: TickEvent) => void, scope?: any): string;
80
-
81
- /**
82
- * fired when scene.aabb is update
83
- * @param event
84
- * @param callback
85
- */
86
- on(event: "aabb", callback: (aabb: Float32Array | Float64Array) => void): void;
87
-
88
- /**
89
- * return lights objects
90
- */
91
- get lightsObject(): any;
92
-
93
- /**
94
- * The epoch time (in milliseconds since 1970) when this Scene was instantiated.
95
- */
96
- get startTime(): Date;
97
-
98
- /**
99
- * canvas
100
- */
101
- get canvas(): any;
102
-
103
- /**
104
- * Sets whether data texture scene representation (DTX) is enabled for the {@link Scene}.
105
- *
106
- * Even when enabled, DTX will only work if supported.
107
- *
108
- * Default value is ````false````.
109
- *
110
- * @type {Boolean}
111
- */
112
- set dtxEnabled(value: boolean);
113
-
114
- /**
115
- * Gets whether data texture-based scene representation (DTX) is enabled for the {@link Scene}.
116
- *
117
- * Even when enabled, DTX will only apply if supported.
118
- *
119
- * Default value is ````false````.
120
- *
121
- * @type {Boolean}
122
- */
123
- get dtxEnabled(): boolean;
124
-
125
- /**
126
- * Sets whether physically-based rendering is enabled.
127
- * Default is ````false````.
128
- * @param {boolean} pbrEnabled
129
- */
130
- set pbrEnabled(pbrEnabled: boolean);
131
-
132
- /**
133
- * Gets whether physically-based rendering is enabled.
134
- * Default is ````false````.
135
- * @returns {Boolean} True if quality rendering is enabled.
136
- */
137
- get pbrEnabled(): boolean;
138
-
139
- /**+
140
- * Sets whether environment light rendering is enabled.
141
- * Default is ````false````.
142
- * @param {boolean} saoEnabled
143
- */
144
- set saoEnabled(saoEnabled: boolean);
145
-
146
- /**
147
- * Gets whether environment light rendering is enabled.
148
- * Default is ````false````.
149
- * @returns {boolean}
150
- */
151
- get saoEnabled(): boolean;
152
-
153
- /**
154
- * set showedges enable
155
- * @param {boolean} edgesEnabled
156
- */
157
- set edgesEnabled(edgesEnabled: boolean);
158
-
159
- /**
160
- * @param {boolean} trans
161
- */
162
- get edgesEnabled(): boolean;
163
-
164
- /**
165
- * Sets whether basic color texture rendering is enabled.
166
- *
167
- * Default is ````true````.
168
- *
169
- * @param {Boolean} colorTextureEnabled
170
- */
171
- set colorTextureEnabled(colorTextureEnabled: boolean);
172
-
173
- /**
174
- * Gets whether basic color texture rendering is enabled.
175
- *
176
- * Default is ````true````.
177
- *
178
- * @returns {Boolean} True if basic color texture rendering is enabled.
179
- */
180
- get colorTextureEnabled(): boolean;
181
-
182
- /**
183
- * set whether transparent of canvas background
184
- * @param {boolean} trans
185
- */
186
- set backgroundTransparent(trans: boolean);
187
-
188
- /**
189
- * @returns {boolean} backgroundTransparent
190
- */
191
- get backgroundTransparent(): boolean;
192
-
193
- /**
194
- * set background color
195
- * @param {[]} color
196
- */
197
- set backgroundColor(color: []);
198
-
199
- /**
200
- * return backgroundColor
201
- * @returns {boolean} backgroundColor
202
- */
203
- get backgroundColor(): [];
204
-
205
- /**
206
- * Map of {@link Entity}s that represent models.
207
- *
208
- * Each {@link Entity} is mapped here by {@link Entity.id} when {@link Entity.isModel} is ````true````.
209
- * @type {{String:Entity}}
210
- */
211
- get models(): { [key: string]: SceneModel };
212
-
213
- /**
214
- * Map of {@link Entity}s that represents objects.
215
- *
216
- * Each {@link Entity} is mapped here by {@link Entity.id} when {@link Entity.isObject} is ````true````.
217
- * @final
218
- * @type {{String:Entity}}
219
- */
220
- get objects(): { [key: string]: Entity };
221
-
222
- /**
223
- * Map of currently visible {@link Entity}s that represent objects.
224
- *
225
- * An Entity represents an object if {@link Entity.isObject} is ````true````, and is visible when {@link Entity.visible} is true.
226
- * @type {{String:Object}}
227
- */
228
- get visibleObjects(): { [key: string]: Entity };
229
-
230
- /**
231
- * Map of currently xrayed {@link Entity}s that represent objects.
232
- *
233
- * An Entity represents an object if {@link Entity.isObject} is ````true````, and is xrayed when {@link Entity.xrayed} is true.
234
- *
235
- * Each {@link Entity} is mapped here by {@link Entity.id}.
236
- *
237
- * @type {{String:Object}}
238
- */
239
- get xrayedObjects(): { [key: string]: Entity };
240
-
241
- /**
242
- * Map of currently highlighted {@link Entity}s that represent objects.
243
- *
244
- * An Entity represents an object if {@link Entity.isObject} is ````true```` is true, and is highlighted when {@link Entity.highlighted} is true.
245
- *
246
- * Each {@link Entity} is mapped here by {@link Entity.id}.
247
- *
248
- * @type {{String:Object}}
249
- */
250
- get highlightedObjects(): { [key: string]: Entity };
251
-
252
- get edgesObjects(): { [key: string]: Entity };
253
-
254
- /**
255
- * Map of currently selected {@link Entity}s that represent objects.
256
- *
257
- * An Entity represents an object if {@link Entity.isObject} is true, and is selected while {@link Entity.selected} is true.
258
- *
259
- * Each {@link Entity} is mapped here by {@link Entity.id}.
260
- *
261
- * @type {{String:Object}}
262
- */
263
- get selectedObjects(): { [key: string]: Entity };
264
-
265
- /**
266
- * Map of currently colorized {@link Entity}s that represent objects.
267
- *
268
- * An Entity represents an object if {@link Entity.isObject} is ````true````.
269
- *
270
- * Each {@link Entity} is mapped here by {@link Entity.id}.
271
- *
272
- * @type {{String:Object}}
273
- */
274
- get colorizedObjects(): { [key: string]: Entity };
275
-
276
- /**
277
- * Map of {@link Entity}s that represent objects whose opacity was updated.
278
- *
279
- * An Entity represents an object if {@link Entity.isObject} is ````true````.
280
- *
281
- * Each {@link Entity} is mapped here by {@link Entity.id}.
282
- *
283
- * @type {{String:Object}}
284
- */
285
- get opacityObjects(): { [key: string]: Entity };
286
-
287
- /**
288
- * Map of {@link Entity}s that represent objects whose {@link Entity.offset}s were updated.
289
- *
290
- * An Entity represents an object if {@link Entity.isObject} is ````true````.
291
- *
292
- * Each {@link Entity} is mapped here by {@link Entity.id}.
293
- *
294
- * @property offsetObjects
295
- * @final
296
- * @type {{String:Object}}
297
- */
298
- get offsetObjects(): { [key: string]: Entity };
299
-
300
- /**
301
- * Whether {@link Entity.offset} is enabled.
302
- *
303
- * This is set via the {@link Viewer} constructor and is ````false```` by default.
304
- *
305
- * @returns {Boolean} True if {@link Entity.offset} is enabled.
306
- */
307
- get entityOffsetsEnabled(): boolean;
308
-
309
- /**
310
- * Whether precision surface picking is enabled.
311
- *
312
- * This is set via the {@link Viewer} constructor and is ````false```` by default.
313
- *
314
- * The ````pickSurfacePrecision```` option for ````Scene.pick```` only works if this is set ````true````.
315
- *
316
- * Note that when ````true````, this configuration will increase the amount of browser memory used by the Viewer.
317
- *
318
- * @returns {Boolean} True if precision picking is enabled.
319
- */
320
- get pickSurfacePrecisionEnabled(): boolean;
321
-
322
- /**
323
- * Whether logarithmic depth buffer is enabled.
324
- *
325
- * This is set via the {@link Viewer} constructor and is ````false```` by default.
326
- *
327
- * @returns {Boolean} True if logarithmic depth buffer is enabled.
328
- */
329
- get logarithmicDepthBufferEnabled(): boolean;
330
-
331
- /**
332
- * Gets the IDs of the {@link Entity}s in {@link Scene.models}.
333
- *
334
- * @type {String[]}
335
- */
336
- get modelIds(): string[];
337
-
338
- /**
339
- * Gets the number of {@link Entity}s in {@link Scene.objects}.
340
- *
341
- * @type {Number}
342
- */
343
- get numObjects(): number;
344
-
345
- /**
346
- * Gets the IDs of the {@link Entity}s in {@link Scene.objects}.
347
- *
348
- * @type {String[]}
349
- */
350
- get objectIds(): string[];
351
-
352
- /**
353
- * Gets the number of {@link Entity}s in {@link Scene.visibleObjects}.
354
- *
355
- * @type {Number}
356
- */
357
- get numVisibleObjects(): number;
358
-
359
- /**
360
- * Gets the IDs of the {@link Entity}s in {@link Scene.visibleObjects}.
361
- *
362
- * @type {String[]}
363
- */
364
- get visibleObjectIds(): string[];
365
-
366
- /**
367
- * Gets the number of {@link Entity}s in {@link Scene.xrayedObjects}.
368
- *
369
- * @type {Number}
370
- */
371
- get numXRayedObjects(): number;
372
-
373
- /**
374
- * Gets the IDs of the {@link Entity}s in {@link Scene.xrayedObjects}.
375
- *
376
- * @type {String[]}
377
- */
378
- get xrayedObjectIds(): string[];
379
-
380
- /**
381
- * Gets the number of {@link Entity}s in {@link Scene.highlightedObjects}.
382
- *
383
- * @type {Number}
384
- */
385
- get numHighlightedObjects(): number;
386
-
387
- /**
388
- * Gets the IDs of the {@link Entity}s in {@link Scene.highlightedObjects}.
389
- *
390
- * @type {String[]}
391
- */
392
- get highlightedObjectIds(): string[];
393
-
394
- /**
395
- * Gets the number of {@link Entity}s in {@link Scene.selectedObjects}.
396
- *
397
- * @type {Number}
398
- */
399
- get numSelectedObjects(): number;
400
-
401
- /**
402
- * Gets the IDs of the {@link Entity}s in {@link Scene.selectedObjects}.
403
- *
404
- * @type {String[]}
405
- */
406
- get selectedObjectIds(): string[];
407
-
408
- get numEdgesObjects(): number;
409
-
410
- get edgesObjectIds(): string[];
411
-
412
- /**
413
- * Gets the number of {@link Entity}s in {@link Scene.colorizedObjects}.
414
- *
415
- * @type {Number}
416
- */
417
- get numColorizedObjects(): number;
418
-
419
- /**
420
- * Gets the IDs of the {@link Entity}s in {@link Scene.colorizedObjects}.
421
- *
422
- * @type {String[]}
423
- */
424
- get colorizedObjectIds(): string[];
425
-
426
- /**
427
- * Gets the IDs of the {@link Entity}s in {@link Scene.opacityObjects}.
428
- *
429
- * @type {String[]}
430
- */
431
- get opacityObjectIds(): string[];
432
-
433
- /**
434
- * Gets the IDs of the {@link Entity}s in {@link Scene.offsetObjects}.
435
- *
436
- * @type {String[]}
437
- */
438
- get offsetObjectIds(): string[];
439
-
440
- /**
441
- * Sets the number of "ticks" that happen between each render or this Scene.
442
- *
443
- * Default value is ````1````.
444
- *
445
- * @type {Number}
446
- */
447
- set ticksPerRender(value: number);
448
-
449
- /**
450
- * Gets the number of "ticks" that happen between each render or this Scene.
451
- *
452
- * Default value is ````1````.
453
- *
454
- * @type {Number}
455
- */
456
- get ticksPerRender(): number;
457
-
458
- /**
459
- * Sets the number of "ticks" that happen between occlusion testing for {@link Marker}s.
460
- *
461
- * Default value is ````20````.
462
- *
463
- * @type {Number}
464
- */
465
- set ticksPerOcclusionTest(value: number);
466
-
467
- /**
468
- * Gets the number of "ticks" that happen between each render of this Scene.
469
- *
470
- * Default value is ````1````.
471
- *
472
- * @type {Number}
473
- */
474
- get ticksPerOcclusionTest(): number;
475
-
476
- /**
477
- * Sets the number of times this Scene renders per frame.
478
- *
479
- * Default value is ````1````.
480
- *
481
- * @type {Number}
482
- */
483
- set passes(value: number);
484
-
485
- /**
486
- * Gets the number of times this Scene renders per frame.
487
- *
488
- * Default value is ````1````.
489
- *
490
- * @type {Number}
491
- */
492
- get passes(): number;
493
-
494
- /**
495
- * When {@link Scene.passes} is greater than ````1````, indicates whether or not to clear the canvas before each pass (````true````) or just before the first pass (````false````).
496
- *
497
- * Default value is ````false````.
498
- *
499
- * @type {Boolean}
500
- */
501
- set clearEachPass(value: boolean);
502
-
503
- /**
504
- * When {@link Scene.passes} is greater than ````1````, indicates whether or not to clear the canvas before each pass (````true````) or just before the first pass (````false````).
505
- *
506
- * Default value is ````false````.
507
- *
508
- * @type {Boolean}
509
- */
510
- get clearEachPass(): boolean;
511
-
512
- /**
513
- * Sets whether or not {@link Scene} should expect all {@link Texture}s and colors to have pre-multiplied gamma.
514
- *
515
- * Default value is ````false````.
516
- *
517
- * @type {Boolean}
518
- */
519
- set gammaInput(value: boolean);
520
-
521
- /**
522
- * Gets whether or not {@link Scene} should expect all {@link Texture}s and colors to have pre-multiplied gamma.
523
- *
524
- * Default value is ````false````.
525
- *
526
- * @type {Boolean}
527
- */
528
- get gammaInput(): boolean;
529
-
530
- /**
531
- * Sets whether or not to render pixels with pre-multiplied gama.
532
- *
533
- * Default value is ````false````.
534
- *
535
- * @type {Boolean}
536
- */
537
- set gammaOutput(value: boolean);
538
-
539
- /**
540
- * Gets whether or not to render pixels with pre-multiplied gama.
541
- *
542
- * Default value is ````true````.
543
- *
544
- * @type {Boolean}
545
- */
546
- get gammaOutput(): boolean;
547
-
548
- /**
549
- * Sets the gamma factor to use when {@link Scene.gammaOutput} is set true.
550
- *
551
- * Default value is ````2.2````.
552
- *
553
- * @type {Number}
554
- */
555
- set gammaFactor(value: number);
556
-
557
- /**
558
- * Gets the gamma factor to use when {@link Scene.gammaOutput} is set true.
559
- *
560
- * Default value is ````2.2````.
561
- *
562
- * @type {Number}
563
- */
564
- get gammaFactor(): number;
565
-
566
- /**
567
- * Gets the default {@link Geometry} for this Scene, which is a {@link ReadableGeometry} with a unit-sized box shape.
568
- *
569
- * Has {@link ReadableGeometry.id} set to "default.geometry".
570
- *
571
- * {@link Mesh}s in this Scene have {@link Mesh.geometry} set to this {@link ReadableGeometry} by default.
572
- *
573
- * @type {ReadableGeometry}
574
- */
575
- get geometry(): ReadableGeometry;
576
-
577
- /**
578
- * Gets the default {@link Material} for this Scene, which is a {@link PhongMaterial}.
579
- *
580
- * Has {@link PhongMaterial.id} set to "default.material".
581
- *
582
- * {@link Mesh}s in this Scene have {@link Mesh.material} set to this {@link PhongMaterial} by default.
583
- *
584
- * @type {PhongMaterial}
585
- */
586
- get material(): PhongMaterial;
587
-
588
- /**
589
- * Gets the default xraying {@link EmphasisMaterial} for this Scene.
590
- *
591
- * Has {@link EmphasisMaterial.id} set to "default.xrayMaterial".
592
- *
593
- * {@link Mesh}s in this Scene have {@link Mesh.xrayMaterial} set to this {@link EmphasisMaterial} by default.
594
- *
595
- * {@link Mesh}s are xrayed while {@link Mesh.xrayed} is ````true````.
596
- *
597
- * @type {EmphasisMaterial}
598
- */
599
- get xrayMaterial(): EmphasisMaterial;
600
-
601
- /**
602
- * Gets the default highlight {@link EmphasisMaterial} for this Scene.
603
- *
604
- * Has {@link EmphasisMaterial.id} set to "default.highlightMaterial".
605
- *
606
- * {@link Mesh}s in this Scene have {@link Mesh.highlightMaterial} set to this {@link EmphasisMaterial} by default.
607
- *
608
- * {@link Mesh}s are highlighted while {@link Mesh.highlighted} is ````true````.
609
- *
610
- * @type {EmphasisMaterial}
611
- */
612
- get highlightMaterial(): EmphasisMaterial;
613
-
614
- /**
615
- * Gets the default selection {@link EmphasisMaterial} for this Scene.
616
- *
617
- * Has {@link EmphasisMaterial.id} set to "default.selectedMaterial".
618
- *
619
- * {@link Mesh}s in this Scene have {@link Mesh.highlightMaterial} set to this {@link EmphasisMaterial} by default.
620
- *
621
- * {@link Mesh}s are highlighted while {@link Mesh.highlighted} is ````true````.
622
- *
623
- * @type {EmphasisMaterial}
624
- */
625
- get selectedMaterial(): EmphasisMaterial;
626
-
627
- /**
628
- * Gets the default {@link EdgeMaterial} for this Scene.
629
- *
630
- * Has {@link EdgeMaterial.id} set to "default.edgeMaterial".
631
- *
632
- * {@link Mesh}s in this Scene have {@link Mesh.edgeMaterial} set to this {@link EdgeMaterial} by default.
633
- *
634
- * {@link Mesh}s have their edges emphasized while {@link Mesh.edges} is ````true````.
635
- *
636
- * @type {EdgeMaterial}
637
- */
638
- get edgeMaterial(): EdgeMaterial;
639
-
640
- /**
641
- * Gets the {@link PointsMaterial} for this Scene.
642
- *
643
- * @type {PointsMaterial}
644
- */
645
- get pointsMaterial(): PointsMaterial;
646
-
647
- /**
648
- * Gets the {@link LinesMaterial} for this Scene.
649
- *
650
- * @type {LinesMaterial}
651
- */
652
- get linesMaterial(): LinesMaterial;
653
-
654
- /**
655
- * Gets the {@link Viewport} for this Scene.
656
- *
657
- * @type Viewport
658
- */
659
- get viewport(): Viewport;
660
-
661
- /**
662
- * Gets the {@link Camera} for this Scene.
663
- *
664
- * @type {Camera}
665
- */
666
- get camera(): Camera;
667
-
668
- /**
669
- * Gets the World-space 3D center of this Scene.
670
- *
671
- *@type {Number[]}
672
- */
673
- get center(): number[];
674
-
675
- /**
676
- * Gets the World-space axis-aligned 3D boundary (AABB) of this Scene.
677
- *
678
- * The AABB is represented by a six-element Float64Array containing the min/max extents of the axis-aligned volume, ie. ````[xmin, ymin,zmin,xmax,ymax, zmax]````.
679
- *
680
- * When the Scene has no content, will be ````[-100,-100,-100,100,100,100]````.
681
- *
682
- * @type {Number[]}
683
- */
684
- get aabb(): number[];
685
-
686
- get aabbs(): any;
687
-
688
- get sao(): SAO;
689
-
690
- get input(): Input;
691
-
692
- /**
693
- * Performs an occlusion test on all {@link Marker}s in this {@link Scene}.
694
- *
695
- * Sets each {@link Marker.visible} ````true```` if the Marker is currently not occluded by any opaque {@link Entity}s
696
- * in the Scene, or ````false```` if an Entity is occluding it.
697
- */
698
- doOcclusionTest(): void;
699
-
700
- /**
701
- * Renders a single frame of this Scene.
702
- *
703
- * The Scene will periodically render itself after any updates, but you can call this method to force a render
704
- * if required.
705
- *
706
- * @param {Boolean} [forceRender=false] Forces a render when true, otherwise only renders if something has changed in this Scene
707
- * since the last render.
708
- */
709
- render(forceRender?: boolean): void;
710
-
711
- /**
712
- * Attempts to pick an {@link Entity} in this Scene.
713
- * @param {*} params Picking parameters.
714
- * @param {Boolean} [params.pickSurface=false] Whether to find the picked position on the surface of the Entity.
715
- * @param {Boolean} [params.pickSurfacePrecision=false] When picking an Entity surface position, indicates whether or not we want full-precision {@link PickResult.worldPos}. Only works when {@link Scene.pickSurfacePrecisionEnabled} is ````true````. If pick succeeds, the returned {@link PickResult} will have {@link PickResult.precision} set ````true````, to indicate that it contains full-precision surface pick results.
716
- * @param {Boolean} [params.pickSurfaceNormal=false] Whether to find the picked normal on the surface of the Entity. Only works if ````pickSurface```` is given.
717
- * @param {Number[]} [params.canvasPos] Canvas-space coordinates. When ray-picking, this will override the **origin** and ** direction** parameters and will cause the ray to be fired through the canvas at this position, directly along the negative View-space Z-axis.
718
- * @param {Number[]} [params.origin] World-space ray origin when ray-picking. Ignored when canvasPos given.
719
- * @param {Number[]} [params.direction] World-space ray direction when ray-picking. Also indicates the length of the ray. Ignored when canvasPos given.
720
- * @param {Number[]} [params.matrix] 4x4 transformation matrix to define the World-space ray origin and direction, as an alternative to ````origin```` and ````direction````.
721
- * @param {String[]} [params.includeEntities] IDs of {@link Entity}s to restrict picking to. When given, ignores {@link Entity}s whose IDs are not in this list.
722
- * @param {String[]} [params.excludeEntities] IDs of {@link Entity}s to ignore. When given, will pick *through* these {@link Entity}s, as if they were not there.
723
- * @param {PickResult} [pickResult] Holds the results of the pick attempt. Will use the Scene's singleton PickResult if you don't supply your own.
724
- * @returns {PickResult} Holds results of the pick attempt, returned when an {@link Entity} is picked, else null. See method comments for description.
725
- */
726
- pick(
727
- params: {
728
- pickSurface?: boolean;
729
- pickSurfacePrecision?: boolean;
730
- pickSurfaceNormal?: boolean;
731
- canvasPos?: number[];
732
- origin?: number[];
733
- direction?: number[];
734
- matrix?: number[];
735
- includeEntities?: string[];
736
- excludeEntities?: string[];
737
- },
738
- pickResult?: PickResult
739
- ): PickResult | null;
740
-
741
- /**
742
- * Destroys all non-default {@link Component}s in this Scene.
743
- */
744
- clear(): void;
745
-
746
- /**
747
- * Destroys all {@link Light}s in this Scene..
748
- */
749
- clearLights(): void;
750
-
751
- /**
752
- * Destroys all {@link SectionPlane}s in this Scene.
753
- */
754
- clearSectionPlanes(): void;
755
-
756
- /**
757
- * Gets the collective axis-aligned boundary (AABB) of a batch of {@link Entity}s that represent objects.
758
- *
759
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
760
- *
761
- * Each {@link Entity} on which {@link Entity.isObject} is registered by {@link Entity.id} in {@link Scene.visibleObjects}.
762
- *
763
- * Each {@link Entity} is only included in the AABB when {@link Entity.collidable} is ````true````.
764
- *
765
- * @param {String[]} ids Array of {@link Entity.id} values.
766
- * @returns {[Number, Number, Number, Number, Number, Number]} An axis-aligned World-space bounding box, given as elements ````[xmin, ymin, zmin, xmax, ymax, zmax]````.
767
- */
768
- getAABB(ids?: string[] | null): number[];
769
-
770
- /**
771
- * Batch-updates {@link Entity.visible} on {@link Entity}s that represent objects.
772
- *
773
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
774
- *
775
- * Each {@link Entity} on which both {@link Entity.isObject} and {@link Entity.visible} are ````true```` is
776
- * registered by {@link Entity.id} in {@link Scene.visibleObjects}.
777
- *
778
- * @param {String[]} ids Array of {@link Entity.id} values.
779
- * @param {Boolean} visible Whether or not to set visible.
780
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
781
- */
782
- setObjectsVisible(ids: string[], visible: boolean): boolean;
783
-
784
- /**
785
- * Batch-updates {@link Entity.collidable} on {@link Entity}s that represent objects.
786
- *
787
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
788
- *
789
- * @param {String[]} ids Array of {@link Entity.id} values.
790
- * @param {Boolean} collidable Whether or not to set collidable.
791
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
792
- */
793
- setObjectsCollidable(ids: string[], collidable: boolean): boolean;
794
-
795
- /**
796
- * Batch-updates {@link Entity.culled} on {@link Entity}s that represent objects.
797
- *
798
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
799
- *
800
- * @param {String[]} ids Array of {@link Entity.id} values.
801
- * @param {Boolean} culled Whether or not to cull.
802
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
803
- */
804
- setObjectsCulled(ids: string[], culled: boolean): boolean;
805
-
806
- /**
807
- * Batch-updates {@link Entity.selected} on {@link Entity}s that represent objects.
808
- *
809
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
810
- *
811
- * Each {@link Entity} on which both {@link Entity.isObject} and {@link Entity.selected} are ````true```` is
812
- * registered by {@link Entity.id} in {@link Scene.selectedObjects}.
813
- *
814
- * @param {String[]} ids Array of {@link Entity.id} values.
815
- * @param {Boolean} selected Whether or not to select.
816
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
817
- */
818
- setObjectsSelected(ids: string[], selected: boolean): boolean;
819
-
820
- /**
821
- * Batch-updates {@link Entity.highlighted} on {@link Entity}s that represent objects.
822
- *
823
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
824
- *
825
- * Each {@link Entity} on which both {@link Entity.isObject} and {@link Entity.highlighted} are ````true```` is
826
- * registered by {@link Entity.id} in {@link Scene.highlightedObjects}.
827
- *
828
- * @param {String[]} ids Array of {@link Entity.id} values.
829
- * @param {Boolean} highlighted Whether or not to highlight.
830
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
831
- */
832
- setObjectsHighlighted(ids: string[], highlighted: boolean): boolean;
833
-
834
- /**
835
- * Batch-updates {@link Entity.xrayed} on {@link Entity}s that represent objects.
836
- *
837
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
838
- *
839
- * @param {String[]} ids Array of {@link Entity.id} values.
840
- * @param {Boolean} xrayed Whether or not to xray.
841
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
842
- */
843
- setObjectsXRayed(ids: string[], xrayed: boolean): boolean;
844
-
845
- /**
846
- * Batch-updates {@link Entity.edges} on {@link Entity}s that represent objects.
847
- *
848
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
849
- *
850
- * @param {String[]} ids Array of {@link Entity.id} values.
851
- * @param {Boolean} edges Whether or not to show edges.
852
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
853
- */
854
- setObjectsEdges(ids: string[], edges: boolean): boolean;
855
-
856
- /**
857
- * Batch-updates {@link Entity.colorize} on {@link Entity}s that represent objects.
858
- *
859
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
860
- *
861
- * @param {String[]} ids Array of {@link Entity.id} values.
862
- * @param {Number[]} [colorize=(1,1,1)] RGB colorize factors, multiplied by the rendered pixel colors.
863
- * @returns {Boolean} True if any {@link Entity}s changed opacity, else false if all updates were redundant and not applied.
864
- */
865
- setObjectsColorized(ids: string[], colorize: number[] | null): boolean;
866
-
867
- /**
868
- * Batch-updates {@link Entity.opacity} on {@link Entity}s that represent objects.
869
- *
870
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
871
- *
872
- * @param {String[]} ids Array of {@link Entity.id} values.
873
- * @param {Number} [opacity=1.0] Opacity factor, multiplied by the rendered pixel alphas.
874
- * @returns {Boolean} True if any {@link Entity}s changed opacity, else false if all updates were redundant and not applied.
875
- */
876
- setObjectsOpacity(ids: string[], opacity: number): boolean;
877
-
878
- /**
879
- * Batch-updates {@link Entity.pickable} on {@link Entity}s that represent objects.
880
- *
881
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
882
- *
883
- * @param {String[]} ids Array of {@link Entity.id} values.
884
- * @param {Boolean} pickable Whether or not to set pickable.
885
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
886
- */
887
- setObjectsPickable(ids: string[], pickable: boolean): boolean;
888
-
889
- /**
890
- * Batch-updates {@link Entity.offset} on {@link Entity}s that represent objects.
891
- *
892
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
893
- *
894
- * @param {String[]} ids Array of {@link Entity.id} values.
895
- * @param {Number[]} [offset] 3D offset vector.
896
- */
897
- setObjectsOffset(ids: string[], offset: number[]): void;
898
-
899
- /**
900
- * Batch-updates local translation on {@link Entity}s that represent objects.
901
- *
902
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
903
- *
904
- * Only works on Entity types that have a ````position```` property
905
- * (e.g. {@link Mesh}, {@link SceneModelTransform}).
906
- *
907
- * @param {String[]} ids Array of {@link Entity.id} values.
908
- * @param {Number[]} position 3D position vector ````[x, y, z]````.
909
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
910
- */
911
- setObjectsPosition(ids: string | string[], position: number[]): boolean;
912
-
913
- /**
914
- * Gets the local translation of an object {@link Entity}.
915
- *
916
- * @param {String} id The {@link Entity.id}.
917
- * @returns {Number[]|null} 3D position vector ````[x, y, z]````, or ````null````.
918
- */
919
- getObjectPosition(id: string): number[] | null;
920
-
921
- /**
922
- * Batch-updates local translation on {@link Entity}s, with per-object values.
923
- *
924
- * @param positionMap Map from {@link Entity.id} to 3D position vector ````[x, y, z]````.
925
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
926
- */
927
- setObjectsPositionMap(positionMap: { [id: string]: number[] }): boolean;
928
-
929
- /**
930
- * Batch-updates local rotation on {@link Entity}s that represent objects.
931
- *
932
- * Only works on Entity types that have a ````rotation```` property.
933
- *
934
- * @param {String[]} ids Array of {@link Entity.id} values.
935
- * @param {Number[]} rotation Euler angles in degrees ````[rx, ry, rz]````.
936
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
937
- */
938
- setObjectsRotation(ids: string | string[], rotation: number[]): boolean;
939
-
940
- /**
941
- * Gets the local rotation of an object {@link Entity}.
942
- *
943
- * @param {String} id The {@link Entity.id}.
944
- * @returns {Number[]|null} Euler angles in degrees ````[rx, ry, rz]````, or ````null````.
945
- */
946
- getObjectRotation(id: string): number[] | null;
947
-
948
- /**
949
- * Batch-updates local rotation on {@link Entity}s, with per-object values.
950
- *
951
- * @param rotationMap Map from {@link Entity.id} to Euler angles in degrees ````[rx, ry, rz]````.
952
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
953
- */
954
- setObjectsRotationMap(rotationMap: { [id: string]: number[] }): boolean;
955
-
956
- /**
957
- * Batch-updates local scale on {@link Entity}s that represent objects.
958
- *
959
- * Only works on Entity types that have a ````scale```` property.
960
- *
961
- * @param {String[]} ids Array of {@link Entity.id} values.
962
- * @param {Number[]} scale 3D scale vector ````[sx, sy, sz]````.
963
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
964
- */
965
- setObjectsScale(ids: string | string[], scale: number[]): boolean;
966
-
967
- /**
968
- * Gets the local scale of an object {@link Entity}.
969
- *
970
- * @param {String} id The {@link Entity.id}.
971
- * @returns {Number[]|null} 3D scale vector ````[sx, sy, sz]````, or ````null````.
972
- */
973
- getObjectScale(id: string): number[] | null;
974
-
975
- /**
976
- * Batch-updates local scale on {@link Entity}s, with per-object values.
977
- *
978
- * @param scaleMap Map from {@link Entity.id} to 3D scale vector ````[sx, sy, sz]````.
979
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
980
- */
981
- setObjectsScaleMap(scaleMap: { [id: string]: number[] }): boolean;
982
-
983
- /**
984
- * Batch-updates local rotation quaternion on {@link Entity}s that represent objects.
985
- *
986
- * Only works on Entity types that have a ````quaternion```` property.
987
- *
988
- * @param {String[]} ids Array of {@link Entity.id} values.
989
- * @param {Number[]} quaternion Quaternion ````[x, y, z, w]````.
990
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
991
- */
992
- setObjectsQuaternion(ids: string | string[], quaternion: number[]): boolean;
993
-
994
- /**
995
- * Gets the local rotation quaternion of an object {@link Entity}.
996
- *
997
- * @param {String} id The {@link Entity.id}.
998
- * @returns {Number[]|null} Quaternion ````[x, y, z, w]````, or ````null````.
999
- */
1000
- getObjectQuaternion(id: string): number[] | null;
1001
-
1002
- /**
1003
- * Batch-updates local rotation quaternion on {@link Entity}s, with per-object values.
1004
- *
1005
- * @param quaternionMap Map from {@link Entity.id} to quaternion ````[x, y, z, w]````.
1006
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
1007
- */
1008
- setObjectsQuaternionMap(quaternionMap: { [id: string]: number[] }): boolean;
1009
-
1010
- /**
1011
- * Batch-updates local modeling transform matrix on {@link Entity}s that represent objects.
1012
- *
1013
- * Only works on Entity types that have a ````matrix```` property.
1014
- *
1015
- * @param {String[]} ids Array of {@link Entity.id} values.
1016
- * @param {Number[]} matrix 16-element 4x4 column-major matrix.
1017
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
1018
- */
1019
- setObjectsMatrix(ids: string | string[], matrix: number[]): boolean;
1020
-
1021
- /**
1022
- * Gets the local modeling transform matrix of an object {@link Entity}.
1023
- *
1024
- * @param {String} id The {@link Entity.id}.
1025
- * @returns {Number[]|null} 16-element 4x4 column-major matrix, or ````null````.
1026
- */
1027
- getObjectMatrix(id: string): number[] | null;
1028
-
1029
- /**
1030
- * Batch-updates local modeling transform matrix on {@link Entity}s, with per-object values.
1031
- *
1032
- * @param matrixMap Map from {@link Entity.id} to 16-element 4x4 column-major matrix.
1033
- * @returns {Boolean} True if any {@link Entity}s were updated, else false.
1034
- */
1035
- setObjectsMatrixMap(matrixMap: { [id: string]: number[] }): boolean;
1036
-
1037
- /**
1038
- * Gets the World-space matrix of an object {@link Entity}.
1039
- *
1040
- * @param {String} id The {@link Entity.id}.
1041
- * @returns {Number[]|null} 16-element 4x4 column-major World matrix, or ````null````.
1042
- */
1043
- getObjectWorldMatrix(id: string): number[] | null;
1044
-
1045
- /**
1046
- * Gets the World-space axis-aligned bounding box of an object {@link Entity}.
1047
- *
1048
- * @param {String} id The {@link Entity.id}.
1049
- * @returns {Float64Array|number[]|null} Six-element AABB, or ````null````.
1050
- */
1051
- getObjectAABB(id: string): number[] | null;
1052
-
1053
- /**
1054
- * Iterates with a callback over {@link Entity}s that represent objects.
1055
- *
1056
- * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
1057
- *
1058
- * @param {String[]} ids Array of {@link Entity.id} values.
1059
- * @param {Function} callback Callback to execute on eacn {@link Entity}.
1060
- * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
1061
- */
1062
- withObjects(ids: string[], callback: Function): boolean;
1063
-
1064
- /**
1065
- * Destroys this Scene.
1066
- */
1067
- destroy(callback?: Function): void;
1068
- }
1
+ import { Component } from "../Component";
2
+ import { Camera } from "../camera/Camera";
3
+ import { PickResult } from "../webgl/PickResult";
4
+ import { SAO } from "../postfx/SAO";
5
+ import { Entity } from "../Entity";
6
+ import { ReadableGeometry } from "../geometry";
7
+ import { EdgeMaterial, EmphasisMaterial, PhongMaterial, PointsMaterial, LinesMaterial } from "../materials";
8
+ import { Viewport } from "../viewport/Viewport";
9
+ import { VBOSceneModel } from "../models/VBOSceneModel/VBOSceneModel";
10
+ import { Mesh } from "../mesh";
11
+ import { Node } from "../nodes";
12
+ import { Input } from "../input/input";
13
+ import { SceneModel } from "../models";
14
+
15
+ export declare type TickEvent = {
16
+ /** The ID of this Scene. */
17
+ sceneID: string;
18
+ /** The time in seconds since 1970 that this Scene was instantiated. */
19
+ startTime: Number;
20
+ /** The time in seconds since 1970 of this "tick" event. */
21
+ time: Number;
22
+ /** The time of the previous "tick" event from this Scene.. */
23
+ prevTime: Number;
24
+ /** The time in seconds since the previous "tick" event from this Scene. */
25
+ deltaTime: Number;
26
+ };
27
+
28
+ export declare class Scene extends Component {
29
+ /**
30
+ * Fires when a model is loaded
31
+ * @param event The loaded event
32
+ * @param callback Called fired on the event
33
+ * @param scope Scope for the callback
34
+ */
35
+ on(event: "modelLoaded", callback: (modelId: string) => void, scope?: any): string;
36
+
37
+ /**
38
+ * Fires when a model is unloaded
39
+ * @param event The loaded event
40
+ * @param callback Called fired on the event
41
+ * @param scope Scope for the callback
42
+ */
43
+ on(event: "modelUnloaded", callback: (modelId: string) => void, scope?: any): string;
44
+
45
+ /**
46
+ * Fired when about to render a frame for a Scene.
47
+ * @param event The rendering event
48
+ * @param callback Called fired on the event
49
+ * @param scope Scope for the callback
50
+ */
51
+ on(event: "rendering", callback: (renderEvent: { sceneId: number; pass: number }) => void, scope?: any): string;
52
+
53
+ /**
54
+ * Fired when we have just rendered a frame for a Scene.
55
+ * @param event The rendered event
56
+ * @param callback Called fired on the event
57
+ * @param scope Scope for the callback
58
+ */
59
+ on(event: "rendered", callback: (renderEvent: { sceneId: number; pass: number }) => void, scope?: any): string;
60
+
61
+ /**
62
+ * Fires when the entity visibility is updated.
63
+ * @param event The rendered event
64
+ * @param callback Called fired on the event
65
+ * @param scope Scope for the callback
66
+ */
67
+ on(
68
+ event: "objectVisibility" | "objectXRayed" | "objectHighlighted" | "objectSelected",
69
+ callback: (entity: VBOSceneModel | Mesh | Node) => void,
70
+ scope?: any
71
+ ): string;
72
+
73
+ /**
74
+ * Fired on each game loop iteration.
75
+ * @event event The tick event
76
+ * @param callback Called fired on the event
77
+ * @param scope Scope for the callback
78
+ */
79
+ on(event: "tick", callback: (tickEvent: TickEvent) => void, scope?: any): string;
80
+
81
+ /**
82
+ * fired when scene.aabb is update
83
+ * @param event
84
+ * @param callback
85
+ */
86
+ on(event: "aabb", callback: (aabb: Float32Array | Float64Array) => void): void;
87
+
88
+ /**
89
+ * return lights objects
90
+ */
91
+ get lightsObject(): any;
92
+
93
+ /**
94
+ * The epoch time (in milliseconds since 1970) when this Scene was instantiated.
95
+ */
96
+ get startTime(): Date;
97
+
98
+ /**
99
+ * canvas
100
+ */
101
+ get canvas(): any;
102
+
103
+ /**
104
+ * Sets whether data texture scene representation (DTX) is enabled for the {@link Scene}.
105
+ *
106
+ * Even when enabled, DTX will only work if supported.
107
+ *
108
+ * Default value is ````false````.
109
+ *
110
+ * @type {Boolean}
111
+ */
112
+ set dtxEnabled(value: boolean);
113
+
114
+ /**
115
+ * Gets whether data texture-based scene representation (DTX) is enabled for the {@link Scene}.
116
+ *
117
+ * Even when enabled, DTX will only apply if supported.
118
+ *
119
+ * Default value is ````false````.
120
+ *
121
+ * @type {Boolean}
122
+ */
123
+ get dtxEnabled(): boolean;
124
+
125
+ /**
126
+ * Sets whether physically-based rendering is enabled.
127
+ * Default is ````false````.
128
+ * @param {boolean} pbrEnabled
129
+ */
130
+ set pbrEnabled(pbrEnabled: boolean);
131
+
132
+ /**
133
+ * Gets whether physically-based rendering is enabled.
134
+ * Default is ````false````.
135
+ * @returns {Boolean} True if quality rendering is enabled.
136
+ */
137
+ get pbrEnabled(): boolean;
138
+
139
+ /**+
140
+ * Sets whether environment light rendering is enabled.
141
+ * Default is ````false````.
142
+ * @param {boolean} saoEnabled
143
+ */
144
+ set saoEnabled(saoEnabled: boolean);
145
+
146
+ /**
147
+ * Gets whether environment light rendering is enabled.
148
+ * Default is ````false````.
149
+ * @returns {boolean}
150
+ */
151
+ get saoEnabled(): boolean;
152
+
153
+ /**
154
+ * set showedges enable
155
+ * @param {boolean} edgesEnabled
156
+ */
157
+ set edgesEnabled(edgesEnabled: boolean);
158
+
159
+ /**
160
+ * @param {boolean} trans
161
+ */
162
+ get edgesEnabled(): boolean;
163
+
164
+ /**
165
+ * Sets whether basic color texture rendering is enabled.
166
+ *
167
+ * Default is ````true````.
168
+ *
169
+ * @param {Boolean} colorTextureEnabled
170
+ */
171
+ set colorTextureEnabled(colorTextureEnabled: boolean);
172
+
173
+ /**
174
+ * Gets whether basic color texture rendering is enabled.
175
+ *
176
+ * Default is ````true````.
177
+ *
178
+ * @returns {Boolean} True if basic color texture rendering is enabled.
179
+ */
180
+ get colorTextureEnabled(): boolean;
181
+
182
+ /**
183
+ * set whether transparent of canvas background
184
+ * @param {boolean} trans
185
+ */
186
+ set backgroundTransparent(trans: boolean);
187
+
188
+ /**
189
+ * @returns {boolean} backgroundTransparent
190
+ */
191
+ get backgroundTransparent(): boolean;
192
+
193
+ /**
194
+ * set background color
195
+ * @param {[]} color
196
+ */
197
+ set backgroundColor(color: []);
198
+
199
+ /**
200
+ * return backgroundColor
201
+ * @returns {boolean} backgroundColor
202
+ */
203
+ get backgroundColor(): [];
204
+
205
+ /**
206
+ * Map of {@link Entity}s that represent models.
207
+ *
208
+ * Each {@link Entity} is mapped here by {@link Entity.id} when {@link Entity.isModel} is ````true````.
209
+ * @type {{String:Entity}}
210
+ */
211
+ get models(): { [key: string]: SceneModel };
212
+
213
+ /**
214
+ * Map of {@link Entity}s that represents objects.
215
+ *
216
+ * Each {@link Entity} is mapped here by {@link Entity.id} when {@link Entity.isObject} is ````true````.
217
+ * @final
218
+ * @type {{String:Entity}}
219
+ */
220
+ get objects(): { [key: string]: Entity };
221
+
222
+ /**
223
+ * Map of currently visible {@link Entity}s that represent objects.
224
+ *
225
+ * An Entity represents an object if {@link Entity.isObject} is ````true````, and is visible when {@link Entity.visible} is true.
226
+ * @type {{String:Object}}
227
+ */
228
+ get visibleObjects(): { [key: string]: Entity };
229
+
230
+ /**
231
+ * Map of currently xrayed {@link Entity}s that represent objects.
232
+ *
233
+ * An Entity represents an object if {@link Entity.isObject} is ````true````, and is xrayed when {@link Entity.xrayed} is true.
234
+ *
235
+ * Each {@link Entity} is mapped here by {@link Entity.id}.
236
+ *
237
+ * @type {{String:Object}}
238
+ */
239
+ get xrayedObjects(): { [key: string]: Entity };
240
+
241
+ /**
242
+ * Map of currently highlighted {@link Entity}s that represent objects.
243
+ *
244
+ * An Entity represents an object if {@link Entity.isObject} is ````true```` is true, and is highlighted when {@link Entity.highlighted} is true.
245
+ *
246
+ * Each {@link Entity} is mapped here by {@link Entity.id}.
247
+ *
248
+ * @type {{String:Object}}
249
+ */
250
+ get highlightedObjects(): { [key: string]: Entity };
251
+
252
+ get edgesObjects(): { [key: string]: Entity };
253
+
254
+ /**
255
+ * Map of currently selected {@link Entity}s that represent objects.
256
+ *
257
+ * An Entity represents an object if {@link Entity.isObject} is true, and is selected while {@link Entity.selected} is true.
258
+ *
259
+ * Each {@link Entity} is mapped here by {@link Entity.id}.
260
+ *
261
+ * @type {{String:Object}}
262
+ */
263
+ get selectedObjects(): { [key: string]: Entity };
264
+
265
+ /**
266
+ * Map of currently colorized {@link Entity}s that represent objects.
267
+ *
268
+ * An Entity represents an object if {@link Entity.isObject} is ````true````.
269
+ *
270
+ * Each {@link Entity} is mapped here by {@link Entity.id}.
271
+ *
272
+ * @type {{String:Object}}
273
+ */
274
+ get colorizedObjects(): { [key: string]: Entity };
275
+
276
+ /**
277
+ * Map of {@link Entity}s that represent objects whose opacity was updated.
278
+ *
279
+ * An Entity represents an object if {@link Entity.isObject} is ````true````.
280
+ *
281
+ * Each {@link Entity} is mapped here by {@link Entity.id}.
282
+ *
283
+ * @type {{String:Object}}
284
+ */
285
+ get opacityObjects(): { [key: string]: Entity };
286
+
287
+ /**
288
+ * Map of {@link Entity}s that represent objects whose {@link Entity.offset}s were updated.
289
+ *
290
+ * An Entity represents an object if {@link Entity.isObject} is ````true````.
291
+ *
292
+ * Each {@link Entity} is mapped here by {@link Entity.id}.
293
+ *
294
+ * @property offsetObjects
295
+ * @final
296
+ * @type {{String:Object}}
297
+ */
298
+ get offsetObjects(): { [key: string]: Entity };
299
+
300
+ /**
301
+ * Whether {@link Entity.offset} is enabled.
302
+ *
303
+ * This is set via the {@link Viewer} constructor and is ````false```` by default.
304
+ *
305
+ * @returns {Boolean} True if {@link Entity.offset} is enabled.
306
+ */
307
+ get entityOffsetsEnabled(): boolean;
308
+
309
+ /**
310
+ * Whether precision surface picking is enabled.
311
+ *
312
+ * This is set via the {@link Viewer} constructor and is ````false```` by default.
313
+ *
314
+ * The ````pickSurfacePrecision```` option for ````Scene.pick```` only works if this is set ````true````.
315
+ *
316
+ * Note that when ````true````, this configuration will increase the amount of browser memory used by the Viewer.
317
+ *
318
+ * @returns {Boolean} True if precision picking is enabled.
319
+ */
320
+ get pickSurfacePrecisionEnabled(): boolean;
321
+
322
+ /**
323
+ * Whether logarithmic depth buffer is enabled.
324
+ *
325
+ * This is set via the {@link Viewer} constructor and is ````false```` by default.
326
+ *
327
+ * @returns {Boolean} True if logarithmic depth buffer is enabled.
328
+ */
329
+ get logarithmicDepthBufferEnabled(): boolean;
330
+
331
+ /**
332
+ * Gets the IDs of the {@link Entity}s in {@link Scene.models}.
333
+ *
334
+ * @type {String[]}
335
+ */
336
+ get modelIds(): string[];
337
+
338
+ /**
339
+ * Gets the number of {@link Entity}s in {@link Scene.objects}.
340
+ *
341
+ * @type {Number}
342
+ */
343
+ get numObjects(): number;
344
+
345
+ /**
346
+ * Gets the IDs of the {@link Entity}s in {@link Scene.objects}.
347
+ *
348
+ * @type {String[]}
349
+ */
350
+ get objectIds(): string[];
351
+
352
+ /**
353
+ * Gets the number of {@link Entity}s in {@link Scene.visibleObjects}.
354
+ *
355
+ * @type {Number}
356
+ */
357
+ get numVisibleObjects(): number;
358
+
359
+ /**
360
+ * Gets the IDs of the {@link Entity}s in {@link Scene.visibleObjects}.
361
+ *
362
+ * @type {String[]}
363
+ */
364
+ get visibleObjectIds(): string[];
365
+
366
+ /**
367
+ * Gets the number of {@link Entity}s in {@link Scene.xrayedObjects}.
368
+ *
369
+ * @type {Number}
370
+ */
371
+ get numXRayedObjects(): number;
372
+
373
+ /**
374
+ * Gets the IDs of the {@link Entity}s in {@link Scene.xrayedObjects}.
375
+ *
376
+ * @type {String[]}
377
+ */
378
+ get xrayedObjectIds(): string[];
379
+
380
+ /**
381
+ * Gets the number of {@link Entity}s in {@link Scene.highlightedObjects}.
382
+ *
383
+ * @type {Number}
384
+ */
385
+ get numHighlightedObjects(): number;
386
+
387
+ /**
388
+ * Gets the IDs of the {@link Entity}s in {@link Scene.highlightedObjects}.
389
+ *
390
+ * @type {String[]}
391
+ */
392
+ get highlightedObjectIds(): string[];
393
+
394
+ /**
395
+ * Gets the number of {@link Entity}s in {@link Scene.selectedObjects}.
396
+ *
397
+ * @type {Number}
398
+ */
399
+ get numSelectedObjects(): number;
400
+
401
+ /**
402
+ * Gets the IDs of the {@link Entity}s in {@link Scene.selectedObjects}.
403
+ *
404
+ * @type {String[]}
405
+ */
406
+ get selectedObjectIds(): string[];
407
+
408
+ get numEdgesObjects(): number;
409
+
410
+ get edgesObjectIds(): string[];
411
+
412
+ /**
413
+ * Gets the number of {@link Entity}s in {@link Scene.colorizedObjects}.
414
+ *
415
+ * @type {Number}
416
+ */
417
+ get numColorizedObjects(): number;
418
+
419
+ /**
420
+ * Gets the IDs of the {@link Entity}s in {@link Scene.colorizedObjects}.
421
+ *
422
+ * @type {String[]}
423
+ */
424
+ get colorizedObjectIds(): string[];
425
+
426
+ /**
427
+ * Gets the IDs of the {@link Entity}s in {@link Scene.opacityObjects}.
428
+ *
429
+ * @type {String[]}
430
+ */
431
+ get opacityObjectIds(): string[];
432
+
433
+ /**
434
+ * Gets the IDs of the {@link Entity}s in {@link Scene.offsetObjects}.
435
+ *
436
+ * @type {String[]}
437
+ */
438
+ get offsetObjectIds(): string[];
439
+
440
+ /**
441
+ * Sets the number of "ticks" that happen between each render or this Scene.
442
+ *
443
+ * Default value is ````1````.
444
+ *
445
+ * @type {Number}
446
+ */
447
+ set ticksPerRender(value: number);
448
+
449
+ /**
450
+ * Gets the number of "ticks" that happen between each render or this Scene.
451
+ *
452
+ * Default value is ````1````.
453
+ *
454
+ * @type {Number}
455
+ */
456
+ get ticksPerRender(): number;
457
+
458
+ /**
459
+ * Sets the number of "ticks" that happen between occlusion testing for {@link Marker}s.
460
+ *
461
+ * Default value is ````20````.
462
+ *
463
+ * @type {Number}
464
+ */
465
+ set ticksPerOcclusionTest(value: number);
466
+
467
+ /**
468
+ * Gets the number of "ticks" that happen between each render of this Scene.
469
+ *
470
+ * Default value is ````1````.
471
+ *
472
+ * @type {Number}
473
+ */
474
+ get ticksPerOcclusionTest(): number;
475
+
476
+ /**
477
+ * Sets the number of times this Scene renders per frame.
478
+ *
479
+ * Default value is ````1````.
480
+ *
481
+ * @type {Number}
482
+ */
483
+ set passes(value: number);
484
+
485
+ /**
486
+ * Gets the number of times this Scene renders per frame.
487
+ *
488
+ * Default value is ````1````.
489
+ *
490
+ * @type {Number}
491
+ */
492
+ get passes(): number;
493
+
494
+ /**
495
+ * When {@link Scene.passes} is greater than ````1````, indicates whether or not to clear the canvas before each pass (````true````) or just before the first pass (````false````).
496
+ *
497
+ * Default value is ````false````.
498
+ *
499
+ * @type {Boolean}
500
+ */
501
+ set clearEachPass(value: boolean);
502
+
503
+ /**
504
+ * When {@link Scene.passes} is greater than ````1````, indicates whether or not to clear the canvas before each pass (````true````) or just before the first pass (````false````).
505
+ *
506
+ * Default value is ````false````.
507
+ *
508
+ * @type {Boolean}
509
+ */
510
+ get clearEachPass(): boolean;
511
+
512
+ /**
513
+ * Sets whether or not {@link Scene} should expect all {@link Texture}s and colors to have pre-multiplied gamma.
514
+ *
515
+ * Default value is ````false````.
516
+ *
517
+ * @type {Boolean}
518
+ */
519
+ set gammaInput(value: boolean);
520
+
521
+ /**
522
+ * Gets whether or not {@link Scene} should expect all {@link Texture}s and colors to have pre-multiplied gamma.
523
+ *
524
+ * Default value is ````false````.
525
+ *
526
+ * @type {Boolean}
527
+ */
528
+ get gammaInput(): boolean;
529
+
530
+ /**
531
+ * Sets whether or not to render pixels with pre-multiplied gama.
532
+ *
533
+ * Default value is ````false````.
534
+ *
535
+ * @type {Boolean}
536
+ */
537
+ set gammaOutput(value: boolean);
538
+
539
+ /**
540
+ * Gets whether or not to render pixels with pre-multiplied gama.
541
+ *
542
+ * Default value is ````true````.
543
+ *
544
+ * @type {Boolean}
545
+ */
546
+ get gammaOutput(): boolean;
547
+
548
+ /**
549
+ * Sets the gamma factor to use when {@link Scene.gammaOutput} is set true.
550
+ *
551
+ * Default value is ````2.2````.
552
+ *
553
+ * @type {Number}
554
+ */
555
+ set gammaFactor(value: number);
556
+
557
+ /**
558
+ * Gets the gamma factor to use when {@link Scene.gammaOutput} is set true.
559
+ *
560
+ * Default value is ````2.2````.
561
+ *
562
+ * @type {Number}
563
+ */
564
+ get gammaFactor(): number;
565
+
566
+ /**
567
+ * Gets the default {@link Geometry} for this Scene, which is a {@link ReadableGeometry} with a unit-sized box shape.
568
+ *
569
+ * Has {@link ReadableGeometry.id} set to "default.geometry".
570
+ *
571
+ * {@link Mesh}s in this Scene have {@link Mesh.geometry} set to this {@link ReadableGeometry} by default.
572
+ *
573
+ * @type {ReadableGeometry}
574
+ */
575
+ get geometry(): ReadableGeometry;
576
+
577
+ /**
578
+ * Gets the default {@link Material} for this Scene, which is a {@link PhongMaterial}.
579
+ *
580
+ * Has {@link PhongMaterial.id} set to "default.material".
581
+ *
582
+ * {@link Mesh}s in this Scene have {@link Mesh.material} set to this {@link PhongMaterial} by default.
583
+ *
584
+ * @type {PhongMaterial}
585
+ */
586
+ get material(): PhongMaterial;
587
+
588
+ /**
589
+ * Gets the default xraying {@link EmphasisMaterial} for this Scene.
590
+ *
591
+ * Has {@link EmphasisMaterial.id} set to "default.xrayMaterial".
592
+ *
593
+ * {@link Mesh}s in this Scene have {@link Mesh.xrayMaterial} set to this {@link EmphasisMaterial} by default.
594
+ *
595
+ * {@link Mesh}s are xrayed while {@link Mesh.xrayed} is ````true````.
596
+ *
597
+ * @type {EmphasisMaterial}
598
+ */
599
+ get xrayMaterial(): EmphasisMaterial;
600
+
601
+ /**
602
+ * Gets the default highlight {@link EmphasisMaterial} for this Scene.
603
+ *
604
+ * Has {@link EmphasisMaterial.id} set to "default.highlightMaterial".
605
+ *
606
+ * {@link Mesh}s in this Scene have {@link Mesh.highlightMaterial} set to this {@link EmphasisMaterial} by default.
607
+ *
608
+ * {@link Mesh}s are highlighted while {@link Mesh.highlighted} is ````true````.
609
+ *
610
+ * @type {EmphasisMaterial}
611
+ */
612
+ get highlightMaterial(): EmphasisMaterial;
613
+
614
+ /**
615
+ * Gets the default selection {@link EmphasisMaterial} for this Scene.
616
+ *
617
+ * Has {@link EmphasisMaterial.id} set to "default.selectedMaterial".
618
+ *
619
+ * {@link Mesh}s in this Scene have {@link Mesh.highlightMaterial} set to this {@link EmphasisMaterial} by default.
620
+ *
621
+ * {@link Mesh}s are highlighted while {@link Mesh.highlighted} is ````true````.
622
+ *
623
+ * @type {EmphasisMaterial}
624
+ */
625
+ get selectedMaterial(): EmphasisMaterial;
626
+
627
+ /**
628
+ * Gets the default {@link EdgeMaterial} for this Scene.
629
+ *
630
+ * Has {@link EdgeMaterial.id} set to "default.edgeMaterial".
631
+ *
632
+ * {@link Mesh}s in this Scene have {@link Mesh.edgeMaterial} set to this {@link EdgeMaterial} by default.
633
+ *
634
+ * {@link Mesh}s have their edges emphasized while {@link Mesh.edges} is ````true````.
635
+ *
636
+ * @type {EdgeMaterial}
637
+ */
638
+ get edgeMaterial(): EdgeMaterial;
639
+
640
+ /**
641
+ * Gets the {@link PointsMaterial} for this Scene.
642
+ *
643
+ * @type {PointsMaterial}
644
+ */
645
+ get pointsMaterial(): PointsMaterial;
646
+
647
+ /**
648
+ * Gets the {@link LinesMaterial} for this Scene.
649
+ *
650
+ * @type {LinesMaterial}
651
+ */
652
+ get linesMaterial(): LinesMaterial;
653
+
654
+ /**
655
+ * Gets the {@link Viewport} for this Scene.
656
+ *
657
+ * @type Viewport
658
+ */
659
+ get viewport(): Viewport;
660
+
661
+ /**
662
+ * Gets the {@link Camera} for this Scene.
663
+ *
664
+ * @type {Camera}
665
+ */
666
+ get camera(): Camera;
667
+
668
+ /**
669
+ * Gets the World-space 3D center of this Scene.
670
+ *
671
+ *@type {Number[]}
672
+ */
673
+ get center(): number[];
674
+
675
+ /**
676
+ * Gets the World-space axis-aligned 3D boundary (AABB) of this Scene.
677
+ *
678
+ * The AABB is represented by a six-element Float64Array containing the min/max extents of the axis-aligned volume, ie. ````[xmin, ymin,zmin,xmax,ymax, zmax]````.
679
+ *
680
+ * When the Scene has no content, will be ````[-100,-100,-100,100,100,100]````.
681
+ *
682
+ * @type {Number[]}
683
+ */
684
+ get aabb(): number[];
685
+
686
+ get aabbs(): any;
687
+
688
+ get sao(): SAO;
689
+
690
+ get input(): Input;
691
+
692
+ /**
693
+ * Performs an occlusion test on all {@link Marker}s in this {@link Scene}.
694
+ *
695
+ * Sets each {@link Marker.visible} ````true```` if the Marker is currently not occluded by any opaque {@link Entity}s
696
+ * in the Scene, or ````false```` if an Entity is occluding it.
697
+ */
698
+ doOcclusionTest(): void;
699
+
700
+ /**
701
+ * Renders a single frame of this Scene.
702
+ *
703
+ * The Scene will periodically render itself after any updates, but you can call this method to force a render
704
+ * if required.
705
+ *
706
+ * @param {Boolean} [forceRender=false] Forces a render when true, otherwise only renders if something has changed in this Scene
707
+ * since the last render.
708
+ */
709
+ render(forceRender?: boolean): void;
710
+
711
+ /**
712
+ * Attempts to pick an {@link Entity} in this Scene.
713
+ * @param {*} params Picking parameters.
714
+ * @param {Boolean} [params.pickSurface=false] Whether to find the picked position on the surface of the Entity.
715
+ * @param {Boolean} [params.pickSurfacePrecision=false] When picking an Entity surface position, indicates whether or not we want full-precision {@link PickResult.worldPos}. Only works when {@link Scene.pickSurfacePrecisionEnabled} is ````true````. If pick succeeds, the returned {@link PickResult} will have {@link PickResult.precision} set ````true````, to indicate that it contains full-precision surface pick results.
716
+ * @param {Boolean} [params.pickSurfaceNormal=false] Whether to find the picked normal on the surface of the Entity. Only works if ````pickSurface```` is given.
717
+ * @param {Number[]} [params.canvasPos] Canvas-space coordinates. When ray-picking, this will override the **origin** and ** direction** parameters and will cause the ray to be fired through the canvas at this position, directly along the negative View-space Z-axis.
718
+ * @param {Number[]} [params.origin] World-space ray origin when ray-picking. Ignored when canvasPos given.
719
+ * @param {Number[]} [params.direction] World-space ray direction when ray-picking. Also indicates the length of the ray. Ignored when canvasPos given.
720
+ * @param {Number[]} [params.matrix] 4x4 transformation matrix to define the World-space ray origin and direction, as an alternative to ````origin```` and ````direction````.
721
+ * @param {String[]} [params.includeEntities] IDs of {@link Entity}s to restrict picking to. When given, ignores {@link Entity}s whose IDs are not in this list.
722
+ * @param {String[]} [params.excludeEntities] IDs of {@link Entity}s to ignore. When given, will pick *through* these {@link Entity}s, as if they were not there.
723
+ * @param {PickResult} [pickResult] Holds the results of the pick attempt. Will use the Scene's singleton PickResult if you don't supply your own.
724
+ * @returns {PickResult} Holds results of the pick attempt, returned when an {@link Entity} is picked, else null. See method comments for description.
725
+ */
726
+ pick(
727
+ params: {
728
+ pickSurface?: boolean;
729
+ pickSurfacePrecision?: boolean;
730
+ pickSurfaceNormal?: boolean;
731
+ canvasPos?: number[];
732
+ origin?: number[];
733
+ direction?: number[];
734
+ matrix?: number[];
735
+ includeEntities?: string[];
736
+ excludeEntities?: string[];
737
+ },
738
+ pickResult?: PickResult
739
+ ): PickResult | null;
740
+
741
+ /**
742
+ * Destroys all non-default {@link Component}s in this Scene.
743
+ */
744
+ clear(): void;
745
+
746
+ /**
747
+ * Destroys all {@link Light}s in this Scene..
748
+ */
749
+ clearLights(): void;
750
+
751
+ /**
752
+ * Destroys all {@link SectionPlane}s in this Scene.
753
+ */
754
+ clearSectionPlanes(): void;
755
+
756
+ /**
757
+ * Gets the collective axis-aligned boundary (AABB) of a batch of {@link Entity}s that represent objects.
758
+ *
759
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
760
+ *
761
+ * Each {@link Entity} on which {@link Entity.isObject} is registered by {@link Entity.id} in {@link Scene.visibleObjects}.
762
+ *
763
+ * Each {@link Entity} is only included in the AABB when {@link Entity.collidable} is ````true````.
764
+ *
765
+ * @param {String[]} ids Array of {@link Entity.id} values.
766
+ * @returns {[Number, Number, Number, Number, Number, Number]} An axis-aligned World-space bounding box, given as elements ````[xmin, ymin, zmin, xmax, ymax, zmax]````.
767
+ */
768
+ getAABB(ids?: string[] | null): number[];
769
+
770
+ /**
771
+ * Batch-updates {@link Entity.visible} on {@link Entity}s that represent objects.
772
+ *
773
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
774
+ *
775
+ * Each {@link Entity} on which both {@link Entity.isObject} and {@link Entity.visible} are ````true```` is
776
+ * registered by {@link Entity.id} in {@link Scene.visibleObjects}.
777
+ *
778
+ * @param {String[]} ids Array of {@link Entity.id} values.
779
+ * @param {Boolean} visible Whether or not to set visible.
780
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
781
+ */
782
+ setObjectsVisible(ids: string[], visible: boolean): boolean;
783
+
784
+ /**
785
+ * Batch-updates {@link Entity.collidable} on {@link Entity}s that represent objects.
786
+ *
787
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
788
+ *
789
+ * @param {String[]} ids Array of {@link Entity.id} values.
790
+ * @param {Boolean} collidable Whether or not to set collidable.
791
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
792
+ */
793
+ setObjectsCollidable(ids: string[], collidable: boolean): boolean;
794
+
795
+ /**
796
+ * Batch-updates {@link Entity.culled} on {@link Entity}s that represent objects.
797
+ *
798
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
799
+ *
800
+ * @param {String[]} ids Array of {@link Entity.id} values.
801
+ * @param {Boolean} culled Whether or not to cull.
802
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
803
+ */
804
+ setObjectsCulled(ids: string[], culled: boolean): boolean;
805
+
806
+ /**
807
+ * Batch-updates {@link Entity.selected} on {@link Entity}s that represent objects.
808
+ *
809
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
810
+ *
811
+ * Each {@link Entity} on which both {@link Entity.isObject} and {@link Entity.selected} are ````true```` is
812
+ * registered by {@link Entity.id} in {@link Scene.selectedObjects}.
813
+ *
814
+ * @param {String[]} ids Array of {@link Entity.id} values.
815
+ * @param {Boolean} selected Whether or not to select.
816
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
817
+ */
818
+ setObjectsSelected(ids: string[], selected: boolean): boolean;
819
+
820
+ /**
821
+ * Batch-updates {@link Entity.highlighted} on {@link Entity}s that represent objects.
822
+ *
823
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
824
+ *
825
+ * Each {@link Entity} on which both {@link Entity.isObject} and {@link Entity.highlighted} are ````true```` is
826
+ * registered by {@link Entity.id} in {@link Scene.highlightedObjects}.
827
+ *
828
+ * @param {String[]} ids Array of {@link Entity.id} values.
829
+ * @param {Boolean} highlighted Whether or not to highlight.
830
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
831
+ */
832
+ setObjectsHighlighted(ids: string[], highlighted: boolean): boolean;
833
+
834
+ /**
835
+ * Batch-updates {@link Entity.xrayed} on {@link Entity}s that represent objects.
836
+ *
837
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
838
+ *
839
+ * @param {String[]} ids Array of {@link Entity.id} values.
840
+ * @param {Boolean} xrayed Whether or not to xray.
841
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
842
+ */
843
+ setObjectsXRayed(ids: string[], xrayed: boolean): boolean;
844
+
845
+ /**
846
+ * Batch-updates {@link Entity.edges} on {@link Entity}s that represent objects.
847
+ *
848
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
849
+ *
850
+ * @param {String[]} ids Array of {@link Entity.id} values.
851
+ * @param {Boolean} edges Whether or not to show edges.
852
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
853
+ */
854
+ setObjectsEdges(ids: string[], edges: boolean): boolean;
855
+
856
+ /**
857
+ * Batch-updates {@link Entity.colorize} on {@link Entity}s that represent objects.
858
+ *
859
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
860
+ *
861
+ * @param {String[]} ids Array of {@link Entity.id} values.
862
+ * @param {Number[]} [colorize=(1,1,1)] RGB colorize factors, multiplied by the rendered pixel colors.
863
+ * @returns {Boolean} True if any {@link Entity}s changed opacity, else false if all updates were redundant and not applied.
864
+ */
865
+ setObjectsColorized(ids: string[], colorize: number[] | null): boolean;
866
+
867
+ /**
868
+ * Batch-updates {@link Entity.opacity} on {@link Entity}s that represent objects.
869
+ *
870
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
871
+ *
872
+ * @param {String[]} ids Array of {@link Entity.id} values.
873
+ * @param {Number} [opacity=1.0] Opacity factor, multiplied by the rendered pixel alphas.
874
+ * @returns {Boolean} True if any {@link Entity}s changed opacity, else false if all updates were redundant and not applied.
875
+ */
876
+ setObjectsOpacity(ids: string[], opacity: number): boolean;
877
+
878
+ /**
879
+ * Batch-updates {@link Entity.pickable} on {@link Entity}s that represent objects.
880
+ *
881
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
882
+ *
883
+ * @param {String[]} ids Array of {@link Entity.id} values.
884
+ * @param {Boolean} pickable Whether or not to set pickable.
885
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
886
+ */
887
+ setObjectsPickable(ids: string[], pickable: boolean): boolean;
888
+
889
+ /**
890
+ * Batch-updates {@link Entity.offset} on {@link Entity}s that represent objects.
891
+ *
892
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
893
+ *
894
+ * @param {String[]} ids Array of {@link Entity.id} values.
895
+ * @param {Number[]} [offset] 3D offset vector.
896
+ */
897
+ setObjectsOffset(ids: string[], offset: number[]): void;
898
+
899
+ /**
900
+ * Batch-updates local translation on {@link Entity}s that represent objects.
901
+ *
902
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
903
+ *
904
+ * Only works on Entity types that have a ````position```` property
905
+ * (e.g. {@link Mesh}, {@link SceneModelTransform}).
906
+ *
907
+ * @param {String[]} ids Array of {@link Entity.id} values.
908
+ * @param {Number[]} position 3D position vector ````[x, y, z]````.
909
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
910
+ */
911
+ setObjectsPosition(ids: string | string[], position: number[]): boolean;
912
+
913
+ /**
914
+ * Gets the local translation of an object {@link Entity}.
915
+ *
916
+ * @param {String} id The {@link Entity.id}.
917
+ * @returns {Number[]|null} 3D position vector ````[x, y, z]````, or ````null````.
918
+ */
919
+ getObjectPosition(id: string): number[] | null;
920
+
921
+ /**
922
+ * Batch-updates local translation on {@link Entity}s, with per-object values.
923
+ *
924
+ * @param positionMap Map from {@link Entity.id} to 3D position vector ````[x, y, z]````.
925
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
926
+ */
927
+ setObjectsPositionMap(positionMap: { [id: string]: number[] }): boolean;
928
+
929
+ /**
930
+ * Batch-updates local rotation on {@link Entity}s that represent objects.
931
+ *
932
+ * Only works on Entity types that have a ````rotation```` property.
933
+ *
934
+ * @param {String[]} ids Array of {@link Entity.id} values.
935
+ * @param {Number[]} rotation Euler angles in degrees ````[rx, ry, rz]````.
936
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
937
+ */
938
+ setObjectsRotation(ids: string | string[], rotation: number[]): boolean;
939
+
940
+ /**
941
+ * Gets the local rotation of an object {@link Entity}.
942
+ *
943
+ * @param {String} id The {@link Entity.id}.
944
+ * @returns {Number[]|null} Euler angles in degrees ````[rx, ry, rz]````, or ````null````.
945
+ */
946
+ getObjectRotation(id: string): number[] | null;
947
+
948
+ /**
949
+ * Batch-updates local rotation on {@link Entity}s, with per-object values.
950
+ *
951
+ * @param rotationMap Map from {@link Entity.id} to Euler angles in degrees ````[rx, ry, rz]````.
952
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
953
+ */
954
+ setObjectsRotationMap(rotationMap: { [id: string]: number[] }): boolean;
955
+
956
+ /**
957
+ * Batch-updates local scale on {@link Entity}s that represent objects.
958
+ *
959
+ * Only works on Entity types that have a ````scale```` property.
960
+ *
961
+ * @param {String[]} ids Array of {@link Entity.id} values.
962
+ * @param {Number[]} scale 3D scale vector ````[sx, sy, sz]````.
963
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
964
+ */
965
+ setObjectsScale(ids: string | string[], scale: number[]): boolean;
966
+
967
+ /**
968
+ * Gets the local scale of an object {@link Entity}.
969
+ *
970
+ * @param {String} id The {@link Entity.id}.
971
+ * @returns {Number[]|null} 3D scale vector ````[sx, sy, sz]````, or ````null````.
972
+ */
973
+ getObjectScale(id: string): number[] | null;
974
+
975
+ /**
976
+ * Batch-updates local scale on {@link Entity}s, with per-object values.
977
+ *
978
+ * @param scaleMap Map from {@link Entity.id} to 3D scale vector ````[sx, sy, sz]````.
979
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
980
+ */
981
+ setObjectsScaleMap(scaleMap: { [id: string]: number[] }): boolean;
982
+
983
+ /**
984
+ * Batch-updates local rotation quaternion on {@link Entity}s that represent objects.
985
+ *
986
+ * Only works on Entity types that have a ````quaternion```` property.
987
+ *
988
+ * @param {String[]} ids Array of {@link Entity.id} values.
989
+ * @param {Number[]} quaternion Quaternion ````[x, y, z, w]````.
990
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
991
+ */
992
+ setObjectsQuaternion(ids: string | string[], quaternion: number[]): boolean;
993
+
994
+ /**
995
+ * Gets the local rotation quaternion of an object {@link Entity}.
996
+ *
997
+ * @param {String} id The {@link Entity.id}.
998
+ * @returns {Number[]|null} Quaternion ````[x, y, z, w]````, or ````null````.
999
+ */
1000
+ getObjectQuaternion(id: string): number[] | null;
1001
+
1002
+ /**
1003
+ * Batch-updates local rotation quaternion on {@link Entity}s, with per-object values.
1004
+ *
1005
+ * @param quaternionMap Map from {@link Entity.id} to quaternion ````[x, y, z, w]````.
1006
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
1007
+ */
1008
+ setObjectsQuaternionMap(quaternionMap: { [id: string]: number[] }): boolean;
1009
+
1010
+ /**
1011
+ * Batch-updates local modeling transform matrix on {@link Entity}s that represent objects.
1012
+ *
1013
+ * Only works on Entity types that have a ````matrix```` property.
1014
+ *
1015
+ * @param {String[]} ids Array of {@link Entity.id} values.
1016
+ * @param {Number[]} matrix 16-element 4x4 column-major matrix.
1017
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
1018
+ */
1019
+ setObjectsMatrix(ids: string | string[], matrix: number[]): boolean;
1020
+
1021
+ /**
1022
+ * Gets the local modeling transform matrix of an object {@link Entity}.
1023
+ *
1024
+ * @param {String} id The {@link Entity.id}.
1025
+ * @returns {Number[]|null} 16-element 4x4 column-major matrix, or ````null````.
1026
+ */
1027
+ getObjectMatrix(id: string): number[] | null;
1028
+
1029
+ /**
1030
+ * Batch-updates local modeling transform matrix on {@link Entity}s, with per-object values.
1031
+ *
1032
+ * @param matrixMap Map from {@link Entity.id} to 16-element 4x4 column-major matrix.
1033
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false.
1034
+ */
1035
+ setObjectsMatrixMap(matrixMap: { [id: string]: number[] }): boolean;
1036
+
1037
+ /**
1038
+ * Gets the World-space matrix of an object {@link Entity}.
1039
+ *
1040
+ * @param {String} id The {@link Entity.id}.
1041
+ * @returns {Number[]|null} 16-element 4x4 column-major World matrix, or ````null````.
1042
+ */
1043
+ getObjectWorldMatrix(id: string): number[] | null;
1044
+
1045
+ /**
1046
+ * Gets the World-space axis-aligned bounding box of an object {@link Entity}.
1047
+ *
1048
+ * @param {String} id The {@link Entity.id}.
1049
+ * @returns {Float64Array|number[]|null} Six-element AABB, or ````null````.
1050
+ */
1051
+ getObjectAABB(id: string): number[] | null;
1052
+
1053
+ /**
1054
+ * Iterates with a callback over {@link Entity}s that represent objects.
1055
+ *
1056
+ * An {@link Entity} represents an object when {@link Entity.isObject} is ````true````.
1057
+ *
1058
+ * @param {String[]} ids Array of {@link Entity.id} values.
1059
+ * @param {Function} callback Callback to execute on eacn {@link Entity}.
1060
+ * @returns {Boolean} True if any {@link Entity}s were updated, else false if all updates were redundant and not applied.
1061
+ */
1062
+ withObjects(ids: string[], callback: Function): boolean;
1063
+
1064
+ /**
1065
+ * Destroys this Scene.
1066
+ */
1067
+ destroy(callback?: Function): void;
1068
+ }