GlWorld
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->
GlWorld
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->TODO: describe this component.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2gl.world.GlWorld — SLICE 2: the sea, the eight islands, and the world underwater. Owned by the "Islands, sea & underwater" slice. Attach to `Mount_World`. The engine's spectral ocean cannot render on this platform (its surface shader samples the screen colour inside non-uniform control flow, so the WGSL validator refuses the pipeline — see /zero/source/design/spec.md). The sea is therefore one large stylized surface drawn with the engine's own water material, and the SWELL everything rides is `gl.ocean.gl_ocean` in code, so the ships, swimmers and chests all agree on where the water is. What it publishes (read it off the component; attributes are set too): islands() -> { island } from gl_core, with .root entity islandAt(x, z) -> the island containing or nearest to a point seaHeight(x, z) -> the drawn swell's height there attitude(x,z,hd,len,beam) -> pitch, roll in radians townOf(islandId) -> the dock position a ship makes for clock() -> seconds since the slice woke (the wave phase)
prop(parent: any, name: string, pos: { number }, scale: { number }, tint: { number }, opts: any?) → void
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| pos | { number } | |
| scale | { number } | |
| tint | { number } | |
| opts | any? |
palm(parent: any, name: string, x: number, z: number, y: number, lean: number) → void
A palm: a leaning trunk of three segments and a crown of flattened fronds.
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| x | number | |
| z | number | |
| y | number | |
| lean | number |
chest(parent: any, name: string, x: number, y: number, z: number) → void
A treasure chest: the signature object this slice was told to leave a slot for.
| arg | type | description |
|---|---|---|
| parent | any | |
| name | string | |
| x | number | |
| y | number | |
| z | number |
dressFoosha(island: any) → void
Foosha already has its land, beach and hill placed by the scene skeleton, so this slice DRESSES it (rather than stacking a second plateau on the same spot, which would z-fight) and builds the other seven from nothing.
| arg | type | description |
|---|---|---|
| island | any |
buildIsland(island: any) → void
| arg | type | description |
|---|---|---|
| island | any |
buildUnderwater( ) → void
purge( ) → void
awake( ) → void
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
islands( ) → void
The eight islands, each with its `root` entity attached.
islandAt(x: number, z: number) → any
The island a world position stands on, or the nearest one within reach.
| arg | type | description |
|---|---|---|
| x | number | |
| z | number |
seaHeight(x: number, z: number) → number
The drawn sea's height at a world position, right now.
| arg | type | description |
|---|---|---|
| x | number | |
| z | number |
attitude(x: number, z: number, heading: number, length: number, beam: number) → void
Pitch and roll (radians) for a hull at this position and heading.
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| heading | number | |
| length | number | |
| beam | number |
townOf(islandId: string) → any
Where ships make for on an island.
| arg | type | description |
|---|---|---|
| islandId | string |
clock( ) → number
Seconds since the slice woke — the wave phase everything shares.
submersion(x: number, y: number, z: number) → number
How submerged a point is: 0 dry, 1 under the sea.
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| z | number |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
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.