Skip to Content
ReferenceMotion APIBodies and verdicts

Bodies and verdicts

This page states how a performance gets its bodies, what it gives at any second and how it is verified. Motion as code in the guide explains how a performance is composed.

A body

A person’s body comes from @automovie/human: a canonical skeleton and a contact profile with the mass and contact shapes of each segment, generated by code from typed parameters. createHumanBody derives the body the motion laws perform with:

import { AutoMovieHumanCanonicalBody, type IAutoMovieHumanParameters } from "@automovie/human"; import { createHumanBody } from "@automovie/motions"; declare const parameters: IAutoMovieHumanParameters; const prepared = AutoMovieHumanCanonicalBody.prepare(parameters, { mass: 72, id: "a" }); const body = createHumanBody(prepared.skeleton, prepared.profile);

@automovie/render draws the same prepared body as the polygon man, plain rigid primitives over its joints.

Sampling a performance

Besides pose, a HumanPerformance gives posture, bones, prop, segments and aim at any second. Positions are world metres on the floor, and yaw is degrees about +Y with 0 facing +Z.

Verifying a performance

A composition that plans can still perform badly. A scene is checked on three things before it is accepted:

  1. HumanVerdicts.of(performance) reads every physical bound that holds for human motion, such as a hand passing into the body, a foot skating or a joint leaving its range, and places each finding on the performer and the action. Only a clean report is accepted.
  2. HumanSignature reads what human-movement studies measure, such as the trunk’s inclination, a joint’s flexion, the centre of mass and the cadence, for a unit test to assert.
  3. Stills of the performance show a pose that reads wrongly, which numbers do not.
import { HumanSignature, HumanVerdicts } from "@automovie/motions"; const report = HumanVerdicts.of(performance); if (!report.clean) throw new Error(HumanVerdicts.describe(report)); const reader = HumanSignature.of(performance, "a", body, 0); const lean = HumanSignature.trunk(reader, 1.5) - HumanSignature.trunk(reader, 0);
Last updated on