API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classTextureRegion
An immutable descriptor for a rectangular sub-region of a Texture. Stores the pixel-space source rectangle, pre-computed normalised UV bounds, and optional extrusion/padding metadata for atlas-safe linear filtering. Constructed once and reused across sprites, tile-sets, atlas lookups, and the scalable-sprite repeat planners. Extrusion metadata is copied and frozen during construction - the caller retains no mutable reference to the stored object. The underlying Texture reference is stable, but the Texture's own lifecycle and sampler state remain owned by Texture. **Sub-regions** name an explicit rectangle. Their descriptor is fixed at construction and validated against the texture, which must therefore already know its dimensions - a still-loading texture makes the rectangle unverifiable, so the constructor throws. **Whole-texture regions** omit the rectangle and cover the entire texture. They derive their geometry from the texture instead of capturing it, so one built from a loader handle that has not resolved yet reports zero dimensions for the moment and the real ones as soon as the payload lands. Nothing has to be rebuilt or invalidated for the region itself to become correct; consumers that cache geometry off it watch Texture.version.
import { TextureRegion } from '@codexo/exojs'An immutable descriptor for a rectangular sub-region of a Texture.
Stores the pixel-space source rectangle, pre-computed normalised UV bounds, and optional extrusion/padding metadata for atlas-safe linear filtering. Constructed once and reused across sprites, tile-sets, atlas lookups, and the scalable-sprite repeat planners.
Extrusion metadata is copied and frozen during construction - the caller retains no mutable reference to the stored object. The underlying Texture reference is stable, but the Texture's own lifecycle and sampler state remain owned by Texture.
**Sub-regions** name an explicit rectangle. Their descriptor is fixed at construction and validated against the texture, which must therefore already know its dimensions - a still-loading texture makes the rectangle unverifiable, so the constructor throws.
**Whole-texture regions** omit the rectangle and cover the entire texture. They derive their geometry from the texture instead of capturing it, so one built from a loader handle that has not resolved yet reports zero dimensions for the moment and the real ones as soon as the payload lands. Nothing has to be rebuilt or invalidated for the region itself to become correct; consumers that cache geometry off it watch Texture.version.
height: numberu0: numberu1: numberv0: numberv1: numberwidth: numberx: numbery: number