Skip to Content

Gymnastics hall

Three gymnasts tumble: cartwheels and handsprings, rolls and a handstand, leaps and saltos.

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, HumanFloorRoll, HumanGymnastics, HumanPerformance, HumanSport, HumanSportThrow, HumanStance } from "@automovie/motions";

// g1: body f1, at (-3, -2) m, facing 90°, trained
const g1 = HumanChain.subject("g1")
  .registered("cartwheelLeft", {})
  .registered("roundOffLeft", {})
  .registered("frontHandspring", {})
  .registered("victory", {})
  .registered("cartwheelRight", {})
  .registered("roundOffRight", {})
  .registered("frontHandspring", {})
  .registered("victory", {});

// g2: body f2, at (-3, 1) m, facing 90°, trained
const g2 = HumanChain.subject("g2")
  .registered("forwardRoll", {})
  .registered("backwardRoll", {})
  .registered("handstand", { seconds: 0.5 })
  .act("stand", { seconds: 0.3 })
  .registered("forwardRoll", {})
  .registered("cartwheelRight", {})
  .registered("victory", {});

// g3: body m1, at (-3, 4) m, facing 90°, trained
const g3 = HumanChain.subject("g3")
  .registered("leap", { to: { x: -1.5, y: 0, z: 4 } })
  .registered("backSalto", { to: { x: -2.2, y: 0, z: 4 } })
  .registered("frontSalto", { to: { x: 0, y: 0, z: 4 } })
  .registered("leap", { to: { x: 1.5, y: 0, z: 4 } })
  .registered("frontSalto", { to: { x: 3.2, y: 0, z: 4 } })
  .registered("backSalto", { to: { x: 2.5, y: 0, z: 4 } })
  .registered("cartwheelRight", {})
  .registered("roundOffRight", {})
  .registered("victory", {});

const scene = g1.with(g2, g3);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanSportThrow.cartwheelLeft, HumanGymnastics.roundOffLeft, HumanGymnastics.frontHandspring, HumanStance.victory, HumanSportThrow.cartwheelRight, HumanGymnastics.roundOffRight, HumanFloorRoll.forwardRoll, HumanFloorRoll.backwardRoll, HumanSport.handstand, HumanSportThrow.leap, HumanSportThrow.backSalto, HumanSportThrow.frontSalto];

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "gymnastics",
  performers: [
    { subject: "g1", body: bodies["f1"]!, at: { x: -3, y: 0, z: -2 }, yaw: 90, proficiency: { level: "trained" } },
    { subject: "g2", body: bodies["f2"]!, at: { x: -3, y: 0, z: 1 }, yaw: 90, proficiency: { level: "trained" } },
    { subject: "g3", body: bodies["m1"]!, at: { x: -3, y: 0, z: 4 }, yaw: 90, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  laws,
};
const performance = new HumanPerformance(input);