@babylonjs/viewer 5.0.0 → 5.0.3
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/configuration/configuration.d.ts +107 -107
- package/configuration/configuration.js +15 -15
- package/configuration/configurationCompatibility.d.ts +8 -8
- package/configuration/configurationCompatibility.js +65 -65
- package/configuration/configurationContainer.d.ts +10 -10
- package/configuration/configurationContainer.js +9 -9
- package/configuration/globals.d.ts +6 -6
- package/configuration/globals.js +17 -17
- package/configuration/index.d.ts +2 -2
- package/configuration/index.js +3 -3
- package/configuration/interfaces/cameraConfiguration.d.ts +31 -31
- package/configuration/interfaces/cameraConfiguration.js +1 -1
- package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -81
- package/configuration/interfaces/colorGradingConfiguration.js +1 -1
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -20
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +1 -1
- package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -22
- package/configuration/interfaces/environmentMapConfiguration.js +1 -1
- package/configuration/interfaces/groundConfiguration.d.ts +24 -24
- package/configuration/interfaces/groundConfiguration.js +1 -1
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +43 -43
- package/configuration/interfaces/imageProcessingConfiguration.js +1 -1
- package/configuration/interfaces/index.d.ts +15 -15
- package/configuration/interfaces/index.js +15 -15
- package/configuration/interfaces/lightConfiguration.d.ts +60 -60
- package/configuration/interfaces/lightConfiguration.js +1 -1
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -26
- package/configuration/interfaces/modelAnimationConfiguration.js +1 -1
- package/configuration/interfaces/modelConfiguration.d.ts +65 -65
- package/configuration/interfaces/modelConfiguration.js +1 -1
- package/configuration/interfaces/observersConfiguration.d.ts +5 -5
- package/configuration/interfaces/observersConfiguration.js +1 -1
- package/configuration/interfaces/sceneConfiguration.d.ts +48 -48
- package/configuration/interfaces/sceneConfiguration.js +1 -1
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -23
- package/configuration/interfaces/sceneOptimizerConfiguration.js +1 -1
- package/configuration/interfaces/skyboxConfiguration.d.ts +21 -21
- package/configuration/interfaces/skyboxConfiguration.js +1 -1
- package/configuration/interfaces/templateConfiguration.d.ts +67 -67
- package/configuration/interfaces/templateConfiguration.js +1 -1
- package/configuration/interfaces/vrConfiguration.d.ts +16 -16
- package/configuration/interfaces/vrConfiguration.js +1 -1
- package/configuration/loader.d.ts +4 -4
- package/configuration/loader.js +16 -16
- package/configuration/mappers.d.ts +42 -42
- package/configuration/mappers.js +190 -190
- package/configuration/renderOnlyLoader.d.ts +33 -33
- package/configuration/renderOnlyLoader.js +161 -161
- package/configuration/types/default.d.ts +6 -6
- package/configuration/types/default.js +120 -120
- package/configuration/types/environmentMap.d.ts +5 -5
- package/configuration/types/environmentMap.js +13 -13
- package/configuration/types/extended.d.ts +6 -6
- package/configuration/types/extended.js +316 -316
- package/configuration/types/index.d.ts +13 -13
- package/configuration/types/index.js +49 -49
- package/configuration/types/minimal.d.ts +6 -6
- package/configuration/types/minimal.js +42 -42
- package/configuration/types/renderOnlyDefault.d.ts +30 -30
- package/configuration/types/renderOnlyDefault.js +30 -30
- package/configuration/types/shadowLight.d.ts +9 -9
- package/configuration/types/shadowLight.js +63 -63
- package/helper/index.d.ts +26 -26
- package/helper/index.js +62 -62
- package/index.d.ts +30 -30
- package/index.js +45 -45
- package/initializer.d.ts +11 -11
- package/initializer.js +34 -34
- package/interfaces.d.ts +5 -5
- package/interfaces.js +1 -1
- package/labs/environmentSerializer.d.ts +126 -126
- package/labs/environmentSerializer.js +190 -190
- package/labs/texture.d.ts +183 -183
- package/labs/texture.js +300 -300
- package/labs/viewerLabs.d.ts +51 -51
- package/labs/viewerLabs.js +133 -133
- package/loader/modelLoader.d.ts +47 -47
- package/loader/modelLoader.js +189 -189
- package/loader/plugins/applyMaterialConfig.d.ts +12 -12
- package/loader/plugins/applyMaterialConfig.js +15 -15
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -9
- package/loader/plugins/extendedMaterialLoaderPlugin.js +15 -15
- package/loader/plugins/index.d.ts +18 -18
- package/loader/plugins/index.js +42 -42
- package/loader/plugins/loaderPlugin.d.ts +24 -24
- package/loader/plugins/loaderPlugin.js +1 -1
- package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -12
- package/loader/plugins/msftLodLoaderPlugin.js +20 -20
- package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -12
- package/loader/plugins/telemetryLoaderPlugin.js +35 -35
- package/managers/observablesManager.d.ts +66 -66
- package/managers/observablesManager.js +34 -34
- package/managers/sceneManager.d.ts +243 -243
- package/managers/sceneManager.js +1388 -1388
- package/managers/telemetryManager.d.ts +57 -57
- package/managers/telemetryManager.js +113 -113
- package/model/modelAnimation.d.ts +215 -215
- package/model/modelAnimation.js +232 -232
- package/model/viewerModel.d.ts +228 -228
- package/model/viewerModel.js +669 -669
- package/optimizer/custom/extended.d.ts +11 -11
- package/optimizer/custom/extended.js +98 -98
- package/optimizer/custom/index.d.ts +8 -8
- package/optimizer/custom/index.js +24 -24
- package/package.json +5 -5
- package/renderOnlyIndex.d.ts +11 -11
- package/renderOnlyIndex.js +17 -17
- package/templating/eventManager.d.ts +35 -35
- package/templating/eventManager.js +65 -65
- package/templating/plugins/hdButtonPlugin.d.ts +9 -9
- package/templating/plugins/hdButtonPlugin.js +21 -21
- package/templating/plugins/printButton.d.ts +9 -9
- package/templating/plugins/printButton.js +40 -40
- package/templating/templateManager.d.ts +190 -190
- package/templating/templateManager.js +553 -553
- package/templating/viewerTemplatePlugin.d.ts +21 -21
- package/templating/viewerTemplatePlugin.js +68 -68
- package/viewer/defaultViewer.d.ts +122 -122
- package/viewer/defaultViewer.js +665 -665
- package/viewer/renderOnlyViewer.d.ts +8 -8
- package/viewer/renderOnlyViewer.js +43 -43
- package/viewer/viewer.d.ts +254 -254
- package/viewer/viewer.js +777 -777
- package/viewer/viewerManager.d.ts +55 -55
- package/viewer/viewerManager.js +87 -87
- package/viewer/viewerWithTemplate.d.ts +9 -9
- package/viewer/viewerWithTemplate.js +19 -19
package/labs/texture.d.ts
CHANGED
|
@@ -1,183 +1,183 @@
|
|
|
1
|
-
import type { Scene } from "@babylonjs/core/scene.js";
|
|
2
|
-
import { CubeTexture } from "@babylonjs/core/Materials/Textures/cubeTexture.js";
|
|
3
|
-
import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
|
4
|
-
/**
|
|
5
|
-
* WebGL Pixel Formats
|
|
6
|
-
*/
|
|
7
|
-
export declare const enum PixelFormat {
|
|
8
|
-
DEPTH_COMPONENT = 6402,
|
|
9
|
-
ALPHA = 6406,
|
|
10
|
-
RGB = 6407,
|
|
11
|
-
RGBA = 6408,
|
|
12
|
-
LUMINANCE = 6409,
|
|
13
|
-
LUMINANCE_ALPHA = 6410
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* WebGL Pixel Types
|
|
17
|
-
*/
|
|
18
|
-
export declare const enum PixelType {
|
|
19
|
-
UNSIGNED_BYTE = 5121,
|
|
20
|
-
UNSIGNED_SHORT_4_4_4_4 = 32819,
|
|
21
|
-
UNSIGNED_SHORT_5_5_5_1 = 32820,
|
|
22
|
-
UNSIGNED_SHORT_5_6_5 = 33635
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* WebGL Texture Magnification Filter
|
|
26
|
-
*/
|
|
27
|
-
export declare const enum TextureMagFilter {
|
|
28
|
-
NEAREST = 9728,
|
|
29
|
-
LINEAR = 9729
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* WebGL Texture Minification Filter
|
|
33
|
-
*/
|
|
34
|
-
export declare const enum TextureMinFilter {
|
|
35
|
-
NEAREST = 9728,
|
|
36
|
-
LINEAR = 9729,
|
|
37
|
-
NEAREST_MIPMAP_NEAREST = 9984,
|
|
38
|
-
LINEAR_MIPMAP_NEAREST = 9985,
|
|
39
|
-
NEAREST_MIPMAP_LINEAR = 9986,
|
|
40
|
-
LINEAR_MIPMAP_LINEAR = 9987
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* WebGL Texture Wrap Modes
|
|
44
|
-
*/
|
|
45
|
-
export declare const enum TextureWrapMode {
|
|
46
|
-
REPEAT = 10497,
|
|
47
|
-
CLAMP_TO_EDGE = 33071,
|
|
48
|
-
MIRRORED_REPEAT = 33648
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Raw texture data and descriptor sufficient for WebGL texture upload
|
|
52
|
-
*/
|
|
53
|
-
export interface TextureData {
|
|
54
|
-
/**
|
|
55
|
-
* Width of image
|
|
56
|
-
*/
|
|
57
|
-
width: number;
|
|
58
|
-
/**
|
|
59
|
-
* Height of image
|
|
60
|
-
*/
|
|
61
|
-
height: number;
|
|
62
|
-
/**
|
|
63
|
-
* Format of pixels in data
|
|
64
|
-
*/
|
|
65
|
-
format: PixelFormat;
|
|
66
|
-
/**
|
|
67
|
-
* Row byte alignment of pixels in data
|
|
68
|
-
*/
|
|
69
|
-
alignment: number;
|
|
70
|
-
/**
|
|
71
|
-
* Pixel data
|
|
72
|
-
*/
|
|
73
|
-
data: ArrayBufferView;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Wraps sampling parameters for a WebGL texture
|
|
77
|
-
*/
|
|
78
|
-
export interface SamplingParameters {
|
|
79
|
-
/**
|
|
80
|
-
* Magnification mode when upsampling from a WebGL texture
|
|
81
|
-
*/
|
|
82
|
-
magFilter?: TextureMagFilter;
|
|
83
|
-
/**
|
|
84
|
-
* Minification mode when upsampling from a WebGL texture
|
|
85
|
-
*/
|
|
86
|
-
minFilter?: TextureMinFilter;
|
|
87
|
-
/**
|
|
88
|
-
* X axis wrapping mode when sampling out of a WebGL texture bounds
|
|
89
|
-
*/
|
|
90
|
-
wrapS?: TextureWrapMode;
|
|
91
|
-
/**
|
|
92
|
-
* Y axis wrapping mode when sampling out of a WebGL texture bounds
|
|
93
|
-
*/
|
|
94
|
-
wrapT?: TextureWrapMode;
|
|
95
|
-
/**
|
|
96
|
-
* Anisotropic filtering samples
|
|
97
|
-
*/
|
|
98
|
-
maxAnisotropy?: number;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Represents a valid WebGL texture source for use in texImage2D
|
|
102
|
-
*/
|
|
103
|
-
export declare type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
|
|
104
|
-
/**
|
|
105
|
-
* A generic set of texture mipmaps (where index 0 has the largest dimension)
|
|
106
|
-
*/
|
|
107
|
-
export declare type Mipmaps<T> = Array<T>;
|
|
108
|
-
/**
|
|
109
|
-
* A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]
|
|
110
|
-
*/
|
|
111
|
-
export declare type Faces<T> = Array<T>;
|
|
112
|
-
/**
|
|
113
|
-
* A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)
|
|
114
|
-
*/
|
|
115
|
-
export declare type Mipmaps2D = Mipmaps<TextureSource>;
|
|
116
|
-
/**
|
|
117
|
-
* A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)
|
|
118
|
-
*/
|
|
119
|
-
export declare type MipmapsCube = Mipmaps<Faces<TextureSource>>;
|
|
120
|
-
/**
|
|
121
|
-
* A minimal WebGL cubemap descriptor
|
|
122
|
-
*/
|
|
123
|
-
export declare class TextureCube {
|
|
124
|
-
internalFormat: PixelFormat;
|
|
125
|
-
type: PixelType;
|
|
126
|
-
source: MipmapsCube;
|
|
127
|
-
/**
|
|
128
|
-
* Returns the width of a face of the texture or 0 if not available
|
|
129
|
-
*/
|
|
130
|
-
get Width(): number;
|
|
131
|
-
/**
|
|
132
|
-
* Returns the height of a face of the texture or 0 if not available
|
|
133
|
-
*/
|
|
134
|
-
get Height(): number;
|
|
135
|
-
/**
|
|
136
|
-
* constructor
|
|
137
|
-
* @param internalFormat WebGL pixel format for the texture on the GPU
|
|
138
|
-
* @param type WebGL pixel type of the supplied data and texture on the GPU
|
|
139
|
-
* @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object
|
|
140
|
-
*/
|
|
141
|
-
constructor(internalFormat: PixelFormat, type: PixelType, source?: MipmapsCube);
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* A static class providing methods to aid working with Bablyon textures.
|
|
145
|
-
*/
|
|
146
|
-
export declare class TextureUtils {
|
|
147
|
-
/**
|
|
148
|
-
* A prefix used when storing a babylon texture object reference on a Spectre texture object
|
|
149
|
-
*/
|
|
150
|
-
static BabylonTextureKeyPrefix: string;
|
|
151
|
-
/**
|
|
152
|
-
* Controls anisotropic filtering for deserialized textures.
|
|
153
|
-
*/
|
|
154
|
-
static MaxAnisotropy: number;
|
|
155
|
-
/**
|
|
156
|
-
* Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
|
|
157
|
-
* If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
|
|
158
|
-
* The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
|
|
159
|
-
* @param scene A Babylon Scene instance
|
|
160
|
-
* @param textureCube A Spectre TextureCube object
|
|
161
|
-
* @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
|
|
162
|
-
* @param environment Specifies that the texture will be used as an environment
|
|
163
|
-
* @param singleLod Specifies that the texture will be a singleLod (for environment)
|
|
164
|
-
* @return Babylon cube texture
|
|
165
|
-
*/
|
|
166
|
-
static GetBabylonCubeTexture(scene: Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment?: boolean, singleLod?: boolean): CubeTexture;
|
|
167
|
-
/**
|
|
168
|
-
* Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
|
|
169
|
-
* @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
|
|
170
|
-
* @param parameters Spectre SamplingParameters to apply
|
|
171
|
-
*/
|
|
172
|
-
static ApplySamplingParameters(babylonTexture: BaseTexture, parameters: SamplingParameters): void;
|
|
173
|
-
private static _EnvironmentSampling;
|
|
174
|
-
private static _EnvironmentSingleMipSampling;
|
|
175
|
-
/**
|
|
176
|
-
* Environment preprocessing dedicated value (Internal Use or Advanced only).
|
|
177
|
-
*/
|
|
178
|
-
static EnvironmentLODScale: number;
|
|
179
|
-
/**
|
|
180
|
-
* Environment preprocessing dedicated value (Internal Use or Advanced only)..
|
|
181
|
-
*/
|
|
182
|
-
static EnvironmentLODOffset: number;
|
|
183
|
-
}
|
|
1
|
+
import type { Scene } from "@babylonjs/core/scene.js";
|
|
2
|
+
import { CubeTexture } from "@babylonjs/core/Materials/Textures/cubeTexture.js";
|
|
3
|
+
import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
|
4
|
+
/**
|
|
5
|
+
* WebGL Pixel Formats
|
|
6
|
+
*/
|
|
7
|
+
export declare const enum PixelFormat {
|
|
8
|
+
DEPTH_COMPONENT = 6402,
|
|
9
|
+
ALPHA = 6406,
|
|
10
|
+
RGB = 6407,
|
|
11
|
+
RGBA = 6408,
|
|
12
|
+
LUMINANCE = 6409,
|
|
13
|
+
LUMINANCE_ALPHA = 6410
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* WebGL Pixel Types
|
|
17
|
+
*/
|
|
18
|
+
export declare const enum PixelType {
|
|
19
|
+
UNSIGNED_BYTE = 5121,
|
|
20
|
+
UNSIGNED_SHORT_4_4_4_4 = 32819,
|
|
21
|
+
UNSIGNED_SHORT_5_5_5_1 = 32820,
|
|
22
|
+
UNSIGNED_SHORT_5_6_5 = 33635
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* WebGL Texture Magnification Filter
|
|
26
|
+
*/
|
|
27
|
+
export declare const enum TextureMagFilter {
|
|
28
|
+
NEAREST = 9728,
|
|
29
|
+
LINEAR = 9729
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* WebGL Texture Minification Filter
|
|
33
|
+
*/
|
|
34
|
+
export declare const enum TextureMinFilter {
|
|
35
|
+
NEAREST = 9728,
|
|
36
|
+
LINEAR = 9729,
|
|
37
|
+
NEAREST_MIPMAP_NEAREST = 9984,
|
|
38
|
+
LINEAR_MIPMAP_NEAREST = 9985,
|
|
39
|
+
NEAREST_MIPMAP_LINEAR = 9986,
|
|
40
|
+
LINEAR_MIPMAP_LINEAR = 9987
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* WebGL Texture Wrap Modes
|
|
44
|
+
*/
|
|
45
|
+
export declare const enum TextureWrapMode {
|
|
46
|
+
REPEAT = 10497,
|
|
47
|
+
CLAMP_TO_EDGE = 33071,
|
|
48
|
+
MIRRORED_REPEAT = 33648
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Raw texture data and descriptor sufficient for WebGL texture upload
|
|
52
|
+
*/
|
|
53
|
+
export interface TextureData {
|
|
54
|
+
/**
|
|
55
|
+
* Width of image
|
|
56
|
+
*/
|
|
57
|
+
width: number;
|
|
58
|
+
/**
|
|
59
|
+
* Height of image
|
|
60
|
+
*/
|
|
61
|
+
height: number;
|
|
62
|
+
/**
|
|
63
|
+
* Format of pixels in data
|
|
64
|
+
*/
|
|
65
|
+
format: PixelFormat;
|
|
66
|
+
/**
|
|
67
|
+
* Row byte alignment of pixels in data
|
|
68
|
+
*/
|
|
69
|
+
alignment: number;
|
|
70
|
+
/**
|
|
71
|
+
* Pixel data
|
|
72
|
+
*/
|
|
73
|
+
data: ArrayBufferView;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Wraps sampling parameters for a WebGL texture
|
|
77
|
+
*/
|
|
78
|
+
export interface SamplingParameters {
|
|
79
|
+
/**
|
|
80
|
+
* Magnification mode when upsampling from a WebGL texture
|
|
81
|
+
*/
|
|
82
|
+
magFilter?: TextureMagFilter;
|
|
83
|
+
/**
|
|
84
|
+
* Minification mode when upsampling from a WebGL texture
|
|
85
|
+
*/
|
|
86
|
+
minFilter?: TextureMinFilter;
|
|
87
|
+
/**
|
|
88
|
+
* X axis wrapping mode when sampling out of a WebGL texture bounds
|
|
89
|
+
*/
|
|
90
|
+
wrapS?: TextureWrapMode;
|
|
91
|
+
/**
|
|
92
|
+
* Y axis wrapping mode when sampling out of a WebGL texture bounds
|
|
93
|
+
*/
|
|
94
|
+
wrapT?: TextureWrapMode;
|
|
95
|
+
/**
|
|
96
|
+
* Anisotropic filtering samples
|
|
97
|
+
*/
|
|
98
|
+
maxAnisotropy?: number;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Represents a valid WebGL texture source for use in texImage2D
|
|
102
|
+
*/
|
|
103
|
+
export declare type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
|
|
104
|
+
/**
|
|
105
|
+
* A generic set of texture mipmaps (where index 0 has the largest dimension)
|
|
106
|
+
*/
|
|
107
|
+
export declare type Mipmaps<T> = Array<T>;
|
|
108
|
+
/**
|
|
109
|
+
* A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]
|
|
110
|
+
*/
|
|
111
|
+
export declare type Faces<T> = Array<T>;
|
|
112
|
+
/**
|
|
113
|
+
* A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)
|
|
114
|
+
*/
|
|
115
|
+
export declare type Mipmaps2D = Mipmaps<TextureSource>;
|
|
116
|
+
/**
|
|
117
|
+
* A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)
|
|
118
|
+
*/
|
|
119
|
+
export declare type MipmapsCube = Mipmaps<Faces<TextureSource>>;
|
|
120
|
+
/**
|
|
121
|
+
* A minimal WebGL cubemap descriptor
|
|
122
|
+
*/
|
|
123
|
+
export declare class TextureCube {
|
|
124
|
+
internalFormat: PixelFormat;
|
|
125
|
+
type: PixelType;
|
|
126
|
+
source: MipmapsCube;
|
|
127
|
+
/**
|
|
128
|
+
* Returns the width of a face of the texture or 0 if not available
|
|
129
|
+
*/
|
|
130
|
+
get Width(): number;
|
|
131
|
+
/**
|
|
132
|
+
* Returns the height of a face of the texture or 0 if not available
|
|
133
|
+
*/
|
|
134
|
+
get Height(): number;
|
|
135
|
+
/**
|
|
136
|
+
* constructor
|
|
137
|
+
* @param internalFormat WebGL pixel format for the texture on the GPU
|
|
138
|
+
* @param type WebGL pixel type of the supplied data and texture on the GPU
|
|
139
|
+
* @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object
|
|
140
|
+
*/
|
|
141
|
+
constructor(internalFormat: PixelFormat, type: PixelType, source?: MipmapsCube);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* A static class providing methods to aid working with Bablyon textures.
|
|
145
|
+
*/
|
|
146
|
+
export declare class TextureUtils {
|
|
147
|
+
/**
|
|
148
|
+
* A prefix used when storing a babylon texture object reference on a Spectre texture object
|
|
149
|
+
*/
|
|
150
|
+
static BabylonTextureKeyPrefix: string;
|
|
151
|
+
/**
|
|
152
|
+
* Controls anisotropic filtering for deserialized textures.
|
|
153
|
+
*/
|
|
154
|
+
static MaxAnisotropy: number;
|
|
155
|
+
/**
|
|
156
|
+
* Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
|
|
157
|
+
* If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
|
|
158
|
+
* The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
|
|
159
|
+
* @param scene A Babylon Scene instance
|
|
160
|
+
* @param textureCube A Spectre TextureCube object
|
|
161
|
+
* @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
|
|
162
|
+
* @param environment Specifies that the texture will be used as an environment
|
|
163
|
+
* @param singleLod Specifies that the texture will be a singleLod (for environment)
|
|
164
|
+
* @return Babylon cube texture
|
|
165
|
+
*/
|
|
166
|
+
static GetBabylonCubeTexture(scene: Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment?: boolean, singleLod?: boolean): CubeTexture;
|
|
167
|
+
/**
|
|
168
|
+
* Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
|
|
169
|
+
* @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
|
|
170
|
+
* @param parameters Spectre SamplingParameters to apply
|
|
171
|
+
*/
|
|
172
|
+
static ApplySamplingParameters(babylonTexture: BaseTexture, parameters: SamplingParameters): void;
|
|
173
|
+
private static _EnvironmentSampling;
|
|
174
|
+
private static _EnvironmentSingleMipSampling;
|
|
175
|
+
/**
|
|
176
|
+
* Environment preprocessing dedicated value (Internal Use or Advanced only).
|
|
177
|
+
*/
|
|
178
|
+
static EnvironmentLODScale: number;
|
|
179
|
+
/**
|
|
180
|
+
* Environment preprocessing dedicated value (Internal Use or Advanced only)..
|
|
181
|
+
*/
|
|
182
|
+
static EnvironmentLODOffset: number;
|
|
183
|
+
}
|