@xeokit/xeokit-sdk 2.6.73 → 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.
Files changed (60) hide show
  1. package/dist/xeokit-sdk.cjs.js +221 -108
  2. package/dist/xeokit-sdk.es.js +221 -108
  3. package/dist/xeokit-sdk.es5.js +311 -301
  4. package/dist/xeokit-sdk.min.cjs.js +6 -6
  5. package/dist/xeokit-sdk.min.es.js +7 -7
  6. package/dist/xeokit-sdk.min.es5.js +6 -6
  7. package/package.json +1 -1
  8. package/src/extras/ContextMenu/ContextMenu.js +25 -16
  9. package/src/plugins/FastNavPlugin/FastNavPlugin.js +10 -0
  10. package/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +24 -49
  11. package/src/plugins/TreeViewPlugin/RenderService.js +13 -4
  12. package/src/plugins/TreeViewPlugin/TreeViewPlugin.js +1 -1
  13. package/src/viewer/Viewer.js +0 -16
  14. package/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +29 -8
  15. package/src/viewer/scene/LineSet/LineSet.js +7 -2
  16. package/src/viewer/scene/skybox/Skybox.js +110 -9
  17. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +18 -4
  18. package/types/viewer/scene/CameraControl/CameraControl.d.ts +168 -0
  19. package/types/viewer/scene/LineSet/LineSet.d.ts +1 -1
  20. package/types/viewer/scene/camera/CameraPath.d.ts +86 -6
  21. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +2 -0
  22. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +14 -0
  23. package/types/viewer/scene/geometry/VBOGeometry.d.ts +2 -0
  24. package/types/viewer/scene/geometry/index.d.ts +2 -1
  25. package/types/viewer/scene/geometry/loaders/index.d.ts +2 -0
  26. package/types/viewer/scene/geometry/loaders/load3DSGeometry.d.ts +17 -0
  27. package/types/viewer/scene/geometry/loaders/loadOBJGeometry.d.ts +18 -0
  28. package/types/viewer/scene/index.d.ts +2 -0
  29. package/types/viewer/scene/input/input.d.ts +117 -0
  30. package/types/viewer/scene/lights/AmbientLight.d.ts +41 -0
  31. package/types/viewer/scene/lights/CubeTexture.d.ts +27 -0
  32. package/types/viewer/scene/lights/DirLight.d.ts +77 -0
  33. package/types/viewer/scene/lights/LightMap.d.ts +27 -0
  34. package/types/viewer/scene/lights/PointLight.d.ts +135 -0
  35. package/types/viewer/scene/lights/ReflectionMap.d.ts +26 -0
  36. package/types/viewer/scene/lights/index.d.ts +4 -1
  37. package/types/viewer/scene/marker/Marker.d.ts +5 -0
  38. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +5 -0
  39. package/types/viewer/scene/materials/Fresnel.d.ts +25 -62
  40. package/types/viewer/scene/materials/LambertMaterial.d.ts +192 -0
  41. package/types/viewer/scene/materials/MetallicMaterial.d.ts +359 -0
  42. package/types/viewer/scene/materials/PhongMaterial.d.ts +5 -0
  43. package/types/viewer/scene/materials/PointsMaterial.d.ts +5 -0
  44. package/types/viewer/scene/materials/SpecularMaterial.d.ts +342 -0
  45. package/types/viewer/scene/materials/Texture.d.ts +36 -78
  46. package/types/viewer/scene/materials/index.d.ts +2 -0
  47. package/types/viewer/scene/models/SceneModel.d.ts +134 -7
  48. package/types/viewer/scene/models/SceneModelEntity.d.ts +65 -0
  49. package/types/viewer/scene/models/SceneModelMesh.d.ts +12 -0
  50. package/types/viewer/scene/paths/CubicBezierCurve.d.ts +146 -0
  51. package/types/viewer/scene/paths/Curve.d.ts +75 -0
  52. package/types/viewer/scene/paths/Path.d.ts +119 -0
  53. package/types/viewer/scene/paths/QuadraticBezierCurve.d.ts +124 -0
  54. package/types/viewer/scene/paths/SplineCurve.d.ts +84 -0
  55. package/types/viewer/scene/paths/index.d.ts +5 -0
  56. package/types/viewer/scene/scene/Scene.d.ts +102 -0
  57. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +41 -0
  58. package/types/viewer/scene/skybox/Skybox.d.ts +59 -0
  59. package/types/viewer/scene/skybox/index.d.ts +1 -0
  60. package/types/viewer/scene/webgl/PickResult.d.ts +19 -0
@@ -3,6 +3,8 @@ import { SceneModelEntity } from "./SceneModelEntity";
3
3
  import { EdgeMaterial, EmphasisMaterial } from "../materials";
4
4
  import { SceneModelMesh } from "./SceneModelMesh";
5
5
  import { SceneModelTextureSet } from "./SceneModelTextureSet";
6
+ import { SceneModelTransform } from "./SceneModelTransform";
7
+ import { SceneModelTexture } from "./SceneModelTexture";
6
8
 
7
9
  /**
8
10
  * A high-performance model representation for efficient rendering and low memory usage.
@@ -25,6 +27,49 @@ export declare class SceneModel extends Component {
25
27
  */
26
28
  on(event: "error", callback: (msg: string) => void, scope?: any): string;
27
29
 
30
+ /**
31
+ * Returns true to indicate that this Component is a SceneModel.
32
+ * @type {Boolean}
33
+ */
34
+ get isPerformanceModel(): boolean;
35
+
36
+ /**
37
+ * The {@link SceneModelTransform}s in this SceneModel.
38
+ *
39
+ * Each {@link SceneModelTransform} is stored here against its {@link SceneModelTransform.id}.
40
+ *
41
+ * @returns {*|{}}
42
+ */
43
+ get transforms(): { [key: string]: SceneModelTransform }
44
+
45
+ /**
46
+ * The {@link SceneModelTexture}s in this SceneModel.
47
+ *
48
+ * * Each {@link SceneModelTexture} is created with {@link SceneModel.createTexture}.
49
+ * * Each {@link SceneModelTexture} is stored here against its {@link SceneModelTexture.id}.
50
+ *
51
+ * @returns {*|{}}
52
+ */
53
+ get textures(): { [key: string]: SceneModelTexture }
54
+
55
+ /**
56
+ * The {@link SceneModelTextureSet}s in this SceneModel.
57
+ *
58
+ * Each {@link SceneModelTextureSet} is stored here against its {@link SceneModelTextureSet.id}.
59
+ *
60
+ * @returns {*|{}}
61
+ */
62
+ get textureSets(): { [key: string]: SceneModelTextureSet }
63
+
64
+ /**
65
+ * The {@link SceneModelMesh}es in this SceneModel.
66
+ *
67
+ * Each {@link SceneModelMesh} is stored here against its {@link SceneModelMesh.id}.
68
+ *
69
+ * @returns {*|{}}
70
+ */
71
+ get meshes(): { [key: string]: SceneModelMesh }
72
+
28
73
  /**
29
74
  * Returns the {@link SceneModelEntity}s in this SceneModel.
30
75
  * @returns {*|{}}
@@ -42,6 +87,15 @@ export declare class SceneModel extends Component {
42
87
  */
43
88
  get origin(): number[];
44
89
 
90
+ /**
91
+ * Sets the SceneModel's local translation.
92
+ *
93
+ * Default value is ````[0,0,0]````.
94
+ *
95
+ * @type {number[]}
96
+ */
97
+ set position(value: number[]);
98
+
45
99
  /**
46
100
  * Gets the SceneModel's local translation.
47
101
  *
@@ -51,6 +105,15 @@ export declare class SceneModel extends Component {
51
105
  */
52
106
  get position(): number[];
53
107
 
108
+ /**
109
+ * Sets the SceneModel's local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
110
+ *
111
+ * Default value is ````[0,0,0]````.
112
+ *
113
+ * @type {number[]}
114
+ */
115
+ set rotation(value: number[]);
116
+
54
117
  /**
55
118
  * Gets the SceneModel's local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
56
119
  *
@@ -60,6 +123,15 @@ export declare class SceneModel extends Component {
60
123
  */
61
124
  get rotation(): number[];
62
125
 
126
+ /**
127
+ * Sets the SceneModel's local rotation quaternion.
128
+ *
129
+ * Default value is ````[0,0,0,1]````.
130
+ *
131
+ * @type {number[]}
132
+ */
133
+ set quaternion(value: number[]);
134
+
63
135
  /**
64
136
  * Gets the VBOSceneModels's local rotation quaternion.
65
137
  *
@@ -69,6 +141,16 @@ export declare class SceneModel extends Component {
69
141
  */
70
142
  get quaternion(): number[];
71
143
 
144
+ /**
145
+ * Sets the SceneModel's local scale.
146
+ *
147
+ * Default value is ````[1,1,1]````.
148
+ *
149
+ * @type {number[]}
150
+ * @deprecated
151
+ */
152
+ set scale(value: number[]);
153
+
72
154
  /**
73
155
  * Gets the SceneModel's local scale.
74
156
  *
@@ -78,6 +160,15 @@ export declare class SceneModel extends Component {
78
160
  */
79
161
  get scale(): number[];
80
162
 
163
+ /**
164
+ * Sets the SceneModel's local modeling transform matrix.
165
+ *
166
+ * Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
167
+ *
168
+ * @type {number[]}
169
+ */
170
+ set matrix(value: number[])
171
+
81
172
  /**
82
173
  * Gets the SceneModel's local modeling transform matrix.
83
174
  *
@@ -87,6 +178,22 @@ export declare class SceneModel extends Component {
87
178
  */
88
179
  get matrix(): number[];
89
180
 
181
+ /**
182
+ * Gets the SceneModel's local modeling rotation transform matrix.
183
+ *
184
+ * @type {number[]}
185
+ */
186
+ get rotationMatrix(): number[];
187
+
188
+ /**
189
+ * Gets the conjugate of the SceneModel's local modeling rotation transform matrix.
190
+ *
191
+ * This is used for RTC view matrix management in renderers.
192
+ *
193
+ * @type {Number[]}
194
+ */
195
+ get rotationMatrixConjugate(): number[];
196
+
90
197
  /**
91
198
  * Gets the SceneModel's World matrix.
92
199
  *
@@ -168,13 +275,6 @@ export declare class SceneModel extends Component {
168
275
  */
169
276
  get aabb(): number[];
170
277
 
171
- /**
172
- * The number of entities in this SceneModel.
173
- *
174
- * @type {number}
175
- */
176
- get numEntities(): number;
177
-
178
278
  /**
179
279
  * The approximate number of triangle primitives in this SceneModel.
180
280
  *
@@ -424,6 +524,15 @@ export declare class SceneModel extends Component {
424
524
  */
425
525
  get pbrEnabled(): boolean;
426
526
 
527
+ /**
528
+ * Gets if color textures are enabled for this SceneModel.
529
+ *
530
+ * Only works when {@link Scene#colorTextureEnabled} is also true.
531
+ *
532
+ * @type {Boolean}
533
+ */
534
+ get colorTextureEnabled(): boolean;
535
+
427
536
  /**
428
537
  * Returns true to indicate that SceneModel is implements {@link Drawable}.
429
538
  *
@@ -467,6 +576,12 @@ export declare class SceneModel extends Component {
467
576
  */
468
577
  get edgeMaterial(): EdgeMaterial;
469
578
 
579
+ /**
580
+ *
581
+ * @param cfg
582
+ */
583
+ createQuantizationRange(arg: {id: string | number, aabb: number[]}): void;
584
+
470
585
  /**
471
586
  * Creates a texture within this SceneModel.
472
587
  *
@@ -702,6 +817,13 @@ export declare class SceneModel extends Component {
702
817
  edges?: boolean;
703
818
  }): SceneModelEntity;
704
819
 
820
+ /**
821
+ * Pre-renders all meshes that have been added, even if the SceneModel has not bee finalized yet.
822
+ * This is use for progressively showing the SceneModel while it is being loaded or constructed.
823
+ * @returns {boolean}
824
+ */
825
+ preFinalize(): boolean;
826
+
705
827
  /**
706
828
  * Finalizes this SceneModel.
707
829
  *
@@ -710,4 +832,9 @@ export declare class SceneModel extends Component {
710
832
  * Once finalized, you can't add anything more to this SceneModel.
711
833
  */
712
834
  finalize(): void;
835
+
836
+ /**
837
+ * Destroys this SceneModel.
838
+ */
839
+ destroy(): void;
713
840
  }
@@ -1,6 +1,7 @@
1
1
  import {Entity} from "../Entity";
2
2
  import {SceneModelMesh} from "./SceneModelMesh";
3
3
  import {SceneModel} from "./SceneModel";
4
+ import { Material } from "../materials";
4
5
 
5
6
  /**
6
7
  * An abstract 3D scene element that can be individually shown, hidden, selected,
@@ -89,6 +90,11 @@ export declare abstract class SceneModelEntity implements Entity {
89
90
  */
90
91
  get aabb(): number[];
91
92
 
93
+ /**
94
+ * The approximate number of primitives in this SceneModelEntity
95
+ */
96
+ get numPrimitives(): number;
97
+
92
98
  /**
93
99
  * The approximate number of triangles in this SceneModelEntity.
94
100
  *
@@ -205,6 +211,26 @@ export declare abstract class SceneModelEntity implements Entity {
205
211
  */
206
212
  get edges(): boolean;
207
213
 
214
+ /**
215
+ * Toggle View Frustum Culling
216
+ */
217
+ set culledVFC(arg: boolean);
218
+
219
+ /**
220
+ * Gets View Frustum Culling
221
+ */
222
+ get culledVFC(): boolean;
223
+
224
+ /**
225
+ * Toggle Level of Detail Culling
226
+ */
227
+ set culledLOD(arg: boolean);
228
+
229
+ /**
230
+ * Gets level of detail culling
231
+ */
232
+ get culledLOD(): boolean;
233
+
208
234
  /**
209
235
  * Sets if this SceneModelEntity is culled.
210
236
  *
@@ -363,6 +389,20 @@ export declare abstract class SceneModelEntity implements Entity {
363
389
  */
364
390
  get saoEnabled(): boolean;
365
391
 
392
+ /**
393
+ * Sets the material for this SceneModelEntity that will be used on the caps
394
+ * when the objects of this entity are sliced
395
+ *
396
+ * If there is no capMaterial attached to a SceneModelEntity then its objects
397
+ * will not be capped when sliced
398
+ */
399
+ set capMaterial(value: Material);
400
+
401
+ /**
402
+ * Gets the cap material attached to this SceneModelEntity
403
+ */
404
+ get capMaterial(): Material;
405
+
366
406
  /**
367
407
  * Sets the SceneModelEntity's 3D World-space offset.
368
408
  *
@@ -398,6 +438,31 @@ export declare abstract class SceneModelEntity implements Entity {
398
438
  */
399
439
  getEachVertex(callback: any): void;
400
440
 
441
+ /**
442
+ * Gets the indices of this entity in a callback
443
+ */
444
+ getEachIndex(callback: any): void;
445
+
446
+ /**
447
+ * Returns the volume of this SceneModelEntity.
448
+ *
449
+ * Only works when {@link Scene.readableGeometryEnabled | Scene.readableGeometryEnabled} is `true` and the
450
+ * SceneModelEntity contains solid triangle meshes; returns `0` otherwise.
451
+ *
452
+ * @returns {number}
453
+ */
454
+ get volume(): number;
455
+
456
+ /**
457
+ * Returns the surface area of this SceneModelEntity.
458
+ *
459
+ * Only works when {@link Scene.readableGeometryEnabled | Scene.readableGeometryEnabled} is `true` and the
460
+ * SceneModelEntity contains triangle meshes; returns `0` otherwise.
461
+ *
462
+ * @returns {number}
463
+ */
464
+ get surfaceArea(): number;
465
+
401
466
  /**
402
467
  * The {@link SceneModel} to which this SceneModelEntity belongs.
403
468
  */
@@ -72,4 +72,16 @@ export declare class SceneModelMesh {
72
72
  */
73
73
  isSolid(): boolean;
74
74
 
75
+ /**
76
+ * Returns the volume of this SceneModelMesh.
77
+ * @returns {number}
78
+ */
79
+ get volume(): number;
80
+
81
+ /**
82
+ * Returns the surface area of this SceneModelMesh.
83
+ * @returns {number}
84
+ */
85
+ get surfaceArea(): number;
86
+
75
87
  }
@@ -0,0 +1,146 @@
1
+ import { Component } from '../Component';
2
+ import { Curve } from './Curve';
3
+
4
+ export declare type CubicBezierCurveConfiguration = {
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 first control point. */
10
+ v1: number[];
11
+ /** The middle control point. */
12
+ v2: number[];
13
+ /** The ending point. */
14
+ v3: number[];
15
+ /** Current position on this CubicBezierCurve, in range between 0..1. */
16
+ t: number;
17
+ }
18
+
19
+ export declare type CubicBezierCurveJson = {
20
+ v0: number[],
21
+ v1: number[],
22
+ v2: number[],
23
+ v3: number[],
24
+ t: number
25
+ }
26
+
27
+ export declare class CubicBezierCurve extends Curve {
28
+ /**
29
+ * @constructor
30
+ * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this CubicBezierCurve as well.
31
+ * @param {CubicBezierCurveConfiguration} [cfg] Configs
32
+ */
33
+ constructor(owner: Component, cfg?: CubicBezierCurveConfiguration);
34
+
35
+ /**
36
+ * Sets the starting point on this CubicBezierCurve.
37
+ *
38
+ * Default value is ````[0.0, 0.0, 0.0]````
39
+ *
40
+ * @param {Number[]} value The starting point.
41
+ */
42
+ set v0(value: number[]);
43
+
44
+ /**
45
+ * Gets the starting point on this CubicBezierCurve.
46
+ *
47
+ * Default value is ````[0.0, 0.0, 0.0]````
48
+ *
49
+ * @returns {Number[]} The starting point.
50
+ */
51
+ get v0(): number[];
52
+
53
+ /**
54
+ * Sets the first control point on this CubicBezierCurve.
55
+ *
56
+ * Default value is ````[0.0, 0.0, 0.0]````
57
+ *
58
+ * @param {Number[]} value The first control point.
59
+ */
60
+ set v1(value: number[]);
61
+
62
+ /**
63
+ * Gets the first control point on this CubicBezierCurve.
64
+ *
65
+ * Fires a {@link CubicBezierCurve#v1:event} event on change.
66
+ *
67
+ * Default value is ````[0.0, 0.0, 0.0]````
68
+ *
69
+ * @returns {Number[]} The first control point.
70
+ */
71
+ get v1(): number[];
72
+
73
+ /**
74
+ * Sets the second control point on this CubicBezierCurve.
75
+ *
76
+ * Default value is ````[0.0, 0.0, 0.0]````
77
+ *
78
+ * @param {Number[]} value The second control point.
79
+ */
80
+ set v2(value: number[]);
81
+
82
+ /**
83
+ * Gets the second control point on this CubicBezierCurve.
84
+ *
85
+ * Default value is ````[0.0, 0.0, 0.0]````
86
+ *
87
+ * @returns {Number[]} The second control point.
88
+ */
89
+ get v2(): number[];
90
+
91
+ /**
92
+ * Sets the end point on this CubicBezierCurve.
93
+ *
94
+ * Fires a {@link CubicBezierCurve#v3:event} event on change.
95
+ *
96
+ * Default value is ````[0.0, 0.0, 0.0]````
97
+ *
98
+ * @param {Number[]} value The end point.
99
+ */
100
+ set v3(value: number[]);
101
+
102
+ /**
103
+ * Gets the end point on this CubicBezierCurve.
104
+ *
105
+ * Fires a {@link CubicBezierCurve#v3:event} event on change.
106
+ *
107
+ * Default value is ````[0.0, 0.0, 0.0]````
108
+ *
109
+ * @returns {Number[]} The end point.
110
+ */
111
+ get v3(): number[];
112
+
113
+ /**
114
+ * Sets the current position of progress along this CubicBezierCurve.
115
+ *
116
+ * Automatically clamps to range ````[0..1]````.
117
+ *
118
+ * @param {Number} value New progress time value.
119
+ */
120
+ set t(value: number);
121
+
122
+ /**
123
+ * Gets the current position of progress along this CubicBezierCurve.
124
+ *
125
+ * @returns {Number} Current progress time value.
126
+ */
127
+ get t(): number;
128
+
129
+ /**
130
+ * Returns point on this CubicBezierCurve at the given position.
131
+ *
132
+ * @returns {Number[]} The point at the given position.
133
+ */
134
+ get point(): number[];
135
+
136
+ /**
137
+ * Returns point on this CubicBezierCurve at the given position.
138
+ *
139
+ * @param {Number} t Position to get point at.
140
+ *
141
+ * @returns {Number[]} The point at the given position.
142
+ */
143
+ getPoint(t: number): number[];
144
+
145
+ getJSON(): CubicBezierCurveJson;
146
+ }
@@ -0,0 +1,75 @@
1
+ import { Component } from "../Component";
2
+
3
+ export declare type CurveConfiguration = {
4
+ /**Optional ID, unique among all components in the parent {@link Curve}, generated automatically when omitted. */
5
+ id?: string
6
+ /**Current position on this Curve, in range between ````0..1```` */
7
+ t?: number
8
+ }
9
+
10
+ export declare class Curve extends Component {
11
+ /**
12
+ * @constructor
13
+ * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this Curve as well.
14
+ * @param {CurveConfiguration} [cfg] Configs
15
+ */
16
+ constructor(owner?: Component, cfg?: CurveConfiguration);
17
+
18
+ /**
19
+ * Sets the progress along this Curve.
20
+ *
21
+ * Automatically clamps to range ````[0..1]````.
22
+ *
23
+ * Default value is ````0````.
24
+ *
25
+ * @param {Number} value The progress value.
26
+ */
27
+ set t(value: number);
28
+
29
+ /**
30
+ * Gets the progress along this Curve.
31
+ *
32
+ * @returns {Number} The progress value.
33
+ */
34
+ get t(): number;
35
+
36
+ /**
37
+ * Gets the tangent on this Curve at position {@link Curve#t}.
38
+ *
39
+ * @returns {Number[]} The tangent.
40
+ */
41
+ get tangent(): number[];
42
+
43
+ /**
44
+ * Gets the length of this Curve.
45
+ *
46
+ * @returns {Number} The Curve length.
47
+ */
48
+ get length(): number;
49
+
50
+ /**
51
+ * Returns a normalized tangent vector on this Curve at the given position.
52
+ *
53
+ * @param {Number} t Position to get tangent at.
54
+ * @returns {Number[]} Normalized tangent vector
55
+ */
56
+ getTangent(t: number): number[];
57
+
58
+ getPointAt(u: number): number[];
59
+
60
+ /**
61
+ * Samples points on this Curve, at the given number of equally-spaced divisions.
62
+ *
63
+ * @param {Number} divisions The number of divisions.
64
+ * @returns {{Array of Array}} Array of sampled 3D points.
65
+ */
66
+ getPoints(divisions: number): number[][];
67
+
68
+ /**
69
+ *
70
+ * @param {Number} u
71
+ * @param {Number} distance
72
+ * @returns {Number}
73
+ */
74
+ getUToTMapping(u: number, distance: number): number;
75
+ }
@@ -0,0 +1,119 @@
1
+ import { Component } from '../Component';
2
+ import { Curve } from './Curve';
3
+
4
+ export declare type PathConfiguration = {
5
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
6
+ id?: string;
7
+ /** IDs or instances of {{#crossLink "path"}}{{/crossLink}} subtypes to add to this Path. */
8
+ paths: string[];
9
+ /** Current position on this Path, in range between 0..1. */
10
+ t: number;
11
+ }
12
+
13
+ export declare type PathJson = {
14
+ v0: number[];
15
+ v1: number[];
16
+ v2: number[];
17
+ t: number;
18
+ }
19
+
20
+ export declare class Path extends Curve {
21
+ /**
22
+ * @constructor
23
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this MetallicMaterial as well.
24
+ * @param {PathConfiguration} [cfg] Configuration
25
+ */
26
+ constructor(owner: Component, cfg?: PathConfiguration);
27
+
28
+ /**
29
+ * Sets the starting point on this QuadraticBezierCurve.
30
+ *
31
+ * Default value is ````[0.0, 0.0, 0.0]````.
32
+ *
33
+ * @param {Number[]} value New starting point.
34
+ */
35
+ set v0(value: number[]);
36
+
37
+ /**
38
+ * Gets the starting point on this QuadraticBezierCurve.
39
+ *
40
+ * Default value is ````[0.0, 0.0, 0.0]````.
41
+ *
42
+ * @returns {Number[]} The starting point.
43
+ */
44
+ get v0(): number[];
45
+
46
+ /**
47
+ * Sets the middle control point on this QuadraticBezierCurve.
48
+ *
49
+ * Default value is ````[0.0, 0.0, 0.0]````.
50
+ *
51
+ * @param {Number[]} value New middle control point.
52
+ */
53
+ set v1(value: number[]);
54
+
55
+ /**
56
+ * Gets the middle control point on this QuadraticBezierCurve.
57
+ *
58
+ * Default value is ````[0.0, 0.0, 0.0]````.
59
+ *
60
+ * @returns {Number[]} The middle control point.
61
+ */
62
+ get v1(): number[];
63
+
64
+ /**
65
+ * Sets the end point on this QuadraticBezierCurve.
66
+ *
67
+ * Default value is ````[0.0, 0.0, 0.0]````.
68
+ *
69
+ * @param {Number[]} value The new end point.
70
+ */
71
+ set v2(value: number[]);
72
+
73
+ /**
74
+ * Gets the end point on this QuadraticBezierCurve.
75
+ *
76
+ * Default value is ````[0.0, 0.0, 0.0]````.
77
+ *
78
+ * @returns {Number[]} The end point.
79
+ */
80
+ get v2(): number[];
81
+
82
+ /**
83
+ * Sets the progress along this QuadraticBezierCurve.
84
+ *
85
+ * Automatically clamps to range [0..1].
86
+ *
87
+ * Default value is ````0````.
88
+ *
89
+ * @param {Number} value The new progress location.
90
+ */
91
+ set t(value: number);
92
+
93
+ /**
94
+ * Gets the progress along this QuadraticBezierCurve.
95
+ *
96
+ * Default value is ````0````.
97
+ *
98
+ * @returns {Number} The current progress location.
99
+ */
100
+ get t(): number;
101
+
102
+ /**
103
+ Point on this QuadraticBezierCurve at position {@link QuadraticBezierCurve/t}.
104
+
105
+ @property point
106
+ @type {Number[]}
107
+ */
108
+ get point(): number[];
109
+
110
+ /**
111
+ * Returns the point on this QuadraticBezierCurve at the given position.
112
+ *
113
+ * @param {Number} t Position to get point at.
114
+ * @returns {Number[]} The point.
115
+ */
116
+ getPoint(t: number): number[];
117
+
118
+ getJSON(): PathJson;
119
+ }