Skip to content

Sprite

const Sprite: Component

Textured quad centered on Position (see Anchor to place it by another point). texture is the id returned by renderer.loadTexture; without one (texture 0) the sprite is a solid rectangle in its tint, for panels, bars and screen fades. frame picks a cell when the texture was loaded as a spritesheet or tileset. tint multiplies the texture by a 0xRRGGBB color (white = unchanged), alpha fades it (0–1), flipX/flipY (0 or 1) mirror it, e.g. to face a character left.