suitparts
The salvager's exosuit, part by part. Read by `game/climber.module`.
suitparts
The salvager's exosuit, part by part. Read by game/climber.module.
Each entry in Parts.list names a bone and builds geometry in that bone's
own frame:
- +Y runs along the bone toward its child joint
- +Z is the direction the suit faces
- +X is the bone's right
Units are world metres. The climber slice bakes the frame from the live rig, so a part follows its bone in any pose without a second thought.
Geometry is sorted into surfaces — one builder per material — so a helmet can be an enamel shell, a steel jaw, brass fittings and a glowing visor slit and still cost four draws instead of forty.
Colour is vertex colour
Every suit material is white. The palette at the top of this file is the albedo
the renderer actually sees, because the builtin pbr shader multiplies
base_color by input.vertex_color. That is what lets one material carry rust
streaks running down from the bolts, salt bloom where the spray settles,
verdigris weeping out of the seams, and bare polish along every chamfer — all
inside a single mesh.
Parts.wear(base, opts) is the one shading function the whole suit goes
through. It reads the local point and its normal, so an off-axis normal (a
chamfer) is detected as an edge and loses its paint, exactly where a real plate
would.
Material tuning is code
Parts.MATERIAL_SPEC holds the surface tuning and Parts.applyMaterials()
pushes it onto the live materials on every build. The mat.yaml files carry the
same values so a cold load already looks right; the spec is the record.
Scoped to this part · feeds back into the world's score.