Repository navigation
Material library: named materials that read on any page, with fibre surfaces - #63
Merged
Merged
Conversation
…s, copper, wood, rope and water, whose tint keeps to the material's own lightness so they read on a light page and a dark one One table (scene/material-library.ts) makes the schema's material enum, each material's default colour and the guide's list. A material may carry a band of lightness: a tint gives it a hue but is drawn toward the material's own colour until it is inside the band, so a bone tinted white is the palest bone, never white on a white page. The band numbers were set from rendered frames of each material on a near-white and a near-dark page (lit body at least 1.8 to 1 against the light page and 2.6 to 1 against the dark one). Plastic and rubber keep no band (a colour the scene writes is as written) but their default colour is now a mid-tone, so an untinted one reads on both pages. Recipes (roughness, metalness, sheen, clearcoat) are in the renderer, typed over the same names; SURFACE_LAYERS is where a surface layer plugs in by name from a recipe's layers, empty until one is registered. Tests: scene-materials (library, band, renderer, layer registry, validation), each seen failing with its code switched off. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The fibre layer is wired under the named materials: a muscle, tendon or rope tube or connector wears it without the scene asking (the library row carries the treatment), and treatment still asks for it on any other material. Her commit is kept whole; the reconciliation is the merge and the wiring (treatmentOf in surface-treatment.ts, the library's treatment, the guide and doc lines). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…anchor, since a model attached a forearm to the bottom of a group and lost it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… plain grey cord The arm re-run showed a muscle connector drawn grey: a connector's default colour was chosen before its material was looked at. A connector with no material is still the grey cord. Tests: a muscle and a rope connector take their library colours (seen failing first), and a plain one stays grey. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…which now imports it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merged
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.
Summary
A material library: the model names what a part is made of, and the part reads on light and dark pages.
src/scene/material-library.ts): plastic, metal, rubber, pcb, glass, glow, paper and tissue as before, plus bone, muscle, tendon, skin, steel, iron, brass, copper, wood, rope and water. The schema enum, default colours, the guide's list and treatments all read from it.anchor.Validation
Review limits
🤖 Generated with Claude Code