garden
The garden Splatgrove paints: the layout of every SDF shape (island, trees, flowers, mushrooms, rocks, the morph totem, the sky jellies and a pool of plantable flowers) and the live state each frame packs for the GPU (`packUniforms`, `packShapes`). `tick(dt)` advances the animati…
garden
The garden Splatgrove paints: the layout of every SDF shape (island, trees,
flowers, mushrooms, rocks, the morph totem, the sky jellies and a pool of
plantable flowers) and the live state each frame packs for the GPU
(packUniforms, packShapes). tick(dt) advances the animation that depends
on players: buds open as someone walks up, planted flowers grow in, the totem
morphs toward its target, the jellies drift. The pixel palettes it is shown
through come from the sdfSplats package's palettes module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2module garden Splatgrove's garden: every signed-distance shape the splat painter surfaces (where it stands, how many splats it gets, its paint), the pixel palettes, and the live state each frame packs for the GPU — time, the players walking through it, the flowers they planted and the totem's morph. `SplatGarden.component` drives the state; the `sdfSplats` render feature reads it every frame.
lin(c: number) → number
| arg | type | description |
|---|---|---|
| c | number |
hex(h: string) →
sRGB hex colour to linear `{ r, g, b }`.
| arg | type | description |
|---|---|---|
| h | string | `"#rrggbb"`. |
examples
garden.hex("#ff8800")flower(x: number, z: number, kind: string, height: number, bloom: number, phase: number) → void
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| kind | string | |
| height | number | |
| bloom | number | |
| phase | number |
tree(x: number, z: number, h: number, rc: number, look: string, phase: number) → void
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| h | number | |
| rc | number | |
| look | string | |
| phase | number |
mushroom(x: number, z: number, h: number, r: number, glowing: boolean, phase: number) → void
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| h | number | |
| r | number | |
| glowing | boolean | |
| phase | number |
rock(x: number, z: number, sx: number, sy: number, sz: number, yaw: number) → void
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| sx | number | |
| sy | number | |
| sz | number | |
| yaw | number |
jelly(orbitR: number, height: number, speed: number, phase: number, size: number, look: number) → void
| arg | type | description |
|---|---|---|
| orbitR | number | |
| height | number | |
| speed | number | |
| phase | number | |
| size | number | |
| look | number |
buildLayout( ) → void
norm3(v: { number }) → void
| arg | type | description |
|---|---|---|
| v | { number } |
approach(cur: number, target: number, rate: number, dt: number) → number
| arg | type | description |
|---|---|---|
| cur | number | |
| target | number | |
| rate | number | |
| dt | number |
tick(dt: number) → void
Advance the garden's animation by `dt` seconds: flowers open toward nearby players, planted flowers grow in, the totem morphs toward its target and the jellies drift. Called once per frame by the component.
| arg | type | description |
|---|---|---|
| dt | number | Seconds since the last tick. |
examples
garden.tick(1 / 60)
packUniforms(time: number) →
Pack the per-frame uniforms (`GardenUniforms` in sdf_splat_gen).
| arg | type | description |
|---|---|---|
| time | number | Seconds the shapes animate at. |
examples
buf:write(garden.packUniforms(t))
put(i: number, a: number, b: number, c: number, d: number) → void
| arg | type | description |
|---|---|---|
| i | number | |
| a | number | |
| b | number | |
| c | number | |
| d | number |
packShapes( ) →
Pack every shape (`Shape` in sdf_splat_gen), in splat order.
examples
buf:write(garden.packShapes())
put(a: number, b: number, c: number, d: number) → void
| arg | type | description |
|---|---|---|
| a | number | |
| b | number | |
| c | number | |
| d | number |
plantKinds( ) →
The planted-flower kinds, cycled by each planting.
examples
garden.plantKinds()
totemDistance(x: number, z: number) → number
Distance (xz) from a point to the totem.
| arg | type | description |
|---|---|---|
| x | number | World x. |
| z | number | World z. |
examples
garden.totemDistance(0, 4)
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.