Interface IInternalTextureLoader
Hierarchy
- IInternalTextureLoader
Implemented by
Index
Properties
Methods
Properties
support CascadesSearch playground for supportCascades
Defines whether the loader supports cascade loading the different faces.
Methods
can LoadSearch playground for canLoad
This returns if the loader support the current file information.
Parameters
extension: string
defines the file extension of the file being loaded
Optional mimeType: string
defines the optional mime type of the file being loaded
Returns boolean
true if the loader can load the specified file
load Cube DataSearch playground for loadCubeData
Uploads the cube texture data to the WebGL texture. It has already been bound.
Parameters
data: ArrayBufferView | ArrayBufferView[]
contains the texture data
texture: InternalTexture
defines the BabylonJS internal texture
createPolynomials: boolean
will be true if polynomials have been requested
onLoad: Nullable<((data?: any) => void)>
defines the callback to trigger once the texture is ready
onError: Nullable<((message?: string, exception?: any) => void)>
defines the callback to trigger in case of error
Optional options: any
options to be passed to the loader
Returns void
load DataSearch playground for loadData
Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.
Parameters
data: ArrayBufferView
contains the texture data
texture: InternalTexture
defines the BabylonJS internal texture
callback: ((width: number, height: number, loadMipmap: boolean, isCompressed: boolean, done: (() => void), loadFailed?: boolean) => void)
defines the method to call once ready to upload
Parameters
width: number
height: number
loadMipmap: boolean
isCompressed: boolean
done: (() => void)
Returns void
Optional loadFailed: boolean
Returns void
Optional options: any
options to be passed to the loader
Returns void
This represents the required contract to create a new type of texture loader.