WebGPU 软体草莓蛋糕:可捏、可扔、可切

Claude Opus 5.5 写出单文件 WebGPU 玩具:草莓蛋糕像果冻般晃动,每切一刀就分成更多柔软的小块。

在线演示

Claude Code + Three.js(仅代码)Wandy 2
真实模型 · 360°两者都基于同一张照片:左边是 Claude Code(Opus 5.5)用 Three.js 代码建模的一次未经修改的运行结果;右边是 Wandy 2。

创建精细的 3D 模型

单靠代码只能做出简单的形状。Wandy 2 能用一张照片生成带纹理的 3D 模型,直接用在同一个场景里。

Claude Opus 5.5 提示词

Build immediately a complete interactive WebGPU site called “Strawberry Cake.” 
Use genuine WebGPU + WGSL, procedural geometry, mouse/touch, and real-time volumetric soft-body physics. No Three.js/Babylon.js, Canvas2D, external assets, video/GIF, or CSS-only deformation.
Visual: premium Korean/Japanese strawberry shortcake—low, wide, rounded, pillow-soft, with pink sponge, cream layers, pale frosting, piped cream, and strawberries. Warm ivory background, soft studio light, edible moist materials.
Layout: top-left “SOFT STUDIES / NO.001” + italic “Strawberry Cake.” Top-right “WEBGPU · LIVE”. Large centered cake. Right controls: Hand/Knife, presets, Firmness, Damping, Drop, Reset, Pause, ¼ speed, Show mesh. Bottom-left: Mass, Volume, Kinetic, Pieces.
Physics: stable XPBD/co-rotational soft body with tetrahedral sim mesh, smooth render mesh, volume preservation, damping, gravity, floor friction, and piece collisions. Cake feels soft/heavy and wobbles after release.
Hand: hold=Press, inward drag=Squeeze, outward drag=Grab, fast release=Throw. Use weighted grabs, smoothed 3D target, pointer velocity and momentum. Cake remains free; cake input overrides orbit.
Knife: procedural 3D knife. Draw a cut line; animate contact→compression→penetration→breakthrough→lift. Deform before splitting; keep seam thin.
Repeated cutting is mandatory: use a dynamic pieces list; every piece stays cuttable. Convert strokes to vertical cut planes, split crossed pieces, create new soft-body/render meshes, transfer deformation/velocity, preserve toppings, keep halves aligned, update Pieces. Support 14+ pieces and multi-piece cuts. No fixed whole/left/right states.
Drop releases all pieces. Reset restores one intact cake and Pieces=1. Use fixed timestep/substeps, DPR≤2, clamp instability, avoid NaNs/GPU errors. Expose window.__cake.
Run locally, test interactions and repeated cutting, and iterate until polished.

如何使用这条提示词

  1. 在支持 WebGPU 的浏览器环境中,把提示词交给运行 Claude Opus 5.5 的 Claude Code 等智能体。

  2. 把蛋糕换成其他甜点或物体,并调整软硬度、阻尼、工具和界面文字。

  3. 打开 HTML 文件捏、扔、切;若碎块抖动或破裂,再让模型修复。

来自 Wandy3D

场景里需要一个真正的 3D 模型?

智能体只会用基本几何体搭场景。Wandy3D API 几分钟就能把一张照片或一段提示词变成带贴图的 GLB——从预付余额扣费,无需订阅。

  • Wandy 2每个模型 US$0.18
  • Wandy 1每个模型 US$0.09

余额永不过期 · 失败的任务自动退款 · 通过 API 生成的模型归你所有,可下载任意格式。

curl -s -X POST https://api.wandy3d.com/generate/cloud/ultra \  -H "Authorization: Bearer $WANDY3D_API_KEY" -F "file=@photo.jpg"# → {"task_id": "…"} — poll until "status" is "done":curl -s https://api.wandy3d.com/task/$TASK_ID/status \  -H "Authorization: Bearer $WANDY3D_API_KEY"# → {"model_id": "…"} — then GET /model/$MODEL_ID/export?format=glb

原帖你是作者吗? 请联系我们修改或删除此页面