Skip to Content

Tourists

Three tourists stroll and stop: one fans herself, raises the camera hanging at her chest and takes a photograph, then waves the others over; one takes a selfie and fans himself; one checks her phone and gives a thumbs up.

The packages refuse this scene today, in their own words on the view below. #3549 fixes it.

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

const camera = archetypes.createDevice({ kind: "camera" });
const cameraAt = { at: { x: 0, y: 0, z: 0 }, yaw: 0 };

// ivy: body f2, at (-1, 0) m, facing 0°, trained
const ivy = HumanChain.subject("ivy")
  .registered("stroll", { to: { x: -1, y: 0, z: 2 } })
  .registered("fanSelf", {})
  .act("pickUp", {
      prop: "camera",
      handle: "grip",
      use: {
        tip: "screen",
        line: "across",
        at: { region: "noseBridge" },
      },
    })
  .registered("photograph", { prop: "camera" })
  .registered("comeHere", { side: "left" });

// jay: body m1, at (0, -0.5) m, facing 0°, trained
const jay = HumanChain.subject("jay")
  .registered("stroll", { to: { x: 0, y: 0, z: 1.6 } })
  .registered("selfie", {})
  .registered("fanSelf", {});

// kit: body f1, at (1, 0) m, facing 0°, trained
const kit = HumanChain.subject("kit")
  .registered("stroll", { to: { x: 1, y: 0, z: 2.2 } })
  .registered("checkPhone", { seconds: 2 })
  .registered("thumbsUp", {});

const scene = ivy.with(jay, kit);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanGait.stroll, HumanHabit.fanSelf, HumanHabit.photograph, HumanEmblem.comeHere, HumanHabit.selfie, HumanHabit.checkPhone, HumanEmblem.thumbsUp];

const props = [
  { ...HumanObject.prop("camera", camera, cameraAt), worn: {
    subject: "ivy",
    bone: "chest",
    offset: {
      position: { x: 0, y: 0, z: 0.14 },
      rotation: { x: 0, y: 0, z: 0, w: 1 },
    },
  } },
];

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "tourists",
  performers: [
    { subject: "ivy", body: bodies["f2"]!, at: { x: -1, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "jay", body: bodies["m1"]!, at: { x: 0, y: 0, z: -0.5 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "kit", body: bodies["f1"]!, at: { x: 1, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  props,
  laws,
};
const performance = new HumanPerformance(input);