API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classTextureRegion

@codexo/exojs / rendering / stable

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. All region descriptor fields are stable after construction. 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. Texture dimensions **must** be known at construction time; a texture with zero dimensions will cause the constructor to throw.

10
props
0
methods
0
events
Import
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.

All region descriptor fields are stable after construction. 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.

Texture dimensions **must** be known at construction time; a texture with zero dimensions will cause the constructor to throw.

Constructors 1
new(texture: Texture, options: TextureRegionOptions): TextureRegion
Properties 10
extrusion: Readonly<TextureRegionInsets>
height: number
texture: Texture
u0: number
u1: number
v0: number
v1: number
width: number
x: number
y: number
Source