团子去旅行

像素冰球场

浮空的像素风户外冰场:2 对 2 冰球比赛、浇冰车整冰、昼夜与飘雪切换,全部以低分辨率渲染再放大成像素画。场景测试模型对自定义渲染管线、调色板、冰面反射、比赛 AI 和复杂 UI 的综合控制。

Opus 5.5

像素冰球场 — 3D 场景缩略图

原始提示词

下面是从提示词文件中原样复制的正文。同一场景的各版本使用同一份提示词;为避免重复,这里只完整展示一次。

Build "Pixel Ice Rink" — a single-file, real-time three.js (r160, ES module via import map from jsDelivr) page: an isometric diorama of a floating outdoor ice rink, rendered as crisp pixel art in the style of "3D rendered as pixel art". UI text in English.

RENDER PIPELINE
- Orthographic camera at ~31° elevation, azimuth 45° + 90° steps (animated turns, drag sideways or buttons), wheel/pinch zoom. Fit the whole floating slab into the free screen area (clear of the title, a top-centre scoreboard and a right control rail).
- Render the scene into a tiny target (screen / pixel size, ~480×300 on desktop) with no anti-aliasing. Snap the camera so the world origin lands on a whole pixel (static things never shimmer).
- Post pass on a full-screen quad:
  - depth-based outlines: darken a pixel that stands >0.55 m in front of a neighbour;
  - map every pixel to the nearest colour of a fixed ~49-colour winter palette in OKLab (snow/ice greys, ice blues, reds, lamplight/wood/skin, pines, dusk peach/rose/mauve/lilac, brass/ochre);
  - optional light 4×4 Bayer dither;
  - upscale with texelFetch so each art pixel is an exact block of device pixels. The background (depth = 1) is the page colour.
- Hard sun shadows (BasicShadowMap, 2048). Lambert flat-shaded low-poly materials.
- Planar ice reflection: render the scene mirrored (scene.scale.y = -1 about the ice plane, ground, ice, particles and lamp posts hidden) into a second target. Sample it in the ice shader at gl_FragCoord. Gloss = small base + extra where the ice is wet, reduced where it is worn.
- A "Raw 3D" mode renders the same scene at full resolution with MSAA, for comparison.

SCENE
- A floating slab of snow over earth over rock, each extruded from a ragged rounded rectangle.
- A 24×12 m rink with 3 m corners: white boards with a yellow kick plate and red cap, built as band segments with gaps for two bench doors and a double resurfacer gate (hinged doors that swing open).
- Ice markings painted texel-by-texel into a 10 px/m canvas: red centre and goal lines, blue lines, circles, face-off dots, creases.
- Red-post goals with alpha-tested grid nets; players' benches; a lit scoreboard drawn with 3×5 pixel digits.
- A log warming hut with lit windows and chimney smoke; a garage for the resurfacer; lamp posts with point lights; string lights at night.
- Snowy stacked-cone pines, snowbanks, a snowman.

PLAYERS — procedural rigs of ~16 boxes
- Placed every frame from heading, lean, crouch and turn roll. Two-bone IK for the legs (skating stride with push-out and toe-out, gliding, sideways hockey stop) and for the arms holding a stick.
- Stick poses: carry/stickhandle, slap-shot wind-up and strike, pass sweep, celebration with stick raised.
- Goalies: pads, blocker and glove, crease positioning, butterfly drop on incoming shots.

GAME
- Two-on-two pick-up hockey plus goalies. Steering with arrival, separation and board/net avoidance; hockey stops when reversing hard.
- Carrier AI weaves to the slot, shoots when the lane is open, passes when pressured. Defenders pressure goal-side and poke-check; the nearest skater chases a loose puck.
- Puck physics with substeps: friction, board bounces, posts, solid nets with goal detection through the mouth, goalie saves (deflect or catch and play out), blocks by skates.
- Face-offs, goal celebrations, score, shots and a game clock on the scoreboard. Clicking the ice drops a puck.

ICE WEAR
- An RG DataTexture over the rink (20 px/m). Blades write scratches as they glide; stops gouge wider marks and throw spray particles that settle as wear; falling snow settles too.
- "Resurface the ice": players skate off through the bench doors; the resurfacer drives out of its garage through the gate and does shrinking rounded-rectangle laps (swinging in front of the nets), wiping its swath and leaving wet, reflective ice that dries over time. Then the players return for a face-off. Show an "ice worn %" bar.

UI
- Pixel display font (Silkscreen) with a clean body font.
- Light and dark themes via tokens; the background is a near-white or near-black page.
- Controls: Day / Dusk / Night (lighting presets blended over ~1.6 s), Snow Off / Light / Heavy, Resurface, Drop a puck, Pause, New game, Turn left / right, Pixel art / Raw 3D, Pixel size slider, Palette / Dither / Outlines toggles.
- A "How it's drawn" panel explaining the pipeline. Stacked mobile layout with no horizontal scroll.

各版本的提示词文件只差用于展示提示词的 data-id 行和生成方式说明,场景描述正文相同。

版本对比

文件大小与行数来自该版本的单文件 index.html;技术标签由简单正则从源码中检测,只表示代码里出现了这类 API,不代表实现质量。

模型 在线场景 大小 行数 检测到的 three.js 技术
Opus 5.5
提示词
打开 ↗ 83.3 KB 1,381 Shadow mapsInstancedMeshShaderMaterial / GLSLRaycast interactionParticles / points

对比观察

以下记录来自逐版阅读源码,只描述代码中能观察到的结构、动画与交互差异,不对模型作笼统排名。

这个场景目前只有 Opus 5.5 一个版本,没有跨模型并排差异可记;它把渲染与玩法都压进一个 1382 行的 HTML。画面先渲到约 480×300 的离屏目标,再用深度描边、49 色 OKLab 调色板、Bayer 抖动和 texelFetch 放大成像素画;冰面用镜像场景做平面反射,磨损写进 RG DataTexture。玩法有 2 对 2 球员与守门员、传球/射门/扑救、界墙反弹、争球和进球庆祝,浇冰车会从车库开出擦掉划痕。UI 提供 Day/Dusk/Night、Snow Off/Light/Heavy、Resurface、Drop a puck、Pause、New game、左右转向、Pixel art/Raw 3D、像素大小滑杆和调色板/抖动/描边开关。整个页面约 83 KB,却同时包含比赛 AI、冰面磨损和可切换的像素/原始 3D 视图。

这个场景是怎么做出来的

同一条提示词被分别交给下列模型。提示词要求生成一个可直接在现代浏览器打开的单文件 HTML,three.js 通过 CDN 的 import map 固定版本加载,几何体、材质和贴图全部由代码程序化生成,不能使用外部模型或图片。

生成结果作为静态页面发布在 GitHub Pages 上,没有构建步骤,也没有后端。页面里的尺寸、行数和技术标签是生成后从源码统计的;提示词原文公开在 3d/prompts/ 下,方便对照或复现。

发布前会检查页面能否加载、交互是否可用、移动端布局是否正常,必要时做站点层面的集成修正;场景内容本身由模型生成。下面列出每个版本使用时的模型说明。

  • Opus 5.5 同一提示词,用 Claude Opus 5.5 生成。