ui
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
ui
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game/battle/ui — the battle interface, Persona-flair in a storybook palette: ink black, deep crimson, parchment cream and lantern gold. Three screens: battle_hud (layer 600) party cards, turn order, banner, menus, target plate, analyze battle_pop (layer 650) floating damage numbers / WEAK! / CRITICAL! tags battle_splash (layer 800) ONE MORE!, ALL-OUT ATTACK, FINISH, intro, victory, defeat Every builder is a pure function of the view model handed in by battle.module.
prime( ) → void
Make the cut-in textures GPU-resident before the first frame shows them.
lbl(text: string, style: any, id: string?) → any
| arg | type | description |
|---|---|---|
| text | string | |
| style | any | |
| id | string? |
box(kind: string, style: any, children: { any }?, id: string?, onClick: string?) → any
| arg | type | description |
|---|---|---|
| kind | string | |
| style | any | |
| children | { any }? | |
| id | string? | |
| onClick | string? |
abs(style: any) → any
| arg | type | description |
|---|---|---|
| style | any |
entrance(from: string, to: string, delay: number, dur: number) → any
| arg | type | description |
|---|---|---|
| from | string | |
| to | string | |
| delay | number | |
| dur | number |
bar(frac: number, w: number, h: number, fill: string, ghost: number?) → any
| arg | type | description |
|---|---|---|
| frac | number | |
| w | number | |
| h | number | |
| fill | string | |
| ghost | number? |
portrait(key: string, w: number, h: number, iw: number) → any
| arg | type | description |
|---|---|---|
| key | string | |
| w | number | |
| h | number | |
| iw | number |
elemChip(el: string, size: number) → any
| arg | type | description |
|---|---|---|
| el | string | |
| size | number |
partyCard(p: any, i: number) → any
| arg | type | description |
|---|---|---|
| p | any | |
| i | number |
turnOrder(vm: any) → any
| arg | type | description |
|---|---|---|
| vm | any |
bossBar(b: any) → any
The boss plate: a wide silver-and-ink bar across the top, ghost trail behind the HP.
| arg | type | description |
|---|---|---|
| b | any |
banner(b: any, nonce: number, top: number?) → any
| arg | type | description |
|---|---|---|
| b | any | |
| nonce | number | |
| top | number? |
menuRow(it: any, i: number, sel: boolean, menuNonce: number) → any
| arg | type | description |
|---|---|---|
| it | any | |
| i | number | |
| sel | boolean | |
| menuNonce | number |
menu(vm: any) → any
| arg | type | description |
|---|---|---|
| vm | any |
targetPlate(t: any) → any
| arg | type | description |
|---|---|---|
| t | any |
analyzePanel(a: any) → any
| arg | type | description |
|---|---|---|
| a | any |
hints(vm: any) → any
| arg | type | description |
|---|---|---|
| vm | any |
hud(vm: any) → any
Build the HUD tree from the view model.
| arg | type | description |
|---|---|---|
| vm | any |
pops(pops: { any }) → any
Build the popup layer. pops = { {x, y, text, kind, age} } in canvas points.
| arg | type | description |
|---|---|---|
| pops | { any } |
halftone( ) → any
eyesStrip(key: string, top: number, h: number, delay: number) → any
| arg | type | description |
|---|---|---|
| key | string | |
| top | number | |
| h | number | |
| delay | number |
splashOneMore(key: string, nonce: number) → any
| arg | type | description |
|---|---|---|
| key | string | |
| nonce | number |
splashAllOutPrompt(nonce: number) → any
| arg | type | description |
|---|---|---|
| nonce | number |
splashAllOut(keys: { string }, nonce: number) → any
| arg | type | description |
|---|---|---|
| keys | { string } | |
| nonce | number |
splashFinish(key: string, nonce: number) → any
| arg | type | description |
|---|---|---|
| key | string | |
| nonce | number |
splashIntro(names: { string }, nonce: number, arena: string?) → any
| arg | type | description |
|---|---|---|
| names | { string } | |
| nonce | number | |
| arena | string? |
shatter(on: boolean, seed: number?) → any
The battle intro: the world SHATTERS into ink-and-crimson shards that swirl in and cover the screen (on = true), then blow outward to reveal the arena.
| arg | type | description |
|---|---|---|
| on | boolean | |
| seed | number? |
NextNumber( ) → number
NextInteger(a: number, b: number) → number
| arg | type | description |
|---|---|---|
| a | number | |
| b | number |
splashBoss(name: string, title: string, nonce: number) → any
The boss splash: grey veil, the name in huge type, the epithet below.
| arg | type | description |
|---|---|---|
| name | string | |
| title | string | |
| nonce | number |
splashPhase(title: string, text: string, nonce: number) → any
Boss phase change card (e.g. the lantern-heart rekindles).
| arg | type | description |
|---|---|---|
| title | string | |
| text | string | |
| nonce | number |
splashSilence(turns: number, nonce: number) → any
"SILENCE" — skills sealed.
| arg | type | description |
|---|---|---|
| turns | number | |
| nonce | number |
splashFlee(ok: boolean, nonce: number) → any
Flee result card.
| arg | type | description |
|---|---|---|
| ok | boolean | |
| nonce | number |
flash(color: string, nonce: number) → any
A brief full-screen colour flash (weakness / crit impact frames).
| arg | type | description |
|---|---|---|
| color | string | |
| nonce | number |
wipe(on: boolean) → any
| arg | type | description |
|---|---|---|
| on | boolean |
splashVictory(r: any, nonce: number) → any
| arg | type | description |
|---|---|---|
| r | any | |
| nonce | number |
splashDefeat(nonce: number) → any
| arg | type | description |
|---|---|---|
| nonce | number |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
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.