Sand AISand AI MAGI-2MAGI-2 अब SandBase पर है: 1080p वीडियो, नेटीव ऑडियो के साथअभी आज़माएँ

Hover Alt Reveal: a Hero Where the Pointer Paints a Second Version of the Picture

Build a hero page where the pointer drags a liquid trail that shows another version of the same picture, such as a porcelain cat turning to black glass or a white sneaker covered in graffiti, and the trail fades back. SandBase generates the picture and its edit, the Skill lines them up by their outlines, and WebGL draws the trail with a noisy edge, a coloured rim and a slight bend. 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

Ceramics hero where the pointer turns a porcelain cat to black glass
नए टैब में खोलें

यह एक sandboxed frame में चलता है और इस page तक इसकी पहुँच नहीं है।

ऑनलाइन चलाएँ

SandBase sandbox में चलाएँ और अपने परिणाम Lab में देखें।

Lab में खोलें ↗

आपको क्या मिलेगा

Bring a subject and what its second version changes (or your own picture), your brand, copy, links and language. The Skill returns a full landing page (index.html), a section to paste into an existing site, both aligned pictures and colours taken from them.

यह कैसे काम करता है

  1. 01

    Describe the picture pair

    Hover Alt Reveal asks for the subject, what the second version changes in material, colour or dressing but not pose or framing, plus brand, copy, links, language and budget. It writes site.json, where layout is bottom or top and effect sets brush, stretch, fade, edge, rim, refract and focus. node scripts/sample.mjs kiln-cat --site site.json --out preview builds a free preview.

  2. 02

    Generate the edited twin

    After you accept the estimate, node scripts/generate.mjs --subject "<picture>" --change "<what changes>" --site site.json --out run runs again with --confirm-real. It calls gpt-image-2 through the logged-in sandbase CLI or SANDBASE_API_KEY for the picture and its edit, then lines the edit up by outline. Node.js 18+ with ffmpeg and ffprobe is required; no npm dependencies.

  3. 03

    Sweep and compare

    Compare run/base.png and run/alt.png for the same outline, then node scripts/serve.mjs run/site and sweep the pointer over the subject. WebGL cuts the trail into a liquid edge with a coloured rim and a slight bend, and the mask fades back. The kiln-cat example needed a 0 px shift and showed 8.7% of the frame after one sweep. Hand over run/site/.

FAQ

Is Hover Alt Reveal billed on SandBase?

Yes, Hover Alt Reveal is billed when generating. It calls gpt-image-2 through SandBase for the picture and its edit, billed to your SandBase account; with --image only the edit is made. The agent quotes the estimate first, nothing is spent without --confirm-real, and --budget-usd sets a cap. results/runs.json lists every paid call. Rates are at https://www.sandbase.ai/pricing.

What if the Hover Alt Reveal edit moves the subject?

Hover Alt Reveal's builder corrects a shift of up to 10 px at 320 px wide, but not scaling or rotation. When it has to shift the second picture by more than 2% of the width it warns you, because the edit moved the subject. Regenerate the edit in that case.

Can Hover Alt Reveal use my own pictures?

Yes. Hover Alt Reveal builds for free from any two pictures of the same shape with build-web.mjs --base and --alt, or edits your own first picture with generate.mjs --image. A local file sent with --image is uploaded publicly through sandbase upload, so ask before uploading anything private.

Does Hover Alt Reveal work without WebGL?

Yes, Hover Alt Reveal works without WebGL, with a softer edge. It falls back to Canvas 2D, drawing the second picture through the mask without the rim or the bend. On phones the trail follows a dragging finger until the browser starts scrolling, and a tap paints one blob.

What files does Hover Alt Reveal produce?

Hover Alt Reveal writes index.html, section.html, hover-reveal.js with no dependencies, hover-reveal.css with hr- prefixed classes, landing.js, a fonts folder with Geist, Geist Mono and Instrument Serif, media/base.jpg and media/alt.jpg at 1920 px, and site.resolved.json. --embed writes one self-contained file with both languages.