RockGen
Procedural generators for alpineProps' stone: graniteBoulder (1.3-3.8 m, 4 variants), rockOutcrop (4-8 m bedrock knob), screeStone, screePatch (4-6 m of loose angular stones), flatSlab, cairn (~1.2 m stacked stones), cliffFace (modular 10-20 m face facing +Z, 6 m below ground) an…
RockGen
Procedural generators for alpineProps' stone: graniteBoulder (1.3-3.8 m, 4 variants), rockOutcrop (4-8 m bedrock knob), screeStone, screePatch (4-6 m of loose angular stones), flatSlab, cairn (~1.2 m stacked stones), cliffFace (modular 10-20 m face facing +Z, 6 m below ground) and cliffSpire (8-15 m tower). Every stone is an exact faceted granite polytope (joint planes plus chamfers, then noise and joint cracks); big shapes are assemblies of blocks whose gaps read as cracks and ledges. RockGen.build(kind, variant, lod) returns { body, snow } and meta { size, boxes } (collider boxes). Snow is capped per LOD so body + snow stays inside the triangle budget.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2RockGen: the stone generators of alpineProps: lichen granite boulders, a bedrock outcrop, scree stones and patches, flat slabs, a trail cairn, a modular cliff face and a rock spire. Bake-time only (FloraBake runs them). local RG = require("~.RockGen") local parts, meta = RG.build("graniteBoulder", 2, 0) -- { body = Geo, snow = Geo }, { size, boxes } Every stone is an exact convex polytope (GroundKit.polytope): a block cut from a box by granite's three joint sets plus corner chamfers, so faces are flat and edges sharp, then subdivided and warped by position-based noise and split by joint cracks. Big shapes (outcrop, cliff, spire, cairn, scree) are assemblies of such blocks; the gaps and set-backs between blocks read as the joints, ledges and cracks of real rock. The three LODs come from the SAME planes and placements (fewer subdivisions, fewer chamfers, fewer small stones), so a variant is one rock at three costs. Rocks stand on y = 0 about the origin with a skirt below ground. A cliff face faces +Z, spans X, and runs ~6 m below y = 0 so it can be set into a slope. `meta.boxes` are oriented-enough boxes { size = {x,y,z}, offset = {x,y,z} } covering the rock above ground (colliders), `meta.size` its extents.
blockPlanes(rng: any, a: number, b: number, c: number, o: any) → void
Planes for a block of half extents (a, b, c): three joint pairs (granite breaks along near-orthogonal joint sets) that square it off, then chamfers that knock off the corners. `sharp` 0..1 pushes chamfers deeper (fresher, more angular rock). Ordered most important first, so a LOD can keep a prefix.
| arg | type | description |
|---|---|---|
| rng | any | |
| a | number | |
| b | number | |
| c | number | |
| o | any |
prefix(list: { any }, n: number) → void
| arg | type | description |
|---|---|---|
| list | { any } | |
| n | number |
newBlock(rng: any, ext: { number }, o: any) → Block
| arg | type | description |
|---|---|---|
| rng | any | |
| ext | { number } | |
| o | any |
graniteColor(b: Block, groundY: number) → void
granite tint: grey with a faint warm/cool drift, darker low down and in cracks
| arg | type | description |
|---|---|---|
| b | Block | |
| groundY | number |
blockDisp(b: Block, detail: number) → void
position-based warp: low-frequency bend, fine bumps, joint cracks (all block-local)
| arg | type | description |
|---|---|---|
| b | Block | |
| detail | number |
blockGeo(b: Block, level: number, keepPlanes: number?, detail: number, groundY: number, edgeSoft: number?) → any
mesh one block at a LOD: level of subdivision, how many planes it keeps
| arg | type | description |
|---|---|---|
| b | Block | |
| level | number | |
| keepPlanes | number? | |
| detail | number | |
| groundY | number | |
| edgeSoft | number? |
color(x: ?, y: ?, z: ?, nx: ?, ny: ?, nz: ?, d: ?) → void
| arg | type | description |
|---|---|---|
| x | ? | |
| y | ? | |
| z | ? | |
| nx | ? | |
| ny | ? | |
| nz | ? | |
| d | ? |
blockTris(b: Block, level: number, keepPlanes: number?) → number
| arg | type | description |
|---|---|---|
| b | Block | |
| level | number | |
| keepPlanes | number? |
fitLevels(blocks: { Block }, budget: number, maxLevel: number, keepPlanes: number?) → void
the highest subdivision level each block can take so the assembly stays under budget
| arg | type | description |
|---|---|---|
| blocks | { Block } | |
| budget | number | |
| maxLevel | number | |
| keepPlanes | number? |
assemble(blocks: { Block }, lod: number, o: any) → any
| arg | type | description |
|---|---|---|
| blocks | { Block } | |
| lod | number | |
| o | any |
snowFor(body: any, lod: number, size: number, seed: number, o: any?) → any
Snow on the upward faces. When the skin would push the kind over its budget the slope threshold rises until it fits: only the flattest tops and ledges keep snow, which is where it would lie longest anyway.
| arg | type | description |
|---|---|---|
| body | any | |
| lod | number | |
| size | number | |
| seed | number | |
| o | any? |
boxesOf(blocks: { Block }, groundY: number) → void
| arg | type | description |
|---|---|---|
| blocks | { Block } | |
| groundY | number |
extents(g: any) → void
| arg | type | description |
|---|---|---|
| g | any |
screeBlock(rng: any, s: number, xf: any, warm: number, chamfers: number?) → Block
a fresh, angular scree stone (block-local, centred), size s (m)
| arg | type | description |
|---|---|---|
| rng | any | |
| s | number | |
| xf | any | |
| warm | number | |
| chamfers | number? |
tint( ) → void
tint( ) → void
build(kind: string, variant: number, lod: number) → void
Build one rock kind: variant 1..n, lod 0..2. Returns parts { body, snow? } and meta { size, boxes }.
| arg | type | description |
|---|---|---|
| kind | string | |
| variant | number | |
| lod | number |
kinds( ) → void
Block = {Spec = { category: string, variants: number, build: (rng: any, lod: number, v: number) -> (Parts, any) }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.