Files
raea/sdk/wear/package.json
shinyobjectz 8581fac811 raea/wear: a recipe per material class (WR5)
wearBake bakes a model's causes once (the native call, now typed), and wearShader draws them as wear by material
class: one WESL function per class (plaster, brick, sandstone, granite, wood, iron, zinc, copper, slate, felt, glass,
enamel, brass, ground), the stains, rising damp and splash they share, and WR9's season and weather over them, from
uniforms (age: years, soot, upkeep; weather: day, wet, snow, storm, ice). A debug mode draws any of 14 causes in false
colour from a lit hook. A mesh without the bake's second UV set is left as it was.

The bake (raea-sys-weathering 6) writes each texel's class into causes2's spare alpha, read by textureLoad, so one
shader serves every material; dilation copies class and element into the gutters instead of averaging two into a
third; a primitive with no UV set gets the atlas's as TEXCOORD_0 too, since Bevy's standard surface reads the first
wherever there's a second.

Proof: bun test in sdk/wear (12), cargo test -p raea-sys-weathering (11), and a street front of all 14 classes
baked and rendered by day, in rain, snow and autumn, and cause by cause.
2026-11-19 08:36:34 -08:00

11 lines
390 B
JSON

{
"name": "@raea/wear",
"license": "FSL-1.1-ALv2",
"private": true,
"version": "0.1.0",
"description": "raea's weathering (docs/wear.feature WR5): a model's causes baked once, and a recipe per material class that draws them as wear over the season's weather. Authors import it as raea/wear.",
"type": "module",
"main": "src/index.ts",
"exports": { ".": "./src/index.ts" }
}