AutoMovie API
    Preparing search index...

    Variable skinAutoMovieMeshConst

    skinAutoMovieMesh: (
        mesh: IAutoMovieMesh,
        rest: readonly IAutoMovieResolvedBone[],
        posed: readonly IAutoMovieResolvedBone[],
        morphWeights?: ReadonlyMap<string, number>,
    ) => number[] = ...

    Skin a mesh's vertices from its rest pose into a resolved pose, by the method its skin declares, with the formula the viewer's shader draws.

    Each joint j moves its vertices by the rigid transform C_j = P_j R_j^-1, where R_j is its rest frame and P_j its posed frame. "linear" (also an omitted method) returns sum(w_k C_k v) / sum(w_k), the matrix blend that THREE.SkinnedMesh computes after normalizing the weights. "dual-quaternion" turns each C_j into a unit dual quaternion, negates any whose rotation lies in the other hemisphere from the vertex's largest-weight joint (the lowest slot on a tie), sums them by weight, divides by the length of the rotation part and applies that rigid transform (Kavan et al. 2008).

    Positions are read in the frame the rest bones are expressed in: model space for resolvePose output, so a part with a transform has it applied to the positions first. Both methods commute with a rigid or uniformly scaled part transform, which is why the viewer can skin in the part's own frame. The result is in the posed bones' frame, so passing bones resolved with a pose root places the vertices by that root as well.

    Morph targets named in morphWeights displace the rest positions first, p + sum(w_t * positions_t), as the viewer applies relative morph targets before skinning; a name the mesh does not carry is ignored, as an expression ignores a channel a mesh lacks.

    Throws when the mesh has no skin or a skin joint is missing from either bone list.

    Type Declaration

      • (
            mesh: IAutoMovieMesh,
            rest: readonly IAutoMovieResolvedBone[],
            posed: readonly IAutoMovieResolvedBone[],
            morphWeights?: ReadonlyMap<string, number>,
        ): number[]
      • Parameters

        • mesh: IAutoMovieMesh

          Admitted mesh with a skin.

        • rest: readonly IAutoMovieResolvedBone[]

          Bones at rest, such as resolvePose of a pose with no joints and a null root.

        • posed: readonly IAutoMovieResolvedBone[]

          Bones in the pose to skin into, from resolvePose.

        • OptionalmorphWeights: ReadonlyMap<string, number>

          Target weights by name, such as resolveMorphTargetWeights output merged with expression weights; omitted, no target displaces the mesh.

        Returns number[]

        Flat skinned positions [x,y,z,...] in metres, aligned with mesh.positions.