@xeokit/xeokit-sdk 2.2.5 → 2.3.0-beta-4
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/web-ifc.wasm +0 -0
- package/dist/xeokit-sdk.cjs.js +87130 -80004
- package/dist/xeokit-sdk.es.js +87130 -80004
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/package.json +18 -22
- 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 +67 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +99 -0
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +1 -0
- package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -0
- package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +150 -0
- package/types/plugins/AnnotationsPlugin/index.d.ts +2 -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 +65 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +135 -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 +1 -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 +180 -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 +150 -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 +183 -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 +681 -0
- package/types/viewer/scene/Component.d.ts +155 -0
- package/types/viewer/scene/Entity.d.ts +394 -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 +17 -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 +148 -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 +260 -0
- package/types/viewer/scene/materials/index.d.ts +6 -0
- package/types/viewer/scene/math/math.d.ts +56 -0
- package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -0
- package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -0
- package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -0
- package/types/viewer/scene/mementos/index.d.ts +3 -0
- package/types/viewer/scene/mesh/Mesh.d.ts +786 -0
- package/types/viewer/scene/mesh/index.d.ts +1 -0
- package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +622 -0
- package/types/viewer/scene/models/PerformanceModel/PerformanceNode.d.ts +302 -0
- package/types/viewer/scene/models/PerformanceModel/index.d.ts +2 -0
- package/types/viewer/scene/models/index.d.ts +1 -0
- package/types/viewer/scene/nodes/Node.d.ts +664 -0
- package/types/viewer/scene/nodes/index.d.ts +1 -0
- package/types/viewer/scene/postfx/SAO.d.ts +209 -0
- package/types/viewer/scene/scene/Scene.d.ts +771 -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/viewport/index.d.ts +1 -0
- package/types/viewer/scene/webgl/PickResult.d.ts +103 -0
- package/types/viewer/scene/webgl/index.d.ts +1 -0
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { Camera } from "./Camera";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @desc Defines its {@link Camera}'s perspective projection using a field-of-view angle.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Perspective extends Component {
|
|
8
|
+
/**
|
|
9
|
+
* The Camera this Perspective belongs to.
|
|
10
|
+
*
|
|
11
|
+
* @property camera
|
|
12
|
+
* @type {Camera}
|
|
13
|
+
* @final
|
|
14
|
+
*/
|
|
15
|
+
camera: Camera;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Sets the Perspective's field-of-view angle (FOV).
|
|
19
|
+
*
|
|
20
|
+
* Fires an "fov" event on change.
|
|
21
|
+
|
|
22
|
+
* Default value is ````60.0````.
|
|
23
|
+
*
|
|
24
|
+
* @param {Number} value New field-of-view.
|
|
25
|
+
*/
|
|
26
|
+
set fov(arg: number);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Gets the Perspective's field-of-view angle (FOV).
|
|
30
|
+
*
|
|
31
|
+
* Default value is ````60.0````.
|
|
32
|
+
*
|
|
33
|
+
* @returns {Number} Current field-of-view.
|
|
34
|
+
*/
|
|
35
|
+
get fov(): number;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Sets the Perspective's FOV axis.
|
|
39
|
+
*
|
|
40
|
+
* Options are ````"x"````, ````"y"```` or ````"min"````, to use the minimum axis.
|
|
41
|
+
*
|
|
42
|
+
* Fires an "fovAxis" event on change.
|
|
43
|
+
|
|
44
|
+
* Default value ````"min"````.
|
|
45
|
+
*
|
|
46
|
+
* @param {String} value New FOV axis value.
|
|
47
|
+
*/
|
|
48
|
+
set fovAxis(arg: string);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Gets the Perspective's FOV axis.
|
|
52
|
+
*
|
|
53
|
+
* Options are ````"x"````, ````"y"```` or ````"min"````, to use the minimum axis.
|
|
54
|
+
*
|
|
55
|
+
* Fires an "fovAxis" event on change.
|
|
56
|
+
|
|
57
|
+
* Default value is ````"min"````.
|
|
58
|
+
*
|
|
59
|
+
* @returns {String} The current FOV axis value.
|
|
60
|
+
*/
|
|
61
|
+
get fovAxis(): string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sets the position of the Perspective's near plane on the positive View-space Z-axis.
|
|
65
|
+
*
|
|
66
|
+
* Fires a "near" event on change.
|
|
67
|
+
*
|
|
68
|
+
* Default value is ````0.1````.
|
|
69
|
+
*
|
|
70
|
+
* @param {Number} value New Perspective near plane position.
|
|
71
|
+
*/
|
|
72
|
+
set near(arg: number);
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Gets the position of the Perspective's near plane on the positive View-space Z-axis.
|
|
76
|
+
*
|
|
77
|
+
* Fires an "emits" emits on change.
|
|
78
|
+
*
|
|
79
|
+
* Default value is ````0.1````.
|
|
80
|
+
*
|
|
81
|
+
* @returns The Perspective's near plane position.
|
|
82
|
+
*/
|
|
83
|
+
get near(): number;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Sets the position of this Perspective's far plane on the positive View-space Z-axis.
|
|
87
|
+
*
|
|
88
|
+
* Fires a "far" event on change.
|
|
89
|
+
*
|
|
90
|
+
* @param {Number} value New Perspective far plane position.
|
|
91
|
+
*/
|
|
92
|
+
set far(arg: number);
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Gets the position of this Perspective's far plane on the positive View-space Z-axis.
|
|
96
|
+
*
|
|
97
|
+
* @return {Number} The Perspective's far plane position.
|
|
98
|
+
*/
|
|
99
|
+
get far(): number;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Gets the Perspective's projection transform matrix.
|
|
103
|
+
*
|
|
104
|
+
* Fires a "matrix" event on change.
|
|
105
|
+
*
|
|
106
|
+
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
107
|
+
*
|
|
108
|
+
* @returns {Number[]} The Perspective's projection matrix.
|
|
109
|
+
*/
|
|
110
|
+
get matrix(): number[];
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Gets the inverse of {@link Perspective.matrix}.
|
|
114
|
+
*
|
|
115
|
+
* @returns {Number[]} The inverse of {@link Perspective.matrix}.
|
|
116
|
+
*/
|
|
117
|
+
get inverseMatrix(): number[];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Gets the transpose of {@link Perspective.matrix}.
|
|
121
|
+
*
|
|
122
|
+
* @returns {Number[]} The transpose of {@link Perspective.matrix}.
|
|
123
|
+
*/
|
|
124
|
+
get transposedMatrix(): number[];
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Un-projects the given Canvas-space coordinates and Screen-space depth, using this Perspective projection.
|
|
128
|
+
*
|
|
129
|
+
* @param {Number[]} canvasPos Inputs 2D Canvas-space coordinates.
|
|
130
|
+
* @param {Number} screenZ Inputs Screen-space Z coordinate.
|
|
131
|
+
* @param {Number[]} screenPos Outputs 3D Screen/Clip-space coordinates.
|
|
132
|
+
* @param {Number[]} viewPos Outputs un-projected 3D View-space coordinates.
|
|
133
|
+
* @param {Number[]} worldPos Outputs un-projected 3D World-space coordinates.
|
|
134
|
+
*/
|
|
135
|
+
unproject(canvasPos: number[], screenZ: number, screenPos: number[], viewPos: number[], worldPos: number[]): number[];
|
|
136
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {Geometry} from "./Geometry";
|
|
2
|
+
import {Component} from "../Component";
|
|
3
|
+
|
|
4
|
+
export declare type ReadableGeometryConfiguration = {
|
|
5
|
+
/** Optional ID, unique among all components in the parent {@link Scene}, */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Optional map of user-defined metadata to attach to this Geometry. */
|
|
8
|
+
meta?: {[key: string]: any};
|
|
9
|
+
/** The primitive type. */
|
|
10
|
+
primitive?: "points" | "lines"| "line-loop"| "line-strip"| "triangles"| "triangle-strip" | "triangle-fan";
|
|
11
|
+
/** Positions array. */
|
|
12
|
+
positions?: number[];
|
|
13
|
+
/** Vertex normal vectors array. */
|
|
14
|
+
normals?: number[];
|
|
15
|
+
/** UVs array. */
|
|
16
|
+
uv?: number[];
|
|
17
|
+
/** Vertex colors. */
|
|
18
|
+
colors?: number[];
|
|
19
|
+
/** Indices array. */
|
|
20
|
+
indices?: number[];
|
|
21
|
+
/** Set true to automatically generate normal vectors from the positions and indices, if those are supplied.*/
|
|
22
|
+
autoVertexNormals?: boolean;
|
|
23
|
+
/** Stores positions, colors, normals and UVs in compressGeometry and oct-encoded formats for reduced memory footprint and GPU bus usage.*/
|
|
24
|
+
compressGeometry?: boolean;
|
|
25
|
+
/** When a {@link Mesh} renders this Geometry as wireframe, this indicates the threshold angle (in degrees) between the face normals of adjacent triangles below which the edge is discarded.*/
|
|
26
|
+
edgeThreshold?: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A {@link Geometry} that keeps its geometry data in both browser and GPU memory.
|
|
31
|
+
*
|
|
32
|
+
* ReadableGeometry uses more memory than {@link VBOGeometry}, which only stores its geometry data in GPU memory.
|
|
33
|
+
*/
|
|
34
|
+
export declare class ReadableGeometry extends Geometry {
|
|
35
|
+
/**
|
|
36
|
+
* constructor
|
|
37
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
|
|
38
|
+
* @param {ReadableGeometryConfiguration} cfg Configs
|
|
39
|
+
*/
|
|
40
|
+
constructor(owner: Component, cfg?: ReadableGeometryConfiguration);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Gets the Geometry"s primitive type.
|
|
44
|
+
*/
|
|
45
|
+
get primitive(): "points" | "lines"| "line-loop"| "line-strip"| "triangles"| "triangle-strip" | "triangle-fan";
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Indicates if this Geometry is quantized.
|
|
49
|
+
*/
|
|
50
|
+
get compressGeometry(): boolean;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The Geometry's vertex positions.
|
|
54
|
+
*/
|
|
55
|
+
get positions(): number[];
|
|
56
|
+
set positions(arg: number[]);
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The Geometry's vertex normals.
|
|
60
|
+
*/
|
|
61
|
+
get normals(): number[];
|
|
62
|
+
set normals(arg: number[]);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
The Geometry's UV coordinates.
|
|
66
|
+
*/
|
|
67
|
+
get uv(): number[];
|
|
68
|
+
set uv(arg: number[]);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The Geometry's vertex colors.
|
|
72
|
+
*/
|
|
73
|
+
get colors(): number[];
|
|
74
|
+
set colors(arg: number[]);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The Geometry's indices.
|
|
78
|
+
*/
|
|
79
|
+
get indices(): Uint16Array | Uint32Array;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Local-space axis-aligned 3D boundary (AABB) of this geometry.
|
|
83
|
+
*/
|
|
84
|
+
get aabb(): number[];
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Local-space oriented 3D boundary (OBB) of this geometry.
|
|
88
|
+
*/
|
|
89
|
+
get obb(): number[];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Approximate number of triangles in this ReadableGeometry.
|
|
93
|
+
*/
|
|
94
|
+
get numTriangles(): number;
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ReadableGeometry";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./Component";
|
|
2
|
+
export * from "./Entity";
|
|
3
|
+
|
|
4
|
+
export * from "./camera";
|
|
5
|
+
export * from "./CameraControl/CameraControl";
|
|
6
|
+
export * from "./geometry";
|
|
7
|
+
export * from "./marker";
|
|
8
|
+
export * from "./materials";
|
|
9
|
+
export * from "./math/math";
|
|
10
|
+
export * from "./mementos";
|
|
11
|
+
export * from "./mesh";
|
|
12
|
+
export * from "./nodes";
|
|
13
|
+
export * from "./models";
|
|
14
|
+
export * from "./scene/Scene";
|
|
15
|
+
export * from "./sectionPlane";
|
|
16
|
+
export * from "./viewport";
|
|
17
|
+
export * from "./webgl";
|