# Magnet Ink Bench

> A pool of black magnetic fluid on a glossy bench that mirrors the studio lights, where holding switches on a magnet under the top and raises a crown of sharp, glossy spikes; drag to lead the pool across the bench, let go and it flattens, add drops that bead and get pulled in.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Interactive 3D](https://www.sandbase.ai/skills/interactive-3d)
- Version: 0.1.0
- Runs online: yes
- Page: https://www.sandbase.ai/skills/interactive-3d/magnet-ink-bench

## What you get

Bring the set, lights, pool size, colours and copy for your bench. The Skill returns a downloadable Skill and a runnable magnetic-fluid scene.

## Install

Download the Skill package from https://www.sandbase.ai/skills/interactive-3d/magnet-ink-bench (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/magnet-ink-bench build a magnetic fluid scene with <your set, lights, pool size, colours and copy>
```

## How it works

1. **Write the bench briefs** Each brief in assets/briefs/ holds the copy, the four state names, the readout format, the palette, the camera, the pool (radius, spike height and spacing, how tall the rim spikes stand) and the set: a studio with two softboxes, or a desk with a window, a hanging lamp and a copper dish the pool stays inside. A separate list of light boxes is what the fluid reflects, so keep it where the set draws its lights. A new brief needs no code change. You might tell your Agent: "Use magnet-ink-bench to make a lab bench under one strip light with a blue pool."
2. **Build one offline page** npm run build inlines src/bench.js and both briefs into dist/index.html, about 70 KB. ?lang=en or ?lang=zh-CN picks the brief. The set is painted once. Each frame the pool and up to 547 spikes on a hexagonal lattice are drawn back to front, every surface coloured from the brief's light boxes with a Fresnel share, then drawn again flipped and faded as the reflection on the bench. There are no images or network requests, no API key and no model calls.
3. **Check the bench before you ship** npm install brings in playwright-core, then npm run shoot drives the page frame by frame in headless Chrome with the network blocked. It runs 50 checks: the ghost hand raises a crown whose lit edges stripe a row of pixels through the pool, a real hover only bulges it, a hold raises the crown, a drag leads the pool and leans the spikes, letting go flattens it, drops land or bead and are pulled in, a weaker magnet makes fewer spikes, the lock holds the crown, reduced motion opens on a still crown, and at 360, 390 and 768 px wide in both languages no two controls overlap.

## FAQ

### Does Magnet Ink Bench need an API key?

No. Magnet Ink Bench is a single offline HTML page drawn with Canvas 2D, so it needs no API key and makes no model or network calls, before or after it is built. Node.js is only needed to run the build script, and playwright-core with a local Chrome only for the bundled browser checks.

### Is the fluid really simulated?

Not as a liquid. Magnet Ink Bench treats the pool as one body on a spring toward the magnet, and each spike as a spring on a fixed hexagonal lattice whose height follows the local field. The rules are chosen so the crown rises above a critical field, peaks over the middle, leans after the magnet and sinks when it lets go, but no field equations are solved.

### Can I change the set and the lights?

Yes. The brief chooses a studio with two softboxes or a desk with a window, a hanging lamp and a copper dish, and sets their positions and colours. The fluid's reflections come from a separate list of light boxes in the same brief, so move those with the painted lights. Copy one of the two bundled briefs, edit it and pass its name to scripts/build.mjs.

### Does Magnet Ink Bench work on a phone?

Yes. Press and hold on the pool to raise the crown and drag a finger to lead it. Because a finger hides the pool, the lock switch keeps the magnet on with no finger down. Portrait phones get a taller stage that crops the bench at the sides, and the bar wraps under it. The checks ran at 360, 390 and 768 px wide under emulation, not on real devices.

### What does reduced motion change?

With reduced motion set in the system, Magnet Ink Bench opens with the ghost hand off and the magnet locked on, on a crown that already stands and does not breathe. Holding, dragging, drops and the controls still work, so a viewer can explore it at their own pace. The checks confirm the spike count and the pool position stay the same over four seconds.

## Examples

- Magnet Ink Bench scene (scene)
- Studio Bench under Two Softboxes (video)
