Skip to content

Tiling

const Tiling: Component

Repeats the sprite’s frame to fill the sprite instead of stretching it: scrolling backgrounds, parallax layers, water, floors. Each repetition is w x h pixels (0, the default, means the frame’s own size in the image), and x/y move the pattern by that many pixels, so Tiling.x[e] = camera.x * 0.5 scrolls it at half speed. With linear filtering a faint seam can show where the pattern wraps; pixel art (nearest) tiles cleanly.