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

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 ever…

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

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.

Interface

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

conforms to

zero/source-extract/v2

paintedValley.core — what every part of the valley shares: the land, the field's maps, its light. The port of Painted Valley's createField (lib/index.js) shared uniforms, lib/noise.js and the bake in lib/bake.js and main.js (blendi/painted-valley on Patch, MIT). Every valley material is made with core.material (or registered with core.register): core pushes the shared values and binds the shared textures into it now and on every change, the way every ShaderMaterial in the original binds the same uniform objects. local core = require("paintedValley.core.core") local mat = core.material("paintedValley.meadow.blades", { key = "pv_meadow_blades", render = { cull = "none" } }) core.set("uWalker", { x, z, 0.72, len }) core.setTexture("tFloor", handle) core.onReady(function() ... core.groundAt(x, z) ... end)

vec(t: any) → any

argtypedescription
tany

normalize3(a: { number }) → void

argtypedescription
a{ number }

texRef(t: any) → any

argtypedescription
tany

push(key: any, name: string, value: any) → void

argtypedescription
keyany
namestring
valueany

declaredSlots(handle: any) → void

Which texture slots a material's shader declares, read off the material itself (no asset lookup, so a component requiring core stays publishable). nil while the shader has not loaded its vocabulary yet.

argtypedescription
handleany

bindTexture(key: any, name: string, tex: any) → void

argtypedescription
keyany
namestring
texany

set(name: string, value: any) → void

Set one shared uniform everywhere. Vectors as arrays {a, b, c} (or {x=,y=,z=} / {r=,g=,b=}).

argtypedescription
namestring
valueany

setMany(values: { [string]: any }) → void

argtypedescription
values{ [string]: any }

setTexture(name: string, tex: any) → void

Provide or replace a shared texture (a TextureHandle, a storage-texture handle, or a key/guid).

argtypedescription
namestring
texany

bindAll(key: any) → void

argtypedescription
keyany

register(handle: any) → void

Register a material (handle or registry key) so it receives the shared values and textures. Textures are bound into the slots its shader declares, once the shader has loaded (a few frames for a new one).

argtypedescription
handleany

unregister(handle: any) → void

argtypedescription
handleany

material(shader: string, opts: any?) → void

renderer.material.create + register. opts = { key?, render?, properties?, textures? }.

argtypedescription
shaderstring
optsany?

mulberry(seed: number) → void

mulberry32, as lib/noise.js.

argtypedescription
seednumber

round32(v: number) → number

argtypedescription
vnumber

fade(t: number) → number

argtypedescription
tnumber

smoothFields(size: number, seed: number, yieldEvery: number?) → void

Four smooth tiling fields (fbm, 5 octaves) of `size`², each normalised to 0..1: lib/noise.js smoothNoiseTexture's values before they are quantised. Returns an array of four arrays (row-major, x + y * size).

argtypedescription
sizenumber
seednumber
yieldEverynumber?

encodeTexture(rgba: buffer, w: number, h: number, opts: any) → any

argtypedescription
rgbabuffer
wnumber
hnumber
optsany

makeNoise(seed: number) → void

tNoise (8 bits, mipmapped), tNoiseHi (16 bits, no mipmaps), both from smoothNoiseTexture(256, seed * 13 + 1); and tWhite (whiteNoiseTexture(256, seed * 7 + 2), nearest) — createField({ seed: 3 }).

argtypedescription
seednumber

pixel(r: number, g: number, b: number, a: number, name: string) → any

argtypedescription
rnumber
gnumber
bnumber
anumber
namestring

groundAt(x: number, z: number) → number

The ground's height at (x, z), exactly where the grass stands on it: bilinear between the baked texel centres, as field.heightAt in the original and groundAt in the shaders. Falls back to the land itself before the bake.

argtypedescription
xnumber
znumber

onReady(fn: () → void

argtypedescription
fn(

isReady( ) → boolean

waitReady(ref: any) → void

argtypedescription
refany

bake( ) → void

Bakes the field's maps on this peer (once a session) and makes the shared noise. Yields; run in a task. A second caller while it runs waits for the first; a failure is raised to every caller and can be retried.

bakeBody( ) → 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.

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
# bakeGround Bakes the field's height map (r32f + a CPU readback buffer) and paint map (dry, growth, wet, flowers) from paintedValley.core.valleyLand, as Painted Valley's lib/bake.js bakeRows does.
▲ 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.