Log inGet started
Package

jungleProps.package

This package holds more than this page lists. See all of its files in its world.

README.md

jungleProps

A tropical rainforest prop kit for any world, each prop placed with one component: giant emergent trees (a kapok on climbable plank buttresses, a dipterocarp, a strangler fig around the hollow of its dead host), canopy trees (broadleaf, banyan-like fig, mahogany, rain tree), understory palms, rattan, tree ferns, wild banana, cecropia, bamboo, monstera, elephant ear, philodendron, heliconia and torch ginger, forest-floor ferns, spikemoss, seedlings, leaf litter, moss, grass and rafflesia, buttress / stilt / surface / hanging roots and roots gripping a stone block, lianas, vine curtains and climbing vines, bromeliads, orchids, staghorn ferns and passion flowers, bracket fungi, mushrooms and glowing mycena, plus rocks, logs, stepped temple ruins in three styles and a rope bridge (from StructureCatalog). Every prop has near, middle and far versions, 3 seeded shapes, colliders where it looks solid, a footstep surface, and draws in five looks (real, painted, toon, lowpoly, pixel) that switch world-wide with one call. Materials come from its dependency jungleMaterials.

Quick start

Install jungleProps (it brings jungleMaterials). In any world:

-- a 55 m kapok at the origin: climb its buttress roots
entity.spawn("kapok", { position = { 0, 0, 0 } }).component.add("jungleProps.JungleProp", { kind = "kapokEmergent", variant = 2 })

-- a tree fern beside it, shape and turn picked from a seed (for scattering)
entity.spawn("fern", { position = { 9, 0, 4 } }).component.add("jungleProps.JungleProp", { kind = "treeFern", seed = 41 })

-- switch every prop that follows the world look (look = "auto", the default) to cartoon:
require("jungleMaterials.JungleLook").set("toon")

-- a liana strung between two branches (mesh parts for a Model at the origin of the same frame)
local Props = require("jungleProps.Props")
local parts = Props.lianaBetween({ 0, 30, 0 }, { 14, 27, 6 }, 4, 17)

Add a jungleProps.PropGallery component to any entity to see every kind side by side, one band per look (looks and kinds narrow it, e.g. { looks = "real,toon", kinds = "emergent,canopy" }).

The package works from wherever it is installed: its own files reach each other with ~. names, and the bake helpers find their folder from their own location.

Guides

  • How do I add jungle trees, palms, ferns, vines and mushrooms to my world? Placing a prop, every family, variants and seeds, looks, colliders and climbing, hanging and bark props, branch anchors for epiphytes, lianas between trees.

JungleProp

Builds one child entity per part (a Model swapped to its cheaper versions as the prop shrinks on screen) and its static colliders, all temporary and rebuilt from the synced fields, so every peer builds the same prop and a reload rebuilds it. Changing any field rebuilds.

FieldDefaultMeaning
kindkapokEmergentany kind Props.kinds() lists (tables below)
lookautoauto follows the world look (jungleMaterials.JungleLook, the same switch as tropicalMaterials' TropicalLook); or real, painted, toon, lowpoly, pixel
variant1baked shape, 1..n (wraps); used when seed is 0
seed0non-zero: picks the variant and a yaw turn from the seed (scattering)
style""temple kinds: maya, khmer or candi (empty = the kind's default)
detailautoauto picks near / mid / far by screen size (one test per prop every 6 frames); near, mid or far pins one
collidetruebuild the colliders, each tagged with the attribute jungleSurface (footstep surface: wood, leaves, moss, stone, mud, ...) and climbable = true where climbKit may climb it

Looks: real, painted and pixel draw the same geometry under that look's material; toon draws a chunkier bake (tree crowns as soft lumpy masses, fewer broader leaves); lowpoly a faceted flat-shaded bake.

Kinds

Emergent layer (category emergent, layer emergent, surface wood)

KindWhat it is
kapokEmergentKapok (ceiba), 50-57 m: straight pale bole with conical spines low down, 6-8 plank buttresses 5.5-8 m tall reaching 5-7.5 m out (climbable, walkable rounded tops), a flat-topped crown 35-45 m wide on tiers of near-horizontal limbs
dipterocarpEmergentDipterocarp, 55-65 m: ruler-straight bole clear for 40 m on 3-5 low buttresses, ascending limbs under a lumpy cauliflower crown 28-36 m wide
stranglerFigEmergentStrangler fig, 45-50 m: a 3-4 m lattice of 13-17 fused spiralling roots around the hollow of its dead host (climbable), merging into a trunk with a broad dense crown and hanging aerial roots

Canopy layer (category canopy)

KindWhat it is
canopyBroadleaf26-33 m, smooth grey-brown trunk on small buttresses, dome crown of glossy evergreen leaves
canopyFigBanyan-like fig, 25-30 m: thick fluted trunk on sinuous buttresses, wide limbs, curtains of aerial roots, some reaching the ground as pillar roots
canopyMahoganyMahogany, 28-35 m: tall straight trunk, ascending limbs, dense rounded dark crown
rainTreeCanopyRain tree, 22-27 m: short trunk forking low into great mossy limbs under an umbrella crown 35-43 m wide
palmTallClumpTall clumping palm (nibung), a sub-canopy tree: 4-7 slender ringed stems 5-15 m leaning out of one clump, crowns of drooping pinnate fronds (capsule collider)

Understory (category understory, 2-10 m)

KindWhat it is
cecropiaSlender pale ringed trunk on stilt roots, candelabra branches with huge palmate umbrella leaves (collider)
understoryPalmClump of 1-3 thin ringed stems with shuttlecock crowns of pinnate fronds
rattanPalmSpiny climbing palm stems arching 4-7 m, pinnate leaves and whip tips
treeFernFibrous trunk 3-6 m, a rosette of 2.5-3.5 m lacy fronds, dead-frond skirt, fiddleheads unrolling (capsule collider)
wildBanana2-3 pseudostems, huge paddle leaves torn into strips, hanging purple bud
bambooClump12-19 jointed culms 6.5-11 m arching outward with leaf sprays (capsule collider)
monsteraGlossy heart-shaped leaves split with slits and holes on arching stalks
elephantEarHuge arrow-shaped leaves held out on thick stalks
philodendronRosette of deeply lobed glossy leaves
heliconiaPaddle leaves and zig-zag lobster-claw bracts, upright or hanging
gingerTorchLeafy canes 2.4-3.6 m and waxy red torch flowers on their own stalks
pandanusScrew pine 4.5-7.5 m: ringed trunk on a cone of 7-11 straight stilt roots, forking limbs ending in spiral tufts of keeled strap leaves, orange pineapple-like fruit (capsule collider, surface wood)
cycadStout scaly trunk 0.4-2 m under a crown of 16-24 stiff glossy pinnate fronds, a cone or woolly crown in the middle (capsule collider, surface wood)
fanPalmLicuala: 1-3 thin ringed stems 1.6-3.6 m with round pleated fan leaves 1-1.7 m across, split into wedge segments
ixoraShrubFlowering understory shrub (jungle flame) 1-2 m: glossy elliptic leaves in opposite pairs, domed heads of small scarlet four-petalled flowers at every tip
giantTaroUpright elephant ear (alocasia macrorrhizos) 3-3.6 m: a thick ringed stem with 4-7 huge arrow-shaped blades held up and out

Forest floor (category floor, no colliders)

KindWhat it is
fernSwordShuttlecock of 12-20 narrow arching fronds
fernBirdsNestVase of broad undivided wavy fronds
fernMaidenhairFans of tiny leaflets on wiry black stalks
selaginellaLow creeping mat of spikemoss sprays (surface moss)
seedlings4-8 young saplings 0.2-0.8 m
leafLitterPatch3 m patch of fallen leaves and twigs
mossPatchLumpy cushion of thick moss (surface moss)
jungleGrassBroad-bladed shade grass tufts
rafflesia0.8-1 m five-lobed warty flower around a spiked cup, with buds

Roots (category roots)

KindWhat it is
buttressRoots4-7 plank fins 2.5-4.5 m tall around a 2 m trunk hole, for the foot of any big trunk (climbable mesh collider)
stiltRoots8-14 arching prop roots from a trunk 1.6-2.8 m up (mesh collider)
surfaceRootsThick snaking roots over the floor from a centre, half sunk (mesh collider)
aerialRootsHangingCurtain of thin aerial roots hanging 8-14 m (origin at the top)
rootsGrippingStoneFig roots flowing over a 2 m mossy stone block into the ground (block included; climbable box collider)

Vines (category vines; hanging kinds hang down -Y from their origin)

KindWhat it is
lianaHangingWoody twisted liana hanging 14-22 m with a loop and leaves near the top
lianaLoopThick liana sagging 3.5-6 m between x = -4 and x = +4
vineCurtainCurtain of thin leafy vines 5-10 m from a 6 m line along X
vineClimbingTrunkVine with heart-shaped leaves spiralling 10-14 m up a 1 m-radius trunk at the origin (scale by the trunk radius)
mossHangingStrandsHanging moss strands 1-3 m
Props.lianaBetween(p0, p1, sag, seed, opts?)runtime liana between two points (cached meshes)

Epiphytes (category epiphytes; sit on a branch top, staghorn on bark facing +Z)

KindWhat it is
bromeliadTank bromeliad rosette with a red heart
orchidPink / orchidWhite / orchidPurpleStrap leaves and an arching spray of five-petalled flowers
staghornFernShield frond on the bark and forked antler fronds hanging out
epiphyteClumpMossy cushion with small bromeliads and ferns
passionFlowerVineThree-lobed leaves and passion flowers draping 2-4 m

Fungi (category fungi)

KindWhat it is
bracketFungusTiers of half-moon shelves on bark (origin on the bark, facing +Z)
mushroomCluster / mushroomRedClusterClusters of tan / glossy red mushrooms
glowFungusClusterTiny mycena caps glowing green at night (jungleMaterials setNightGlow)
glowBracketSmall glowing shelves on bark
veiledLadyStinkhorn with a lacy white net skirt
puffballsRound white puffballs

Rocks (category rocks, layer ground, footsteps stone / moss)

KindWhat it isCollider
riverBoulderSmooth water-worn grey boulder, dark wet foot, faint algae (1-2.8 m)mesh
mossyBoulderJointed forest-floor boulder under a thick moss cushion (1.4-3.4 m)mesh, climbable
wetRockSlabBroad flat dark wet slab with a walkable top and an algae fringe (2.5-5 m)mesh
rockCluster3-5 boulders fused together, moss in the hollows (3-5.5 m)mesh, climbable
cliffFace12 m wide stratified cliff tile facing +Z, mossy ledges, joints, undercut wet foot; 10 / 15 / 20 m tall; tiles along Xmesh, climbable
waterfallLipThe ledge a waterfall pours over: 14-18 m wide, 6 / 10 / 15 m tall, a wet channel (3-5 m) cut from the back edge to an overhanging lip; StructureCatalog.meta(kind, v).lip = { x, y, z, width }mesh, climbable
steppingStones5 / 6 / 7 flat-topped stones crossing a stream along +Z, tops 0.2-0.3 m above y = 0mesh

Logs (category logs, layer ground, footsteps wood / moss)

KindWhat it isCollider
fallenLogMossyFallen trunk 6 / 8 / 10 m along X under a blanket of moss, splintered endscapsule, walk along the top, climbable
fallenLogHollowGiant hollow log 6-7 m along X, 2.8 m thick: walk through it (about 2 m clear)mesh shell, passage open
stumpBroken stump 0.7-1.4 m, splintered top, root lobes into the soilcapsule, climbable
stumpMossyOld stump under moss, sometimes rotted hollowcapsule, climbable
deadBranchForked fallen branch 2.2-4.5 mnone
logBridgeLog felled across a stream, 8 / 12 m along Z, adzed 0.45 m walkway on topramp along the walkway

Temple ruins (category temple, layer structure, footsteps stone) in three styles

Every temple kind takes style = "maya" | "khmer" | "candi" (JungleProp field style, Props.parts / Props.colliders option style; default maya). The styles share one set of envelopes, so a layout and its colliders fit every style:

  • maya: battered talud courses under a vertical tablero, steep stairs between sloped alfarda balustrades, a three-door shrine with a pierced roof comb, glyph-cartouche reliefs, sun-god stucco masks;
  • khmer (Angkor-like): laterite plinths, sandstone walls with lotus friezes and heavy cornices, stepped cheek walls, corbelled prang towers (a quincunx on the summit), lintel-and-pediment doors, serene Bayon faces;
  • candi (Javanese / Balinese): narrow alternating mouldings with antefixes, a split gate (candi bentar), meru towers with corner bells, tendril-scroll reliefs, kala heads.

Everything is laid as real masonry: cut-stone courses with bevelled arrises and staggered joints, slipped and missing blocks showing the rubble core, broken corners, moss on weathered courses.

KindWhat it isCollider
templeTierOne pyramid terrace 3.36 m tall; base width 10 / 19 / 28 / 37 / 46 / 55 m by variant (stacked tiers leave 4.5 m terraces); paved topone solid box just inside its walls, climbable
templeStairOne flight up one tier: 12 risers of 0.28 m on 0.32 m treads (41°), foot at z = +3.84, top at z = 0, y = 3.36; v1 6 m, v2 6 m worn, v3 4 mwalkable ramp under the treads + climbable balustrades
templeTerrace1 m paved platform: v1 8 x 8 m, v2 12 x 5 m causeway with balustrades (naga in khmer), v3 8 x 8 m with four 0.25 m stepsboxes, walkable, climbable
templeBlockLoose chipped cut block (1.2 / 1.6 m ashlar, 0.9 m cube), moss capbox
templeBlockCarved1.4 x 0.8 x 0.8 m block with the style's relief on two faces; v2 toppled, v3 crackedbox
templeBlockFallenBlock tumbled on an edge, half sunk; v3 split in twoboxes
templeDoorwayWalk-through portal along Z: maya corbel arch, khmer lintel + pediment + colonnettes, candi split gatejamb and lintel boxes, opening clear
templeDoorwayCollapsedThe same fallen in: broken top, lintel across the threshold, rubble; still passableboxes
templePillar3.6 / 3 m pillar: plinth, carved drums (khmer ringed octagonal colonnette), capitalbox
templePillarBroken1.2-2.1 m snapped stump with jagged top and fallen drumsboxes
templeWall4 m wall along X, 0.8 m thick, coping band (khmer v2: balustered window)box, climbable
templeWallRuined4 m wall broken to a ragged stepped top, fallen blocks at its feetboxes per column, climbable
templeShrineThe summit sanctuary 7 x 5.5 m on a stepped plinth, walk-in dark room; v2 roofless. meta(...).roofY = where the crown sitswall / roof / plinth boxes
templeRoofCombMaya pierced roof comb; khmer flame pediment; candi five ratna finialsbox
templePrangKhmer prang (5 tiers + lotus bud), candi meru (6 tiers + bells + stupa), maya turret; v2 lost its topboxes per tier, climbable
templeStelaCarved stela on a plinth: maya ruler + glyphs, khmer inscription under a pointed arch, candi figure in a niche; v2 leaning, brokenboxes
templeHeadGiant carved head about 4 m: Bayon face / sun-god mask / kala head; v2 toppled on its sidemesh, climbable
templeRubbleFan of 10 / 15 / 22 broken blocks along +Zboxes, climbable
templeColumnFallenA column toppled full length toward +X: plinth and snapped stump standing, the shaft in a line of half-sunk drums, the capital tumbled at the end; v1 four drums in a line, v2 rolled apart, v3 two long pieces (khmer octagonal ringed drums)boxes per piece, climbable

Whole temples. TempleLayout.build(style, { seed, tiers = 3..6 (default 4), gate = true }) answers { { kind, position, yaw, variant, style } } and info = { rootAnchors = { {x,y,z,nx,ny,nz} }, footprint = { halfX, zMin, zMax, height }, top, stairs, fingerprint } in the temple's own frame (origin = site centre at ground level, +Z = front, the stairs climb toward -Z): stacked tiers with a stair up every tier, the shrine and its crown on the summit (roof comb / prang / meru), khmer corner prangs, a standing or collapsed gateway with ruined enclosure walls, a collapsed side doorway, stelae and pillars along the approach, a standing and a toppled giant head, rubble fans and fallen carved blocks round the base and on the terraces. Seeded and deterministic; TempleLayout.footprint(style, opts) is the ground to level. Put rootsGrippingStone / strangler figs on rootAnchors.

A collapsed ruin field. TempleLayout.build("ruinField", { seed, tiers, gate, masonry? }) answers the same placements and info for a ruined city taken back by the forest instead of a standing pyramid (think Beng Mealea or Ta Prohm): a half-buried mound of two terraces (the 19 m tier sunk 1.5-2.1 m into the earth, the lower flight of stairs half buried) with a small, mostly roofless shrine on top 4.5-5 m up (info.top), a processional way from a collapsed gateway to the stairs lined with standing, snapped and toppled columns, broken-walled rooms with one side open (one holding a small tower shrine on a terrace), fallen columns, a half-buried giant head and a toppled one, leaning stelae, rubble and fallen blocks scattered between. tiers sets how much ground it spreads over (the same footprint as a maya temple of those tiers); the masonry (info.masonry: maya, khmer or candi) is picked by seed unless masonry names one, and every placement carries it as its style. The way from the gate to the stairs is kept clear; walls, tiers and fallen pieces collide and climb.

Rope bridge (category bridge, layer structure, footsteps wood)

KindWhat it isCollider
ropeBridgePlank1.3 m deck board, lashed both ends: whole / split / snappedbox
ropeBridgeAnchorBank end: two hewn posts in a log sill, rope wraps, guy ropes, landing boards (v2 in stone cairns); the bridge leaves along +Zpost capsules (climbable), landing box

Whole bridges. Add the RopeBridge component to any entity: { from = {x,y,z}, to = {x,y,z}, space = "world" | "local", seed, sag (0 = auto), look, netting, sway, collide }. It hangs a catenary deck of lashed planks (gaps, a few missing or snapped), foot and hand ropes, suspenders and side netting, an anchor at each end, and sways a little (visual only). Colliders: one smooth walkable ramp following the sag and an invisible guard wall under each hand rope. RopeBridgeLayout.layout(p0, p1, opts) answers the same layout as data (frame, pieces, meshes, colliders, planks, length, sagDepth, deckAt(s), fingerprint) to drive yourself.

Colliders

Props.colliders(kind, { variant, style }) answers the collider specs (box, capsule (centre or a/b ends), sphere, mesh, ramp, with offset, yaw, pitch, roll, surface, climbable); ColliderBuild.build(entity, specs, yaw, tag) stands them as static children tagged jungleSurface and climbable.

What the solid part is, per family (measured 2026-11-14 with down-ray grids against the drawn LOD0 mesh):

  • Rocks (riverBoulder, mossyBoulder, wetRockSlab, rockCluster, steppingStones) and stumps: one mesh collider per drawn part at LOD 1 (body and moss both), so you stand on the moss cushion you see. Mean gap to the drawn top 0.5 to 3.5 cm; the larger single readings sit on steep flanks where LOD 0 and LOD 1 differ. cliffFace, waterfallLip and fallenLogHollow use their baked collision shells (ledges, channel, open passage).
  • Fallen mossy logs: a climbable capsule along the trunk (top within 3 to 9 cm). Log bridge: a ramp along the adzed walkway. Dead branches: no collider.
  • Plank buttresses (kapokEmergent, dipterocarpEmergent, canopyBroadleaf, canopyFig, canopyMahogany, buttressRoots): a baked climbable mesh per variant whose fins have vertical climbable flanks and a FLAT top. Where the drawn crest is gentle the top follows it; where it is steeper than 38 degrees (too steep to stand on, not steep enough for climbKit to treat as a wall) it becomes a stair of 0.9 m slabs with 38 degree treads centred on the crest, so a climber can pull over onto the top anywhere and a walker can go up the fin. The solid crest stays within about 0.4 m of the drawn one. Walk into a fin's flank holding forward: climbKit starts climbing after 0.3 s, and climbing past the top pulls you onto it.
  • Trunks: capsule chains (not climbable, except the strangler fig's lattice).

Props API

local Props = require("jungleProps.Props")       -- "~.Props" inside the package
Props.kinds() -> { string }                        -- every kind, registration order
Props.kindsOf(category) -> { string }              -- "emergent", "canopy", "understory", "floor", "roots", "vines", "epiphytes", "fungi", "rocks", "logs", "temple", "bridge"
Props.kindsOfLayer(layer) -> { string }            -- "emergent", "canopy", "understory", "floor", "ground", "vine", "epiphyte", "structure"
Props.info(kind) -> Entry?                         -- { kind, category, layer, variants, radius, height, collider?, surface, climbable?, hangs?, glows?, trunks?, branchAnchors?, description }
Props.parts(kind, { look?, variant?, lod?, style? }) -> { { mesh, material, part } }   -- same parts, same order at every LOD
Props.colliders(kind, { variant? }) -> { ColliderSpec }   -- box / capsule (a, b, radius) / sphere / mesh / ramp, with offset, yaw, pitch, surface, climbable
Props.normalize(kind, opts) -> opts
Props.register(entry, partsFn, collidersFn?)       -- how a catalog adds kinds
Props.material(surface, look?) -> material         -- jungleMaterials surface in a look
Props.lianaBetween(p0, p1, sag, seed, opts?) -> { { mesh, material, part } }

Trees carry info.trunks[variant] = { { x0, y0, z0, x1, y1, z1, r }, ... } (capsule chain following the baked trunk, which JungleProp builds as colliders) and info.branchAnchors[variant] = { { x, y, z, nx, ny, nz }, ... }: points on the tops of the limbs (normal up) and on the sides of the bole (normal horizontal) where epiphytes, bracket fungi, climbing vines and hanging lianas attach.

Budgets (triangles, real form, worst variant)

LOD0LOD1LOD2
emergent trees10-19k2.3-3.9k0.6-1k
canopy trees8-12k1.8-2.8k0.3-0.7k
understory1-4.5k0.2-1.3k0.07-0.5k
floor plants0.02-1.5k<= 650culled or <= 130
roots, vines, epiphytes, fungi0.04-4.3k<= 800culled or <= 290

Mesh contract

Real-world metres, +Y up, origin at the ground contact (hanging kinds: the attach point; bark kinds: the bark surface). Vertex colour RGB is a tint the material multiplies its albedo by (crown cards darken toward the crown core); vertex alpha is the wind-sway weight on foliage (0 at the base, 1 at the tips) and 1 on solid parts (bark, trunks, stone, moss, caps). Front faces are counter-clockwise and agree with the normals. Every part of a prop shares one bounding box, so all parts swap LOD together.

Textures and UVs: crown cards (leafCanopy, leafCanopyDark, leafEmergent, leafStrangler) are alpha-cut sprays attached at bottom centre (u 0.5, v 0); single leaves, fronds, petals and bracts are real cut outlines carrying UV 0..1 (u across, midrib at 0.5, v base -> tip) so a one-leaf card reads (monstera slits and holes and torn banana strips are holes in the mesh); grass is tuft cards (v 0 on the ground); hanging moss attaches at v 0; bark wraps u two or three times around a trunk with v = metres / 2 up it. No texture is shipped here: every surface comes from jungleMaterials.JungleMaterials.get(surface, { look }).

Regenerating

Meshes are generated once and baked into the package (meshes/flora/<kind>/), read through the generated literal index BakedJungle, so installing costs no generation. The baker writes into the package's own folder, wherever it is installed, in a background task that yields every ~4 ms so the editor never freezes.

  • Edit FloraTrees / FloraPlants / FloraMisc (kit JungleGeo, catalog FloraCatalog), then require("jungleProps.JungleBake").start() (all kinds, a few minutes) or .start({ kinds = { "treeFern" }, forms = { "toon" } }); .status() shows progress and .report() answers the triangle table. Mesh names: <kind>_<form>_v<n>_l<lod>_<part>, forms real, toon, low; collision meshes <kind>_col_v<n>.
  • New .mesh folders are committed with the rest of the package.

Tests: zero tests run jungleProps (edit mode) checks every flora kind x look x variant x LOD, budgets, trunk chains and anchors, colliders, lianaBetween and JungleProp rebuilds.