For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class Texture
Constructors
constructor
- new Texture(
context: Context,
image: TextureImage,
format: TextureFormat,
options?: { premultiply?: boolean; useMipmap?: boolean } | null,
): TextureParameters
- context: Context
- image: TextureImage
- format: TextureFormat
Optionaloptions: { premultiply?: boolean; useMipmap?: boolean } | null
Returns Texture
Properties
context
format
magFilter
minFilter
size
size: [number, number]
texture
useMipmap
useMipmap: boolean
wrap
Methods
bind
Parameters
- magFilter: TextureFilter
- wrap: TextureWrap
OptionalminFilter: TextureFilter | null
Returns void
destroy
Returns void
generateMipmap
Builds the mip chain after the texture was drawn into as a framebuffer attachment. An allocation without pixels (
data: null) gets no chain fromupdate, so a render target is built once, here, after the draw.Returns void
update
- update(
image: TextureImage,
options?: { premultiply?: boolean; useMipmap?: boolean } | null,
position?: { x: number; y: number },
): voidParameters
- image: TextureImage
Optionaloptions: { premultiply?: boolean; useMipmap?: boolean } | nullOptionalposition: { x: number; y: number }
Returns void
Internal
A
TextureGL related object