@xtctwins/tctwins-core 1.0.5 → 1.0.6
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/package.json +1 -1
- package/types/extras/ContextMenu/ContextMenu.d.ts +0 -2
- package/types/extras/PointerLens/PointerLens.d.ts +144 -0
- package/types/extras/PointerLens/index.d.ts +1 -0
- package/types/extras/index.d.ts +1 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +78 -56
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +93 -0
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +2 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +86 -54
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +71 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +16 -2
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +2 -0
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +0 -20
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +2 -0
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +22 -0
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +0 -34
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +12 -14
- package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -0
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +235 -239
- package/types/viewer/Configs.d.ts +26 -0
- package/types/viewer/Viewer.d.ts +5 -5
- package/types/viewer/metadata/MetaScene.d.ts +2 -2
- package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -0
- package/types/viewer/scene/Bitmap/index.d.ts +1 -0
- package/types/viewer/scene/LineSet/LineSet.d.ts +114 -0
- package/types/viewer/scene/LineSet/index.d.ts +1 -0
- package/types/viewer/scene/index.d.ts +3 -3
- package/types/viewer/scene/input/input.d.ts +0 -5
- package/types/viewer/scene/math/math.d.ts +4 -47
- package/types/viewer/scene/mesh/Mesh.d.ts +7 -0
- package/types/viewer/scene/scene/Scene.d.ts +1 -28
- package/types/viewer/scene/webgl/PickResult.d.ts +12 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import {Component} from '../Component.js';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export declare class Bitmap extends Component {
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new Bitmap.
|
|
8
|
+
*
|
|
9
|
+
* Registers the Bitmap in {@link Scene#bitmaps}; causes Scene to fire a "bitmapCreated" event.
|
|
10
|
+
*
|
|
11
|
+
* @constructor
|
|
12
|
+
* @param {Component} [owner] Owner component. When destroyed, the owner will destroy this ````Bitmap```` as well.
|
|
13
|
+
* @param {*} [cfg] ````Bitmap```` configuration
|
|
14
|
+
* @param {string} [cfg.id] Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted.
|
|
15
|
+
* @param {Boolean} [cfg.visible=true] Indicates whether or not this ````Bitmap```` is visible.
|
|
16
|
+
* @param {number[]} [cfg.pos=[0,0,0]] World-space position of the ````Bitmap````.
|
|
17
|
+
* @param {number[]} [cfg.normal=[0,0,1]] Normal vector indicating the direction the ````Bitmap```` faces.
|
|
18
|
+
* @param {number[]} [cfg.up=[0,1,0]] Direction of "up" for the ````Bitmap````.
|
|
19
|
+
* @param {number[]} [cfg.height=1] World-space height of the ````Bitmap````.
|
|
20
|
+
* @param {number[]} [cfg.matrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]] Modelling transform matrix for the ````Bitmap````. Overrides the ````position````, ````height```, ````rotation```` and ````normal```` parameters.
|
|
21
|
+
* @param {Boolean} [cfg.collidable=true] Indicates if the ````Bitmap```` is initially included in boundary calculations.
|
|
22
|
+
* @param {Boolean} [cfg.clippable=true] Indicates if the ````Bitmap```` is initially clippable.
|
|
23
|
+
* @param {Boolean} [cfg.pickable=true] Indicates if the ````Bitmap```` is initially pickable.
|
|
24
|
+
* @param {number} [cfg.opacity=1.0] ````Bitmap````'s initial opacity factor, multiplies by the rendered fragment alpha.
|
|
25
|
+
* @param {string} [cfg.src] URL of image. Accepted file types are PNG and JPEG.
|
|
26
|
+
* @param {HTMLImageElement} [cfg.image] An ````HTMLImageElement```` to source the image from. Overrides ````src````.
|
|
27
|
+
* @param {string} [cfg.imageData] Image data as a base64 encoded string.
|
|
28
|
+
* @param {string} [cfg.type="jpg"] Image MIME type. Accepted values are "jpg" and "png". Default is "jpg". Normally only needed with ````image```` or ````imageData````. Automatically inferred from file extension of ````src````, if the file has a recognized extension.
|
|
29
|
+
*/
|
|
30
|
+
constructor(owner: Component, cfg?: any);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Sets if this ````Bitmap```` is visible or not.
|
|
34
|
+
*
|
|
35
|
+
* Default value is ````true````.
|
|
36
|
+
*
|
|
37
|
+
* @param {Boolean} visible Set ````true```` to make this ````Bitmap```` visible.
|
|
38
|
+
*/
|
|
39
|
+
set visible(visible: boolean) ;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Gets if this ````Bitmap```` is visible or not.
|
|
43
|
+
*
|
|
44
|
+
* Default value is ````true````.
|
|
45
|
+
*
|
|
46
|
+
* @returns {Boolean} Returns ````true```` if visible.
|
|
47
|
+
*/
|
|
48
|
+
get visible(): boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Sets an ````HTMLImageElement```` to source the image from.
|
|
52
|
+
*
|
|
53
|
+
* Sets {@link Texture#src} null.
|
|
54
|
+
*
|
|
55
|
+
* You may also need to set {@link Bitmap#type}, if you want to read the image data with {@link Bitmap#imageData}.
|
|
56
|
+
*
|
|
57
|
+
* @type {HTMLImageElement}
|
|
58
|
+
*/
|
|
59
|
+
set image(image: HTMLImageElement);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Gets the ````HTMLImageElement```` the ````Bitmap````'s image is sourced from, if set.
|
|
63
|
+
*
|
|
64
|
+
* Returns null if not set.
|
|
65
|
+
*
|
|
66
|
+
* @type {HTMLImageElement}
|
|
67
|
+
*/
|
|
68
|
+
get image(): HTMLImageElement;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Sets an image file path that the ````Bitmap````'s image is sourced from.
|
|
72
|
+
*
|
|
73
|
+
* If the file extension is a recognized MIME type, also sets {@link Bitmap#type} to that MIME type.
|
|
74
|
+
*
|
|
75
|
+
* Accepted file types are PNG and JPEG.
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
*/
|
|
79
|
+
set src(src: string);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Gets the image file path that the ````Bitmap````'s image is sourced from, if set.
|
|
83
|
+
*
|
|
84
|
+
* Returns null if not set.
|
|
85
|
+
*
|
|
86
|
+
* @type {string}
|
|
87
|
+
*/
|
|
88
|
+
get src(): string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Sets an image file path that the ````Bitmap````'s image is sourced from.
|
|
92
|
+
*
|
|
93
|
+
* Accepted file types are PNG and JPEG.
|
|
94
|
+
*
|
|
95
|
+
* Sets {@link Texture#image} null.
|
|
96
|
+
*
|
|
97
|
+
* You may also need to set {@link Bitmap#type}, if you want to read the image data with {@link Bitmap#imageData}.
|
|
98
|
+
*
|
|
99
|
+
* @type {string}
|
|
100
|
+
*/
|
|
101
|
+
set imageData(imageData: string);
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Gets the image file path that the ````Bitmap````'s image is sourced from, if set.
|
|
105
|
+
*
|
|
106
|
+
* Returns null if not set.
|
|
107
|
+
*
|
|
108
|
+
* @type {string}
|
|
109
|
+
*/
|
|
110
|
+
get imageData(): string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Sets the MIME type of this Bitmap.
|
|
114
|
+
*
|
|
115
|
+
* This is used by ````Bitmap```` when getting image data with {@link Bitmap#imageData}.
|
|
116
|
+
*
|
|
117
|
+
* Supported values are "jpg" and "png",
|
|
118
|
+
*
|
|
119
|
+
* Default is "jpg".
|
|
120
|
+
*
|
|
121
|
+
* @type {string}
|
|
122
|
+
*/
|
|
123
|
+
set type(type: string);
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Gets the MIME type of this Bitmap.
|
|
127
|
+
*
|
|
128
|
+
* @type {string}
|
|
129
|
+
*/
|
|
130
|
+
get type(): string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Gets the World-space position of this ````Bitmap````.
|
|
134
|
+
*
|
|
135
|
+
* Default value is ````[0, 0, 0]````.
|
|
136
|
+
*
|
|
137
|
+
* @returns {number[]} Current position.
|
|
138
|
+
*/
|
|
139
|
+
get pos(): number[];
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Gets the direction of the normal vector that is perpendicular to this ````Bitmap````.
|
|
143
|
+
*
|
|
144
|
+
* @returns {number[]} value Current normal direction.
|
|
145
|
+
*/
|
|
146
|
+
get normal(): number[];
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Gets the "up" direction of this ````Bitmap````.
|
|
150
|
+
*
|
|
151
|
+
* @returns {number[]} value Current "up" direction.
|
|
152
|
+
*/
|
|
153
|
+
get up(): number[];
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Sets the World-space height of the ````Bitmap````.
|
|
157
|
+
*
|
|
158
|
+
* Default value is ````1.0````.
|
|
159
|
+
*
|
|
160
|
+
* @param {number} height New World-space height of the ````Bitmap````.
|
|
161
|
+
*/
|
|
162
|
+
set height(height: number);
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Gets the World-space height of the ````Bitmap````.
|
|
166
|
+
*
|
|
167
|
+
* Returns {number} World-space height of the ````Bitmap````.
|
|
168
|
+
*/
|
|
169
|
+
get height(): number;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Sets if this ````Bitmap```` is included in boundary calculations.
|
|
173
|
+
*
|
|
174
|
+
* Default is ````true````.
|
|
175
|
+
*
|
|
176
|
+
* @type {Boolean}
|
|
177
|
+
*/
|
|
178
|
+
set collidable(value: boolean) ;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Gets if this ````Bitmap```` is included in boundary calculations.
|
|
182
|
+
*
|
|
183
|
+
* Default is ````true````.
|
|
184
|
+
*
|
|
185
|
+
* @type {Boolean}
|
|
186
|
+
*/
|
|
187
|
+
get collidable(): boolean;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Sets if this ````Bitmap```` is clippable.
|
|
191
|
+
*
|
|
192
|
+
* Clipping is done by the {@link SectionPlane}s in {@link Scene#sectionPlanes}.
|
|
193
|
+
*
|
|
194
|
+
* Default is ````true````.
|
|
195
|
+
*
|
|
196
|
+
* @type {Boolean}
|
|
197
|
+
*/
|
|
198
|
+
set clippable(value: boolean);
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Gets if this ````Bitmap```` is clippable.
|
|
202
|
+
*
|
|
203
|
+
* Clipping is done by the {@link SectionPlane}s in {@link Scene#sectionPlanes}.
|
|
204
|
+
*
|
|
205
|
+
* Default is ````true````.
|
|
206
|
+
*
|
|
207
|
+
* @type {Boolean}
|
|
208
|
+
*/
|
|
209
|
+
get clippable(): boolean;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Sets if this ````Bitmap```` is pickable.
|
|
213
|
+
*
|
|
214
|
+
* Default is ````true````.
|
|
215
|
+
*
|
|
216
|
+
* @type {Boolean}
|
|
217
|
+
*/
|
|
218
|
+
set pickable(value: boolean);
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Gets if this ````Bitmap```` is pickable.
|
|
222
|
+
*
|
|
223
|
+
* Default is ````true````.
|
|
224
|
+
*
|
|
225
|
+
* @type {Boolean}
|
|
226
|
+
*/
|
|
227
|
+
get pickable(): boolean;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Sets the opacity factor for this ````Bitmap````.
|
|
231
|
+
*
|
|
232
|
+
* This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
|
|
233
|
+
*
|
|
234
|
+
* @type {number}
|
|
235
|
+
*/
|
|
236
|
+
set opacity(opacity: boolean);
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Gets this ````Bitmap````'s opacity factor.
|
|
240
|
+
*
|
|
241
|
+
* This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
|
|
242
|
+
*
|
|
243
|
+
* @type {number}
|
|
244
|
+
*/
|
|
245
|
+
get opacity(): boolean;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Destroys this ````Bitmap````.
|
|
249
|
+
*
|
|
250
|
+
* Removes the ```Bitmap```` from {@link Scene#bitmaps}; causes Scene to fire a "bitmapDestroyed" event.
|
|
251
|
+
*/
|
|
252
|
+
destroy(): void;
|
|
253
|
+
|
|
254
|
+
}
|
|
255
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Bitmap";
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import {Component} from '../Component';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A set of 3D line segments.
|
|
6
|
+
*
|
|
7
|
+
* * Creates a set of 3D line segments.
|
|
8
|
+
* * Registered by {@link LineSet#id} in {@link Scene#lineSets}.
|
|
9
|
+
* * Configure color using the {@link LinesMaterial} located at {@link Scene#linesMaterial}.
|
|
10
|
+
* * {@link BCFViewpointsPlugin} will save and load Linesets in BCF viewpoints.
|
|
11
|
+
*
|
|
12
|
+
* ## Usage
|
|
13
|
+
*
|
|
14
|
+
* In the example below, we'll load the Schependomlaan model, then use
|
|
15
|
+
* a ````LineSet```` to show a grid underneath the model.
|
|
16
|
+
*
|
|
17
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/LineSet_grid.png">](/examples/#LineSet_grid)
|
|
18
|
+
*
|
|
19
|
+
* [[Run this example](/examples/#LineSet_grid)]
|
|
20
|
+
*
|
|
21
|
+
* ````javascript
|
|
22
|
+
* import {Viewer, XKTLoaderPlugin, LineSet, buildGridGeometry} from "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
23
|
+
*
|
|
24
|
+
* const viewer = new Viewer({
|
|
25
|
+
* canvasId: "myCanvas",
|
|
26
|
+
* transparent: true
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* const camera = viewer.camera;
|
|
30
|
+
*
|
|
31
|
+
* viewer.camera.eye = [-2.56, 8.38, 8.27];
|
|
32
|
+
* viewer.camera.look = [13.44, 3.31, -14.83];
|
|
33
|
+
* viewer.camera.up = [0.10, 0.98, -0.14];
|
|
34
|
+
*
|
|
35
|
+
* const xktLoader = new XKTLoaderPlugin(viewer);
|
|
36
|
+
*
|
|
37
|
+
* const model = xktLoader.load({
|
|
38
|
+
* id: "myModel",
|
|
39
|
+
* src: "../assets/models/xkt/v8/ifc/Schependomlaan.ifc.xkt",
|
|
40
|
+
* position: [0,1,0],
|
|
41
|
+
* edges: true,
|
|
42
|
+
* saoEnabled: true
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* const geometryArrays = buildGridGeometry({
|
|
46
|
+
* size: 100,
|
|
47
|
+
* divisions: 30
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* new LineSet(viewer.scene, {
|
|
51
|
+
* positions: geometryArrays.positions,
|
|
52
|
+
* indices: geometryArrays.indices
|
|
53
|
+
* });
|
|
54
|
+
* ````
|
|
55
|
+
*/
|
|
56
|
+
export declare class LineSet extends Component {
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new LineSet.
|
|
60
|
+
*
|
|
61
|
+
* Registers the LineSet in {@link Scene#lineSets}; causes Scene to fire a "lineSetCreated" event.
|
|
62
|
+
*
|
|
63
|
+
* @constructor
|
|
64
|
+
* @param {Component} [owner] Owner component. When destroyed, the owner will destroy this ````LineSet```` as well.
|
|
65
|
+
* @param {*} [cfg] ````LineSet```` configuration
|
|
66
|
+
* @param {string} [cfg.id] Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted.
|
|
67
|
+
* @param {number[]} cfg.positions World-space 3D vertex positions.
|
|
68
|
+
* @param {number[]} [cfg.indices] Indices to connect ````positions```` into line segments. Note that these are separate line segments, not a polyline.
|
|
69
|
+
* @param {number[]} [cfg.color=[0,0,0]] The color of this ````LineSet````. This is both emissive and diffuse.
|
|
70
|
+
* @param {boolean} [cfg.visible=true] Indicates whether or not this ````LineSet```` is visible.
|
|
71
|
+
* @param {number} [cfg.opacity=1.0] ````LineSet````'s initial opacity factor.
|
|
72
|
+
*/
|
|
73
|
+
constructor(owner: Component, cfg?: any);
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Sets if this ````LineSet```` is visible.
|
|
77
|
+
*
|
|
78
|
+
* Default value is ````true````.
|
|
79
|
+
*
|
|
80
|
+
* @param {boolean} visible Set ````true```` to make this ````LineSet```` visible.
|
|
81
|
+
*/
|
|
82
|
+
set visible(visible: boolean);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Gets if this ````LineSet```` is visible.
|
|
86
|
+
*
|
|
87
|
+
* Default value is ````true````.
|
|
88
|
+
*
|
|
89
|
+
* @returns {boolean} Returns ````true```` if visible.
|
|
90
|
+
*/
|
|
91
|
+
get visible(): boolean;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Gets the 3D World-space vertex positions of the lines in this ````LineSet````.
|
|
95
|
+
*
|
|
96
|
+
* @returns {number[]}
|
|
97
|
+
*/
|
|
98
|
+
get positions(): number[];
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Gets the vertex indices of the lines in this ````LineSet````.
|
|
102
|
+
*
|
|
103
|
+
* @returns {number[]}
|
|
104
|
+
*/
|
|
105
|
+
get indices(): number[];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Destroys this ````LineSet````.
|
|
109
|
+
*
|
|
110
|
+
* Removes the ```LineSet```` from {@link Scene#lineSets}; causes Scene to fire a "lineSetDestroyed" event.
|
|
111
|
+
*/
|
|
112
|
+
destroy(): void;
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LineSet";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export * from "./Component";
|
|
2
2
|
export * from "./Entity";
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
3
|
+
export * from "./LineSet";
|
|
4
|
+
export * from "./Bitmap";
|
|
5
5
|
export * from "./camera";
|
|
6
6
|
export * from "./CameraControl/CameraControl";
|
|
7
7
|
export * from "./geometry";
|
|
8
8
|
export * from "./lights";
|
|
9
9
|
export * from "./marker";
|
|
10
10
|
export * from "./materials";
|
|
11
|
-
export * from "./math";
|
|
11
|
+
export * from "./math/math";
|
|
12
12
|
export * from "./mementos";
|
|
13
13
|
export * from "./mesh";
|
|
14
14
|
export * from "./nodes";
|
|
@@ -9,11 +9,6 @@ import { Component } from "../Component";
|
|
|
9
9
|
* * Located at {@link Scene#input}
|
|
10
10
|
*/
|
|
11
11
|
export declare class Input extends Component {
|
|
12
|
-
readonly KEY_CTRL: number;
|
|
13
|
-
|
|
14
|
-
keyDown: boolean[];
|
|
15
|
-
|
|
16
|
-
keyboardEnabled: boolean;
|
|
17
12
|
|
|
18
13
|
/**
|
|
19
14
|
* Sets whether input handlers are enabled.
|
|
@@ -30,23 +30,17 @@ declare const math: {
|
|
|
30
30
|
*/
|
|
31
31
|
vec4: (values?: number[]) => number[];
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* Returns a new, uninitialized 2D axis-aligned bounding box.
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
AABB2: (values?: any) => any;
|
|
38
|
-
|
|
39
33
|
/**
|
|
40
34
|
* Gets the center of a 2D AABB.
|
|
41
35
|
* @returns {Number[]}
|
|
42
36
|
*/
|
|
43
|
-
getAABB2Center(aabb: number[], dest?:
|
|
37
|
+
getAABB2Center(aabb: number[], dest?: (values?: number[]) => number[]): number[];
|
|
44
38
|
|
|
45
39
|
/**
|
|
46
40
|
* Gets the center of an AABB.
|
|
47
41
|
* @returns {Number[]}
|
|
48
42
|
*/
|
|
49
|
-
getAABB3Center(aabb: number[], dest?:
|
|
43
|
+
getAABB3Center(aabb: number[], dest?: (values?: number[]) => number[]): number[];
|
|
50
44
|
|
|
51
45
|
/**
|
|
52
46
|
* Gets the diagonal size of an AABB3 given as minima and maxima.
|
|
@@ -59,46 +53,9 @@ declare const math: {
|
|
|
59
53
|
normalizeVec3: (v: number[], dest?: any) => number[];
|
|
60
54
|
|
|
61
55
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
* Multiplies each element of a three-element vector by a scalar.
|
|
57
|
+
*/
|
|
64
58
|
mulVec3Scalar: (v: number[], scalar: number, dest?: number[]) => number[];
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Returns true if the first AABB contains the second AABB.
|
|
68
|
-
*/
|
|
69
|
-
containsAABB3: (aabb1: number[], aabb2: number[]) => boolean;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Returns a new, uninitialized 3D axis-aligned bounding box.
|
|
73
|
-
*/
|
|
74
|
-
AABB3: (values?: any) => any;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Collapses a 3D axis-aligned boundary, ready to expand to fit 3D points.
|
|
78
|
-
* Creates new AABB if none supplied.
|
|
79
|
-
*/
|
|
80
|
-
collapseAABB3: (aabb: number[]) => number[];
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Expands the first axis-aligned 3D boundary to enclose the second, if required.
|
|
84
|
-
*/
|
|
85
|
-
expandAABB3: (aabb1: number[], aabb2: number[]) => number[];
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Returns a new, uninitialized 4x4 matrix.
|
|
89
|
-
* @method mat4
|
|
90
|
-
* @param [values] Initial values.
|
|
91
|
-
* @static
|
|
92
|
-
* @returns {Number[]}
|
|
93
|
-
*/
|
|
94
|
-
mat4(values?: any): number[];
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Returns a 4x4 perspective projection matrix.
|
|
98
|
-
* @method frustumMat4v
|
|
99
|
-
* @static
|
|
100
|
-
*/
|
|
101
|
-
frustumMat4: (left: number, right: number, bottom: number, top: number, near: number, far: number, dest: number[] | null) => number[];
|
|
102
59
|
};
|
|
103
60
|
|
|
104
61
|
export {math};
|
|
@@ -783,4 +783,11 @@ export declare class Mesh extends Component implements Omit<Entity, 'parent'> {
|
|
|
783
783
|
* @returns {number}
|
|
784
784
|
*/
|
|
785
785
|
stateSortCompare(mesh1: Mesh, mesh2: Mesh): number;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Gets the World, View and Canvas-space positions of each vertex in a callback.
|
|
789
|
+
*
|
|
790
|
+
* @param callback
|
|
791
|
+
*/
|
|
792
|
+
getEachVertex(callback: any): void;
|
|
786
793
|
}
|
|
@@ -79,33 +79,6 @@ export declare class Scene extends Component {
|
|
|
79
79
|
*/
|
|
80
80
|
get startTime(): Date;
|
|
81
81
|
|
|
82
|
-
/**
|
|
83
|
-
* canvas
|
|
84
|
-
*/
|
|
85
|
-
get canvas(): any;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Sets whether data texture scene representation (DTX) is enabled for the {@link Scene}.
|
|
89
|
-
*
|
|
90
|
-
* Even when enabled, DTX will only work if supported.
|
|
91
|
-
*
|
|
92
|
-
* Default value is ````false````.
|
|
93
|
-
*
|
|
94
|
-
* @type {Boolean}
|
|
95
|
-
*/
|
|
96
|
-
set dtxEnabled(value: boolean);
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Gets whether data texture-based scene representation (DTX) is enabled for the {@link Scene}.
|
|
100
|
-
*
|
|
101
|
-
* Even when enabled, DTX will only apply if supported.
|
|
102
|
-
*
|
|
103
|
-
* Default value is ````false````.
|
|
104
|
-
*
|
|
105
|
-
* @type {Boolean}
|
|
106
|
-
*/
|
|
107
|
-
get dtxEnabled(): boolean;
|
|
108
|
-
|
|
109
82
|
/**
|
|
110
83
|
* Map of {@link Entity}s that represent models.
|
|
111
84
|
*
|
|
@@ -673,7 +646,7 @@ export declare class Scene extends Component {
|
|
|
673
646
|
* @param {String[]} ids Array of {@link Entity.id} values.
|
|
674
647
|
* @returns {[Number, Number, Number, Number, Number, Number]} An axis-aligned World-space bounding box, given as elements ````[xmin, ymin, zmin, xmax, ymax, zmax]````.
|
|
675
648
|
*/
|
|
676
|
-
getAABB(ids
|
|
649
|
+
getAABB(ids: string[]): number[];
|
|
677
650
|
|
|
678
651
|
/**
|
|
679
652
|
* Batch-updates {@link Entity.visible} on {@link Entity}s that represent objects.
|
|
@@ -100,4 +100,16 @@ export declare class PickResult {
|
|
|
100
100
|
* @type {Number[]}
|
|
101
101
|
*/
|
|
102
102
|
get uv(): number[];
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* True when snapped to the nearest vertex position.
|
|
106
|
+
* @type {boolean}
|
|
107
|
+
*/
|
|
108
|
+
snappedToVertex : false;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* True when snapped to the nearest edge.
|
|
112
|
+
* @type {boolean}
|
|
113
|
+
*/
|
|
114
|
+
snappedToEdge: boolean;
|
|
103
115
|
}
|