ai21.net
语言

果冻南瓜渲染对比

演示视频

果冻南瓜渲染对比 — 1

提示词

Build a single self-contained HTML file: a simple 3D "Jelly Pumpkin" demo using three.js from a CDN. Keep the code short and basic.

SCENE
- One orange pumpkin in the centre made from a low-poly sphere (about 24x16 segments) with 8 shallow ribs, flat shading.
- MeshPhongMaterial, slightly transparent (opacity 0.9), bright orange with a little emissive colour. No transmission, no environment map, no post-processing.
- Jack-o'-lantern face made of flat black 2D shapes (two triangle eyes, triangle nose, zigzag mouth) placed just in front of the pumpkin surface. No glow from inside.
- Simple green cylinder stem on top.
- Three small low-poly pumpkins (purple, green, orange) and four small flattened spheres as candy around it.
- White background, ambient light plus one directional light, basic hard shadows on the floor.

INTERACTION
- Click the pumpkin: it squashes slightly (scale Y down, X/Z up) and springs back quickly with no extra wobble.
- Drag the stem: draw a straight thin green cylinder from the stem to the cursor. Dragging upward lifts the whole pumpkin rigidly; release and it falls, with one small bounce.
- "Carve Face" button: instantly swap to a second face (two black circle eyes, round mouth).
- "Glow" slider: changes the emissive intensity of the pumpkin a little.
- "Add Candy" button: drops 16 small spheres from above; they fall, bounce once on the floor and stop. No collision with the pumpkin.

UI
- Plain HTML: title "Jelly Pumpkin" in bold Arial top left, subtitle "Click the pumpkin to make it wobble!".
- Top right white box with border: colour buttons (Orange, Purple, Green), Glow range input, "Carve Face" and "Add Candy" buttons with default browser styling.
- Bottom left small grey text with stats: "Wobble: 0.6 | Face: 1 | Candy: 0".

中文译文

构建一个单一的自包含 HTML 文件:一个简单的 3D “Jelly Pumpkin” 演示,使用来自 CDN 的 three.js。代码保持简短基础。

场景
- 中央一个橙色南瓜,由低多边形球体(约 24x16 分段)构成,带 8 条浅棱,平面着色。
- MeshPhongMaterial,略微透明(opacity 0.9),亮橙色,带一点自发光颜色。不使用 transmission,不使用环境贴图,不使用后期处理。
- 南瓜灯脸由扁平的黑色 2D 形状(两只三角形眼睛、三角形鼻子、锯齿形嘴)构成,紧贴在南瓜表面前方。内部不得发光。
- 顶部一个简单的绿色圆柱形瓜蒂。
- 周围有三个低多边形小南瓜(紫色、绿色、橙色)和四个小扁球体作为糖果。
- 白色背景,环境光加一盏平行光,地面有基础的硬阴影。

交互
- 点击南瓜:它略微压扁(Y 轴缩放变小,X/Z 轴变大),然后迅速弹回,不产生额外晃动。
- 拖拽瓜蒂:从瓜蒂到光标之间绘制一根笔直的细绿色圆柱。向上拖拽会刚性地抬起整个南瓜;松开后它下落,并有一次小幅弹跳。
- “Carve Face” 按钮:立即切换到第二张脸(两只黑色圆形眼睛、圆形的嘴)。
- “Glow” 滑块:略微改变南瓜的自发光强度。
- “Add Candy” 按钮:从上方落下 16 个小球体;它们下落,在地面弹跳一次后停止。不与南瓜发生碰撞。

UI
- 纯 HTML:左上角用加粗 Arial 显示标题 “Jelly Pumpkin”,副标题 “Click the pumpkin to make it wobble!”。
- 右上角带边框的白色方框:颜色按钮(Orange、Purple、Green)、Glow 范围输入、“Carve Face” 与 “Add Candy” 按钮,使用浏览器默认样式。
- 左下角灰色小字显示统计:“Wobble: 0.6 | Face: 1 | Candy: 0”。

溯源

原作者
semichenkko
发布日期
2026-10-15(由推文 ID 反解)
原始出处
查看原帖 ↗
收录来源
zhuyansen/awesome-opus-5.5-video · 2110746878040055904 · 未声明许可