Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Infinite Canvas Gallery: Picture Cards on a Canvas with No Edges

Build a portfolio hero where picture cards are tiled over a canvas with no edges: drag, swipe or trackpad-scroll in any direction and it keeps the flick and glides to a stop, zooms out a little and splits each card into red and blue edges while it moves fast, wraps around so there is always more, drifts on its own and opens a card full size on click. SandBase draws twelve pictures as one contact sheet that the Skill cuts apart, or you bring your own folder. The hero is followed by a full landing page: chapter titles, an intro, a product console drawn in HTML, feature cards, specs, stats, a quote, a call to action and a footer, with a moving glow and a floating section pill.

示例 · 2

Photo agency hero with picture cards on an endless canvas you drag in any direction
在新标签页中打开

在沙盒化的框架中运行,无法访问此页面。

在线运行

在 SandBase sandbox 中运行,并在 Lab 中查看结果。

在 Lab 中打开 ↗

你将获得什么

Bring what the cards show (or your own folder of pictures), a caption per picture, a headline, a line of copy, a button, links, palette and language. The Skill returns a full landing page (index.html), a section to paste into an existing site, the runtime script and stylesheet, the cut-apart pictures and the bundled open fonts.

工作原理

  1. 01

    Plan the cards and copy

    Infinite Canvas Gallery asks what the cards show, or for your own folder, plus brand, headline, one line of copy, links, the button, a caption per picture, palette and language. It writes site.json, where canvas.tile runs 0.12 to 0.4 of the screen width, gap 0 to 0.08 and drift 0 to 1 px per frame. node scripts/sample.mjs northlight --site site.json --out preview previews for free.

  2. 02

    Generate or bring pictures

    node scripts/generate.mjs --theme "<twelve subjects, row by row>" --site site.json --out run, then again with --confirm-real, calls gpt-image-2 through SandBase for one 3 by 4 contact sheet at 4k and cuts it apart at the white gutters. With your own pictures, node scripts/build-web.mjs --photos <dir> --site site.json --out site takes 6 to 40 files for free.

  3. 03

    Drag, flick and check

    node scripts/serve.mjs run/site serves the page. Drag and flick in every direction, click a card, press Escape and leave it to drift. Card slots wrap around and pick pictures from their absolute grid position; fast motion zooms out up to 9% and splits card edges red and blue. The verified example used 12 pictures in 56 slots with 10 sections after the hero.

常见问题

Is Infinite Canvas Gallery billed on SandBase?

Infinite Canvas Gallery is billed only when generating. It calls gpt-image-2 through SandBase for one contact sheet, billed to your SandBase account. The agent quotes the estimate before generating, generate.mjs spends only with --confirm-real, and --budget-usd caps it. Building from your own folder or a sample set is free. Rates are at https://www.sandbase.ai/pricing.

Does Infinite Canvas Gallery need WebGL?

No. Infinite Canvas Gallery is HTML and CSS transforms. With prefers-reduced-motion the canvas does not drift, zoom or split colours, but dragging still works.

Why does my mouse wheel scroll the page in Infinite Canvas Gallery?

Infinite Canvas Gallery leaves a plain vertical wheel to the page so the landing page below still scrolls. Horizontal or shift scrolling moves the canvas. On a phone, vertical swipes scroll the page and horizontal swipes move the canvas, which was checked in a 390 px viewport.

What pictures work in Infinite Canvas Gallery?

Infinite Canvas Gallery shows 4:3 cards and crops other shapes to fit. Contact sheets need white gutters, because the cutter looks for rows and columns that are at least 96% near-white. copy.captions needs one caption per picture in every language.

What does Infinite Canvas Gallery output?

Infinite Canvas Gallery writes index.html, section.html, infinite-canvas.js with no dependencies, infinite-canvas.css with ic- prefixed classes, landing.js, a fonts folder and a cards folder of JPEGs, 1200 px wide by default. InfiniteCanvas.mount(el, options) returns inspect, open, close and destroy.