@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,468 @@
|
|
|
1
|
+
import { Material } from "./Material";
|
|
2
|
+
import { Component } from "../Component";
|
|
3
|
+
import { Texture } from "./Texture";
|
|
4
|
+
import { Fresnel } from "./Fresnel";
|
|
5
|
+
|
|
6
|
+
export declare type PhongMaterialConfiguration = {
|
|
7
|
+
/** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** PhongMaterial ambient color. */
|
|
10
|
+
ambient?: number[];
|
|
11
|
+
/** PhongMaterial diffuse color. */
|
|
12
|
+
diffuse?: number[];
|
|
13
|
+
/** PhongMaterial specular color. */
|
|
14
|
+
specular?: number[];
|
|
15
|
+
/** PhongMaterial emissive color. */
|
|
16
|
+
emissive?: number[];
|
|
17
|
+
/** Scalar in range 0-1 that controls alpha, where 0 is completely transparent and 1 is completely opaque. */
|
|
18
|
+
alpha?: number;
|
|
19
|
+
/** Scalar in range 0-128 that determines the size and sharpness of specular highlights. */
|
|
20
|
+
shininess?: number;
|
|
21
|
+
/** Scalar in range 0-1 that controls how much {@link ReflectionMap} is reflected. */
|
|
22
|
+
reflectivity?: number;
|
|
23
|
+
/** Scalar that controls the width of lines. */
|
|
24
|
+
lineWidth?: number;
|
|
25
|
+
/** Scalar that controls the size of points. */
|
|
26
|
+
pointSize?: number;
|
|
27
|
+
/** A ambient map {@link Texture}, which will multiply by the diffuse property. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
28
|
+
ambientMap?: Texture;
|
|
29
|
+
/** A diffuse map {@link Texture}, which will override the effect of the diffuse property. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
30
|
+
diffuseMap?: Texture;
|
|
31
|
+
/** A specular map {@link Texture}, which will override the effect of the specular property. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
32
|
+
specularMap?: Texture;
|
|
33
|
+
/** An emissive map {@link Texture}, which will override the effect of the emissive property. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
34
|
+
emissiveMap?: Texture;
|
|
35
|
+
/** A normal map {@link Texture}. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
36
|
+
normalMap?: Texture;
|
|
37
|
+
/** An alpha map {@link Texture}, which will override the effect of the alpha property. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
38
|
+
alphaMap?: Texture;
|
|
39
|
+
/** A reflectivity control map {@link Texture}, which will override the effect of the reflectivity property. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
40
|
+
reflectivityMap?: Texture;
|
|
41
|
+
/** An occlusion map {@link Texture}. Must be within the same {@link Scene} as this PhongMaterial.*/
|
|
42
|
+
occlusionMap?: Texture;
|
|
43
|
+
/** A diffuse {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
44
|
+
diffuseFresnel?: Fresnel;
|
|
45
|
+
/** A specular {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
46
|
+
specularFresnel?: Fresnel;
|
|
47
|
+
/** An emissive {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
48
|
+
emissiveFresnel?: Fresnel;
|
|
49
|
+
/** An alpha {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
50
|
+
alphaFresnel?: Fresnel;
|
|
51
|
+
/** A reflectivity {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
|
|
52
|
+
reflectivityFresnel?: Fresnel;
|
|
53
|
+
/** The alpha blend mode - accepted values are "opaque", "blend" and "mask". See the {@link PhongMaterial#alphaMode} property for more info. */
|
|
54
|
+
alphaMode?: "opaque"| "blend" | "mask";
|
|
55
|
+
/** The alpha cutoff value. See the {@link PhongMaterial#alphaCutoff} property for more info. */
|
|
56
|
+
alphaCutoff?: number;
|
|
57
|
+
/** Whether to render geometry backfaces. */
|
|
58
|
+
backfaces?: boolean;
|
|
59
|
+
/** The winding order for geometry front faces - "cw" for clockwise, or "ccw" for counter-clockwise. */
|
|
60
|
+
frontface?: "cw" | "ccw";
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Configures the normal rendered appearance of {@link Mesh}es using the non-physically-correct Blinn-Phong shading model.
|
|
65
|
+
*/
|
|
66
|
+
export declare class PhongMaterial extends Material {
|
|
67
|
+
/**
|
|
68
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
|
|
69
|
+
* @param {PhongMaterialConfiguration} cfg The PhongMaterial configuration
|
|
70
|
+
*/
|
|
71
|
+
constructor(owner: Component, cfg?: any);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Sets the PhongMaterial's ambient color.
|
|
75
|
+
*
|
|
76
|
+
* Default value is ````[0.3, 0.3, 0.3]````.
|
|
77
|
+
*
|
|
78
|
+
* @type {Number[]}
|
|
79
|
+
*/
|
|
80
|
+
set ambient(arg: number[]);
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Gets the PhongMaterial's ambient color.
|
|
84
|
+
*
|
|
85
|
+
* Default value is ````[0.3, 0.3, 0.3]````.
|
|
86
|
+
*
|
|
87
|
+
* @type {Number[]}
|
|
88
|
+
*/
|
|
89
|
+
get ambient(): number[];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Sets the PhongMaterial's diffuse color.
|
|
93
|
+
*
|
|
94
|
+
* Multiplies by {@link PhongMaterial#diffuseMap}.
|
|
95
|
+
*
|
|
96
|
+
* Default value is ````[1.0, 1.0, 1.0]````.
|
|
97
|
+
*
|
|
98
|
+
* @type {Number[]}
|
|
99
|
+
*/
|
|
100
|
+
set diffuse(arg: number[]);
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Sets the PhongMaterial's diffuse color.
|
|
104
|
+
*
|
|
105
|
+
* Multiplies by {@link PhongMaterial#diffuseMap}.
|
|
106
|
+
*
|
|
107
|
+
* Default value is ````[1.0, 1.0, 1.0]````.
|
|
108
|
+
*
|
|
109
|
+
* @type {Number[]}
|
|
110
|
+
*/
|
|
111
|
+
get diffuse(): number[];
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Sets the PhongMaterial's specular color.
|
|
115
|
+
*
|
|
116
|
+
* Multiplies by {@link PhongMaterial#specularMap}.
|
|
117
|
+
* Default value is ````[1.0, 1.0, 1.0]````.
|
|
118
|
+
* @type {Number[]}
|
|
119
|
+
*/
|
|
120
|
+
set specular(arg: number[]);
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Gets the PhongMaterial's specular color.
|
|
124
|
+
*
|
|
125
|
+
* Multiplies by {@link PhongMaterial#specularMap}.
|
|
126
|
+
* Default value is ````[1.0, 1.0, 1.0]````.
|
|
127
|
+
* @type {Number[]}
|
|
128
|
+
*/
|
|
129
|
+
get specular(): number[];
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Sets the PhongMaterial's emissive color.
|
|
133
|
+
*
|
|
134
|
+
* Multiplies by {@link PhongMaterial#emissiveMap}.
|
|
135
|
+
*
|
|
136
|
+
* Default value is ````[0.0, 0.0, 0.0]````.
|
|
137
|
+
* @type {Number[]}
|
|
138
|
+
*/
|
|
139
|
+
set emissive(arg: number[]);
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Gets the PhongMaterial's emissive color.
|
|
143
|
+
*
|
|
144
|
+
* Multiplies by {@link PhongMaterial#emissiveMap}.
|
|
145
|
+
*
|
|
146
|
+
* Default value is ````[0.0, 0.0, 0.0]````.
|
|
147
|
+
* @type {Number[]}
|
|
148
|
+
*/
|
|
149
|
+
get emissive(): number[];
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Sets the PhongMaterial alpha.
|
|
153
|
+
*
|
|
154
|
+
* This is a factor in the range [0..1] indicating how transparent the PhongMaterial is.
|
|
155
|
+
*
|
|
156
|
+
* A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
|
|
157
|
+
*
|
|
158
|
+
* Multiplies by {@link PhongMaterial#alphaMap}.
|
|
159
|
+
*
|
|
160
|
+
* Default value is ````1.0````.
|
|
161
|
+
*
|
|
162
|
+
* @type {Number}
|
|
163
|
+
*/
|
|
164
|
+
set alpha(arg: number);
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Gets the PhongMaterial alpha.
|
|
168
|
+
*
|
|
169
|
+
* This is a factor in the range [0..1] indicating how transparent the PhongMaterial is.
|
|
170
|
+
*
|
|
171
|
+
* A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
|
|
172
|
+
*
|
|
173
|
+
* Multiplies by {@link PhongMaterial#alphaMap}.
|
|
174
|
+
*
|
|
175
|
+
* Default value is ````1.0````.
|
|
176
|
+
*
|
|
177
|
+
* @type {Number}
|
|
178
|
+
*/
|
|
179
|
+
get alpha(): number;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Sets the PhongMaterial shininess.
|
|
183
|
+
*
|
|
184
|
+
* This is a factor in range [0..128] that determines the size and sharpness of the specular highlights create by this PhongMaterial.
|
|
185
|
+
*
|
|
186
|
+
* Larger values produce smaller, sharper highlights. A value of 0.0 gives very large highlights that are almost never
|
|
187
|
+
* desirable. Try values close to 10 for a larger, fuzzier highlight and values of 100 or more for a small, sharp
|
|
188
|
+
* highlight.
|
|
189
|
+
*
|
|
190
|
+
* Default value is ```` 80.0````.
|
|
191
|
+
*
|
|
192
|
+
* @type {Number}
|
|
193
|
+
*/
|
|
194
|
+
set shininess(arg: number);
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Gets the PhongMaterial shininess.
|
|
198
|
+
*
|
|
199
|
+
* This is a factor in range [0..128] that determines the size and sharpness of the specular highlights create by this PhongMaterial.
|
|
200
|
+
*
|
|
201
|
+
* Larger values produce smaller, sharper highlights. A value of 0.0 gives very large highlights that are almost never
|
|
202
|
+
* desirable. Try values close to 10 for a larger, fuzzier highlight and values of 100 or more for a small, sharp
|
|
203
|
+
* highlight.
|
|
204
|
+
*
|
|
205
|
+
* Default value is ```` 80.0````.
|
|
206
|
+
*
|
|
207
|
+
* @type {Number}
|
|
208
|
+
*/
|
|
209
|
+
get shininess(): number;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Sets how much {@link ReflectionMap} is reflected by this PhongMaterial.
|
|
213
|
+
*
|
|
214
|
+
* This is a scalar in range ````[0-1]````. Default value is ````1.0````.
|
|
215
|
+
*
|
|
216
|
+
* The surface will be non-reflective when this is ````0````, and completely mirror-like when it is ````1.0````.
|
|
217
|
+
*
|
|
218
|
+
* Multiplies by {@link PhongMaterial#reflectivityMap}.
|
|
219
|
+
*
|
|
220
|
+
* @type {Number}
|
|
221
|
+
*/
|
|
222
|
+
set reflectivity(arg: number);
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Gets how much {@link ReflectionMap} is reflected by this PhongMaterial.
|
|
226
|
+
*
|
|
227
|
+
* This is a scalar in range ````[0-1]````. Default value is ````1.0````.
|
|
228
|
+
*
|
|
229
|
+
* The surface will be non-reflective when this is ````0````, and completely mirror-like when it is ````1.0````.
|
|
230
|
+
*
|
|
231
|
+
* Multiplies by {@link PhongMaterial#reflectivityMap}.
|
|
232
|
+
*
|
|
233
|
+
* @type {Number}
|
|
234
|
+
*/
|
|
235
|
+
get reflectivity(): number;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Sets the PhongMaterial's line width.
|
|
239
|
+
*
|
|
240
|
+
* This is not supported by WebGL implementations based on DirectX [2019].
|
|
241
|
+
*
|
|
242
|
+
* Default value is ````1.0````.
|
|
243
|
+
*
|
|
244
|
+
* @type {Number}
|
|
245
|
+
*/
|
|
246
|
+
set lineWidth(arg: number);
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Gets the PhongMaterial's line width.
|
|
250
|
+
*
|
|
251
|
+
* This is not supported by WebGL implementations based on DirectX [2019].
|
|
252
|
+
*
|
|
253
|
+
* Default value is ````1.0````.
|
|
254
|
+
*
|
|
255
|
+
* @type {Number}
|
|
256
|
+
*/
|
|
257
|
+
get lineWidth(): number;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Sets the PhongMaterial's point size.
|
|
261
|
+
*
|
|
262
|
+
* Default value is 1.0.
|
|
263
|
+
*
|
|
264
|
+
* @type {Number}
|
|
265
|
+
*/
|
|
266
|
+
set pointSize(arg: number);
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Gets the PhongMaterial's point size.
|
|
270
|
+
*
|
|
271
|
+
* Default value is 1.0.
|
|
272
|
+
*
|
|
273
|
+
* @type {Number}
|
|
274
|
+
*/
|
|
275
|
+
get pointSize(): number;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Sets the PhongMaterial's alpha rendering mode.
|
|
279
|
+
*
|
|
280
|
+
* This governs how alpha is treated. Alpha is the combined result of {@link PhongMaterial#alpha} and {@link PhongMaterial#alphaMap}.
|
|
281
|
+
*
|
|
282
|
+
* Supported values are:
|
|
283
|
+
*
|
|
284
|
+
* * "opaque" - The alpha value is ignored and the rendered output is fully opaque (default).
|
|
285
|
+
* * "mask" - The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value.
|
|
286
|
+
* * "blend" - The alpha value is used to composite the source and destination areas. The rendered output is combined with the background using the normal painting operation (i.e. the Porter and Duff over operator).
|
|
287
|
+
*
|
|
288
|
+
*@type {String}
|
|
289
|
+
*/
|
|
290
|
+
set alphaMode(arg: "opaque"| "blend" | "mask");
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Gets the PhongMaterial's alpha rendering mode.
|
|
294
|
+
*
|
|
295
|
+
*@type {String}
|
|
296
|
+
*/
|
|
297
|
+
get alphaMode(): "opaque"| "blend" | "mask";
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Sets the PhongMaterial's alpha cutoff value.
|
|
301
|
+
*
|
|
302
|
+
* This specifies the cutoff threshold when {@link PhongMaterial#alphaMode} equals "mask". If the alpha is greater than or equal to this value then it is rendered as fully
|
|
303
|
+
* opaque, otherwise, it is rendered as fully transparent. A value greater than 1.0 will render the entire material as fully transparent. This value is ignored for other modes.
|
|
304
|
+
*
|
|
305
|
+
* Alpha is the combined result of {@link PhongMaterial#alpha} and {@link PhongMaterial#alphaMap}.
|
|
306
|
+
*
|
|
307
|
+
* Default value is ````0.5````.
|
|
308
|
+
*
|
|
309
|
+
* @type {Number}
|
|
310
|
+
*/
|
|
311
|
+
set alphaCutoff(arg: number);
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Gets the PhongMaterial's alpha cutoff value.
|
|
315
|
+
*
|
|
316
|
+
* @type {Number}
|
|
317
|
+
*/
|
|
318
|
+
get alphaCutoff(): number;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Sets whether backfaces are visible on attached {@link Mesh}es.
|
|
322
|
+
*
|
|
323
|
+
* The backfaces will belong to {@link Geometry} compoents that are also attached to the {@link Mesh}es.
|
|
324
|
+
*
|
|
325
|
+
* Default is ````false````.
|
|
326
|
+
*
|
|
327
|
+
* @type {Boolean}
|
|
328
|
+
*/
|
|
329
|
+
set backfaces(arg: boolean);
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Gets whether backfaces are visible on attached {@link Mesh}es.
|
|
333
|
+
*
|
|
334
|
+
* Default is ````false````.
|
|
335
|
+
*
|
|
336
|
+
* @type {Boolean}
|
|
337
|
+
*/
|
|
338
|
+
get backfaces(): boolean;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Sets the winding direction of geometry front faces.
|
|
342
|
+
*
|
|
343
|
+
* Default is ````"ccw"````.
|
|
344
|
+
* @type {String}
|
|
345
|
+
*/
|
|
346
|
+
set frontface(arg: "cw" | "ccw");
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Gets the winding direction of front faces on attached {@link Mesh}es.
|
|
350
|
+
*
|
|
351
|
+
* Default is ````"ccw"````.
|
|
352
|
+
* @type {String}
|
|
353
|
+
*/
|
|
354
|
+
get frontface(): "cw" | "ccw";
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Gets the PhongMaterials's normal map {@link Texture}.
|
|
358
|
+
*
|
|
359
|
+
* @type {Texture}
|
|
360
|
+
*/
|
|
361
|
+
get normalMap(): Texture;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Gets the PhongMaterials's ambient {@link Texture}.
|
|
365
|
+
*
|
|
366
|
+
* Multiplies by {@link PhongMaterial#ambient}.
|
|
367
|
+
*
|
|
368
|
+
* @type {Texture}
|
|
369
|
+
*/
|
|
370
|
+
get ambientMap(): Texture;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Gets the PhongMaterials's diffuse {@link Texture}.
|
|
374
|
+
*
|
|
375
|
+
* Multiplies by {@link PhongMaterial#diffuse}.
|
|
376
|
+
*
|
|
377
|
+
* @type {Texture}
|
|
378
|
+
*/
|
|
379
|
+
get diffuseMap(): Texture;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Gets the PhongMaterials's specular {@link Texture}.
|
|
383
|
+
*
|
|
384
|
+
* Multiplies by {@link PhongMaterial#specular}.
|
|
385
|
+
*
|
|
386
|
+
* @type {Texture}
|
|
387
|
+
*/
|
|
388
|
+
get specularMap(): Texture;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Gets the PhongMaterials's emissive {@link Texture}.
|
|
392
|
+
*
|
|
393
|
+
* Multiplies by {@link PhongMaterial#emissive}.
|
|
394
|
+
*
|
|
395
|
+
* @type {Texture}
|
|
396
|
+
*/
|
|
397
|
+
get emissiveMap(): Texture;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Gets the PhongMaterials's alpha {@link Texture}.
|
|
401
|
+
*
|
|
402
|
+
* Multiplies by {@link PhongMaterial#alpha}.
|
|
403
|
+
*
|
|
404
|
+
* @type {Texture}
|
|
405
|
+
*/
|
|
406
|
+
get alphaMap(): Texture;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Gets the PhongMaterials's reflectivity {@link Texture}.
|
|
410
|
+
*
|
|
411
|
+
* Multiplies by {@link PhongMaterial#reflectivity}.
|
|
412
|
+
*
|
|
413
|
+
* @type {Texture}
|
|
414
|
+
*/
|
|
415
|
+
get reflectivityMap(): Texture;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Gets the PhongMaterials's ambient occlusion {@link Texture}.
|
|
419
|
+
*
|
|
420
|
+
* @type {Texture}
|
|
421
|
+
*/
|
|
422
|
+
get occlusionMap(): Texture;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Gets the PhongMaterials's diffuse {@link Fresnel}.
|
|
426
|
+
*
|
|
427
|
+
* Applies to {@link PhongMaterial#diffuse}.
|
|
428
|
+
*
|
|
429
|
+
* @type {Fresnel}
|
|
430
|
+
*/
|
|
431
|
+
get diffuseFresnel(): Fresnel;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Gets the PhongMaterials's specular {@link Fresnel}.
|
|
435
|
+
*
|
|
436
|
+
* Applies to {@link PhongMaterial#specular}.
|
|
437
|
+
*
|
|
438
|
+
* @type {Fresnel}
|
|
439
|
+
*/
|
|
440
|
+
get specularFresnel(): Fresnel;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Gets the PhongMaterials's emissive {@link Fresnel}.
|
|
444
|
+
*
|
|
445
|
+
* Applies to {@link PhongMaterial#emissive}.
|
|
446
|
+
*
|
|
447
|
+
* @type {Fresnel}
|
|
448
|
+
*/
|
|
449
|
+
get emissiveFresnel(): Fresnel;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Gets the PhongMaterials's alpha {@link Fresnel}.
|
|
453
|
+
*
|
|
454
|
+
* Applies to {@link PhongMaterial#alpha}.
|
|
455
|
+
*
|
|
456
|
+
* @type {Fresnel}
|
|
457
|
+
*/
|
|
458
|
+
get alphaFresnel(): Fresnel;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Gets the PhongMaterials's reflectivity {@link Fresnel}.
|
|
462
|
+
*
|
|
463
|
+
* Applies to {@link PhongMaterial#reflectivity}.
|
|
464
|
+
*
|
|
465
|
+
* @type {Fresnel}
|
|
466
|
+
*/
|
|
467
|
+
get reflectivityFresnel(): Fresnel;
|
|
468
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { Material } from "./Material";
|
|
2
|
+
import { Component } from "../Component";
|
|
3
|
+
|
|
4
|
+
export declare type PointsMaterialConfiguration = {
|
|
5
|
+
/** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Point size in pixels. */
|
|
8
|
+
pointSize?: number;
|
|
9
|
+
/** Whether points are round (````true````) or square (````false````). */
|
|
10
|
+
roundPoints?: boolean;
|
|
11
|
+
/** Whether apparent point size reduces with distance when {@link Camera#projection} is set to "perspective". */
|
|
12
|
+
perspectivePoints?: boolean;
|
|
13
|
+
/** When ````perspectivePoints```` is ````true````, this is the minimum rendered size of each point in pixels. */
|
|
14
|
+
minPerspectivePointSize?: number;
|
|
15
|
+
/** When ````perspectivePoints```` is ````true````, this is the maximum rendered size of each point in pixels. */
|
|
16
|
+
maxPerspectivePointSize?: number;
|
|
17
|
+
/** When this is true, points are only rendered when their intensity value falls within the range given in {@link } */
|
|
18
|
+
filterIntensity?: boolean;
|
|
19
|
+
/** When ````filterIntensity```` is ````true````, points with intensity below this value will not be rendered. */
|
|
20
|
+
minIntensity?: number;
|
|
21
|
+
/** When ````filterIntensity```` is ````true````, points with intensity above this value will not be rendered. */
|
|
22
|
+
maxIntensity?: number;
|
|
23
|
+
/** Selects a preset PointsMaterial configuration - see {@link PointsMaterial#presets}. */
|
|
24
|
+
preset?: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Configures the size and shape of "points" geometry primitives.
|
|
29
|
+
*/
|
|
30
|
+
export declare class PointsMaterial extends Material {
|
|
31
|
+
/**
|
|
32
|
+
* @constructor
|
|
33
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
|
|
34
|
+
* @param {PointsMaterialConfiguration} [cfg] The PointsMaterial configuration
|
|
35
|
+
*/
|
|
36
|
+
constructor(owner: Component, cfg?: PointsMaterialConfiguration);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Gets available PointsMaterial presets.
|
|
40
|
+
*
|
|
41
|
+
* @type {Object}
|
|
42
|
+
*/
|
|
43
|
+
get presets(): any;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Selects a preset ````PointsMaterial```` configuration.
|
|
47
|
+
*
|
|
48
|
+
* Default value is ````"default"````.
|
|
49
|
+
*
|
|
50
|
+
* @type {String}
|
|
51
|
+
*/
|
|
52
|
+
set preset(arg: string);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The current preset ````PointsMaterial```` configuration.
|
|
56
|
+
*
|
|
57
|
+
* Default value is ````"default"````.
|
|
58
|
+
*
|
|
59
|
+
* @type {String}
|
|
60
|
+
*/
|
|
61
|
+
get preset(): string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sets point size.
|
|
65
|
+
*
|
|
66
|
+
* Default value is ````2.0```` pixels.
|
|
67
|
+
*
|
|
68
|
+
* @type {Number}
|
|
69
|
+
*/
|
|
70
|
+
set pointSize(arg: number);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets point size.
|
|
74
|
+
*
|
|
75
|
+
* Default value is ````2.0```` pixels.
|
|
76
|
+
*
|
|
77
|
+
* @type {Number}
|
|
78
|
+
*/
|
|
79
|
+
get pointSize(): number;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Sets if points are round or square.
|
|
83
|
+
*
|
|
84
|
+
* Default is ````true```` to set points round.
|
|
85
|
+
*
|
|
86
|
+
* @type {Boolean}
|
|
87
|
+
*/
|
|
88
|
+
set roundPoints(arg: boolean);
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Gets if points are round or square.
|
|
92
|
+
*
|
|
93
|
+
* Default is ````true```` to set points round.
|
|
94
|
+
*
|
|
95
|
+
* @type {Boolean}
|
|
96
|
+
*/
|
|
97
|
+
get roundPoints(): boolean;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Sets if rendered point size reduces with distance when {@link Camera#projection} is set to ````"perspective"````.
|
|
101
|
+
*
|
|
102
|
+
* Default is ````true````.
|
|
103
|
+
*
|
|
104
|
+
* @type {Boolean}
|
|
105
|
+
*/
|
|
106
|
+
set perspectivePoints(arg: boolean);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Gets if rendered point size reduces with distance when {@link Camera#projection} is set to "perspective".
|
|
110
|
+
*
|
|
111
|
+
* Default is ````false````.
|
|
112
|
+
*
|
|
113
|
+
* @type {Boolean}
|
|
114
|
+
*/
|
|
115
|
+
get perspectivePoints(): boolean;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Sets the minimum rendered size of points when {@link PointsMaterial#perspectivePoints} is ````true````.
|
|
119
|
+
*
|
|
120
|
+
* Default value is ````1.0```` pixels.
|
|
121
|
+
*
|
|
122
|
+
* @type {Number}
|
|
123
|
+
*/
|
|
124
|
+
set minPerspectivePointSize(arg: number);
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Gets the minimum rendered size of points when {@link PointsMaterial#perspectivePoints} is ````true````.
|
|
128
|
+
*
|
|
129
|
+
* Default value is ````1.0```` pixels.
|
|
130
|
+
*
|
|
131
|
+
* @type {Number}
|
|
132
|
+
*/
|
|
133
|
+
get minPerspectivePointSize(): number;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Sets the maximum rendered size of points when {@link PointsMaterial#perspectivePoints} is ````true````.
|
|
137
|
+
*
|
|
138
|
+
* Default value is ````6```` pixels.
|
|
139
|
+
*
|
|
140
|
+
* @type {Number}
|
|
141
|
+
*/
|
|
142
|
+
set maxPerspectivePointSize(arg: number);
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Gets the maximum rendered size of points when {@link PointsMaterial#perspectivePoints} is ````true````.
|
|
146
|
+
*
|
|
147
|
+
* Default value is ````6```` pixels.
|
|
148
|
+
*
|
|
149
|
+
* @type {Number}
|
|
150
|
+
*/
|
|
151
|
+
get maxPerspectivePointSize(): number;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Sets if rendered point size reduces with distance when {@link Camera#projection} is set to ````"perspective"````.
|
|
155
|
+
*
|
|
156
|
+
* Default is ````false````.
|
|
157
|
+
*
|
|
158
|
+
* @type {Boolean}
|
|
159
|
+
*/
|
|
160
|
+
set filterIntensity(arg: boolean);
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Gets if rendered point size reduces with distance when {@link Camera#projection} is set to "perspective".
|
|
164
|
+
*
|
|
165
|
+
* Default is ````false````.
|
|
166
|
+
*
|
|
167
|
+
* @type {Boolean}
|
|
168
|
+
*/
|
|
169
|
+
get filterIntensity(): boolean;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Sets the minimum rendered size of points when {@link PointsMaterial#perspectivePoints} is ````true````.
|
|
173
|
+
*
|
|
174
|
+
* Default value is ````0````.
|
|
175
|
+
*
|
|
176
|
+
* @type {Number}
|
|
177
|
+
*/
|
|
178
|
+
set minIntensity(arg: number);
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Gets the minimum rendered size of points when {@link PointsMaterial#filterIntensity} is ````true````.
|
|
182
|
+
*
|
|
183
|
+
* Default value is ````0````.
|
|
184
|
+
*
|
|
185
|
+
* @type {Number}
|
|
186
|
+
*/
|
|
187
|
+
get minIntensity(): number;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Sets the maximum rendered size of points when {@link PointsMaterial#filterIntensity} is ````true````.
|
|
191
|
+
*
|
|
192
|
+
* Default value is ````1````.
|
|
193
|
+
*
|
|
194
|
+
* @type {Number}
|
|
195
|
+
*/
|
|
196
|
+
set maxIntensity(arg: number);
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Gets the maximum rendered size of points when {@link PointsMaterial#filterIntensity} is ````true````.
|
|
200
|
+
*
|
|
201
|
+
* Default value is ````1````.
|
|
202
|
+
*
|
|
203
|
+
* @type {Number}
|
|
204
|
+
*/
|
|
205
|
+
get maxIntensity(): number;
|
|
206
|
+
}
|