Woodblock
The ukiyoeBlocks API: `local Woodblock = require("~ukiyoeBlocks.Woodblock")`.
Woodblock (module)
The ukiyoeBlocks API: local Woodblock = require("~ukiyoeBlocks.Woodblock").
Woodblock.apply(lookId, { keep?, roles? }): a whole woodblock look in one change, with its palette and the woodblock role set; water level and weather carry over.Woodblock.looks(),Woodblock.blocks(slot?),Woodblock.describe().- One piece at a time:
useLine(id),usePaper(id),usePalette(id),useSky("dawn" | "day" | "dusk" | "night" | "shore"),shadows("ukiyoe" | "shinHanga" | "shinHangaNight"),pattern("waves" | "clouds" | "mist" | "snow", on),registration(on, x?, y?),margin(on, settings?). - World state:
timeOfDay(t),weather("rain" | "snow" | "clear", intensity?),setWater(y). Weather is real Cloudburst weather in its ink looks (seeWoodblockWeather);weatherOf()reads what is falling. - Roles:
give(entity, "hero" | "enemy" | "friendly" | ...). clear()takes the look off.
Every call is a change to the scene's synced styleKit stack: every player sees it, a late joiner gets it with the scene, and it is saved with the scene.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
entries( ) → void
find(id: string) → any
| arg | type | description |
|---|---|---|
| id | string |
has(blockId: string, setting: string) → boolean
| arg | type | description |
|---|---|---|
| blockId | string | |
| setting | string |
put(id: string, blockId: string, settings: { [string]: any }?) → void
Put `blockId` in entry `id`: swap it if the entry exists, add it otherwise.
| arg | type | description |
|---|---|---|
| id | string | |
| blockId | string | |
| settings | { [string]: any }? |
looks( ) → void
Every woodblock whole look: { id, name, summary }.
blocks(slot: string?) → void
Every woodblock block, optionally in one slot: { id, slot, name, summary }.
| arg | type | description |
|---|---|---|
| slot | string? |
water( ) → number
The water level the stack's woodblock blocks use (metres), or nil when none reads one.
setWater(y: number) → void
Set the height of the sea or lake (world y, metres) on every entry that finds water (bokashi, waves). One change; kept across look switches.
| arg | type | description |
|---|---|---|
| y | number |
lake( ) → void
The second body of water (a lake) the stack bands on its own: { y, x, z, radius }, or nil when none is set.
setLake(y: number?, x: number?, z: number?, radius: number?) → void
Band a second body of water (a lake) at its own height, apart from the sea: its surface height `y`, its centre (`x`, `z`) and its `radius` in metres. One change for every player; kept across look switches. `setLake(nil)` removes it.
| arg | type | description |
|---|---|---|
| y | number? | |
| x | number? | |
| z | number? | |
| radius | number? |
dropOldStrokes( ) → void
Take off the screen-printed rain strokes and snowflakes a stack saved by ukiyoeBlocks 1.0 still holds: falling weather is Cloudburst's now.
weatherOf( ) → string
The weather falling now: "rain", "snow" or "clear", read from the scene's Cloudburst weather.
weather(kind: string, intensity: number?) → void
Make it rain, snow or clear over the current look, for every player: "rain" (Cloudburst rain in its ink / woodblock look with ink splashes), "snow" (Cloudburst snow, plus the printed snow lying on roofs) or "clear". `intensity` 0-1 (default 0.6). Uses the scene's Cloudburst weather, or makes a synced `WoodblockWeather` entity with one when the scene has none.
| arg | type | description |
|---|---|---|
| kind | string | |
| intensity | number? |
timeOfDay(t: string) → void
Repaint the sky (and water) for a time of day: "dawn", "day", "dusk" or "night". At night a shin-hanga fill turns to its night blocks; by day back again. The water level is kept.
| arg | type | description |
|---|---|---|
| t | string |
apply(lookId: string, opts: { keep: { string }?, roles: boolean?, roleLines: boolean? }?) → void
Apply a whole woodblock look in one change for every player: its blocks, palette and the woodblock role set (role glazes and per-object line weight; `opts.roleLines = true` also adds a copy of the line per role variant in its own ink, which costs one full-screen line pass per variant). Water level, weather and fast mode already on carry over. `opts.keep` keeps slots of the current stack ({ "line" }); `opts.roles = false` leaves the role set alone.
| arg | type | description |
|---|---|---|
| lookId | string | |
| opts | { keep: { string }?, roles: boolean?, roleLines: boolean? }? |
warmShaders( ) → void
Compile every woodblock shader in the background, once per session on this machine, so switching a look, the weather or the time of day never waits on a shader compile (a pass whose shader is still compiling draws nothing, which showed as a black screen for a few seconds). The look's helpers call it when a scene with a look loads; it returns at once.
shadersWarm( ) → boolean
Whether warmShaders has finished on this machine.
ensureLightHelper( ) → boolean
Place the synced WoodblockLight helper (once) that lets a Light entry switch the sun's cast shadows on every machine. Woodblock.apply and useLight call it; call it yourself after adding lightUkiyoe with StyleKit.add.
quality(tier: string) → void
The resolution every player's machine draws the woodblock stack at: "medium" (the default: full resolution, so lines stay pure sumi and colours stay on the inks; about 2.3 ms of GPU on desktop for the full Night Rain stack), "high" (full resolution, finest settings), "low" (half resolution, about 0.55 ms, but the upscale softens line edges into in-between colours) or "auto" (each device picks). One synced change. For a budget under 1 ms use fast(true).
| arg | type | description |
|---|---|---|
| tier | string |
useLight(which: string, settings: { [string]: any }?) → void
How light is printed (Light slot): "ukiyoe" (lightUkiyoe: flat light, the sun casts no shadows on any player's machine) or "shinHanga" (lightShinHanga: soft real light and shadow, cool shadow side), or any Light block id.
| arg | type | description |
|---|---|---|
| which | string | |
| settings | { [string]: any }? |
age(amount: number | boolean, settings: { [string]: any }?) → void
Age the print over any look (Medium slot, printAge): amount 0 fresh to 1 very old (faded inks, yellowed sheet, foxing); false takes it off.
| arg | type | description |
|---|---|---|
| amount | number | boolean | |
| settings | { [string]: any }? |
useLine(blockId: string, settings: { [string]: any }?) → void
Swap the key line for another woodblock line (keyLine, hairLine, brushCutLine, colourLine, wornLine) or any Line block from another package.
| arg | type | description |
|---|---|---|
| blockId | string | |
| settings | { [string]: any }? |
usePaper(blockId: string, settings: { [string]: any }?) → void
Swap the paper (washiFresh, washiAged, woodgrainStrong, barenRubbed) or any Ground block, a Cookbook paper included.
| arg | type | description |
|---|---|---|
| blockId | string | |
| settings | { [string]: any }? |
usePalette(id: string) → void
Pick the woodblock palette (classicPrint, deepBlue, fadedOld, nightPrint, snowPrint, warmDusk) or any pigment set.
| arg | type | description |
|---|---|---|
| id | string |
useSky(which: string) → void
Swap the sky gradation: a time of day ("dawn", "day", "dusk", "night"), "shore" (water only) or a bokashi block id.
| arg | type | description |
|---|---|---|
| which | string |
shadows(kind: string) → void
How light and shadow are printed: "ukiyoe" (no shading, no cast shadows), "shinHanga" (real light in a few blocks) or "shinHangaNight".
| arg | type | description |
|---|---|---|
| kind | string |
pattern(name: string, on: boolean, settings: { [string]: any }?) → void
Turn a decorative pattern on or off: "waves", "clouds", "mist" or "snow" (lying snow).
| arg | type | description |
|---|---|---|
| name | string | |
| on | boolean | |
| settings | { [string]: any }? |
registration(on: boolean, x: number?, y: number?) → void
The slight still registration offset: on/off, with an optional offset in reference pixels.
| arg | type | description |
|---|---|---|
| on | boolean | |
| x | number? | |
| y | number? |
margin(on: boolean, settings: { [string]: any }?) → void
The printed margin with its blank title box: on/off, with optional settings ({ margin = 0.05, second = 1 }).
| arg | type | description |
|---|---|---|
| on | boolean | |
| settings | { [string]: any }? |
give(e: any, role: string?) → void
Give an object a role in the woodblock role set ("hero", "enemy", "friendly" for the crowd, "boss", "pickup", "prop", ...), for every player.
| arg | type | description |
|---|---|---|
| e | any | |
| role | string? |
describe( ) → void
What the woodblock look is now: { look, palette, weather, water, entries = { {id, block} } }.
clear( ) → void
Take the whole look off: the frame goes back to exactly how it was rendered.
fastComps( ) → void
Every fast-mode helper in the scene (1.0.14): a scene can hold more than one holder (one saved with the scene, one spawned later), and a helper left on anywhere keeps the fast effect on screen, so every one is read and switched, never only the first found.
fastComp( ) → any
The helper fast mode uses: one that is on, else the first.
isFast( ) → boolean
Whether the one-effect fast setting is drawing the look now (any fast-mode helper in the scene is on).
rgb(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
setting(r: any, name: string) → any
A setting of an entry as it draws now: the entry's own value, else its block's default.
| arg | type | description |
|---|---|---|
| r | any | |
| name | string |
fastSettings( ) → string
put(k: string, v: any) → void
| arg | type | description |
|---|---|---|
| k | string | |
| v | any |
fast(on: boolean?) → void
The one-effect fast setting, for every player: `fast(true)` draws the woodblock look now on the stack with ONE engine screen effect (key line from depth, palette colour with shading compressed toward flat blocks, sky and water bands, washi and woodgrain, registration and margin; falling rain and snow stay Cloudburst weather) and switches the stack's entries off; `fast(false)` switches them back on. It costs a fraction of the full stack; it has no per-object roles and cannot remove cast shadows exactly (it compresses them). Calls that change the look (apply, timeOfDay, weather, ...) are followed by `fast(true)` again while it is on.
| arg | type | description |
|---|---|---|
| on | boolean? |
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.