{"version":3,"file":"IkConstraintData.mjs","sources":["../../src/core/IkConstraintData.ts"],"sourcesContent":["import { ConstraintData } from './ConstraintData';\nimport type { BoneData } from './BoneData';\n\n/** Stores the setup pose for an {@link IkConstraint}.\n * <p>\n * See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide.\n * @public\n * */\nexport class IkConstraintData extends ConstraintData {\n    /** The bones that are constrained by this IK constraint. */\n    bones = new Array<BoneData>();\n\n    /** The bone that is the IK target. */\n    private _target: BoneData | null = null;\n    public set target(boneData: BoneData) {\n        this._target = boneData;\n    }\n    public get target() {\n        if (!this._target) throw new Error('BoneData not set.');\n        else return this._target;\n    }\n\n    /** Controls the bend direction of the IK bones, either 1 or -1. */\n    bendDirection = 1;\n\n    /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */\n    compress = false;\n\n    /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained\n     * and the parent bone has local nonuniform scale, stretch is not applied. */\n    stretch = false;\n\n    /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone\n     * is scaled on both the X and Y axes. */\n    uniform = false;\n\n    /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */\n    mix = 1;\n\n    /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */\n    softness = 0;\n\n    constructor(name: string) {\n        super(name, 0, false);\n    }\n}\n"],"names":[],"mappings":";;AAQO,MAAM,yBAAyB,cAAe,CAAA;AAAA,EAkCjD,YAAY,IAAc,EAAA;AACtB,IAAM,KAAA,CAAA,IAAA,EAAM,GAAG,KAAK,CAAA,CAAA;AAjCxB;AAAA,IAAA,IAAA,CAAA,KAAA,GAAQ,IAAI,KAAgB,EAAA,CAAA;AAG5B;AAAA,IAAA,IAAA,CAAQ,OAA2B,GAAA,IAAA,CAAA;AAUnC;AAAA,IAAgB,IAAA,CAAA,aAAA,GAAA,CAAA,CAAA;AAGhB;AAAA,IAAW,IAAA,CAAA,QAAA,GAAA,KAAA,CAAA;AAIX;AAAA;AAAA,IAAU,IAAA,CAAA,OAAA,GAAA,KAAA,CAAA;AAIV;AAAA;AAAA,IAAU,IAAA,CAAA,OAAA,GAAA,KAAA,CAAA;AAGV;AAAA,IAAM,IAAA,CAAA,GAAA,GAAA,CAAA,CAAA;AAGN;AAAA,IAAW,IAAA,CAAA,QAAA,GAAA,CAAA,CAAA;AAAA,GAIX;AAAA,EA9BA,IAAW,OAAO,QAAoB,EAAA;AAClC,IAAA,IAAA,CAAK,OAAU,GAAA,QAAA,CAAA;AAAA,GACnB;AAAA,EACA,IAAW,MAAS,GAAA;AAChB,IAAA,IAAI,CAAC,IAAK,CAAA,OAAA;AAAS,MAAM,MAAA,IAAI,MAAM,mBAAmB,CAAA,CAAA;AAAA;AACjD,MAAA,OAAO,IAAK,CAAA,OAAA,CAAA;AAAA,GACrB;AAyBJ;;;;"}