Custom GLBs drop into 14 named slots without code changes; an empty manifest
produces today's game by construction (the fallback builders are the original
code moved into a closure, and an empty registry returns the caller's own
object by identity).
- src/assets/{slots,manifest,idb,registry,blobBody}.ts — schema + validation,
GLTF cache with per-instance material cloning, fit nodes, IndexedDB override
layer, paintability report.
- Slot hooks in createBlob, parts, cannon, greybox, puddles, ghost. Mesh-only:
no collider, physics or logic line is touched. Animated sub-parts (plate cap,
belt chevrons, fan blades, cannon pivot) stay procedural so a custom model
cannot stop them moving.
- public/assets/ — the build had NO asset copy step at all, so every asset URL
would have 404'd in production. public/ is vite's default publicDir, so this
needs no vite.config change.
- Tests: 63 headless checks + a farm-GLB audit that fires PaintSkin's own
raycast against the fitted body.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
14 lines
673 B
Bash
Executable File
14 lines
673 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copy the four farm GLBs into the served asset directory so the lane-i demo
|
|
# (and any manifest that names them) can actually fetch them.
|
|
#
|
|
# They are NOT committed there: the four total ~43 MB of raw farm output with
|
|
# embedded textures, and deploy.sh rsyncs + docker-cps the whole dist/ on every
|
|
# deploy. Compress them offline before shipping a pack to production.
|
|
set -euo pipefail
|
|
root="$(cd "$(dirname "$0")/.." && pwd)"
|
|
mkdir -p "$root/public/assets/meshes"
|
|
cp "$root"/assets/meshes/*.glb "$root/public/assets/meshes/"
|
|
du -sh "$root/public/assets/meshes"
|
|
echo "staged -> public/assets/meshes/ (gitignored; served at \${BASE_URL}assets/meshes/)"
|