Skip to Content

At the entry gate

An attendant lets two visitors through a turnstile, halting the second before beckoning.

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

const control = archetypes.createSwitch({ height: 1.065, travel: 0.003, kind: "button" });
const controlAt = { at: { x: 0, y: 0, z: 0.35 }, yaw: 180 };
const turnstile = archetypes.createGate({ kind: "turnstile" });
const turnstileAt = { at: { x: 1, y: 0, z: 0.35 }, yaw: 0 };

// attendant: body f1, at (0, 0) m, facing 0°, trained
const attendant = HumanChain.subject("attendant")
  .act("look", {
      target: {
        kind: "point",
        at: { x: 1.4, y: 1.6, z: 2.5 },
        frame: "world",
      },
      cue: "seen",
      seconds: 1,
    })
  .registered("gestureBeckon", { side: "left" })
  .registered("openGate", {
      mechanism: {
        kind: "button",
        at: { kind: "prop", subject: "control", point: "press" },
        travel: 0.001,
      },
    })
  .registered("pointAt", {
      target: {
        kind: "point",
        at: { x: 1, y: 1, z: 0.35 },
        frame: "world",
        normal: { x: -1, y: 0, z: 0 },
      },
      side: "left",
    })
  .registered("gestureNod", { count: 1 })
  .registered("gestureStopPalm", { side: "left", hold: 0.4 })
  .registered("gestureBeckon", { side: "left" })
  .registered("openGate", {
      mechanism: {
        kind: "button",
        at: { kind: "prop", subject: "control", point: "press" },
        travel: 0.001,
      },
    })
  .registered("gestureWave", { side: "left", count: 1 });

const scene = attendant;

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanGestureRows.gestureBeckon, HumanRevolver.openGate, HumanUpperRows.pointAt, HumanGestureRows.gestureNod, HumanGestureRows.gestureStopPalm, HumanGestureRows.gestureWave];

const props = [
  HumanObject.prop("control", control, controlAt),
  HumanObject.prop("turnstile", turnstile, turnstileAt),
];

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "entry-gate",
  performers: [
    { subject: "attendant", 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);