Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld 7f138801-7…

Valley

Painted Valley's main.js on Zero: the scene driver on the `valley` entity. Bakes the land's maps, brings up the frame, builds the parts in the original's order, hands them the camera, walker, wind and clock every frame, and keeps the hour (T, 1-4, comma, period, 0) and the paint…

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

Valley

Painted Valley's main.js on Zero: the scene driver on the valley entity. Bakes the land's maps, brings up the frame, builds the parts in the original's order, hands them the camera, walker, wind and clock every frame, and keeps the hour (T, 1-4, comma, period, 0) and the paint finish (P).

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

Valley — Painted Valley's main.js on Zero (blendi/painted-valley on Patch, MIT): the scene's driver. One sits on the scene's `valley` entity, a plain local entity: every peer builds its own copy of the valley, which is the same everywhere because it is made from code. It * bakes the field's maps (core) and brings up the frame (paint finish, ink, bloom, the painter's curve), * builds the parts in main.js's order: the sky (and the hour's light), the meadow, the far land, the village with its trees and tarn, the wanderer, * every frame hands the parts the camera, the walker, the wind and the clock (field.update, sky.update, ...), * keeps the hour: the afternoon you start in is sunset twenty minutes later; T and 1 to 4 pick a time of day and hold it there, 0 lets it pass again, `,` and `.` nudge it; P takes the paint finish off and on. The time of day and the paint are each peer's own, as they are each viewer's own in the original.

loadParts( ) → void

The parts, in main.js's order. Each is `paintedValley.<part>.<part>`, returning { name, build, update?, setHour?, destroy? } (PORTING.md). A part is listed here once its module exists in the world.

add(ok: boolean, mod: any, name: string) → void

argtypedescription
okboolean
modany
namestring

sunset( ) → number

noteTree(text: string, opacity: number) → any

argtypedescription
textstring
opacitynumber

drawNote( ) → void

note(text: string) → void

argtypedescription
textstring

readCamera( ) → void

The camera this peer draws with: its position and the way it looks, from the renderer's main view.

unproject(x: number, y: number, z: number) → void

argtypedescription
xnumber
ynumber
znumber

setHour(hour: number, quick: boolean?) → void

argtypedescription
hournumber
quickboolean?

pickTime(index: number) → void

Goes to one of the times of day and holds it there.

argtypedescription
indexnumber

setWind(speed: number) → void

argtypedescription
speednumber

collectTags( ) → void

tagsChanged( ) → boolean

dropValleyDraws( ) → number

Every instanced draw the valley makes reads a transform buffer named pv_*. A part that loses its handles (its module reloaded, its build interrupted) would otherwise leave its old draws drawing beside the new ones: drop them all before a build and after a destroy, so a rebuild never stacks a second valley on the first.

build( ) → void

tick(dt: number, playing: boolean) → void

argtypedescription
dtnumber
playingboolean

awake( ) → void

setHour(h: number) → void

argtypedescription
hnumber

start( ) → void

update(dt: number) → void

argtypedescription
dtnumber

editorUpdate(dt: number) → void

argtypedescription
dtnumber

onDestroy( ) → void

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.

41+items
▣
module · born here
❒asset
# sky The Painted Valley sky part's entry module (valley/sky.js and the sky's part of main.js): the hour table (KEYS, blend, sunAt, SUNSET), build / update / setHour / destroy, the field light pushed into the core, the dome material on a Skybox, the engine sun and ambient, and bindTo for materials that mirror the sky. See ../README.md.
▲ 0↑ born
▣
module · born here
❒asset
# village The village/trees/water part's entry module (paintedValley.village.village): build / update / setHour / destroy for the core's scene driver. Exposes trees, cast, tagEntities, buildingMaterial.
▲ 0↑ born
▣
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
▣
module · born here
❒asset
# wanderer The wanderer part's entry for the valley's scene driver (build, update, destroy), the shared state other parts read (player, tagEntities, tagsVersion) and setupPrototype, which makes a PlayerPrototype the wanderer's. Ported from blendi/painted-valley on Patch (MIT).
▲ 0↑ born
▣
module · born here
❒asset
# 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.
▲ 0↑ born
▣
module · born here
❒asset
# frame (module) The scene side of the Painted Valley frame: starts the frame render feature and the finish post effect, sets the display transform to a linear pass-through, and exposes setPaint, setExposure and setTags.
▲ 0↑ born
▣
module · born here
❒asset
# paintedValley.core.core What every part of Painted Valley shares: the field's maps baked on the GPU (tHeight with the slope, tMap), the noise (exact port of lib/noise.js), the shared light and fog uniforms with the original's names, and a registry that pushes them and binds the shared textures into every valley material (core.material / core.register / core.set / core.setTexture / core.groundAt / core.bake). Called by the Valley driver and every part.
▲ 0↑ born
▣
module · born here
❒asset
# paintedValley.meadow.meadow Entry of the meadow part of Painted Valley (port of lib/blades.js, flowers.js, ground.js, state.js, valley/strokes.js and dressing.js; blendi/painted-valley, MIT): build/update/destroy for the Valley driver; draws the grass blades, flowers, painted ground, stones and seed fluff around the camera, remembers trodden grass (bend, setPusher, reset), provides the brushwork texture tStrokes and the stones' collision list solid.
▲ 0↑ born
backing path · paintedValley/core/Valley.component

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.