AutoMovie API
    Preparing search index...

    Class ArchetypeAssembly<M>

    Several archetypes as one placed and ridden object: a chariot of a platform, wheels and a pole, a railway carriage of a floor, seats, bars and doors, a limbered gun.

    An assembly is an Archetype of its members, each placed in the assembly's space and named by a key. Its parts, affordances and spans are the members', their ids prefixed <key>/, so a seat inside it is named as bench2/seat; its materials are the union of theirs; its mass properties are theirs combined. It goes wherever an archetype goes: a ride moves it along a course, a prop or a seat of a performance reads its affordances, and it serialises as one model. Its articulate takes prefixed ids, and an articulation follows one of another member only through the assembly's own couplings (couple), so no member's own model is changed. member(key) gives a member as it is posed in the assembly, with the member's own typed accessors.

    An assembly is composed in a production's own source: it adds no dimension of its own and is not a producer, so no finished set enters the package. The same members, placements and seeds give the same assembly.

    Type Parameters

    Hierarchy (View Summary)

    Index
    affordances: IAutoMovieAffordance[]

    The contacts at the current articulation state.

    asset: null

    Always null: no binary payload backs an archetype.

    Rest mass, centre and contact coefficients, or null for a visual-only model.

    id: string

    Model id, unique in a scene; the producer's id parameter or its own name.

    materials: IAutoMovieMaterial[]

    The few flat materials the parts cite.

    name: string | null

    Readable name of the thing, such as dining chair.

    origin: "generated" = ...

    Always generated: the geometry is fully described by parts.

    The actual primitive or convex-cell parts at the current articulation state.

    skeleton: null

    Always null: an archetype is a rigid or articulated object, never a humanoid rig.

    • get dimensions(): Readonly<Partial<Record<Dimension, number>>>

      The value of each free dimension this variant has, in the unit of its band: drawn from the seed, or fixed by a parameter. A dimension the variant lacks, as a stool lacks a back height, is absent.

      Returns Readonly<Partial<Record<Dimension, number>>>

    • get state(): Partial<Record<Id, number>>

      The travel of each articulation that was set, by id; a follower's is read through travel.

      Returns Partial<Record<Id, number>>

    • This assembly with an articulation of one member following an articulation of another, as the members' own follows would within one member: a chariot's wheel turning with its pole, a gun's elevation with a limber's crank.

      Parameters

      • follower: Ids<M>

        The follower's prefixed id; it must not already follow, by its member's own declaration or an earlier coupling.

      • follows: IAutoMovieAffordanceCoupling & { id: Ids<M> }

        Its rule, with the leader's prefixed id.

      Returns ArchetypeAssembly<M>

      A new assembly at the same state; this one is unchanged.

      When the follower is no articulation of the assembly, already follows, or the coupling makes a chain of leaders return to itself or takes the follower outside its range at the current state, as the articulation pose refuses.

    • The friction between a part and a material, as a measured pair gives it.

      Parameters

      • part: string

        The part's id.

      • against: Material

        The other surface's material: a hand's, a floor's, another part's.

      Returns IFriction

      The pair's static and kinetic coefficients and their source.

      When the part declares no surface, listing the parts that do, or no source measured the pair.

    • An articulation's travel at this state: the travel set for a leader, 0 for one not set, and the travel its leader gives a follower.

      Parameters

      • id: Ids

        The articulation's id.

      Returns number

      The travel, degrees for the turning kinds and metres for the others.

      When the id is no articulation of the archetype, listing those it has.

    • An assembly of placed members.

      Type Parameters

      Parameters

      • id: string

        The model's id, unique in a scene.

      • name: string

        Its readable name, such as railway carriage.

      • members: M

        The members by key, each an archetype and its placement in the assembly's space with unit scale; a member's own articulation state is kept.

      Returns ArchetypeAssembly<M>

      The assembly.

      When there is no member, a key is empty or contains /, or a placement is not rigid with unit scale.