@developerz.ai/ts23d 0.0.0-stage → 0.2.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 +90 -0
- package/CLAUDE.md +85 -0
- package/LICENSE +21 -0
- package/README.md +385 -2
- package/dist/chunk-6b05mnmx.js +19 -0
- package/dist/chunk-6b05mnmx.js.map +11 -0
- package/dist/chunk-7rtfjh9f.js +45 -0
- package/dist/chunk-7rtfjh9f.js.map +10 -0
- package/dist/chunk-8j4c28jt.js +4085 -0
- package/dist/chunk-8j4c28jt.js.map +46 -0
- package/dist/chunk-d1fv6hrm.js +2532 -0
- package/dist/chunk-d1fv6hrm.js.map +43 -0
- package/dist/chunk-dbq4qf52.js +902 -0
- package/dist/chunk-dbq4qf52.js.map +25 -0
- package/dist/chunk-drna2rny.js +836 -0
- package/dist/chunk-drna2rny.js.map +17 -0
- package/dist/chunk-dxvypr7y.js +89 -0
- package/dist/chunk-dxvypr7y.js.map +11 -0
- package/dist/chunk-f6yme003.js +1589 -0
- package/dist/chunk-f6yme003.js.map +30 -0
- package/dist/chunk-hg7pf34j.js +465 -0
- package/dist/chunk-hg7pf34j.js.map +19 -0
- package/dist/chunk-jq4e17tj.js +1031 -0
- package/dist/chunk-jq4e17tj.js.map +21 -0
- package/dist/chunk-y63c6zcv.js +2668 -0
- package/dist/chunk-y63c6zcv.js.map +53 -0
- package/dist/cli/args.d.ts +30 -0
- package/dist/cli/bin.d.ts +2 -0
- package/dist/cli/bin.js +348 -0
- package/dist/cli/bin.js.map +15 -0
- package/dist/cli/load.d.ts +2 -0
- package/dist/cli/manifest.d.ts +53 -0
- package/dist/cli/render-cmds.d.ts +12 -0
- package/dist/cli/run.d.ts +1 -0
- package/dist/cli/texture-cache.d.ts +4 -0
- package/dist/core/asset.d.ts +10 -0
- package/dist/core/definition.d.ts +155 -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/credits.d.ts +4 -0
- package/dist/export/glb-options.d.ts +48 -0
- package/dist/export/glb.d.ts +8 -0
- package/dist/export/hierarchy.d.ts +23 -0
- package/dist/export/index.d.ts +5 -0
- package/dist/export/index.js +40 -0
- package/dist/export/index.js.map +9 -0
- package/dist/export/lights.d.ts +8 -0
- package/dist/export/lod-coverage.d.ts +12 -0
- package/dist/export/materials.d.ts +23 -0
- package/dist/export/merge-pivots.d.ts +6 -0
- package/dist/export/metadata.d.ts +21 -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 +457 -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 +5 -0
- package/dist/kinds/head-beard.d.ts +6 -0
- package/dist/kinds/head-bust.d.ts +5 -0
- package/dist/kinds/head-extras.d.ts +15 -0
- package/dist/kinds/head-face.d.ts +8 -0
- package/dist/kinds/head-garb.d.ts +4 -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 +31 -0
- package/dist/kinds/head-mouth.d.ts +4 -0
- package/dist/kinds/head-params.d.ts +116 -0
- package/dist/kinds/head-presets.d.ts +19 -0
- package/dist/kinds/head-rim.d.ts +10 -0
- package/dist/kinds/head-tone.d.ts +10 -0
- package/dist/kinds/head-torso.d.ts +35 -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/cc0.d.ts +4 -0
- package/dist/material/define.d.ts +34 -0
- package/dist/material/generator.d.ts +4 -0
- package/dist/material/index.d.ts +9 -0
- package/dist/material/index.js +70 -0
- package/dist/material/index.js.map +9 -0
- package/dist/material/library.d.ts +7 -0
- package/dist/material/material-def.d.ts +30 -0
- package/dist/material/paint/bond.d.ts +3 -0
- package/dist/material/paint/canvas.d.ts +39 -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 +4 -0
- package/dist/material/paint/fabric.d.ts +4 -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/image-strip.d.ts +4 -0
- package/dist/material/paint/kit.d.ts +5 -0
- package/dist/material/paint/masks.d.ts +3 -0
- package/dist/material/paint/metal.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 +65 -0
- package/dist/material/paint/validate.d.ts +3 -0
- package/dist/material/palette.d.ts +14 -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/slots.d.ts +5 -0
- package/dist/material/texture-source.d.ts +34 -0
- package/dist/material/trim-sheet.d.ts +38 -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 +27 -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 +56 -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 +117 -0
- package/docs/architecture/materials.md +151 -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/idea/10-sculpting.md +166 -0
- package/docs/idea/11-materials-authoring.md +132 -0
- package/docs/idea/12-blender-bridge.md +136 -0
- package/docs/idea/13-asset-pipeline-research.md +89 -0
- package/docs/landscape.md +49 -0
- package/docs/plans/roadmap.md +139 -0
- package/examples/build-with-bun.ts +41 -0
- package/llms.txt +47 -0
- package/package.json +100 -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 +53 -0
- package/recipes/boxcar/boxcar.ts +1000 -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 +75 -0
- package/recipes/goblin_head/goblin_head.ts +38 -0
- package/recipes/human_head/README.md +68 -0
- package/recipes/human_head/human_head.ts +38 -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 +189 -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 +78 -0
- package/recipes/orc_head/orc_head.ts +41 -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 +125 -0
- package/src/cli/bin.ts +7 -0
- package/src/cli/load.ts +17 -0
- package/src/cli/manifest.ts +95 -0
- package/src/cli/render-cmds.ts +66 -0
- package/src/cli/run.ts +192 -0
- package/src/cli/texture-cache.ts +24 -0
- package/src/core/asset.ts +129 -0
- package/src/core/definition.ts +156 -0
- package/src/core/errors.ts +50 -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/credits.ts +25 -0
- package/src/export/glb-options.ts +53 -0
- package/src/export/glb.ts +187 -0
- package/src/export/hierarchy.ts +122 -0
- package/src/export/index.ts +34 -0
- package/src/export/lights.ts +49 -0
- package/src/export/lod-coverage.ts +71 -0
- package/src/export/materials.ts +126 -0
- package/src/export/merge-pivots.ts +146 -0
- package/src/export/metadata.ts +62 -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 +181 -0
- package/src/kinds/head-beard.ts +133 -0
- package/src/kinds/head-bust.ts +184 -0
- package/src/kinds/head-extras.ts +150 -0
- package/src/kinds/head-face.ts +242 -0
- package/src/kinds/head-garb.ts +181 -0
- package/src/kinds/head-geom.ts +31 -0
- package/src/kinds/head-hair.ts +193 -0
- package/src/kinds/head-layout.ts +63 -0
- package/src/kinds/head-mesh.ts +195 -0
- package/src/kinds/head-mouth.ts +111 -0
- package/src/kinds/head-params.ts +162 -0
- package/src/kinds/head-presets.ts +155 -0
- package/src/kinds/head-rim.ts +128 -0
- package/src/kinds/head-tone.ts +52 -0
- package/src/kinds/head-torso.ts +230 -0
- package/src/kinds/head.ts +176 -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/cc0.ts +41 -0
- package/src/material/define.ts +130 -0
- package/src/material/generator.ts +63 -0
- package/src/material/index.ts +60 -0
- package/src/material/library.ts +196 -0
- package/src/material/material-def.ts +84 -0
- package/src/material/paint/bond.ts +60 -0
- package/src/material/paint/canvas.ts +101 -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 +106 -0
- package/src/material/paint/default-sheet.ts +73 -0
- package/src/material/paint/fabric.ts +63 -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/image-strip.ts +88 -0
- package/src/material/paint/kit.ts +37 -0
- package/src/material/paint/masks.ts +46 -0
- package/src/material/paint/metal.ts +109 -0
- package/src/material/paint/noise.ts +52 -0
- package/src/material/paint/normal.ts +52 -0
- package/src/material/paint/orm.ts +108 -0
- package/src/material/paint/planks.ts +101 -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 +48 -0
- package/src/material/paint/surface.ts +60 -0
- package/src/material/paint/types.ts +94 -0
- package/src/material/paint/validate.ts +74 -0
- package/src/material/palette.ts +46 -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/slots.ts +18 -0
- package/src/material/texture-source.ts +86 -0
- package/src/material/trim-sheet.ts +166 -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 +121 -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 +204 -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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { BuildContext, Vec3 } from '../core/index.js';
|
|
2
|
+
import type { StripId } from '../material/index.js';
|
|
3
|
+
export type Side = 'front' | 'back' | 'left' | 'right';
|
|
4
|
+
export interface FacadeOptions {
|
|
5
|
+
readonly prefix: string;
|
|
6
|
+
/** Centre of the mass's base. */
|
|
7
|
+
readonly at: Vec3;
|
|
8
|
+
/** Footprint width (X) and depth (Y) of the mass this facade wraps. */
|
|
9
|
+
readonly footprint: readonly [number, number];
|
|
10
|
+
readonly floors: number;
|
|
11
|
+
readonly floorHeight: number;
|
|
12
|
+
/** Grammar per floor; the same line for every floor unless `ground` overrides floor 0. */
|
|
13
|
+
readonly grammar: string;
|
|
14
|
+
readonly ground?: string;
|
|
15
|
+
readonly sides: readonly Side[];
|
|
16
|
+
readonly glass: Vec3;
|
|
17
|
+
readonly frame?: Vec3;
|
|
18
|
+
/** Window height as a fraction of the floor. */
|
|
19
|
+
readonly windowRatio?: number;
|
|
20
|
+
/** Detailed openings (see `opening`): reveal in the wall colour, stone sill/lintel, sash bars. */
|
|
21
|
+
readonly kit?: {
|
|
22
|
+
readonly wall: Vec3;
|
|
23
|
+
readonly trim?: Vec3;
|
|
24
|
+
readonly depth?: number;
|
|
25
|
+
readonly panes?: readonly [number, number];
|
|
26
|
+
/** The wall's strip, so reveals continue its courses. Default 'plain'. */
|
|
27
|
+
readonly strip?: StripId;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export declare function facade(ctx: BuildContext, o: FacadeOptions): void;
|
|
31
|
+
export interface SetbackTier {
|
|
32
|
+
readonly footprint: readonly [number, number];
|
|
33
|
+
readonly floors: number;
|
|
34
|
+
}
|
|
35
|
+
/** Stack of shrinking masses (Empire State, Chrysler-style towers). Returns the top z. */
|
|
36
|
+
export declare function setbacks(ctx: BuildContext, o: {
|
|
37
|
+
prefix: string;
|
|
38
|
+
tiers: readonly SetbackTier[];
|
|
39
|
+
floorHeight: number;
|
|
40
|
+
color: Vec3;
|
|
41
|
+
grammar: string;
|
|
42
|
+
glass: Vec3;
|
|
43
|
+
detail: boolean;
|
|
44
|
+
}): number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type MeshBuilder, type Vec2, type Vec3 } from '../core/index.js';
|
|
2
|
+
import { type StripId } from '../material/index.js';
|
|
3
|
+
/** Keep the part of a convex polygon where the linear function `f` is ≤ 0. */
|
|
4
|
+
export declare function clipPoly<P extends Vec2 | Vec3>(poly: readonly P[], f: (p: P) => number): P[];
|
|
5
|
+
/** Drop consecutive duplicate points (clipping through a vertex emits it twice). */
|
|
6
|
+
export declare function dedupe<P extends Vec2 | Vec3>(poly: readonly P[]): P[];
|
|
7
|
+
/** Signed area of a 2D polygon (CCW positive). */
|
|
8
|
+
export declare const area2: (poly: readonly Vec2[]) => number;
|
|
9
|
+
/** Vertical extent of one band (one full V of the strip) in metres, from the house sheet. */
|
|
10
|
+
export declare const stripScale: (strip: StripId) => number;
|
|
11
|
+
export interface FaceOptions {
|
|
12
|
+
/** Convex and planar; either winding (it is turned to face `normal`). */
|
|
13
|
+
readonly points: readonly Vec3[];
|
|
14
|
+
readonly normal: Vec3;
|
|
15
|
+
/** Direction V grows along (up a slope, up a wall); projected into the face plane. */
|
|
16
|
+
readonly up: Vec3;
|
|
17
|
+
/** A point on the line where courses start (eave, wall foot). */
|
|
18
|
+
readonly vOrigin: Vec3;
|
|
19
|
+
readonly color: Vec3 | ((p: Vec3) => Vec3);
|
|
20
|
+
readonly strip: StripId;
|
|
21
|
+
/** false: one polygon, V squeezed over the whole face (far LODs). Default true. */
|
|
22
|
+
readonly banded?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Emit a convex face into `b`, banded at the strip's true scale. Returns triangles added. */
|
|
25
|
+
export declare function emitFace(b: MeshBuilder, o: FaceOptions): number;
|
|
26
|
+
/** Newell's polygon normal (unnormalised): robust for any planar polygon. */
|
|
27
|
+
export declare function newell(poly: readonly Vec3[]): Vec3;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SculptEdit } from '../primitives/index.js';
|
|
2
|
+
import type { HeadParams } from './head-params.js';
|
|
3
|
+
import { type BustFrame } from './head-torso.js';
|
|
4
|
+
/** `cell`: the bust's sculpt cell; plates thicken to ≈ 2.5 cells so far LODs stay closed. */
|
|
5
|
+
export declare function armour(p: HeadParams, f: BustFrame, cell?: number): SculptEdit[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SculptEdit } from '../primitives/index.js';
|
|
2
|
+
import type { HeadLayout } from './head-layout.js';
|
|
3
|
+
import type { HeadParams } from './head-params.js';
|
|
4
|
+
/** Eyebrows: two capsule segments (inner thick → outer thin) offset off the brow ridge. */
|
|
5
|
+
export declare function browEdits(p: HeadParams, l: HeadLayout): SculptEdit[];
|
|
6
|
+
export declare function beardEdits(p: HeadParams, l: HeadLayout): SculptEdit[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type SculptEdit } from '../primitives/index.js';
|
|
2
|
+
import type { HeadLayout } from './head-layout.js';
|
|
3
|
+
import type { HeadParams } from './head-params.js';
|
|
4
|
+
/** `cell`: the bust's sculpt cell (head units), floors the plinth disc so far LODs keep it. */
|
|
5
|
+
export declare function bustEdits(p: HeadParams, l: HeadLayout, cell?: number): SculptEdit[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Rng } from '../core/index.js';
|
|
2
|
+
import type { SculptEdit } from '../primitives/index.js';
|
|
3
|
+
import type { HeadLayout } from './head-layout.js';
|
|
4
|
+
import type { HeadParams } from './head-params.js';
|
|
5
|
+
/** `minThick`: the blade's floor thickness (≈ a cell), so far LODs keep their ears attached. */
|
|
6
|
+
export declare function earEdits(p: HeadParams, l: HeadLayout, minThick?: number): SculptEdit[];
|
|
7
|
+
/** Lower tusks rising from the jaw past the upper lip, curving out and back (3 cone segments). */
|
|
8
|
+
/** `minR`: radius floor (≈ half a cell) so far LODs keep the tusks. */
|
|
9
|
+
export declare function tuskEdits(p: HeadParams, l: HeadLayout, minR?: number): SculptEdit[];
|
|
10
|
+
/** War paint: thin deep ellipsoids painted through the skin, so each stripe is a clean band of
|
|
11
|
+
* constant width wherever it crosses the surface — two claw marks per cheek, a crest stripe up
|
|
12
|
+
* the forehead, three down the chin. */
|
|
13
|
+
export declare function paintEdits(p: HeadParams, l: HeadLayout): SculptEdit[];
|
|
14
|
+
/** Seeded warts and bumps on the cranium and cheeks. */
|
|
15
|
+
export declare function wartEdits(p: HeadParams, l: HeadLayout, rng: Rng): SculptEdit[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SculptEdit } from '../primitives/index.js';
|
|
2
|
+
import type { HeadLayout } from './head-layout.js';
|
|
3
|
+
import type { HeadParams } from './head-params.js';
|
|
4
|
+
/** Brain case + face plate: the forms the eyes are seated against (head.ts probes them). */
|
|
5
|
+
export declare function primaryEdits(l: HeadLayout): SculptEdit[];
|
|
6
|
+
/** `cell`: the sculpt cell (head units). Far LODs drop the teeth and floor the nose's radii at
|
|
7
|
+
* about 0.6 cells so a long nose survives. */
|
|
8
|
+
export declare function skullEdits(p: HeadParams, l: HeadLayout, cell?: number): SculptEdit[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Vec3 } from '../core/index.js';
|
|
2
|
+
/** `rotate` (deg, X→Y→Z) taking local +X onto `d`, then rolling `roll` deg about it. */
|
|
3
|
+
export declare function alongX(d: Vec3, roll?: number): Vec3;
|
|
4
|
+
/** `rotate` taking local +Z (a cone's axis) onto `d`. */
|
|
5
|
+
export declare function alongZ(d: Vec3): Vec3;
|
|
6
|
+
export declare const unit: (d: Vec3) => Vec3;
|
|
7
|
+
export declare const along: (a: Vec3, d: Vec3, t: number) => Vec3;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Vec3 } from '../core/index.js';
|
|
2
|
+
import type { HeadParams } from './head-params.js';
|
|
3
|
+
export interface HeadLayout {
|
|
4
|
+
/** Cranium ellipsoid centre and radii. */
|
|
5
|
+
readonly cranium: {
|
|
6
|
+
readonly at: Vec3;
|
|
7
|
+
readonly r: Vec3;
|
|
8
|
+
};
|
|
9
|
+
/** Forehead front at the eye line. */
|
|
10
|
+
readonly faceX: number;
|
|
11
|
+
/** Left eye centre (mirror for the right) and eyeball radius. */
|
|
12
|
+
readonly eye: Vec3;
|
|
13
|
+
readonly eyeR: number;
|
|
14
|
+
readonly browZ: number;
|
|
15
|
+
readonly noseZ: number;
|
|
16
|
+
readonly mouthZ: number;
|
|
17
|
+
/** Front of the lips. */
|
|
18
|
+
readonly mouthX: number;
|
|
19
|
+
readonly chin: Vec3;
|
|
20
|
+
/** Jaw hinge (x, z) — the jaw part's pivot. */
|
|
21
|
+
readonly hinge: readonly [number, number];
|
|
22
|
+
/** Left jaw angle (gonion). */
|
|
23
|
+
readonly angle: Vec3;
|
|
24
|
+
/** Top of the head, units. */
|
|
25
|
+
readonly crown: number;
|
|
26
|
+
/** Bottom of the bust (the asset's z = 0), units. */
|
|
27
|
+
readonly base: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function headLayout(p: HeadParams): HeadLayout;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Mesh, Vec3 } from '../core/index.js';
|
|
2
|
+
import { type Field, type SculptEdit } from '../primitives/index.js';
|
|
3
|
+
import type { HeadLayout } from './head-layout.js';
|
|
4
|
+
import type { HeadParams } from './head-params.js';
|
|
5
|
+
/** Default plinth colour (dark slate). */
|
|
6
|
+
export declare const PLINTH: Vec3;
|
|
7
|
+
/** The jaw region (head units): an ellipsoid around chin and lower lip, cut flat at the mouth
|
|
8
|
+
* line. Its skin seam runs along the lips, down the marionette lines and under the chin — creases
|
|
9
|
+
* a face already has — instead of across the cheek. */
|
|
10
|
+
export declare function jawRegion(p: HeadParams, l: HeadLayout): {
|
|
11
|
+
field: Field;
|
|
12
|
+
centre: Vec3;
|
|
13
|
+
radii: Vec3;
|
|
14
|
+
};
|
|
15
|
+
export interface HeadEditSet {
|
|
16
|
+
readonly skull: readonly SculptEdit[];
|
|
17
|
+
readonly ears: readonly SculptEdit[];
|
|
18
|
+
readonly tusks: readonly SculptEdit[];
|
|
19
|
+
readonly bust: readonly SculptEdit[];
|
|
20
|
+
/** The bust-cut region (≈ 0 on the cut faces), painted as bare plinth material. */
|
|
21
|
+
readonly bustCut?: Field;
|
|
22
|
+
}
|
|
23
|
+
/** `head` and `jaw` meshes in head units at cell size `res` (units). Each is ONE sculpt (skull +
|
|
24
|
+
* ears − region, skull ∩ region + tusks), so the sculpt's range skipping covers every edit. */
|
|
25
|
+
export declare function headAndJaw(p: HeadParams, l: HeadLayout, set: HeadEditSet, res: number): {
|
|
26
|
+
head: Mesh;
|
|
27
|
+
jaw: Mesh;
|
|
28
|
+
};
|
|
29
|
+
export declare function bustMesh(p: HeadParams, set: HeadEditSet, res: number): Mesh;
|
|
30
|
+
/** Eyeball of radius `r` centred on the origin, gazing +X. */
|
|
31
|
+
export declare function eyeMesh(p: HeadParams, r: number, res: number): Mesh;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type Vec3 } from '../core/index.js';
|
|
2
|
+
export type EarShape = 'round' | 'pointed';
|
|
3
|
+
export type HairStyle = 'none' | 'topknot' | 'mohawk' | 'swept' | 'tufts' | 'braids';
|
|
4
|
+
export type BeardStyle = 'none' | 'short' | 'braided' | 'goatee';
|
|
5
|
+
export type BustStyle = 'pauldrons' | 'hood' | 'tunic' | 'vest';
|
|
6
|
+
export interface HeadColors {
|
|
7
|
+
readonly skin: Vec3;
|
|
8
|
+
/** Darker skin: lips edge, nostrils, inner ear, wrinkles. */
|
|
9
|
+
readonly shade: Vec3;
|
|
10
|
+
readonly lips: Vec3;
|
|
11
|
+
readonly sclera: Vec3;
|
|
12
|
+
readonly iris: Vec3;
|
|
13
|
+
readonly pupil: Vec3;
|
|
14
|
+
readonly teeth: Vec3;
|
|
15
|
+
readonly mouth: Vec3;
|
|
16
|
+
readonly hair: Vec3;
|
|
17
|
+
readonly cloth: Vec3;
|
|
18
|
+
readonly leather: Vec3;
|
|
19
|
+
readonly metal: Vec3;
|
|
20
|
+
/** Cloak / mantle over the shoulders; default `leather`. */
|
|
21
|
+
readonly cape?: Vec3;
|
|
22
|
+
/** Fur trim on the bust (mantle, hood lining); default `leather`. */
|
|
23
|
+
readonly fur?: Vec3;
|
|
24
|
+
/** War paint / tattoo stripes (orc), or none. */
|
|
25
|
+
readonly paint?: Vec3;
|
|
26
|
+
/** The bust's plinth (stone/wood socle); default a dark slate. */
|
|
27
|
+
readonly plinth?: Vec3;
|
|
28
|
+
/** Scarf / sash cloth (vest style); default `cloth`. */
|
|
29
|
+
readonly scarf?: Vec3;
|
|
30
|
+
}
|
|
31
|
+
export interface HeadParams {
|
|
32
|
+
/** Chin to crown, metres (adult human ≈ 0.23). */
|
|
33
|
+
readonly height: number;
|
|
34
|
+
/** Full width / depth of the brain case; `height` = crown above the eye line. */
|
|
35
|
+
readonly cranium: {
|
|
36
|
+
readonly width: number;
|
|
37
|
+
readonly depth: number;
|
|
38
|
+
readonly height: number;
|
|
39
|
+
};
|
|
40
|
+
/** Ridge radius, how far it juts past the eyes, and the scowl (inner ends lowered). */
|
|
41
|
+
/** Ridge radius, overhang past the eyes, scowl (inner ends lowered), eyebrow hair radius
|
|
42
|
+
* (omit or 0 = no eyebrows). */
|
|
43
|
+
readonly brow: {
|
|
44
|
+
readonly ridge: number;
|
|
45
|
+
readonly overhang: number;
|
|
46
|
+
readonly scowl: number;
|
|
47
|
+
readonly hair?: number;
|
|
48
|
+
};
|
|
49
|
+
readonly cheeks: {
|
|
50
|
+
readonly size: number;
|
|
51
|
+
readonly width: number;
|
|
52
|
+
};
|
|
53
|
+
/** Half-width at the jaw angle, chin size, lower-jaw jut past the upper lip, chin drop,
|
|
54
|
+
* muzzle (how far mouth and jaw push forward of the brow: prognathism). */
|
|
55
|
+
readonly jaw: {
|
|
56
|
+
readonly muzzle: number;
|
|
57
|
+
readonly width: number;
|
|
58
|
+
readonly chin: number;
|
|
59
|
+
readonly underbite: number;
|
|
60
|
+
readonly drop: number;
|
|
61
|
+
};
|
|
62
|
+
/** Eye line → nose base, nostril half-width, tip radius, hook (droop), bridge projection. */
|
|
63
|
+
readonly nose: {
|
|
64
|
+
readonly length: number;
|
|
65
|
+
readonly width: number;
|
|
66
|
+
readonly tip: number;
|
|
67
|
+
readonly hook: number;
|
|
68
|
+
readonly bridge: number;
|
|
69
|
+
};
|
|
70
|
+
/** Length (root → tip), width, sweep back (deg), tilt up (deg). */
|
|
71
|
+
readonly ears: {
|
|
72
|
+
readonly shape: EarShape;
|
|
73
|
+
readonly length: number;
|
|
74
|
+
readonly width: number;
|
|
75
|
+
readonly sweep: number;
|
|
76
|
+
readonly lift: number;
|
|
77
|
+
};
|
|
78
|
+
/** Eyeball radius, centre-to-midline, eye line (fraction of height), lid angles (deg). */
|
|
79
|
+
readonly eyes: {
|
|
80
|
+
readonly radius: number;
|
|
81
|
+
readonly spacing: number;
|
|
82
|
+
readonly line: number;
|
|
83
|
+
readonly lid: number;
|
|
84
|
+
readonly lowerLid: number;
|
|
85
|
+
};
|
|
86
|
+
/** Half-width, lip thickness, grin (0 = closed line, 1 = wide toothy smile). */
|
|
87
|
+
readonly mouth: {
|
|
88
|
+
readonly width: number;
|
|
89
|
+
readonly lips: number;
|
|
90
|
+
readonly grin: number;
|
|
91
|
+
};
|
|
92
|
+
readonly tusks: {
|
|
93
|
+
readonly length: number;
|
|
94
|
+
readonly radius: number;
|
|
95
|
+
readonly spread: number;
|
|
96
|
+
readonly flare: number;
|
|
97
|
+
} | null;
|
|
98
|
+
readonly neck: {
|
|
99
|
+
readonly radius: number;
|
|
100
|
+
};
|
|
101
|
+
/** Shoulder half-span, gear style, muscle mass (0 = bony and narrow … 1 = brute; default 0.5). */
|
|
102
|
+
readonly bust: {
|
|
103
|
+
readonly shoulders: number;
|
|
104
|
+
readonly style: BustStyle;
|
|
105
|
+
readonly mass?: number;
|
|
106
|
+
};
|
|
107
|
+
readonly hair: HairStyle;
|
|
108
|
+
readonly beard: BeardStyle;
|
|
109
|
+
/** Wart / bump count scattered on the skin (seeded). */
|
|
110
|
+
readonly warts: number;
|
|
111
|
+
/** Forehead creases (0 = smooth; a goblin's worried brow has 3). */
|
|
112
|
+
readonly wrinkles?: number;
|
|
113
|
+
readonly colors: HeadColors;
|
|
114
|
+
}
|
|
115
|
+
/** Throws T3D_RECIPE_INVALID (with a fix) when `p` cannot make a head. */
|
|
116
|
+
export declare function checkHead(p: HeadParams): HeadParams;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HeadParams } from './head-params.js';
|
|
2
|
+
/** Classical proportions, slightly heroic: eye line at half height, thirds brow/nose/chin. */
|
|
3
|
+
export declare const human: HeadParams;
|
|
4
|
+
/** Massive underbitten jaw, tusks, heavy brow over small deep eyes, flat broad nose, thick neck. */
|
|
5
|
+
export declare const orc: HeadParams;
|
|
6
|
+
/** Small and sly: huge leaf ears, long hooked nose, wide toothy grin, big bright eyes. */
|
|
7
|
+
export declare const goblin: HeadParams;
|
|
8
|
+
/** Broad and bearded: wide skull, big bulbous nose, braided beard, deep-set eyes. */
|
|
9
|
+
export declare const dwarf: HeadParams;
|
|
10
|
+
/** Slender and ageless: long swept-back ears, high cheekbones, fine nose, almond eyes. */
|
|
11
|
+
export declare const elf: HeadParams;
|
|
12
|
+
export declare const HEADS: {
|
|
13
|
+
readonly human: HeadParams;
|
|
14
|
+
readonly orc: HeadParams;
|
|
15
|
+
readonly goblin: HeadParams;
|
|
16
|
+
readonly dwarf: HeadParams;
|
|
17
|
+
readonly elf: HeadParams;
|
|
18
|
+
};
|
|
19
|
+
export type HeadPreset = keyof typeof HEADS;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Mesh } from '../core/index.js';
|
|
2
|
+
import type { Field } from '../primitives/index.js';
|
|
3
|
+
/** Part ≈ max(skull, side); `side` is the cut field signed so the part is where side < 0;
|
|
4
|
+
* `part` is the part's full field (with ears/tusks), so their vertices are left alone. */
|
|
5
|
+
export declare function sharpenRim(m: Mesh, skull: Field, side: Field, part: Field, res: number): Mesh;
|
|
6
|
+
/**
|
|
7
|
+
* Where a field gradient smears across a hard crease (the jaw cut at coarse cells), a vertex
|
|
8
|
+
* normal can oppose its triangles; those vertices take their area-weighted face normal instead.
|
|
9
|
+
*/
|
|
10
|
+
export declare function creaseNormals(m: Mesh, minDot?: number): Mesh;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Vec3 } from '../core/index.js';
|
|
2
|
+
import type { Field } from '../primitives/index.js';
|
|
3
|
+
export interface ToneOptions {
|
|
4
|
+
/** Probe distance for the cavity test, head units (≈ the size of a fold). */
|
|
5
|
+
readonly reach: number;
|
|
6
|
+
/** 0 = flat colour, 1 = full painted tone. */
|
|
7
|
+
readonly strength?: number;
|
|
8
|
+
}
|
|
9
|
+
/** Wraps `colorAt` with cavity darkening and a warm-top / cool-under gradient. */
|
|
10
|
+
export declare function toned(field: Field, colorAt: (q: Vec3) => Vec3, o: ToneOptions): (q: Vec3) => Vec3;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Vec3 } from '../core/index.js';
|
|
2
|
+
import { type Field, type SculptEdit } from '../primitives/index.js';
|
|
3
|
+
import type { HeadLayout } from './head-layout.js';
|
|
4
|
+
import type { HeadParams } from './head-params.js';
|
|
5
|
+
/** Where the bust sits relative to the head: centre x, shoulder half-span, base, neck root… */
|
|
6
|
+
export interface BustFrame {
|
|
7
|
+
readonly cx: number;
|
|
8
|
+
readonly s: number;
|
|
9
|
+
/** Reference z the torso is laid out from (the floor lifted by the build's hunch). */
|
|
10
|
+
readonly b: number;
|
|
11
|
+
/** The asset's floor: bottom of the plinth. */
|
|
12
|
+
readonly floor: number;
|
|
13
|
+
/** Neck root (top of the sternum), z. */
|
|
14
|
+
readonly nz: number;
|
|
15
|
+
readonly m: number;
|
|
16
|
+
/** Neck radius. */
|
|
17
|
+
readonly n: number;
|
|
18
|
+
/** Where the trapezius meets the neck, z (high behind the ear on a brute). */
|
|
19
|
+
readonly trapZ: number;
|
|
20
|
+
/** Top of the plinth = bottom of the chest cut, z. */
|
|
21
|
+
readonly cutZ: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function frameOf(p: HeadParams, l: HeadLayout): BustFrame;
|
|
24
|
+
/** Anatomy volumes (plain adds), every one grown by `g`. */
|
|
25
|
+
export declare function torsoForms(f: BustFrame, g?: number): SculptEdit[];
|
|
26
|
+
/** Signed distance to the bust-cut region (negative inside): ≈ 0 on the cut faces. */
|
|
27
|
+
export declare function cutField(f: BustFrame): Field;
|
|
28
|
+
/** Keeps a group to the bust silhouette: the U-cut under the chest, rising to cut the arms. */
|
|
29
|
+
export declare function bustCut(f: BustFrame, g?: number): SculptEdit;
|
|
30
|
+
/** The bare body: anatomy in `color`, sternal notch and groove, then the bust cut. */
|
|
31
|
+
export declare function bodyEdits(p: HeadParams, f: BustFrame, color: Vec3): SculptEdit[];
|
|
32
|
+
/** A turned plinth: wide disc with a bead moulding, then a narrower socle up to the chest cut.
|
|
33
|
+
* Both start below the floor, so the bust's flat base cut alone makes the underside. */
|
|
34
|
+
/** `minT`: floor for the disc's thickness (≈ a cell), so far LODs keep the bust on the ground. */
|
|
35
|
+
export declare function plinthEdits(p: HeadParams, f: BustFrame, minT?: number): SculptEdit[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type BuildContext, type Rng, type Vec3 } from '../core/index.js';
|
|
2
|
+
import { type HeadLayout } from './head-layout.js';
|
|
3
|
+
import { type HeadEditSet } from './head-mesh.js';
|
|
4
|
+
import { type HeadParams } from './head-params.js';
|
|
5
|
+
import { type HeadPreset } from './head-presets.js';
|
|
6
|
+
/** Overrides: top-level keys replace, nested objects merge one level (`{ jaw: { underbite: 0.1 } }`). */
|
|
7
|
+
export type HeadOverrides = {
|
|
8
|
+
readonly [K in keyof HeadParams]?: Partial<HeadParams[K]>;
|
|
9
|
+
};
|
|
10
|
+
export interface HeadOptions {
|
|
11
|
+
readonly race?: HeadPreset | HeadParams;
|
|
12
|
+
readonly params?: HeadOverrides;
|
|
13
|
+
/** Part-name prefix: `orc` → `orc_head`, `orc_jaw`, `orc_eye_l` … Default none. */
|
|
14
|
+
readonly prefix?: string;
|
|
15
|
+
/** Where the bust base sits, metres. */
|
|
16
|
+
readonly at?: Vec3;
|
|
17
|
+
/** Baked jaw motion (degrees either side of rest, 0 = static pivot). Default 0. */
|
|
18
|
+
readonly jawSway?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface HeadInfo {
|
|
21
|
+
readonly parts: {
|
|
22
|
+
bust: string;
|
|
23
|
+
head: string;
|
|
24
|
+
jaw: string;
|
|
25
|
+
eyeL: string;
|
|
26
|
+
eyeR: string;
|
|
27
|
+
};
|
|
28
|
+
/** Overall height of bust + head, metres. */
|
|
29
|
+
readonly height: number;
|
|
30
|
+
readonly params: HeadParams;
|
|
31
|
+
}
|
|
32
|
+
export declare function headParams(o?: Pick<HeadOptions, 'race' | 'params'>): HeadParams;
|
|
33
|
+
/** Sculpt cell edge per LOD, in head units (× height = metres). */
|
|
34
|
+
export declare const HEAD_RES: readonly [0.02, 0.045, 0.14];
|
|
35
|
+
/** Every edit list of a head, in head units (pure: same params + rng state → same edits). */
|
|
36
|
+
export declare function headEdits(p: HeadParams, rng: Rng, lod?: 0 | 1 | 2): HeadEditSet & {
|
|
37
|
+
layout: HeadLayout;
|
|
38
|
+
};
|
|
39
|
+
export declare function head(ctx: BuildContext, o?: HeadOptions): HeadInfo;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type Vec3 } from '../core/index.js';
|
|
2
|
+
export interface HullColors {
|
|
3
|
+
/** Above the boot-top. */
|
|
4
|
+
readonly topsides: Vec3;
|
|
5
|
+
/** Below the waterline (antifouling). */
|
|
6
|
+
readonly bottom: Vec3;
|
|
7
|
+
/** The boot-top band at the waterline. Default near-black. */
|
|
8
|
+
readonly boot?: Vec3;
|
|
9
|
+
readonly deck: Vec3;
|
|
10
|
+
/** Inside of the bulwarks and the cap rail. Default = topsides. */
|
|
11
|
+
readonly bulwark?: Vec3;
|
|
12
|
+
}
|
|
13
|
+
export interface HullOptions {
|
|
14
|
+
/** Length overall at the deck, metres. */
|
|
15
|
+
readonly length: number;
|
|
16
|
+
/** Maximum beam at the deck edge. */
|
|
17
|
+
readonly beam: number;
|
|
18
|
+
/** Keel below the waterline. */
|
|
19
|
+
readonly draft: number;
|
|
20
|
+
/** Deck edge above the waterline amidships (lowest point of the sheer). */
|
|
21
|
+
readonly freeboard: number;
|
|
22
|
+
/** Sheer rise of the deck edge at [bow, stern] above amidships. Default [0.035, 0.012]·L. */
|
|
23
|
+
readonly sheer?: readonly [number, number];
|
|
24
|
+
/** 'round' (cruiser / tug) or 'transom' (flat stern). Default 'round'. */
|
|
25
|
+
readonly stern?: 'round' | 'transom';
|
|
26
|
+
/** Transom half-width as a share of the half-beam. Default 0.75. */
|
|
27
|
+
readonly transomWidth?: number;
|
|
28
|
+
/** Bilge: section superellipse exponent, 1.5 (soft V) … 5 (barge). Default 3. */
|
|
29
|
+
readonly fullness?: number;
|
|
30
|
+
/** Plan entrance exponent at the bow: 1.4 sharp … 3 bluff. Default 2. */
|
|
31
|
+
readonly entrance?: number;
|
|
32
|
+
/** Deck-edge breadth over waterline breadth − 1. Default 0.06. */
|
|
33
|
+
readonly flare?: number;
|
|
34
|
+
/** Bottom deadrise, degrees. Default 5. */
|
|
35
|
+
readonly deadriseDeg?: number;
|
|
36
|
+
/** Bulwark height above the deck, metres; 0 = none. Default 0. */
|
|
37
|
+
readonly bulwark?: number;
|
|
38
|
+
/** Deck camber at the centreline, metres. Default beam / 50. */
|
|
39
|
+
readonly camber?: number;
|
|
40
|
+
/** Height of the boot-top band above the waterline. Default 0.3. */
|
|
41
|
+
readonly bootTop?: number;
|
|
42
|
+
readonly colors: HullColors;
|
|
43
|
+
/** A rubbing strake / fender along each side just below the sheer (LOD0/1). */
|
|
44
|
+
readonly fender?: {
|
|
45
|
+
readonly color: Vec3;
|
|
46
|
+
readonly radius?: number;
|
|
47
|
+
};
|
|
48
|
+
/** Waterline amidships. Default [0, 0, 0]. */
|
|
49
|
+
readonly at?: Vec3;
|
|
50
|
+
}
|
|
51
|
+
export interface HullLines {
|
|
52
|
+
readonly L: number;
|
|
53
|
+
/** Deck-edge half-breadth at x (outer hull). */
|
|
54
|
+
readonly halfBreadth: (x: number) => number;
|
|
55
|
+
/** Deck-edge height at x (sheer line), relative to the waterline. */
|
|
56
|
+
readonly deck: (x: number) => number;
|
|
57
|
+
/** Keel / stem / counter height at x. */
|
|
58
|
+
readonly keel: (x: number) => number;
|
|
59
|
+
/** Section point at x for θ ∈ [0, π/2] (0 = keel, π/2 = deck edge), starboard (y ≥ 0). */
|
|
60
|
+
readonly section: (x: number, theta: number) => [number, number];
|
|
61
|
+
}
|
|
62
|
+
export declare function validateHull(o: HullOptions): void;
|
|
63
|
+
export declare function hullLines(o: HullOptions): HullLines;
|
|
64
|
+
/** θ where the section crosses height z (bisection; the section rises monotonically). */
|
|
65
|
+
export declare function thetaAt(lines: HullLines, x: number, z: number): number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MeshBuilder, Vec3 } from '../core/index.js';
|
|
2
|
+
export type Grid = Vec3[][];
|
|
3
|
+
/** Smooth normals over a station × column grid (outward = tj × ti for the starboard side). */
|
|
4
|
+
export declare function normalsOf(g: Grid): Grid;
|
|
5
|
+
/** Emit columns [j0, j1] of a starboard grid and its port mirror. */
|
|
6
|
+
export declare function emitBand(b: MeshBuilder, g: Grid, nrm: Grid, j0: number, j1: number, color: Vec3, mirror: boolean): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type BuildContext, type Lod, type Mesh } from '../core/index.js';
|
|
2
|
+
import { type HullLines, type HullOptions } from './hull-lines.js';
|
|
3
|
+
export type { HullColors, HullLines, HullOptions } from './hull-lines.js';
|
|
4
|
+
export interface HullMesh {
|
|
5
|
+
/** Shell (+ bulwarks + transom). */
|
|
6
|
+
readonly shell: Mesh;
|
|
7
|
+
readonly deck: Mesh;
|
|
8
|
+
readonly lines: HullLines;
|
|
9
|
+
}
|
|
10
|
+
export declare function hullMesh(o: HullOptions, lod?: Lod): HullMesh;
|
|
11
|
+
/** Add `name` (shell) and `name_deck` parts; returns the lines for placing deckhouses and fittings. */
|
|
12
|
+
export declare function hull(ctx: BuildContext, o: HullOptions & {
|
|
13
|
+
readonly name?: string;
|
|
14
|
+
}): HullLines;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { type FacadeOptions, facade, type SetbackTier, type Side, setbacks } from './building.js';
|
|
2
|
+
export { HEAD_RES, type HeadInfo, type HeadOptions, type HeadOverrides, head, headEdits, headParams, } from './head.js';
|
|
3
|
+
export { type BeardStyle, type BustStyle, checkHead, type EarShape, type HairStyle, type HeadColors, type HeadParams, } from './head-params.js';
|
|
4
|
+
export { HEADS, type HeadPreset } from './head-presets.js';
|
|
5
|
+
export { type HullColors, type HullLines, type HullMesh, type HullOptions, hull, hullMesh, } from './hull.js';
|
|
6
|
+
export { hullLines } from './hull-lines.js';
|
|
7
|
+
export { type MassOptions, mass } from './mass.js';
|
|
8
|
+
export { type OpeningOptions, type OpeningSide, opening } from './openings.js';
|
|
9
|
+
export { creature } from './planned.js';
|
|
10
|
+
export { type RoofInfo, type RoofMeshOptions, roof, roofInfo, roofMesh } from './roof.js';
|
|
11
|
+
export type { RoofChimney } from './roof-chimney.js';
|
|
12
|
+
export { type RoofOptions, type RoofSide, type RoofType, ridgeHeight, roofHeightAt, } from './roof-shape.js';
|
|
13
|
+
export { type TreeFamilyParams, type TreeInfo, type TreeOptions, tree, treeParams, treeReal, trees, } from './vegetation.js';
|
|
14
|
+
export type { BranchLevel, CrownShape, LeafParams, LeafShape, TreeParams, } from './vegetation-params.js';
|
|
15
|
+
export { birch, oak, palm, pine, SPECIES, type SpeciesName, willow } from './vegetation-presets.js';
|
|
16
|
+
export { axle, propeller, trackRun, whyteAxles } from './vehicle.js';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
mass2,
|
|
3
|
+
opening2,
|
|
4
|
+
facade2,
|
|
5
|
+
setbacks2,
|
|
6
|
+
checkHead2,
|
|
7
|
+
HEADS2,
|
|
8
|
+
headParams2,
|
|
9
|
+
HEAD_RES2,
|
|
10
|
+
headEdits2,
|
|
11
|
+
head2,
|
|
12
|
+
hullLines2,
|
|
13
|
+
hullMesh2,
|
|
14
|
+
hull2,
|
|
15
|
+
creature2,
|
|
16
|
+
roofHeightAt2,
|
|
17
|
+
ridgeHeight2,
|
|
18
|
+
roofMesh2,
|
|
19
|
+
roof2,
|
|
20
|
+
roofInfo2,
|
|
21
|
+
oak2,
|
|
22
|
+
pine2,
|
|
23
|
+
palm2,
|
|
24
|
+
birch2,
|
|
25
|
+
willow2,
|
|
26
|
+
SPECIES2,
|
|
27
|
+
treeParams2,
|
|
28
|
+
tree2,
|
|
29
|
+
treeReal2,
|
|
30
|
+
trees2,
|
|
31
|
+
axle2,
|
|
32
|
+
whyteAxles2,
|
|
33
|
+
trackRun2,
|
|
34
|
+
propeller2
|
|
35
|
+
} from "../chunk-8j4c28jt.js";
|
|
36
|
+
import"../chunk-dxvypr7y.js";
|
|
37
|
+
import"../chunk-d1fv6hrm.js";
|
|
38
|
+
import"../chunk-y63c6zcv.js";
|
|
39
|
+
import"../chunk-drna2rny.js";
|
|
40
|
+
import"../chunk-hg7pf34j.js";
|
|
41
|
+
export {
|
|
42
|
+
HEADS2 as HEADS,
|
|
43
|
+
HEAD_RES2 as HEAD_RES,
|
|
44
|
+
SPECIES2 as SPECIES,
|
|
45
|
+
axle2 as axle,
|
|
46
|
+
birch2 as birch,
|
|
47
|
+
checkHead2 as checkHead,
|
|
48
|
+
creature2 as creature,
|
|
49
|
+
facade2 as facade,
|
|
50
|
+
head2 as head,
|
|
51
|
+
headEdits2 as headEdits,
|
|
52
|
+
headParams2 as headParams,
|
|
53
|
+
hull2 as hull,
|
|
54
|
+
hullLines2 as hullLines,
|
|
55
|
+
hullMesh2 as hullMesh,
|
|
56
|
+
mass2 as mass,
|
|
57
|
+
oak2 as oak,
|
|
58
|
+
opening2 as opening,
|
|
59
|
+
palm2 as palm,
|
|
60
|
+
pine2 as pine,
|
|
61
|
+
propeller2 as propeller,
|
|
62
|
+
ridgeHeight2 as ridgeHeight,
|
|
63
|
+
roof2 as roof,
|
|
64
|
+
roofHeightAt2 as roofHeightAt,
|
|
65
|
+
roofInfo2 as roofInfo,
|
|
66
|
+
roofMesh2 as roofMesh,
|
|
67
|
+
setbacks2 as setbacks,
|
|
68
|
+
trackRun2 as trackRun,
|
|
69
|
+
tree2 as tree,
|
|
70
|
+
treeParams2 as treeParams,
|
|
71
|
+
treeReal2 as treeReal,
|
|
72
|
+
trees2 as trees,
|
|
73
|
+
whyteAxles2 as whyteAxles,
|
|
74
|
+
willow2 as willow
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
//# debugId=2A8DC31E36ABDA1E64756E2164756E21
|
|
78
|
+
//# sourceMappingURL=index.js.map
|