@xeokit/xeokit-sdk 2.2.5 → 2.3.0-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/web-ifc.wasm +0 -0
- package/dist/xeokit-sdk.cjs.js +87051 -79967
- package/dist/xeokit-sdk.es.js +87051 -79967
- 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,786 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
3
|
+
import { Geometry } from "../geometry/Geometry";
|
|
4
|
+
import { EdgeMaterial, EmphasisMaterial, Material } from "../materials";
|
|
5
|
+
|
|
6
|
+
export declare type MeshConfiguration = {
|
|
7
|
+
/** Optional ID, unique among all components in the parent scene, generated automatically when omitted. */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** ID of the corresponding object within the originating system, if any. */
|
|
10
|
+
originalSystemId?: string;
|
|
11
|
+
/** Specify ````true```` if this Mesh represents a model, in which case the Mesh will be registered by {@link Mesh.id} in {@link Scene.models} and may also have a corresponding {@link MetaModel} with matching {@link MetaModel.id}, registered by that ID in {@link MetaScene.metaModels}. */
|
|
12
|
+
isModel?: boolean;
|
|
13
|
+
/** Specify ````true```` if this Mesh represents an object, in which case the Mesh will be registered by {@link Mesh.id} in {@link Scene.objects} and may also have a corresponding {@link MetaObject} with matching {@link MetaObject.id}, registered by that ID in {@link MetaScene.metaObjects}.*/
|
|
14
|
+
isObject?: boolean;
|
|
15
|
+
/** The parent Node. */
|
|
16
|
+
parent?: Node;
|
|
17
|
+
/** World-space origin for this Mesh. When this is given, then ````matrix````, ````position```` and ````geometry```` are all assumed to be relative to this center. */
|
|
18
|
+
origin?: number[];
|
|
19
|
+
/** 3D position of this Mesh, relative to ````origin````. */
|
|
20
|
+
position?: number[];
|
|
21
|
+
/** Local scale.*/
|
|
22
|
+
scale?: number[];
|
|
23
|
+
/** Local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis. */
|
|
24
|
+
rotation?: number[];
|
|
25
|
+
/** Local modelling transform matrix. Overrides the position, scale and rotation parameters. */
|
|
26
|
+
matrix?: number[];
|
|
27
|
+
/** World-space 3D translation offset. Translates the Mesh in World space, after modelling transforms. */
|
|
28
|
+
offset?: number[];
|
|
29
|
+
/** Indicates if the Mesh is able to occlude {@link Marker}s. */
|
|
30
|
+
occluder?: boolean;
|
|
31
|
+
/** Indicates if the Mesh is initially visible. */
|
|
32
|
+
visible?: boolean;
|
|
33
|
+
/** Indicates if the Mesh is initially culled from view. */
|
|
34
|
+
culled?: boolean;
|
|
35
|
+
/** Indicates if the Mesh is initially pickable. */
|
|
36
|
+
pickable?: boolean;
|
|
37
|
+
/** Indicates if the Mesh is initially clippable. */
|
|
38
|
+
clippable?: boolean;
|
|
39
|
+
/** Indicates if the Mesh is initially included in boundary calculations. */
|
|
40
|
+
collidable?: boolean;
|
|
41
|
+
/** Indicates if the Mesh initially casts shadows. */
|
|
42
|
+
castsShadow?: boolean;
|
|
43
|
+
/** Indicates if the Mesh initially receives shadows. */
|
|
44
|
+
receivesShadow?: boolean;
|
|
45
|
+
/** Indicates if the Mesh is initially xrayed. */
|
|
46
|
+
xrayed?: boolean;
|
|
47
|
+
/** Indicates if the Mesh is initially highlighted.*/
|
|
48
|
+
highlighted?: boolean;
|
|
49
|
+
/** Indicates if the Mesh is initially selected. */
|
|
50
|
+
selected?: boolean;
|
|
51
|
+
/** Indicates if the Mesh's edges are initially emphasized. */
|
|
52
|
+
edges?: boolean;
|
|
53
|
+
/** Indicates if the Mesh should act as background, e.g., it can be used for a skybox. */
|
|
54
|
+
background?: boolean;
|
|
55
|
+
/** Mesh's initial RGB colorize color, multiplies by the rendered fragment colors. */
|
|
56
|
+
colorize?: number[];
|
|
57
|
+
/** Mesh's initial opacity factor, multiplies by the rendered fragment alpha. */
|
|
58
|
+
opacity?: number;
|
|
59
|
+
/** Mesh's billboarding behaviour. */
|
|
60
|
+
billboard?: "none" | "spherical" | "cylindrical";
|
|
61
|
+
/** {@link Geometry} to define the shape of this Mesh. Inherits {@link Scene.geometry} by default. */
|
|
62
|
+
geometry?: Geometry;
|
|
63
|
+
/** {@link Material} to define the normal rendered appearance for this Mesh. Inherits {@link Scene.material} by default. */
|
|
64
|
+
material?: Material;
|
|
65
|
+
/** {@link EmphasisMaterial} to define the xrayed appearance for this Mesh. Inherits {@link Scene.xrayMaterial} by default.*/
|
|
66
|
+
xrayMaterial?: EmphasisMaterial;
|
|
67
|
+
/** {@link EmphasisMaterial} to define the xrayed appearance for this Mesh. Inherits {@link Scene.highlightMaterial} by default. */
|
|
68
|
+
highlightMaterial?: EmphasisMaterial;
|
|
69
|
+
/** {@link EmphasisMaterial} to define the selected appearance for this Mesh. Inherits {@link Scene.selectedMaterial} by default. */
|
|
70
|
+
selectedMaterial?: EmphasisMaterial;
|
|
71
|
+
/** {@link EdgeMaterial} to define the appearance of enhanced edges for this Mesh. Inherits {@link Scene.edgeMaterial} by default. */
|
|
72
|
+
edgeMaterial?: EmphasisMaterial;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @desc An {@link Entity} that is a drawable element, with a {@link Geometry} and a {@link Material}, that can be
|
|
77
|
+
* connected into a scene graph using {@link Node}s.
|
|
78
|
+
*/
|
|
79
|
+
export declare class Mesh extends Component implements Omit<Entity, 'parent'> {
|
|
80
|
+
/**
|
|
81
|
+
* @constructor
|
|
82
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
|
|
83
|
+
* @param {MeshConfiguration} [cfg] Configs
|
|
84
|
+
*/
|
|
85
|
+
constructor(owner: Component, cfg?: MeshConfiguration);
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* ID of the corresponding object within the originating system, if any.
|
|
89
|
+
*
|
|
90
|
+
* @type {String}
|
|
91
|
+
* @abstract
|
|
92
|
+
*/
|
|
93
|
+
originalSystemId: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Sets the Mesh's local modeling transform matrix.
|
|
97
|
+
*
|
|
98
|
+
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
99
|
+
*
|
|
100
|
+
* @type {Number[]}
|
|
101
|
+
*/
|
|
102
|
+
set matrix(arg: number[]);
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Gets the Mesh's local modeling transform matrix.
|
|
106
|
+
*
|
|
107
|
+
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
108
|
+
*
|
|
109
|
+
* @type {Number[]}
|
|
110
|
+
*/
|
|
111
|
+
get matrix(): number[];
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Sets the Mesh's local scale.
|
|
115
|
+
*
|
|
116
|
+
* Default value is ````[1,1,1]````.
|
|
117
|
+
*
|
|
118
|
+
* @type {Number[]}
|
|
119
|
+
*/
|
|
120
|
+
set scale(arg: number[]);
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Gets the Mesh's local scale.
|
|
124
|
+
*
|
|
125
|
+
* Default value is ````[1,1,1]````.
|
|
126
|
+
*
|
|
127
|
+
* @type {Number[]}
|
|
128
|
+
*/
|
|
129
|
+
get scale(): number[];
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Sets the Mesh's local translation.
|
|
133
|
+
*
|
|
134
|
+
* Default value is ````[0,0,0]````.
|
|
135
|
+
*
|
|
136
|
+
* @type {Number[]}
|
|
137
|
+
*/
|
|
138
|
+
set position(arg: number[]);
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Gets the Mesh's local translation.
|
|
142
|
+
*
|
|
143
|
+
* Default value is ````[0,0,0]````.
|
|
144
|
+
*
|
|
145
|
+
* @type {Number[]}
|
|
146
|
+
*/
|
|
147
|
+
get position(): number[];
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Sets the Mesh's local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
|
|
151
|
+
*
|
|
152
|
+
* Default value is ````[0,0,0]````.
|
|
153
|
+
*
|
|
154
|
+
* @type {Number[]}
|
|
155
|
+
*/
|
|
156
|
+
set rotation(arg: number[]);
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Gets the Mesh's local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
|
|
160
|
+
*
|
|
161
|
+
* Default value is ````[0,0,0]````.
|
|
162
|
+
*
|
|
163
|
+
* @type {Number[]}
|
|
164
|
+
*/
|
|
165
|
+
get rotation(): number[];
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Sets if this Mesh is visible.
|
|
169
|
+
*
|
|
170
|
+
* Only rendered when {@link Mesh.visible} is ````true```` and {@link Mesh.culled} is ````false````.
|
|
171
|
+
*
|
|
172
|
+
* When {@link Mesh.isObject} and {@link Mesh.visible} are both ````true```` the Mesh will be
|
|
173
|
+
* registered by {@link Mesh.id} in {@link Scene.visibleObjects}.
|
|
174
|
+
*
|
|
175
|
+
* @type {Boolean}
|
|
176
|
+
*/
|
|
177
|
+
set visible(arg: boolean);
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Gets if this Mesh is visible.
|
|
181
|
+
*
|
|
182
|
+
* Only rendered when {@link Mesh.visible} is ````true```` and {@link Mesh.culled} is ````false````.
|
|
183
|
+
*
|
|
184
|
+
* When {@link Mesh.isObject} and {@link Mesh.visible} are both ````true```` the Mesh will be
|
|
185
|
+
* registered by {@link Mesh.id} in {@link Scene.visibleObjects}.
|
|
186
|
+
*
|
|
187
|
+
* @type {Boolean}
|
|
188
|
+
*/
|
|
189
|
+
get visible(): boolean;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Sets if this Mesh is culled.
|
|
193
|
+
*
|
|
194
|
+
* Only rendered when {@link Mesh.visible} is ````true```` and {@link Mesh.culled} is ````false````.
|
|
195
|
+
*
|
|
196
|
+
* @type {Boolean}
|
|
197
|
+
*/
|
|
198
|
+
set culled(arg: boolean);
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Gets if this Mesh is culled.
|
|
202
|
+
*
|
|
203
|
+
* Only rendered when {@link Mesh.visible} is ````true```` and {@link Mesh.culled} is ````false````.
|
|
204
|
+
*
|
|
205
|
+
* @type {Boolean}
|
|
206
|
+
*/
|
|
207
|
+
get culled(): boolean;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Sets if this Mesh is pickable.
|
|
211
|
+
*
|
|
212
|
+
* Picking is done via calls to {@link Scene.pick}.
|
|
213
|
+
*
|
|
214
|
+
* @type {Boolean}
|
|
215
|
+
*/
|
|
216
|
+
set pickable(arg: boolean);
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Gets if this Mesh is pickable.
|
|
220
|
+
*
|
|
221
|
+
* Picking is done via calls to {@link Scene.pick}.
|
|
222
|
+
*
|
|
223
|
+
* @type {Boolean}
|
|
224
|
+
*/
|
|
225
|
+
get pickable(): boolean;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Sets if this Mesh is clippable.
|
|
229
|
+
*
|
|
230
|
+
* Clipping is done by the {@link SectionPlane}s in {@link Scene.sectionPlanes}.
|
|
231
|
+
*
|
|
232
|
+
* @type {Boolean}
|
|
233
|
+
*/
|
|
234
|
+
set clippable(arg: boolean);
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Gets if this Mesh is clippable.
|
|
238
|
+
*
|
|
239
|
+
* Clipping is done by the {@link SectionPlane}s in {@link Scene.sectionPlanes}.
|
|
240
|
+
*
|
|
241
|
+
* @type {Boolean}
|
|
242
|
+
*/
|
|
243
|
+
get clippable(): boolean;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Sets if this Mesh included in boundary calculations.
|
|
247
|
+
*
|
|
248
|
+
* @type {Boolean}
|
|
249
|
+
*/
|
|
250
|
+
set collidable(arg: boolean);
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Gets if this Mesh included in boundary calculations.
|
|
254
|
+
*
|
|
255
|
+
* @type {Boolean}
|
|
256
|
+
*/
|
|
257
|
+
get collidable(): boolean;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Sets if this Mesh casts shadows.
|
|
261
|
+
*
|
|
262
|
+
* @type {Boolean}
|
|
263
|
+
*/
|
|
264
|
+
set castsShadow(arg: boolean);
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Gets if this Mesh casts shadows.
|
|
268
|
+
*
|
|
269
|
+
* @type {Boolean}
|
|
270
|
+
*/
|
|
271
|
+
get castsShadow(): boolean;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Sets if this Mesh can have shadows cast upon it.
|
|
275
|
+
*
|
|
276
|
+
* @type {Boolean}
|
|
277
|
+
*/
|
|
278
|
+
set receivesShadow(arg: boolean);
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Gets if this Mesh can have shadows cast upon it.
|
|
282
|
+
*
|
|
283
|
+
* @type {Boolean}
|
|
284
|
+
*/
|
|
285
|
+
get receivesShadow(): boolean;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Sets if this Mesh is xrayed.
|
|
289
|
+
*
|
|
290
|
+
* XRayed appearance is configured by the {@link EmphasisMaterial} referenced by {@link Mesh.xrayMaterial}.
|
|
291
|
+
*
|
|
292
|
+
* When {@link Mesh.isObject} and {@link Mesh.xrayed} are both ````true``` the Mesh will be
|
|
293
|
+
* registered by {@link Mesh.id} in {@link Scene.xrayedObjects}.
|
|
294
|
+
*
|
|
295
|
+
* @type {Boolean}
|
|
296
|
+
*/
|
|
297
|
+
set xrayed(arg: boolean);
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Gets if this Mesh is xrayed.
|
|
301
|
+
*
|
|
302
|
+
* XRayed appearance is configured by the {@link EmphasisMaterial} referenced by {@link Mesh.xrayMaterial}.
|
|
303
|
+
*
|
|
304
|
+
* When {@link Mesh.isObject} and {@link Mesh.xrayed} are both ````true``` the Mesh will be
|
|
305
|
+
* registered by {@link Mesh.id} in {@link Scene.xrayedObjects}.
|
|
306
|
+
*
|
|
307
|
+
* @type {Boolean}
|
|
308
|
+
*/
|
|
309
|
+
get xrayed(): boolean;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Sets if this Mesh is highlighted.
|
|
313
|
+
*
|
|
314
|
+
* Highlighted appearance is configured by the {@link EmphasisMaterial} referenced by {@link Mesh.highlightMaterial}.
|
|
315
|
+
*
|
|
316
|
+
* When {@link Mesh.isObject} and {@link Mesh.highlighted} are both ````true```` the Mesh will be
|
|
317
|
+
* registered by {@link Mesh.id} in {@link Scene.highlightedObjects}.
|
|
318
|
+
*
|
|
319
|
+
* @type {Boolean}
|
|
320
|
+
*/
|
|
321
|
+
set highlighted(arg: boolean);
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Gets if this Mesh is highlighted.
|
|
325
|
+
*
|
|
326
|
+
* Highlighted appearance is configured by the {@link EmphasisMaterial} referenced by {@link Mesh.highlightMaterial}.
|
|
327
|
+
*
|
|
328
|
+
* When {@link Mesh.isObject} and {@link Mesh.highlighted} are both ````true```` the Mesh will be
|
|
329
|
+
* registered by {@link Mesh.id} in {@link Scene.highlightedObjects}.
|
|
330
|
+
*
|
|
331
|
+
* @type {Boolean}
|
|
332
|
+
*/
|
|
333
|
+
get highlighted(): boolean;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Sets if this Mesh is selected.
|
|
337
|
+
*
|
|
338
|
+
* Selected appearance is configured by the {@link EmphasisMaterial} referenced by {@link Mesh.selectedMaterial}.
|
|
339
|
+
*
|
|
340
|
+
* When {@link Mesh.isObject} and {@link Mesh.selected} are both ````true``` the Mesh will be
|
|
341
|
+
* registered by {@link Mesh.id} in {@link Scene.selectedObjects}.
|
|
342
|
+
*
|
|
343
|
+
* @type {Boolean}
|
|
344
|
+
*/
|
|
345
|
+
set selected(arg: boolean);
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Gets if this Mesh is selected.
|
|
349
|
+
*
|
|
350
|
+
* Selected appearance is configured by the {@link EmphasisMaterial} referenced by {@link Mesh.selectedMaterial}.
|
|
351
|
+
*
|
|
352
|
+
* When {@link Mesh.isObject} and {@link Mesh.selected} are both ````true``` the Mesh will be
|
|
353
|
+
* registered by {@link Mesh.id} in {@link Scene.selectedObjects}.
|
|
354
|
+
*
|
|
355
|
+
* @type {Boolean}
|
|
356
|
+
*/
|
|
357
|
+
get selected(): boolean;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Sets if this Mesh is edge-enhanced.
|
|
361
|
+
*
|
|
362
|
+
* Edge appearance is configured by the {@link EdgeMaterial} referenced by {@link Mesh.edgeMaterial}.
|
|
363
|
+
*
|
|
364
|
+
* @type {Boolean}
|
|
365
|
+
*/
|
|
366
|
+
set edges(arg: boolean);
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Gets if this Mesh is edge-enhanced.
|
|
370
|
+
*
|
|
371
|
+
* Edge appearance is configured by the {@link EdgeMaterial} referenced by {@link Mesh.edgeMaterial}.
|
|
372
|
+
*
|
|
373
|
+
* @type {Boolean}
|
|
374
|
+
*/
|
|
375
|
+
get edges(): boolean;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Sets the Mesh's rendering order relative to other Meshes.
|
|
379
|
+
*
|
|
380
|
+
* Default value is ````0````.
|
|
381
|
+
*
|
|
382
|
+
* This can be set on multiple transparent Meshes, to make them render in a specific order for correct alpha blending.
|
|
383
|
+
*
|
|
384
|
+
* @type {Number}
|
|
385
|
+
*/
|
|
386
|
+
set layer(arg: number);
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Gets the Mesh's rendering order relative to other Meshes.
|
|
390
|
+
*
|
|
391
|
+
* Default value is ````0````.
|
|
392
|
+
*
|
|
393
|
+
* This can be set on multiple transparent Meshes, to make them render in a specific order for correct alpha blending.
|
|
394
|
+
*
|
|
395
|
+
* @type {Number}
|
|
396
|
+
*/
|
|
397
|
+
get layer(): number;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Sets the RGB colorize color for this Mesh.
|
|
401
|
+
*
|
|
402
|
+
* Multiplies by rendered fragment colors.
|
|
403
|
+
*
|
|
404
|
+
* Each element of the color is in range ````[0..1]````.
|
|
405
|
+
*
|
|
406
|
+
* @type {Number[]}
|
|
407
|
+
*/
|
|
408
|
+
set colorize(arg: number[]);
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Gets the RGB colorize color for this Mesh.
|
|
412
|
+
*
|
|
413
|
+
* Multiplies by rendered fragment colors.
|
|
414
|
+
*
|
|
415
|
+
* Each element of the color is in range ````[0..1]````.
|
|
416
|
+
*
|
|
417
|
+
* @type {Number[]}
|
|
418
|
+
*/
|
|
419
|
+
get colorize(): number[];
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Sets the opacity factor for this Mesh.
|
|
423
|
+
*
|
|
424
|
+
* This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
|
|
425
|
+
*
|
|
426
|
+
* @type {Number}
|
|
427
|
+
*/
|
|
428
|
+
set opacity(arg: number);
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Gets the opacity factor for this Mesh.
|
|
432
|
+
*
|
|
433
|
+
* This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
|
|
434
|
+
*
|
|
435
|
+
* @type {Number}
|
|
436
|
+
*/
|
|
437
|
+
get opacity(): number;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Sets the Mesh's 3D World-space offset.
|
|
441
|
+
*
|
|
442
|
+
* The offset dynamically translates the Mesh in World-space.
|
|
443
|
+
*
|
|
444
|
+
* Default value is ````[0, 0, 0]````.
|
|
445
|
+
*
|
|
446
|
+
* Provide a null or undefined value to reset to the default value.
|
|
447
|
+
*
|
|
448
|
+
* @type {Number[]}
|
|
449
|
+
*/
|
|
450
|
+
set offset(arg: number[]);
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Gets the Mesh's 3D World-space offset.
|
|
454
|
+
*
|
|
455
|
+
* Default value is ````[0,0,0]````.
|
|
456
|
+
*
|
|
457
|
+
* @type {Number[]}
|
|
458
|
+
*/
|
|
459
|
+
get offset(): number[];
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Returns true to indicate that this Component is a Mesh.
|
|
463
|
+
* @final
|
|
464
|
+
* @type {Boolean}
|
|
465
|
+
*/
|
|
466
|
+
get isMesh(): boolean;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* The parent Node.
|
|
470
|
+
*
|
|
471
|
+
* The parent Node may also be set by passing the Mesh to the parent's {@link Node.addChild} method.
|
|
472
|
+
*
|
|
473
|
+
* @type {Node}
|
|
474
|
+
*/
|
|
475
|
+
get parent(): Node;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Defines the shape of this Mesh.
|
|
479
|
+
*
|
|
480
|
+
* Set to {@link Scene.geometry} by default.
|
|
481
|
+
*
|
|
482
|
+
* @type {Geometry}
|
|
483
|
+
*/
|
|
484
|
+
get geometry(): Geometry;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Defines the appearance of this Mesh when rendering normally, ie. when not xrayed, highlighted or selected.
|
|
488
|
+
*
|
|
489
|
+
* Set to {@link Scene.material} by default.
|
|
490
|
+
*
|
|
491
|
+
* @type {Material}
|
|
492
|
+
*/
|
|
493
|
+
get material(): Material;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Sets the Mesh's local rotation quaternion.
|
|
497
|
+
*
|
|
498
|
+
* Default value is ````[0,0,0,1]````.
|
|
499
|
+
*
|
|
500
|
+
* @type {Number[]}
|
|
501
|
+
*/
|
|
502
|
+
set quaternion(arg: number[]);
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Gets the Mesh's local rotation quaternion.
|
|
506
|
+
*
|
|
507
|
+
* Default value is ````[0,0,0,1]````.
|
|
508
|
+
*
|
|
509
|
+
* @type {Number[]}
|
|
510
|
+
*/
|
|
511
|
+
get quaternion(): number[];
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Gets the Mesh's World matrix.
|
|
515
|
+
*
|
|
516
|
+
* @property worldMatrix
|
|
517
|
+
* @type {Number[]}
|
|
518
|
+
*/
|
|
519
|
+
get worldMatrix(): number[];
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Gets the Mesh's World normal matrix.
|
|
523
|
+
*
|
|
524
|
+
* @type {Number[]}
|
|
525
|
+
*/
|
|
526
|
+
get worldNormalMatrix(): number[];
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Returns true to indicate that Mesh implements {@link Entity}.
|
|
530
|
+
*
|
|
531
|
+
* @returns {Boolean}
|
|
532
|
+
*/
|
|
533
|
+
get isEntity(): boolean;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Returns ````true```` if this Mesh represents a model.
|
|
537
|
+
*
|
|
538
|
+
* When this returns ````true````, the Mesh will be registered by {@link Mesh.id} in {@link Scene.models} and
|
|
539
|
+
* may also have a corresponding {@link MetaModel}.
|
|
540
|
+
*
|
|
541
|
+
* @type {Boolean}
|
|
542
|
+
*/
|
|
543
|
+
get isModel(): boolean;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Returns ````true```` if this Mesh represents an object.
|
|
547
|
+
*
|
|
548
|
+
* When this returns ````true````, the Mesh will be registered by {@link Mesh.id} in {@link Scene.objects} and
|
|
549
|
+
* may also have a corresponding {@link MetaObject}.
|
|
550
|
+
*
|
|
551
|
+
* @type {Boolean}
|
|
552
|
+
*/
|
|
553
|
+
get isObject(): boolean;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Gets the Mesh's World-space 3D axis-aligned bounding box.
|
|
557
|
+
*
|
|
558
|
+
* Represented by a six-element Float64Array containing the min/max extents of the
|
|
559
|
+
* axis-aligned volume, ie. ````[xmin, ymin,zmin,xmax,ymax, zmax]````.
|
|
560
|
+
*
|
|
561
|
+
* @type {Number[]}
|
|
562
|
+
*/
|
|
563
|
+
get aabb(): number[];
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Sets the 3D origin of the Mesh's {@link Geometry}'s vertex positions.
|
|
567
|
+
*
|
|
568
|
+
* When this is given, then {@link Mesh.matrix}, {@link Mesh.position} and {@link Mesh.geometry} are all assumed to be relative to this center position.
|
|
569
|
+
*
|
|
570
|
+
* @type {Float64Array}
|
|
571
|
+
*/
|
|
572
|
+
set origin(arg: Float64Array);
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Gets the 3D origin of the Mesh's {@link Geometry}'s vertex positions.
|
|
576
|
+
*
|
|
577
|
+
* When this is given, then {@link Mesh.matrix}, {@link Mesh.position} and {@link Mesh.geometry} are all assumed to be relative to this center position.
|
|
578
|
+
*
|
|
579
|
+
* @type {Float64Array}
|
|
580
|
+
*/
|
|
581
|
+
get origin(): Float64Array;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Sets the World-space origin for this Mesh.
|
|
585
|
+
*
|
|
586
|
+
* Deprecated and replaced by {@link Mesh.origin}.
|
|
587
|
+
*
|
|
588
|
+
* @deprecated
|
|
589
|
+
* @type {Float64Array}
|
|
590
|
+
*/
|
|
591
|
+
set rtcCenter(arg: Float64Array);
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Gets the World-space origin for this Mesh.
|
|
595
|
+
*
|
|
596
|
+
* Deprecated and replaced by {@link Mesh.origin}.
|
|
597
|
+
*
|
|
598
|
+
* @deprecated
|
|
599
|
+
* @type {Float64Array}
|
|
600
|
+
*/
|
|
601
|
+
get rtcCenter(): Float64Array;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* The approximate number of triangles in this Mesh.
|
|
605
|
+
*
|
|
606
|
+
* @type {Number}
|
|
607
|
+
*/
|
|
608
|
+
get numTriangles(): number;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Gets if this Mesh can have Scalable Ambient Obscurance (SAO) applied to it.
|
|
612
|
+
*
|
|
613
|
+
* SAO is configured by {@link SAO}.
|
|
614
|
+
*
|
|
615
|
+
* @type {Boolean}
|
|
616
|
+
* @abstract
|
|
617
|
+
*/
|
|
618
|
+
get saoEnabled(): boolean;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Gets if this Mesh is transparent.
|
|
622
|
+
* @returns {Boolean}
|
|
623
|
+
*/
|
|
624
|
+
get transparent(): boolean;
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Gets if the Node's position is stationary.
|
|
628
|
+
*
|
|
629
|
+
* When true, will disable the effect of {@link Camera} translations for this Mesh, while still allowing it to rotate. This is useful for skyboxes.
|
|
630
|
+
*
|
|
631
|
+
* @type {Boolean}
|
|
632
|
+
*/
|
|
633
|
+
get stationary(): boolean;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Gets the Node's billboarding behaviour.
|
|
637
|
+
*
|
|
638
|
+
* Options are:
|
|
639
|
+
* * ````"none"```` - (default) - No billboarding.
|
|
640
|
+
* * ````"spherical"```` - Mesh is billboarded to face the viewpoint, rotating both vertically and horizontally.
|
|
641
|
+
* * ````"cylindrical"```` - Mesh is billboarded to face the viewpoint, rotating only about its vertically axis. Use this mode for things like trees on a landscape.
|
|
642
|
+
* @type {String}
|
|
643
|
+
*/
|
|
644
|
+
get billboard(): string;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Returns true to indicate that Mesh implements {@link Drawable}.
|
|
648
|
+
* @final
|
|
649
|
+
* @type {Boolean}
|
|
650
|
+
*/
|
|
651
|
+
get isDrawable(): boolean;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Property with final value ````true```` to indicate that xeokit should render this Mesh in sorted order, relative to other Meshes.
|
|
655
|
+
*
|
|
656
|
+
* The sort order is determined by {@link Mesh.stateSortCompare}.
|
|
657
|
+
*
|
|
658
|
+
* Sorting is essential for rendering performance, so that xeokit is able to avoid applying runs of the same state changes to the GPU, ie. can collapse them.
|
|
659
|
+
*
|
|
660
|
+
* @type {Boolean}
|
|
661
|
+
*/
|
|
662
|
+
get isStateSortable(): boolean;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Defines the appearance of this Mesh when xrayed.
|
|
666
|
+
*
|
|
667
|
+
* Mesh is xrayed when {@link Mesh.xrayed} is ````true````.
|
|
668
|
+
*
|
|
669
|
+
* Set to {@link Scene.xrayMaterial} by default.
|
|
670
|
+
*
|
|
671
|
+
* @type {EmphasisMaterial}
|
|
672
|
+
*/
|
|
673
|
+
get xrayMaterial(): EmphasisMaterial;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Defines the appearance of this Mesh when highlighted.
|
|
677
|
+
*
|
|
678
|
+
* Mesh is xrayed when {@link Mesh.highlighted} is ````true````.
|
|
679
|
+
*
|
|
680
|
+
* Set to {@link Scene.highlightMaterial} by default.
|
|
681
|
+
*
|
|
682
|
+
* @type {EmphasisMaterial}
|
|
683
|
+
*/
|
|
684
|
+
get highlightMaterial(): EmphasisMaterial;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Defines the appearance of this Mesh when selected.
|
|
688
|
+
*
|
|
689
|
+
* Mesh is xrayed when {@link Mesh.selected} is ````true````.
|
|
690
|
+
*
|
|
691
|
+
* Set to {@link Scene.selectedMaterial} by default.
|
|
692
|
+
*
|
|
693
|
+
* @type {EmphasisMaterial}
|
|
694
|
+
*/
|
|
695
|
+
get selectedMaterial(): EmphasisMaterial;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Defines the appearance of this Mesh when edges are enhanced.
|
|
699
|
+
*
|
|
700
|
+
* Mesh is xrayed when {@link Mesh.edges} is ````true````.
|
|
701
|
+
*
|
|
702
|
+
* Set to {@link Scene.edgeMaterial} by default.
|
|
703
|
+
*
|
|
704
|
+
* @type {EdgeMaterial}
|
|
705
|
+
*/
|
|
706
|
+
get edgeMaterial(): EdgeMaterial;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Rotates the Mesh about the given local axis by the given increment.
|
|
710
|
+
*
|
|
711
|
+
* @param {Number[]} axis Local axis about which to rotate.
|
|
712
|
+
* @param {Number} angle Angle increment in degrees.
|
|
713
|
+
*/
|
|
714
|
+
rotate(axis: number[], angle: number): Mesh;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Rotates the Mesh about the given World-space axis by the given increment.
|
|
718
|
+
*
|
|
719
|
+
* @param {Number[]} axis Local axis about which to rotate.
|
|
720
|
+
* @param {Number} angle Angle increment in degrees.
|
|
721
|
+
*/
|
|
722
|
+
rotateOnWorldAxis(axis: number[], angle: number): Mesh;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Rotates the Mesh about the local X-axis by the given increment.
|
|
726
|
+
*
|
|
727
|
+
* @param {Number} angle Angle increment in degrees.
|
|
728
|
+
*/
|
|
729
|
+
rotateX(angle: number): Mesh;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Rotates the Mesh about the local Y-axis by the given increment.
|
|
733
|
+
*
|
|
734
|
+
* @param {Number} angle Angle increment in degrees.
|
|
735
|
+
*/
|
|
736
|
+
rotateY(angle: number): Mesh;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Rotates the Mesh about the local Z-axis by the given increment.
|
|
740
|
+
*
|
|
741
|
+
* @param {Number} angle Angle increment in degrees.
|
|
742
|
+
*/
|
|
743
|
+
rotateZ(angle: number): Mesh;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Translates the Mesh along local space vector by the given increment.
|
|
747
|
+
*
|
|
748
|
+
* @param {Number[]} axis Normalized local space 3D vector along which to translate.
|
|
749
|
+
* @param {Number} distance Distance to translate along the vector.
|
|
750
|
+
*/
|
|
751
|
+
translate(axis: number[], distance: number): Mesh;
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Translates the Mesh along the local X-axis by the given increment.
|
|
755
|
+
*
|
|
756
|
+
* @param {Number} distance Distance to translate along the X-axis.
|
|
757
|
+
*/
|
|
758
|
+
translateX(distance: number): Mesh;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Translates the Mesh along the local Y-axis by the given increment.
|
|
762
|
+
*
|
|
763
|
+
* @param {Number} distance Distance to translate along the Y-axis.
|
|
764
|
+
*/
|
|
765
|
+
translateY(distance: number): Mesh;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Translates the Mesh along the local Z-axis by the given increment.
|
|
769
|
+
*
|
|
770
|
+
* @param {Number} distance Distance to translate along the Z-axis.
|
|
771
|
+
*/
|
|
772
|
+
translateZ(distance: number): Mesh;
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Comparison function used by the renderer to determine the order in which xeokit should render the Mesh, relative to to other Meshes.
|
|
776
|
+
*
|
|
777
|
+
* xeokit requires this method because Mesh implements {@link Drawable}.
|
|
778
|
+
*
|
|
779
|
+
* Sorting is essential for rendering performance, so that xeokit is able to avoid needlessly applying runs of the same rendering state changes to the GPU, ie. can collapse them.
|
|
780
|
+
*
|
|
781
|
+
* @param {Mesh} mesh1
|
|
782
|
+
* @param {Mesh} mesh2
|
|
783
|
+
* @returns {number}
|
|
784
|
+
*/
|
|
785
|
+
stateSortCompare(mesh1: Mesh, mesh2: Mesh): number;
|
|
786
|
+
}
|