visuals
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
visuals
<!-- 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.enemies.visuals — what every enemy and every dropped bone looks like. Owned by the ENEMIES slice. The WaveDirector calls `V.buildEnemy(parent, kind)` for each spawned enemy and `V.buildPickup(parent, bone)` for each dropped bone. Each enemy is drawn facing local +Z, centred on its physics sphere, feet at y = -radius. If a generated model bundle exists at `game.enemies.models.<kind>` (ghoul / imp / wisp / golem) it is used instead of the hand-assembled stand-in, scaled to MODEL_HEIGHT[kind] — that is the slot the polish pass fills.
pal(name: string, a: number?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| a | number? |
runtimeMat(key: string, props: ?) → void
| arg | type | description |
|---|---|---|
| key | string | |
| props | ? |
assetMat(key: string, resolve: () → void
`resolve` returns the material ref; each caller names its asset as a literal so the reference can be pinned when the world is published.
| arg | type | description |
|---|---|---|
| key | string | |
| resolve | ( |
glow(name: string, intensity: number) → void
| arg | type | description |
|---|---|---|
| name | string | |
| intensity | number |
mat(key: string) → void
| arg | type | description |
|---|---|---|
| key | string |
cube( ) → void
sphere( ) → void
cylinder( ) → void
cone( ) → void
torus( ) → void
mesh(name: string) → void
| arg | type | description |
|---|---|---|
| name | string |
part(parent: ?, name: string, m: string, mat: string, pos: ?, scale: ?, euler: ?) → void
part(parent, name, mesh, material, pos, scale, euler)
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | string | |
| m | string | |
| mat | string | |
| pos | ? | |
| scale | ? | |
| euler | ? |
light(parent: ?, color: string, intensity: number, radius: number, pos: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? | |
| color | string | |
| intensity | number | |
| radius | number | |
| pos | ? |
ghoul(root: ?) → void
Sackcloth ghoul: hunched burlap hood, void face with two amber eyes and a jagged grin, ragged robe, bony claws reaching forward. ~1.15 m tall.
| arg | type | description |
|---|---|---|
| root | ? |
imp(root: ?) → void
Pumpkin imp: lobed carved jack-o-lantern head with glowing eyes and grin, wiry brown body in a ragged tunic, pointed ears and tail, iron pitchfork.
| arg | type | description |
|---|---|---|
| root | ? |
wisp(root: ?) → void
Ectoplasm wisp: glowing green ghost with a screaming skull face, clawed wisp arms and a curling smoky tail. It flies.
| arg | type | description |
|---|---|---|
| root | ? |
golem(root: ?) → void
The Grave-Golem: a hulking boss of cracked mossy tombstones and earth with a skull face and green-glowing eyes, a crown of RIP headstones, slab fists.
| arg | type | description |
|---|---|---|
| root | ? |
tomb(name: ?, pos: ?, w: ?, h: ?, t: ?, euler: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| pos | ? | |
| w | ? | |
| h | ? | |
| t | ? | |
| euler | ? |
tryModel(root: ?, kind: string) → boolean
| arg | type | description |
|---|---|---|
| root | ? | |
| kind | string |
buildEnemy(parent: ?, kind: string) → void
Build the look of one enemy of `kind` under `parent` (a node centred on its collider).
| arg | type | description |
|---|---|---|
| parent | ? | |
| kind | string |
rarityColor(bone: ?) → void
| arg | type | description |
|---|---|---|
| bone | ? |
buildBoneFallback(parent: ?, bone: ?) → void
Our own glowing bone shape for a dropped bone (used when the player slice's buildBoneVisual is not there).
| arg | type | description |
|---|---|---|
| parent | ? | |
| bone | ? |
buildPickup(parent: ?, bone: ?) → void
Build the full look of a dropped bone pickup: the bone itself plus a rarity-coloured glow ring and light.
| arg | type | description |
|---|---|---|
| parent | ? | |
| bone | ? |
buildPop(parent: ?, kind: string, pos: ?) → void
Spawn the burst shards of an enemy popping; returns the list of shard records to animate.
| arg | type | description |
|---|---|---|
| parent | ? | |
| kind | string | |
| pos | ? |
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.