API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classTexture
A static GPU texture sourced from an image, canvas, or video element. Holds the pixel source and sampling parameters (ScaleModes, WrapModes, mip generation, alpha premultiplication). A `version` counter is incremented on every mutation so backends can detect stale GPU uploads without polling. Static helpers Texture.black, Texture.white, and Texture.empty provide ready-made placeholder textures. Default sampler options are configurable via Texture.defaultSamplerOptions.
import { Texture } from '@codexo/exojs' A static GPU texture sourced from an image, canvas, or video element.
Holds the pixel source and sampling parameters (ScaleModes, WrapModes, mip generation, alpha premultiplication). A `version` counter is incremented on every mutation so backends can detect stale GPU uploads without polling.
Static helpers Texture.black, Texture.white, and Texture.empty provide ready-made placeholder textures. Default sampler options are configurable via Texture.defaultSamplerOptions.
new(source: TextureSource, options?: Partial<SamplerOptions>): Texture addDestroyListener(listener: object): this destroy(): void removeDestroyListener(listener: object): this setPremultiplyAlpha(premultiplyAlpha: boolean): this setScaleMode(scaleMode: ScaleModes): this setSize(width: number, height: number): this setSource(source: TextureSource): this setWrapMode(wrapMode: WrapModes): this updateSource(): this defaultSamplerOptions: SamplerOptions empty: Texture flipY: boolean generateMipMap: boolean height: number powerOfTwo: boolean premultiplyAlpha: boolean scaleMode: ScaleModes size: Size source: TextureSource version: number width: number wrapMode: WrapModes black: Texture white: Texture