ProtectedconstructorThe wrapping mode for the U coordinate.
The wrapping mode for the V coordinate.
Desired anisotropic filtering level for this texture.
Optional block-compressed payload. When present, image is undefined and
renderers upload compressedImage directly via compressedTexImage2D
(WebGL2) / compressed texture formats (WebGPU) instead of sampling image.
Whether this render target includes a depth buffer.
Whether mipmaps should be generated for this texture.
The height of the render target in pixels.
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.
The width of the render target in pixels.
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.
Resizes the render target. Note: The underlying renderer will recreate the GPU resources on the next frame.
The new width.
The new height.
StaticcreateCreates a new RenderTarget.
Configuration options.
A new RenderTarget instance.
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 backed by an explicit block-compressed mip chain
(e.g. decoded from a KTX2 KHR_texture_basisu payload). The renderer uploads
the bytes as-is, keeping the data GPU-compressed.
The compressed payload (format + mip chain).
Optionaloptions: TextureOptions
Optional configuration options -- generateMipmaps must be
false, since every level is supplied explicitly.
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.
A specialized texture that can be rendered to by a Renderer.