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

animator

Port of figure/animator.js: phase-synced locomotion blends, one-shot starts, stops, turns and jumps, idle variations, even spine, upright posture, relaxed hands, look toward the camera, arm clearance, lean into turns and two-bone foot IK on the ground. Used by the Wanderer compon…

byzero-proxy @ DESKTOP-DB3UJOJ·posted 3d ago
What it does

animator

Port of figure/animator.js: phase-synced locomotion blends, one-shot starts, stops, turns and jumps, idle variations, even spine, upright posture, relaxed hands, look toward the camera, arm clearance, lean into turns and two-bone foot IK on the ground. Used by the Wanderer component.

Ported from blendi/painted-valley on Patch (MIT).

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

strict

wrap(a: number) → number

argtypedescription
anumber

applyPosture(sk: Skel, b: { [string]: number }, fix: { spine: number, clavicle: number }?) → void

argtypedescription
skSkel
b{ [string]: number }
fix{ spine: number, clavicle: number }?

analyze(man: Man) → Shared

argtypedescription
manMan

shouldersForward(fix: { spine: number, clavicle: number }?) → number

Shoulders' forward offset from the ankles in the standing idle (m, + = in front).

argtypedescription
fix{ spine: number, clavicle: number }?

new(man: Man) → Animator

argtypedescription
manMan

feetAt(self: Animator, name: string, u: number) → void

Feet (relative to root) of clip `name` at normalized time u.

argtypedescription
selfAnimator
namestring
unumber

currentFeet(self: Animator) → void

Where he is now: feet relative to the root bone, in character space.

argtypedescription
selfAnimator

match(self: Animator, name: string, feet: { vector }, from: number?, to: number?) → number

The normalized time in `name` (between from and to) whose feet best match `feet`.

argtypedescription
selfAnimator
namestring
feet{ vector }
fromnumber?
tonumber?

matchPhase(self: Animator, name: string, feet: { vector }) → number

The gait phase whose feet best match `feet`, for clip `name` (a loop).

argtypedescription
selfAnimator
namestring
feet{ vector }

enter(self: Animator, state: State, fade: number?) → State

A state returns, each frame, the clips it plays: { clip, time, w }, weights summing to 1.

argtypedescription
selfAnimator
stateState
fadenumber?

locoState(self: Animator, opts: { strafe: boolean }) → State

The locomotion blend, turning to face his way or strafing.

argtypedescription
selfAnimator
opts{ strafe: boolean }

sample(ctx: any, dt: number) → void

while it fades out under a stop or turn it keeps the speed it last had: the stop's first frame reports speed 0, which turned the fading run into idle for a frame (the knee snapped straight)

argtypedescription
ctxany
dtnumber

sampleLoco(self: Animator, ctx: any, dt: number, advance: boolean?) → void

the gait: phase advanced by distance over stride, so feet stay planted at any mix

argtypedescription
selfAnimator
ctxany
dtnumber
advanceboolean?

add(clip: string, w: number, synced: boolean?) → void

argtypedescription
clipstring
wnumber
syncedboolean?

dirBlend(self: Animator, ring: { { any } }, angle: number, w: number, add: (string, number, boolean?) → void

weights along a ring of directions {angle deg, clip}; adds w to the two either side of angle

argtypedescription
selfAnimator
ring{ { any } }
anglenumber
wnumber
add(string, number, boolean?

oneShot(self: Animator, kind: string, clip: string, opts: any?) → State

A one-shot clip from normalized time `from`, at `rate`. Root motion is read by the player.

argtypedescription
selfAnimator
kindstring
clipstring
optsany?

sample(_ctx: any, dt: number) → void

argtypedescription
_ctxany
dtnumber

update(self: Animator, dt: number, ctx: any) → void

argtypedescription
selfAnimator
dtnumber
ctxany

evenSpine(self: Animator) → void

Spreads the spine's bend evenly over its three joints. MakeHuman's spine joints sit low and close together with a long chest above them, so a bend the clips put mostly in one joint (Idle_Tired's hands-on-knees) read as a straight lower back kinking into a bent upper back. The chest ends where the clip put it; only the curve between hips and chest changes.

argtypedescription
selfAnimator

armClearance(self: Animator, dt: number) → void

Elbows stay clear of his sides: each elbow is kept at least 86% of the shoulder joints' half width out from his centre line (sideways, in his own frame), by lifting the upper arm out.

argtypedescription
selfAnimator
dtnumber

loc(i: number) → vector

argtypedescription
inumber

relaxHands(self: Animator, speed: number, weight: number?) → void

Relaxed hands: UAL's walk and idle clench fists, anymove's clips carry no fingers at all. Every finger goes to a curl between flat (the rest pose) and the idle's fist: loose when standing and walking, firmer as he runs. The anymove page's clips keep that page's hands, as read from it (hands-anymove.json), in proportion to their weight in the mix.

argtypedescription
selfAnimator
speednumber
weightnumber?

lookToward(self: Animator, dt: number, dirWorld: vector, weight: number) → void

Head and neck turn toward where the camera looks (within reach), easing in and out.

argtypedescription
selfAnimator
dtnumber
dirWorldvector
weightnumber

uprightTrunk(self: Animator, dt: number, speed: number, weight: number?) → void

Keeps his trunk about as upright as a person's at that speed (a few degrees walking, about 11 running, 14 sprinting): on this body the run clips lean 23-29 degrees and round the shoulders (blendi: shoulders too far forward while running). Measured each frame, eased.

argtypedescription
selfAnimator
dtnumber
speednumber
weightnumber?

leanInto(self: Animator, dt: number, turnRate: number, speed: number, forwardAccel: number) → void

argtypedescription
selfAnimator
dtnumber
turnRatenumber
speednumber
forwardAccelnumber

legIK(self: Animator, side: string, delta: vector) → void

Two-bone IK: moves the ankle of `side` by `delta` (world), knee bending in its own plane.

argtypedescription
selfAnimator
sidestring
deltavector

placeFeet(self: Animator, dt: number, ground: (number, number, number) → void

Feet on the ground: `ground(x, z, fromY)` returns { y, normal } or nil. `rootY` is the height the clips' flat floor sits at (his visual root). Lowers the hips for the lower foot, bends the other leg, and tilts planted feet to the slope.

argtypedescription
selfAnimator
dtnumber
ground(number, number, number
⌬ Types
Part = { clip: string, w: number, time: number, synced: boolean? }State = {Animator = typeof(setmetatable({} :: { [string]: any }, Animator))
⌬ Metadata
descriptionPort of figure/animator.js

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

15+items
▣
module · born here
❒asset
# man Patch's starter man (port of figure/man.js): reads the rig of figure/starter_man.bundle and the tracks of every clip in figure/starter-man-clips_anims once per engine, keeps root travel as `motion`, and `rootAt` samples a clip's root. Used by the animator and the player. Ported from blendi/painted-valley on Patch (MIT).
▲ 0↑ born
▣
module · born here
❒asset
# q Quaternion and vector helpers on plain numbers and Luau vectors, with three.js's formulas (multiply, rotate, slerp, slerpFlat, setFromUnitVectors). Used by every module of the wanderer's figure. Ported from blendi/painted-valley on Patch (MIT).
▲ 0↑ born
▣
module · born here
❒asset
# skel The man's skeleton as three.js holds it: local and world bone transforms, clip mixing the way three.js's AnimationMixer blends (bind pose for the weight left over), world-space bone turns, and the pose for the engine's skinning sinks. Used by the animator. Ported from blendi/painted-valley on Patch (MIT).
▲ 0↑ born

Problems

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

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬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.