Repository navigation
0.9.0: real 3D models by name - #72
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch with the version bump.
assets/CREDITS.mdand in each release. Models whose licence is not confirmed, or which are held for other reasons, are left out of release builds.Each change was independently reviewed; focused tests pass and the type check is clean.
🤖 Generated with Claude Code