vmRig
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
vmRig
<!-- 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/v2CHAFF — the viewmodel rig: quaternion maths, and the entity hierarchy the hands, the bolt-driver and the visor are posed through. WHY THERE IS A `VM` NODE WITH A HALF-TURN ON IT The film's camera stands on `Eye` and looks at `EyeAim`, which is at Eye's local +Z. An entity's forward is -Z, so the camera is `Eye` turned a half turn about Y: in Eye's own frame the picture runs +Z into the screen and -X to the right. Rather than author a viewmodel backwards, the rig hangs everything under `B_VM`, which carries that half turn — so INSIDE the rig the engine's ordinary basis holds: +X is screen right, +Y is up, -Z is the way the diver is looking. Every number in `slice_hands` is in that space. Nothing here reads film time. This module builds and it writes transforms; `slice_hands` decides what the transforms are.
qMul(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
qAxis(ax: ?, deg: ?) → void
| arg | type | description |
|---|---|---|
| ax | ? | |
| deg | ? |
qRot(q: ?, v: ?) → void
| arg | type | description |
|---|---|---|
| q | ? | |
| v | ? |
norm3(v: ?) → void
| arg | type | description |
|---|---|---|
| v | ? |
cross(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
qFromBasis(bx: ?, by: ?, bz: ?) → void
A rotation from three orthonormal basis vectors given as the columns of the matrix (where the object's local X, Y and Z end up).
| arg | type | description |
|---|---|---|
| bx | ? | |
| by | ? | |
| bz | ? |
qAimY(yDir: ?, zHint: ?) → void
"+Y points along `yDir`, and the local +Z leans toward `zHint`." A hand is posed with this: the knuckles and the back of the hand.
| arg | type | description |
|---|---|---|
| yDir | ? | |
| zHint | ? |
qAimZ(zDir: ?, yHint: ?) → void
"+Z points along `zDir`, and the local +Y leans toward `yHint`." The weapon is posed with this: -Z is the muzzle, so `zDir` is the direction the brace points, and `yHint` is where the rail faces.
| arg | type | description |
|---|---|---|
| zDir | ? | |
| yHint | ? |
qSlerp(a: ?, b: ?, u: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| u | ? |
compose(parent: ?, child: ?) → void
Compose a child's local transform onto its parent's: the hands are authored as offsets from the WEAPON, and the weapon as an offset from the rig, so the grip never drifts off the grip when a shot moves the weapon.
| arg | type | description |
|---|---|---|
| parent | ? | |
| child | ? |
setP(e: ?, p: ?) → void
| arg | type | description |
|---|---|---|
| e | ? | |
| p | ? |
setQ(e: ?, q: ?) → void
| arg | type | description |
|---|---|---|
| e | ? | |
| q | ? |
setPQ(e: ?, p: ?, q: ?) → void
| arg | type | description |
|---|---|---|
| e | ? | |
| p | ? | |
| q | ? |
forgetCache( ) → void
childByName(parent: ?, name: ?) → void
Idempotent by construction: every node is looked up by name under its parent and only spawned when it is not there. A build after an edit/play flip finds nothing and makes it all again; a build on a live scene finds everything and makes none of it.
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? |
ensure(parent: ?, name: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? |
ensureModel(parent: ?, name: ?, mesh: ?, mat: ?, p: ?, q: ?, sc: ?) → void
A node that draws a mesh. `mat` is a material identity; `sc` an optional local scale.
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? | |
| mesh | ? | |
| mat | ? | |
| p | ? | |
| q | ? | |
| sc | ? |
buildHand(parent: ?, tag: ?, side: ?) → void
One hand: a wrist that carries the cuff and the forearm, a palm, four three-bone fingers and a two-bone thumb. `side` is 1 for the right hand and -1 for the left, and mirrors every x it places.
| arg | type | description |
|---|---|---|
| parent | ? | |
| tag | ? | |
| side | ? |
buildWeapon(parent: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? |
buildHud(parent: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? |
buildWorld(filmRoot: ?) → void
Spent brass, the props the hands act on, and the weapon after it is let go all live in world space under FilmRoot: a casing that stayed parented to the head would roll with the frame instead of hanging in the drum.
| arg | type | description |
|---|---|---|
| filmRoot | ? |
buildLights(parent: ?) → void
Hard vacuum with no sky and no environment probe: a metal surface has no diffuse term and nothing to reflect, so a weapon lit only by the scene is a black cut-out for the whole film. These three travel with the head and are what makes the hero subject read — a warm key standing in for the bounce off the grain a metre in front of him, a dim ochre fill, and a rim that keeps the silhouette off the black. Their radius is under four metres, so they reach the grain against the visor and nothing else in a 420 m drum.
| arg | type | description |
|---|---|---|
| parent | ? |
lamp(name: ?, p: ?, col: ?, intensity: ?, radius: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| p | ? | |
| col | ? | |
| intensity | ? | |
| radius | ? |
build(filmRoot: ?, viewModelRoot: ?) → void
| arg | type | description |
|---|---|---|
| filmRoot | ? | |
| viewModelRoot | ? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
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.