$npx -y skills add scottstts/Threejs-Awesome-Graphics-Agent-Skills --skill threejs-procedural-geometryBuild production procedural mesh systems in Three.js. Use for complete hard-surface object assemblies, tilted shell lofts, UV-owned apertures, sculpted rail and frame profiles, oriented branch rings, semantic mesh writers, deliberate skins and caps, fin lofts, custom normals, mat
| 1 | # Procedural Geometry |
| 2 | |
| 3 | Generate geometry from a semantic plan and an explicit coordinate frame. Triangle emission is the final compilation step, not the design model. |
| 4 | |
| 5 | ## Build order |
| 6 | |
| 7 | 1. Define dimensions and semantic segments. |
| 8 | 2. Generate a centerline, boundary, profile, or placement plan. |
| 9 | 3. Build the mechanism-appropriate local parameterization or branch orientation. |
| 10 | 4. Emit vertices with intentional seams and material ownership. |
| 11 | 5. Generate UVs from real distance. |
| 12 | 6. Validate winding, normals, tangents, bounds, and degenerates. |
| 13 | 7. Select merging, instancing, or LOD by update and material behavior. |
| 14 | |
| 15 | Read [references/profile-sweeps-and-mesh-writers.md](references/profile-sweeps-and-mesh-writers.md) |
| 16 | for the exact sculpted-frame profile, rail emission, tree rings, semantic mesh |
| 17 | writer, and their observed scaling limits. |
| 18 | |
| 19 | Read the |
| 20 | [sculpted gallery frame geometry](examples/sculpted-gallery-frame/frame-geometry.js) |
| 21 | for the profile sweep, miter-like rail mapping, authored PBR surface |
| 22 | bundles, grazing spotlights, selective bloom ownership, and geometry |
| 23 | diagnostics. |
| 24 | |
| 25 | Read |
| 26 | [references/complete-submarine-assembly.md](references/complete-submarine-assembly.md) |
| 27 | for the exact dimensioned object contract, shared loft/sweep kernel, UV-owned |
| 28 | apertures, semantic subassemblies, generated fittings, and complete-model |
| 29 | diagnostics. |
| 30 | |
| 31 | Read the |
| 32 | [porcelain-and-brass submarine model](examples/porcelain-brass-submarine/submarine-model.js) |
| 33 | for a complete hard-surface assembly with a tilted-collar hull loft, |
| 34 | parallel-transport trim, furnished glass cabin, shrouded propeller, lens-section |
| 35 | fins, generated material inputs, and per-part triangle evidence. |
| 36 | |
| 37 | Read the |
| 38 | [procedural financial tower compiler](../threejs-procedural-architecture/examples/procedural-financial-tower/building-system.js) |
| 39 | for semantic placement compilation and material-slot instancing at building |
| 40 | scale. |
| 41 | |
| 42 | ## Failure conditions |
| 43 | |
| 44 | - profile orientation flips along a curve; |
| 45 | - caps reuse side vertices and create averaged edge normals; |
| 46 | - UV scale changes with segment count; |
| 47 | - arbitrary vertex merging destroys hard edges or material boundaries; |
| 48 | - generated dimensions are hidden in magic multipliers; |
| 49 | - instancing is used despite per-instance topology differences; |
| 50 | - triangle count is the only reported complexity metric; |
| 51 | - apertures, frames, and glazing use unrelated coordinate systems; |
| 52 | - complete object parts are positioned by late visual nudges instead of a |
| 53 | shared dimension contract. |
| 54 | |
| 55 | ## Routing boundary |
| 56 | |
| 57 | This skill owns reusable mesh emission. Use |
| 58 | `$threejs-procedural-materials` when surface identity is primary, |
| 59 | `$threejs-procedural-architecture` for a building grammar, and |
| 60 | `$threejs-procedural-vegetation` for a growth hierarchy; those subject skills |
| 61 | may then apply these geometry mechanisms. |