All examples · Sprites and 2D

Pixel art

What this example shows

Sprites are drawn with crisp filtering (nearest neighbour) by default, the retro default: the mushroom on the left, a 32×32 sprite scaled about 5.6 times, keeps its hard pixels.

The one on the right sets smooth: true on its own sprite and switches to linear filtering, which blurs. It is the general rule: one default for the whole game, and an exception per sprite.

Starting