Class EnvironmentTextureTools
Hierarchy
- EnvironmentTextureTools
Index
Methods
Static Create Env Texture AsyncSearch playground for CreateEnvTextureAsync
-
Creates an environment texture from a loaded cube texture.
Parameters
-
texture: BaseTexture
defines the cube texture to convert in env file
Returns Promise<ArrayBuffer>
a promise containing the environment data if succesfull.
-
Static Create Image Data Array Buffer ViewsSearch playground for CreateImageDataArrayBufferViews
-
Creates the ArrayBufferViews used for initializing environment texture image data.
Parameters
-
data: ArrayBufferView
the image data
-
info: EnvironmentTextureInfo
parameters that determine what views will be created for accessing the underlying buffer
Returns Array<Array<ArrayBufferView>>
the views described by info providing access to the underlying buffer
-
Static Get Env InfoSearch playground for GetEnvInfo
-
Gets the environment info from an env file.
Parameters
-
data: ArrayBufferView
The array buffer containing the .env bytes.
Returns Nullable<EnvironmentTextureInfo>
the environment file info (the json header) if successfully parsed.
-
Static Upload Env Levels AsyncSearch playground for UploadEnvLevelsAsync
-
Uploads the texture info contained in the env file to the GPU.
Parameters
-
texture: InternalTexture
defines the internal texture to upload to
-
data: ArrayBufferView
defines the data to load
-
info: EnvironmentTextureInfo
defines the texture info retrieved through the GetEnvInfo method
Returns Promise<void>
a promise
-
Static Upload Env SphericalSearch playground for UploadEnvSpherical
-
Uploads spherical polynomials information to the texture.
Parameters
-
texture: InternalTexture
defines the texture we are trying to upload the information to
-
info: EnvironmentTextureInfo
defines the environment texture info retrieved through the GetEnvInfo method
Returns void
-
Static Upload Levels AsyncSearch playground for UploadLevelsAsync
-
Uploads the levels of image data to the GPU.
Parameters
-
texture: InternalTexture
defines the internal texture to upload to
-
imageData: ArrayBufferView[][]
defines the array buffer views of image data [mipmap][face]
Returns Promise<void>
a promise
-
Sets of helpers addressing the serialization and deserialization of environment texture stored in a BabylonJS env file. Those files are usually stored as .env files.