Sprites
· One min read
A sprite is a textured 2D quad on a node: a texture, a size in pixels
per unit, and the sheet or atlas cell it draws.
What landed
- The component.
textureandpixels_per_unitsize the quad from the image;half_extentsoverrides the size in world units. - Flipbooks.
columnsandrowscut a sheet into a grid, andframepicks a cell, left to right then top to bottom — so an animation clip keysframelike any other property. - Atlas cells.
region_originandregion_size, in texture pixels, draw one rectangle of a larger image and size the quad from it. - The rest.
flip_x,flip_y, acolortint, and amaterialfor a sprite that wants a shader of its own.
[[nodes]]
name = "Hero"
[nodes.sprite]
texture = "art/hero.png"
pixels_per_unit = 32
columns = 8
rows = 1
frame = 0
Sprites draw in z order with the other 2D shapes, and a 2D light map lights them without a material. The component reference lists every key.