API

Interface ICubeTextureCreationOptions

Defines the available options when creating a cube texture

interface ICubeTextureCreationOptions {
    buffer?: ArrayBufferView<ArrayBufferLike>;
    createPolynomials?: boolean;
    extensions?: string[];
    files?: string[];
    forcedExtension?: any;
    format?: number;
    loaderOptions?: any;
    lodOffset?: number;
    lodScale?: number;
    noMipmap?: boolean;
    onError?: (message?: string, exception?: any) => void;
    onLoad?: () => void;
    prefiltered?: boolean;
    sphericalPolynomialTargetSize?: number;
    useSRGBBuffer?: boolean;
}
Index
buffer?: ArrayBufferView<ArrayBufferLike>

buffer to load instead of loading the data from the url

createPolynomials?: boolean

createPolynomials defines whether or not to create polynomial harmonics from the texture data if necessary

extensions?: string[]

Defines the suffixes add to the picture name in case six images are in use like _px.jpg

files?: string[]

files defines the six files to load for the different faces in that order: px, py, pz, nx, ny, nz

forcedExtension?: any

forcedExtension defines the extensions to use (force a special type of file to load) in case it is different from the file name

format?: number

format defines the internal format to use for the texture once loaded

loaderOptions?: any

loaderOptions options to be passed to the loader

lodOffset?: number

lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness

lodScale?: number

lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness

noMipmap?: boolean

noMipmap defines if mipmaps should be created or not

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

onError defines a callback triggered in case of error during load

onLoad?: () => void

onLoad defines a callback triggered at the end of the file load if no errors occurred

prefiltered?: boolean

prefiltered defines whether or not the texture is created from prefiltered data

sphericalPolynomialTargetSize?: number

Target face size for spherical polynomial computation. 0 = full resolution (default).

useSRGBBuffer?: boolean

useSRGBBuffer Defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU) (default: false)