Individual skill
code-built-3d
用代码从零件搭 3D 场景并能反过来拆开:每个物件是一个往 Assembly 里加零件的函数(盒子、圆柱、球、线),渲染成技术插画(白灰三档面、细黑描边、白雾),正交等距相机在镜头之间连续运镜,外壳可以降下去露出内部,选中的部分能爆炸成零件并列出零件清单,场景按块无限生成。零图片、零外部资源,three.js 已内置。演示是「无尽楼」:向上无尽的公寓楼,电梯一直往上走,点任意一层进去看、拆开。当用户说「用代码搭一个 3D 场景」「等距 3D 城市」「做成 Train of Thoughts 那种」「全程代码生成不要图片」「能剖开 / 去壳 / 爆炸的 3D」「无限生成的场景」「three.js 做构造」时使用。只在明确请求时触发,忽略顺带提及。
skills/code-built-3d/SKILL.md
Source commit 238e07625aeca5bcf0d6f7cb3e2d07f94c717194
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 6, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 290
- Repository last updated
- Nov 4, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-agents Repository topic
- ai-coding-assistant Repository topic
- claude Repository topic
- claude-code Repository topic
- developer-tools Repository topic
- productivity Repository topic
- automation Repository topic
- agent-skills Repository topic
- code-review Repository topic
- prompt-engineering Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 7,130 bytesSKILL.mdcore · 7,130 bytesassets/demo.htmlasset · 15,166 bytesassets/kit.jsruns · 15,239 bytesassets/tower.jsruns · 21,920 bytesassets/vendor/BufferGeometryUtils.jsruns · 35,539 bytesassets/vendor/THREE-LICENSEasset · 1,081 bytesassets/vendor/three.core.min.jsruns · 384,222 bytesassets/vendor/three.module.min.jsruns · 364,998 bytesscripts/check.mjsruns · 7,814 bytesscripts/lib/env.mjsruns · 3,622 bytesscripts/package.jsonruns · 289 bytesscripts/serve.mjsruns · 1,545 bytes
Read excerpt
# 代码搭 3D 场景
这个 skill 做两件事:从零件把一个东西搭出来,再把它拆开。两件事用同一套零件数据。
| 环节 | 怎么做 | 在哪 |
|---|---|---|
| 零件 | 每个物件是一个函数,往 `Assembly` 里加 `box / cyl / cone / ball / line`。每个零件带名字、角色(`shell` 是能降下去的外壳)、尺寸,可选爆炸方向 | `assets/kit.js` 的 `Assembly` |
| 画法 | 面的明暗按朝向分三档(顶面最亮,朝镜头的两面依次暗一档),每条边描细黑线;离焦点越远(竖向距离或深度)越融进白色 | `createLook()`,一个着色器 |
| 镜头 | 正交相机。镜头 = 目标点、缩放、方位角、仰角,换镜头时用 smootherstep 连续过渡,缩放按对数插值。不硬切 | `Director` |
| 去壳 | 外壳按 y 方向缩到 0,像墙沉进地板。看房间时,上面的楼层整体抬起 | `setShell()`,demo 里的 `LIFT` |
| 拆开 | 把选中的部分改成逐零件建模,零件分层往上升,水平方向不超出给定范围;`manifest()` 给出零件清单(名字、尺寸、位置) | `exploder()`、`Assembly.manifest()` |
| 交互 | 悬停显示包围框和标签,点击切到对应镜头;DOM 气泡钉在 3D 点上,被雾吞掉时自动隐藏 | `picker()`、`outline()`、`labels()` |
| 无限 | 以一个移动的坐标为中心,只保留前后若干块,出范围的块回收;同一个种子永远生成同一座城 | `streamer()`、`rng(seed)` |