Interface ITextureCreationOptions
buffer?: Nullable<
| string
| ArrayBuffer
| ArrayBufferView<ArrayBufferLike>
| HTMLImageElement
| ImageBitmap
| Blob,
>;
creationFlags?: number;
deleteBuffer?: boolean;
forcedExtension?: string;
format?: number;
gammaSpace?: boolean;
internalTexture?: InternalTexture;
invertY?: boolean;
loaderOptions?: any;
mimeType?: string;
noMipmap?: boolean;
onError?: Nullable<(message?: string, exception?: any) => void>;
onLoad?: Nullable<() => void>;
samplingMode?: number;
useSRGBBuffer?: boolean;
}
Hierarchy (View Summary)
- ITextureCreationOptions
Properties
Optionalbuffer
| string
| ArrayBuffer
| ArrayBufferView<ArrayBufferLike>
| HTMLImageElement
| ImageBitmap
| Blob,
>
Defines the buffer to load the texture from in case the texture is loaded from a buffer representation (default: null)
Optionalcreation Flags
Specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg) (default: undefined)
Optionaldelete Buffer
Defines if the buffer we are loading the texture from should be deleted after load (default: false)
Optionalforced Extension
Defines the extension to use to pick the right loader
Optionalformat
Defines the format of the texture we are trying to load (Engine.TEXTUREFORMAT_RGBA...) (default: )
Optionalgamma Space
Defines the underlying texture texture space
Optionalinternal Texture
Defines the underlying texture from an already existing one
Optionalinvert Y
Defines if the texture needs to be inverted on the y axis during loading (default: true)
Optionalloader Options
Options to be passed to the loader (default: undefined)
Optionalmime Type
Defines an optional mime type information (default: undefined)
Optionalno Mipmap
Defines if the texture will require mip maps or not (default: false)
Optionalon Error
Defines a callback triggered when an error occurred during the loading session (default: null)
Optionalon Load
Defines a callback triggered when the texture has been loaded (default: null)
Optionalsampling Mode
Defines the sampling mode we want for the texture while fetching from it (Texture.NEAREST_SAMPLINGMODE...) (default: Texture.TRILINEAR_SAMPLINGMODE)
Optionaluse SRGB Buffer
Defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU) (default: false)
Defines the available options when creating a texture