fire
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
fire
<!-- 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.fire — FIRE SLICE: the per-part heat simulation and every fire VFX. Interface (spec.md): init(root), start(root, state), stop(), update(dt), heatAt(pos) -> number, shutdown() Extras for testing: makeTestChurch(weather) builds a ~180-part synthetic church under FireRoot and restarts the sim on it; debugInfo() reads timings. Sim: fixed tick Rules.FIRE.tick. Each part keeps temp/fuel/char/moisture. A precomputed, direction-weighted neighbour graph (strong up, downwind, weak sideways / down) carries heat from burning parts. Wet parts hold at 100 degrees while heat boils their moisture off. Parts below FIRE.collapseFuel fall, and so does everything whose supports are all gone. VFX: seven shared GPU emitters (two flame layers, fire-lit glow haze, smoke, a wind-leaning smoke column, embers, steam). They are fed round-robin from the burning list with per-part accumulators, so the cost is bounded by visits per frame and not by the number of burning parts. A pool of Rules.FIRE.maxLights flickering point lights follows clustered fire mass.
oilMaterial( ) → any
church( ) → any
v3(t: any) → void
| arg | type | description |
|---|---|---|
| t | any |
aabbDist(r: any, x: number, y: number, z: number) → number
| arg | type | description |
|---|---|---|
| r | any | |
| x | number | |
| y | number | |
| z | number |
spawnOwned(name: string) → any
| arg | type | description |
|---|---|---|
| name | string |
makeEmitters( ) → void
emitters
applyWind( ) → void
burst(em: any, x: number, y: number, z: number, sx: number, sy: number, sz: number, n: number) → void
| arg | type | description |
|---|---|---|
| em | any | |
| x | number | |
| y | number | |
| z | number | |
| sx | number | |
| sy | number | |
| sz | number | |
| n | number |
setVisual(i: number, char01: number, glow01: number) → void
part visuals (church owns the look; fixture parts are tinted here)
| arg | type | description |
|---|---|---|
| i | number | |
| char01 | number | |
| glow01 | number |
dropVisual(i: number) → void
| arg | type | description |
|---|---|---|
| i | number |
updateFalling(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
debrisPos(i: number) → void
| arg | type | description |
|---|---|---|
| i | number |
dirMult(u: number, wd: number, ws: number) → number
graph
| arg | type | description |
|---|---|---|
| u | number | |
| wd | number | |
| ws | number |
supportIds(p: any) → void
| arg | type | description |
|---|---|---|
| p | any |
buildGraph( ) → void
drainDrops(maxN: number) → void
| arg | type | description |
|---|---|---|
| maxN | number |
major(p: any) → void
| arg | type | description |
|---|---|---|
| p | any |
groupCheck(p: any) → void
| arg | type | description |
|---|---|---|
| p | any |
collapse(i: number, top: boolean) → void
| arg | type | description |
|---|---|---|
| i | number | |
| top | boolean |
ignite(i: number) → void
| arg | type | description |
|---|---|---|
| i | number |
addSource(x: number, y: number, z: number, radius: number, rate: number, dur: number, tool: string) → void
heat sources (match flame, lantern oil, kindling)
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| z | number | |
| radius | number | |
| rate | number | |
| dur | number | |
| tool | string |
onIgnite(info: any) → void
| arg | type | description |
|---|---|---|
| info | any |
planLights( ) → void
add(x: number, y: number, z: number, w: number) → void
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| z | number | |
| w | number |
tick(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
emitPart(i: number) → void
per-frame VFX
| arg | type | description |
|---|---|---|
| i | number |
emitSource(s: any, dt: number) → void
| arg | type | description |
|---|---|---|
| s | any | |
| dt | number |
frameVfx(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
updateLights(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
init(root: any) → void
interface
| arg | type | description |
|---|---|---|
| root | any |
destroyOwned( ) → void
start(root: any, state: any) → void
| arg | type | description |
|---|---|---|
| root | any | |
| state | any |
stop( ) → void
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
heatAt(pos: any) → number
| arg | type | description |
|---|---|---|
| pos | any |
shutdown( ) → void
simulate(seconds: number, ignition: any?) → any
Sim-only fast-forward (no VFX emitted): for numeric tests.
| arg | type | description |
|---|---|---|
| seconds | number | |
| ignition | any? |
debugInfo( ) → void
makeTestChurch(weather: string?) → any
test fixture: a ~180-part synthetic stave church under FireRoot
| arg | type | description |
|---|---|---|
| weather | string? |
add(kind: ?, group: ?, px: ?, py: ?, pz: ?, ax: ?, ay: ?, az: ?, scx: ?, scy: ?, scz: ?, q: ?, tar: ?, sup: ?) → void
| arg | type | description |
|---|---|---|
| kind | ? | |
| group | ? | |
| px | ? | |
| py | ? | |
| pz | ? | |
| ax | ? | |
| ay | ? | |
| az | ? | |
| scx | ? | |
| scy | ? | |
| scz | ? | |
| q | ? | |
| tar | ? | |
| sup | ? |
nearest(ids: ?, x: ?, y: ?, z: ?, n: ?) → void
| arg | type | description |
|---|---|---|
| ids | ? | |
| x | ? | |
| y | ? | |
| z | ? | |
| n | ? |
qx(a: ?) → void
| arg | type | description |
|---|---|---|
| a | ? |
qz(a: ?) → void
| arg | type | description |
|---|---|---|
| a | ? |
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.