df_stg_util — the small kit the staging slice builds everything with.
Quaternion helpers, a material cache and a one-line primitive spawner.
Nothing here knows about Deep Field; it is the geometry vocabulary the
boat, the surface set and the specimen are written in.
Slice owner: apex-staging.
qAxis(ax: number, ay: number, az: number, ang: number) → void
| arg | type | description |
|---|
| ax | number | |
| ay | number | |
| az | number | |
| ang | number | |
qEuler(pitch: number, yaw: number, roll: number) → void
Yaw about Y, then pitch about X, then roll about Z.
| arg | type | description |
|---|
| pitch | number | |
| yaw | number | |
| roll | number | |
qAlignY(dx: number, dy: number, dz: number) → void
The shortest rotation taking +Y to the given direction. Cylinders,
capsules and cones are all built along +Y, so this is how a limb points.
| arg | type | description |
|---|
| dx | number | |
| dy | number | |
| dz | number | |
mat(leaf: string) → void
Resolve a material this slice owns by its leaf name. Answers nil rather
than raising, so a half-authored folder degrades to untextured geometry
instead of taking the scene down.
| arg | type | description |
|---|
| leaf | string | |
clearMaterialCache( ) → void
part(parent: any, name: string, model: string, matLeaf: string?, pos: any, scale: any, rot: any?) → void
part(parent, name, model, matLeaf, pos, scale, rot?) -> entity proxy
| arg | type | description |
|---|
| parent | any | |
| name | string | |
| model | string | |
| matLeaf | string? | |
| pos | any | |
| scale | any | |
| rot | any? | |
limb(parent: any, name: string, model: string, matLeaf: string?, a: any, b: any, r: number) → void
A limb: a unit-Y primitive stretched from `a` to `b` with radius `r`.
| arg | type | description |
|---|
| parent | any | |
| name | string | |
| model | string | |
| matLeaf | string? | |
| a | any | |
| b | any | |
| r | number | |
group(parent: any, name: string, pos: any?) → void
An empty transform to group things under.
| arg | type | description |
|---|
| parent | any | |
| name | string | |
| pos | any? | |
sample(tbl: { number }, t: number) → number
Linear sample of a control table at t in 0..1.
| arg | type | description |
|---|
| tbl | { number } | |
| t | number | |