@xeokit/xeokit-sdk 2.2.4 → 2.2.5-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xeokit-sdk.cjs.js +77 -40
- package/dist/xeokit-sdk.es.js +77 -40
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/package.json +4 -2
- package/types/extras/ContextMenu/ContextMenu.d.ts +125 -0
- package/types/extras/ContextMenu/index.d.ts +1 -0
- package/types/extras/index.d.ts +1 -0
- package/types/index.d.ts +3 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +144 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +42 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +85 -0
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +1 -0
- package/types/plugins/AnnotationsPlugin/Annotation.d.ts +134 -0
- package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +117 -0
- package/types/plugins/AnnotationsPlugin/index.d.ts +1 -0
- package/types/plugins/AxisGizmoPlugin/AxisGizmoPlugin.d.ts +28 -0
- package/types/plugins/AxisGizmoPlugin/index.d.ts +1 -0
- package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +146 -0
- package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -0
- package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +81 -0
- package/types/plugins/CityJSONLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +137 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +40 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +120 -0
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +1 -0
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +203 -0
- package/types/plugins/FastNavPlugin/index.d.ts +1 -0
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +140 -0
- package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +146 -0
- package/types/plugins/LASLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +160 -0
- package/types/plugins/NavCubePlugin/index.d.ts +1 -0
- package/types/plugins/OBJLoaderPlugin/OBJLoaderPlugin.d.ts +44 -0
- package/types/plugins/OBJLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +88 -0
- package/types/plugins/STLLoaderPlugin/index.d.ts +2 -0
- package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +103 -0
- package/types/plugins/SectionPlanesPlugin/index.d.ts +1 -0
- package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +34 -0
- package/types/plugins/SkyboxesPlugin/index.d.ts +1 -0
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +47 -0
- package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -0
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +173 -0
- package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -0
- package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -0
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +66 -0
- package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +136 -0
- package/types/plugins/TreeViewPlugin/index.d.ts +1 -0
- package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -0
- package/types/plugins/ViewCullPlugin/index.d.ts +1 -0
- package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +230 -0
- package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +277 -0
- package/types/plugins/XKTLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.d.ts +65 -0
- package/types/plugins/XML3DLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/index.d.ts +34 -0
- package/types/viewer/Configs.d.ts +20 -0
- package/types/viewer/Plugin.d.ts +69 -0
- package/types/viewer/Viewer.d.ts +212 -0
- package/types/viewer/index.d.ts +6 -0
- package/types/viewer/localization/LocaleService.d.ts +176 -0
- package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -0
- package/types/viewer/metadata/MetaModel.d.ts +65 -0
- package/types/viewer/metadata/MetaObject.d.ts +74 -0
- package/types/viewer/metadata/MetaScene.d.ts +135 -0
- package/types/viewer/metadata/Property.d.ts +29 -0
- package/types/viewer/metadata/PropertySet.d.ts +31 -0
- package/types/viewer/metadata/index.d.ts +6 -0
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +591 -0
- package/types/viewer/scene/Component.d.ts +155 -0
- package/types/viewer/scene/Entity.d.ts +394 -0
- package/types/viewer/scene/PerformanceModel/PerformanceModel.d.ts +605 -0
- package/types/viewer/scene/PerformanceModel/PerformanceNode.d.ts +302 -0
- package/types/viewer/scene/camera/Camera.d.ts +364 -0
- package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -0
- package/types/viewer/scene/camera/CameraPath.d.ts +28 -0
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -0
- package/types/viewer/scene/camera/CustomProjection.d.ts +57 -0
- package/types/viewer/scene/camera/Frustum.d.ts +166 -0
- package/types/viewer/scene/camera/Ortho.d.ts +115 -0
- package/types/viewer/scene/camera/Perspective.d.ts +136 -0
- package/types/viewer/scene/camera/index.d.ts +4 -0
- package/types/viewer/scene/geometry/Geometry.d.ts +7 -0
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -0
- package/types/viewer/scene/geometry/index.d.ts +1 -0
- package/types/viewer/scene/index.d.ts +6 -0
- package/types/viewer/scene/marker/Marker.d.ts +136 -0
- package/types/viewer/scene/marker/index.d.ts +1 -0
- package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -0
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -0
- package/types/viewer/scene/materials/Fresnel.d.ts +149 -0
- package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -0
- package/types/viewer/scene/materials/Material.d.ts +3 -0
- package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -0
- package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -0
- package/types/viewer/scene/materials/Texture.d.ts +261 -0
- package/types/viewer/scene/materials/index.d.ts +5 -0
- package/types/viewer/scene/math/math.d.ts +36 -0
- package/types/viewer/scene/postfx/SAO.d.ts +209 -0
- package/types/viewer/scene/scene/Scene.d.ts +727 -0
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +93 -0
- package/types/viewer/scene/sectionPlane/index.d.ts +1 -0
- package/types/viewer/scene/viewport/Viewport.d.ts +23 -0
- package/types/viewer/scene/webgl/PickResult.d.ts +103 -0
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { Camera } from "../Camera";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Defines a custom projection for a {@link Camera} as a custom 4x4 matrix..
|
|
6
|
+
*/
|
|
7
|
+
export declare class CustomProjection extends Component {
|
|
8
|
+
/**
|
|
9
|
+
* The Camera this CustomProjection belongs to.
|
|
10
|
+
*/
|
|
11
|
+
camera: Camera;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Sets the CustomProjection's projection transform matrix.
|
|
15
|
+
*
|
|
16
|
+
* Fires a "matrix" event on change.
|
|
17
|
+
|
|
18
|
+
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
19
|
+
*
|
|
20
|
+
* @param {Number[]} matrix New value for the CustomProjection's matrix.
|
|
21
|
+
*/
|
|
22
|
+
set matrix(arg: number[]);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Gets the CustomProjection's projection transform matrix.
|
|
26
|
+
*
|
|
27
|
+
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
28
|
+
*
|
|
29
|
+
* @return {Number[]} New value for the CustomProjection's matrix.
|
|
30
|
+
*/
|
|
31
|
+
get matrix(): number[];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Gets the inverse of {@link CustomProjection#matrix}.
|
|
35
|
+
*
|
|
36
|
+
* @returns {Number[]} The inverse of {@link CustomProjection#matrix}.
|
|
37
|
+
*/
|
|
38
|
+
get inverseMatrix(): number[];
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Gets the transpose of {@link CustomProjection#matrix}.
|
|
42
|
+
*
|
|
43
|
+
* @returns {Number[]} The transpose of {@link CustomProjection#matrix}.
|
|
44
|
+
*/
|
|
45
|
+
get transposedMatrix(): number[];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Un-projects the given Canvas-space coordinates, using this CustomProjection.
|
|
49
|
+
*
|
|
50
|
+
* @param {Number[]} canvasPos Inputs 2D Canvas-space coordinates.
|
|
51
|
+
* @param {Number} screenZ Inputs Screen-space Z coordinate.
|
|
52
|
+
* @param {Number[]} screenPos Outputs 3D Screen/Clip-space coordinates.
|
|
53
|
+
* @param {Number[]} viewPos Outputs un-projected 3D View-space coordinates.
|
|
54
|
+
* @param {Number[]} worldPos Outputs un-projected 3D World-space coordinates.
|
|
55
|
+
*/
|
|
56
|
+
unproject(canvasPos: number[], screenZ: number, screenPos: number[], viewPos: number[], worldPos: number[]): number[];
|
|
57
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { Camera } from "../Camera";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Defines its {@link Camera}'s perspective projection as a frustum-shaped view volume.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Frustum extends Component {
|
|
8
|
+
/**
|
|
9
|
+
* The Camera this Frustum belongs to.
|
|
10
|
+
*
|
|
11
|
+
* @property camera
|
|
12
|
+
* @type {Camera}
|
|
13
|
+
* @final
|
|
14
|
+
*/
|
|
15
|
+
camera: Camera;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Sets the position of the Frustum's left plane on the View-space X-axis.
|
|
19
|
+
*
|
|
20
|
+
* Fires a {@link Frustum#left:emits} emits on change.
|
|
21
|
+
*
|
|
22
|
+
* @param {Number} value New left frustum plane position.
|
|
23
|
+
*/
|
|
24
|
+
set left(arg: number);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Gets the position of the Frustum's left plane on the View-space X-axis.
|
|
28
|
+
*
|
|
29
|
+
* @return {Number} Left frustum plane position.
|
|
30
|
+
*/
|
|
31
|
+
get left(): number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Sets the position of the Frustum's right plane on the View-space X-axis.
|
|
35
|
+
*
|
|
36
|
+
* Fires a {@link Frustum#right:emits} emits on change.
|
|
37
|
+
*
|
|
38
|
+
* @param {Number} value New right frustum plane position.
|
|
39
|
+
*/
|
|
40
|
+
set right(arg: number);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Gets the position of the Frustum's right plane on the View-space X-axis.
|
|
44
|
+
*
|
|
45
|
+
* Fires a {@link Frustum#right:emits} emits on change.
|
|
46
|
+
*
|
|
47
|
+
* @return {Number} Right frustum plane position.
|
|
48
|
+
*/
|
|
49
|
+
get right(): number;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Sets the position of the Frustum's bottom plane on the View-space Y-axis.
|
|
53
|
+
*
|
|
54
|
+
* Fires a {@link Frustum#bottom:emits} emits on change.
|
|
55
|
+
*
|
|
56
|
+
* @emits {"bottom"} event with the value of this property whenever it changes.
|
|
57
|
+
*
|
|
58
|
+
* @param {Number} value New bottom frustum plane position.
|
|
59
|
+
*/
|
|
60
|
+
set bottom(arg: number);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Gets the position of the Frustum's bottom plane on the View-space Y-axis.
|
|
64
|
+
*
|
|
65
|
+
* Fires a {@link Frustum#bottom:emits} emits on change.
|
|
66
|
+
*
|
|
67
|
+
* @return {Number} Bottom frustum plane position.
|
|
68
|
+
*/
|
|
69
|
+
get bottom(): number;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Sets the position of the Frustum's top plane on the View-space Y-axis.
|
|
73
|
+
*
|
|
74
|
+
* Fires a {@link Frustum#top:emits} emits on change.
|
|
75
|
+
*
|
|
76
|
+
* @param {Number} value New top frustum plane position.
|
|
77
|
+
*/
|
|
78
|
+
set top(arg: number);
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Gets the position of the Frustum's top plane on the View-space Y-axis.
|
|
82
|
+
*
|
|
83
|
+
* Fires a {@link Frustum#top:emits} emits on change.
|
|
84
|
+
*
|
|
85
|
+
* @return {Number} Top frustum plane position.
|
|
86
|
+
*/
|
|
87
|
+
get top(): number;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Sets the position of the Frustum's near plane on the positive View-space Z-axis.
|
|
91
|
+
*
|
|
92
|
+
* Fires a {@link Frustum#near:emits} emits on change.
|
|
93
|
+
*
|
|
94
|
+
* Default value is ````0.1````.
|
|
95
|
+
*
|
|
96
|
+
* @param {Number} value New Frustum near plane position.
|
|
97
|
+
*/
|
|
98
|
+
set near(arg: number);
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Gets the position of the Frustum's near plane on the positive View-space Z-axis.
|
|
102
|
+
*
|
|
103
|
+
* Fires a {@link Frustum#near:emits} emits on change.
|
|
104
|
+
*
|
|
105
|
+
* Default value is ````0.1````.
|
|
106
|
+
*
|
|
107
|
+
* @return {Number} Near frustum plane position.
|
|
108
|
+
*/
|
|
109
|
+
get near(): number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Sets the position of the Frustum's far plane on the positive View-space Z-axis.
|
|
113
|
+
*
|
|
114
|
+
* Fires a {@link Frustum#far:emits} emits on change.
|
|
115
|
+
*
|
|
116
|
+
* Default value is ````10000.0````.
|
|
117
|
+
*
|
|
118
|
+
* @param {Number} value New far frustum plane position.
|
|
119
|
+
*/
|
|
120
|
+
set far(arg: number);
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Gets the position of the Frustum's far plane on the positive View-space Z-axis.
|
|
124
|
+
*
|
|
125
|
+
* Default value is ````10000.0````.
|
|
126
|
+
*
|
|
127
|
+
* @return {Number} Far frustum plane position.
|
|
128
|
+
*/
|
|
129
|
+
get far(): number;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Gets the Frustum's projection transform matrix.
|
|
133
|
+
*
|
|
134
|
+
* Fires a {@link Frustum#matrix:emits} emits on change.
|
|
135
|
+
*
|
|
136
|
+
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
137
|
+
*
|
|
138
|
+
* @returns {Number[]} The Frustum's projection matrix matrix.
|
|
139
|
+
*/
|
|
140
|
+
get matrix(): number[];
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Gets the inverse of {@link Frustum#matrix}.
|
|
144
|
+
*
|
|
145
|
+
* @returns {Number[]} The inverse orthographic projection matrix.
|
|
146
|
+
*/
|
|
147
|
+
get inverseMatrix(): number[];
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Gets the transpose of {@link Frustum#matrix}.
|
|
151
|
+
*
|
|
152
|
+
* @returns {Number[]} The transpose of {@link Frustum#matrix}.
|
|
153
|
+
*/
|
|
154
|
+
get transposedMatrix(): number[];
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Un-projects the given Canvas-space coordinates, using this Frustum projection.
|
|
158
|
+
*
|
|
159
|
+
* @param {Number[]} canvasPos Inputs 2D Canvas-space coordinates.
|
|
160
|
+
* @param {Number} screenZ Inputs Screen-space Z coordinate.
|
|
161
|
+
* @param {Number[]} screenPos Outputs 3D Screen/Clip-space coordinates.
|
|
162
|
+
* @param {Number[]} viewPos Outputs un-projected 3D View-space coordinates.
|
|
163
|
+
* @param {Number[]} worldPos Outputs un-projected 3D World-space coordinates.
|
|
164
|
+
*/
|
|
165
|
+
unproject(canvasPos: number[], screenZ: number, screenPos: number[], viewPos: number[], worldPos: number[]): number[];
|
|
166
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { Camera } from "../Camera";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Defines its {@link Camera}'s orthographic projection as a box-shaped view volume.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Ortho extends Component {
|
|
8
|
+
/**
|
|
9
|
+
* The Camera this Ortho belongs to.
|
|
10
|
+
*
|
|
11
|
+
* @property camera
|
|
12
|
+
* @type {Camera}
|
|
13
|
+
* @final
|
|
14
|
+
*/
|
|
15
|
+
camera: Camera;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Sets scale factor for this Ortho's extents on X and Y axis.
|
|
19
|
+
*
|
|
20
|
+
* Clamps to minimum value of ````0.01```.
|
|
21
|
+
*
|
|
22
|
+
* Fires a "scale" event on change.
|
|
23
|
+
*
|
|
24
|
+
* Default value is ````1.0````
|
|
25
|
+
* @param {Number} value New scale value.
|
|
26
|
+
*/
|
|
27
|
+
set scale(arg: number);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Gets scale factor for this Ortho's extents on X and Y axis.
|
|
31
|
+
*
|
|
32
|
+
* Clamps to minimum value of ````0.01```.
|
|
33
|
+
*
|
|
34
|
+
* Default value is ````1.0````
|
|
35
|
+
*
|
|
36
|
+
* @returns {Number} New Ortho scale value.
|
|
37
|
+
*/
|
|
38
|
+
get scale(): number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Sets the position of the Ortho's near plane on the positive View-space Z-axis.
|
|
42
|
+
*
|
|
43
|
+
* Fires a "near" emits on change.
|
|
44
|
+
*
|
|
45
|
+
* Default value is ````0.1````.
|
|
46
|
+
*
|
|
47
|
+
* @param {Number} value New Ortho near plane position.
|
|
48
|
+
*/
|
|
49
|
+
set near(arg: number);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Gets the position of the Ortho's near plane on the positive View-space Z-axis.
|
|
53
|
+
*
|
|
54
|
+
* Default value is ````0.1````.
|
|
55
|
+
*
|
|
56
|
+
* @returns {Number} New Ortho near plane position.
|
|
57
|
+
*/
|
|
58
|
+
get near(): number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Sets the position of the Ortho's far plane on the positive View-space Z-axis.
|
|
62
|
+
*
|
|
63
|
+
* Fires a "far" event on change.
|
|
64
|
+
*
|
|
65
|
+
* Default value is ````2000.0````.
|
|
66
|
+
*
|
|
67
|
+
* @param {Number} value New far ortho plane position.
|
|
68
|
+
*/
|
|
69
|
+
set far(arg: number);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Gets the position of the Ortho's far plane on the positive View-space Z-axis.
|
|
73
|
+
*
|
|
74
|
+
* Default value is ````10000.0````.
|
|
75
|
+
*
|
|
76
|
+
* @returns {Number} New far ortho plane position.
|
|
77
|
+
*/
|
|
78
|
+
get far(): number;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Gets the Ortho's projection transform matrix.
|
|
82
|
+
*
|
|
83
|
+
* Fires a "matrix" event on change.
|
|
84
|
+
*
|
|
85
|
+
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
86
|
+
*
|
|
87
|
+
* @returns {Number[]} The Ortho's projection matrix.
|
|
88
|
+
*/
|
|
89
|
+
get matrix(): number[];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Gets the inverse of {@link Ortho#matrix}.
|
|
93
|
+
*
|
|
94
|
+
* @returns {Number[]} The inverse of {@link Ortho#matrix}.
|
|
95
|
+
*/
|
|
96
|
+
get inverseMatrix(): number[];
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Gets the transpose of {@link Ortho#matrix}.
|
|
100
|
+
*
|
|
101
|
+
* @returns {Number[]} The transpose of {@link Ortho#matrix}.
|
|
102
|
+
*/
|
|
103
|
+
get transposedMatrix(): number[];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Un-projects the given Canvas-space coordinates, using this Ortho projection.
|
|
107
|
+
*
|
|
108
|
+
* @param {Number[]} canvasPos Inputs 2D Canvas-space coordinates.
|
|
109
|
+
* @param {Number} screenZ Inputs Screen-space Z coordinate.
|
|
110
|
+
* @param {Number[]} screenPos Outputs 3D Screen/Clip-space coordinates.
|
|
111
|
+
* @param {Number[]} viewPos Outputs un-projected 3D View-space coordinates.
|
|
112
|
+
* @param {Number[]} worldPos Outputs un-projected 3D World-space coordinates.
|
|
113
|
+
*/
|
|
114
|
+
unproject(canvasPos: number[], screenZ: number, screenPos: number[], viewPos: number[], worldPos: number[]): number[];
|
|
115
|
+
}
|