API

Class HDRCubeTextureAssetTask

Define a task used by AssetsManager to load HDR cube textures

Hierarchy (View Summary)

Implements

Index
  • Creates a new HDRCubeTextureAssetTask object

    Parameters

    • name: string

      defines the name of the task

    • url: string

      defines the location of the file to load

    • size: number

      defines the desired size (the more it increases the longer the generation will be) If the size is omitted this implies you are using a preprocessed cubemap.

    • noMipmap: boolean = false

      defines if mipmaps should not be generated (default is false)

    • generateHarmonics: boolean = true

      specifies whether you want to extract the polynomial harmonics during the generation process (default is true)

    • gammaSpace: boolean = false

      specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)

    • prefilterOnLoad: boolean = false

      specifies if the texture should be prefiltered on load (default is false)

    • supersample: boolean = false

      specifies if the texture will be generated with super sampling (default is false)

    • prefilterIrradianceOnLoad: boolean = false

      specifies if the irradiance should be prefiltered on load (default is false)

    • prefilterUsingCdf: boolean = false

      specifies if the texture should be prefiltered using CDF (default is false)

    Returns HDRCubeTextureAssetTask

gammaSpace: boolean = false

[false] Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)

generateHarmonics: boolean = true

[true] Specifies whether you want to extract the polynomial harmonics during the generation process (default is true)

name: string

Defines the name of the task

noMipmap: boolean = false

[false] Defines if mipmaps should not be generated (default is false)

onError: (
    task: HDRCubeTextureAssetTask,
    message?: string,
    exception?: any,
) => void

Callback called when the task is successful

onSuccess: (task: HDRCubeTextureAssetTask) => void

Callback called when the task is successful

prefilterIrradianceOnLoad: boolean = false

[false] Specifies if the irradiance should be prefiltered on load (default is false)

prefilterOnLoad: boolean = false

[false] Specifies if the texture should be prefiltered on load (default is false)

prefilterUsingCdf: boolean = false

[false] Specifies if the texture should be prefiltered using CDF (default is false)

size: number

Defines the desired size (the more it increases the longer the generation will be)

supersample: boolean = false

[false] Specifies if the texture will be generated with super sampling (default is false)

Gets the loaded texture

url: string

Defines the location of the file to load

  • get errorObject(): { exception?: any; message?: string }

    Gets the current error object (if task is in error)

    Returns { exception?: any; message?: string }

  • Execute the current task

    Parameters

    • scene: Scene

      defines the scene where you want your assets to be loaded

    • onSuccess: () => void

      is a callback called when the task is successfully executed

    • onError: (message?: string, exception?: any) => void

      is a callback called if an error occurs

    Returns void

  • Execute the current task

    Parameters

    • scene: Scene

      defines the scene where you want your assets to be loaded

    • onSuccess: () => void

      is a callback called when the task is successfully executed

    • onError: (message?: string, exception?: any) => void

      is a callback called if an error occurs

    Returns void