ProtectedconstructorProtected constructor. Use static factory methods to create instances.
Optionalimage: ImageBitmap | HTMLImageElement | HTMLCanvasElement
Optional initial image data.
Optional configuration options.
The wrapping mode for the U coordinate.
The wrapping mode for the V coordinate.
Desired anisotropic filtering level for this texture.
Whether mipmaps should be generated for this texture.
The underlying image, bitmap, or canvas data.
Whether the texture is fully loaded and ready for use.
The magnification filter.
The minification filter.
Set to true after mutating image in place (e.g. redrawing a canvas) to force a GPU re-upload.
The UV offset.
The UV repeat factors.
Flips the texture horizontally by modifying the UV offset and repeat.
This texture instance for chaining.
Flips the texture vertically by modifying the UV offset and repeat.
This texture instance for chaining.
StaticemptyCreates an empty texture placeholder.
Optionaloptions: TextureOptions
Optional configuration options.
A new empty Texture instance.
StaticfromCreates a texture backed directly by a canvas. Redraw the canvas and set needsUpdate = true
to push the new pixels to the GPU on the next frame.
The canvas to use as the texture's pixel source.
Optionaloptions: TextureOptions
Optional configuration options.
A new Texture instance.
StaticfromCreates a texture from an existing image or bitmap.
The image or bitmap data.
Optionaloptions: TextureOptions
Optional configuration options.
A new Texture instance.
StaticfromLoads a texture from a URL.
The URL of the image.
Optionaloptions: TextureOptions
Optional configuration options.
A promise that resolves to a new Texture instance.
Represents a 2D texture.