All examples · Sprites and 2D

Auto size

What this example shows

Leave out width and height and the sprite takes its texture's natural pixel size (here a 167×167 illustration), resolved by the renderer as soon as the texture finishes loading. The sprite on the right forces 64×64 from the same image, for comparison.

Starting