floor
Port of floor.js: the farmland, hedges, roads and river painted into one picture (paintFloor, on the GPU with a byte-exact Luau fallback) and its placement FLOOR. Called by paintedValley.far.far.
paintedValley.far.floor
Port of floor.js: the farmland, hedges, roads and river painted into one picture (paintFloor, on the GPU with a byte-exact Luau fallback) and its placement FLOOR. Called by paintedValley.far.far.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2native
along(points: { { number } }, step: number?) → void
A smooth curve through points, as points a `step` apart or so. Returns a list of { u, v }.
| arg | type | description |
|---|---|---|
| points | { { number } } | |
| step | number? |
at(i: number) → void
| arg | type | description |
|---|---|---|
| i | number |
fieldAt(u: number, v: number) → void
The field at (u, v): its kind (0 to 7), how far it is to the field's edge (metres), whether that edge is hedged, a number that names the field, and the way it is worked. Returns one table, reused.
| arg | type | description |
|---|---|---|
| u | number | |
| v | number |
jsRound(x: number) → number
(JavaScript's Math.round: halves go up)
| arg | type | description |
|---|---|---|
| x | number |
toSrgb(c: number) → number
| arg | type | description |
|---|---|---|
| c | number |
breather(slice: number?) → void
Gives the frame a turn now and then while a long sum runs in a task: every `slice` seconds of work, if the caller can yield. Returns a function to call often.
| arg | type | description |
|---|---|---|
| slice | number? |
roadStencil(n: number, breathe: (() → void
The roads, as a stencil over the picture's n x n texels: 0 to 1 a texel, f32 (a Float32Array in the original), row-major. Returns a Luau buffer of n * n floats.
| arg | type | description |
|---|---|---|
| n | number | |
| breathe | (( |
paintFloor(size: number?, breathe: (() → void
Paints the picture: sRGB bytes, four a texel, row j at v = v0 + (j + 0.5) * px (the original's DataTexture, whose first row is its v = 0 edge). Plain sums in double precision, on this thread (about 3 microseconds a texel: some seconds for 1536 squared; paintFloorGpu is the quick way). Returns a Luau buffer.
| arg | type | description |
|---|---|---|
| size | number? | |
| breathe | (( |
waitProgram(ref: any) → void
| arg | type | description |
|---|---|---|
| ref | any |
paintFloorGpu(size: number?, breathe: (() → void
The same picture painted on the GPU (floorPaint.computeShader, one thread a texel; the roads' stencil is laid here first, as the original lays it). Yields until the bytes are back. Returns a Luau buffer laid out as paintFloor's.
| arg | type | description |
|---|---|---|
| size | number? | |
| breathe | (( |
createFloor(size: number, data: buffer) → void
The picture as a texture: sRGB, mipmapped, sampled anisotropically (it is always seen at a low angle: without that it would be a smear), clamped at its edges. @param data what paintFloor(size) made.
| arg | type | description |
|---|---|---|
| size | number | |
| data | buffer |
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.