Skip to Content

Locked door

A woman knocks and tries a locked door, waves a friend over and tries again.

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, HumanEmblem, HumanHabit, HumanObject, HumanPerformance, HumanSocial, HumanStance, HumanTravelLeaf } from "@automovie/motions";
import * as archetypes from "@automovie/archetypes";

const door = archetypes.createDoor({ kind: "hinged" });
const doorAt = { at: { x: 0, y: 0, z: 1 }, yaw: 0 };

// ada: body f1, at (0, -1.2) m, facing 0°, trained
const ada = HumanChain.subject("ada")
  .act("walk", { to: { x: 0, y: 0, z: 0.7 } })
  .act("touch", {
      target: {
        kind: "point",
        frame: "world",
        at: { x: 0.05, y: 1.4, z: 0.97 },
        normal: { x: 0, y: 0, z: -1 },
      },
      kind: "tap",
      with: "fist",
      side: "right",
      count: 3,
    })
  .act("look", {
      with: "head",
      target: {
        kind: "point",
        frame: "world",
        at: { x: 0, y: 1.9, z: 1 },
        normal: { x: 0, y: 0, z: -1 },
      },
      seconds: 1,
    })
  .registered("openDoor", { door: "door", handle: "push", seconds: 1.5 })
  .registered("dontKnow", {})
  .act("look", {
      with: "trunk",
      cue: "seen",
      target: { kind: "person", subject: "bea", region: "face" },
      seconds: 0.9,
    })
  .registered("comeHere", {}, "door-beckon")
  .registered("openDoor", { door: "door", handle: "push", seconds: 1.5 })
  .registered("handsOnHips", { seconds: 1.6 });

// bea: body m1, at (1.2, -1.5) m, facing 0°, trained
const bea = HumanChain.subject("bea")
  .registered("checkPhone", {})
  .act("look", {
      with: "head",
      cue: "seen",
      target: { kind: "person", subject: "ada", region: "face" },
      seconds: 1.2,
    })
  .registered("checkWatch", {})
  .act("walk", { to: { x: 0.55, y: 0, z: 0.4 } })
  .sync({
      of: "door-beckon",
      event: "strokeStart",
      latency: "reaction",
    })
  .registered("shoulderPat", {
      target: { kind: "person", subject: "ada", region: "shoulderLeft" },
    });

const scene = ada.with(bea);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanTravelLeaf.openDoor, HumanEmblem.dontKnow, HumanEmblem.comeHere, HumanStance.handsOnHips, HumanHabit.checkPhone, HumanHabit.checkWatch, HumanSocial.shoulderPat];

const props = [
  HumanObject.prop("door", door, doorAt),
];

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "doorway",
  performers: [
    { subject: "ada", body: bodies["f1"]!, at: { x: 0, y: 0, z: -1.2 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "bea", body: bodies["m1"]!, at: { x: 1.2, y: 0, z: -1.5 }, yaw: 0, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  props,
  laws,
};
const performance = new HumanPerformance(input);