AlpineMaterials
The front of alpineMaterials. It resolves every Snowline Pass alpine surface by name to a material, for the looks `real`, `painted` and `toon` and the seasons `spring`, `summer`, `autumn` and `winter`, and never answers nil. Props, trees, cabins and terrain code call it:
AlpineMaterials
The front of alpineMaterials. It resolves every Snowline Pass alpine surface by name to a material, for the looks real, painted and toon and the seasons spring, summer, autumn and winter, and never answers nil. Props, trees, cabins and terrain code call it:
AM.get(surface, { season?, look? })returns a material AssetRef or a runtime handle, ready for a Model or an instanced draw.AM.terrainLayer(name, look?)returns{ albedo, normal, mask, tint, tiling, color }, a TerrainStream layer record for the six terrain surfaces, with textures named by asset identity and tiling in metres per repeat.AM.leafless(surface, season)tells you which surfaces have nothing to draw: larch in winter, flowers in autumn and winter.AM.ATLAS[surface]gives the cell grid of the flower and shrub atlases.AM.surfaces(),AM.group,AM.source,AM.tileSizeandAM.refreshround out the API.
Seasons and stylised looks are built at runtime from the base recipes, once per machine. They are cached in module state, so a reload never releases a handle a Model still holds.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
own(group: string, name: string, toon: { string }?, painted: { string }?, bare: { [string]: boolean }?) → Def
| arg | type | description |
|---|---|---|
| group | string | |
| name | string | |
| toon | { string }? | |
| painted | { string }? | |
| bare | { [string]: boolean }? |
coll(group: string, real: { string }, toon: { string }?, style: { string }?, painted: { string }?) → Def
| arg | type | description |
|---|---|---|
| group | string | |
| real | { string } | |
| toon | { string }? | |
| style | { string }? | |
| painted | { string }? |
live(h: any) → boolean
a cached answer is good unless it is a runtime handle someone released
| arg | type | description |
|---|---|---|
| h | any |
normalise(opts: { season: string?, look: string? }?) → void
| arg | type | description |
|---|---|---|
| opts | { season: string?, look: string? }? |
guidOf(ref: any) → string
| arg | type | description |
|---|---|---|
| ref | any |
stylised(look: string, isCard: boolean, compliance: number) → void
| arg | type | description |
|---|---|---|
| look | string | |
| isCard | boolean | |
| compliance | number |
build(key: string, content: { [string]: any }, fallback: any, fallbackSrc: string) → void
| arg | type | description |
|---|---|---|
| key | string | |
| content | { [string]: any } | |
| fallback | any | |
| fallbackSrc | string |
lakeLook(look: string) → void
the still lake in a stylised look: animWater's flat toon bands in glacial colours
| arg | type | description |
|---|---|---|
| look | string |
rockLook(name: string, look: string) → void
snow-dusted rock in every look: alpineSnowCap with the stylised looks' flattened colour
| arg | type | description |
|---|---|---|
| name | string | |
| look | string |
derived(name: string, season: string, look: string) → void
a season or look of a base material, built once per machine
| arg | type | description |
|---|---|---|
| name | string | |
| season | string | |
| look | string |
derivedStyle(surface: string, style: { string }, look: string) → void
| arg | type | description |
|---|---|---|
| surface | string | |
| style | { string } | |
| look | string |
collectionMaterial(surface: string, look: string) → void
| arg | type | description |
|---|---|---|
| surface | string | |
| look | string |
resolveFresh(surface: string, look: string, season: string) → void
| arg | type | description |
|---|---|---|
| surface | string | |
| look | string | |
| season | string |
get(surface: string, opts: { season: string?, look: string? }?) → any
Resolve an alpine surface to a material for a look and season. Never nil: an unknown look falls back to "real", an unknown season to "summer", an unknown surface to granite.
| arg | type | description |
|---|---|---|
| surface | string | A surface name from AM.surfaces(), e.g. "needlesSpruce", "scree", "logWall". |
| opts | { season: string?, look: string? }? | { season = "spring"|"summer"|"autumn"|"winter", look = "real"|"painted"|"toon" }; both optional. |
examples
local mat = AM.get("needlesLarch", { season = "autumn" })source(surface: string, opts: { season: string?, look: string? }?) → string
Where AM.get's answer came from: "own:<material>", "runtime:<key>", "installed:<identity>" or "fallback:<identity>".
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
| opts | { season: string?, look: string? }? | Same as AM.get. |
surfaces( ) →
Every alpine surface name this module resolves, in catalogue order.
leafless(surface: string, season: string?) → boolean
True when the surface has nothing to draw that season: larch needles in winter, alpine flowers in autumn and winter. Props should then draw no part with that surface.
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
| season | string? | "spring" | "summer" | "autumn" | "winter". |
examples
if not AM.leafless("needlesLarch", season) then addNeedles() endgroup(surface: string) → string
The group a surface belongs to: "terrain", "rock", "needles", "snow", "bark", "flora", "building" or "water". needles and flora are alpha-cut two-sided cards that sway by vertex alpha.
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
tileSize(surface: string) → number
Metres one texture repeat of a surface covers (tiles; nil for cards and borrowed surfaces).
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
terrainLayer(name: string, look: string?) →
A TerrainStream layer record for a terrain surface: the seven shipped tiles (needleLitter, scree, alpineMeadow, lichenGranite, windSnow, alpineTrail, lakeShingle) and the borrowed Terra Firma ground freshSnow and forestFloor. { albedo, normal, mask, tint, tiling } with the textures named by asset identity and tiling in metres per repeat (the shape forestKit's Ground.layers() builds). The toon look paints with the collections' flat toon ground (albedo only). Rock surfaces (snowDustedRock, cliffRock) are not terrain layers; any other name answers a granite-grey tint alone.
| arg | type | description |
|---|---|---|
| name | string | A terrain surface name (AM.TERRAIN, or "freshSnow" / "forestFloor"). |
| look | string? | "real" (default) | "painted" | "toon". |
examples
local layers = { scree = AM.terrainLayer("scree"), shore = AM.terrainLayer("lakeShingle") }refresh( ) → void
Drop the surface -> material answers so the next AM.get resolves afresh. Runtime materials already built stay registered and are reused while they are live, never rebuilt under a key whose handle is still held.
_catalogue( ) →
Everything AlpineBuild.writeTable() turns into literal resolves: the base materials, the collection materials, the textures the runtime looks draw from, and the shaders.
Recipe = {Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
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.