Skip to Content

Typing at the counter

A receptionist types a guest's check-in, looking up to nod between entries.

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, HumanGestureRows, HumanManipulate, HumanObject, HumanPerformance } from "@automovie/motions";
import * as archetypes from "@automovie/archetypes";

const counter = archetypes.createTable({ kind: "counter" });
const counterAt = { at: { x: 0, y: 0, z: 0.53 }, yaw: 180 };
const keyboard = archetypes.createKeyboard({ kind: "keyboard" });
const keyboardAt = { at: { x: 0, y: 0.914, z: 0.36 }, yaw: 180 };

// rec: body f1, at (0, 0) m, facing 0°, trained
const rec = HumanChain.subject("rec")
  .registered("type", { prop: "keyboard", text: "good morning" })
  .act("look", {
      target: {
        kind: "point",
        at: { x: 0.3, y: 1.6, z: 1.6 },
        frame: "world",
      },
      cue: "seen",
      seconds: 1,
    })
  .registered("gestureNod", { count: 1 })
  .registered("type", { prop: "keyboard", text: "checking in mr lee" })
  .act("look", {
      target: {
        kind: "point",
        at: { x: 0.3, y: 1.6, z: 1.6 },
        frame: "world",
      },
      seconds: 0.8,
    })
  .registered("gestureNod", { count: 1 })
  .registered("type", { prop: "keyboard", text: "room twelve" })
  .registered("okSign", {});

const scene = rec;

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanManipulate.type, HumanGestureRows.gestureNod, HumanEmblem.okSign];

const props = [
  HumanObject.prop("counter", counter, counterAt),
  HumanObject.prop("keyboard", keyboard, keyboardAt),
];

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

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