setExclude(ids: { string }) → void
| arg | type | description |
|---|
| ids | { string } | |
setExtraExclude(ids: { string }) → void
Extra ids the camera's casts step over on top of the tumbler and guards (toys and other players' tumblers near the lens, which the camera hides instead of dodging).
| arg | type | description |
|---|
| ids | { string } | |
sub(a: V, b: V) → V return
add(a: V, b: V, k: number?) → V
| arg | type | description |
|---|
| a | V | |
| b | V | |
| k | number? | |
len(a: V) → number return math
clearLen(from: V, to: V) → number
How far along from -> to is clear of colliders and of drawn geometry (the full length when nothing is met).
| arg | type | description |
|---|
| from | V | |
| to | V | |
insideAt(p: V, outside: V) → void
Is `p` inside drawn geometry? Counts the surfaces each drawn entity puts on the segment from `outside` (a point known to be in the open, e.g. the tumbler) to `p`: an odd count means `p` is inside one of its closed volumes. Returns (inside, entityId?).
| arg | type | description |
|---|
| p | V | |
| outside | V | |
nearest(p: V, r: number) → number
The nearest drawn or collider surface within `r` of `p` along the six axes (r when nothing is that close).
| arg | type | description |
|---|
| p | V | |
| r | number | |
depenetrate(p: V, r: number) → V
Push a point out until a sphere of radius r around it touches nothing (two passes along the six axes).
| arg | type | description |
|---|
| p | V | |
| r | number | |
safeEye(anchor: V, want: V, margin: number) → void
The station nearest `want` on the line anchor -> want that keeps `margin` from everything. Returns (eye, distance from anchor).
| arg | type | description |
|---|
| anchor | V | |
| want | V | |
| margin | number | |
foreground(eye: V, subject: V, right: V, near: number?) → boolean
True when something stands between eye and the frame around subject in the near part of the view (a rail across the lens).
| arg | type | description |
|---|
| eye | V | |
| subject | V | |
| right | V | |
| near | number? | |
centre(eye: V, subject: V, right: V, margin: number) → void
Slide an eye sideways toward the middle of a narrow corridor (a stairwell), keeping sight of `subject`. Returns (eye, the nearer side's clearance).
| arg | type | description |
|---|
| eye | V | |
| subject | V | |
| right | V | |
| margin | number | |
pick(o: PickOpts) → void
Pick the best clear station among candidate directions. Returns (eye, distance, candidate index, score).
| arg | type | description |
|---|
| o | PickOpts | |