Skip to Content

Snap and flinch

One friend snaps their fingers behind another's ear, who flinches at the very instant of the snap.

The packages refuse this scene today, in their own words on the view below. #3552 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, HumanPerformance, HumanPose } from "@automovie/motions";

// ola: body f1, at (0.4, -0.3) m, facing 0°, trained
const ola = HumanChain.subject("ola")
  .act("stand", { seconds: 0.8 })
  .registered("fingerSnap", {}, "snap");

// pip: body m1, at (0, 0.3) m, facing 0°, trained
const pip = HumanChain.subject("pip")
  .act("stand", { seconds: 0.4 })
  .registered("startle", {
      from: { kind: "person", subject: "ola", region: "handBackRight" },
    })
  .sync({ of: "snap", event: "strokeEnd" });

const scene = ola.with(pip);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanEmblem.fingerSnap, HumanPose.startle];

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "snap-and-flinch",
  performers: [
    { subject: "ola", body: bodies["f1"]!, at: { x: 0.4, y: 0, z: -0.3 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "pip", body: bodies["m1"]!, at: { x: 0, y: 0, z: 0.3 }, yaw: 0, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  laws,
};
const performance = new HumanPerformance(input);