VegPalms
Deterministic generators for the tropicalProps palms: `palmCoconutStraight`, `palmCoconutLeaning`, `palmWindBent`, `palmFan`, `palmYoung`, `palmCluster` and `pandanus`. `VegPalms.generate(kind, variant, form)` returns `{ lods = { [0] = parts, [1] = parts, [2] = parts } }` of `Veg…
VegPalms
Deterministic generators for the tropicalProps palms: palmCoconutStraight, palmCoconutLeaning, palmWindBent, palmFan, palmYoung, palmCluster and pandanus. VegPalms.generate(kind, variant, form) returns { lods = { [0] = parts, [1] = parts, [2] = parts } } of VegGeo geometries named trunk, fronds, dry, nuts, grass. VegBake calls it; nothing loads it at runtime.
A palm is a trunk path (lean and curve per kind, all leaning toward +Z), a tapering tube with leaf-scar rings, a flared, lobed root ball and a fibrous crown boot, and a crown of fronds in a 137.5-degree spiral: young fronds stand up, old ones arch out and hang. Coconut fronds are a rachis tube with two rows of separate drooping leaflets (a V keel), longest 40 % of the way out; fan palms carry pleated, split-tipped fans on long petioles; the pandanus has stilt roots, forking arms and spiral tufts of keeled strap leaves.
Forms: real (shared by the real, painted and pixel looks), toon (fewer, broader lobed blades, stacked-segment trunk) and low (faceted). LOD1 keeps every third leaflet at 2.4x width; LOD2 is a trunk of 5 sides and one keeled ribbon per frond whose UVs repeat a leaflet along it. Leaflet UVs: u across (midrib 0.5), v 0 base -> 1 tip; bark: u wraps the trunk twice, v = metres.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2VegPalms: deterministic generators for the tropicalProps palms (tool code: VegBake calls it). local P = require("~.VegPalms") local out = P.generate("palmCoconutLeaning", 2, "real") -- out.lods[0].trunk / .fronds / .dry / .nuts (VegGeo geometries), out.lods[1], out.lods[2] A palm is a trunk path (lean and curve per kind), a ringed tapering tube with a flared root ball and a fibrous crown boot, and a crown of fronds set in a 137.5-degree spiral: young fronds stand up, old ones arch out and droop. Coconut fronds are pinnate: a rachis tube carrying two rows of separate, drooping leaflets (a V-shaped keel) that are longest a third of the way out. Fan palms carry pleated, split-tipped fans on long petioles. Three forms: real - full geometry (shared by the real, painted and pixel looks) toon - fewer, broader, lobed blades and a stacked-segment trunk (toon_style) low - faceted low-poly (flat shaded, a few hundred triangles) Leaflet / fan segment / leaf UVs: u 0..1 across (midrib 0.5), v 0 base -> 1 tip. Bark UVs: u wraps the trunk `uTiles` times, v = metres up the trunk. Foliage vertex alpha = wind weight (0 at the crown, 1 at the frond tips).
clamp01(x: number) → number return math
| arg | type | description |
|---|---|---|
| x | number |
smooth(x: number) → number
| arg | type | description |
|---|---|---|
| x | number |
cfgFor(kind: string, variant: number, rng: any) → any
lean(t): angle from vertical (radians) of the trunk at fraction t of its length
| arg | type | description |
|---|---|---|
| kind | string | |
| variant | number | |
| rng | any |
lean(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
lean(t: number) → void
leans hard from the root ball, then curves back up toward the light
| arg | type | description |
|---|---|---|
| t | number |
lean(t: number) → void
upright at the root, bowing over more and more toward the crown
| arg | type | description |
|---|---|---|
| t | number |
lean(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
lean(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
trunkPath(c: any, seed: number, offset: { number }?, azLean: number?) → void
| arg | type | description |
|---|---|---|
| c | any | |
| seed | number | |
| offset | { number }? | |
| azLean | number? |
resample(path: { { number } }, step: number) → void
| arg | type | description |
|---|---|---|
| path | { { number } } | |
| step | number |
trunkMesh(g: any, c: any, path: { { number } }, spec: TrunkSpec, seed: number) → void
| arg | type | description |
|---|---|---|
| g | any | |
| c | any | |
| path | { { number } } | |
| spec | TrunkSpec | |
| seed | number |
radius(i: ?) → void
| arg | type | description |
|---|---|---|
| i | ? |
tint(i: ?) → void
| arg | type | description |
|---|---|---|
| i | ? |
radius(i: ?, t: ?, s: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| t | ? | |
| s | ? |
shape(th: ?, i: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| th | ? | |
| i | ? | |
| t | ? |
tint(i: ?, t: ?, s: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| t | ? | |
| s | ? |
bootMesh(g: any, c: any, top: { number }, axis: { number }, sides: number, rows: number) → void
crown boot: the fibrous swelling of old leaf bases the fronds spring from
| arg | type | description |
|---|---|---|
| g | any | |
| c | any | |
| top | { number } | |
| axis | { number } | |
| sides | number | |
| rows | number |
radius(i: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| t | ? |
tint(i: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| t | ? |
frondFrame(f: Frond, side0: { number }) → void
| arg | type | description |
|---|---|---|
| f | Frond | |
| side0 | { number } |
frameAt(f: Frond, t: number) → void
| arg | type | description |
|---|---|---|
| f | Frond | |
| t | number |
leafletProfile(t: number) → number
leaflet length profile along the rachis (0 base .. 1 tip): longest ~40% out
| arg | type | description |
|---|---|---|
| t | number |
leaflets(g: any, c: any, f: Frond, spec: LeafletSpec, rng: any, crownC: { number }) → void
pinnate leaflets on both sides of a frond (the real form)
| arg | type | description |
|---|---|---|
| g | any | |
| c | any | |
| f | Frond | |
| spec | LeafletSpec | |
| rng | any | |
| crownC | { number } |
rachis(g: any, f: Frond, r0: number, sides: number, stride: number) → void
a rachis tube (thin, tapering, yellow-green)
| arg | type | description |
|---|---|---|
| g | any | |
| f | Frond | |
| r0 | number | |
| sides | number | |
| stride | number |
radius(i: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| t | ? |
tint( ) → void
alpha(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
widthAt(t: number) → number
| arg | type | description |
|---|---|---|
| t | number |
alphaAt(t: number) → number
| arg | type | description |
|---|---|---|
| t | number |
point(ang: number, rho: number, ridge: boolean) → void
| arg | type | description |
|---|---|---|
| ang | number | |
| rho | number | |
| ridge | boolean |
coconut(g: any, c: { number }, r: number, axis: { number }, segs: number, rings: number, tint: { number }) → void
| arg | type | description |
|---|---|---|
| g | any | |
| c | { number } | |
| r | number | |
| axis | { number } | |
| segs | number | |
| rings | number | |
| tint | { number } |
frondTint(rng: any, rank: number, dry: boolean) → void
| arg | type | description |
|---|---|---|
| rng | any | |
| rank | number | |
| dry | boolean |
coconutCrown(parts: any, c: any, top: { number }, axis: { number }, spec: CrownSpec, rng: any, seed: number) → void
the crown of one palm (coconut kinds) at `top` with crown axis `axis`; writes into parts
| arg | type | description |
|---|---|---|
| parts | any | |
| c | any | |
| top | { number } | |
| axis | { number } | |
| spec | CrownSpec | |
| rng | any | |
| seed | number |
fanCrown(parts: any, c: any, top: { number }, axis: { number }, spec: CrownSpec, rng: any, seed: number) → void
| arg | type | description |
|---|---|---|
| parts | any | |
| c | any | |
| top | { number } | |
| axis | { number } | |
| spec | CrownSpec | |
| rng | any | |
| seed | number |
one(i: number, rank: number, dry: boolean) → void
| arg | type | description |
|---|---|---|
| i | number | |
| rank | number | |
| dry | boolean |
emptyParts(names: { string }) → any
| arg | type | description |
|---|---|---|
| names | { string } |
onePalm(parts: any, c: any, spec: CrownSpec, seed: number, offset: { number }?, az: number?) → void
one palm (trunk + crown) into parts; returns crown top
| arg | type | description |
|---|---|---|
| parts | any | |
| c | any | |
| spec | CrownSpec | |
| seed | number | |
| offset | { number }? | |
| az | number? |
grassTufts(g: any, centre: { number }, radius: number, count: number, h: number, rng: any, cardsPer: number) → void
beach-grass tuft cards around a point (palmCluster undergrowth, sprouts)
| arg | type | description |
|---|---|---|
| g | any | |
| centre | { number } | |
| radius | number | |
| count | number | |
| h | number | |
| rng | any | |
| cardsPer | number |
pandanus(parts: any, spec: CrownSpec, seed: number) → void
the pandanus (screwpine): stilt roots, a forking trunk, tufts of long strap leaves
| arg | type | description |
|---|---|---|
| parts | any | |
| spec | CrownSpec | |
| seed | number |
stem(p0: { number }, d0: { number }, L: number, r0: number, r1: number, steps: number) → void
main trunk, slightly leaning
| arg | type | description |
|---|---|---|
| p0 | { number } | |
| d0 | { number } | |
| L | number | |
| r0 | number | |
| r1 | number | |
| steps | number |
radius(i: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| t | ? |
tint(i: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| t | ? |
radius(i: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| i | ? | |
| t | ? |
tint( ) → void
clusterTrunks(variant: number, seed: number) → void
the trunks of a palmCluster: { c = config, seed, off, az } per trunk (shared by generate and trunkSegments so the colliders follow the baked trunks exactly)
| arg | type | description |
|---|---|---|
| variant | number | |
| seed | number |
lean(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
trunkSegments(kind: string, variant: number, n: number?) → void
The trunk of a palm kind's variant as a chain of capsule segments { x0, y0, z0, x1, y1, z1, r } in the prop's local metres (+Y up, origin at the ground), `n` segments per trunk (default 3); several trunks for palmCluster. Cheap: no mesh is generated. Pandanus answers its main stem as one segment.
| arg | type | description |
|---|---|---|
| kind | string | |
| variant | number | |
| n | number? |
q(x: number) → number return floor
| arg | type | description |
|---|---|---|
| x | number |
generate(kind: string, variant: number, form: string) → any
Generate one palm kind at a variant in a form ("real" | "toon" | "low"): { lods = { [0] = parts, [1] = parts, [2] = parts } } where parts are VegGeo geometries named trunk, fronds, dry, nuts, grass.
| arg | type | description |
|---|---|---|
| kind | string | |
| variant | number | |
| form | string |
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.