module

MJ::Cyclorama

Cyclorama — extend an image believably to one side, and (by repeating) roll a scene out into a much larger panorama. One "turn" = ask Nano Banana to draw the image immediately adjacent to the current edge, matched to it, then butt-join it on.

We always reason in a canonical "extend to the RIGHT" frame; a left extension is done by mirroring the input, extending right, and mirroring the tile back — so the prompt and marrying logic never branch.

Constants

BASE_PROMPT = "Here is a reference image of a scene. Draw a NEW image of what lies immediately to the RIGHT of it — a natural continuation of the very same scene. The LEFT edge of your new image must line up with the RIGHT edge of the reference: keep the horizon and any lines that run across the frame at the same heights and continue them without a break. Match the exact same art style, colours, palette and lighting. Do NOT redraw the reference — show what comes NEXT to the right of it. No text, no lettering, no people."

The lean, human-style instruction that actually worked in testing: give the model the reference and ask for the ADJACENT scene, not a widened copy (see the boardwalk-panorama experiments — a verbose "orthographic/no-VP" wall made it worse).

Instance methods

build_prompt(spec : CycloramaSpec) : String
Source
extend(client : RunwareClient, current : StumpyPNG::Canvas, spec : CycloramaSpec) : StumpyPNG::Canvas

Generate the next tile adjacent to current on the spec's side. Returns a tile the same height as current, spec.tile_width wide.

Source
join(current : StumpyPNG::Canvas, tile : StumpyPNG::Canvas, spec : CycloramaSpec) : StumpyPNG::Canvas

Butt-join tile onto current on the correct side; returns the grown image.

Source