arena
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
arena
<!-- 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/arena — the battle dioramas, spawned at runtime far from the areas (ORIGIN), their combatant sprites, and the battle camera rig (base pose + punch-in + shake) with a world->UI projection for the HUD. Themes (M.build(theme, opts)): "forest" the Murmurwood clearing: green-gold, glowshrooms, fireflies "forest_hush" the same wood drained to ash by the Hush: grey, mist, falling ash "snow" a Rimecrest clearing: snow, laden pines, ice crystals, snowfall opts.boss widens the camera for a towering foe. Themes that change the global light (Sun / Ambient / Atmosphere fog) return a `restore` closure in the build result; the battle calls it on cleanup.
partySlots(ids: { string }) → void
Slots for a party list (ids, in order). A full trio keeps its signature formation.
| arg | type | description |
|---|---|---|
| ids | { string } |
q(ax: ?, ay: ?, az: ?, rad: ?) → void
| arg | type | description |
|---|---|---|
| ax | ? | |
| ay | ? | |
| az | ? | |
| rad | ? |
spawnModel(name: ?, parent: ?, model: ?, mat: ?, pos: ?, scale: ?, rot: ?, shadows: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| parent | ? | |
| model | ? | |
| mat | ? | |
| pos | ? | |
| scale | ? | |
| rot | ? | |
| shadows | ? |
yawToCamera(x: ?, z: ?) → void
| arg | type | description |
|---|---|---|
| x | ? | |
| z | ? |
sprite(name: ?, parent: ?, mat: ?, x: ?, z: ?, height: ?, aspect: ?, shadows: ?) → void
A camera-facing pixel sprite whose feet sit at the root.
| arg | type | description |
|---|---|---|
| name | ? | |
| parent | ? | |
| mat | ? | |
| x | ? | |
| z | ? | |
| height | ? | |
| aspect | ? | |
| shadows | ? |
pointLight(name: ?, parent: ?, pos: ?, c: ?, intensity: ?, radius: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| parent | ? | |
| pos | ? | |
| c | ? | |
| intensity | ? | |
| radius | ? |
applyLook(theme: string) → void
| arg | type | description |
|---|---|---|
| theme | string |
set(entName: ?, comp: ?, field: ?, value: ?) → void
| arg | type | description |
|---|---|---|
| entName | ? | |
| comp | ? | |
| field | ? | |
| value | ? |
addMotes(root: ?, motes: ?, n: ?, mats: ?, kind: ?, opts: ?) → void
kind "float" bobs in place, "fall" drifts down and wraps, "mist" slides along the ground.
| arg | type | description |
|---|---|---|
| root | ? | |
| motes | ? | |
| n | ? | |
| mats | ? | |
| kind | ? | |
| opts | ? |
buildForest(root: ?, hush: boolean, lights: ?, motes: ?) → void
| arg | type | description |
|---|---|---|
| root | ? | |
| hush | boolean | |
| lights | ? | |
| motes | ? |
buildSnow(root: ?, lights: ?, motes: ?) → void
| arg | type | description |
|---|---|---|
| root | ? | |
| lights | ? | |
| motes | ? |
build(theme: string?, opts: any?) → any
Spawn an arena. theme = "forest" | "forest_hush" | "snow"; opts.boss frames a towering foe. Returns { root, camera, lights, motes, theme, restore? }.
| arg | type | description |
|---|---|---|
| theme | string? | |
| opts | any? |
actor(parent: any, key: string, x: number, z: number, hover: number?) → any
Spawn one combatant sprite. key = party id or enemy id.
| arg | type | description |
|---|---|---|
| parent | any | |
| key | string | |
| x | number | |
| z | number | |
| hover | number? |
setSprites(a: any, key: string) → void
Swap an actor's sprite set (boss phase change).
| arg | type | description |
|---|---|---|
| a | any | |
| key | string |
setPose(a: any, pose: string) → void
| arg | type | description |
|---|---|---|
| a | any | |
| pose | string |
setRing(a: any, on: boolean, mat: any?) → void
| arg | type | description |
|---|---|---|
| a | any | |
| on | boolean | |
| mat | any? |
headPos(a: any) → void
World position of an actor's head (for UI popups and VFX).
| arg | type | description |
|---|---|---|
| a | any |
chestPos(a: any) → void
| arg | type | description |
|---|---|---|
| a | any |
newRig(cam: any) → any
| arg | type | description |
|---|---|---|
| cam | any |
lerp(a: ?, b: ?, t: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| t | ? |
punch(rig: any, point: { x: number, y: number, z: number }, amt: number) → void
| arg | type | description |
|---|---|---|
| rig | any | |
| point | { x: number, y: number, z: number } | |
| amt | number |
release(rig: any) → void
| arg | type | description |
|---|---|---|
| rig | any |
shake(rig: any, amt: number) → void
| arg | type | description |
|---|---|---|
| rig | any | |
| amt | number |
tick(rig: any, actors: { any }, motes: { any }, dt: number, t: number) → void
Per-frame: advance punch/shake, place the camera, breathe the sprites, drift the motes.
| arg | type | description |
|---|---|---|
| rig | any | |
| actors | { any } | |
| motes | { any } | |
| dt | number | |
| t | number |
project(rig: any, w: { x: number, y: number, z: number }) → void
| arg | type | description |
|---|---|---|
| rig | any | |
| w | { x: number, y: number, z: 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.
Showing the 199 items nearest this part. It holds more than this page lists.
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.