add(a: Vec3, b: Vec3) → Vec3 return
| arg | type | description |
|---|
| a | Vec3 | |
| b | Vec3 | |
sub(a: Vec3, b: Vec3) → Vec3 return
| arg | type | description |
|---|
| a | Vec3 | |
| b | Vec3 | |
mul(a: Vec3, s: number) → Vec3 return
| arg | type | description |
|---|
| a | Vec3 | |
| s | number | |
len(a: Vec3) → number return math
lerp3(a: Vec3, b: Vec3, t: number) → Vec3
| arg | type | description |
|---|
| a | Vec3 | |
| b | Vec3 | |
| t | number | |
cross(a: Vec3, b: Vec3) → Vec3
| arg | type | description |
|---|
| a | Vec3 | |
| b | Vec3 | |
point(p: any, fallback: Vec3?) → Vec3
Resolve a point: { x, y, z }, { x=, y=, z= }, or an entity name / id / proxy (read now).
| arg | type | description |
|---|
| p | any | |
| fallback | Vec3? | |
easeFn(name: any) → void
| arg | type | description |
|---|
| name | any | |
noise(seed: number, t: number) → number
smooth deterministic 1-D noise in about -1..1 (sum of incommensurate sines)
| arg | type | description |
|---|
| seed | number | |
| t | number | |
crPoint(p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3, t: number) → Vec3
| arg | type | description |
|---|
| p0 | Vec3 | |
| p1 | Vec3 | |
| p2 | Vec3 | |
| p3 | Vec3 | |
| t | number | |
knot(ti: number, a: Vec3, b: Vec3) → number
| arg | type | description |
|---|
| ti | number | |
| a | Vec3 | |
| b | Vec3 | |
spline(pts: { Vec3 }) → void
A function u (0..1) -> point on a smooth Catmull-Rom spline through `pts`, moving at constant speed.
| arg | type | description |
|---|
| pts | { Vec3 } | |
compile(spec: any, plan: Plan) → any
| arg | type | description |
|---|
| spec | any | |
| plan | Plan | |
constFov(spec: any, lensFov: number) → void
| arg | type | description |
|---|
| spec | any | |
| lensFov | number | |
defaultFrom(spec: any, target: Vec3, dist: number?) → Vec3
Where the camera starts when `from` is not given: `distance` from the
target at `height`, at compass `angle` (degrees, 0 = +Z side of the target).
| arg | type | description |
|---|
| spec | any | |
| target | Vec3 | |
| dist | number? | |
liveLook(spec: any) → string
| arg | type | description |
|---|
| spec | any | |
static(spec: ?, target: ?, from: ?, lensFov: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lensFov | ? | |
dollyBy(amount: number, lensFov: number, fovMul: number?, rise: number?, ease: string?) → void
| arg | type | description |
|---|
| amount | number | |
| lensFov | number | |
| fovMul | number? | |
| rise | number? | |
| ease | string? | |
dolly(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
dollyOut(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
pushIn(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
pullBack(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
reveal(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
side(target: Vec3, from: Vec3) → Vec3
| arg | type | description |
|---|
| target | Vec3 | |
| from | Vec3 | |
truck(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
drift(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
craneRise(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
craneDown(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
tiltReveal(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
tiltDown(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
orbitPlan(spec: any, target: Vec3, from: Vec3, lf: number, defDeg: number, shrink: number) → Plan
| arg | type | description |
|---|
| spec | any | |
| target | Vec3 | |
| from | Vec3 | |
| lf | number | |
| defDeg | number | |
| shrink | number | |
orbit(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
arc(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
followPath(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
flyover(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
whipPan(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
focusPull(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
handheld(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
dollyZoom(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
zoom(spec: ?, target: ?, from: ?, lf: ?) → void
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
topDown(spec: ?, target: ?, from: ?, lf: ?) → void
Top-down reveal. The camera rides a sphere around the target: elevation
from (almost) straight overhead down to the final three-quarter angle,
radius from `altitude` to the final distance. It never sits exactly on the
pole: a hair of horizontal offset toward where it ends keeps the picture's
"up" pointing the same way the whole time, so it cannot roll or flip.
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
spiralClimb(spec: ?, target: ?, from: ?, lf: ?) → void
Spiral climb: circles the target's vertical axis while rising, aimed at the
axis slightly above the camera so the climb reads as looking up the tower.
| arg | type | description |
|---|
| spec | ? | |
| target | ? | |
| from | ? | |
| lf | ? | |
build(spec: any, lensFov: number?) → any
Build one cutscene shot from a move spec. `lensFov` is the lens preset's field of view, used when the shot names none.
| arg | type | description |
|---|
| spec | any | |
| lensFov | number? | |
has(name: string) → boolean
Is `name` a move this module knows?
| arg | type | description |
|---|
| name | string | |
register(name: string, fn: (any, Vec3, Vec3, number) → void
Add a move of your own: fn(spec, target, from, lensFov) -> { pos = u -> Vec3, look = u -> Vec3, fov = (u -> number)?, straight = boolean?, ease = string? }.
| arg | type | description |
|---|
| name | string | |
| fn | (any, Vec3, Vec3, number | |