@xeokit/xeokit-sdk 2.6.72 → 2.6.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xeokit-sdk.cjs.js +985 -400
- package/dist/xeokit-sdk.es.js +980 -401
- package/dist/xeokit-sdk.es5.js +734 -714
- package/dist/xeokit-sdk.min.cjs.js +8 -8
- package/dist/xeokit-sdk.min.es.js +8 -8
- package/dist/xeokit-sdk.min.es5.js +7 -7
- package/package.json +1 -1
- package/src/extras/ContextMenu/ContextMenu.js +25 -16
- package/src/plugins/FastNavPlugin/FastNavPlugin.js +10 -0
- package/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +24 -49
- package/src/plugins/TreeViewPlugin/RenderService.js +13 -4
- package/src/plugins/TreeViewPlugin/TreeViewPlugin.js +1 -1
- package/src/viewer/Viewer.js +0 -16
- package/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +29 -8
- package/src/viewer/scene/LineSet/LineSet.js +7 -2
- package/src/viewer/scene/skybox/Skybox.js +110 -9
- package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +18 -4
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +168 -0
- package/types/viewer/scene/LineSet/LineSet.d.ts +1 -1
- package/types/viewer/scene/camera/CameraPath.d.ts +86 -6
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +2 -0
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +14 -0
- package/types/viewer/scene/geometry/VBOGeometry.d.ts +2 -0
- package/types/viewer/scene/geometry/index.d.ts +2 -1
- package/types/viewer/scene/geometry/loaders/index.d.ts +2 -0
- package/types/viewer/scene/geometry/loaders/load3DSGeometry.d.ts +17 -0
- package/types/viewer/scene/geometry/loaders/loadOBJGeometry.d.ts +18 -0
- package/types/viewer/scene/index.d.ts +2 -0
- package/types/viewer/scene/input/input.d.ts +117 -0
- package/types/viewer/scene/lights/AmbientLight.d.ts +41 -0
- package/types/viewer/scene/lights/CubeTexture.d.ts +27 -0
- package/types/viewer/scene/lights/DirLight.d.ts +77 -0
- package/types/viewer/scene/lights/LightMap.d.ts +27 -0
- package/types/viewer/scene/lights/PointLight.d.ts +135 -0
- package/types/viewer/scene/lights/ReflectionMap.d.ts +26 -0
- package/types/viewer/scene/lights/index.d.ts +4 -1
- package/types/viewer/scene/marker/Marker.d.ts +5 -0
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +5 -0
- package/types/viewer/scene/materials/Fresnel.d.ts +25 -62
- package/types/viewer/scene/materials/LambertMaterial.d.ts +192 -0
- package/types/viewer/scene/materials/MetallicMaterial.d.ts +359 -0
- package/types/viewer/scene/materials/PhongMaterial.d.ts +5 -0
- package/types/viewer/scene/materials/PointsMaterial.d.ts +5 -0
- package/types/viewer/scene/materials/SpecularMaterial.d.ts +342 -0
- package/types/viewer/scene/materials/Texture.d.ts +36 -78
- package/types/viewer/scene/materials/index.d.ts +2 -0
- package/types/viewer/scene/models/SceneModel.d.ts +134 -7
- package/types/viewer/scene/models/SceneModelEntity.d.ts +65 -0
- package/types/viewer/scene/models/SceneModelMesh.d.ts +12 -0
- package/types/viewer/scene/paths/CubicBezierCurve.d.ts +146 -0
- package/types/viewer/scene/paths/Curve.d.ts +75 -0
- package/types/viewer/scene/paths/Path.d.ts +119 -0
- package/types/viewer/scene/paths/QuadraticBezierCurve.d.ts +124 -0
- package/types/viewer/scene/paths/SplineCurve.d.ts +84 -0
- package/types/viewer/scene/paths/index.d.ts +5 -0
- package/types/viewer/scene/scene/Scene.d.ts +102 -0
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +41 -0
- package/types/viewer/scene/skybox/Skybox.d.ts +59 -0
- package/types/viewer/scene/skybox/index.d.ts +1 -0
- package/types/viewer/scene/webgl/PickResult.d.ts +19 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { Curve } from "./Curve";
|
|
3
|
+
|
|
4
|
+
export declare type QuadraticBezierCurveConfiguration = {
|
|
5
|
+
/** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** The starting point. */
|
|
8
|
+
v0: number[];
|
|
9
|
+
/** The middle control point. */
|
|
10
|
+
v1: number[];
|
|
11
|
+
/** The end point. */
|
|
12
|
+
v2: number[];
|
|
13
|
+
/** Current position on this QuadraticBezierCurve, in range between ````0..1````. */
|
|
14
|
+
t: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare type QuadraticBezierCurveJson = {
|
|
18
|
+
v0: number[];
|
|
19
|
+
v1: number[];
|
|
20
|
+
v2: number[];
|
|
21
|
+
t: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare class QuadraticBezierCurve extends Curve {
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @constructor
|
|
28
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this MetallicMaterial as well.
|
|
29
|
+
* @param {QuadraticBezierCurveConfiguration} [cfg] Configuration
|
|
30
|
+
*/
|
|
31
|
+
constructor(owner: Component, cfg?: QuadraticBezierCurveConfiguration);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Sets the starting point on this QuadraticBezierCurve.
|
|
35
|
+
*
|
|
36
|
+
* Default value is ````[0.0, 0.0, 0.0]````.
|
|
37
|
+
*
|
|
38
|
+
* @param {Number[]} value New starting point.
|
|
39
|
+
*/
|
|
40
|
+
set v0(value: number[]);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Gets the starting point on this QuadraticBezierCurve.
|
|
44
|
+
*
|
|
45
|
+
* Default value is ````[0.0, 0.0, 0.0]````.
|
|
46
|
+
*
|
|
47
|
+
* @returns {Number[]} The starting point.
|
|
48
|
+
*/
|
|
49
|
+
get v0(): number[];
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Sets the middle control point on this QuadraticBezierCurve.
|
|
53
|
+
*
|
|
54
|
+
* Default value is ````[0.0, 0.0, 0.0]````.
|
|
55
|
+
*
|
|
56
|
+
* @param {Number[]} value New middle control point.
|
|
57
|
+
*/
|
|
58
|
+
set v1(value: number[]);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Gets the middle control point on this QuadraticBezierCurve.
|
|
62
|
+
*
|
|
63
|
+
* Default value is ````[0.0, 0.0, 0.0]````.
|
|
64
|
+
*
|
|
65
|
+
* @returns {Number[]} The middle control point.
|
|
66
|
+
*/
|
|
67
|
+
get v1(): number[];
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Sets the end point on this QuadraticBezierCurve.
|
|
71
|
+
*
|
|
72
|
+
* Default value is ````[0.0, 0.0, 0.0]````.
|
|
73
|
+
*
|
|
74
|
+
* @param {Number[]} value The new end point.
|
|
75
|
+
*/
|
|
76
|
+
set v2(value: number[]);
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Gets the end point on this QuadraticBezierCurve.
|
|
80
|
+
*
|
|
81
|
+
* Default value is ````[0.0, 0.0, 0.0]````.
|
|
82
|
+
*
|
|
83
|
+
* @returns {Number[]} The end point.
|
|
84
|
+
*/
|
|
85
|
+
get v2(): number[];
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Sets the progress along this QuadraticBezierCurve.
|
|
89
|
+
*
|
|
90
|
+
* Automatically clamps to range [0..1].
|
|
91
|
+
*
|
|
92
|
+
* Default value is ````0````.
|
|
93
|
+
*
|
|
94
|
+
* @param {Number} value The new progress location.
|
|
95
|
+
*/
|
|
96
|
+
set t(value: number);
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Gets the progress along this QuadraticBezierCurve.
|
|
100
|
+
*
|
|
101
|
+
* Default value is ````0````.
|
|
102
|
+
*
|
|
103
|
+
* @returns {Number} The current progress location.
|
|
104
|
+
*/
|
|
105
|
+
get t(): number;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
Point on this QuadraticBezierCurve at position {@link QuadraticBezierCurve/t}.
|
|
109
|
+
|
|
110
|
+
@property point
|
|
111
|
+
@type {Number[]}
|
|
112
|
+
*/
|
|
113
|
+
get point(): number[];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Returns the point on this QuadraticBezierCurve at the given position.
|
|
117
|
+
*
|
|
118
|
+
* @param {Number} t Position to get point at.
|
|
119
|
+
* @returns {Number[]} The point.
|
|
120
|
+
*/
|
|
121
|
+
getPoint(t: number): number[];
|
|
122
|
+
|
|
123
|
+
getJSON(): QuadraticBezierCurveJson;
|
|
124
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Component } from '../Component';
|
|
2
|
+
import { Curve } from './Curve';
|
|
3
|
+
|
|
4
|
+
export declare type SplineCurveConfiguration = {
|
|
5
|
+
/**Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/**Control points on this SplineCurve. */
|
|
8
|
+
points?: number[];
|
|
9
|
+
/**Current position on this SplineCurve, in range between 0..1. */
|
|
10
|
+
t?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare type SpliceCurveJSON = {
|
|
14
|
+
points: number[];
|
|
15
|
+
t: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare class SplineCurve extends Curve {
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @constructor
|
|
22
|
+
* @param {Component} [owner] Owner component. When destroyed, the owner will destroy this SplineCurve as well.
|
|
23
|
+
* @param {SplineCurveConfiguration} [cfg] Configs
|
|
24
|
+
*/
|
|
25
|
+
constructor(owner?: Component, cfg?: SplineCurveConfiguration);
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Sets the control points on this SplineCurve.
|
|
29
|
+
*
|
|
30
|
+
* Default value is ````[]````.
|
|
31
|
+
*
|
|
32
|
+
* @param {Number[]} value New control points.
|
|
33
|
+
*/
|
|
34
|
+
set points(value: number);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Gets the control points on this SplineCurve.
|
|
38
|
+
*
|
|
39
|
+
* Default value is ````[]````.
|
|
40
|
+
*
|
|
41
|
+
* @returns {Number[]} The control points.
|
|
42
|
+
*/
|
|
43
|
+
get points(): number[];
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Sets the progress along this SplineCurve.
|
|
47
|
+
*
|
|
48
|
+
* Automatically clamps to range ````[0..1]````.
|
|
49
|
+
*
|
|
50
|
+
* Default value is ````0````.
|
|
51
|
+
*
|
|
52
|
+
* @param {Number} value The new progress.
|
|
53
|
+
*/
|
|
54
|
+
set t(value: number);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Gets the progress along this SplineCurve.
|
|
58
|
+
*
|
|
59
|
+
* Automatically clamps to range ````[0..1]````.
|
|
60
|
+
*
|
|
61
|
+
* Default value is ````0````.
|
|
62
|
+
*
|
|
63
|
+
* @returns {Number} The new progress.
|
|
64
|
+
*/
|
|
65
|
+
get t(): number;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Gets the point on this SplineCurve at position {@link SplineCurve#t}.
|
|
69
|
+
*
|
|
70
|
+
* @returns {Number[]} The point at {@link SplineCurve#t}.
|
|
71
|
+
*/
|
|
72
|
+
get point(): number;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Returns point on this SplineCurve at the given position.
|
|
76
|
+
*
|
|
77
|
+
* @param {Number} t Position to get point at.
|
|
78
|
+
* @returns {Number[]} Point at the given position.
|
|
79
|
+
*/
|
|
80
|
+
getPoint(t: number): number[];
|
|
81
|
+
|
|
82
|
+
getJSON(): SpliceCurveJSON;
|
|
83
|
+
|
|
84
|
+
}
|
|
@@ -204,6 +204,19 @@ export declare class Scene extends Component {
|
|
|
204
204
|
*/
|
|
205
205
|
get entityOffsetsEnabled(): boolean;
|
|
206
206
|
|
|
207
|
+
/**
|
|
208
|
+
* Whether geometry is readable.
|
|
209
|
+
*
|
|
210
|
+
* This is set via the {@link Viewer} constructor and is ````false```` by default.
|
|
211
|
+
*
|
|
212
|
+
* The ````readableGeometryEnabled```` option for ````Scene#pick```` only works if this is set ````true````.
|
|
213
|
+
*
|
|
214
|
+
* Note that when ````true````, this configuration will increase the amount of browser memory used by the Viewer.
|
|
215
|
+
*
|
|
216
|
+
* @returns {Boolean} True if geometry is readable.
|
|
217
|
+
*/
|
|
218
|
+
get readableGeometryEnabled(): boolean;
|
|
219
|
+
|
|
207
220
|
/**
|
|
208
221
|
* Whether precision surface picking is enabled.
|
|
209
222
|
*
|
|
@@ -226,6 +239,34 @@ export declare class Scene extends Component {
|
|
|
226
239
|
*/
|
|
227
240
|
get logarithmicDepthBufferEnabled(): boolean;
|
|
228
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Sets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
244
|
+
*
|
|
245
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
246
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
247
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
248
|
+
* responsiveness. It is important to consider that each SectionPlane impacts rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
249
|
+
* your expected usage.
|
|
250
|
+
*
|
|
251
|
+
* Default is ````0````.
|
|
252
|
+
*/
|
|
253
|
+
set numCachedSectionPlanes(numCachedSectionPlanes: number);
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Gets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
257
|
+
*
|
|
258
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
259
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
260
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
261
|
+
* responsiveness. It is important to consider that each SectionPlane impacts rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
262
|
+
* your expected usage.
|
|
263
|
+
*
|
|
264
|
+
* Default is ````0````.
|
|
265
|
+
*
|
|
266
|
+
* @returns {number} The number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
267
|
+
*/
|
|
268
|
+
get numCachedSectionPlanes(): number;
|
|
269
|
+
|
|
229
270
|
/**
|
|
230
271
|
* Sets whether physically-based rendering is enabled.
|
|
231
272
|
*
|
|
@@ -241,6 +282,44 @@ export declare class Scene extends Component {
|
|
|
241
282
|
*/
|
|
242
283
|
get pbrEnabled(): boolean
|
|
243
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Sets whether data texture scene representation (DTX) is enabled for the {@link Scene}.
|
|
287
|
+
*
|
|
288
|
+
* Even when enabled, DTX will only work if supported.
|
|
289
|
+
*
|
|
290
|
+
* Default value is ````false````.
|
|
291
|
+
*
|
|
292
|
+
* @type {Boolean}
|
|
293
|
+
*/
|
|
294
|
+
set dtxEnabled(value: boolean);
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Gets whether data texture-based scene representation (DTX) is enabled for the {@link Scene}.
|
|
298
|
+
*
|
|
299
|
+
* Even when enabled, DTX will only apply if supported.
|
|
300
|
+
*
|
|
301
|
+
* Default value is ````false````.
|
|
302
|
+
*
|
|
303
|
+
* @type {Boolean}
|
|
304
|
+
*/
|
|
305
|
+
get dtxEnabled(): boolean;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Sets whether basic color texture rendering is enabled.
|
|
309
|
+
*
|
|
310
|
+
* Default is ````true````.
|
|
311
|
+
*/
|
|
312
|
+
set colorTextureEnabled(colorTextureEnabled: boolean);
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Gets whether basic color texture rendering is enabled.
|
|
316
|
+
*
|
|
317
|
+
* Default is ````true````.
|
|
318
|
+
*
|
|
319
|
+
* @returns {Boolean} True if basic color texture rendering is enabled.
|
|
320
|
+
*/
|
|
321
|
+
get colorTextureEnabled(): boolean;
|
|
322
|
+
|
|
244
323
|
/**
|
|
245
324
|
* Gets the Z value of offset for Marker's OcclusionTester.
|
|
246
325
|
* The closest the value is to 0.000 the more precise OcclusionTester will be, but at the same time the less
|
|
@@ -668,6 +747,16 @@ export declare class Scene extends Component {
|
|
|
668
747
|
*/
|
|
669
748
|
clearSectionPlanes(): void;
|
|
670
749
|
|
|
750
|
+
/**
|
|
751
|
+
* Destroys all {@link Bitmaps}s in this Scene.
|
|
752
|
+
*/
|
|
753
|
+
clearBitmaps(): void;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Destroys all {@link Line}s in this Scene.
|
|
757
|
+
*/
|
|
758
|
+
clearLines(): void;
|
|
759
|
+
|
|
671
760
|
/**
|
|
672
761
|
* Gets the collective axis-aligned boundary (AABB) of a batch of {@link Entity}s that represent objects.
|
|
673
762
|
*
|
|
@@ -822,6 +911,19 @@ export declare class Scene extends Component {
|
|
|
822
911
|
*/
|
|
823
912
|
withObjects(ids: string[], callback: Function): boolean;
|
|
824
913
|
|
|
914
|
+
/**
|
|
915
|
+
* This method will "tickify" the provided `cb` function.
|
|
916
|
+
*
|
|
917
|
+
* This means, the function will be wrapped so:
|
|
918
|
+
*
|
|
919
|
+
* - it runs time-aligned to scene ticks
|
|
920
|
+
* - it runs maximum once per scene-tick
|
|
921
|
+
*
|
|
922
|
+
* @param {Function} cb The function to tickify
|
|
923
|
+
* @returns {Function}
|
|
924
|
+
*/
|
|
925
|
+
tickify<T extends (...args: any[]) => any>(cb: T): (...args: Parameters<T>) => void;
|
|
926
|
+
|
|
825
927
|
/**
|
|
826
928
|
* Destroys this Scene.
|
|
827
929
|
*/
|
|
@@ -58,6 +58,42 @@ export declare class SectionPlane extends Component {
|
|
|
58
58
|
*/
|
|
59
59
|
get pos(): number[];
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Sets the quaternion of this SectionPlane's plane.
|
|
63
|
+
*
|
|
64
|
+
* Default value is ````[0, -1, 0, 0]````.
|
|
65
|
+
*
|
|
66
|
+
* @param {Number[]} value New quaternion.
|
|
67
|
+
*/
|
|
68
|
+
set quaternion(value: number[]);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Gets the quaternion of this SectionPlane's plane.
|
|
72
|
+
*
|
|
73
|
+
* Default value is ````[0, -1, 0, 0]````.
|
|
74
|
+
*
|
|
75
|
+
* @returns {Number[]} value Current quaternion.
|
|
76
|
+
*/
|
|
77
|
+
get quaternion(): number[];
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Sets the roll of this SectionPlane's plane.
|
|
81
|
+
*
|
|
82
|
+
* Default value is ````0````.
|
|
83
|
+
*
|
|
84
|
+
* @param {Number[]} value New roll.
|
|
85
|
+
*/
|
|
86
|
+
set roll(value: number[]);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Gets the roll of this SectionPlane's plane.
|
|
90
|
+
*
|
|
91
|
+
* Default value is ````0````.
|
|
92
|
+
*
|
|
93
|
+
* @returns {Number[]} value Current roll.
|
|
94
|
+
*/
|
|
95
|
+
get roll(): number[];
|
|
96
|
+
|
|
61
97
|
/**
|
|
62
98
|
* Sets the direction of this SectionPlane's plane.
|
|
63
99
|
*
|
|
@@ -90,4 +126,9 @@ export declare class SectionPlane extends Component {
|
|
|
90
126
|
* Inverts the direction of {@link SectionPlane.dir}.
|
|
91
127
|
*/
|
|
92
128
|
flipDir(): void;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @destroy
|
|
132
|
+
*/
|
|
133
|
+
destroy(): void;
|
|
93
134
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Component } from '../Component';
|
|
2
|
+
|
|
3
|
+
export declare type SkyboxConfiguration = {
|
|
4
|
+
/** Optional ID, unique among all components in the parent {Scene}, generated automatically when omitted. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Path to skybox texture */
|
|
7
|
+
src: string | string[];
|
|
8
|
+
/** Texture encoding format. See the {@link Texture#encoding} property for more info. */
|
|
9
|
+
encoding?: number;
|
|
10
|
+
/** Size of this Skybox, given as the distance from the center at ````[0,0,0]```` to each face. */
|
|
11
|
+
size?: number;
|
|
12
|
+
/** True when this Skybox is visible. */
|
|
13
|
+
active?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare class Skybox extends Component {
|
|
17
|
+
/**
|
|
18
|
+
* @constructor
|
|
19
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this PointLight as well.
|
|
20
|
+
* @param {SkyboxConfiguration} [cfg] Skybox configuration
|
|
21
|
+
*/
|
|
22
|
+
constructor(owner: Component, cfg?: SkyboxConfiguration);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Sets the size of this Skybox, given as the distance from the center at [0,0,0] to each face.
|
|
26
|
+
*
|
|
27
|
+
* Default value is ````1000````.
|
|
28
|
+
*
|
|
29
|
+
* @param {Number} value The size.
|
|
30
|
+
*/
|
|
31
|
+
set size(value: number);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Gets the size of this Skybox, given as the distance from the center at [0,0,0] to each face.
|
|
35
|
+
*
|
|
36
|
+
* Default value is ````1000````.
|
|
37
|
+
*
|
|
38
|
+
* @returns {Number} The size.
|
|
39
|
+
*/
|
|
40
|
+
get size(): number;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Sets whether this Skybox is visible or not.
|
|
44
|
+
*
|
|
45
|
+
* Default value is ````true````.
|
|
46
|
+
*
|
|
47
|
+
* @param {Boolean} active Whether to make active or not.
|
|
48
|
+
*/
|
|
49
|
+
set active(active: boolean);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Gets if this Skybox is visible or not.
|
|
53
|
+
*
|
|
54
|
+
* Default active is ````true````.
|
|
55
|
+
*
|
|
56
|
+
* @returns {Boolean} ````true```` if the Skybox is active.
|
|
57
|
+
*/
|
|
58
|
+
get active(): boolean;
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Skybox';
|
|
@@ -33,6 +33,12 @@ export declare class PickResult {
|
|
|
33
33
|
*/
|
|
34
34
|
pickSurfacePrecision: boolean;
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* True when picked from touch input, else false when from mouse input.
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
touchInput: boolean;
|
|
41
|
+
|
|
36
42
|
/**
|
|
37
43
|
* Canvas coordinates when picking with a 2D pointer.
|
|
38
44
|
* @property canvasPos
|
|
@@ -66,6 +72,13 @@ export declare class PickResult {
|
|
|
66
72
|
*/
|
|
67
73
|
get localPos(): number[];
|
|
68
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Canvas cursor coordinates, snapped when snap picking, otherwise same as {@link PickResult#pointerPos}.
|
|
77
|
+
* @property snappedCanvasPos
|
|
78
|
+
* @type {Number[]}
|
|
79
|
+
*/
|
|
80
|
+
get snappedCanvasPos(): number[];
|
|
81
|
+
|
|
69
82
|
/**
|
|
70
83
|
* Picked World-space point on surface.
|
|
71
84
|
* Only defined when an entity and a point on its surface was picked.
|
|
@@ -101,6 +114,12 @@ export declare class PickResult {
|
|
|
101
114
|
*/
|
|
102
115
|
get uv(): number[];
|
|
103
116
|
|
|
117
|
+
/**
|
|
118
|
+
* True if snapped to edge or vertex.
|
|
119
|
+
* @returns {boolean}
|
|
120
|
+
*/
|
|
121
|
+
get snapped(): boolean;
|
|
122
|
+
|
|
104
123
|
/**
|
|
105
124
|
* True when snapped to the nearest vertex position.
|
|
106
125
|
* @type {boolean}
|