Procedural 3D Scenes
Deliver a runnable scene before polishing it. Start with clay/monochrome and no surface textures, unless the user explicitly requests the complete procedural look. Treat the fully procedural version as a second, separately verified delivery—not as unfinished work silently added to the first.
Choose one delivery path
| Request |
Path |
Required child skill |
| 白膜/白模、单色、blockout、快速看构图、先看几何、不要贴图 |
Clay |
three-clay-scenes |
| 全程序化、代码生成材质和贴图、无外部美术资源、完整光照 |
Full |
three-procedural-scenes (includes its Clay diagnostic baseline) |
| 先做白模,之后再做完整版本 |
Clay now; preserve upgrade seams |
Clay first, Full later |
| User only asks for analysis or a plan |
Analyze only; do not modify the scene |
Read the relevant references |
Unless the user explicitly asks for the complete procedural look, default to Clay and state that choice. Do not ask a question when the request already selects a path. “No external assets” alone does not mean “no textures”: code-generated textures belong to Full.
Non-negotiable boundaries
- Ground in the actual project. Read its package manifest, entry point, build scripts, existing renderer, and tests. Reuse its module and error-handling conventions. Never replace the stack merely because these skills use Three.js examples.
- No external art by default. Do not fetch models, image textures, HDRIs, skyboxes, or baked light maps. Runtime library imports allowed by the host project are not art assets.
- Clay means no surface maps. No image/canvas/data textures, texture loaders, generated normal/roughness/AO maps, or environment maps. Internal renderer targets such as shadow maps are not surface textures.
- Full means generated, not downloaded. Texture pixels, material parameters, geometry, and lighting environment must originate in code. Record seeds and cache keys.
- Never deploy, commit, push, install dependencies, or create visible Agent Manager worktrees unless the user requested that action. Internal read/review subagents are sufficient by default.
- Build success is not visual success. A delivery requires a real rendered frame, browser-error inspection, and the checks in
references/verification.md.
Read in this order
- This file.
references/scene-contract.md before assigning implementation work.
- The selected child skill and its listed reference.
references/multi-agent-playbook.md when work splits across agents.
references/verification.md before integration, not after delivery.
references/project-evidence.md only when mining the source project or needing provenance. Its commands and paths are evidence, not universal commands for another repository.
Workflow and gates
Gate 0 — Establish a truthful baseline
- Identify the existing run/build/test commands from scripts actually present.
- Record the current Git state without changing it. Do not overwrite unrelated work.
- Run the narrowest existing smoke/build command only after inspecting its side effects. A documented check that deletes output, installs dependencies, or targets a deployed URL is not a baseline check; do not run it without an explicit user request covering those effects. If the baseline fails, report the pre-existing failure separately from new failures.
- Write a short scene brief: subject, camera intent, interaction, target path, asset restriction, performance target if supplied, and explicit non-goals.
- Define measurable acceptance: route/entry loads, expected objects exist, console/page errors are zero, screenshots are nonblank, mode-specific resource checks pass.
Exit: the current project runs or its baseline blocker is known; the selected path and acceptance checks are explicit.
Gate 1 — Freeze the integration contract
The integrator owns the entry point, renderer, camera/controls policy, shared types, dependencies, and final cleanup. Freeze:
- module factory signatures and return shape;
- coordinate system, units, ground level, forward/up axes, and bounds;
- deterministic seed ownership;
- quality levels and resize/update/dispose behavior;
- each agent's file allow-list;
- test observability and expected object names/counts.
Use the default contract in references/scene-contract.md, adapting names to the project. Workers must request contract changes instead of editing shared files silently.
Exit: two workers cannot need to edit the same file; every requested feature has one owner.
Gate 2 — Produce a thin runnable vertical slice
Implement one representative subject, ground/reference scale, one camera, and the minimal lighting needed to read shape. Keep the update loop alive even if update() is initially empty. Build and open it before multiplying content.
For Clay, stop adding rendering features once geometry, framing, interaction, and stability pass. For Full, keep the clay baseline available as a fallback and comparison image; a diagnostic slice suffices when the user asked for Full directly and no separate Clay delivery was requested.
Exit: first real screenshot exists and is visually inspected; there are no uncaught browser errors.
Gate 3 — Fan out only independent modules
Use multiple agents when at least two substantial modules can proceed independently after the contract is frozen. Otherwise use one implementation agent plus an independent reviewer.
Recommended split:
- Clay: environment geometry; hero/subject geometry; clay lighting and camera; read-only verifier.
- Full: preserve approved geometry; procedural texture/material library; lighting/environment; optional effects; read-only verifier.
Do not assign “make it beautiful” to everyone. Assign files, exported signatures, constraints, and proof. The integrator alone composes shared files and resolves contract amendments; this does not imply a Git merge. See references/multi-agent-playbook.md for copyable prompts and recovery rules.
Exit: every worker returns changed files, self-check evidence, known gaps, and no unauthorized contract changes.
Gate 4 — Integrate in dependency order
- Shared contract and renderer shell.
- Geometry and scene layout.
- Mode-specific material system.
- Lighting/environment.
- Optional animation/effects.
- Test hooks and project-owned checks.
- Resize, quality switches, restart/teardown, and disposal.
After each stage, rerun the same narrow check. Do not batch all failures until the end. Preserve a clay toggle or previous approved entry when practical; fallback code must not secretly generate Full textures in Clay mode.
Gate 5 — Verify and review
Run references/verification.md in this order:
- Static/resource-policy checks.
- Project build/type checks.
- Browser load and console checks.
- Desktop and narrow-viewport screenshots; inspect the images.
- Interaction, resize, quality/mode switches, and restart.
- Resource stability over repeated cycles or a representative soak.
- One fresh-context reviewer for contract violations, missing disposal, nondeterminism, and unsupported claims.
A reviewer does not replace running checks. Reproduce important review findings before changing code.
Gate 6 — Deliver only what was proven
Report:
- selected path and actual entry/route;
- commands run and their outcomes;
- screenshots or captures produced;
- procedural seed and quality controls, if applicable;
- remaining limitations and unrun checks;
- no claim of deployment, performance, or visual parity without evidence.
Definition of done
Clay delivery
- Recognizable silhouettes, correct scale/contact, readable monochrome shading, and intentional camera.
- Every scene material has no surface map slots populated; no texture-generation or loader path executes.
- No external visual assets and no required postprocessing.
- Build/browser/interaction/resource checks pass or are explicitly listed as not run.
Full delivery
- The approved geometry/layout remains intact unless a change is documented.
- All geometry, lighting environment, materials, and texture content are generated locally in code with deterministic seeds where randomness is used.
- Texture generation is cached and outside the frame loop; disposal covers geometries, materials, generated textures, render targets, controls, listeners, and composer passes owned by the scene.
- Desktop/mobile-appropriate quality behavior and browser screenshots are checked; no console errors or runaway GPU-resource growth.
Stop and recover
- WebGL unavailable/context lost: show a readable failure state; do not claim success from a blank canvas. Restore only through the project's owned lifecycle.
- Visual regression after Full upgrade: disable texture/effect layers in reverse integration order; retain the last good clay scene.
- Performance drops: measure first. Reduce pixel ratio, shadow cost, generated texture size/count, geometry duplication, and postprocessing before changing the art direction randomly.
- Agent needs a shared-file change: stop that worker's edit, send an amendment request to the integrator, update the contract once, then resume affected work.
- No browser automation available: state that visual/browser validation was not performed; do not replace it with “build passed.”
References
references/scene-contract.md — frozen APIs, ownership, seed/quality/disposal contract.
references/multi-agent-playbook.md — role matrix, copyable worker prompts, integration and repair protocol.
references/verification.md — checklist to execute against the host project (not pre-executed) and failure triage.
references/project-evidence.md — source-project patterns and exact source anchors; provenance, not a universal template.
1---2name: procedural-3d-scenes3description: Orchestrate browser-based procedural 3D scenes with a clay-first delivery path and a separate fully procedural lighting/material/texture path. Use for Three.js scene generation, white-model or monochrome blockouts, code-only visual assets, multi-agent scene implementation, or upgrading an approved clay scene without external art assets. Not for 2D-only games, imported-asset showcases, or deployment without an explicit request.4metadata:5 source: https://skillmd.com/skills/yhyu13/procedural-3d-scenes6 version: 1.0.17 category: 3d-rendering8 source-project: opus55-3d-games9 source-of-truth: .claude/skills/procedural-3d-scenes10---1112# Procedural 3D Scenes1314Deliver a runnable scene before polishing it. Start with **clay/monochrome and no surface textures**, unless the user explicitly requests the complete procedural look. Treat the fully procedural version as a second, separately verified delivery—not as unfinished work silently added to the first.1516## Choose one delivery path1718| Request | Path | Required child skill |19|---|---|---|20| 白膜/白模、单色、blockout、快速看构图、先看几何、不要贴图 | **Clay** | `three-clay-scenes` |21| 全程序化、代码生成材质和贴图、无外部美术资源、完整光照 | **Full** | `three-procedural-scenes` (includes its Clay diagnostic baseline) |22| 先做白模,之后再做完整版本 | **Clay now; preserve upgrade seams** | Clay first, Full later |23| User only asks for analysis or a plan | Analyze only; do not modify the scene | Read the relevant references |2425Unless the user explicitly asks for the complete procedural look, default to Clay and state that choice. Do not ask a question when the request already selects a path. “No external assets” alone does not mean “no textures”: code-generated textures belong to Full.2627## Non-negotiable boundaries28291. **Ground in the actual project.** Read its package manifest, entry point, build scripts, existing renderer, and tests. Reuse its module and error-handling conventions. Never replace the stack merely because these skills use Three.js examples.302. **No external art by default.** Do not fetch models, image textures, HDRIs, skyboxes, or baked light maps. Runtime library imports allowed by the host project are not art assets.313. **Clay means no surface maps.** No image/canvas/data textures, texture loaders, generated normal/roughness/AO maps, or environment maps. Internal renderer targets such as shadow maps are not surface textures.324. **Full means generated, not downloaded.** Texture pixels, material parameters, geometry, and lighting environment must originate in code. Record seeds and cache keys.335. **Never deploy, commit, push, install dependencies, or create visible Agent Manager worktrees unless the user requested that action.** Internal read/review subagents are sufficient by default.346. **Build success is not visual success.** A delivery requires a real rendered frame, browser-error inspection, and the checks in `references/verification.md`.3536## Read in this order37381. This file.392. `references/scene-contract.md` before assigning implementation work.403. The selected child skill and its listed reference.414. `references/multi-agent-playbook.md` when work splits across agents.425. `references/verification.md` before integration, not after delivery.436. `references/project-evidence.md` only when mining the source project or needing provenance. Its commands and paths are evidence, not universal commands for another repository.4445## Workflow and gates4647### Gate 0 — Establish a truthful baseline4849- Identify the existing run/build/test commands from scripts actually present.50- Record the current Git state without changing it. Do not overwrite unrelated work.51- Run the narrowest existing smoke/build command only after inspecting its side effects. A documented check that deletes output, installs dependencies, or targets a deployed URL is not a baseline check; do not run it without an explicit user request covering those effects. If the baseline fails, report the pre-existing failure separately from new failures.52- Write a short scene brief: subject, camera intent, interaction, target path, asset restriction, performance target if supplied, and explicit non-goals.53- Define measurable acceptance: route/entry loads, expected objects exist, console/page errors are zero, screenshots are nonblank, mode-specific resource checks pass.5455**Exit:** the current project runs or its baseline blocker is known; the selected path and acceptance checks are explicit.5657### Gate 1 — Freeze the integration contract5859The integrator owns the entry point, renderer, camera/controls policy, shared types, dependencies, and final cleanup. Freeze:6061- module factory signatures and return shape;62- coordinate system, units, ground level, forward/up axes, and bounds;63- deterministic seed ownership;64- quality levels and resize/update/dispose behavior;65- each agent's file allow-list;66- test observability and expected object names/counts.6768Use the default contract in `references/scene-contract.md`, adapting names to the project. Workers must request contract changes instead of editing shared files silently.6970**Exit:** two workers cannot need to edit the same file; every requested feature has one owner.7172### Gate 2 — Produce a thin runnable vertical slice7374Implement one representative subject, ground/reference scale, one camera, and the minimal lighting needed to read shape. Keep the update loop alive even if `update()` is initially empty. Build and open it before multiplying content.7576For Clay, stop adding rendering features once geometry, framing, interaction, and stability pass. For Full, keep the clay baseline available as a fallback and comparison image; a diagnostic slice suffices when the user asked for Full directly and no separate Clay delivery was requested.7778**Exit:** first real screenshot exists and is visually inspected; there are no uncaught browser errors.7980### Gate 3 — Fan out only independent modules8182Use multiple agents when at least two substantial modules can proceed independently after the contract is frozen. Otherwise use one implementation agent plus an independent reviewer.8384Recommended split:8586- **Clay:** environment geometry; hero/subject geometry; clay lighting and camera; read-only verifier.87- **Full:** preserve approved geometry; procedural texture/material library; lighting/environment; optional effects; read-only verifier.8889Do not assign “make it beautiful” to everyone. Assign files, exported signatures, constraints, and proof. The integrator alone composes shared files and resolves contract amendments; this does not imply a Git merge. See `references/multi-agent-playbook.md` for copyable prompts and recovery rules.9091**Exit:** every worker returns changed files, self-check evidence, known gaps, and no unauthorized contract changes.9293### Gate 4 — Integrate in dependency order94951. Shared contract and renderer shell.962. Geometry and scene layout.973. Mode-specific material system.984. Lighting/environment.995. Optional animation/effects.1006. Test hooks and project-owned checks.1017. Resize, quality switches, restart/teardown, and disposal.102103After each stage, rerun the same narrow check. Do not batch all failures until the end. Preserve a clay toggle or previous approved entry when practical; fallback code must not secretly generate Full textures in Clay mode.104105### Gate 5 — Verify and review106107Run `references/verification.md` in this order:1081091. Static/resource-policy checks.1102. Project build/type checks.1113. Browser load and console checks.1124. Desktop and narrow-viewport screenshots; inspect the images.1135. Interaction, resize, quality/mode switches, and restart.1146. Resource stability over repeated cycles or a representative soak.1157. One fresh-context reviewer for contract violations, missing disposal, nondeterminism, and unsupported claims.116117A reviewer does not replace running checks. Reproduce important review findings before changing code.118119### Gate 6 — Deliver only what was proven120121Report:122123- selected path and actual entry/route;124- commands run and their outcomes;125- screenshots or captures produced;126- procedural seed and quality controls, if applicable;127- remaining limitations and unrun checks;128- no claim of deployment, performance, or visual parity without evidence.129130## Definition of done131132### Clay delivery133134- Recognizable silhouettes, correct scale/contact, readable monochrome shading, and intentional camera.135- Every scene material has no surface map slots populated; no texture-generation or loader path executes.136- No external visual assets and no required postprocessing.137- Build/browser/interaction/resource checks pass or are explicitly listed as not run.138139### Full delivery140141- The approved geometry/layout remains intact unless a change is documented.142- All geometry, lighting environment, materials, and texture content are generated locally in code with deterministic seeds where randomness is used.143- Texture generation is cached and outside the frame loop; disposal covers geometries, materials, generated textures, render targets, controls, listeners, and composer passes owned by the scene.144- Desktop/mobile-appropriate quality behavior and browser screenshots are checked; no console errors or runaway GPU-resource growth.145146## Stop and recover147148- **WebGL unavailable/context lost:** show a readable failure state; do not claim success from a blank canvas. Restore only through the project's owned lifecycle.149- **Visual regression after Full upgrade:** disable texture/effect layers in reverse integration order; retain the last good clay scene.150- **Performance drops:** measure first. Reduce pixel ratio, shadow cost, generated texture size/count, geometry duplication, and postprocessing before changing the art direction randomly.151- **Agent needs a shared-file change:** stop that worker's edit, send an amendment request to the integrator, update the contract once, then resume affected work.152- **No browser automation available:** state that visual/browser validation was not performed; do not replace it with “build passed.”153154## References155156- `references/scene-contract.md` — frozen APIs, ownership, seed/quality/disposal contract.157- `references/multi-agent-playbook.md` — role matrix, copyable worker prompts, integration and repair protocol.158- `references/verification.md` — checklist to execute against the host project (not pre-executed) and failure triage.159- `references/project-evidence.md` — source-project patterns and exact source anchors; provenance, not a universal template.