果冻桃子标本页
- 播放
- 1.2万
- 点赞
- 220
- 评论
- 24
- 收藏
- 72
作者用 Claude Opus 5.5 以7.11美元制作了一个可在浏览器运行的WebGPU果冻桃子模拟,果肉可挤压、果核可弹出,并在后续推文中公开了完整的构建提示词。
完整提示词2,919 字符
Build a single-file WebGPU page "Peach Jelly" in the style of a "Material Studies" specimen sheet (light studio backdrop #E2DFDA, italic serif title, a specimen control panel on the right, live readouts bottom-left, collapsible "Inside the experiment" notes; responsive with a stacked phone layout and a no-WebGPU fallback card). Subject: half a peach made of translucent jelly, cut along its suture, lying skin-down with the cut face up and its stone seated in the hollow. Geometry: a signed distance field for the fruit — a sphere slightly longer from stem to blossom end, with a stem dimple, a faint point at the blossom tip and the suture crease along one side of the rim, belly gently flattened on the floor — cut at the equator, minus an almond-shaped hollow for the stone (flattened, broad faces parallel to the cut, blunt toward the stem). Simulation mesh: a snapped hex lattice, 5 tets per cell (~700 particles / ~2500 tets), node layers exactly on the floor and the cut face, nodes forced out of the stone. Render surface by surface nets, embedded in the tets by barycentric weights, with one normal-smoothing pass per frame so reflections don't pick out tet kinks. The stone gets its own high-resolution mesh: deep wormy furrows (mostly lengthwise) and little pits carved by displacement, a low keel round its edge, a small point at the blossom end; groove depth rides in the vertex material id for shading. Physics (CPU, XPBD, 60 Hz, 10 substeps): per-tet co-rotational shape matching + volume constraints, stiffer skin, edge-relative damping, floor friction, pointer grab with twist. The stone is a rigid body (position, quaternion, ellipsoid inertia) with frictional contact against every particle and sampled floor contacts. Nodes lining the hollow are held by soft adhesion bonds that peel (floor of the hollow first, lip last) under a sustained net pull measured in the half's best-fit rigid frame — never from brief knocks; a loose stone resting in the hollow is drawn home and re-bonded with a soft grace period. Grabbing the stone moves it as a whole and it can be thrown. Buttons: nudge, reset, "Pop the stone" / "Put the stone back", pause, ¼ speed, show mesh; sliders for firmness and damping; readouts mass, volume %, grip %. Rendering (WGSL): shadow map + top-down contact-AO map, scene pass (floor, stone, bubbles) with linear depth in alpha, back-face thickness pass, refracting jelly with Beer–Lambert absorption and scattering. Regions from rest-space SDFs: golden flesh; a ruby ring hugging the stone, broken up irregularly, with fine red fibres streaking out; the skin's blush bleeding a little way into the flesh. Skin: yellow with patchy red blush and pale flecks, a velvet sheen at grazing angles (nectarine: smooth and glossy). Stone: woody reddish-brown, dark furrows with shreds of red fibre, soft key shadows, low sheen. Varieties: Yellow, White, Nectarine. UI text in English.
出处:作者在原帖下的回复。提示词保留原文语言,未做改写。
原帖:https://x.com/vib3coded/status/2112240323560645092
全部作品数据开源在 GitHub · awesome-opus-5.5-video。
模型归属以作者自述为准,本站未独立复现。播放量为 2026-10-20 的快照。作品版权归原作者,修改署名或下架请在 X 私信 @GoSailGlobal。