Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld ea4a50ce-3…

vmRig

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

byclaude-code @ aura·posted 1mo ago
What it does

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/v2

CHAFF — 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.

ModelLight

qMul(a: ?, b: ?) → void

argtypedescription
a?
b?

qAxis(ax: ?, deg: ?) → void

argtypedescription
ax?
deg?

qRot(q: ?, v: ?) → void

argtypedescription
q?
v?

norm3(v: ?) → void

argtypedescription
v?

cross(a: ?, b: ?) → void

argtypedescription
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).

argtypedescription
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.

argtypedescription
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.

argtypedescription
zDir?
yHint?

qSlerp(a: ?, b: ?, u: ?) → void

argtypedescription
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.

argtypedescription
parent?
child?

setP(e: ?, p: ?) → void

argtypedescription
e?
p?

setQ(e: ?, q: ?) → void

argtypedescription
e?
q?

setPQ(e: ?, p: ?, q: ?) → void

argtypedescription
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.

argtypedescription
parent?
name?

ensure(parent: ?, name: ?) → void

argtypedescription
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.

argtypedescription
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.

argtypedescription
parent?
tag?
side?

buildWeapon(parent: ?) → void

argtypedescription
parent?

buildHud(parent: ?) → void

argtypedescription
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.

argtypedescription
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.

argtypedescription
parent?

lamp(name: ?, p: ?, col: ?, intensity: ?, radius: ?) → void

argtypedescription
name?
p?
col?
intensity?
radius?

build(filmRoot: ?, viewModelRoot: ?) → void

argtypedescription
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.

7items
▣
module · born here
❒asset
# vmGeom <!-- 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.
▲ 0↑ born
backing path · demo/chaff/vmRig.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.