Skip to Content

Dressing room

An actor puts on a hat, checks a mirror, takes a knee and squares her shoulders.

Loading the take.

Each person is a chain of typed actions from @automovie/motions. This is what an agent writes for the scene; Composing motion explains the parts.

import type { IAutoMovieMotionHumanBody, IAutoMovieMotionHumanPerformance } from "@automovie/interface";
import { HumanChain, HumanObject, HumanPerformance, HumanStance } from "@automovie/motions";
import * as archetypes from "@automovie/archetypes";

const bag = archetypes.createBag({ kind: "tote" });
const bagAt = { at: { x: -0.3, y: 0, z: 0.55 }, yaw: 0 };
const counter = archetypes.createTable({ kind: "counter" });
const counterAt = { at: { x: 0.6, y: 0, z: 0.53 }, yaw: 180 };
const hat = archetypes.createWearable({ kind: "hat" });
const hatAt = { at: { x: 0.18, y: 0.914, z: 0.3 }, yaw: 0 };

// cyd: body f2, at (0, 0) m, facing 0°, trained
const cyd = HumanChain.subject("cyd")
  .act("bend", {
      toward: { kind: "prop", subject: "bag", point: "handle" },
      strategy: "squat",
    })
  .act("pickUp", {
      prop: "hat",
      handle: "hold",
      hand: "left",
      use: {
        tip: "wear",
        line: "worn",
        at: { region: "crown" },
        round: true,
      },
    })
  .act("dress", { item: "hat", prop: "hat" })
  .act("look", {
      with: "head",
      target: {
        kind: "point",
        frame: "performer",
        at: { x: 0.3, y: 1.6, z: 1.5 },
      },
      seconds: 1,
    })
  .act("kneel", { kind: "one", hold: 0.6 })
  .act("selfAction", { kind: "shoulderRoll" })
  .registered("handsOnHips", { seconds: 1 })
  .act("gesture", { kind: "squareShoulders" });

const scene = cyd;

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanStance.handsOnHips];

const props = [
  HumanObject.prop("bag", bag, bagAt),
  HumanObject.prop("counter", counter, counterAt),
  HumanObject.prop("hat", hat, hatAt),
];

// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "dressing",
  performers: [
    { subject: "cyd", body: bodies["f2"]!, at: { x: 0, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  props,
  laws,
};
const performance = new HumanPerformance(input);