@pixi-spine/base
Version:
Base of pixi-spine integration, common files for spine runtimes of different versions
1 lines • 2.84 kB
Source Map (JSON)
{"version":3,"file":"IConstraint.mjs","sources":["../../src/core/IConstraint.ts"],"sourcesContent":["// These enums were moved from PathConstraintData.ts of spine 3.7, 3.8 and 4.0\n\n/** Controls how the first bone is positioned along the path.\n *\n * See [Position mode](http://esotericsoftware.com/spine-path-constraints#Position-mode) in the Spine User Guide.\n * @public\n * */\nexport enum PositionMode {\n Fixed,\n Percent,\n}\n\n/** Controls how bones are rotated, translated, and scaled to match the path.\n *\n * [Rotate mode](http://esotericsoftware.com/spine-path-constraints#Rotate-mod) in the Spine User Guide.\n * @public\n * */\nexport enum RotateMode {\n Tangent,\n Chain,\n ChainScale,\n}\n\n/**\n * @public\n */\nexport interface IConstraintData {\n name: string;\n order: number;\n}\n\n/**\n * @public\n */\nexport interface IIkConstraint {\n data: IIkConstraintData;\n /** -1 | 0 | 1 */\n bendDirection: number;\n compress: boolean;\n stretch: boolean;\n\n /** A percentage (0-1) */\n mix: number;\n}\n\n/**\n * @public\n */\nexport interface IIkConstraintData extends IConstraintData {\n /** -1 | 0 | 1 */\n bendDirection: number;\n compress: boolean;\n stretch: boolean;\n uniform: boolean;\n\n /** A percentage (0-1) */\n mix: number;\n}\n\n/**\n * @public\n */\nexport interface IPathConstraint {\n data: IPathConstraintData;\n position: number;\n spacing: number;\n\n spaces: number[];\n positions: number[];\n world: number[];\n curves: number[];\n lengths: number[];\n segments: number[];\n}\n\n/**\n * @public\n */\nexport interface IPathConstraintData extends IConstraintData {\n positionMode: PositionMode;\n rotateMode: RotateMode;\n offsetRotation: number;\n position: number;\n spacing: number;\n}\n\n/**\n * @public\n */\nexport interface ITransformConstraint {\n data: ITransformConstraintData;\n}\n\n/**\n * @public\n */\nexport interface ITransformConstraintData extends IConstraintData {\n offsetRotation: number;\n offsetX: number;\n offsetY: number;\n offsetScaleX: number;\n offsetScaleY: number;\n offsetShearY: number;\n relative: boolean;\n local: boolean;\n}\n"],"names":["PositionMode","RotateMode"],"mappings":"AAOY,IAAA,YAAA,qBAAAA,aAAL,KAAA;AACH,EAAAA,aAAA,CAAA,aAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA,CAAA;AACA,EAAAA,aAAA,CAAA,aAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAA,CAAA;AAFQ,EAAAA,OAAAA,aAAAA,CAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA,EAAA;AAUA,IAAA,UAAA,qBAAAC,WAAL,KAAA;AACH,EAAAA,WAAA,CAAA,WAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAA,CAAA;AACA,EAAAA,WAAA,CAAA,WAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA,CAAA;AACA,EAAAA,WAAA,CAAA,WAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAA,CAAA;AAHQ,EAAAA,OAAAA,WAAAA,CAAAA;AAAA,CAAA,EAAA,UAAA,IAAA,EAAA;;;;"}