Looping parallax

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

looping-parallax · Page · Contract

Each supplied layer is made to repeat on its own, by mirroring its edges or by repainting the seam, then the layers are composed with their offsets and scroll factors into a portable manifest and a preview frame.

Steps

StepNode types
Make each layer repeat
Each supplied layer is prepared on its own. By default its repeating edges are mirrored, so the repeat is exact; a seam layer that does not already loop has the cut repainted instead, and falls back to the mirror when the repaint is refused twice.
Check whether it already loops looping_parallax/layer/loops_already
Repaint the seam looping_parallax/layer/repaint
Judge the repainted seam looping_parallax/layer/seam_ok
Mirror the edges looping_parallax/layer/mirror
Take the layer's loop looping_parallax/layer/loop
Compose the scrolling background
The prepared layers are placed with their offsets and scroll factors, and a preview frame is drawn. Changing placement reruns only this step.
Compose the scrolling background looping_parallax/compose

Outputs

outputs/manifest.jsonEvery layer with its size, order, offsets, repeat axes and scroll factor
outputs/preview.pngOne composed frame, for inspection
outputs/layers/Each layer's repeat unit, by layer id

Try it

Two original layers and the inputs.yaml that places them, written by 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

Examples

No approved example yet.