AutoMovie API
    Preparing search index...

    Class HumanChain

    The fluent authoring surface of one person's actions: one typed method per action of the vocabulary, act for the same action by its name, registered for a production's own law by its name, until to cut the last one, sync to time it to another action or a cue, over to perform other actions on it at once (HumanChainCore), and next and with (from AutoMovieChain) to sequence and parallel whole chains, people with people. Its statics start a chain (subject), give registered laws typed methods (extend) and join people in a mutual action (mutual, and pair for a handshake and a handover).

    const a = HumanChain.subject("a").stand({ seconds: 1 }).until({ share: 0.5 }).stand();
    new HumanPerformance({ seed: "film", performers, composition: a.node });

    A chain is immutable; every method returns a new chain. The chain only names actions and their parameters: bodies, places and skill belong to the performance, which plans every action and refuses an undeclared cut with the legal windows.

    The vocabulary methods are inherited in families (travel, posture, the hands, striking, partners and objects, sport), each family a class of this one's ancestry, so every action of HumanActionName is a method here and each takes its law's own parameter type.

    Hierarchy (View Summary)

    Index

    The composition this chain holds; never reassigned.

    subject: string

    The person whose actions this chain appends.

    • Perform other actions over the last appended one, at the same time and on other parts of the body: a wave or a phone during a walk.

      The last action carries the body (its root, its legs and whatever it does not yield); the actions build appends to the empty chain it is given start with it, follow one another, and each takes only the channels it claims. The performance refuses an action that cannot ride a carrier, a carrier that does not yield the channels asked, and two overlays that claim one channel at one time, naming both claims.

      a.walk({ to }).over((u) => u.handToFace({ task: "phone" }));
      

      Parameters

      Returns this

      The chain.

      When the chain ends in no action, or in one already synced (put the overlays on it before syncing it).

    • Append an action a production registered with the performance (HumanPerformance.IInput.laws), by the name its law carries. The parameters are the registered law's own and are not checked here; HumanChain.extend gives the same action a typed method, which is the way to call it from code that knows the law.

      Parameters

      • name: string

        The registered law's name.

      • params: object = {}

        Its parameters.

      • Optionalanchor: string

        A stable id another chain can align to or cut on.

      Returns this

      The chain.

    • Time the last appended action to an instant of another action or of a cue track, as BML's synchronisation constraints do: one of its own instants (align, its start when absent) falls on the instant named (of and event), offset seconds later.

      The action starts as early as that needs. Where its performer's previous action still runs then, that action is cut there, which its cancel table must allow; an action that would have to start before its performer's previous one, or before the film, is refused with the earliest instant it can meet. What follows in the chain starts when the synced action ends. Cut the action (until) and put overlays on it (over) before syncing it.

      a.stand().gesture({ kind: "beat" }).sync({ of: "dialogue", event: "accent", index: 2, align: "strokeEnd" });
      b.stand().flinch().sync({ of: "strike", event: "contact" });

      Parameters

      • sync: ISync

        The instant to meet and which instant of the action meets it.

      Returns this

      The chain.

      When the chain ends in no action, or in one already synced (an action meets one instant).

    • Cut the last appended action: at a share, at one of its events, at another action's event, or when a region comes near a target.

      Parameters

      • until: NonNullable<
            | { share: number }
            | { event: string }
            | { event: string; index?: number; of: string }
            | {
                proximity: {
                    distance: number;
                    effector: AutoMovieHumanoidRegion;
                    target: IAutoMovieMotionTarget;
                };
            }
            | undefined,
        >

        The cut.

      Returns this

      The chain.

      When the chain ends in no action, or in one already synced (cut it before syncing it).

    • The chain with a typed method for each law a production registers: the production's own actions are appended exactly like the vocabulary's.

      const Chain = HumanChain.extend({ salute });
      Chain.subject("a").walk({ to }).salute({ hold: 1.5 }).stand();
      new HumanPerformance({ seed, performers, laws: [salute], composition });

      Type Parameters

      Parameters

      • laws: Laws

        The registered laws, each under the name it carries.

      Returns IExtension<Laws>

      What starts a chain of the extended kind.

      When a key differs from its law's name, or names something the chain already has.

    • Join people's chains in a mutual action: one thing they do together, such as a handshake, a handover or a lift.

      Every chain of the cast plays first, side by side, and then every role performs its part of the mutual action at once, so each person's earlier actions are placed before any role plans the meeting. HumanMutual holds the vocabulary's mutual actions; a production states its own as an IHumanMutual over its registered laws.

      HumanChain.mutual(HumanMutual.handOver, { giver: a, receiver: b }, { prop: "cup", handle: "body" });
      

      Type Parameters

      • Params extends object
      • Role extends string

      Parameters

      Returns IAutoMovieChain

      The joined composition.

      When one person is cast in two roles.