import { Matrix4 } from "../math/index.js";
export function retargetPose(input) {
    const output = new Map();
    for (const mapping of input.boneMap) {
        const source = input.sourcePose.get(mapping.source);
        if (!source)
            continue;
        const elements = [...source.elements];
        const scale = mapping.scale ?? 1;
        if (scale !== 1) {
            elements[12] *= scale;
            elements[13] *= scale;
            elements[14] *= scale;
        }
        output.set(mapping.target, new Matrix4(elements));
    }
    return output;
}
//# sourceMappingURL=Retargeting.js.map