@xtctwins/tctwins-core 1.1.18 → 1.1.20

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 +27337 -27310
  3. package/dist/tctwins-core.min.es5.js +3 -3
  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 -94
  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 -757
  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/utils.d.ts +165 -165
  148. package/types/viewer/scene/viewport/Viewport.d.ts +23 -23
  149. package/types/viewer/scene/viewport/index.d.ts +1 -1
  150. package/types/viewer/scene/webgl/PickResult.d.ts +115 -115
  151. package/types/viewer/scene/webgl/index.d.ts +1 -1
@@ -1,167 +1,167 @@
1
- import { Component } from "../Component";
2
-
3
- /**
4
- * Jumps or flies the {@link Scene}'s {@link Camera} to a given target.
5
- */
6
- export declare class CameraFlightAnimation extends Component {
7
- /**
8
- * Sets the flight duration, in seconds, when calling {@link CameraFlightAnimation.flyTo}.
9
- *
10
- * Stops any flight currently in progress.
11
- *
12
- * default value is ````0.5````.
13
- *
14
- * @param {Number} value New duration value.
15
- */
16
- set duration(arg: number);
17
-
18
- /**
19
- * Gets the flight duration, in seconds, when calling {@link CameraFlightAnimation.flyTo}.
20
- *
21
- * default value is ````0.5````.
22
- *
23
- * @returns {Number} New duration value.
24
- */
25
- get duration(): number;
26
-
27
- /**
28
- * Sets if, when CameraFlightAnimation is flying to a boundary, it will always adjust the distance between the
29
- * {@link Camera.eye} and {@link Camera.look} so as to ensure that the target boundary is always filling the view volume.
30
- *
31
- * When false, the eye will remain at its current distance from the look position.
32
- *
33
- * Default value is ````true````.
34
- *
35
- * @param {Boolean} value Set ````true```` to activate this behaviour.
36
- */
37
- set fit(arg: boolean);
38
-
39
- /**
40
- * Gets if, when CameraFlightAnimation is flying to a boundary, it will always adjust the distance between the
41
- * {@link Camera.eye} and {@link Camera.look} so as to ensure that the target boundary is always filling the view volume.
42
- *
43
- * When false, the eye will remain at its current distance from the look position.
44
- *
45
- * Default value is ````true````.
46
- *
47
- * @returns {Boolean} value Set ````true```` to activate this behaviour.
48
- */
49
- get fit(): boolean;
50
-
51
- /**
52
- * Sets how much of the perspective field-of-view, in degrees, that a target {@link Entity.aabb} should
53
- * fill the canvas when calling {@link CameraFlightAnimation.flyTo} or {@link CameraFlightAnimation.jumpTo}.
54
- *
55
- * Default value is ````45````.
56
- *
57
- * @param {Number} value New FOV value.
58
- */
59
- set fitFOV(arg: number);
60
-
61
- /**
62
- * Gets how much of the perspective field-of-view, in degrees, that a target {@link Entity.aabb} should
63
- * fill the canvas when calling {@link CameraFlightAnimation.flyTo} or {@link CameraFlightAnimation.jumpTo}.
64
- *
65
- * Default value is ````45````.
66
- *
67
- * @returns {Number} Current FOV value.
68
- */
69
- get fitFOV(): number;
70
-
71
- /**
72
- * Sets if this CameraFlightAnimation to point the {@link Camera}
73
- * in the direction that it is travelling when flying to a target after calling {@link CameraFlightAnimation.flyTo}.
74
- *
75
- * Default value is ````true````.
76
- *
77
- * @param {Boolean} value Set ````true```` to activate trailing behaviour.
78
- */
79
- set trail(arg: boolean);
80
-
81
- /**
82
- * Gets if this CameraFlightAnimation points the {@link Camera}
83
- * in the direction that it is travelling when flying to a target after calling {@link CameraFlightAnimation.flyTo}.
84
- *
85
- * Default value is ````true````.
86
- *
87
- * @returns {Boolean} True if trailing behaviour is active.
88
- */
89
- get trail(): boolean;
90
-
91
- /**
92
- * Flies the {@link Camera} to a target.
93
- *
94
- * * When the target is a boundary, the {@link Camera} will fly towards the target and stop when the target fills most of the canvas.
95
- * * When the target is an explicit {@link Camera} position, given as ````eye````, ````look```` and ````up````, then CameraFlightAnimation will interpolate the {@link Camera} to that target and stop there.
96
- *
97
- * @param {Object|Component} [params=Scene] Either a parameters object or a {@link Component} subtype that has
98
- * an AABB. Defaults to the {@link Scene}, which causes the {@link Camera} to fit the Scene in view.
99
- * @param {Number} [params.arc=0] Factor in range ````[0..1]```` indicating how much the {@link Camera.eye} position
100
- * will swing away from its {@link Camera.look} position as it flies to the target.
101
- * @param {Number|String|Component} [params.component] ID or instance of a component to fly to. Defaults to the entire {@link Scene}.
102
- * @param {Number[]} [params.aabb] World-space axis-aligned bounding box (AABB) target to fly to.
103
- * @param {Number[]} [params.eye] Position to fly the eye position to.
104
- * @param {Number[]} [params.look] Position to fly the look position to.
105
- * @param {Number[]} [params.up] Position to fly the up vector to.
106
- * @param {String} [params.projection] Projection type to transition into as we fly. Can be any of the values of {@link Camera.projection}.
107
- * @param {Boolean} [params.fit=true] Whether to fit the target to the view volume. Overrides {@link CameraFlightAnimation.fit}.
108
- * @param {Number} [params.fitFOV] How much of field-of-view, in degrees, that a target {@link Entity} or its AABB should
109
- * fill the canvas on arrival. Overrides {@link CameraFlightAnimation.fitFOV}.
110
- * @param {Number} [params.duration] Flight duration in seconds. Overrides {@link CameraFlightAnimation.duration}.
111
- * @param {Number} [params.orthoScale] Animate the Camera's orthographic scale to this target value. See {@link Ortho.scale}.
112
- * @param {Function} [callback] Callback fired on arrival.
113
- * @param {Object} [scope] Optional scope for callback.
114
- */
115
- flyTo(params?: {
116
- arc?: number
117
- component?: number | string | Component
118
- aabb?: number[];
119
- eye?: number[];
120
- look?: number[];
121
- up?: number[];
122
- projection?: string;
123
- fit?: boolean
124
- fitFOV?: number;
125
- duration?: number;
126
- orthoScale?: number;
127
- } | Component, callback?: ()=> void, scope?: any): void;
128
-
129
- /**
130
- * Jumps the {@link Scene}'s {@link Camera} to the given target.
131
- *
132
- * * When the target is a boundary, this CameraFlightAnimation will position the {@link Camera} at where the target fills most of the canvas.
133
- * * When the target is an explicit {@link Camera} position, given as ````eye````, ````look```` and ````up```` vectors, then this CameraFlightAnimation will jump the {@link Camera} to that target.
134
- *
135
- * @param {*|Component} params Either a parameters object or a {@link Component} subtype that has a World-space AABB.
136
- * @param {Number} [params.arc=0] Factor in range [0..1] indicating how much the {@link Camera.eye} will swing away from its {@link Camera.look} as it flies to the target.
137
- * @param {Number|String|Component} [params.component] ID or instance of a component to fly to.
138
- * @param {Number[]} [params.aabb] World-space axis-aligned bounding box (AABB) target to fly to.
139
- * @param {Number[]} [params.eye] Position to fly the eye position to.
140
- * @param {Number[]} [params.look] Position to fly the look position to.
141
- * @param {Number[]} [params.up] Position to fly the up vector to.
142
- * @param {String} [params.projection] Projection type to transition into. Can be any of the values of {@link Camera.projection}.
143
- * @param {Number} [params.fitFOV] How much of field-of-view, in degrees, that a target {@link Entity} or its AABB should fill the canvas on arrival. Overrides {@link CameraFlightAnimation.fitFOV}.
144
- * @param {Boolean} [params.fit] Whether to fit the target to the view volume. Overrides {@link CameraFlightAnimation.fit}.
145
- */
146
- jumpTo(params: {
147
- arc?: number;
148
- component?: number | string | Component;
149
- aabb?: number[];
150
- eye?: number[];
151
- look?: number[];
152
- up?: number[];
153
- projection?: "perspective" | "ortho" | "frustum" | "customProjection",
154
- fitFOV?: number;
155
- fit?: boolean;
156
- } | Component): void;
157
-
158
- /**
159
- * Stops an earlier flyTo, fires arrival callback.
160
- */
161
- stop(): void;
162
-
163
- /**
164
- * Cancels an earlier flyTo without calling the arrival callback.
165
- */
166
- cancel(): void;
167
- }
1
+ import { Component } from "../Component";
2
+
3
+ /**
4
+ * Jumps or flies the {@link Scene}'s {@link Camera} to a given target.
5
+ */
6
+ export declare class CameraFlightAnimation extends Component {
7
+ /**
8
+ * Sets the flight duration, in seconds, when calling {@link CameraFlightAnimation.flyTo}.
9
+ *
10
+ * Stops any flight currently in progress.
11
+ *
12
+ * default value is ````0.5````.
13
+ *
14
+ * @param {Number} value New duration value.
15
+ */
16
+ set duration(arg: number);
17
+
18
+ /**
19
+ * Gets the flight duration, in seconds, when calling {@link CameraFlightAnimation.flyTo}.
20
+ *
21
+ * default value is ````0.5````.
22
+ *
23
+ * @returns {Number} New duration value.
24
+ */
25
+ get duration(): number;
26
+
27
+ /**
28
+ * Sets if, when CameraFlightAnimation is flying to a boundary, it will always adjust the distance between the
29
+ * {@link Camera.eye} and {@link Camera.look} so as to ensure that the target boundary is always filling the view volume.
30
+ *
31
+ * When false, the eye will remain at its current distance from the look position.
32
+ *
33
+ * Default value is ````true````.
34
+ *
35
+ * @param {Boolean} value Set ````true```` to activate this behaviour.
36
+ */
37
+ set fit(arg: boolean);
38
+
39
+ /**
40
+ * Gets if, when CameraFlightAnimation is flying to a boundary, it will always adjust the distance between the
41
+ * {@link Camera.eye} and {@link Camera.look} so as to ensure that the target boundary is always filling the view volume.
42
+ *
43
+ * When false, the eye will remain at its current distance from the look position.
44
+ *
45
+ * Default value is ````true````.
46
+ *
47
+ * @returns {Boolean} value Set ````true```` to activate this behaviour.
48
+ */
49
+ get fit(): boolean;
50
+
51
+ /**
52
+ * Sets how much of the perspective field-of-view, in degrees, that a target {@link Entity.aabb} should
53
+ * fill the canvas when calling {@link CameraFlightAnimation.flyTo} or {@link CameraFlightAnimation.jumpTo}.
54
+ *
55
+ * Default value is ````45````.
56
+ *
57
+ * @param {Number} value New FOV value.
58
+ */
59
+ set fitFOV(arg: number);
60
+
61
+ /**
62
+ * Gets how much of the perspective field-of-view, in degrees, that a target {@link Entity.aabb} should
63
+ * fill the canvas when calling {@link CameraFlightAnimation.flyTo} or {@link CameraFlightAnimation.jumpTo}.
64
+ *
65
+ * Default value is ````45````.
66
+ *
67
+ * @returns {Number} Current FOV value.
68
+ */
69
+ get fitFOV(): number;
70
+
71
+ /**
72
+ * Sets if this CameraFlightAnimation to point the {@link Camera}
73
+ * in the direction that it is travelling when flying to a target after calling {@link CameraFlightAnimation.flyTo}.
74
+ *
75
+ * Default value is ````true````.
76
+ *
77
+ * @param {Boolean} value Set ````true```` to activate trailing behaviour.
78
+ */
79
+ set trail(arg: boolean);
80
+
81
+ /**
82
+ * Gets if this CameraFlightAnimation points the {@link Camera}
83
+ * in the direction that it is travelling when flying to a target after calling {@link CameraFlightAnimation.flyTo}.
84
+ *
85
+ * Default value is ````true````.
86
+ *
87
+ * @returns {Boolean} True if trailing behaviour is active.
88
+ */
89
+ get trail(): boolean;
90
+
91
+ /**
92
+ * Flies the {@link Camera} to a target.
93
+ *
94
+ * * When the target is a boundary, the {@link Camera} will fly towards the target and stop when the target fills most of the canvas.
95
+ * * When the target is an explicit {@link Camera} position, given as ````eye````, ````look```` and ````up````, then CameraFlightAnimation will interpolate the {@link Camera} to that target and stop there.
96
+ *
97
+ * @param {Object|Component} [params=Scene] Either a parameters object or a {@link Component} subtype that has
98
+ * an AABB. Defaults to the {@link Scene}, which causes the {@link Camera} to fit the Scene in view.
99
+ * @param {Number} [params.arc=0] Factor in range ````[0..1]```` indicating how much the {@link Camera.eye} position
100
+ * will swing away from its {@link Camera.look} position as it flies to the target.
101
+ * @param {Number|String|Component} [params.component] ID or instance of a component to fly to. Defaults to the entire {@link Scene}.
102
+ * @param {Number[]} [params.aabb] World-space axis-aligned bounding box (AABB) target to fly to.
103
+ * @param {Number[]} [params.eye] Position to fly the eye position to.
104
+ * @param {Number[]} [params.look] Position to fly the look position to.
105
+ * @param {Number[]} [params.up] Position to fly the up vector to.
106
+ * @param {String} [params.projection] Projection type to transition into as we fly. Can be any of the values of {@link Camera.projection}.
107
+ * @param {Boolean} [params.fit=true] Whether to fit the target to the view volume. Overrides {@link CameraFlightAnimation.fit}.
108
+ * @param {Number} [params.fitFOV] How much of field-of-view, in degrees, that a target {@link Entity} or its AABB should
109
+ * fill the canvas on arrival. Overrides {@link CameraFlightAnimation.fitFOV}.
110
+ * @param {Number} [params.duration] Flight duration in seconds. Overrides {@link CameraFlightAnimation.duration}.
111
+ * @param {Number} [params.orthoScale] Animate the Camera's orthographic scale to this target value. See {@link Ortho.scale}.
112
+ * @param {Function} [callback] Callback fired on arrival.
113
+ * @param {Object} [scope] Optional scope for callback.
114
+ */
115
+ flyTo(params?: {
116
+ arc?: number
117
+ component?: number | string | Component
118
+ aabb?: number[];
119
+ eye?: number[];
120
+ look?: number[];
121
+ up?: number[];
122
+ projection?: string;
123
+ fit?: boolean
124
+ fitFOV?: number;
125
+ duration?: number;
126
+ orthoScale?: number;
127
+ } | Component, callback?: ()=> void, scope?: any): void;
128
+
129
+ /**
130
+ * Jumps the {@link Scene}'s {@link Camera} to the given target.
131
+ *
132
+ * * When the target is a boundary, this CameraFlightAnimation will position the {@link Camera} at where the target fills most of the canvas.
133
+ * * When the target is an explicit {@link Camera} position, given as ````eye````, ````look```` and ````up```` vectors, then this CameraFlightAnimation will jump the {@link Camera} to that target.
134
+ *
135
+ * @param {*|Component} params Either a parameters object or a {@link Component} subtype that has a World-space AABB.
136
+ * @param {Number} [params.arc=0] Factor in range [0..1] indicating how much the {@link Camera.eye} will swing away from its {@link Camera.look} as it flies to the target.
137
+ * @param {Number|String|Component} [params.component] ID or instance of a component to fly to.
138
+ * @param {Number[]} [params.aabb] World-space axis-aligned bounding box (AABB) target to fly to.
139
+ * @param {Number[]} [params.eye] Position to fly the eye position to.
140
+ * @param {Number[]} [params.look] Position to fly the look position to.
141
+ * @param {Number[]} [params.up] Position to fly the up vector to.
142
+ * @param {String} [params.projection] Projection type to transition into. Can be any of the values of {@link Camera.projection}.
143
+ * @param {Number} [params.fitFOV] How much of field-of-view, in degrees, that a target {@link Entity} or its AABB should fill the canvas on arrival. Overrides {@link CameraFlightAnimation.fitFOV}.
144
+ * @param {Boolean} [params.fit] Whether to fit the target to the view volume. Overrides {@link CameraFlightAnimation.fit}.
145
+ */
146
+ jumpTo(params: {
147
+ arc?: number;
148
+ component?: number | string | Component;
149
+ aabb?: number[];
150
+ eye?: number[];
151
+ look?: number[];
152
+ up?: number[];
153
+ projection?: "perspective" | "ortho" | "frustum" | "customProjection",
154
+ fitFOV?: number;
155
+ fit?: boolean;
156
+ } | Component): void;
157
+
158
+ /**
159
+ * Stops an earlier flyTo, fires arrival callback.
160
+ */
161
+ stop(): void;
162
+
163
+ /**
164
+ * Cancels an earlier flyTo without calling the arrival callback.
165
+ */
166
+ cancel(): void;
167
+ }
@@ -1,28 +1,28 @@
1
- import { Component } from "../Component";
2
-
3
- export declare type Frame = {
4
- t: number;
5
- eye: number[];
6
- look: number[];
7
- up: number[];
8
- };
9
-
10
- export declare type CameraPathConfiguration = {
11
- /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
12
- id?: string;
13
- /** Initial sequence of frames. */
14
- frames: Frame[];
15
- };
16
-
17
- /**
18
- * Defines a sequence of frames along which a {@link CameraPathAnimation} can animate a {@link Camera}.
19
- *
20
- */
21
- export declare class CameraPath extends Component {
22
- /**
23
- * @constructor
24
- * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this CameraPath as well.
25
- * @param {CameraPathConfiguration} [cfg] Configuration
26
- */
27
- constructor(owner?: Component, cfg?: CameraPathConfiguration);
28
- }
1
+ import { Component } from "../Component";
2
+
3
+ export declare type Frame = {
4
+ t: number;
5
+ eye: number[];
6
+ look: number[];
7
+ up: number[];
8
+ };
9
+
10
+ export declare type CameraPathConfiguration = {
11
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
12
+ id?: string;
13
+ /** Initial sequence of frames. */
14
+ frames: Frame[];
15
+ };
16
+
17
+ /**
18
+ * Defines a sequence of frames along which a {@link CameraPathAnimation} can animate a {@link Camera}.
19
+ *
20
+ */
21
+ export declare class CameraPath extends Component {
22
+ /**
23
+ * @constructor
24
+ * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this CameraPath as well.
25
+ * @param {CameraPathConfiguration} [cfg] Configuration
26
+ */
27
+ constructor(owner?: Component, cfg?: CameraPathConfiguration);
28
+ }
@@ -1,95 +1,95 @@
1
- import { Component } from "../Component";
2
- import { CameraPath } from "./CameraPath";
3
-
4
- export declare type CameraPathAnimationConfiguration = {
5
- playingRate: number;
6
- /** A {@link CameraPath} that defines the path of a {@link Camera} */
7
- cameraPath: CameraPath;
8
- };
9
-
10
- /**
11
- * Animates the {@link Scene}'s's {@link Camera} along a {@link CameraPath}.
12
- */
13
- export declare class CameraPathAnimation extends Component {
14
- /**
15
- * @constructor
16
- * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this CameraPathAnimation as well.
17
- * @param {CameraPathAnimationConfiguration} [cfg] Configuration
18
- */
19
- constructor(owner?: Component, cfg?: CameraPathAnimationConfiguration);
20
-
21
- /**
22
- * Sets the {@link CameraPath} animated by this CameraPathAnimation.
23
- *
24
- @param {CameraPath} value The new CameraPath.
25
- */
26
- set cameraPath(arg: CameraPath);
27
-
28
- /**
29
- * Gets the {@link CameraPath} animated by this CameraPathAnimation.
30
- *
31
- @returns {CameraPath} The CameraPath.
32
- */
33
- get cameraPath(): CameraPath;
34
-
35
- /**
36
- * Sets the rate at which the CameraPathAnimation animates the {@link Camera} along the {@link CameraPath}.
37
- *
38
- * @param {Number} value The amount of progress per second.
39
- */
40
- set rate(arg: number);
41
-
42
- /**
43
- * Gets the rate at which the CameraPathAnimation animates the {@link Camera} along the {@link CameraPath}.
44
- *
45
- * @returns {*|number} The current playing rate.
46
- */
47
- get rate(): number;
48
-
49
- /**
50
- * Begins animating the {@link Camera} along CameraPathAnimation's {@link CameraPath} from the beginning.
51
- */
52
- play(): void;
53
-
54
- /**
55
- * Begins animating the {@link Camera} along CameraPathAnimation's {@link CameraPath} from the given time.
56
- *
57
- * @param {Number} t Time instant.
58
- */
59
- playToT(t: number): void;
60
-
61
- /**
62
- * Animates the {@link Camera} along CameraPathAnimation's {@link CameraPath} to the given frame.
63
- *
64
- * @param {Number} frameIdx Index of the frame to play to.
65
- */
66
- playToFrame(frameIdx: number): void;
67
-
68
- /**
69
- * Flies the {@link Camera} directly to the given frame on the CameraPathAnimation's {@link CameraPath}.
70
- *
71
- * @param {Number} frameIdx Index of the frame to play to.
72
- * @param {Function} [ok] Callback to fire when playing is complete.
73
- */
74
- flyToFrame(frameIdx: number, ok?: ()=> void): void;
75
-
76
- /**
77
- * Scrubs the {@link Camera} to the given time on the CameraPathAnimation's {@link CameraPath}.
78
- *
79
- * @param {Number} t Time instant.
80
- */
81
- scrubToT(t: number): void;
82
-
83
- /**
84
- * Scrubs the {@link Camera} to the given frame on the CameraPathAnimation's {@link CameraPath}.
85
- *
86
- * @param {Number} frameIdx Index of the frame to scrub to.
87
- */
88
- scrubToFrame(frameIdx: number): void;
89
-
90
- /**
91
- * Stops playing this CameraPathAnimation.
92
- */
93
- stop(): void;
94
- }
95
-
1
+ import { Component } from "../Component";
2
+ import { CameraPath } from "./CameraPath";
3
+
4
+ export declare type CameraPathAnimationConfiguration = {
5
+ playingRate: number;
6
+ /** A {@link CameraPath} that defines the path of a {@link Camera} */
7
+ cameraPath: CameraPath;
8
+ };
9
+
10
+ /**
11
+ * Animates the {@link Scene}'s's {@link Camera} along a {@link CameraPath}.
12
+ */
13
+ export declare class CameraPathAnimation extends Component {
14
+ /**
15
+ * @constructor
16
+ * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this CameraPathAnimation as well.
17
+ * @param {CameraPathAnimationConfiguration} [cfg] Configuration
18
+ */
19
+ constructor(owner?: Component, cfg?: CameraPathAnimationConfiguration);
20
+
21
+ /**
22
+ * Sets the {@link CameraPath} animated by this CameraPathAnimation.
23
+ *
24
+ @param {CameraPath} value The new CameraPath.
25
+ */
26
+ set cameraPath(arg: CameraPath);
27
+
28
+ /**
29
+ * Gets the {@link CameraPath} animated by this CameraPathAnimation.
30
+ *
31
+ @returns {CameraPath} The CameraPath.
32
+ */
33
+ get cameraPath(): CameraPath;
34
+
35
+ /**
36
+ * Sets the rate at which the CameraPathAnimation animates the {@link Camera} along the {@link CameraPath}.
37
+ *
38
+ * @param {Number} value The amount of progress per second.
39
+ */
40
+ set rate(arg: number);
41
+
42
+ /**
43
+ * Gets the rate at which the CameraPathAnimation animates the {@link Camera} along the {@link CameraPath}.
44
+ *
45
+ * @returns {*|number} The current playing rate.
46
+ */
47
+ get rate(): number;
48
+
49
+ /**
50
+ * Begins animating the {@link Camera} along CameraPathAnimation's {@link CameraPath} from the beginning.
51
+ */
52
+ play(): void;
53
+
54
+ /**
55
+ * Begins animating the {@link Camera} along CameraPathAnimation's {@link CameraPath} from the given time.
56
+ *
57
+ * @param {Number} t Time instant.
58
+ */
59
+ playToT(t: number): void;
60
+
61
+ /**
62
+ * Animates the {@link Camera} along CameraPathAnimation's {@link CameraPath} to the given frame.
63
+ *
64
+ * @param {Number} frameIdx Index of the frame to play to.
65
+ */
66
+ playToFrame(frameIdx: number): void;
67
+
68
+ /**
69
+ * Flies the {@link Camera} directly to the given frame on the CameraPathAnimation's {@link CameraPath}.
70
+ *
71
+ * @param {Number} frameIdx Index of the frame to play to.
72
+ * @param {Function} [ok] Callback to fire when playing is complete.
73
+ */
74
+ flyToFrame(frameIdx: number, ok?: ()=> void): void;
75
+
76
+ /**
77
+ * Scrubs the {@link Camera} to the given time on the CameraPathAnimation's {@link CameraPath}.
78
+ *
79
+ * @param {Number} t Time instant.
80
+ */
81
+ scrubToT(t: number): void;
82
+
83
+ /**
84
+ * Scrubs the {@link Camera} to the given frame on the CameraPathAnimation's {@link CameraPath}.
85
+ *
86
+ * @param {Number} frameIdx Index of the frame to scrub to.
87
+ */
88
+ scrubToFrame(frameIdx: number): void;
89
+
90
+ /**
91
+ * Stops playing this CameraPathAnimation.
92
+ */
93
+ stop(): void;
94
+ }
95
+