2 cases built from this template
Same prompt, different [VARIABLES]. Click one to preview it above.About this template
A tactile browser cellular automata sandbox built on a fast typed-array 60fps simulation engine. Paint across a dark slate canvas (#15171C) using 16 vivid, reactive elements—sand, water, fire, smoke, plant, lava, ice, acid, oil, wood, steam, stone, seed, cloner, wind, and eraser—and watch real physics and chemistry unfold: water extinguishes fire, lava meets water to forge stone and billowing steam, fire spreads through wood and oil, seeds sprout into burnable foliage, acid dissolves everything except stone, ice melts near heat, and cloners continuously replicate neighboring grains. Features brush size and shape (circle, square, spray), Play/Pause and Single-Step frame control, a live Temperature Heatmap view, three animated starter scenes (Volcano, Hourglass, Rain Garden), compact URL hash sharing, and effortless touch painting.
The template prompt
The live demo was built from exactly this text — nothing added. The other cases only change the values of the [VARIABLES].
# Falling Sand Physics Toy
Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.
## Brief
Build a fast 60fps cellular automata falling-sand physics toy titled [BRAND] ([TAGLINE]) with a crisp light studio toolbar framing a vivid dark slate simulation canvas (#15171C). Support all 16 interacting materials using typed arrays: Sand, Water, Fire, Smoke, Plant, Lava, Ice, Acid, Oil, Wood, Steam, Stone, Seed, Cloner, Wind, and Eraser. Implement authentic elemental reactions (Water puts out Fire into Steam; Lava + Water creates Stone + Steam; Fire ignites Wood, Oil, and Plants; Seeds grow into Plants when watered; Acid corrodes non-Stone/Cloner elements; Ice melts into Water near heat; Cloner duplicates adjacent materials; Wind blows airborne grains). Include brush size (1–12), brush shape (Circle, Square, Spray), Play/Pause, Single-Step (+1 tick), live Temperature Heatmap toggle, three starter scenes (Volcano, Hourglass, Rain Garden — opening on [DEFAULT_SCENE] ALREADY erupting in lively motion on frame one!), compact URL hash scene sharing, and responsive mouse & touch painting.
- Audience: Curious browsers, physics-toy lovers, students, and creative coders who enjoy emergent cellular alchemy.
- Goal: Hook players within one second with a live erupting Volcano (or starter scene) on frame one, then let them mix all 16 elements smoothly at 60fps on desktop and 390px mobile.
- Tone: Tactile science-lab minimalism—crisp light instrument bar contrasting vivid glowing elemental pixels.
## Stack
- Framework: Vite 6 + React 18 + TypeScript
- Styling: Tailwind CSS 4
- Libraries: lucide-react (ISC), @fontsource/space-grotesk (OFL-1.1), @fontsource/inter (OFL-1.1), @fontsource/jetbrains-mono (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
- Set base: './' and build: { sourcemap: false } in vite.config.ts.
- Import @fontsource/space-grotesk (600, 700), @fontsource/inter (400, 500, 600), and @fontsource/jetbrains-mono (500, 600) in src/main.tsx.
- Author the 60fps Uint8Array + Int16Array temperature cellular automata simulation, all 16 elemental reactions, 3 handcrafted starter scenes (Volcano, Hourglass, Rain Garden), thermal heatmap renderer, and compact RLE URL hash serializer in src/sim/sandEngine.ts.
- Keep material definitions, reaction guide tips, and customizable brand copy in src/data/materials.ts.
- Pre-simulate 28 ticks synchronously on initial load so frame one is already bursting with falling lava, steam plumes, water cascades, and lush greenery.
## Variables
- [BRAND] — App Title (default: "GrainLab"). Playful science-sandbox brand name
- [TAGLINE] — Short Subtitle (default: "16-element cellular alchemy sandbox"). Concise descriptor shown in top light toolbar
- [DEFAULT_SCENE] — Initial Starter Scene (default: "volcano"). One of volcano, hourglass, or rain-garden
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/falling-sand-physics-toy in the footer (default: yes; delete this line to remove it)
The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.
## Design
### Colors
- Dark Slate Canvas `#15171C` — High-contrast cellular simulation chamber
- Studio Porcelain `#F6F7F9` — Crisp light page shell and toolbar surface
- Lab Ink `#15171C` — High-contrast typography and active tool outlines
- Molten Lava `#FF4D1A` — Vivid lava, fire, and thermal highlights
- Alpine Water `#3B9EFF` — Fluid water streams and hydro reactions
- Neon Acid `#B8FF2E` — Corrosive acid pixels and active reaction badges
### Typography
- Brand Wordmark & Scene Titles: Space Grotesk (OFL), weights 600/700
- Material Labels & Tooltips: Inter (OFL), weights 400/500/600
- Particle Counter, FPS & Brush Size: JetBrains Mono (OFL), weights 500/600
### Layout & motion
- Spacing: Crisp light top instrument bar, full-width framed dark slate simulation canvas in the center of the viewport, and ergonomic 16-material palette + brush/scene controls fitting cleanly on 1440×900 and 390×844.
- Radius: 14px dark simulation frame with crisp 1px slate border; tactile pill swatches for all 16 elements.
- Motion: Continuous 60fps emergent particle physics already flowing on frame one.
- Motion: Smooth interpolated stroke painting between pointer events so fast strokes draw solid streams without gaps.
- Motion: Instant Temperature Heatmap color-ramp visualization toggle showing molten hot spots vs icy blues.
- Motion: Under prefers-reduced-motion, slow simulation step rate gently while keeping Single-Step and full painting responsive.
- Imagery: 100% live pixel-crisp HTML5 Canvas ImageData cellular automata art with vibrant per-grain color micro-variation.
## Pages & Sections
### [BRAND] · Falling Sand Physics Toy (`#/sandbox`)
1. **Crisp Light Instrument Header & Dark Slate Simulation Chamber** — Light porcelain header displaying [BRAND], [TAGLINE], Play/Pause toggle, Single-Step (+1) button, Thermal View toggle, Starter Scene switcher (`Volcano`, `Hourglass`, `Rain Garden`), Clear button, and Share URL copy button. Directly below sits the dark slate (`#15171C`) interactive simulation canvas already alive on frame one with the active starter scene erupting, cascading, and steaming—plus a compact live status bar showing active material reaction tip, live grain count, and brush preview.
Layout: Centered 1280px studio layout fitting header + large dark canvas + full 16-element palette cleanly above the fold on desktop, and responsive stacked canvas + compact 4×4 material grid on 390×844 mobile.
Motion: 60fps typed-array cellular automata with fluid touch & mouse line interpolation.
2. **16-Element Swatch Dock & Brush Controls** — Crisp light bottom deck containing all 16 color-coded element buttons (`Sand`, `Water`, `Fire`, `Smoke`, `Plant`, `Lava`, `Ice`, `Acid`, `Oil`, `Wood`, `Steam`, `Stone`, `Seed`, `Cloner`, `Wind`, `Eraser`) alongside Brush Size slider (`1–12`), Brush Shape pills (`Circle`, `Square`, `Spray`), and a concise Chemical Reactions legend. Subtle single-line footer with optional [CREDIT].
Layout: Clean 8-col desktop / 4-col mobile swatch grid with zero horizontal overflow.
Motion: Active element highlights with bold ink outline and color dot.
## Assets
## Don'ts
- Never start with an empty black screen—load and pre-tick the lively starter scene synchronously before first paint.
- Never mention or copy any existing falling-sand game name or source code.
- Never show calendar dates or 4-digit years anywhere in the UI.
- Never allow horizontal overflow on 390×844 mobile or clip elements with clip-path.
- Never drop frames—use typed arrays (Uint8Array / Int16Array) and direct ImageData pixel writes.
---
— Prompt by VibeFather · https://vibefather.ai/t/falling-sand-physics-toy · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
Free for personal projects under CC BY-NC 4.0. Commercial use comes with Pro.
DESIGN.md
The design system on its own — colors, type, spacing and motion. Apply this look to a project you already have.
---
name: "Falling Sand Physics Toy"
colors:
dark_slate_canvas: "#15171C"
studio_porcelain: "#F6F7F9"
lab_ink: "#15171C"
molten_lava: "#FF4D1A"
alpine_water: "#3B9EFF"
neon_acid: "#B8FF2E"
typography:
brand_wordmark_scene_titles: { family: "Space Grotesk", weights: [600, 700] }
material_labels_tooltips: { family: "Inter", weights: [400, 500, 600] }
particle_counter_fps_brush_size: { family: "JetBrains Mono", weights: [500, 600] }
spacing: "Crisp light top instrument bar, full-width framed dark slate simulation canvas in the center of the viewport, and ergonomic 16-material palette + brush/scene controls fitting cleanly on 1440×900 and 390×844."
radius: "14px dark simulation frame with crisp 1px slate border; tactile pill swatches for all 16 elements."
---
# Falling Sand Physics Toy — Design System
Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.
## Colors
- **Dark Slate Canvas** `#15171C` — High-contrast cellular simulation chamber
- **Studio Porcelain** `#F6F7F9` — Crisp light page shell and toolbar surface
- **Lab Ink** `#15171C` — High-contrast typography and active tool outlines
- **Molten Lava** `#FF4D1A` — Vivid lava, fire, and thermal highlights
- **Alpine Water** `#3B9EFF` — Fluid water streams and hydro reactions
- **Neon Acid** `#B8FF2E` — Corrosive acid pixels and active reaction badges
## Typography
- **Brand Wordmark & Scene Titles** — Space Grotesk (OFL), weights 600/700. Self-host the font files.
- **Material Labels & Tooltips** — Inter (OFL), weights 400/500/600. Self-host the font files.
- **Particle Counter, FPS & Brush Size** — JetBrains Mono (OFL), weights 500/600. Self-host the font files.
## Spacing & shape
- Spacing: Crisp light top instrument bar, full-width framed dark slate simulation canvas in the center of the viewport, and ergonomic 16-material palette + brush/scene controls fitting cleanly on 1440×900 and 390×844.
- Radius: 14px dark simulation frame with crisp 1px slate border; tactile pill swatches for all 16 elements.
## Motion
- Continuous 60fps emergent particle physics already flowing on frame one.
- Smooth interpolated stroke painting between pointer events so fast strokes draw solid streams without gaps.
- Instant Temperature Heatmap color-ramp visualization toggle showing molten hot spots vs icy blues.
- Under prefers-reduced-motion, slow simulation step rate gently while keeping Single-Step and full painting responsive.
## Imagery
100% live pixel-crisp HTML5 Canvas ImageData cellular automata art with vibrant per-grain color micro-variation.
## Tone
Tactile science-lab minimalism—crisp light instrument bar contrasting vivid glowing elemental pixels.
---
— Prompt by VibeFather · https://vibefather.ai/t/falling-sand-physics-toy · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
Make it yours
- A science teacher: set BRAND to your class name, DEFAULT_SCENE to rain-garden, and use the Chemical Reactions legend to walk students through water, fire and acid reactions.
- A creative coding workshop: keep the default Volcano scene and have students edit the material colours and brush sizes in the content file to build their own palette.
- A museum exhibit kiosk: set BRAND to the exhibit title, TAGLINE to a one-line instruction, and open on Hourglass so visitors see motion before touching the screen.
- A game studio prototype: use the Cloner and Wind elements to test particle behaviour, then share scenes by URL with teammates for feedback on the simulation.
Falling Sand Physics Toy: questions and answers
What elements and reactions does the Falling Sand Physics Toy include?
The Falling Sand Physics Toy includes 16 materials: Sand, Water, Fire, Smoke, Plant, Lava, Ice, Acid, Oil, Wood, Steam, Stone, Seed, Cloner, Wind and Eraser. They react to each other: water puts out fire and turns to steam, lava meeting water forges stone and steam, fire spreads through wood, oil and plants, seeds sprout into plants when watered, acid dissolves everything except stone and cloner, ice melts near heat, cloners duplicate neighbouring grains and wind blows airborne grains.
Is the Falling Sand Physics Toy free to use?
The Falling Sand Physics Toy is a free template. Its prompt and DESIGN.md are free for personal, non-commercial use under CC BY-NC 4.0. Commercial or client use needs a VibeFather Pro license, which also unlocks the full prompt and the source code of the demos. The page shows the brief, stack and variables publicly either way.
How do I share a scene I made in the Falling Sand Physics Toy?
The Falling Sand Physics Toy has a Share URL button in the light instrument header that copies a compact URL hash of your current canvas. Anyone who opens that link sees the same arrangement of elements. You can also pick one of the three starter scenes, Volcano, Hourglass or Rain Garden, from the scene switcher, and the template opens on whichever scene you set as DEFAULT_SCENE.
Can I change the brand name and starting scene in the Falling Sand Physics Toy?
Yes. The Falling Sand Physics Toy is driven by three variables: BRAND for the app title, TAGLINE for the short subtitle in the top toolbar, and DEFAULT_SCENE for which of the three starter scenes loads first. Set DEFAULT_SCENE to volcano, hourglass or rain-garden, then rewrite the headlines and labels in the content file to match your new name and tone.
How do I add a wine club signup to a winery website built with AI?
The Falling Sand Physics Toy template does not include a wine club form, so you would add one as a new section near the footer. Keep the light porcelain shell and dark slate canvas, place a simple email field and submit button below the simulation, and link it to your mailing list provider. The template has no backend, so the form needs an external signup service.
How do I build a falling sand physics toy with AI?
Copy the prompt from this page or run npx vibefather add falling-sand-physics-toy, replace [BRAND], [TAGLINE] and [DEFAULT_SCENE] with your own content, and paste it into Claude Code, Codex, Cursor or another AI coding agent. The live demos were built from exactly that text.
Which AI model built the Falling Sand Physics Toy demo?
The GrainLab (Volcano Caldera) case was built by Gemini 4 Neon in Antigravity; the DuneCraft (Rain Garden) case was built by GPT-6.2 Sol in Codex. Each build used the published prompt with nothing added, so you can compare the models side by side.
What tech stack and pages does the Falling Sand Physics Toy template use?
Falling Sand Physics Toy is a single-page site built with React and Tailwind CSS, with generative / canvas and micro-interactions. The prompt fixes the stack so every AI tool builds the same kind of project, and the result runs as a static site you can host anywhere.
Can I use the Falling Sand Physics Toy template for a client or a business?
The Falling Sand Physics Toy prompt and DESIGN.md are free for personal, non-commercial projects under CC BY-NC 4.0. Client work and commercial use need VibeFather Pro, which also includes the source code of the live demo.
Does the Falling Sand Physics Toy template work on mobile?
Yes. Every Falling Sand Physics Toy build was tested on a phone-sized screen as well as desktop before it went live, checking layout, text size and touch targets. Open the live demo on your phone, or switch the preview on this page to mobile view, to check it yourself.