# Five ways to sell clothes online: prompts + code

Five online stores that are not a product grid: The Sliding Rail, The Floating Gallery, The Velvet Salon,
The Walk-In Store and The Colour Drop. Every garment is one flat product photo; the code turns it into a
3D piece of cloth you can grab, turn and restyle. No 3D models.

How to use: paste the **engine prompt** first into Claude Code (or any coding agent) in an empty Vite +
three.js project, then paste the prompt of the store you want. Swap in your own product photos with the
**photo prompt** at the end. The full code for all five is in `five-stores-code.zip`.

## 00 · The engine (paste this first)
> One flat photo → a 3D garment with real, calm cloth physics.

```text
Build a small three.js module, src/cloth-sim.js, that turns a transparent product cutout (PNG/WebP of a
garment on no background) into an interactive 3D garment. No 3D models.

1. Inflate: read the image's alpha, compute a distance-to-edge field, and build a closed shell from a
   grid (about 36 columns): the front surface pushed out and the back surface pushed in by
   thickness * sin(min(distance / ramp, 1) * PI/2), so the torso is thick and sleeves and edges roll thin.
   Front face shows the photo; the back shows a back photo if given, else the mirrored front. Option
   setThickness(0..1) to animate from a flat card to full volume.
2. Cloth: run a Verlet mass-spring sim on the mid-surface in WORLD space (so moving or rotating the parent
   gives real inertia): structural, shear and bend constraints, top row pinned to the hanger, a gentle
   pull back to the rest shape, heavy damping, internal friction (blend each particle's velocity toward its
   neighbours') so it never jiggles. Wind is a single slow, barely-there drift for the whole garment.
   API: kick(v), gust(k), grabAt / dragTo / release, and a pointer helper that dents the cloth under the
   cursor and lets you grab and fling it. Clothes in a shop hang still: motion comes from the user.
3. Shading: a ShaderMaterial lit RELATIVE to the light baked into the photo, so at rest it looks exactly
   like the photo and only folds and turns change it. Per-fabric looks: silk (moving specular sheen),
   satin, velvet (rim sheen), nylon (gloss), cotton, knit, fleece (matte). Bump from the photo's own
   luminance. Colourway change = a wavy wipe that runs from the collar to the hem.
Keep it one file, no dependencies besides three. Add a test page that shows four garments and a ?rot=55
option so I can see they have real volume when turned.
```

## 01 · The Sliding Rail
> A dark Kyoto atelier: push the hangers along a rail, lift a silk shirt off to inspect it.
> Suits: quiet luxury, silk and linen ateliers, small-batch craft brands.

```text
Using src/cloth-sim.js, build sora.html: a silk shirt atelier that sells from a clothes rail, not a grid.
Scene: a dark charcoal Japanese room, a tall glowing shoji screen on the far left, dark timber floor
(generate the empty room as a backplate image). A straight matte-black steel rail with two legs across the
left 60% of the screen; six long-sleeve silk shirts on wooden hangers, evenly spaced, slightly
overlapping, each an inflated 3D garment (fabric: silk). Interactions: drag the empty wall or scroll to
slide the hangers along the rail (they swing with inertia and bump their neighbours); the active shirt
turns to face you, the others turn 15-20 degrees on their hooks; click it (or "Focus piece") to lift it
off the rail toward the viewer while the room blurs, then drag to turn it; Esc puts it back. Right column:
a light serif product title on two lines, a 4-row spec list with hairlines (material, weight, weave,
origin), three fabric/detail thumbnails, price and an outlined "Focus piece" button. Serif wordmark top
left, small serif nav top right. Premium, calm, generous space.
```

## 02 · The Floating Gallery
> A grey plaster gallery: one hero piece floats front and centre; tug a sleeve, tap a colour and the dye washes down.
> Suits: minimal basics and knitwear, one hero silhouette in many colours.

```text
Using src/cloth-sim.js, build koma.html: a knitwear and heavyweight-tee capsule shown as a floating gallery.
Scene: a cool pale-grey plaster wall and polished concrete floor with diagonal window-light shadows that
drift very slowly (backplate image; no beige). Five garments (tee: cotton, cardigans: knit, vest: nylon,
overshirt: cotton) float on an arc: the hero big in the centre with a soft cool floor shadow, the others
smaller and turned toward it. Drag or scroll to move the carousel (the cloth lags with real inertia);
the hero can be grabbed by the sleeve and flung. Colour swatches under the hero change its colourway with
the wavy collar-to-hem wipe. Click the hero for a detail panel (white, ink text, hairlines, swatches,
price, black "Add to bag" pill) while the hero becomes a drag turntable. UI: wide-tracked serif "K O M A"
top left, serif nav top right, a big light serif "01 / 05" counter, the piece name in serif and a tiny
caps spec line bottom left, hairline progress segments bottom centre.
```

## 03 · The Velvet Salon
> An oxblood couture salon: hover and the gowns part, click one and it glides into the light and twirls.
> Suits: eveningwear, bridal, high-ticket occasion pieces.

```text
Using src/cloth-sim.js, build veloura.html: an evening-gown salon. Scene: deep oxblood velvet wall, dark
marble floor with gold veins and reflections, three warm spotlights (backplate image). A slim polished brass
rail with rounded corners turning down into two legs; eight floor-length gowns on brass hangers, evenly
spaced (fabrics: satin, velvet, silk), each with a mirrored, faded floor reflection that shares its cloth
geometry. Hover a gown: it turns toward you and steps forward, its neighbours part and turn away, a
spotlight pool brightens behind it, and the key light follows the cursor so the sheen moves. Click: the gown
glides to the left third and does a slow half-twirl, the others dim, and a quick-view card slides in
(near-black surface, ivory Didone title, price, sizes, brass "Put in bag"); drag turns the gown. UI: a
centred Didone wordmark with tiny caps "MILANO · COLLECTION NUIT", tiny caps nav top left, bag icon top
right, an italic serif caption at the bottom that changes per gown.
```

## 04 · The Walk-In Store
> A graphite concrete flagship you turn around in: jackets, caps, bags and shoes on four walls.
> Suits: techwear and streetwear brands that sell whole outfits.

```text
Using src/cloth-sim.js, build kineta.html: a technical-outerwear flagship as a real 3D room with four walls
(Clothing, Caps, Bags, Shoes) plus a Store overview. Graphite board-formed concrete walls, a polished dark
floor with reflections, a long light slot in the ceiling, one soft downlight per item (generate seamless
wall/floor textures). Clothing wall: six jackets (fabric: nylon; puffers thicker) on black hangers on a
matte-black steel rail. A frosted dark-glass segmented control at the bottom switches walls: the camera
turns fully to the next wall with a small dolly that settles, and the jackets swing with a gust. Hover a
jacket: it swings out to a 3/4 view with a mono label on a hairline leader line. Click: it comes forward
beside a dark purchase card (mono labels, sizes, quantity, cobalt "Add to bag") and becomes a drag
turntable. Caps, bags and shoes are flat cutouts that tilt toward the cursor. UI: bold condensed "KINETA"
wordmark, mono "Flagship / Gallery 04", outlined round bag button, "Room 02 / 05" bottom left.
```

## 05 · The Colour Drop
> Four full-height colour columns: tap one and the whole screen becomes that hoodie; spin it to the real back.
> Suits: hype drops, loud basics, Gen-Z hoodie brands.

```text
Using src/cloth-sim.js, build sola.html: a heavyweight hoodie drop. Four full-height columns edge to edge,
each a saturated seamless backdrop in its hoodie's colour with a lighter glow behind the hoodie (cobalt,
acid matcha, hyper coral, royal orchid), each hoodie an inflated 3D garment (fabric: fleece) with its real
back photo, turning gently toward the cursor. Huge heavy white names ("Cobalt") with a small spec line and
a white "Explore" pill per column; a white top bar ("SOLA CLUB", "DROP 04 — HEAVYWEIGHT FLEECE", "BAG (0)").
Click a column: its colour grows to fill the screen and the hoodie flies to the centre; a giant word in the
darker tone sits behind it; drag to spin it 360 degrees and see the real back; front/back tiles turn it
0/180 degrees; colour dots repaint the hoodie front and back with the wavy wipe AND repaint the whole page;
sizes, price and a white "Add to bag" pill. Back link returns to the columns.
```

## Your own photos
> Make product photos the engine can inflate.

```text
Generate a studio product photo of [garment, colour, fabric] for an online store: the garment alone, front
view, hanging naturally on [a wooden hanger / no hanger], centred, filling about 80% of the height, soft
even studio light, plain white background, no model, no text, no logo. Then remove the background to a
transparent PNG (any background remover) and save it at 1000-1500 px tall. For 360-degree spins, make a
second image of the back with the same framing.
```
