@developerz.ai/ts23d 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/bug-hunter.md +21 -0
- package/.claude/agents/docs-author.md +13 -0
- package/.claude/agents/dx-auditor.md +14 -0
- package/.claude/agents/primitive-author.md +22 -0
- package/.claude/agents/recipe-author.md +36 -0
- package/.claude/agents/visual-reviewer.md +23 -0
- package/.claude/commands/feature.md +28 -0
- package/.claude/commands/new-recipe.md +19 -0
- package/.claude/commands/release.md +14 -0
- package/.claude/commands/verify.md +9 -0
- package/.claude/skills/author-recipe/SKILL.md +93 -0
- package/CHANGELOG.md +79 -0
- package/CLAUDE.md +85 -0
- package/LICENSE +21 -0
- package/README.md +380 -2
- package/dist/chunk-11v28977.js +1575 -0
- package/dist/chunk-11v28977.js.map +30 -0
- package/dist/chunk-1ypfs7ga.js +3571 -0
- package/dist/chunk-1ypfs7ga.js.map +42 -0
- package/dist/chunk-4ddzsqtc.js +464 -0
- package/dist/chunk-4ddzsqtc.js.map +19 -0
- package/dist/chunk-a8fxakcj.js +19 -0
- package/dist/chunk-a8fxakcj.js.map +11 -0
- package/dist/chunk-gcyp9b4d.js +755 -0
- package/dist/chunk-gcyp9b4d.js.map +22 -0
- package/dist/chunk-kgvbpqqw.js +44 -0
- package/dist/chunk-kgvbpqqw.js.map +10 -0
- package/dist/chunk-kvcep7ft.js +1919 -0
- package/dist/chunk-kvcep7ft.js.map +43 -0
- package/dist/chunk-ravbb06q.js +89 -0
- package/dist/chunk-ravbb06q.js.map +11 -0
- package/dist/chunk-w1zyhj40.js +1031 -0
- package/dist/chunk-w1zyhj40.js.map +21 -0
- package/dist/chunk-wtqhq529.js +2532 -0
- package/dist/chunk-wtqhq529.js.map +43 -0
- package/dist/chunk-xnt2sdhf.js +836 -0
- package/dist/chunk-xnt2sdhf.js.map +17 -0
- package/dist/cli/args.d.ts +24 -0
- package/dist/cli/bin.d.ts +2 -0
- package/dist/cli/bin.js +307 -0
- package/dist/cli/bin.js.map +14 -0
- package/dist/cli/load.d.ts +2 -0
- package/dist/cli/manifest.d.ts +49 -0
- package/dist/cli/render-cmds.d.ts +12 -0
- package/dist/cli/run.d.ts +1 -0
- package/dist/core/asset.d.ts +10 -0
- package/dist/core/definition.d.ts +148 -0
- package/dist/core/errors.d.ts +17 -0
- package/dist/core/family.d.ts +23 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.js +69 -0
- package/dist/core/index.js.map +9 -0
- package/dist/core/mesh.d.ts +35 -0
- package/dist/core/part.d.ts +114 -0
- package/dist/core/png.d.ts +1 -0
- package/dist/core/rng.d.ts +12 -0
- package/dist/core/transform.d.ts +20 -0
- package/dist/core/vec.d.ts +11 -0
- package/dist/core/world.d.ts +16 -0
- package/dist/export/bin-writer.d.ts +16 -0
- package/dist/export/container.d.ts +3 -0
- package/dist/export/glb.d.ts +38 -0
- package/dist/export/index.d.ts +4 -0
- package/dist/export/index.js +26 -0
- package/dist/export/index.js.map +9 -0
- package/dist/export/lights.d.ts +8 -0
- package/dist/export/materials.d.ts +23 -0
- package/dist/export/merge-pivots.d.ts +6 -0
- package/dist/export/metadata.d.ts +19 -0
- package/dist/export/motion.d.ts +9 -0
- package/dist/export/optimize-parts.d.ts +26 -0
- package/dist/export/primitive.d.ts +3 -0
- package/dist/export/tangents.d.ts +2 -0
- package/dist/export/textures.d.ts +22 -0
- package/dist/export/version.d.ts +2 -0
- package/dist/grammar/index.d.ts +2 -0
- package/dist/grammar/index.js +16 -0
- package/dist/grammar/index.js.map +9 -0
- package/dist/grammar/split.d.ts +21 -0
- package/dist/grammar/whyte.d.ts +5 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +411 -0
- package/dist/index.js.map +9 -0
- package/dist/kinds/building.d.ts +44 -0
- package/dist/kinds/faces.d.ts +27 -0
- package/dist/kinds/head-armour.d.ts +9 -0
- package/dist/kinds/head-beard.d.ts +6 -0
- package/dist/kinds/head-bust.d.ts +4 -0
- package/dist/kinds/head-extras.d.ts +15 -0
- package/dist/kinds/head-face.d.ts +6 -0
- package/dist/kinds/head-geom.d.ts +7 -0
- package/dist/kinds/head-hair.d.ts +4 -0
- package/dist/kinds/head-layout.d.ts +29 -0
- package/dist/kinds/head-mesh.d.ts +27 -0
- package/dist/kinds/head-params.d.ts +108 -0
- package/dist/kinds/head-presets.d.ts +19 -0
- package/dist/kinds/head-rim.d.ts +10 -0
- package/dist/kinds/head.d.ts +39 -0
- package/dist/kinds/hull-lines.d.ts +65 -0
- package/dist/kinds/hull-skin.d.ts +6 -0
- package/dist/kinds/hull.d.ts +14 -0
- package/dist/kinds/index.d.ts +16 -0
- package/dist/kinds/index.js +78 -0
- package/dist/kinds/index.js.map +9 -0
- package/dist/kinds/mass.d.ts +15 -0
- package/dist/kinds/openings.d.ts +30 -0
- package/dist/kinds/planned.d.ts +6 -0
- package/dist/kinds/roof-chimney.d.ts +16 -0
- package/dist/kinds/roof-shape.d.ts +64 -0
- package/dist/kinds/roof.d.ts +31 -0
- package/dist/kinds/vegetation-fronds.d.ts +15 -0
- package/dist/kinds/vegetation-impostor.d.ts +9 -0
- package/dist/kinds/vegetation-leaves.d.ts +15 -0
- package/dist/kinds/vegetation-mesh.d.ts +21 -0
- package/dist/kinds/vegetation-params.d.ts +90 -0
- package/dist/kinds/vegetation-presets.d.ts +20 -0
- package/dist/kinds/vegetation-skeleton.d.ts +20 -0
- package/dist/kinds/vegetation.d.ts +42 -0
- package/dist/kinds/vehicle.d.ts +42 -0
- package/dist/material/generator.d.ts +4 -0
- package/dist/material/index.d.ts +4 -0
- package/dist/material/index.js +38 -0
- package/dist/material/index.js.map +9 -0
- package/dist/material/paint/bond.d.ts +3 -0
- package/dist/material/paint/canvas.d.ts +32 -0
- package/dist/material/paint/cell.d.ts +4 -0
- package/dist/material/paint/cells-round.d.ts +5 -0
- package/dist/material/paint/cells.d.ts +7 -0
- package/dist/material/paint/compose.d.ts +5 -0
- package/dist/material/paint/concrete.d.ts +3 -0
- package/dist/material/paint/courses.d.ts +31 -0
- package/dist/material/paint/decode-png.d.ts +6 -0
- package/dist/material/paint/default-sheet.d.ts +2 -0
- package/dist/material/paint/foliage-broad.d.ts +5 -0
- package/dist/material/paint/foliage-common.d.ts +35 -0
- package/dist/material/paint/foliage-compound.d.ts +4 -0
- package/dist/material/paint/foliage-conifer.d.ts +5 -0
- package/dist/material/paint/foliage-raster.d.ts +26 -0
- package/dist/material/paint/foliage.d.ts +3 -0
- package/dist/material/paint/masks.d.ts +3 -0
- package/dist/material/paint/noise.d.ts +9 -0
- package/dist/material/paint/normal.d.ts +8 -0
- package/dist/material/paint/orm.d.ts +8 -0
- package/dist/material/paint/planks.d.ts +3 -0
- package/dist/material/paint/plates.d.ts +3 -0
- package/dist/material/paint/shapes.d.ts +8 -0
- package/dist/material/paint/slate.d.ts +3 -0
- package/dist/material/paint/stamp.d.ts +3 -0
- package/dist/material/paint/strip.d.ts +3 -0
- package/dist/material/paint/surface.d.ts +5 -0
- package/dist/material/paint/types.d.ts +35 -0
- package/dist/material/paint/validate.d.ts +3 -0
- package/dist/material/palette.d.ts +12 -0
- package/dist/material/shader-godot.d.ts +2 -0
- package/dist/material/shader-three.d.ts +2 -0
- package/dist/material/shader.d.ts +46 -0
- package/dist/material/trim-sheet.d.ts +22 -0
- package/dist/neural/generator.d.ts +25 -0
- package/dist/neural/images.d.ts +17 -0
- package/dist/neural/index.d.ts +2 -0
- package/dist/neural/index.js +14 -0
- package/dist/neural/index.js.map +9 -0
- package/dist/passes/bake-ao.d.ts +17 -0
- package/dist/passes/grime.d.ts +15 -0
- package/dist/passes/index.d.ts +6 -0
- package/dist/passes/index.js +22 -0
- package/dist/passes/index.js.map +9 -0
- package/dist/passes/livery.d.ts +19 -0
- package/dist/passes/optimize-cache.d.ts +15 -0
- package/dist/passes/optimize-weld.d.ts +15 -0
- package/dist/passes/optimize.d.ts +28 -0
- package/dist/passes/ray-grid.d.ts +23 -0
- package/dist/passes/weighted-normals.d.ts +8 -0
- package/dist/primitives/beam.d.ts +17 -0
- package/dist/primitives/bevel-box.d.ts +13 -0
- package/dist/primitives/box.d.ts +16 -0
- package/dist/primitives/cell.d.ts +20 -0
- package/dist/primitives/check.d.ts +12 -0
- package/dist/primitives/closed.d.ts +11 -0
- package/dist/primitives/erosion.d.ts +22 -0
- package/dist/primitives/font-5x7.d.ts +3 -0
- package/dist/primitives/heightfield.d.ts +16 -0
- package/dist/primitives/index.d.ts +23 -0
- package/dist/primitives/index.js +81 -0
- package/dist/primitives/index.js.map +9 -0
- package/dist/primitives/lathe-facets.d.ts +8 -0
- package/dist/primitives/lathe.d.ts +26 -0
- package/dist/primitives/lattice.d.ts +30 -0
- package/dist/primitives/loft.d.ts +15 -0
- package/dist/primitives/mc-table.d.ts +2 -0
- package/dist/primitives/member.d.ts +19 -0
- package/dist/primitives/noise.d.ts +34 -0
- package/dist/primitives/planar.d.ts +10 -0
- package/dist/primitives/prism.d.ts +13 -0
- package/dist/primitives/sculpt-edit.d.ts +56 -0
- package/dist/primitives/sculpt-tree.d.ts +23 -0
- package/dist/primitives/sculpt.d.ts +27 -0
- package/dist/primitives/sdf-grid.d.ts +17 -0
- package/dist/primitives/sdf-ops.d.ts +37 -0
- package/dist/primitives/sdf.d.ts +21 -0
- package/dist/primitives/strip-uv.d.ts +11 -0
- package/dist/primitives/surface-nets.d.ts +7 -0
- package/dist/primitives/sweep.d.ts +19 -0
- package/dist/primitives/terrain-color.d.ts +30 -0
- package/dist/primitives/terrain-grid.d.ts +36 -0
- package/dist/primitives/text-layout.d.ts +22 -0
- package/dist/primitives/text.d.ts +27 -0
- package/dist/primitives/tiled.d.ts +22 -0
- package/dist/primitives/transport.d.ts +17 -0
- package/dist/primitives/triangulate.d.ts +2 -0
- package/dist/primitives/value-noise.d.ts +10 -0
- package/dist/qa/checks.d.ts +11 -0
- package/dist/qa/clash.d.ts +2 -0
- package/dist/qa/floating.d.ts +5 -0
- package/dist/qa/gates.d.ts +12 -0
- package/dist/qa/geometry.d.ts +21 -0
- package/dist/qa/index.d.ts +12 -0
- package/dist/qa/index.js +78 -0
- package/dist/qa/index.js.map +9 -0
- package/dist/qa/inside.d.ts +12 -0
- package/dist/qa/inspect.d.ts +18 -0
- package/dist/qa/lods.d.ts +12 -0
- package/dist/qa/measures.d.ts +4 -0
- package/dist/qa/occlusion.d.ts +3 -0
- package/dist/qa/sanity.d.ts +7 -0
- package/dist/qa/types.d.ts +12 -0
- package/dist/render/beauty.d.ts +40 -0
- package/dist/render/camera.d.ts +33 -0
- package/dist/render/depth-map.d.ts +38 -0
- package/dist/render/font.d.ts +1 -0
- package/dist/render/ground.d.ts +13 -0
- package/dist/render/index.d.ts +10 -0
- package/dist/render/index.js +47 -0
- package/dist/render/index.js.map +9 -0
- package/dist/render/lighting.d.ts +20 -0
- package/dist/render/lod-strip.d.ts +5 -0
- package/dist/render/metrics.d.ts +37 -0
- package/dist/render/options.d.ts +28 -0
- package/dist/render/photo-match.d.ts +19 -0
- package/dist/render/raster.d.ts +25 -0
- package/dist/render/resolve.d.ts +11 -0
- package/dist/render/review-prompt.d.ts +2 -0
- package/dist/render/review-warnings.d.ts +34 -0
- package/dist/render/review.d.ts +24 -0
- package/dist/render/scene.d.ts +18 -0
- package/dist/render/shade.d.ts +22 -0
- package/dist/render/sheet.d.ts +15 -0
- package/dist/render/texture.d.ts +15 -0
- package/dist/render/thumbnail.d.ts +8 -0
- package/dist/render/vis-buffer.d.ts +18 -0
- package/dist/testing/assert.d.ts +21 -0
- package/dist/testing/compiled.d.ts +15 -0
- package/dist/testing/hash.d.ts +1 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.js +134 -0
- package/dist/testing/index.js.map +13 -0
- package/dist/testing/snapshot.d.ts +13 -0
- package/docs/README.md +52 -0
- package/docs/architecture/README.md +68 -0
- package/docs/architecture/adding-a-kind.md +44 -0
- package/docs/architecture/adding-a-primitive.md +49 -0
- package/docs/architecture/errors.md +47 -0
- package/docs/architecture/glb-production.md +214 -0
- package/docs/architecture/gltf-capabilities.md +80 -0
- package/docs/decisions/001-recipe-compiler-over-ai-meshes.md +27 -0
- package/docs/decisions/002-typescript-not-json.md +22 -0
- package/docs/decisions/003-shared-trim-sheet.md +21 -0
- package/docs/decisions/004-z-up-metres.md +21 -0
- package/docs/decisions/005-zero-runtime-deps.md +21 -0
- package/docs/decisions/006-single-package-subpath-exports.md +20 -0
- package/docs/decisions/007-cpu-contact-sheets.md +21 -0
- package/docs/decisions/008-surface-materials.md +21 -0
- package/docs/decisions/009-gltf-front-axis.md +21 -0
- package/docs/decisions/README.md +15 -0
- package/docs/idea/01-vision.md +117 -0
- package/docs/idea/02-dsl.md +343 -0
- package/docs/idea/03-ir.md +97 -0
- package/docs/idea/04-materials.md +114 -0
- package/docs/idea/05-agent-loop.md +141 -0
- package/docs/idea/06-qa.md +101 -0
- package/docs/idea/07-what-fits.md +45 -0
- package/docs/idea/08-neural-adapters.md +78 -0
- package/docs/idea/09-kinds.md +105 -0
- package/docs/landscape.md +49 -0
- package/docs/plans/roadmap.md +127 -0
- package/examples/build-with-bun.ts +41 -0
- package/llms.txt +47 -0
- package/package.json +99 -4
- package/recipes/README.md +38 -0
- package/recipes/asteroid/README.md +46 -0
- package/recipes/asteroid/asteroid.ts +336 -0
- package/recipes/boulders/README.md +28 -0
- package/recipes/boulders/boulders.ts +117 -0
- package/recipes/boxcar/README.md +46 -0
- package/recipes/boxcar/boxcar.ts +916 -0
- package/recipes/cargo_container_scifi/README.md +52 -0
- package/recipes/cargo_container_scifi/cargo_container_scifi.ts +461 -0
- package/recipes/dropship/README.md +84 -0
- package/recipes/dropship/dropship.ts +1144 -0
- package/recipes/eiffel_tower/README.md +110 -0
- package/recipes/eiffel_tower/eiffel_tower.ts +781 -0
- package/recipes/goblin_head/README.md +62 -0
- package/recipes/goblin_head/goblin_head.ts +36 -0
- package/recipes/human_head/README.md +64 -0
- package/recipes/human_head/human_head.ts +37 -0
- package/recipes/loco_440/README.md +32 -0
- package/recipes/loco_440/loco_440.ts +1404 -0
- package/recipes/material_swatches/README.md +21 -0
- package/recipes/material_swatches/material_swatches.ts +183 -0
- package/recipes/mountain_range/README.md +45 -0
- package/recipes/mountain_range/mountain_range.ts +128 -0
- package/recipes/oak/README.md +30 -0
- package/recipes/oak/oak.ts +19 -0
- package/recipes/orc_head/README.md +66 -0
- package/recipes/orc_head/orc_head.ts +39 -0
- package/recipes/palm/README.md +30 -0
- package/recipes/palm/palm.ts +19 -0
- package/recipes/pine/README.md +29 -0
- package/recipes/pine/pine.ts +19 -0
- package/recipes/signal_gantry/README.md +36 -0
- package/recipes/signal_gantry/signal_gantry.ts +522 -0
- package/recipes/station_halt/README.md +39 -0
- package/recipes/station_halt/station_halt.ts +722 -0
- package/recipes/t34/README.md +44 -0
- package/recipes/t34/t34.ts +1068 -0
- package/recipes/tiger_1/README.md +75 -0
- package/recipes/tiger_1/tiger_1.ts +1370 -0
- package/recipes/water_tower/README.md +40 -0
- package/recipes/water_tower/water_tower.ts +542 -0
- package/src/cli/args.ts +112 -0
- package/src/cli/bin.ts +7 -0
- package/src/cli/load.ts +17 -0
- package/src/cli/manifest.ts +89 -0
- package/src/cli/render-cmds.ts +66 -0
- package/src/cli/run.ts +168 -0
- package/src/core/asset.ts +128 -0
- package/src/core/definition.ts +149 -0
- package/src/core/errors.ts +45 -0
- package/src/core/family.ts +50 -0
- package/src/core/index.ts +66 -0
- package/src/core/mesh.ts +114 -0
- package/src/core/part.ts +130 -0
- package/src/core/png.ts +49 -0
- package/src/core/rng.ts +49 -0
- package/src/core/transform.ts +90 -0
- package/src/core/vec.ts +26 -0
- package/src/core/world.ts +80 -0
- package/src/export/bin-writer.ts +79 -0
- package/src/export/container.ts +35 -0
- package/src/export/glb.ts +200 -0
- package/src/export/index.ts +18 -0
- package/src/export/lights.ts +49 -0
- package/src/export/materials.ts +126 -0
- package/src/export/merge-pivots.ts +146 -0
- package/src/export/metadata.ts +59 -0
- package/src/export/motion.ts +70 -0
- package/src/export/optimize-parts.ts +80 -0
- package/src/export/primitive.ts +35 -0
- package/src/export/tangents.ts +75 -0
- package/src/export/textures.ts +88 -0
- package/src/export/version.ts +6 -0
- package/src/grammar/index.ts +4 -0
- package/src/grammar/split.ts +87 -0
- package/src/grammar/whyte.ts +20 -0
- package/src/index.ts +14 -0
- package/src/kinds/building.ts +153 -0
- package/src/kinds/faces.ts +138 -0
- package/src/kinds/head-armour.ts +151 -0
- package/src/kinds/head-beard.ts +133 -0
- package/src/kinds/head-bust.ts +221 -0
- package/src/kinds/head-extras.ts +150 -0
- package/src/kinds/head-face.ts +222 -0
- package/src/kinds/head-geom.ts +31 -0
- package/src/kinds/head-hair.ts +152 -0
- package/src/kinds/head-layout.ts +63 -0
- package/src/kinds/head-mesh.ts +157 -0
- package/src/kinds/head-params.ts +153 -0
- package/src/kinds/head-presets.ts +152 -0
- package/src/kinds/head-rim.ts +128 -0
- package/src/kinds/head.ts +171 -0
- package/src/kinds/hull-lines.ts +160 -0
- package/src/kinds/hull-skin.ts +83 -0
- package/src/kinds/hull.ts +209 -0
- package/src/kinds/index.ts +63 -0
- package/src/kinds/mass.ts +110 -0
- package/src/kinds/openings.ts +141 -0
- package/src/kinds/planned.ts +12 -0
- package/src/kinds/roof-chimney.ts +100 -0
- package/src/kinds/roof-shape.ts +230 -0
- package/src/kinds/roof.ts +250 -0
- package/src/kinds/vegetation-fronds.ts +126 -0
- package/src/kinds/vegetation-impostor.ts +118 -0
- package/src/kinds/vegetation-leaves.ts +168 -0
- package/src/kinds/vegetation-mesh.ts +174 -0
- package/src/kinds/vegetation-params.ts +147 -0
- package/src/kinds/vegetation-presets.ts +184 -0
- package/src/kinds/vegetation-skeleton.ts +168 -0
- package/src/kinds/vegetation.ts +199 -0
- package/src/kinds/vehicle.ts +144 -0
- package/src/material/generator.ts +56 -0
- package/src/material/index.ts +29 -0
- package/src/material/paint/bond.ts +60 -0
- package/src/material/paint/canvas.ts +91 -0
- package/src/material/paint/cell.ts +39 -0
- package/src/material/paint/cells-round.ts +119 -0
- package/src/material/paint/cells.ts +111 -0
- package/src/material/paint/compose.ts +53 -0
- package/src/material/paint/concrete.ts +62 -0
- package/src/material/paint/courses.ts +85 -0
- package/src/material/paint/decode-png.ts +100 -0
- package/src/material/paint/default-sheet.ts +61 -0
- package/src/material/paint/foliage-broad.ts +126 -0
- package/src/material/paint/foliage-common.ts +93 -0
- package/src/material/paint/foliage-compound.ts +135 -0
- package/src/material/paint/foliage-conifer.ts +143 -0
- package/src/material/paint/foliage-raster.ts +196 -0
- package/src/material/paint/foliage.ts +23 -0
- package/src/material/paint/masks.ts +44 -0
- package/src/material/paint/noise.ts +52 -0
- package/src/material/paint/normal.ts +52 -0
- package/src/material/paint/orm.ts +95 -0
- package/src/material/paint/planks.ts +56 -0
- package/src/material/paint/plates.ts +72 -0
- package/src/material/paint/shapes.ts +28 -0
- package/src/material/paint/slate.ts +52 -0
- package/src/material/paint/stamp.ts +40 -0
- package/src/material/paint/strip.ts +42 -0
- package/src/material/paint/surface.ts +60 -0
- package/src/material/paint/types.ts +51 -0
- package/src/material/paint/validate.ts +58 -0
- package/src/material/palette.ts +43 -0
- package/src/material/shader-godot.ts +77 -0
- package/src/material/shader-three.ts +103 -0
- package/src/material/shader.ts +100 -0
- package/src/material/trim-sheet.ts +100 -0
- package/src/neural/generator.ts +37 -0
- package/src/neural/images.ts +27 -0
- package/src/neural/index.ts +10 -0
- package/src/passes/bake-ao.ts +183 -0
- package/src/passes/grime.ts +37 -0
- package/src/passes/index.ts +8 -0
- package/src/passes/livery.ts +66 -0
- package/src/passes/optimize-cache.ts +175 -0
- package/src/passes/optimize-weld.ts +147 -0
- package/src/passes/optimize.ts +85 -0
- package/src/passes/ray-grid.ts +237 -0
- package/src/passes/weighted-normals.ts +125 -0
- package/src/primitives/beam.ts +60 -0
- package/src/primitives/bevel-box.ts +140 -0
- package/src/primitives/box.ts +90 -0
- package/src/primitives/cell.ts +115 -0
- package/src/primitives/check.ts +49 -0
- package/src/primitives/closed.ts +74 -0
- package/src/primitives/erosion.ts +183 -0
- package/src/primitives/font-5x7.ts +117 -0
- package/src/primitives/heightfield.ts +101 -0
- package/src/primitives/index.ts +56 -0
- package/src/primitives/lathe-facets.ts +45 -0
- package/src/primitives/lathe.ts +174 -0
- package/src/primitives/lattice.ts +131 -0
- package/src/primitives/loft.ts +174 -0
- package/src/primitives/mc-table.ts +41 -0
- package/src/primitives/member.ts +130 -0
- package/src/primitives/noise.ts +157 -0
- package/src/primitives/planar.ts +55 -0
- package/src/primitives/prism.ts +85 -0
- package/src/primitives/sculpt-edit.ts +212 -0
- package/src/primitives/sculpt-tree.ts +226 -0
- package/src/primitives/sculpt.ts +80 -0
- package/src/primitives/sdf-grid.ts +131 -0
- package/src/primitives/sdf-ops.ts +145 -0
- package/src/primitives/sdf.ts +83 -0
- package/src/primitives/strip-uv.ts +26 -0
- package/src/primitives/surface-nets.ts +161 -0
- package/src/primitives/sweep.ts +162 -0
- package/src/primitives/terrain-color.ts +85 -0
- package/src/primitives/terrain-grid.ts +137 -0
- package/src/primitives/text-layout.ts +85 -0
- package/src/primitives/text.ts +197 -0
- package/src/primitives/tiled.ts +93 -0
- package/src/primitives/transport.ts +85 -0
- package/src/primitives/triangulate.ts +42 -0
- package/src/primitives/value-noise.ts +62 -0
- package/src/qa/checks.ts +110 -0
- package/src/qa/clash.ts +177 -0
- package/src/qa/floating.ts +63 -0
- package/src/qa/gates.ts +126 -0
- package/src/qa/geometry.ts +187 -0
- package/src/qa/index.ts +28 -0
- package/src/qa/inside.ts +114 -0
- package/src/qa/inspect.ts +107 -0
- package/src/qa/lods.ts +97 -0
- package/src/qa/measures.ts +67 -0
- package/src/qa/occlusion.ts +166 -0
- package/src/qa/sanity.ts +137 -0
- package/src/qa/types.ts +17 -0
- package/src/render/beauty.ts +115 -0
- package/src/render/camera.ts +142 -0
- package/src/render/depth-map.ts +191 -0
- package/src/render/font.ts +76 -0
- package/src/render/ground.ts +87 -0
- package/src/render/index.ts +34 -0
- package/src/render/lighting.ts +95 -0
- package/src/render/lod-strip.ts +34 -0
- package/src/render/metrics.ts +147 -0
- package/src/render/options.ts +81 -0
- package/src/render/photo-match.ts +28 -0
- package/src/render/raster.ts +143 -0
- package/src/render/resolve.ts +109 -0
- package/src/render/review-prompt.ts +59 -0
- package/src/render/review-warnings.ts +92 -0
- package/src/render/review.ts +103 -0
- package/src/render/scene.ts +119 -0
- package/src/render/shade.ts +199 -0
- package/src/render/sheet.ts +88 -0
- package/src/render/texture.ts +97 -0
- package/src/render/thumbnail.ts +75 -0
- package/src/render/vis-buffer.ts +119 -0
- package/src/testing/assert.ts +115 -0
- package/src/testing/compiled.ts +31 -0
- package/src/testing/hash.ts +14 -0
- package/src/testing/index.ts +14 -0
- package/src/testing/snapshot.ts +37 -0
- package/src/types/gltf-validator.d.ts +13 -0
package/README.md
CHANGED
|
@@ -1,3 +1,381 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ts23d
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Free 3D asset generator for coding agents. Your agent writes TypeScript; ts23d compiles it to game-ready glTF — for Unity, Unreal, Godot, three.js, Babylon, or anything that reads glTF.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@developerz.ai/ts23d)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
<table>
|
|
9
|
+
<tr>
|
|
10
|
+
<td align="center" width="25%"><a href="recipes/tiger_1/"><img src="recipes/tiger_1/out/tiger_1/hero.png" alt="Tiger I, rendered by ts23d"></a><br><sub><a href="recipes/tiger_1/"><code>tiger_1</code></a> · Tiger I</sub></td>
|
|
11
|
+
<td align="center" width="25%"><a href="recipes/loco_440/"><img src="recipes/loco_440/out/loco_440/hero.png" alt="4-4-0 “Jupiter”, rendered by ts23d"></a><br><sub><a href="recipes/loco_440/"><code>loco_440</code></a> · 4-4-0 “Jupiter”</sub></td>
|
|
12
|
+
<td align="center" width="25%"><a href="recipes/station_halt/"><img src="recipes/station_halt/out/station_halt/hero.png" alt="Station halt, rendered by ts23d"></a><br><sub><a href="recipes/station_halt/"><code>station_halt</code></a> · Station halt</sub></td>
|
|
13
|
+
<td align="center" width="25%"><a href="recipes/eiffel_tower/"><img src="recipes/eiffel_tower/out/eiffel_tower/hero.png" alt="Eiffel Tower, rendered by ts23d"></a><br><sub><a href="recipes/eiffel_tower/"><code>eiffel_tower</code></a> · Eiffel Tower</sub></td>
|
|
14
|
+
</tr>
|
|
15
|
+
<tr>
|
|
16
|
+
<td align="center" width="25%"><a href="recipes/orc_head/"><img src="recipes/orc_head/out/orc_head/hero.png" alt="Orc bust (sculpt), rendered by ts23d"></a><br><sub><a href="recipes/orc_head/"><code>orc_head</code></a> · Orc bust (sculpt)</sub></td>
|
|
17
|
+
<td align="center" width="25%"><a href="recipes/goblin_head/"><img src="recipes/goblin_head/out/goblin_head/hero.png" alt="Goblin bust (sculpt), rendered by ts23d"></a><br><sub><a href="recipes/goblin_head/"><code>goblin_head</code></a> · Goblin bust (sculpt)</sub></td>
|
|
18
|
+
<td align="center" width="25%"><a href="recipes/mountain_range/"><img src="recipes/mountain_range/out/mountain_range/hero.png" alt="Eroded mountains, rendered by ts23d"></a><br><sub><a href="recipes/mountain_range/"><code>mountain_range</code></a> · Eroded mountains</sub></td>
|
|
19
|
+
<td align="center" width="25%"><a href="recipes/oak/"><img src="recipes/oak/out/oak/hero.png" alt="Oak, rendered by ts23d"></a><br><sub><a href="recipes/oak/"><code>oak</code></a> · Oak</sub></td>
|
|
20
|
+
</tr>
|
|
21
|
+
<tr>
|
|
22
|
+
<td align="center" width="25%"><a href="recipes/water_tower/"><img src="recipes/water_tower/out/water_tower/hero.png" alt="Water tower, rendered by ts23d"></a><br><sub><a href="recipes/water_tower/"><code>water_tower</code></a> · Water tower</sub></td>
|
|
23
|
+
<td align="center" width="25%"><a href="recipes/boxcar/"><img src="recipes/boxcar/out/boxcar/hero.png" alt="USRA boxcar, rendered by ts23d"></a><br><sub><a href="recipes/boxcar/"><code>boxcar</code></a> · USRA boxcar</sub></td>
|
|
24
|
+
<td align="center" width="25%"><a href="recipes/signal_gantry/"><img src="recipes/signal_gantry/out/signal_gantry_4/hero.png" alt="Signal gantry, rendered by ts23d"></a><br><sub><a href="recipes/signal_gantry/"><code>signal_gantry_4</code></a> · Signal gantry</sub></td>
|
|
25
|
+
<td align="center" width="25%"><a href="recipes/t34/"><img src="recipes/t34/out/t34/hero.png" alt="T-34/76 1943, rendered by ts23d"></a><br><sub><a href="recipes/t34/"><code>t34</code></a> · T-34/76 1943</sub></td>
|
|
26
|
+
</tr>
|
|
27
|
+
<tr>
|
|
28
|
+
<td align="center" width="25%"><a href="recipes/asteroid/"><img src="recipes/asteroid/out/asteroid/hero.png" alt="Asteroid, rendered by ts23d"></a><br><sub><a href="recipes/asteroid/"><code>asteroid</code></a> · Asteroid</sub></td>
|
|
29
|
+
<td align="center" width="25%"><a href="recipes/cargo_container_scifi/"><img src="recipes/cargo_container_scifi/out/cargo_container_scifi/hero.png" alt="Sci-fi cargo pod, rendered by ts23d"></a><br><sub><a href="recipes/cargo_container_scifi/"><code>cargo_container_scifi</code></a> · Sci-fi cargo pod</sub></td>
|
|
30
|
+
<td align="center" width="25%"><a href="recipes/boulders/"><img src="recipes/boulders/out/boulders/hero.png" alt="Boulders (SDF), rendered by ts23d"></a><br><sub><a href="recipes/boulders/"><code>boulders</code></a> · Boulders (SDF)</sub></td>
|
|
31
|
+
<td align="center" width="25%"><a href="recipes/dropship/"><img src="recipes/dropship/out/dropship/hero.png" alt="VTOL dropship, rendered by ts23d"></a><br><sub><a href="recipes/dropship/"><code>dropship</code></a> · VTOL dropship</sub></td>
|
|
32
|
+
</tr>
|
|
33
|
+
</table>
|
|
34
|
+
|
|
35
|
+
<sub>Every image above is a real render: the committed <code>hero.png</code> next to each recipe, made on the CPU by <code>t3d hero</code> (regenerate with <code>bun run shots <name></code>). Click one for its recipe, reference dossier and contact sheet.</sub>
|
|
36
|
+
|
|
37
|
+
[](https://developerz-ai.github.io/ts23d/)
|
|
38
|
+
|
|
39
|
+
**[Open the gallery →](https://developerz-ai.github.io/ts23d/)** Every asset compiles live in your browser: orbit it, switch LOD0/1/2, toggle wireframe, play its motion or stage it in a scene, check its measures against the real thing, and download the GLB.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
**Use the LLM you already pay for to write the assets your project needs (vehicles, buildings, props, whole streets), optimised by construction.** ts23d ends at the GLB, its textures and a manifest. The engine is yours.
|
|
43
|
+
|
|
44
|
+
Each asset is a TypeScript module. `t3d build` compiles it, deterministically, to GLB. Free: no GPU, no credits, no service. **[Browse the asset gallery](https://developerz-ai.github.io/ts23d/)**: every recipe, compiled in your browser, with its source.
|
|
45
|
+
|
|
46
|
+
- **Named, pivoted, animatable parts.** `turret`, `gun`, `road_wheel_l_0`: your engine code binds to node names.
|
|
47
|
+
- **Families.** One typed build, many assets: `family.variant({ name, params })` turns T-34 1941 into 1943 with one key; `extend` derives new families. Plain functions all the way down, no plugin API.
|
|
48
|
+
- **Sockets and surfaces.** `ctx.socket` exports seats, mounts, cameras and spawn points as named nodes. A part can be `opaque`, `cutout`, `glass` or `translucent`; a GLB holds at most 4 materials over one texture set (a shampoo bottle is 2 draw calls).
|
|
49
|
+
- **Emitters and motion.** `ctx.emitter` exports smoke, steam, dust, muzzle and fire sources as named nodes your engine's particles bind to; parts `spin`, `slide` or `sway`.
|
|
50
|
+
- **3 LODs from one source.** The recipe reads `ctx.lod` and drops detail. Nothing is decimated.
|
|
51
|
+
- **One shared material, batched geometry.** Every asset maps into one trim sheet, and the exporter merges static geometry into its nearest pivot. Draw calls = the parts an engine moves: a static prop or building is 1; a tank with independently spinning road wheels is one per wheel plus turret, gun and hull.
|
|
52
|
+
- **A QA gate.** Exit 1 on: a part not in surface contact with anything grounded (2 cm), a moving part that cuts through another anywhere in its motion, a blown triangle budget, non-finite or inside-out geometry, hidden parts, an LOD that grows instead of shrinks.
|
|
53
|
+
- **Code-level checks.** The recipe states its physical intent and QA enforces it at every LOD: `checks: [clear('track_*', 'hull_*'), noOverlap('road_wheel_l_*'), touches('turret_body', 'hull_top'), symmetric('_l', '_r', 'y')]`. "The track hits the frame" becomes a failing build.
|
|
54
|
+
- **Textures from code.** A procedural albedo / normal / ORM trim sheet (bricks, planks, plates, slate, foliage), written once and shared by every GLB, plus three.js TSL and Godot shader sources.
|
|
55
|
+
- **Spec-sheet fidelity.** Declare `real: { length, width, height, measures }` with `sources`. QA holds the overall size to ±5% and each named dimension (driver diameter, gauge, wheelbase) to ±2%. Fix the model, never the spec.
|
|
56
|
+
- **A contact sheet.** One PNG, six labelled orthographic views on a metre grid, rendered on the CPU. A vision-capable agent reads it once, sees what's wrong and fixes it.
|
|
57
|
+
- **A beauty render and an AI review pack.** `t3d hero` renders a textured, lit, soft-shadowed 3/4 product shot on the CPU (the images above). `t3d review` writes hero, sheet, close-ups, an LOD strip, a checklist prompt for a vision agent and image metrics: QA with pictures, no GPU.
|
|
58
|
+
- **Organic modelling.** `sdf` (surface nets / marching cubes) with `sd.*` combinators and `sculpt`, an ordered add / subtract / paint edit list with smooth blends: busts, rocks, asteroids.
|
|
59
|
+
- **Terrain.** Seeded noise (`fbm`, `ridged`, domain `warp`, `terrace`), droplet `hydraulicErosion` and `thermalErosion`, and `terrainColor` by altitude, slope and flow.
|
|
60
|
+
- **Architecture and hulls.** `roof` (gable, hip, mansard, gambrel, …), `opening` window/door kits for `facade`, true-scale masonry `mass`, lofted vessel `hull`; `tiled`, `cell` and `lattice` (Warren / Pratt / Howe trusses) primitives, `box({ bevel })`, and `text` lettering as geometry.
|
|
61
|
+
- **An optimiser on by default.** Weld, degenerate removal, vertex-cache and vertex-fetch order (tiger_1 LOD0: 15.4 → 6.3 MB, ACMR 2.88 → 1.16), weighted normals, baked per-vertex AO.
|
|
62
|
+
- **Lights, glow and provenance in the GLB.** `KHR_lights_punctual` from light sockets, emissive glow materials, licence / creators / sources as `KHR_xmp_json_ld`. Zero glTF-Validator warnings.
|
|
63
|
+
- **Test helpers.** `@developerz.ai/ts23d/testing`: `assertQaPass`, `assertBudget`, `assertParts`, `assertMeasure`, `assertMotionClear`, `assertDeterministic`, `snapshotHash` for your own recipe tests.
|
|
64
|
+
|
|
65
|
+
**The goal: high-definition detail up close, cheap to draw everywhere.** One texture set, batched static geometry, LODs, compact core-glTF buffers (u16 indices and colours), welded, cache-optimised meshes.
|
|
66
|
+
|
|
67
|
+
**No Blender for most hard-surface asset production.** For vehicles, buildings, props and whole scenes, the LLM writes TypeScript that does the modelling, LODs, UVs onto the trim sheet, batching, QA and export. Stylised organic shapes (busts, rocks, terrain) are code too, through `sculpt` and `sdf`; realistic sculpting stays a job for Blender or the planned [`/neural` adapter or `importGlb`](docs/idea/08-neural-adapters.md).
|
|
68
|
+
|
|
69
|
+
## Generate assets with your agent
|
|
70
|
+
|
|
71
|
+
### 1. Install
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
bun add @developerz.ai/ts23d
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then give your agent the loop:
|
|
78
|
+
|
|
79
|
+
| Agent | Copy into your project |
|
|
80
|
+
|---|---|
|
|
81
|
+
| Claude Code | `cp -r node_modules/@developerz.ai/ts23d/.claude/skills/author-recipe .claude/skills/` (the loop) and `.claude/commands/new-recipe.md` (the `/new-recipe` command), both shipped in the package |
|
|
82
|
+
| Codex, others | Point your `AGENTS.md` at `node_modules/@developerz.ai/ts23d/CLAUDE.md` and `…/docs/` ([details](#use-it-with-any-agent)) |
|
|
83
|
+
|
|
84
|
+
### 2. Ask
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
/new-recipe Tiger I, mid-production 1943, fully stowed
|
|
88
|
+
```
|
|
89
|
+
```text
|
|
90
|
+
/new-recipe 4-4-0 steam loco with tender, wheels and rods animated on a loop
|
|
91
|
+
```
|
|
92
|
+
```text
|
|
93
|
+
/new-recipe 1940s city street with townhouses and gas lamps (townhouse, lamp, street recipes: landing)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The agent looks up real dimensions and photos into `recipes/<name>/README.md`, writes `recipes/<name>/<name>.ts`, builds until `QA PASS`, reads the contact sheet, and fixes the worst thing until two shots in a row find nothing ([the loop](docs/idea/05-agent-loop.md)).
|
|
97
|
+
|
|
98
|
+
### 3. Use the GLB in your engine
|
|
99
|
+
|
|
100
|
+
`out/<asset>/lod0.glb` (and `lod1`, `lod2`) are plain glTF 2.0, core extensions only. The hooks your engine code can use:
|
|
101
|
+
|
|
102
|
+
| Hook | In the GLB |
|
|
103
|
+
|---|---|
|
|
104
|
+
| Movable parts | Named nodes with pivots at the hinge: `turret`, `gun`, `wheel_*`, `door_*` |
|
|
105
|
+
| Attachment points | Socket nodes with `extras.ts23d.socket` (seat, mount, camera, …) |
|
|
106
|
+
| Particle sources | Emitter nodes with `extras.ts23d.emitter` (smoke, steam, dust, muzzle, …) |
|
|
107
|
+
| Baked loop | Clip `run` (after a static `rest` clip) when built with `t3d build` |
|
|
108
|
+
| Everything else | `out/<asset>/manifest.json`: pivots, sockets, emitters, triangles, draw calls |
|
|
109
|
+
|
|
110
|
+
three.js, as an example:
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
const gltf = await new GLTFLoader().loadAsync('out/t34/lod0.glb');
|
|
114
|
+
const turret = gltf.scene.getObjectByName('turret'); // rotate about its local Z
|
|
115
|
+
const run = THREE.AnimationClip.findByName(gltf.animations, 'run');
|
|
116
|
+
const emitters = [];
|
|
117
|
+
gltf.scene.traverse((o) => o.userData.ts23d?.emitter && emitters.push(o));
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Godot: node names import unchanged, and `extras` are available as node metadata when that import option is on. Unity (glTFast), Unreal and Babylon read the same names. ts23d ships no engine code; per-engine notes are in [glb-production.md](docs/architecture/glb-production.md#c-per-engine-import-table).
|
|
121
|
+
|
|
122
|
+
## What you get that a generated mesh doesn't
|
|
123
|
+
|
|
124
|
+
Each ts23d row names how it's verified. The image-to-3D column cites only what vendors' own pages state, as collected in [docs/landscape.md](docs/landscape.md) (as of Oct 2026). Image-to-3D is the better tool for organic and sculpted shapes; for those, see the planned [`/neural` adapter](docs/idea/08-neural-adapters.md).
|
|
125
|
+
|
|
126
|
+
| Property | ts23d | How it's verified | Typical image-to-3D output (per vendor docs) |
|
|
127
|
+
|---|---|---|---|
|
|
128
|
+
| Draw calls per asset | Static assets: 1. Vehicles: one per movable part (one shared material; static geometry batched into its pivot) | `toGlb` merges static parts by default (`mergeToPivots`); counts measured by `bun run bench` | One PBR material per generated model (e.g. Meshy: albedo / normal / metal / rough) |
|
|
129
|
+
| LODs | 3 from the same source | `t3d build` writes `lod0/1/2`, each under its own triangle budget | One mesh per generation; polycount presets or a low-poly mode (Rodin, Meshy) |
|
|
130
|
+
| Named, pivoted, animatable parts | Yes | `part-names` gate; `clashes` gate sweeps every moving part | Usually one mesh; part-based output reported for CSM (3rd-party source) |
|
|
131
|
+
| Deterministic rebuild | Byte-identical | `scripts/recipes.ts` builds every recipe twice and compares hashes, in CI | Not stated |
|
|
132
|
+
| Real-world dimensions | Gated: ±5% overall, ±2% per measure | `proportions` and `measures` gates | Not stated |
|
|
133
|
+
| Parts that float or clash | Gated | `floating-parts` (surface contact, 2 cm), `clashes` (1 cm) | Not stated |
|
|
134
|
+
| Cost per asset or variant | $0 | MIT, runs locally, a variant is a new seed | Credits, e.g. Meshy ~20–25 credits per generation; Rodin $1.50/credit pay-per-result |
|
|
135
|
+
| GPU needed | No | CPU compile and CPU contact sheet | Hosted: no. Self-hosted open weights: yes (TRELLIS.2 ≥ 24 GB) |
|
|
136
|
+
| Editable by an LLM | A TypeScript diff | Code review, `bun run verify` | A binary mesh; edit by regenerating or in a DCC tool |
|
|
137
|
+
| Repair / retopo step | None: authored with pivots, units and budgets | QA gates fail the build instead | Remesh / retopology tools offered (Meshy Smart Topology, quad remesh; CSM AI retopology, 3rd-party) |
|
|
138
|
+
| Texture memory per asset | Shares one trim sheet: with `--sheet external` every GLB references the same three PNGs | `out/trim_sheet_*.png` written once per build | Own texture set per asset, up to 4K (TRELLIS.2) |
|
|
139
|
+
|
|
140
|
+
### Benchmarks
|
|
141
|
+
|
|
142
|
+
To be measured: `bun run bench --write` fills the block below (triangles per LOD, compile + QA time, GLB size, parts, draw calls per gallery recipe) from real runs. Nothing in it is typed by hand; empty means not yet run.
|
|
143
|
+
|
|
144
|
+
<!-- bench:start -->
|
|
145
|
+
_Measured by `bun run bench` on 1.4.3 (Bun)._
|
|
146
|
+
|
|
147
|
+
| asset | tris LOD0 / 1 / 2 | GLB KiB LOD0 / 1 / 2 | parts | animated | draw calls (1 material) | compile + QA, 3 LODs | QA |
|
|
148
|
+
|---|---|---|---|---|---|---|---|
|
|
149
|
+
| `eiffel_tower` | 188016 / 21860 / 1062 | 16863 / 1819 / 85 | 28 | 0 | 1 | 1543 ms | PASS |
|
|
150
|
+
| `loco_440` | 23868 / 13552 / 1400 | 1035 / 614 / 104 | 80 | 14 | 17 | 521 ms | PASS |
|
|
151
|
+
| `material_swatches` | 10926 / 226 / 226 | 921 / 23 / 23 | 52 | 0 | 3 | 71 ms | PASS |
|
|
152
|
+
| `oak` | 12408 / 2536 / 180 | 649 / 135 / 8 | 5 | 1 | 2 | 297 ms | PASS |
|
|
153
|
+
| `palm` | 5032 / 1986 / 211 | 371 / 174 / 19 | 5 | 1 | 2 | 103 ms | PASS |
|
|
154
|
+
| `pine` | 6496 / 1212 / 180 | 322 / 64 / 8 | 5 | 1 | 2 | 95 ms | PASS |
|
|
155
|
+
| `t34` | 36452 / 9960 / 556 | 1761 / 415 / 35 | 28 | 16 | 17 | 360 ms | PASS |
|
|
156
|
+
| `t34_1941` | 35060 / 9460 / 500 | 1694 / 391 / 33 | 28 | 16 | 17 | 315 ms | PASS |
|
|
157
|
+
| `tiger_1` | 88176 / 16304 / 648 | 10709 / 1975 / 41 | 37 | 22 | 23 | 1827 ms | PASS |
|
|
158
|
+
<!-- bench:end -->
|
|
159
|
+
|
|
160
|
+
Draw calls column: static assets (the Eiffel Tower) are 1; vehicles are one per movable part. Trim-sheet painting: 512² ≈ 0.22 s, 1024² ≈ 0.8 s, 2048² ≈ 2.95 s. The predecessor's reference loco (below) is about 16k triangles at LOD0.
|
|
161
|
+
|
|
162
|
+
## One asset pipeline, no other libraries
|
|
163
|
+
|
|
164
|
+
**Asset production needs nothing else between "describe the asset" and "a GLB your engine imports".** Honest status per stage:
|
|
165
|
+
|
|
166
|
+
| Stage | Module | Status (2026-10) | Replaces |
|
|
167
|
+
|---|---|---|---|
|
|
168
|
+
| Geometry | `primitives`, `kinds` | Shipped: `box` (bevel), `lathe`, `prism`, `beam`, `planar`, `sweep`, `loft`, `tiled`, `cell`, `lattice`, `text`, `heightfield`, `sdf` + `sculpt`, terrain + erosion, facades with openings, roofs, hulls, vehicles, Weber–Penn trees. Planned: creatures | Blender modelling |
|
|
169
|
+
| Materials and textures | `material` (generator) | Shipped: procedural albedo / normal / ORM trim sheet, embedded or shared PNGs, palettes, `grime`. No KTX2 yet | Substance / texture tools |
|
|
170
|
+
| Optimisation | `passes/optimize`, `export` | Shipped: weld, degenerate removal, Forsyth vertex-cache + vertex-fetch order (ACMR reported), weighted normals, baked AO, u16 indices and colours, batching. Planned: opt-in `web` profile (quantisation + meshopt) | meshoptimizer / gltfpack |
|
|
171
|
+
| LODs | `ctx.lod` | Shipped | Decimators |
|
|
172
|
+
| QA | `qa` | Shipped: budget, surface-contact floating parts, motion clashes, names, proportions, spec measures, non-finite, winding, hidden parts, degenerate triangles, cross-LOD triangles; opt-in z-fighting, LOD silhouette and pivots. `/testing` helpers | Manual review |
|
|
173
|
+
| Renders and photo match | `render` | Shipped: contact sheet, beauty `hero` render, `review` pack for a vision agent. Photo match planned | — |
|
|
174
|
+
| GLB export | `export` | Shipped: faces +Z, seamless loops, trim-sheet textures, punctual lights, emissive glow, XMP provenance, 0 glTF-Validator errors and warnings (tested) | — |
|
|
175
|
+
| Engine import adapters | `threeMaterialSource` (TSL), `godotShaderSource` | Shipped: shader sources with wind, window glow, wear. Planned, M3: import settings and collision naming per engine, as hooks, not runtime | — |
|
|
176
|
+
|
|
177
|
+
Every stage has zero runtime dependencies ([ADR 005](docs/decisions/005-zero-runtime-deps.md)).
|
|
178
|
+
|
|
179
|
+
> **Status: early (0.x).** The core loop works: write, build, QA, shot, hero, review, with
|
|
180
|
+
> textures, trees, sculpt, terrain and the gallery's passing recipes. Still declared and throwing
|
|
181
|
+
> `T3D_NOT_IMPLEMENTED`: creatures, photo match, neural adapters. See the [roadmap](docs/plans/roadmap.md). Expect breaking changes.
|
|
182
|
+
|
|
183
|
+
## A recipe
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
import { axle, box, defineAsset, palettes } from '@developerz.ai/ts23d';
|
|
187
|
+
|
|
188
|
+
const { paint, iron, trim } = palettes.victorianRail;
|
|
189
|
+
|
|
190
|
+
export const handcart = defineAsset({
|
|
191
|
+
name: 'handcart',
|
|
192
|
+
kind: 'vehicle',
|
|
193
|
+
budget: { triangles: [2000, 800, 300] }, // LOD0 / LOD1 / LOD2 ceilings, enforced by QA
|
|
194
|
+
build(ctx) {
|
|
195
|
+
for (const [i, x] of [0.8, -0.8].entries()) {
|
|
196
|
+
axle(ctx, { name: `axle_${i}`, at: [x, 0, 0.35], radius: 0.35, gauge: 1.2,
|
|
197
|
+
width: 0.08, color: iron, rps: 1 }); // wheels spin in the baked clip
|
|
198
|
+
}
|
|
199
|
+
ctx.part('bed', box({ size: [2.4, 1.3, 0.12], at: [0, 0, 0.62], color: trim, strip: 'wood' }));
|
|
200
|
+
const posts = ctx.lod === 2 ? 2 : 6; // LOD drops detail; it never decimates
|
|
201
|
+
for (let i = 0; i < posts; i++) {
|
|
202
|
+
const x = -1.1 + (2.2 * i) / (posts - 1);
|
|
203
|
+
ctx.part(`post_${i}`, box({ size: [0.08, 0.08, 0.5], at: [x, 0.6, 0.74], color: paint }));
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Metres, Z up, +X is the front. Loops, functions and types, because a recipe is code, not data
|
|
210
|
+
([why](docs/decisions/002-typescript-not-json.md)).
|
|
211
|
+
|
|
212
|
+
## What the agent sees
|
|
213
|
+
|
|
214
|
+
`t3d shot recipes/tiger_1/tiger_1.ts` → `out/tiger_1/sheet.png`, from [`recipes/tiger_1/tiger_1.ts`](recipes/tiger_1/tiger_1.ts). Every recipe folder commits its sheet, hero render and manifest under `out/`:
|
|
215
|
+
|
|
216
|
+

|
|
217
|
+
|
|
218
|
+
Header: name, bounding box in metres, grid step, LOD. Row 1: 3/4 front, front (+X), side (−Y).
|
|
219
|
+
Row 2: top, 3/4 rear, LOD2 at distance. Layout: [docs/idea/05-agent-loop.md](docs/idea/05-agent-loop.md).
|
|
220
|
+
`t3d hero` adds the beauty shot, and `t3d review` packs hero, sheet, close-ups, an LOD strip and a
|
|
221
|
+
checklist prompt into `out/<asset>/review/` for a second, fresh-eyes vision pass.
|
|
222
|
+
|
|
223
|
+
## The quality bar
|
|
224
|
+
|
|
225
|
+

|
|
226
|
+
|
|
227
|
+
**Not output of this library yet.** This is from the in-house predecessor (a JSON recipe compiler for railroads): a 4-4-0 with tender. Top: reference photo. Middle: the procedural model. Bottom: overlay. That GLB is ~16k triangles, 17 named nodes (axles, side and main rods, crossheads, tender axles, track), one `trim_sheet` material with embedded albedo / normal / ORM textures, and a baked `run` animation. ts23d now has its own [`loco_440`](recipes/loco_440/loco_440.ts) (the Jupiter, drivers 1.626 m sourced) and the trim-sheet painter; photo match is next (M2, [roadmap](docs/plans/roadmap.md)).
|
|
228
|
+
|
|
229
|
+
## Quickstart
|
|
230
|
+
|
|
231
|
+
Needs Bun ≥ 1.4.4 (Node ≥ 22 for the compiled `dist/`).
|
|
232
|
+
|
|
233
|
+
```sh
|
|
234
|
+
bun add @developerz.ai/ts23d
|
|
235
|
+
bunx t3d build recipes/*/*.ts # GLB × 3 LODs + sheet + manifest per asset; exit 1 on a QA finding
|
|
236
|
+
bunx t3d shot recipes/*/*.ts # sheet + manifest only: the fast look
|
|
237
|
+
bunx t3d hero recipes/*/*.ts # beauty render: textured, lit, soft shadows (1600×900)
|
|
238
|
+
bunx t3d review recipes/*/*.ts # AI review pack: hero, sheet, close-ups, LOD strip, review.md
|
|
239
|
+
bunx t3d list recipes/*/*.ts --json # the assets each module exports
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
| Flag | Effect |
|
|
243
|
+
|---|---|
|
|
244
|
+
| `--out <dir>` | Output directory (default `out`) |
|
|
245
|
+
| `--no-shot` | `build` without rendering the contact sheet |
|
|
246
|
+
| `--sheet external\|embed\|none` | Trim-sheet textures. `external` (default): `out/trim_sheet_{albedo,normal,orm}.png` written once, every GLB references `../trim_sheet_*.png`. `embed`: inside each GLB. `none`: vertex colour only |
|
|
247
|
+
| `--sheet-size 512\|1024\|2048` | Sheet resolution (default 1024) |
|
|
248
|
+
| `--lods 0,1,2` | Which detail levels to build (default all three). `--lods 0` = hero mesh only, `--lods 0,2` = near + far. QA and the manifest cover exactly what was built |
|
|
249
|
+
| `--no-animations` | Skip the baked `run` clip. `t3d build` bakes it by default so viewers (e.g. VS Code glTF Tools) show play controls |
|
|
250
|
+
| `--json` | Machine-readable `{ ok, data }` / `{ ok: false, error: { code, message, fix } }` |
|
|
251
|
+
|
|
252
|
+
Output, one folder per asset (stable paths for agents and pipelines):
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
out/
|
|
256
|
+
├── index.json every asset built in this run, with its QA verdict
|
|
257
|
+
└── <asset>/
|
|
258
|
+
├── lod0.glb lod1.glb lod2.glb
|
|
259
|
+
├── hero.png the beauty render
|
|
260
|
+
├── sheet.png the contact sheet
|
|
261
|
+
└── manifest.json files; triangles + draw calls per LOD; pivots, emitters, sockets,
|
|
262
|
+
surfaces; real + measures with measured values; sources; QA
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Library calls differ on one default: `toGlb(asset)` exports no animation unless `{ animations: true }`.
|
|
266
|
+
|
|
267
|
+
Every exported asset in a module is built (`defineAsset` or `family.variant`). Every error prints a stable `T3D_*` code and its fix ([errors](docs/architecture/errors.md)).
|
|
268
|
+
|
|
269
|
+
## Programmatic: no CLI, just Bun
|
|
270
|
+
|
|
271
|
+
`t3d` is a convenience. Everything it does is a function call: compile, QA, export, render.
|
|
272
|
+
A plain script builds exactly what you want, and the same code runs in Node ≥ 22 (against the
|
|
273
|
+
built `dist/`), in a browser, or in a Web Worker (the [asset gallery](https://developerz-ai.github.io/ts23d/)
|
|
274
|
+
compiles every recipe in a worker).
|
|
275
|
+
|
|
276
|
+
```ts
|
|
277
|
+
// build.ts → bun build.ts
|
|
278
|
+
import { compile, contactSheet, DEFAULT_SHEET, paintTrimSheet, runQa, toGlb } from '@developerz.ai/ts23d';
|
|
279
|
+
import { tiger_1 } from './recipes/tiger_1/tiger_1.ts';
|
|
280
|
+
|
|
281
|
+
const sheet = paintTrimSheet({ ...DEFAULT_SHEET, size: 512 }); // textures are optional
|
|
282
|
+
|
|
283
|
+
for (const lod of [0, 2] as const) { // only the detail levels you need
|
|
284
|
+
const asset = compile(tiger_1, { lod });
|
|
285
|
+
const findings = runQa(asset); // gate it your way, or skip it
|
|
286
|
+
if (findings.length) throw new Error(findings.map((f) => `${f.message} — fix: ${f.fix}`).join('\n'));
|
|
287
|
+
await Bun.write(`out/tiger_1.lod${lod}.glb`, toGlb(asset, { sheet, animations: true }));
|
|
288
|
+
}
|
|
289
|
+
await Bun.write('out/tiger_1.png', contactSheet(compile(tiger_1, { lod: 0 }))); // for your agent's eyes
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Runnable copy: [`examples/build-with-bun.ts`](examples/build-with-bun.ts) — executed in CI, so this path can't rot.
|
|
293
|
+
|
|
294
|
+
| Building block | What it gives you |
|
|
295
|
+
|---|---|
|
|
296
|
+
| `compile(asset, { lod, seed })` | the compiled parts for one LOD (deterministic) |
|
|
297
|
+
| `runQa(compiled)` / single gates / `inspect(compiled)` | findings with fixes; geometry queries for your own checks |
|
|
298
|
+
| `toGlb(compiled, { sheet, animations, keepParts })` | GLB bytes (`Uint8Array`) — write them anywhere |
|
|
299
|
+
| `mergeToPivots(compiled)` | the batched part list the GLB uses (draw calls = movable parts) |
|
|
300
|
+
| `contactSheet(compiled, { far, cell })` | six-view PNG bytes |
|
|
301
|
+
| `paintTrimSheet(recipe)` + `sheetPngs(sheet)` | the texture set (albedo / normal / ORM) as RGBA or PNG |
|
|
302
|
+
| `threeMaterialSource(hints)` / `godotShaderSource(hints)` | shader source strings for your engine |
|
|
303
|
+
| `manifest` data | build it from `compiled.parts` (pivots, emitters, sockets) — see `src/cli/manifest.ts` |
|
|
304
|
+
|
|
305
|
+
## Use it with any agent
|
|
306
|
+
|
|
307
|
+
**The docs ship inside the package, versioned with the code, readable offline.** After `bun add`, everything an agent needs is at `node_modules/@developerz.ai/ts23d/`: `CLAUDE.md` (the agent brain; `AGENTS.md` in the repo is a link to it), `llms.txt`, `docs/`, `recipes/` (worked examples), `CHANGELOG.md` and `.claude/{skills,agents,commands}`.
|
|
308
|
+
|
|
309
|
+
Point your agent at them. Add to your project's `CLAUDE.md` or `AGENTS.md`:
|
|
310
|
+
|
|
311
|
+
```md
|
|
312
|
+
3D assets: @developerz.ai/ts23d. Read node_modules/@developerz.ai/ts23d/CLAUDE.md first;
|
|
313
|
+
docs in node_modules/@developerz.ai/ts23d/docs/, example recipes in …/recipes/.
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Claude Code skill (and the `/new-recipe` command):
|
|
317
|
+
|
|
318
|
+
```sh
|
|
319
|
+
mkdir -p .claude/skills .claude/commands
|
|
320
|
+
cp -r node_modules/@developerz.ai/ts23d/.claude/skills/author-recipe .claude/skills/
|
|
321
|
+
cp node_modules/@developerz.ai/ts23d/.claude/commands/new-recipe.md .claude/commands/
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
Works with any agent that writes TypeScript and can run a shell: Claude Code, Codex, Cursor, Aider, a local model. If it can read images, it closes the loop on its own. No skill files? Paste this:
|
|
326
|
+
|
|
327
|
+
```text
|
|
328
|
+
Using @developerz.ai/ts23d, write recipes/<name>/<name>.ts: a <thing>, real dimensions in metres,
|
|
329
|
+
Z up, +X front. Put the sources in `sources` and the key dimensions in `real.measures`.
|
|
330
|
+
Block out the masses, then details. Name every part that moves (axle_*, door_*, rotor_*)
|
|
331
|
+
and pivot it where it hinges. Loop until done:
|
|
332
|
+
1. bunx t3d build recipes/<name>/<name>.ts (fix every finding until it prints QA PASS;
|
|
333
|
+
a measures finding means rebuild the part, never edit the spec)
|
|
334
|
+
2. Read out/<name>/sheet.png (build writes it).
|
|
335
|
+
3. Name the single biggest error, fix it, go to 1.
|
|
336
|
+
Stop when two consecutive shots show nothing worth fixing. Never use Math.random; use ctx.rng.
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## What fits, what doesn't
|
|
340
|
+
|
|
341
|
+
As of 2026-10. Full matrix: [docs/idea/07-what-fits.md](docs/idea/07-what-fits.md).
|
|
342
|
+
|
|
343
|
+
| Fit | Asset categories |
|
|
344
|
+
|---|---|
|
|
345
|
+
| **Strong** | Hard-surface props, architecture (facades, towers), vehicles (tracked, wheeled, rail), modular kits, anything with real dimensions or repeated parts |
|
|
346
|
+
| **Shipped, early** | Vegetation: Weber–Penn trees (oak, pine, palm, birch, willow); LOD2 impostors are crude |
|
|
347
|
+
| **Shipped, early** | Stylised organic: `sculpt` busts, SDF rocks and asteroids, eroded terrain. Boats: lofted `hull` |
|
|
348
|
+
| **Planned** | Stylised creatures (SDF over a skeleton, M4) |
|
|
349
|
+
| **Weak** | Realistic people and animals, realistic sculpted organic forms, cloth. Use an image-to-3D tool, or the planned [`/neural` adapter](docs/idea/08-neural-adapters.md) that runs open-weight models on your own GPU and caches the result |
|
|
350
|
+
|
|
351
|
+
Not a replacement for AI mesh generators: a different approach with different strengths. Neutral comparison: [docs/landscape.md](docs/landscape.md).
|
|
352
|
+
|
|
353
|
+
## Gallery
|
|
354
|
+
|
|
355
|
+
**https://developerz-ai.github.io/ts23d/**: every recipe in `recipes/`, filterable by category (vehicles, railway, architecture, nature and terrain, characters, sci-fi). The grid shows the committed renders; opening an asset compiles it in your browser with an orbit viewer, LOD switch, wireframe, its motion, a scene, named parts, measures against the real spec, the recipe source and GLB downloads.
|
|
356
|
+
|
|
357
|
+
Each recipe is a folder: `recipes/<name>/<name>.ts` (the asset), `README.md` (the reference dossier: sources, specs, photo links) and `out/<asset>/` (committed `hero.png`, `sheet.png`, `manifest.json`).
|
|
358
|
+
|
|
359
|
+
[](https://developerz-ai.github.io/ts23d/#loco_440)
|
|
360
|
+
|
|
361
|
+
## Docs
|
|
362
|
+
|
|
363
|
+
| Read | For |
|
|
364
|
+
|---|---|
|
|
365
|
+
| [docs/README.md](docs/README.md) | The index |
|
|
366
|
+
| [docs/idea/](docs/idea/01-vision.md) | Vision, DSL, IR, materials, agent loop, QA, kinds |
|
|
367
|
+
| [docs/decisions/](docs/decisions/README.md) | Why: ADRs with the rejected options |
|
|
368
|
+
| [docs/architecture/](docs/architecture/README.md) | Module tiers, adding a primitive or kind, error codes |
|
|
369
|
+
| [docs/plans/roadmap.md](docs/plans/roadmap.md) | M0–M6 |
|
|
370
|
+
| [CONTRIBUTING.md](CONTRIBUTING.md) | `bun run setup`, `bun run verify` |
|
|
371
|
+
|
|
372
|
+
## Pairs well with
|
|
373
|
+
|
|
374
|
+
| | |
|
|
375
|
+
|---|---|
|
|
376
|
+
| **[kubeez.com](https://kubeez.com)** | Partner. Generate reference and concept images, decals and texture source images. The sheet painter's image-stamped cells will consume them (planned) ([materials](docs/idea/04-materials.md)) |
|
|
377
|
+
| **[developerz.ai](https://www.developerz.ai)** | 100% AI-managed software engineering. ts23d is built and maintained by AI agents |
|
|
378
|
+
|
|
379
|
+
## License
|
|
380
|
+
|
|
381
|
+
[MIT](LICENSE). Outputs are yours: no attribution, no licence conditions on generated assets.
|