用这个模板做的 2 个案例
同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。关于这个模板
一个基于快速类型化数组 60fps 模拟引擎的触感式浏览器元胞自动机沙盒。在深石板色画布(#15171C)上使用 16 种生动、可反应的元素——沙、水、火、烟、植物、岩浆、冰、酸液、油、木头、蒸汽、石头、种子、复制器、风和橡皮擦——进行绘制,观看真实的物理和化学过程展开:水灭火,岩浆遇水锻造石头并产生翻滚的蒸汽,火在木头和油中蔓延,种子发芽长成可燃的枝叶,酸液溶解除石头外的一切,冰在热源附近融化,复制器持续复制相邻的颗粒。功能包括画笔大小和形状(圆形、方形、喷雾)、播放/暂停和单步帧控制、实时温度热力图视图、三个动画起始场景(火山、沙漏、雨花园)、紧凑的 URL 哈希分享以及轻松触摸绘制。
模板提示词
在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。
# 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
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 落沙物理玩具
完全按照以下描述构建这个网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。
## 简介
构建一个快速的 60fps 元胞自动机落沙物理玩具,标题为 [BRAND]([TAGLINE]),配有清晰的浅色工作室工具栏,框住一个鲜艳的深板岩色模拟画布(#15171C)。使用类型化数组支持全部 16 种相互作用的材料:Sand、Water、Fire、Smoke、Plant、Lava、Ice、Acid、Oil、Wood、Steam、Stone、Seed、Cloner、Wind 和 Eraser。实现真实的元素反应(Water 将 Fire 扑灭并转化为 Steam;Lava + Water 生成 Stone + Steam;Fire 点燃 Wood、Oil 和 Plants;Seeds 遇水生长为 Plants;Acid 腐蚀非 Stone/Cloner 元素;Ice 在热源附近融化为 Water;Cloner 复制相邻材料;Wind 吹动空气中的颗粒)。包含笔刷大小(1–12)、笔刷形状(Circle、Square、Spray)、Play/Pause、Single-Step(+1 tick)、实时 Temperature Heatmap 开关、三个起始场景(Volcano、Hourglass、Rain Garden —— 打开时 [DEFAULT_SCENE] 已在第一帧就活跃地喷发运动!)、紧凑的 URL hash 场景分享,以及响应式鼠标与触摸绘制。
- 受众:好奇的浏览器用户、物理玩具爱好者、学生,以及喜欢涌现式元胞炼金术的创意编程者。
- 目标:在第一帧就用一个实时喷发的 Volcano(或起始场景)在一秒内吸引玩家,然后让他们在桌面端和 390px 移动端以 60fps 流畅混合全部 16 种元素。
- 基调:触感科学实验室极简主义——清晰的浅色仪器栏与鲜艳发光的元素像素形成对比。
## 技术栈
- 框架:Vite 6 + React 18 + TypeScript
- 样式:Tailwind CSS 4
- 库:lucide-react(ISC)、@fontsource/space-grotesk(OFL-1.1)、@fontsource/inter(OFL-1.1)、@fontsource/jetbrains-mono(OFL-1.1)
- 构建:`npm run build` → `dist/` 中的静态文件。无后端、无服务器代码、无外部 API。
- 设置:
- 在 vite.config.ts 中设置 base: './' 和 build: { sourcemap: false }。
- 在 src/main.tsx 中导入 @fontsource/space-grotesk(600、700)、@fontsource/inter(400、500、600)和 @fontsource/jetbrains-mono(500、600)。
- 在 src/sim/sandEngine.ts 中编写 60fps Uint8Array + Int16Array 温度元胞自动机模拟、全部 16 种元素反应、3 个手工制作的起始场景(Volcano、Hourglass、Rain Garden)、热力图渲染器,以及紧凑的 RLE URL 哈希序列化器。
- 将材质定义、反应指南提示和可自定义的品牌文案保留在 src/data/materials.ts 中。
- 在初始加载时同步预模拟 28 个 tick,使第一帧就已充满落下的熔岩、蒸汽羽流、水流瀑布和茂盛的绿植。
## 变量
- [BRAND] — 应用标题(默认:“GrainLab”)。俏皮的科学沙盒品牌名
- [TAGLINE] — 简短副标题(默认:“16-element cellular alchemy sandbox”)。显示在顶部浅色工具栏中的简洁描述
- [DEFAULT_SCENE] — 初始起始场景(默认:“volcano”)。可选 volcano、hourglass 或 rain-garden 之一
- [CREDIT] — 在页脚保留一个小型“Template by VibeFather”链接,指向 https://vibefather.ai/t/falling-sand-physics-toy(默认:是;删除此行即可移除)
“页面与区块”下的文案是按默认值撰写的。如果你的取值不同,请为它们重写每一个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。
将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块作为键,以便之后无需改动组件即可替换内容。
## 设计
### 颜色
- 深板岩画布(Dark Slate Canvas)`#15171C` — 高对比度细胞模拟腔室
- 工作室瓷白(Studio Porcelain)`#F6F7F9` — 清爽的浅色页面外壳与工具栏表面
- 实验室墨色(Lab Ink)`#15171C` — 高对比度排版与激活工具轮廓
- 熔岩橙(Molten Lava)`#FF4D1A` — 鲜艳的岩浆、火焰与热力高光
- 高山流水蓝(Alpine Water)`#3B9EFF` — 流体水流与水解反应
- 霓虹酸绿(Neon Acid)`#B8FF2E` — 腐蚀性酸液像素与激活反应徽章
### 排版
- 品牌字标与场景标题:Space Grotesk(OFL),字重 600/700
- 材质标签与工具提示:Inter(OFL),字重 400/500/600
- 粒子计数器、FPS 与笔刷大小:JetBrains Mono(OFL),字重 500/600
### 布局与动效
- 间距:清爽的浅色顶部仪表栏,视口中央为全宽边框的深板岩模拟画布,符合人体工学的 16 种材质调色板 + 笔刷/场景控件,在 1440×900 和 390×844 下均能整洁适配。
- 圆角:14px 深色模拟边框,配以清晰的 1px 板岩色描边;全部 16 种元素均采用触感胶囊色块。
- 动效:首帧即已流动的持续 60fps 涌现式粒子物理。
- 动效:指针事件之间平滑插值的笔触绘制,使快速笔触也能画出无间隙的实心流线。
- 动效:即时温度热力图色带可视化开关,展示熔热热点与冰冷蓝色对比。
- 动效:在 prefers-reduced-motion 下,温和放慢模拟步进速率,同时保持 Single-Step 与完整绘制响应灵敏。
- 图像:100% 实时像素级清晰的 HTML5 Canvas ImageData 细胞自动机艺术,带有鲜艳的逐颗粒颜色微变化。
## 页面与区块
### [BRAND] · 落沙物理玩具 (`#/sandbox`)
1. **清爽浅色乐器式页头与深板岩模拟舱** — 浅瓷色页头展示 [BRAND]、[TAGLINE]、播放/暂停切换、单步(+1)按钮、热成像视图切换、起始场景切换器(`Volcano`、`Hourglass`、`Rain Garden`)、清除按钮,以及分享 URL 复制按钮。正下方是深板岩色(`#15171C`)交互式模拟画布,第一帧即已活跃,当前起始场景正在喷发、倾泻与冒蒸汽——另有一条紧凑的实时状态栏,显示当前材料反应提示、实时颗粒数与笔刷预览。
布局:居中的 1280px 工作室布局,在桌面端将页头 + 大尺寸深色画布 + 完整 16 元素调色板整洁地容纳在首屏内;在 390×844 移动端为响应式堆叠画布 + 紧凑 4×4 材料网格。
动效:60fps 类型化数组元胞自动机,带流畅的触摸与鼠标线条插值。
2. **16 元素色板坞与笔刷控制** — 清爽浅色底部面板,包含全部 16 个颜色编码的元素按钮(`Sand`、`Water`、`Fire`、`Smoke`、`Plant`、`Lava`、`Ice`、`Acid`、`Oil`、`Wood`、`Steam`、`Stone`、`Seed`、`Cloner`、`Wind`、`Eraser`),以及笔刷大小滑块(`1–12`)、笔刷形状胶囊按钮(`Circle`、`Square`、`Spray`)和简洁的化学反应图例。底部有细微的单行页脚,含可选的 [CREDIT]。
布局:整洁的 8 列桌面 / 4 列移动色板网格,零水平溢出。
动效:激活元素以粗墨色描边和色点高亮。
## 资产
## 不要做的事
- 绝不要以空白的黑屏开始——在首次绘制前同步加载并预运行生动活泼的起始场景。
- 绝不要提及或复制任何现有落沙游戏(falling-sand game)的名称或源代码。
- 绝不要在 UI 的任何位置显示日历日期或 4 位年份。
- 绝不要在 390×844 移动端上出现水平溢出,或用 clip-path 裁剪元素。
- 绝不要掉帧——使用类型化数组(Uint8Array / Int16Array)和直接写入 ImageData 像素。
---
— 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
个人项目可免费使用(CC BY-NC 4.0)。 商业用途需要 Pro.
DESIGN.md
单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。
---
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
改成你自己的
- 科学老师:将 BRAND 设置为你的班级名称,DEFAULT_SCENE 设置为 rain-garden,并使用化学反应图例引导学生了解水、火和酸液的反应。
- 创意编程工作坊:保留默认的火山场景,让学生编辑内容文件中的材料颜色和画笔大小,构建自己的调色板。
- 博物馆展览自助终端:将 BRAND 设置为展览标题,TAGLINE 设置为一行说明,并打开沙漏场景,让参观者在触摸屏幕前先看到运动。
- 游戏工作室原型:使用复制器和风元素测试粒子行为,然后通过 URL 与队友分享场景,以获取对模拟的反馈。
落沙物理玩具:常见问题
落沙物理玩具包含哪些元素和反应?
落沙物理玩具包含 16 种材料:沙、水、火、烟、植物、岩浆、冰、酸液、油、木头、蒸汽、石头、种子、复制器、风和橡皮擦。它们会相互反应:水灭火并变成蒸汽,岩浆遇水锻造石头和蒸汽,火在木头、油和植物中蔓延,种子浇水后发芽长成植物,酸液溶解除石头和复制器外的一切,冰在热源附近融化,复制器复制相邻颗粒,风吹动空气中的颗粒。
如何为用 AI 构建的酒庄网站添加葡萄酒俱乐部注册?
落沙物理玩具模板不包含葡萄酒俱乐部表单,因此你需要在页脚附近添加一个新区域。保持浅色瓷质外壳和深石板色画布,在模拟下方放置一个简单的电子邮件字段和提交按钮,并将其链接到你的邮件列表提供商。该模板没有后端,因此表单需要外部注册服务。