Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EnvironmentTextureTools

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.

Hierarchy

  • EnvironmentTextureTools

Index

Methods

Static CreateEnvTextureAsyncSearch playground for CreateEnvTextureAsync

  • CreateEnvTextureAsync(texture: BaseTexture): Promise<ArrayBuffer>
  • 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 CreateImageDataArrayBufferViewsSearch playground for CreateImageDataArrayBufferViews

  • CreateImageDataArrayBufferViews(data: ArrayBufferView, info: EnvironmentTextureInfo): Array<Array<ArrayBufferView>>
  • 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 GetEnvInfoSearch 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 UploadEnvLevelsAsyncSearch 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 UploadEnvSphericalSearch 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 UploadLevelsAsyncSearch playground for UploadLevelsAsync

  • UploadLevelsAsync(texture: InternalTexture, imageData: ArrayBufferView[][]): Promise<void>
  • 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

Legend

  • Property
  • Method
  • Constructor
  • Property
  • Static method