arcade2d
Type Alias

TextureFrame

graphics/texture.types.ts:14

A rectangular sub-region of an image, in source-pixel coordinates, used to sample one frame out of a larger image (a spritesheet cell, a tileset tile, an animation frame).

The geometry Rectangle is deliberately not reused here: that shape is positionless (anchored at its own 0,0), whereas a texture frame needs an (x, y) origin within the source image. TextureFrame is the small, honest "pixel rect in image space" type for exactly that.

Coordinates follow the engine's screen-space convention: (0, 0) is the image's top-left, x grows right, y grows down.

{ height: number; width: number; x: number; y: number }
ESC