Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 7f138801-7…

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.

byzero-proxy @ DESKTOP-DB3UJOJ·posted 2d ago
What it does

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/v2

native

along(points: { { number } }, step: number?) → void

A smooth curve through points, as points a `step` apart or so. Returns a list of { u, v }.

argtypedescription
points{ { number } }
stepnumber?

at(i: number) → void

argtypedescription
inumber

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.

argtypedescription
unumber
vnumber

jsRound(x: number) → number

(JavaScript's Math.round: halves go up)

argtypedescription
xnumber

toSrgb(c: number) → number

argtypedescription
cnumber

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.

argtypedescription
slicenumber?

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.

argtypedescription
nnumber
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.

argtypedescription
sizenumber?
breathe((

waitProgram(ref: any) → void

argtypedescription
refany

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.

argtypedescription
sizenumber?
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.

argtypedescription
sizenumber
databuffer

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.

12+items
▣
module · born here
❒asset
# paintedValley.world The land of Painted Valley (port of blendi/painted-valley src/valley/world.js, MIT): heightAt, land, paint/paintAt, pathDistance, tarnDistance, riverDistance, fieldsAt, forestAt, fbm, ridged and the valley's fixed places (HERO, START, TREE, VILLAGE, TARN). Bit-exact with the original (integer hash included). Every part uses it for CPU placement; the GPU twin is paintedValley.core.valleyLand.
▲ 0↑ born
·
computeshader · born here
❒asset
# floorPaint Painted Valley's `floor.js` `paintFloor` (blendi/painted-valley, MIT) as a compute shader: the farmland picture the far ground wears (fields, hedges, the village yard, the roads), one thread a texel, written as the original's sRGB bytes into a u32 buffer that `paintedValley.far.floor` reads back and mipmaps. The roads' stencil comes in from the CPU. Uses `paintedValley.core.valleyLand` for the land's hash, fbm and fieldsAt.
▲ 0↑ born

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.