GlassCatalog
The single definition of every material in glassLiquidsMaterials: one entry each in `ENTRIES` (id, name, kind, style, tile size, physical values, layer, search words, reference prompt). `build()` writes `materials/<id>.material/mat.yaml` and the collection's `collection.yaml` (ta…
GlassCatalog
The single definition of every material in glassLiquidsMaterials: one entry each in ENTRIES (id, name, kind, style, tile size, physical values, layer, search words, reference prompt). build() writes materials/<id>.material/mat.yaml and the collection's collection.yaml (tags, roughness and metal ranges, see-through features, texture memory measured from what each material binds); writeBoards() and compactReferences() prepare the reference pictures. Tool code: call it from a tool, a test or execute, never from a component.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2GlassCatalog: the single definition of every material in glassLiquidsMaterials (Looking Glass). `C.build()` writes materials/<id>.material/mat.yaml for each material and the collection's collection.yaml (tags; roughness measured from the baked masks; textureKB measured from the textures each material binds). Re-runnable: it overwrites the same files every time. Tool code (it writes files): call it from a tool, a test or an execute call, never from a component. After syntheticsMaterials' SyntheticCatalog (Polish and Polymer, MIT), itself after fabricsMaterials' FabricCatalog. Physical values (1 unit = 1 m; colours linear): ior soda-lime glass 1.52, water 1.333, ice 1.31, quartz/amethyst 1.544, corundum (ruby, sapphire) 1.77, beryl (emerald) 1.58, topaz 1.62, diamond 2.417, honey 1.49, slime (water gel) 1.35 dispersion glTF's 20 / Abbe number: crown glass 59 -> 0.34, water 56 -> 0.36, quartz 70 -> 0.29, corundum 72 -> 0.28, diamond 55 -> 0.36 (its fire comes from its large ior - 1, which the shader multiplies in) absorption absorb_color = what white light looks like after absorb_distance metres: pure water (0.71, 0.94, 0.985) per metre (a = 0.34 / 0.06 / 0.015 per m at 650 / 550 / 450 nm, red dies in a few metres), float glass faintly green through its edge, gems saturated over about 1 cm of stone. Layers (how each draws; decided by the engine's rules for see-through surfaces): shell a thin clear pane: composites over whatever is drawn behind it, other see-through things included; queue 3010, no depth write, both faces. body bends, blurs or tints what is behind it, so it replaces it with its own read of the room; queue 3000, writes depth (nothing behind it can draw over it in the wrong order), front faces. opaque wax: the engine's pbr with subsurface scattering, opaque queue.
studio(what: string) → string
| arg | type | description |
|---|---|---|
| what | string |
pane(what: string, across: string) → string
| arg | type | description |
|---|---|---|
| what | string | |
| across | string |
gem(what: string) → string
| arg | type | description |
|---|---|---|
| what | string |
photo(what: string) → string
| arg | type | description |
|---|---|---|
| what | string |
toon(what: string) → string
| arg | type | description |
|---|---|---|
| what | string |
get(id: string) → Entry
The definition of one material, or nil.
| arg | type | description |
|---|---|---|
| id | string |
ids( ) → void
Every material id, in catalog order.
texRef(name: string) → string
| arg | type | description |
|---|---|---|
| name | string |
hasTexture(name: string) → boolean
| arg | type | description |
|---|---|---|
| name | string |
texName(s: Entry, slot: string) → string
The texture name a material uses for a slot ("albedo", "normal" or "mask").
| arg | type | description |
|---|---|---|
| s | Entry | |
| slot | string |
galleryLayout(list: { any }, minSize: number) → void
The gallery page size and page that show every material of this collection, and nothing else, on one ring of materialLibraryKit's "all" view. Mirrors the core Gallery's pagination. After syntheticsMaterials' SyntheticCatalog.galleryLayout (MIT).
| arg | type | description |
|---|---|---|
| list | { any } | |
| minSize | number |
pageAt(size: number) → number
| arg | type | description |
|---|---|---|
| size | number |
materialDoc(s: Entry) → void
The mat.yaml document for one material.
| arg | type | description |
|---|---|---|
| s | Entry |
flowLists(text: string) → string
Collapse YAML block lists of plain numbers into flow lists (`[a, b, c, d]`). The engine's material loader reads a colour property only in flow form.
| arg | type | description |
|---|---|---|
| text | string |
writeMaterial(s: Entry) → void
Write materials/<id>.material/mat.yaml for one material (creating the asset the first time).
| arg | type | description |
|---|---|---|
| s | Entry |
round(x: number, d: number) → number
| arg | type | description |
|---|---|---|
| x | number | |
| d | number |
costWord(kb: number) → string
The texture-cost tag: textures-none (0 KB), textures-tiny (under 128 KB), textures-light (under 1.5 MB), textures-medium (under 2.5 MB) or textures-heavy.
| arg | type | description |
|---|---|---|
| kb | number |
finishWord(r: number) → string
The finish tag from the roughness range: glossy (under 0.25), satin (under 0.6) or rough.
| arg | type | description |
|---|---|---|
| r | number |
metalWord(m: { number }) → string
The metal tag from a metallic range: non-metallic, metallic or part-metallic.
| arg | type | description |
|---|---|---|
| m | { number } |
tileWord(s: Entry) → string
The `tile-<metres>m` tag; "tile-uniform" for a material with no texture and no repeating pattern.
| arg | type | description |
|---|---|---|
| s | Entry |
featureWords(s: Entry) → void
The engine see-through features a material relies on, as tags (and as README words).
| arg | type | description |
|---|---|---|
| s | Entry |
add(w: string) → void
| arg | type | description |
|---|---|---|
| w | string |
mipBytes(size: number) → number
GPU bytes of one square block-compressed texture (1 byte per pixel, BC7 / ASTC 4x4) with its full mip chain.
| arg | type | description |
|---|---|---|
| size | number |
roughnessRange(s: Entry) → void
The roughness range of a material: its base roughness, widened by the mask's G channel (added roughness) where it has one, and the painted parts' roughness.
| arg | type | description |
|---|---|---|
| s | Entry |
metalRange(s: Entry) → void
The metallic range of a material: every material in this collection is non-metallic (the lead came and wire included).
| arg | type | description |
|---|---|---|
| s | Entry |
r2(x: number) → string
| arg | type | description |
|---|---|---|
| x | number |
rgbText(c: { number }) → string
| arg | type | description |
|---|---|---|
| c | { number } |
distanceText(m: number) → string
A distance in metres as the README writes it: millimetres under 0.1 m, else metres.
| arg | type | description |
|---|---|---|
| m | number |
optics(s: Entry) → Optics
The optical numbers of one material: index of refraction, and what white light looks like after `absorbDistance` metres inside it (Beer–Lambert), with one line saying so.
| arg | type | description |
|---|---|---|
| s | Entry |
textureNames( ) → void
Every texture name this package's materials bind, each once.
tags(s: Entry, kb: number, rough: { number }, metal: { number }) → void
The tags of one entry, in the order the README lists them.
| arg | type | description |
|---|---|---|
| s | Entry | |
| kb | number | |
| rough | { number } | |
| metal | { number } |
add(w: string) → void
| arg | type | description |
|---|---|---|
| w | string |
build( ) → void
Write every material and the collection.yaml, measuring texture memory from what each material binds. Returns { count, path, totalKB } (totalKB counts every texture once).
compactReferences( ) → void
Keep every reference picture as a JPEG source (quality 90, about a sixth of the generated PNG) loaded at 512 px. Returns { count, bytes } of the sources kept.
writeBoards( ) → number
Write boards/<id>.material for every material: its reference picture on the engine's unlit shader, which the showcase hangs beside the material. Returns the count.
Res = { albedo: number?, normal: number?, mask: number? }Entry = {Optics = {Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.