JungleMaterials
The resolver of the jungleMaterials package: `JM.get(surface, { look })` answers a material for any of the 74 Emerald Falls rainforest surfaces (jungle floor, leaf litter dry and wet, riverbank and wet mud, moss, root mat, river gravel and sand, dark wet rock, temple floor; kapok…
JungleMaterials
The resolver of the jungleMaterials package: JM.get(surface, { look }) answers a material for any of the 74 Emerald Falls rainforest surfaces (jungle floor, leaf litter dry and wet, riverbank and wet mud, moss, root mat, river gravel and sand, dark wet rock, temple floor; kapok, fig, dipterocarp, palm, tree-fern, mossy and dead bark and bamboo; moss, hanging moss, lichen, liana, vine stem, aerial root; canopy, emergent and strangler-fig leaf sprays, monstera, elephant ear, banana, heliconia, philodendron, ivy, bromeliad, fern and tree-fern fronds, fallen leaf, jungle grass; orchid, heliconia, ginger, passion-flower and bromeliad petals, rafflesia; bracket, cap, red cap, glowing fungus and stem; mossy, river, temple, carved glyph, mossy and wet temple stone, rubble, stucco; wet planks, posts, jute and frayed rope; animated river, river foam, waterfall sheet, plunge pool, mist card, light shaft, firefly) in five looks (real, painted, toon, lowpoly, pixel), never nil.
Also JM.surfaces(), JM.group(), JM.isCard(), JM.isEffect(), JM.palette(), JM.source() (where an answer came from: own / installed / runtime), JM.terrainLayers() and JM.terrainLayer(name, look) (the record the engine terrain's surfaces input takes), JM.setNightGlow(0..1) / JM.nightGlow() (drives the emission of glowing fungi and fireflies) and JM.refresh(). jungleProps, jungleKit and terrain painting call it; look nil or "auto" follows JungleLook (= tropicalMaterials' TropicalLook).
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
hexLinear(hex: string) → void
| arg | type | description |
|---|---|---|
| hex | string |
lin(c: { number }) → void
| arg | type | description |
|---|---|---|
| c | { number } |
merge(d: { [string]: any }, extra: { [string]: any }?) → any
| arg | type | description |
|---|---|---|
| d | { [string]: any } | |
| extra | { [string]: any }? |
inst(group: string, mats: { string }, style: { string }, palette: string, extra: { [string]: any }?) → Def
a collection material used as installed; `style` the textures its stylised looks draw from
| arg | type | description |
|---|---|---|
| group | string | |
| mats | { string } | |
| style | { string } | |
| palette | string | |
| extra | { [string]: any }? |
ownTile(group: string, name: string, props: { [string]: any }?, palette: string, extra: { [string]: any }?) → Def
a tile this package ships: textures/<name>_albedo, _normal, _rm on tropicalSolid
| arg | type | description |
|---|---|---|
| group | string | |
| name | string | |
| props | { [string]: any }? | |
| palette | string | |
| extra | { [string]: any }? |
ownCard(group: string, name: string, props: { [string]: any }?, palette: string, extra: { [string]: any }?) → Def
a card this package ships: textures/<name>_albedo, _normal on tropicalFoliage
| arg | type | description |
|---|---|---|
| group | string | |
| name | string | |
| props | { [string]: any }? | |
| palette | string | |
| extra | { [string]: any }? |
variant(group: string, prefix: string, tex: string, rm: boolean, r: { [string]: any }, palette: string, extra: { [string]: any }?) → Def
a runtime variant of existing textures (`prefix` .. tex .. _albedo / _normal / _rm)
| arg | type | description |
|---|---|---|
| group | string | |
| prefix | string | |
| tex | string | |
| rm | boolean | |
| r | { [string]: any } | |
| palette | string | |
| extra | { [string]: any }? |
cardVariant(group: string, prefix: string, tex: string, r: { [string]: any }, palette: string, extra: { [string]: any }?) → Def
| arg | type | description |
|---|---|---|
| group | string | |
| prefix | string | |
| tex | string | |
| r | { [string]: any } | |
| palette | string | |
| extra | { [string]: any }? |
groundLayer(name: string, tiling: number, tint: { number }?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| tiling | number | |
| tint | { number }? |
ownLayer(name: string, tiling: number, tint: { number }?, maskName: string?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| tiling | number | |
| tint | { number }? | |
| maskName | string? |
groundInst(name: string, palette: string, tiling: number, extra: { [string]: any }?) → Def
| arg | type | description |
|---|---|---|
| name | string | |
| palette | string | |
| tiling | number | |
| extra | { [string]: any }? |
fx(kind: number, props: { [string]: any }, palette: string, extra: { [string]: any }?) → Def
| arg | type | description |
|---|---|---|
| kind | number | |
| props | { [string]: any } | |
| palette | string | |
| extra | { [string]: any }? |
leafProps(extra: { [string]: any }?) → void
| arg | type | description |
|---|---|---|
| extra | { [string]: any }? |
guidOf(ref: any) → string
| arg | type | description |
|---|---|---|
| ref | any |
tintOf(def: Def) → void
| arg | type | description |
|---|---|---|
| def | Def |
texturesOf(def: Def) → void
| arg | type | description |
|---|---|---|
| def | Def |
alive(ck: string, h: any) → boolean
| arg | type | description |
|---|---|---|
| ck | string | |
| h | any |
build(key: string, content: { [string]: any }) → any
| arg | type | description |
|---|---|---|
| key | string | |
| content | { [string]: any } |
glowValue(surface: string) → number
| arg | type | description |
|---|---|---|
| surface | string |
fromRecipe(surface: string, def: Def, look: string) → any
the material built from a recipe: the real look, or every look of a self-styled surface
| arg | type | description |
|---|---|---|
| surface | string | |
| def | Def | |
| look | string |
stylised(surface: string, def: Def, look: string) → any
| arg | type | description |
|---|---|---|
| surface | string | |
| def | Def | |
| look | string |
resolveFresh(surface: string, look: string) → void
| arg | type | description |
|---|---|---|
| surface | string | |
| look | string |
get(surface: string, opts: { look: string? }?) → any
Resolve a jungle surface to a material for a look. Never nil: an unknown look falls back to "real", nil or "auto" follows JungleLook.get(), an unknown surface answers a neutral forest floor. Real looks are material assets (own or collection) or runtime recipes; painted, toon, lowpoly and pixel are runtime materials built once per machine.
| arg | type | description |
|---|---|---|
| surface | string | A surface name from JM.surfaces(), e.g. "leafMonstera", "barkKapok", "stoneTempleMossy", "riverWater". |
| opts | { look: string? }? | { look = "real"|"painted"|"toon"|"lowpoly"|"pixel"|"auto" }; optional. |
examples
local mat = JM.get("leafMonstera", { look = "toon" })source(surface: string, opts: { look: string? }?) → string
Where JM.get's answer came from: "own:<material>", "installed:<identity>", "runtime:<key>" or "fallback:<identity>".
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
| opts | { look: string? }? | Same as JM.get. |
examples
print(JM.source("barkSmooth")) -- installed:woodsMaterials.materials.beechBarksurfaces( ) →
Every surface name this module resolves, in catalogue order (74 surfaces).
examples
for _, s in JM.surfaces() do print(s) end
group(surface: string) → string
The group a surface belongs to: ground, bark, moss, leaf, flower, fungus, rock, temple, wood, water or fx.
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
examples
if JM.group("leafMonstera") == "leaf" then ... endisCard(surface: string) → boolean
True when the surface is an alpha-cut, two-sided leaf, frond, petal, bract, tuft or moss-strand card that sways by vertex alpha.
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
isEffect(surface: string) → boolean
True when the surface is a see-through effect card (riverFoam, waterfallSheet, mistCard, lightShaft, firefly): draw it on a quad, it casts no shadow.
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
palette(surface: string) →
The surface's flat lowpoly palette colour as linear { r, g, b, a } (what the lowpoly look paints it).
| arg | type | description |
|---|---|---|
| surface | string | A surface name. |
terrainLayers( ) →
The ground surfaces that are terrain layers (a terrain carries at most eight at once).
terrainLayer(name: string, look: string?) →
A terrain layer record for the engine terrain's `surfaces` input: { name, albedo, normal?, mask?, tiling, tint }. albedo / normal / mask are texture identities, tiling is metres per repeat, tint a linear { r, g, b }. The stylised looks use baked per-look albedos (terrain_<layer>_<look>_albedo).
| arg | type | description |
|---|---|---|
| name | string | A terrain layer surface (JM.terrainLayers()). |
| look | string? | A look, nil/"auto" follows JungleLook. |
examples
local rec = JM.terrainLayer("leafLitter", "toon")setNightGlow(v: number) → void
How bright the night lights are: 0 = day (glowing fungi are pale caps, fireflies out), 1 = full night (fungi glow green, fireflies blink). Drives the emissive `glow` of fungusGlow and firefly in every look already built and every one built later. Call it from a day/night cycle (e.g. worldClockKit).
| arg | type | description |
|---|---|---|
| v | number | 0..1 |
examples
JM.setNightGlow(1 - daylight)
wetApply(surface: string, def: Def, h: any, w: number) → void
| arg | type | description |
|---|---|---|
| surface | string | |
| def | Def | |
| h | any | |
| w | number |
setWetness(v: number) → void
How wet the jungle looks: 0 = dry, 1 = soaked (rain). Leaf cards turn glossy and bark, moss, rock, temple stone and wood darken and shine, in the real look (the stylised looks keep their own shading). Call it from a weather system (jungleKit's Atmos does, from worldClockKit's wetness).
| arg | type | description |
|---|---|---|
| v | number | 0..1 |
examples
JM.setWetness(1)
wetness( ) → number
The wetness last set with JM.setWetness (0..1).
nightGlow( ) → number
The night glow last set with JM.setNightGlow (0..1).
refresh( ) → void
Drop the resolution cache so the next JM.get rebuilds.
_catalogue( ) →
Everything JungleMaterialsBuild.writeTable() turns into literal resolves: own materials, collection materials, textures, shaders.
Recipe = {Def = {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.