API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
typeTextureSource
Anything the rendering pipeline can sample as a texture source: a loaded image, a canvas of either kind, a playing video, a decoded bitmap, a decoded video frame, or `null` when no source has been assigned yet. A `VideoFrame` is the one member with a lifetime of its own. It holds a decoder resource that is released only by `close()`, and the engine never calls it: a texture reads the frame during upload and does not retain it afterwards, so closing the frame stays the responsibility of whoever decoded it. Close it no earlier than the flush that uploaded it, and re-assign the texture's source before closing it if the texture is to keep drawing.
import { TextureSource } from '@codexo/exojs'Anything the rendering pipeline can sample as a texture source: a loaded image, a canvas of either kind, a playing video, a decoded bitmap, a decoded video frame, or `null` when no source has been assigned yet.
A `VideoFrame` is the one member with a lifetime of its own. It holds a decoder resource that is released only by `close()`, and the engine never calls it: a texture reads the frame during upload and does not retain it afterwards, so closing the frame stays the responsibility of whoever decoded it. Close it no earlier than the flush that uploaded it, and re-assign the texture's source before closing it if the texture is to keep drawing.
HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ImageBitmap | OffscreenCanvas | VideoFrame | null