TextureLoader
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
gl: WebGL2RenderingContext
optional_garbageCollector: { collectionInterval: number; garbageCollector: GarbageCollector }
Returns TextureLoader
Properties
publicstaticfiltering
Sets the default filtering for the Excalibur texture loader, default [[ImageFiltering.Blended]]
publicstaticwrapping
Methods
publicdelete
Parameters
image: HTMLImageSource
Returns void
publicdispose
Returns void
publicget
Get the WebGL Texture from a source image
Parameters
image: HTMLImageSource
Returns WebGLTexture
publichas
Returns whether a source image has been loaded as a texture
Parameters
image: HTMLImageSource
Returns boolean
publicload
Loads a graphic into webgl and returns it's texture info, a webgl context must be previously registered
Parameters
image: HTMLImageSource
Source graphic
optionaloptions: ImageSourceOptions
{ImageSourceOptions} Optionally configure the ImageFiltering and ImageWrapping mode to apply to the loaded texture
forceUpdate: boolean = false
Optionally force a texture to be reloaded, useful if the source graphic has changed
Returns WebGLTexture
publicstaticcheckImageSizeSupportedAndLog
Takes an image and returns if it meets size criteria for hardware
Parameters
image: HTMLImageSource
Returns boolean
if the image will be supported at runtime
Manages loading image sources into webgl textures, a unique id is associated with all sources