Looping parallax

Layer pictures in. Repeating layers and their scroll placement out.

Give each layer of a background as its own picture, and get it back as a layer that repeats without end, placed for scrolling. Each layer is prepared on its own. By default its repeating edges are mirrored, which repeats exactly but shows every landmark twice, facing itself. A layer at least 1536 pixels wide can ask for its seam to be repainted instead, and one that already loops is kept untouched. Changing offsets, order or scroll factors reruns only the composition, so the prepared pictures are reused. What you get is a manifest a game reads and one preview frame; the scrolling, the camera and the player stay with the game.

Run it yourself

The workflow runs offline on two original layers that a committed script draws, together with the inputs.yaml that places them. It makes no provider calls. Write the inputs, then plan, run and inspect them:

uv run python src/fx_games/workflows/looping_parallax/inputs/supplied_layers/make_inputs.py out/looping-parallax-input
uv run python -m grida.fx plan looping-parallax --inputs out/looping-parallax-input/inputs.yaml
uv run python -m grida.fx run looping-parallax --inputs out/looping-parallax-input/inputs.yaml --deliver manifest=out/looping-parallax-try/manifest.json --deliver preview=out/looping-parallax-try/preview.png --deliver layers=out/looping-parallax-try/layers/{key}.png
uv run python -m grida.fx inspect looping-parallax --verify

Each run gets its own folder under out/runs/looping-parallax/, and running again reuses every step whose inputs did not change. The run makes each repeating layer, a manifest with every layer's size, order, offsets, repeat axes and scroll factor, and one preview frame; --deliver copies them where you want them. A consumer places each layer at offset - scroll * parallax and repeats it along its declared axes. A layer that asks for loop_construction: seam_repaint plans one image edit on the configured route, a second when the first is rejected, and needs --live, a ceiling (--max-usd) and your provider keys only to run it. The contract holds the inputs, the outputs, the graph and every loop construction.