Skip to Content

Dojo

A teacher and two students bow in, hold a horse stance, punch, push and bow out.

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, HumanPerformance } from "@automovie/motions";

// sensei: body m2, at (0, 2.2) m, facing 180°, elite
const sensei = HumanChain.subject("sensei")
  .act("gesture", { kind: "bow" })
  .act("martialArt", { kind: "horseStance", seconds: 1 })
  .act("martialArt", { kind: "chokuZuki", count: 3 })
  .act("martialArt", { kind: "taiChiPush", manner: { pace: 2.1 } })
  .act("gesture", { kind: "bow" });

// student: body f1, at (-0.9, 0) m, facing 0°, amateur
const student = HumanChain.subject("student")
  .act("gesture", { kind: "bow" })
  .act("martialArt", { kind: "horseStance", seconds: 1 })
  .act("martialArt", { kind: "chokuZuki", count: 3 })
  .act("martialArt", { kind: "taiChiPush", manner: { pace: 2.1 } })
  .act("gesture", { kind: "bow" });

// beginner: body m1, at (0.9, 0) m, facing 0°, novice
const beginner = HumanChain.subject("beginner")
  .act("gesture", { kind: "bow" })
  .act("martialArt", { kind: "horseStance", seconds: 1 })
  .act("martialArt", { kind: "chokuZuki", count: 3 })
  .act("martialArt", { kind: "taiChiPush", manner: { pace: 2.1 } })
  .act("gesture", { kind: "bow" });

const scene = sensei.with(student, beginner);

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "dojo",
  performers: [
    { subject: "sensei", body: bodies["m2"]!, at: { x: 0, y: 0, z: 2.2 }, yaw: 180, proficiency: { level: "elite" } },
    { subject: "student", body: bodies["f1"]!, at: { x: -0.9, y: 0, z: 0 }, yaw: 0, proficiency: { level: "amateur" } },
    { subject: "beginner", body: bodies["m1"]!, at: { x: 0.9, y: 0, z: 0 }, yaw: 0, proficiency: { level: "novice" } },
  ],
  composition: scene.node,
};
const performance = new HumanPerformance(input);