far
Entry of the far land part (port of horizon.js, floor.js, farwoods.js): build/update/destroy for the Valley driver; provides tFloor and uFloor to every material, draws the plain out to 6 km, the far woods' cards and the mill.
paintedValley.far.far
Entry of the far land part (port of horizon.js, floor.js, farwoods.js): build/update/destroy for the Valley driver; provides tFloor and uFloor to every material, draws the plain out to 6 km, the far woods' cards and the mill.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2paintedValley.far.far: the far land, the valley's plain past the walk out to six kilometres: Painted Valley's horizon.js, floor.js and farwoods.js (blendi/painted-valley on Patch, MIT), as one part of the valley. local far = require("paintedValley.far.far") far.build(v) -- the floor picture (tFloor + uFloor/uFloorInv for everyone), the plain, the far woods, the mill far.update(v, dt) -- the mill's sails, turning with the wind (farWoods.update(dt, windSpeed)) far.destroy(v) What main.js does with these parts, this does: field.uniforms.tFloor = createFloor(paintFloor(1536)); uFloor = (HERO.x, HERO.z, FLOOR.u0, FLOOR.v0); uFloorInv = 1 / FLOOR.size; scene.add(createHorizon(field, EXTENT / 2), farWoods.group); farWoods.update(dt, wind.speed) every frame. Everything is drawn at runtime on each peer (it is deterministic): instanced draws, no entities.
texRef(t: any) → any
| arg | type | description |
|---|---|---|
| t | any |
bindOwn(key: string, slot: string, tex: any) → void
Binds one of this part's own textures (not a shared one) into a material's slot, once its shader has loaded its slots (a few frames for a new one), as core does for the shared ones.
| arg | type | description |
|---|---|---|
| key | string | |
| slot | string | |
| tex | any |
try( ) → boolean
makeMaterial(v: any, shader: string, key: string, render: any, properties: any?) → void
| arg | type | description |
|---|---|---|
| v | any | |
| shader | string | |
| key | string | |
| render | any | |
| properties | any? |
writeMatrices(name: string, list: { { number } }) → void
| arg | type | description |
|---|---|---|
| name | string | |
| list | { { number } } |
clear(v: any) → void
Takes down everything an earlier build made.
| arg | type | description |
|---|---|---|
| v | any |
keep(kind: string, value: any) → void
| arg | type | description |
|---|---|---|
| kind | string | |
| value | any |
paintFloor(v: any) → void
Paints the floor (on the GPU; the Luau sums are floor.paintFloor, the same bytes as the original's) and hands it to every valley material as main.js does. Falls back to painting it here if the GPU path fails.
| arg | type | description |
|---|---|---|
| v | any |
buildHorizon(v: any, inner: number?) → void
| arg | type | description |
|---|---|---|
| v | any | |
| inner | number? |
buildWoods(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
build(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
update(v: any, dt: number) → void
farWoods.update(dt, wind): the sails turn, faster in a stronger wind.
| arg | type | description |
|---|---|---|
| v | any | |
| dt | number |
destroy(v: any) → void
| arg | type | description |
|---|---|---|
| v | 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.