Skip to content

0.9.0: real 3D models by name - #72

Merged
ProjectIdris merged 14 commits into
mainfrom
batch-6
Nov 8, 2026
Merged

ProjectIdris merged 14 commits into
mainfrom
batch-6

Conversation

@ProjectIdris

Copy link
Copy Markdown
Owner

Batch with the version bump.

  • The model can ask for a real 3D model by name from a small checked catalogue, then place, label, explode, cut and animate it. One general loader with a per-model manifest (licence, credit, source, hashes, scale, orientation, named parts, hubs); nothing is fetched at runtime; a model that fails to load is left out and the stage says so.
  • Seven CC0 models ship with the app (about 15 MB, no LFS): six from Poly Haven (alarm clock, bolt cutters, camera, drill, measuring tape, mousetrap) and the Davenport electric motor from the Smithsonian. Credits are in assets/CREDITS.md and in each release. Models whose licence is not confirmed, or which are held for other reasons, are left out of release builds.
  • glTF pass-through with textured materials; a lighter finishing pass while dense models are on stage; named turning parts turn about their own hub; exploded parts lift along their own offset.
  • The guide grows only by each model's id; part names are resolved by the validator, with close names taken and ambiguous ones refused with the nearest.
  • Version 0.9.0.

Each change was independently reviewed; focused tests pass and the type check is clean.

🤖 Generated with Claude Code

ProjectIdris and others added 14 commits November 8, 2026 23:44
…th named parts

One general mechanism: a per-model manifest (source, exact licence and version, credit, hashes, axes, scale, named parts with confidence), a fetch-once hash-pinned build into ignored folders (no large files in git, no LFS), a GLB loader in the overlay page that checks size, hash and external references and reads files only, and `add {shape:model}` whose named parts are objects of their own, so pin, highlight, style, explode and cut work on them unchanged. A model with no match falls back to shapes with a note. CC BY credit is shown at the foot of the stage and a credits file is shipped and can be saved from the tray. The build copies the pinned files to dist/models; the installer refuses to pack without them.

The guide grows by about 1.2 KB (test budgets raised to 44,800 and 33,700).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…guide that does not grow with parts, small print placed clear of the model, licence as granted

A model whose file is missing or damaged is logged once with the reason and left out of the frame with its parts and the pins on them, and the stage says it could not be shown, rather than an empty stage with pins on nothing. Writing a model again replaces only its own parts: what was attached to the model or to a part stays (on the same part of the new model, or on the model when the part is gone).

Model and part names are resolved against the manifests, taking a close name (a slip, a plural, the one part with that word) with a note and refusing an ambiguous or unlike one with the nearest names, so the guide states the rule and lists only model ids, not parts. The credit and failure note take the corner of the stage with the least of the model and the controls in the way.

BodyParts3D is credited as the project's current grant (CC BY 4.0) with the exact credit line, the source archive and each part's element ids; the older notice on the files is recorded and kept in the credits. MIT is stated to cover the code only. The anatomy models remain local prototype use: held back from releases, and the installer refuses to build while a model is held.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…dit corner keeps off pin tags; no pin warnings for a model that is not there

A release build (`--release`, which `npm run dist` uses) serves the app a catalogue without the models whose manifest holds them back, so the guide, the schema and the validator never offer them and answers use shapes; their files and credits are not shipped, an earlier copy in dist is removed, and the build says what it left out. The guide's model line, the model shape and the pointer to models in the soft-subjects line exist only when the build has a model. The anatomy models stay held as a local prototype.

The stage's small print is placed last, after the pin tags have their places, keeps clear of them and stays in its corner while it is clear. A pin whose target is not there (a model left out) or still waiting for its file no longer logs "no visible surface". The build message no longer says models that are not built are drawn from shapes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
While a frame holds real-model parts of 100,000 triangles or more (counted once per model), the high tier finishes with 2x multisampling and half-resolution occlusion; shadows and materials stay at high. The light instance is built the first time it is needed, and a failure to build or run it puts the frame back on the full level and does not retry.

Measured once on the RTX 3060 Ti at 1920x1080 under a short shared lease (50 forced draws each, medians of the last 42, alternating runs): heart cutaway full 7.5 ms, light 7.1 to 7.5; brain cutaway full 10.7, light 9.5. The saving is about a millisecond on the brain and nothing clear on the heart. Memory was not measured.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…wn, one-piece models labelled whole

Eight CC0 objects join the heart and brain: six from Poly Haven (camera, alarm clock, drill, mousetrap, bolt cutters, measuring tape) and two Smithsonian scans (the Davenport motor, the Morse-Vail key). Each has a manifest that pins every file (address on the publisher's own host, bytes, sha256), the date fetched, the licence as its page states it, and the authors; the fetch refuses any other host.

The build passes the glTF through (scripts/assets/gltf-pass.mjs): geometry, UVs, materials and images are copied unchanged into one GLB, only a root that puts the model on the scene's axes, in metres and centred, and a tag on each named part are added, and each part's centre, size, triangles and closedness are measured from the node transforms. It refuses a file that points at anything unpinned, a data URI, a decoder the page lacks, a mesh in no part, or a node in two parts.

The page's store keeps each mesh in the model's space centred on its part, with the source's own material; textures larger than a tier allows are reduced when the model loads (low 1024 px, mid and high 2048). model-surface.ts draws a piece through the overlay's physical material: the colour map on every tier, the normal, roughness, metal and occlusion maps on mid and high, glass for transmission or blended transparency.

A model of one piece (the scans and four of the Poly Haven objects) is labelled as a whole: a part name is refused with the way to say it, explode and cut on it are dropped with a note, no part ids exist for it, and the Explode and Cut buttons are not offered for it alone. The guide names the one-piece models and takes its examples from what the catalogue holds, so a release that carries no anatomy never mentions a heart. The lean schema budget rises by 200 characters for eight more model names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… a model's images; docs for glTF objects

Without blob: in connect-src the loader's image reads were refused and every textured model drew white. A blob is only ever something this page made, so nothing can leave the machine through it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tures by style colour, tighter fetch and entry checks

The Morse-Vail key's CC0 was seen only in a search snippet: it is marked 'Licence unverified' and held from releases (the other seven objects ship). A glTF node with a negative scale (mirrored) is refused by the build instead of being baked inside out. A style colour on a textured model now tints its texture (white leaves it as it is). The fetch checks https and the publisher's host before it asks and again where a redirect landed; manifest file entries may not be absolute, carry a drive or backslash, or climb out with ..; build messages name glTF files by entry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, not its middle, and lifts off the face when exploded

The manifest names a part's hub (the origin of its node, or a point) and an explode offset; the build records the hub, the planner gives both to the part, and spins, loops, hinges and pivots that name no pivot of their own turn about the hub.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…binaries, so a release bundles them from a fresh clone

The alarm clock, bolt cutters, camera, drill, measuring tape, mousetrap and the Davenport motor (CC0, each pinned by hash in its manifest) are committed in assets/built, marked binary (no LFS); the heart, the brain and the Morse key stay out of git and held out of releases. Tests check which files are tracked, that the held ones are ignored, that nothing of a machine or ours is in what is committed, and that shipping works from the committed files alone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-models

A part's hub applies to the movement rows' turns too: the freedom pass takes the hub when a turn names no pivot, and a test runs every turning row on a clock hand. The kit and movement goldens stay exact.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… all of src/scene, and the docs schemas are rebuilt with the models

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ProjectIdris
ProjectIdris merged commit 88a213a into main Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant