damage(power: number, atk: number, def: number, affinity: string?, guarding: boolean?) → void
damage = power * (atk / def)^0.5 * affinity * variance
| arg | type | description |
|---|
| power | number | |
| atk | number | |
| def | number | |
| affinity | string? | |
| guarding | boolean? | |
lineMesh(segments: { Segment }, thickness: number?) → void
Geometry table for asset.create("mesh", ...) / build.asset / renderer.mesh.create.
| arg | type | description |
|---|
| segments | { Segment } | |
| thickness | number? | |
boxEdges(out: { Segment }, c: Vec3, s: Vec3) → void
Append the 12 edges of an axis-aligned box (centre c, size s) to `out`.
| arg | type | description |
|---|
| out | { Segment } | |
| c | Vec3 | |
| s | Vec3 | |
p(x: ?, y: ?, z: ?) → void
| arg | type | description |
|---|
| x | ? | |
| y | ? | |
| z | ? | |
polyline(out: { Segment }, pts: { Vec3 }, closed: boolean?) → void
Append a polyline (open or closed) to `out`.
| arg | type | description |
|---|
| out | { Segment } | |
| pts | { Vec3 } | |
| closed | boolean? | |
circle(out: { Segment }, c: Vec3, r: number, ax: Vec3, ay: Vec3, n: number?) → void
Append a circle of `n` segments in the plane spanned by unit axes ax, ay.
| arg | type | description |
|---|
| out | { Segment } | |
| c | Vec3 | |
| r | number | |
| ax | Vec3 | |
| ay | Vec3 | |
| n | number? | |
sketchy(segments: { Segment }, amount: number?, strands: number?, seed: number?) → void
The hand-drawn look: each segment becomes `strands` jittered strokes that
overshoot their ends slightly — graphite pencil, crayon. Deterministic per seed.
| arg | type | description |
|---|
| segments | { Segment } | |
| amount | number? | |
| strands | number? | |
| seed | number? | |
provide(name: string, api: any) → void
| arg | type | description |
|---|
| name | string | |
| api | any | |
use(name: string) → any return RT
| arg | type | description |
|---|
| name | string | |
on(event: string, fn: (...any) → void
| arg | type | description |
|---|
| event | string | |
| fn | (...any | |
emit(event: string, ...: any) → void
| arg | type | description |
|---|
| event | string | |
| ... | any | |
flag(name: string) → any return RT
Story flags (drawings found, choices made, …). Reset on new game.
| arg | type | description |
|---|
| name | string | |
setFlag(name: string, value: any) → void
| arg | type | description |
|---|
| name | string | |
| value | any | |
lock(holder: string, on: boolean) → void
| arg | type | description |
|---|
| holder | string | |
| on | boolean | |
inputLocked( ) → boolean return next