@xeokit/xeokit-sdk 2.6.73 → 2.6.75

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.
Files changed (60) hide show
  1. package/dist/xeokit-sdk.cjs.js +221 -108
  2. package/dist/xeokit-sdk.es.js +221 -108
  3. package/dist/xeokit-sdk.es5.js +311 -301
  4. package/dist/xeokit-sdk.min.cjs.js +6 -6
  5. package/dist/xeokit-sdk.min.es.js +7 -7
  6. package/dist/xeokit-sdk.min.es5.js +6 -6
  7. package/package.json +1 -1
  8. package/src/extras/ContextMenu/ContextMenu.js +25 -16
  9. package/src/plugins/FastNavPlugin/FastNavPlugin.js +10 -0
  10. package/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +24 -49
  11. package/src/plugins/TreeViewPlugin/RenderService.js +13 -4
  12. package/src/plugins/TreeViewPlugin/TreeViewPlugin.js +1 -1
  13. package/src/viewer/Viewer.js +0 -16
  14. package/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +29 -8
  15. package/src/viewer/scene/LineSet/LineSet.js +7 -2
  16. package/src/viewer/scene/skybox/Skybox.js +110 -9
  17. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +18 -4
  18. package/types/viewer/scene/CameraControl/CameraControl.d.ts +168 -0
  19. package/types/viewer/scene/LineSet/LineSet.d.ts +1 -1
  20. package/types/viewer/scene/camera/CameraPath.d.ts +86 -6
  21. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +2 -0
  22. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +14 -0
  23. package/types/viewer/scene/geometry/VBOGeometry.d.ts +2 -0
  24. package/types/viewer/scene/geometry/index.d.ts +2 -1
  25. package/types/viewer/scene/geometry/loaders/index.d.ts +2 -0
  26. package/types/viewer/scene/geometry/loaders/load3DSGeometry.d.ts +17 -0
  27. package/types/viewer/scene/geometry/loaders/loadOBJGeometry.d.ts +18 -0
  28. package/types/viewer/scene/index.d.ts +2 -0
  29. package/types/viewer/scene/input/input.d.ts +117 -0
  30. package/types/viewer/scene/lights/AmbientLight.d.ts +41 -0
  31. package/types/viewer/scene/lights/CubeTexture.d.ts +27 -0
  32. package/types/viewer/scene/lights/DirLight.d.ts +77 -0
  33. package/types/viewer/scene/lights/LightMap.d.ts +27 -0
  34. package/types/viewer/scene/lights/PointLight.d.ts +135 -0
  35. package/types/viewer/scene/lights/ReflectionMap.d.ts +26 -0
  36. package/types/viewer/scene/lights/index.d.ts +4 -1
  37. package/types/viewer/scene/marker/Marker.d.ts +5 -0
  38. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +5 -0
  39. package/types/viewer/scene/materials/Fresnel.d.ts +25 -62
  40. package/types/viewer/scene/materials/LambertMaterial.d.ts +192 -0
  41. package/types/viewer/scene/materials/MetallicMaterial.d.ts +359 -0
  42. package/types/viewer/scene/materials/PhongMaterial.d.ts +5 -0
  43. package/types/viewer/scene/materials/PointsMaterial.d.ts +5 -0
  44. package/types/viewer/scene/materials/SpecularMaterial.d.ts +342 -0
  45. package/types/viewer/scene/materials/Texture.d.ts +36 -78
  46. package/types/viewer/scene/materials/index.d.ts +2 -0
  47. package/types/viewer/scene/models/SceneModel.d.ts +134 -7
  48. package/types/viewer/scene/models/SceneModelEntity.d.ts +65 -0
  49. package/types/viewer/scene/models/SceneModelMesh.d.ts +12 -0
  50. package/types/viewer/scene/paths/CubicBezierCurve.d.ts +146 -0
  51. package/types/viewer/scene/paths/Curve.d.ts +75 -0
  52. package/types/viewer/scene/paths/Path.d.ts +119 -0
  53. package/types/viewer/scene/paths/QuadraticBezierCurve.d.ts +124 -0
  54. package/types/viewer/scene/paths/SplineCurve.d.ts +84 -0
  55. package/types/viewer/scene/paths/index.d.ts +5 -0
  56. package/types/viewer/scene/scene/Scene.d.ts +102 -0
  57. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +41 -0
  58. package/types/viewer/scene/skybox/Skybox.d.ts +59 -0
  59. package/types/viewer/scene/skybox/index.d.ts +1 -0
  60. package/types/viewer/scene/webgl/PickResult.d.ts +19 -0
@@ -0,0 +1,342 @@
1
+ import { Component } from '../Component';
2
+ import { Material } from './Material';
3
+ import { Texture } from './Texture';
4
+
5
+ export declare type SpecularMaterialConfiguration = {
6
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
7
+ id?: string;
8
+ /** RGB diffuse color of this SpecularMaterial. Multiplies by the RGB components of {@link SpecularMaterial#diffuseMap}. */
9
+ diffuse?: number[];
10
+ /** RGBA {@link Texture} containing the diffuse color of this SpecularMaterial, with optional *A* component for alpha. The RGB components multiply by {@link SpecularMaterial#diffuse}, while the *A* component, if present, multiplies by {@link SpecularMaterial#alpha}. */
11
+ diffuseMap?: Texture;
12
+ /** RGB specular color of this SpecularMaterial. Multiplies by the {@link SpecularMaterial#specularMap} and the *RGB* components of {@link SpecularMaterial#specularGlossinessMap}. */
13
+ specular?: number[];
14
+ /** RGB texture containing the specular color of this SpecularMaterial. Multiplies by the {@link SpecularMaterial#specular} property. Must be within the same {@link Scene} as this SpecularMaterial. */
15
+ specularMap?: Texture;
16
+ /** Factor in the range [0..1] indicating how glossy this SpecularMaterial is. 0 is no glossiness, 1 is full glossiness. Multiplies by the *R* component of {@link SpecularMaterial#glossinessMap} and the *A* component of {@link SpecularMaterial#specularGlossinessMap}. */
17
+ glossines?: number;
18
+ /** RGBA {@link Texture} containing this SpecularMaterial's specular color in its *RGB* component and glossiness in its *A* component. Its *RGB* components multiply by {@link SpecularMaterial#specular}, while its *A* component multiplies by {@link SpecularMaterial#glossiness}. Must be within the same {@link Scene} as this SpecularMaterial. */
19
+ specularGlossinessMap?: Texture;
20
+ /** Factor in the range 0..1 indicating how reflective this SpecularMaterial is. */
21
+ specularF0?: number;
22
+ /** RGB emissive color of this SpecularMaterial. Multiplies by the RGB components of {@link SpecularMaterial#emissiveMap}. */
23
+ emissive?: number[];
24
+ /** RGB {@link Texture} containing the emissive color of this SpecularMaterial. Multiplies by the {@link SpecularMaterial#emissive} property. Must be within the same {@link Scene} as this SpecularMaterial. */
25
+ emissiveMap?: Texture;
26
+ /** RGB ambient occlusion {@link Texture}. Within shaders, multiplies by the specular and diffuse light reflected by surfaces. Must be within the same {@link Scene} as this SpecularMaterial. */
27
+ occlusionMap?: Texture;
28
+ /** {Texture} RGB tangent-space normal {@link Texture}. Must be within the same {@link Scene} as this SpecularMaterial. */
29
+ normalMap?: Texture;
30
+ /** Factor in the range 0..1 indicating how transparent this SpecularMaterial is. A value of 0.0 indicates fully transparent, 1.0 is fully opaque. Multiplies by the *R* component of {@link SpecularMaterial#alphaMap} and the *A* component, if present, of {@link SpecularMaterial#diffuseMap}. */
31
+ alpha?: number;
32
+ /** RGB {@link Texture} containing this SpecularMaterial's alpha in its *R* component. The *R* component multiplies by the {@link SpecularMaterial#alpha} property. Must be within the same {@link Scene} as this SpecularMaterial. */
33
+ alphaMap?: Texture;
34
+ /** The alpha blend mode - accepted values are "opaque", "blend" and "mask". See the {@link SpecularMaterial#alphaMode} property for more info. */
35
+ alphaMode?: "opaque" | "blend" | "mask";
36
+ /** The alpha cutoff value. See the {@link SpecularMaterial#alphaCutoff} property for more info. */
37
+ alphaCutoff?: number;
38
+ /** Whether to render {@link Geometry} backfaces. */
39
+ backfaces?: boolean;
40
+ /** The winding order for {@link Geometry} front faces - "cw" for clockwise, or "ccw" for counter-clockwise. */
41
+ frontface?: "cw" | "ccw";
42
+ /** Scalar that controls the width of {@link Geometry} lines. */
43
+ lineWidth?: number;
44
+ /** Scalar that controls the size of {@link Geometry} points. */
45
+ pointSize?: number;
46
+ }
47
+
48
+ export declare class SpecularMaterial extends Material {
49
+ /**
50
+ *
51
+ * @constructor
52
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
53
+ * @param {SpecularMaterialConfiguration} [cfg] The SpecularMaterial configuration
54
+ */
55
+ constructor(owner: Component, cfg?: SpecularMaterialConfiguration)
56
+
57
+ /**
58
+ * Sets the RGB diffuse color of this SpecularMaterial.
59
+ *
60
+ * Multiplies by the *RGB* components of {@link SpecularMaterial#diffuseMap}.
61
+ *
62
+ * Default value is ````[1.0, 1.0, 1.0]````.
63
+ * @type {Number[]}
64
+ */
65
+ set diffuse(value: number[]);
66
+
67
+ /**
68
+ * Gets the RGB diffuse color of this SpecularMaterial.
69
+ *
70
+ * @type {Number[]}
71
+ */
72
+ get diffuse(): number[];
73
+
74
+ /**
75
+ * Gets the RGB {@link Texture} containing the diffuse color of this SpecularMaterial, with optional *A* component for alpha.
76
+ *
77
+ * The *RGB* components multipliues by the {@link SpecularMaterial#diffuse} property, while the *A* component, if present, multiplies by the {@link SpecularMaterial#alpha} property.
78
+ *
79
+ * @type {Texture}
80
+ */
81
+ get diffuseMap(): Texture;
82
+
83
+ /**
84
+ * Sets the RGB specular color of this SpecularMaterial.
85
+ *
86
+ * Multiplies by {@link SpecularMaterial#specularMap} and the *A* component of {@link SpecularMaterial#specularGlossinessMap}.
87
+ *
88
+ * Default value is ````[1.0, 1.0, 1.0]````.
89
+ *
90
+ * @type {Number[]}
91
+ */
92
+ set specular(value: number[]);
93
+
94
+ /**
95
+ * Gets the RGB specular color of this SpecularMaterial.
96
+ *
97
+ * @type {Number[]}
98
+ */
99
+ get specular(): number[];
100
+
101
+ /**
102
+ * Gets the RGB texture containing the specular color of this SpecularMaterial.
103
+ *
104
+ * Multiplies by {@link SpecularMaterial#specular}.
105
+ *
106
+ * @type {Texture}
107
+ */
108
+ get specularMap(): Texture;
109
+
110
+ /**
111
+ * Gets the RGBA texture containing this SpecularMaterial's specular color in its *RGB* components and glossiness in its *A* component.
112
+ *
113
+ * The *RGB* components multiplies {@link SpecularMaterial#specular}, while the *A* component multiplies by {@link SpecularMaterial#glossiness}.
114
+ *
115
+ * @type {Texture}
116
+ */
117
+ get specularGlossinessMap(): Texture;
118
+
119
+ /**
120
+ * Sets the Factor in the range [0..1] indicating how glossy this SpecularMaterial is.
121
+ *
122
+ * ````0```` is no glossiness, ````1```` is full glossiness.
123
+ *
124
+ * Multiplies by the *R* component of {@link SpecularMaterial#glossinessMap} and the *A* component of {@link SpecularMaterial#specularGlossinessMap}.
125
+ *
126
+ * Default value is ````1.0````.
127
+ *
128
+ * @type {Number}
129
+ */
130
+ set glossiness(value: number);
131
+
132
+ /**
133
+ * Gets the Factor in the range ````[0..1]```` indicating how glossy this SpecularMaterial is.
134
+ * @type {Number}
135
+ */
136
+ get glossiness(): number;
137
+
138
+ /**
139
+ * Gets the RGB texture containing this SpecularMaterial's glossiness in its *R* component.
140
+ *
141
+ * The *R* component multiplies by {@link SpecularMaterial#glossiness}.
142
+ ** @type {Texture}
143
+ */
144
+ get glossinessMap(): Texture;
145
+
146
+ /**
147
+ * Sets the factor in the range ````[0..1]```` indicating amount of specular Fresnel.
148
+ *
149
+ * Default value is ````0.0````.
150
+ *
151
+ * @type {Number}
152
+ */
153
+ set specularF0(value: number);
154
+
155
+ /**
156
+ * Gets the factor in the range ````[0..1]```` indicating amount of specular Fresnel.
157
+ *
158
+ * @type {Number}
159
+ */
160
+ get specularF0(): number;
161
+
162
+ /**
163
+ * Sets the RGB emissive color of this SpecularMaterial.
164
+ *
165
+ * Multiplies by {@link SpecularMaterial#emissiveMap}.
166
+
167
+ * Default value is ````[0.0, 0.0, 0.0]````.
168
+ *
169
+ * @type {Number[]}
170
+ */
171
+ set emissive(value: number[]);
172
+
173
+ /**
174
+ * Gets the RGB emissive color of this SpecularMaterial.
175
+ *
176
+ * @type {Number[]}
177
+ */
178
+ get emissive(): number[];
179
+
180
+ /**
181
+ * Gets the RGB texture containing the emissive color of this SpecularMaterial.
182
+ *
183
+ * Multiplies by {@link SpecularMaterial#emissive}.
184
+ *
185
+ * @type {Texture}
186
+ */
187
+ get emissiveMap(): Texture;
188
+
189
+ /**
190
+ * Sets the factor in the range [0..1] indicating how transparent this SpecularMaterial is.
191
+ *
192
+ * A value of ````0.0```` is fully transparent, while ````1.0```` is fully opaque.
193
+ *
194
+ * Multiplies by the *R* component of {@link SpecularMaterial#alphaMap} and the *A* component, if present, of {@link SpecularMaterial#diffuseMap}.
195
+ *
196
+ * Default value is ````1.0````.
197
+ *
198
+ * @type {Number}
199
+ */
200
+ set alpha(value: number);
201
+
202
+ /**
203
+ * Gets the factor in the range [0..1] indicating how transparent this SpecularMaterial is.
204
+ *
205
+ * @type {Number}
206
+ */
207
+ get alpha(): number;
208
+
209
+ /**
210
+ * Gets the RGB {@link Texture} with alpha in its *R* component.
211
+ *
212
+ * The *R* component multiplies by the {@link SpecularMaterial#alpha} property.
213
+ *
214
+ * @type {Texture}
215
+ */
216
+ get alphaMap(): Texture;
217
+
218
+ /**
219
+ * Gets the RGB tangent-space normal {@link Texture} attached to this SpecularMaterial.
220
+ *
221
+ * @type {Texture}
222
+ */
223
+ get normalMap(): Texture;
224
+
225
+ /**
226
+ * Gets the RGB ambient occlusion {@link Texture} attached to this SpecularMaterial.
227
+ *
228
+ * Multiplies by the specular and diffuse light reflected by surfaces.
229
+ *
230
+ * @type {Texture}
231
+ */
232
+ get occlusionMap(): Texture;
233
+
234
+ /**
235
+ * Sets the alpha rendering mode.
236
+ *
237
+ * This governs how alpha is treated. Alpha is the combined result of the {@link SpecularMaterial#alpha} and {@link SpecularMaterial#alphaMap} properties.
238
+ *
239
+ * Accepted values are:
240
+ *
241
+ * * "opaque" - The alpha value is ignored and the rendered output is fully opaque (default).
242
+ * * "mask" - The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value.
243
+ * * "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)
244
+ *
245
+ * @type {String}
246
+ */
247
+ set alphaMode(alphaMode: "opaque" | "blend" | "mask");
248
+
249
+ /**
250
+ * Sets the alpha cutoff value.
251
+ *
252
+ * Specifies the cutoff threshold when {@link SpecularMaterial#alphaMode} equals "mask". If the alpha is greater than or equal to this value then it is rendered as fully 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.
253
+ *
254
+ * Alpha is the combined result of the {@link SpecularMaterial#alpha} and {@link SpecularMaterial#alphaMap} properties.
255
+ *
256
+ * Default value is ````0.5````.
257
+ *
258
+ * @type {Number}
259
+ */
260
+ set alphaCutoff(alphaCutoff: number);
261
+
262
+ /**
263
+ * Gets the alpha cutoff value.
264
+
265
+ * @type {Number}
266
+ */
267
+ get alphaCutoff(): number;
268
+
269
+ /**
270
+ * Sets whether backfaces are visible on attached {@link Mesh}es.
271
+ *
272
+ * The backfaces will belong to {@link ReadableGeometry} compoents that are also attached to the {@link Mesh}es.
273
+ *
274
+ * Default is ````false````.
275
+ *
276
+ * @type {Boolean}
277
+ */
278
+ set backfaces(value: boolean);
279
+
280
+ /**
281
+ * Gets whether backfaces are visible on attached {@link Mesh}es.
282
+ *
283
+ * @type {Boolean}
284
+ */
285
+ get backfaces(): boolean;
286
+
287
+ /**
288
+ * Sets the winding direction of front faces of {@link Geometry} of attached {@link Mesh}es.
289
+ *
290
+ * Default value is ````"ccw"````.
291
+ *
292
+ * @type {String}
293
+ */
294
+ set frontface(value: "cw" | "ccw");
295
+
296
+ /**
297
+ * Gets the winding direction of front faces of {@link Geometry} of attached {@link Mesh}es.
298
+ *
299
+ * @type {String}
300
+ */
301
+ get frontface(): "cw" | "ccw";
302
+
303
+ /**
304
+ * Sets the SpecularMaterial's line width.
305
+ *
306
+ * This is not supported by WebGL implementations based on DirectX [2019].
307
+ *
308
+ * Default value is ````1.0````.
309
+ *
310
+ * @type {Number}
311
+ */
312
+ set lineWidth(value: number);
313
+
314
+ /**
315
+ * Gets the SpecularMaterial's line width.
316
+ *
317
+ * @type {Number}
318
+ */
319
+ get lineWidth(): number;
320
+
321
+ /**
322
+ * Sets the SpecularMaterial's point size.
323
+ *
324
+ * Default value is ````1.0````.
325
+ *
326
+ * @type {Number}
327
+ */
328
+ set pointSize(value: number);
329
+
330
+ /**
331
+ * Sets the SpecularMaterial's point size.
332
+ *
333
+ * @type {Number}
334
+ */
335
+ get pointSize(): number;
336
+
337
+ /**
338
+ * Destroys this SpecularMaterial.
339
+ */
340
+ destroy(): void;
341
+
342
+ }
@@ -1,77 +1,39 @@
1
- /**
2
- * @desc A 2D texture map.
3
- *
4
- * * Textures are attached to {@link Material}s, which are attached to {@link Mesh}es.
5
- * * To create a Texture from an image file, set {@link Texture.src} to the image file path.
6
- * * To create a Texture from an HTMLImageElement, set the Texture's {@link Texture.image} to the HTMLImageElement.
7
- *
8
- * ## Usage
9
- *
10
- * In this example we have a Mesh with a {@link PhongMaterial} which applies diffuse {@link Texture}, and a {@link buildTorusGeometry} which builds a {@link ReadableGeometry}.
11
- *
12
- * Note that xeokit will ignore {@link PhongMaterial.diffuse} and {@link PhongMaterial.specular}, since we override those
13
- * with {@link PhongMaterial.diffuseMap} and {@link PhongMaterial.specularMap}. The {@link Texture} pixel colors directly
14
- * provide the diffuse and specular components for each fragment across the {@link ReadableGeometry} surface.
15
- *
16
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#materials_Texture)]
17
- *
18
- * ```` javascript
19
- * import {Viewer, Mesh, buildTorusGeometry,
20
- * ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
21
- *
22
- * const viewer = new Viewer({
23
- * canvasId: "myCanvas"
24
- * });
25
- *
26
- * viewer.camera.eye = [0, 0, 5];
27
- * viewer.camera.look = [0, 0, 0];
28
- * viewer.camera.up = [0, 1, 0];
29
- *
30
- * new Mesh(viewer.scene, {
31
- * geometry: new ReadableGeometry(viewer.scene, buildTorusGeometry({
32
- * center: [0, 0, 0],
33
- * radius: 1.5,
34
- * tube: 0.5,
35
- * radialSegments: 32,
36
- * tubeSegments: 24,
37
- * arc: Math.PI * 2.0
38
- * }),
39
- * material: new PhongMaterial(viewer.scene, {
40
- * ambient: [0.9, 0.3, 0.9],
41
- * shininess: 30,
42
- * diffuseMap: new Texture(viewer.scene, {
43
- * src: "textures/diffuse/uvGrid2.jpg"
44
- * })
45
- * })
46
- * });
47
- *````
48
- */
1
+ import { Component } from '../Component';
2
+
3
+ export declare type TextureConfiguration = {
4
+ /** Optional ID for this Texture, unique among all components in the parent scene, generated automatically when omitted. */
5
+ id?: string;
6
+ /** Path to image file to load into this Texture. See the {@link Texture#src} property for more info. */
7
+ src?: string;
8
+ /** HTML Image object to load into this Texture. See the {@link Texture#image} property for more info. */
9
+ image?: HTMLImageElement;
10
+ /** How the texture is sampled when a texel covers less than one pixel. */
11
+ minFilter?: "LinearFilter" | "LinearMipMapNearestFilter" | "NearestMipMapNearestFilter" | "NearestMipMapLinearFilter" | "LinearMipMapLinearFilter";
12
+ /** How the texture is sampled when a texel covers more than one pixel. Supported values are {@link LinearFilter} and {@link NearestFilter}. */
13
+ magFilter?: "LinearFilter" | "NearestFilter";
14
+ /** Wrap parameter for texture coordinate *S*. Supported values are {@link ClampToEdgeWrapping}, {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. */
15
+ wrapS?: "ClampToEdgeWrapping" | "MirroredRepeatWrapping" | "RepeatWrapping";
16
+ /** Wrap parameter for texture coordinate *T*. Supported values are {@link ClampToEdgeWrapping}, {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. */
17
+ wrapT?: "ClampToEdgeWrapping" | "MirroredRepeatWrapping" | "RepeatWrapping";
18
+ /** Flips this Texture's source data along its vertical axis when ````true````. */
19
+ flipY?: boolean;
20
+ /** 2D translation vector that will be added to texture's *S* and *T* coordinates. */
21
+ translate?: number[];
22
+ /** 2D scaling vector that will be applied to texture's *S* and *T* coordinates. */
23
+ scale?: number[];
24
+ /** Rotation, in degrees, that will be applied to texture's *S* and *T* coordinates. */
25
+ rotate?: number;
26
+ /** Encoding format. Supported values are {@link LinearEncoding} and {@link sRGBEncoding}. */
27
+ encoding?: "LinearEncoding" | "sRGBEncoding";
28
+ }
49
29
  export declare class Texture extends Component {
50
30
  /**
51
31
  * @constructor
52
32
  * @param {Component} owner Owner component. When destroyed, the owner will destroy this Texture as well.
53
- * @param {*} [cfg] Configs
54
- * @param {String} [cfg.id] Optional ID for this Texture, unique among all components in the parent scene, generated automatically when omitted.
55
- * @param {String} [cfg.src=null] Path to image file to load into this Texture. See the {@link Texture.src} property for more info.
56
- * @param {HTMLImageElement} [cfg.image=null] HTML Image object to load into this Texture. See the {@link Texture.image} property for more info.
57
- * @param {String} [cfg.minFilter="linearMipmapLinear"] How the texture is sampled when a texel covers less than one pixel. See the {@link Texture.minFilter} property for more info.
58
- * @param {String} [cfg.magFilter="linear"] How the texture is sampled when a texel covers more than one pixel. See the {@link Texture.magFilter} property for more info.
59
- * @param {String} [cfg.wrapS="repeat"] Wrap parameter for texture coordinate *S*. See the {@link Texture.wrapS} property for more info.
60
- * @param {String} [cfg.wrapT="repeat"] Wrap parameter for texture coordinate *S*. See the {@link Texture.wrapT} property for more info.
61
- * @param {Boolean} [cfg.flipY=false] Flips this Texture's source data along its vertical axis when true.
62
- * @param {Number[]} [cfg.translate=[0,0]] 2D translation vector that will be added to texture's *S* and *T* coordinates.
63
- * @param {Number[]} [cfg.scale=[1,1]] 2D scaling vector that will be applied to texture's *S* and *T* coordinates.
64
- * @param {Number} [cfg.rotate=0] Rotation, in degrees, that will be applied to texture's *S* and *T* coordinates.
65
- * @param {String} [cfg.encoding="linear"] Encoding format. See the {@link Texture.encoding} property for more info.
33
+ * @param {TextureConfiguration} [cfg] Configs
66
34
  */
67
- constructor(owner: Component, cfg?: any);
68
- _state: any;
69
- _src: string;
70
- _image: any;
71
- _translate: any;
72
- _scale: any;
73
- _rotate: any;
74
- _matrixDirty: boolean;
35
+ constructor(owner: Component, cfg?: TextureConfiguration);
36
+
75
37
  /**
76
38
  * Sets the 2D translation vector added to this Texture's *S* and *T* UV coordinates.
77
39
  *
@@ -152,14 +114,7 @@ export declare class Texture extends Component {
152
114
  * @type {HTMLImageElement}
153
115
  */
154
116
  get image(): HTMLImageElement;
155
- _checkMinFilter(value: any): any;
156
- _checkMagFilter(value: any): any;
157
- _checkFilter(value: any): any;
158
- _checkWrapS(value: any): any;
159
- _checkWrapT(value: any): any;
160
- _checkFlipY(value: any): boolean;
161
- _checkEncoding(value: any): any;
162
- _webglContextRestored(): void;
117
+
163
118
  /**
164
119
  * Gets how this Texture is sampled when a texel covers less than one pixel.
165
120
  *
@@ -256,5 +211,8 @@ export declare class Texture extends Component {
256
211
  * @type {String}
257
212
  */
258
213
  get encoding(): string;
214
+ /**
215
+ * Destroys this Texture
216
+ */
217
+ destroy(): void;
259
218
  }
260
- import { Component } from "../Component.js";
@@ -1,6 +1,8 @@
1
1
  export * from "./Material";
2
2
  export * from "./EdgeMaterial";
3
3
  export * from "./EmphasisMaterial";
4
+ export * from './LambertMaterial';
4
5
  export * from "./LinesMaterial";
5
6
  export * from "./PhongMaterial";
6
7
  export * from "./PointsMaterial";
8
+ export * from './SpecularMaterial';