• Public
  • Public/Protected
  • All

Interface ITextureCreationOptions

Defines the available options when creating a texture


  • ITextureCreationOptions



Optional bufferSearch playground for buffer

buffer: Nullable<string | ArrayBuffer | ArrayBufferView | HTMLImageElement | Blob | ImageBitmap>

Defines the buffer to load the texture from in case the texture is loaded from a buffer representation (default: null)

Optional creationFlagsSearch playground for creationFlags

creationFlags: number

Specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg) (default: undefined)

Optional deleteBufferSearch playground for deleteBuffer

deleteBuffer: boolean

Defines if the buffer we are loading the texture from should be deleted after load (default: false)

Optional formatSearch playground for format

format: number

Defines the format of the texture we are trying to load (Engine.TEXTUREFORMAT_RGBA...) (default: )

Optional invertYSearch playground for invertY

invertY: boolean

Defines if the texture needs to be inverted on the y axis during loading (default: true)

Optional loaderOptionsSearch playground for loaderOptions

loaderOptions: any

Options to be passed to the loader (default: undefined)

Optional mimeTypeSearch playground for mimeType

mimeType: string

Defines an optional mime type information (default: undefined)

Optional noMipmapSearch playground for noMipmap

noMipmap: boolean

Defines if the texture will require mip maps or not (default: false)

Optional onErrorSearch playground for onError

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

Defines a callback triggered when an error occurred during the loading session (default: null)

Optional onLoadSearch playground for onLoad

onLoad: Nullable<() => void>

Ddefines a callback triggered when the texture has been loaded (default: null)

Optional samplingModeSearch playground for samplingMode

samplingMode: number

Defines the sampling mode we want for the texture while fetching from it (Texture.NEAREST_SAMPLINGMODE...) (default: Texture.TRILINEAR_SAMPLINGMODE)

Optional useSRGBBufferSearch playground for useSRGBBuffer

useSRGBBuffer: boolean

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


  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method