diff --git a/bin/pixi-spine.d.ts b/bin/pixi-spine.d.ts index 51a52ea9..0899194f 100644 --- a/bin/pixi-spine.d.ts +++ b/bin/pixi-spine.d.ts @@ -1,1388 +1,1388 @@ -/// -declare module PIXI.spine.core { - class Animation { - name: string; - timelines: Array; - duration: number; - constructor(name: string, timelines: Array, duration: number); - apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - static binarySearch(values: ArrayLike, target: number, step?: number): number; - static linearSearch(values: ArrayLike, target: number, step: number): number; - } - interface Timeline { - apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - getPropertyId(): number; - } - enum MixBlend { - setup = 0, - first = 1, - replace = 2, - add = 3 - } - enum MixDirection { - mixIn = 0, - mixOut = 1 - } - enum TimelineType { - rotate = 0, - translate = 1, - scale = 2, - shear = 3, - attachment = 4, - color = 5, - deform = 6, - event = 7, - drawOrder = 8, - ikConstraint = 9, - transformConstraint = 10, - pathConstraintPosition = 11, - pathConstraintSpacing = 12, - pathConstraintMix = 13, - twoColor = 14 - } - abstract class CurveTimeline implements Timeline { - static LINEAR: number; - static STEPPED: number; - static BEZIER: number; - static BEZIER_SIZE: number; - private curves; - abstract getPropertyId(): number; - constructor(frameCount: number); - getFrameCount(): number; - setLinear(frameIndex: number): void; - setStepped(frameIndex: number): void; - getCurveType(frameIndex: number): number; - setCurve(frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void; - getCurvePercent(frameIndex: number, percent: number): number; - abstract apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class RotateTimeline extends CurveTimeline { - static ENTRIES: number; - static PREV_TIME: number; - static PREV_ROTATION: number; - static ROTATION: number; - boneIndex: number; - frames: ArrayLike; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, degrees: number): void; - apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class TranslateTimeline extends CurveTimeline { - static ENTRIES: number; - static PREV_TIME: number; - static PREV_X: number; - static PREV_Y: number; - static X: number; - static Y: number; - boneIndex: number; - frames: ArrayLike; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, x: number, y: number): void; - apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class ScaleTimeline extends TranslateTimeline { - constructor(frameCount: number); - getPropertyId(): number; - apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class ShearTimeline extends TranslateTimeline { - constructor(frameCount: number); - getPropertyId(): number; - apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class ColorTimeline extends CurveTimeline { - static ENTRIES: number; - static PREV_TIME: number; - static PREV_R: number; - static PREV_G: number; - static PREV_B: number; - static PREV_A: number; - static R: number; - static G: number; - static B: number; - static A: number; - slotIndex: number; - frames: ArrayLike; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number): void; - apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class TwoColorTimeline extends CurveTimeline { - static ENTRIES: number; - static PREV_TIME: number; - static PREV_R: number; - static PREV_G: number; - static PREV_B: number; - static PREV_A: number; - static PREV_R2: number; - static PREV_G2: number; - static PREV_B2: number; - static R: number; - static G: number; - static B: number; - static A: number; - static R2: number; - static G2: number; - static B2: number; - slotIndex: number; - frames: ArrayLike; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number): void; - apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class AttachmentTimeline implements Timeline { - slotIndex: number; - frames: ArrayLike; - attachmentNames: Array; - constructor(frameCount: number); - getPropertyId(): number; - getFrameCount(): number; - setFrame(frameIndex: number, time: number, attachmentName: string): void; - apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class DeformTimeline extends CurveTimeline { - slotIndex: number; - attachment: VertexAttachment; - frames: ArrayLike; - frameVertices: Array>; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, vertices: ArrayLike): void; - apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class EventTimeline implements Timeline { - frames: ArrayLike; - events: Array; - constructor(frameCount: number); - getPropertyId(): number; - getFrameCount(): number; - setFrame(frameIndex: number, event: Event): void; - apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class DrawOrderTimeline implements Timeline { - frames: ArrayLike; - drawOrders: Array>; - constructor(frameCount: number); - getPropertyId(): number; - getFrameCount(): number; - setFrame(frameIndex: number, time: number, drawOrder: Array): void; - apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class IkConstraintTimeline extends CurveTimeline { - static ENTRIES: number; - static PREV_TIME: number; - static PREV_MIX: number; - static PREV_SOFTNESS: number; - static PREV_BEND_DIRECTION: number; - static PREV_COMPRESS: number; - static PREV_STRETCH: number; - static MIX: number; - static SOFTNESS: number; - static BEND_DIRECTION: number; - static COMPRESS: number; - static STRETCH: number; - ikConstraintIndex: number; - frames: ArrayLike; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, mix: number, softness: number, bendDirection: number, compress: boolean, stretch: boolean): void; - apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class TransformConstraintTimeline extends CurveTimeline { - static ENTRIES: number; - static PREV_TIME: number; - static PREV_ROTATE: number; - static PREV_TRANSLATE: number; - static PREV_SCALE: number; - static PREV_SHEAR: number; - static ROTATE: number; - static TRANSLATE: number; - static SCALE: number; - static SHEAR: number; - transformConstraintIndex: number; - frames: ArrayLike; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number): void; - apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class PathConstraintPositionTimeline extends CurveTimeline { - static ENTRIES: number; - static PREV_TIME: number; - static PREV_VALUE: number; - static VALUE: number; - pathConstraintIndex: number; - frames: ArrayLike; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, value: number): void; - apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { - constructor(frameCount: number); - getPropertyId(): number; - apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } - class PathConstraintMixTimeline extends CurveTimeline { - static ENTRIES: number; - static PREV_TIME: number; - static PREV_ROTATE: number; - static PREV_TRANSLATE: number; - static ROTATE: number; - static TRANSLATE: number; - pathConstraintIndex: number; - frames: ArrayLike; - constructor(frameCount: number); - getPropertyId(): number; - setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number): void; - apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; - } -} -declare module PIXI.spine.core { - class AnimationState { - static emptyAnimation: Animation; - static SUBSEQUENT: number; - static FIRST: number; - static HOLD: number; - static HOLD_MIX: number; - static NOT_LAST: number; - data: AnimationStateData; - tracks: TrackEntry[]; - events: Event[]; - listeners: AnimationStateListener2[]; - queue: EventQueue; - propertyIDs: IntSet; - animationsChanged: boolean; - timeScale: number; - trackEntryPool: Pool; - constructor(data: AnimationStateData); - update(delta: number): void; - updateMixingFrom(to: TrackEntry, delta: number): boolean; - apply(skeleton: Skeleton): boolean; - applyMixingFrom(to: TrackEntry, skeleton: Skeleton, blend: MixBlend): number; - applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array, i: number, firstFrame: boolean): void; - queueEvents(entry: TrackEntry, animationTime: number): void; - clearTracks(): void; - clearTrack(trackIndex: number): void; - setCurrent(index: number, current: TrackEntry, interrupt: boolean): void; - setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry; - setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry; - addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): TrackEntry; - addAnimationWith(trackIndex: number, animation: Animation, loop: boolean, delay: number): TrackEntry; - setEmptyAnimation(trackIndex: number, mixDuration: number): TrackEntry; - addEmptyAnimation(trackIndex: number, mixDuration: number, delay: number): TrackEntry; - setEmptyAnimations(mixDuration: number): void; - expandToIndex(index: number): TrackEntry; - trackEntry(trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry): TrackEntry; - disposeNext(entry: TrackEntry): void; - _animationsChanged(): void; - computeHold(entry: TrackEntry): void; - computeNotLast(entry: TrackEntry): void; - hasTimeline(entry: TrackEntry, id: number): boolean; - getCurrent(trackIndex: number): TrackEntry; - addListener(listener: AnimationStateListener2): void; - removeListener(listener: AnimationStateListener2): void; - clearListeners(): void; - clearListenerNotifications(): void; - onComplete: (trackIndex: number, loopCount: number) => any; - onEvent: (trackIndex: number, event: Event) => any; - onStart: (trackIndex: number) => any; - onEnd: (trackIndex: number) => any; - private static deprecatedWarning1; - setAnimationByName(trackIndex: number, animationName: string, loop: boolean): void; - private static deprecatedWarning2; - addAnimationByName(trackIndex: number, animationName: string, loop: boolean, delay: number): void; - private static deprecatedWarning3; - hasAnimation(animationName: string): boolean; - hasAnimationByName(animationName: string): boolean; - } - class TrackEntry { - animation: Animation; - next: TrackEntry; - mixingFrom: TrackEntry; - mixingTo: TrackEntry; - listener: AnimationStateListener2; - trackIndex: number; - loop: boolean; - holdPrevious: boolean; - eventThreshold: number; - attachmentThreshold: number; - drawOrderThreshold: number; - animationStart: number; - animationEnd: number; - animationLast: number; - nextAnimationLast: number; - delay: number; - trackTime: number; - trackLast: number; - nextTrackLast: number; - trackEnd: number; - timeScale: number; - alpha: number; - mixTime: number; - mixDuration: number; - interruptAlpha: number; - totalAlpha: number; - mixBlend: MixBlend; - timelineMode: number[]; - timelineHoldMix: TrackEntry[]; - timelinesRotation: number[]; - reset(): void; - getAnimationTime(): number; - setAnimationLast(animationLast: number): void; - isComplete(): boolean; - resetRotationDirections(): void; - onComplete: (trackIndex: number, loopCount: number) => any; - onEvent: (trackIndex: number, event: Event) => any; - onStart: (trackIndex: number) => any; - onEnd: (trackIndex: number) => any; - private static deprecatedWarning1; - private static deprecatedWarning2; - time: number; - endTime: number; - loopsCount(): number; - } - class EventQueue { - objects: Array; - drainDisabled: boolean; - animState: AnimationState; - constructor(animState: AnimationState); - start(entry: TrackEntry): void; - interrupt(entry: TrackEntry): void; - end(entry: TrackEntry): void; - dispose(entry: TrackEntry): void; - complete(entry: TrackEntry): void; - event(entry: TrackEntry, event: Event): void; - private static deprecatedWarning1; - deprecateStuff(): boolean; - drain(): void; - clear(): void; - } - enum EventType { - start = 0, - interrupt = 1, - end = 2, - dispose = 3, - complete = 4, - event = 5 - } - interface AnimationStateListener2 { - start?(entry: TrackEntry): void; - interrupt?(entry: TrackEntry): void; - end?(entry: TrackEntry): void; - dispose?(entry: TrackEntry): void; - complete?(entry: TrackEntry): void; - event?(entry: TrackEntry, event: Event): void; - } - abstract class AnimationStateAdapter2 implements AnimationStateListener2 { - start(entry: TrackEntry): void; - interrupt(entry: TrackEntry): void; - end(entry: TrackEntry): void; - dispose(entry: TrackEntry): void; - complete(entry: TrackEntry): void; - event(entry: TrackEntry, event: Event): void; - } -} -declare module PIXI.spine.core { - class AnimationStateData { - skeletonData: SkeletonData; - animationToMixTime: Map; - defaultMix: number; - constructor(skeletonData: SkeletonData); - setMix(fromName: string, toName: string, duration: number): void; - private static deprecatedWarning1; - setMixByName(fromName: string, toName: string, duration: number): void; - setMixWith(from: Animation, to: Animation, duration: number): void; - getMix(from: Animation, to: Animation): number; - } -} -declare module PIXI.spine.core { - class AtlasAttachmentLoader implements AttachmentLoader { - atlas: TextureAtlas; - constructor(atlas: TextureAtlas); - newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; - newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; - newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; - newPathAttachment(skin: Skin, name: string): PathAttachment; - newPointAttachment(skin: Skin, name: string): PointAttachment; - newClippingAttachment(skin: Skin, name: string): ClippingAttachment; - } -} -declare module PIXI.spine.core { - abstract class Attachment { - name: string; - constructor(name: string); - abstract copy(): Attachment; - } - abstract class VertexAttachment extends Attachment { - private static nextID; - id: number; - bones: Array; - vertices: ArrayLike; - worldVerticesLength: number; - deformAttachment: VertexAttachment; - constructor(name: string); - computeWorldVerticesOld(slot: Slot, worldVertices: ArrayLike): void; - computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number, stride: number): void; - copyTo(attachment: VertexAttachment): void; - } -} -declare module PIXI.spine.core { - interface AttachmentLoader { - newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; - newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; - newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; - newPathAttachment(skin: Skin, name: string): PathAttachment; - newPointAttachment(skin: Skin, name: string): PointAttachment; - newClippingAttachment(skin: Skin, name: string): ClippingAttachment; - } -} -declare module PIXI.spine.core { - enum AttachmentType { - Region = 0, - BoundingBox = 1, - Mesh = 2, - LinkedMesh = 3, - Path = 4, - Point = 5, - Clipping = 6 - } -} -declare module PIXI.spine.core { - class BoundingBoxAttachment extends VertexAttachment { - color: Color; - constructor(name: string); - copy(): Attachment; - } -} -declare module PIXI.spine.core { - class ClippingAttachment extends VertexAttachment { - endSlot: SlotData; - color: Color; - constructor(name: string); - copy(): Attachment; - } -} -declare module PIXI.spine.core { - class MeshAttachment extends VertexAttachment { - region: TextureRegion; - path: string; - regionUVs: Float32Array; - uvs: ArrayLike; - triangles: Array; - color: Color; - width: number; - height: number; - hullLength: number; - edges: Array; - private parentMesh; - tempColor: Color; - constructor(name: string); - updateUVs(region: TextureRegion, uvs: ArrayLike): ArrayLike; - getParentMesh(): MeshAttachment; - setParentMesh(parentMesh: MeshAttachment): void; - copy(): Attachment; - newLinkedMesh(): MeshAttachment; - } -} -declare module PIXI.spine.core { - class PathAttachment extends VertexAttachment { - lengths: Array; - closed: boolean; - constantSpeed: boolean; - color: Color; - constructor(name: string); - copy(): Attachment; - } -} -declare module PIXI.spine.core { - class PointAttachment extends VertexAttachment { - x: number; - y: number; - rotation: number; - color: Color; - constructor(name: string); - computeWorldPosition(bone: Bone, point: Vector2): Vector2; - computeWorldRotation(bone: Bone): number; - copy(): Attachment; - } -} -declare module PIXI.spine.core { - class RegionAttachment extends Attachment { - static OX1: number; - static OY1: number; - static OX2: number; - static OY2: number; - static OX3: number; - static OY3: number; - static OX4: number; - static OY4: number; - static X1: number; - static Y1: number; - static C1R: number; - static C1G: number; - static C1B: number; - static C1A: number; - static U1: number; - static V1: number; - static X2: number; - static Y2: number; - static C2R: number; - static C2G: number; - static C2B: number; - static C2A: number; - static U2: number; - static V2: number; - static X3: number; - static Y3: number; - static C3R: number; - static C3G: number; - static C3B: number; - static C3A: number; - static U3: number; - static V3: number; - static X4: number; - static Y4: number; - static C4R: number; - static C4G: number; - static C4B: number; - static C4A: number; - static U4: number; - static V4: number; - x: number; - y: number; - scaleX: number; - scaleY: number; - rotation: number; - width: number; - height: number; - color: Color; - path: string; - rendererObject: any; - region: TextureRegion; - offset: ArrayLike; - uvs: ArrayLike; - tempColor: Color; - constructor(name: string); - updateOffset(): void; - setRegion(region: TextureRegion): void; - computeWorldVertices(bone: Bone, worldVertices: ArrayLike, offset: number, stride: number): void; - copy(): Attachment; - } -} -declare module PIXI.spine.core { - enum BlendMode { - Normal = 0, - Additive = 1, - Multiply = 2, - Screen = 3 - } -} -declare module PIXI.spine.core { - class Bone implements Updatable { - static yDown: boolean; - matrix: PIXI.Matrix; - readonly worldX: number; - readonly worldY: number; - data: BoneData; - skeleton: Skeleton; - parent: Bone; - children: Bone[]; - x: number; - y: number; - rotation: number; - scaleX: number; - scaleY: number; - shearX: number; - shearY: number; - ax: number; - ay: number; - arotation: number; - ascaleX: number; - ascaleY: number; - ashearX: number; - ashearY: number; - appliedValid: boolean; - sorted: boolean; - active: boolean; - constructor(data: BoneData, skeleton: Skeleton, parent: Bone); - isActive(): boolean; - update(): void; - updateWorldTransform(): void; - updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number): void; - setToSetupPose(): void; - getWorldRotationX(): number; - getWorldRotationY(): number; - getWorldScaleX(): number; - getWorldScaleY(): number; - updateAppliedTransform(): void; - worldToLocal(world: Vector2): Vector2; - localToWorld(local: Vector2): Vector2; - worldToLocalRotation(worldRotation: number): number; - localToWorldRotation(localRotation: number): number; - rotateWorld(degrees: number): void; - } -} -declare module PIXI.spine.core { - class BoneData { - index: number; - name: string; - parent: BoneData; - length: number; - x: number; - y: number; - rotation: number; - scaleX: number; - scaleY: number; - shearX: number; - shearY: number; - transformMode: TransformMode; - skinRequired: boolean; - color: Color; - constructor(index: number, name: string, parent: BoneData); - } - enum TransformMode { - Normal = 0, - OnlyTranslation = 1, - NoRotationOrReflection = 2, - NoScale = 3, - NoScaleOrReflection = 4 - } -} -declare module PIXI.spine.core { - abstract class ConstraintData { - name: string; - order: number; - skinRequired: boolean; - constructor(name: string, order: number, skinRequired: boolean); - } -} -declare module PIXI.spine.core { - class Event { - data: EventData; - intValue: number; - floatValue: number; - stringValue: string; - time: number; - volume: number; - balance: number; - constructor(time: number, data: EventData); - } -} -declare module PIXI.spine.core { - class EventData { - name: string; - intValue: number; - floatValue: number; - stringValue: string; - audioPath: string; - volume: number; - balance: number; - constructor(name: string); - } -} -declare module PIXI.spine.core { - class IkConstraint implements Updatable { - data: IkConstraintData; - bones: Array; - target: Bone; - bendDirection: number; - compress: boolean; - stretch: boolean; - mix: number; - softness: number; - active: boolean; - constructor(data: IkConstraintData, skeleton: Skeleton); - isActive(): boolean; - apply(): void; - update(): void; - apply1(bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number): void; - apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, softness: number, alpha: number): void; - } -} -declare module PIXI.spine.core { - class IkConstraintData extends ConstraintData { - bones: BoneData[]; - target: BoneData; - bendDirection: number; - compress: boolean; - stretch: boolean; - uniform: boolean; - mix: number; - softness: number; - constructor(name: string); - } -} -declare module PIXI.spine.core { - class PathConstraint implements Updatable { - static NONE: number; - static BEFORE: number; - static AFTER: number; - static epsilon: number; - data: PathConstraintData; - bones: Array; - target: Slot; - position: number; - spacing: number; - rotateMix: number; - translateMix: number; - spaces: number[]; - positions: number[]; - world: number[]; - curves: number[]; - lengths: number[]; - segments: number[]; - active: boolean; - constructor(data: PathConstraintData, skeleton: Skeleton); - isActive(): boolean; - apply(): void; - update(): void; - computeWorldPositions(path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean, percentSpacing: boolean): number[]; - addBeforePosition(p: number, temp: Array, i: number, out: Array, o: number): void; - addAfterPosition(p: number, temp: Array, i: number, out: Array, o: number): void; - addCurvePosition(p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, out: Array, o: number, tangents: boolean): void; - } -} -declare module PIXI.spine.core { - class PathConstraintData extends ConstraintData { - bones: BoneData[]; - target: SlotData; - positionMode: PositionMode; - spacingMode: SpacingMode; - rotateMode: RotateMode; - offsetRotation: number; - position: number; - spacing: number; - rotateMix: number; - translateMix: number; - constructor(name: string); - } - enum PositionMode { - Fixed = 0, - Percent = 1 - } - enum SpacingMode { - Length = 0, - Fixed = 1, - Percent = 2 - } - enum RotateMode { - Tangent = 0, - Chain = 1, - ChainScale = 2 - } -} -declare module PIXI.spine.core { - class Skeleton { - data: SkeletonData; - bones: Array; - slots: Array; - drawOrder: Array; - ikConstraints: Array; - transformConstraints: Array; - pathConstraints: Array; - _updateCache: Updatable[]; - updateCacheReset: Updatable[]; - skin: Skin; - color: Color; - time: number; - scaleX: number; - scaleY: number; - x: number; - y: number; - constructor(data: SkeletonData); - updateCache(): void; - sortIkConstraint(constraint: IkConstraint): void; - sortPathConstraint(constraint: PathConstraint): void; - sortTransformConstraint(constraint: TransformConstraint): void; - sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void; - sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void; - sortBone(bone: Bone): void; - sortReset(bones: Array): void; - updateWorldTransform(): void; - setToSetupPose(): void; - setBonesToSetupPose(): void; - setSlotsToSetupPose(): void; - getRootBone(): Bone; - findBone(boneName: string): Bone; - findBoneIndex(boneName: string): number; - findSlot(slotName: string): Slot; - findSlotIndex(slotName: string): number; - setSkinByName(skinName: string): void; - setSkin(newSkin: Skin): void; - getAttachmentByName(slotName: string, attachmentName: string): Attachment; - getAttachment(slotIndex: number, attachmentName: string): Attachment; - setAttachment(slotName: string, attachmentName: string): void; - findIkConstraint(constraintName: string): IkConstraint; - findTransformConstraint(constraintName: string): TransformConstraint; - findPathConstraint(constraintName: string): PathConstraint; - getBounds(offset: Vector2, size: Vector2, temp?: Array): void; - update(delta: number): void; - flipX: boolean; - flipY: boolean; - private static deprecatedWarning1; - } -} -declare module PIXI.spine.core { - class SkeletonBinary { - static AttachmentTypeValues: number[]; - static TransformModeValues: TransformMode[]; - static PositionModeValues: PositionMode[]; - static SpacingModeValues: SpacingMode[]; - static RotateModeValues: RotateMode[]; - static BlendModeValues: BlendMode[]; - static BONE_ROTATE: number; - static BONE_TRANSLATE: number; - static BONE_SCALE: number; - static BONE_SHEAR: number; - static SLOT_ATTACHMENT: number; - static SLOT_COLOR: number; - static SLOT_TWO_COLOR: number; - static PATH_POSITION: number; - static PATH_SPACING: number; - static PATH_MIX: number; - static CURVE_LINEAR: number; - static CURVE_STEPPED: number; - static CURVE_BEZIER: number; - attachmentLoader: AttachmentLoader; - scale: number; - private linkedMeshes; - constructor(attachmentLoader: AttachmentLoader); - readSkeletonData(binary: Uint8Array): SkeletonData; - private readSkin; - private readAttachment; - private readVertices; - private readFloatArray; - private readShortArray; - private readAnimation; - private readCurve; - setCurve(timeline: CurveTimeline, frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void; - } -} -declare module PIXI.spine.core { - class SkeletonBounds { - minX: number; - minY: number; - maxX: number; - maxY: number; - boundingBoxes: BoundingBoxAttachment[]; - polygons: ArrayLike[]; - private polygonPool; - update(skeleton: Skeleton, updateAabb: boolean): void; - aabbCompute(): void; - aabbContainsPoint(x: number, y: number): boolean; - aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean; - aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean; - containsPoint(x: number, y: number): BoundingBoxAttachment; - containsPointPolygon(polygon: ArrayLike, x: number, y: number): boolean; - intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment; - intersectsSegmentPolygon(polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number): boolean; - getPolygon(boundingBox: BoundingBoxAttachment): ArrayLike; - getWidth(): number; - getHeight(): number; - } -} -declare module PIXI.spine.core { - class SkeletonClipping { - private triangulator; - private clippingPolygon; - private clipOutput; - clippedVertices: number[]; - clippedTriangles: number[]; - private scratch; - private clipAttachment; - private clippingPolygons; - clipStart(slot: Slot, clip: ClippingAttachment): number; - clipEndWithSlot(slot: Slot): void; - clipEnd(): void; - isClipping(): boolean; - clipTriangles(vertices: ArrayLike, verticesLength: number, triangles: ArrayLike, trianglesLength: number, uvs: ArrayLike, light: Color, dark: Color, twoColor: boolean): void; - clip(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array, output: Array): boolean; - static makeClockwise(polygon: ArrayLike): void; - } -} -declare module PIXI.spine.core { - class SkeletonData { - name: string; - bones: BoneData[]; - slots: SlotData[]; - skins: Skin[]; - defaultSkin: Skin; - events: EventData[]; - animations: Animation[]; - ikConstraints: IkConstraintData[]; - transformConstraints: TransformConstraintData[]; - pathConstraints: PathConstraintData[]; - x: number; - y: number; - width: number; - height: number; - version: string; - hash: string; - fps: number; - imagesPath: string; - audioPath: string; - findBone(boneName: string): BoneData; - findBoneIndex(boneName: string): number; - findSlot(slotName: string): SlotData; - findSlotIndex(slotName: string): number; - findSkin(skinName: string): Skin; - findEvent(eventDataName: string): EventData; - findAnimation(animationName: string): Animation; - findIkConstraint(constraintName: string): IkConstraintData; - findTransformConstraint(constraintName: string): TransformConstraintData; - findPathConstraint(constraintName: string): PathConstraintData; - findPathConstraintIndex(pathConstraintName: string): number; - } -} -declare module PIXI.spine.core { - class SkeletonJson { - attachmentLoader: AttachmentLoader; - scale: number; - private linkedMeshes; - constructor(attachmentLoader: AttachmentLoader); - readSkeletonData(json: string | any): SkeletonData; - readAttachment(map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment; - readVertices(map: any, attachment: VertexAttachment, verticesLength: number): void; - readAnimation(map: any, name: string, skeletonData: SkeletonData): void; - readCurve(map: any, timeline: CurveTimeline, frameIndex: number): void; - getValue(map: any, prop: string, defaultValue: any): any; - static blendModeFromString(str: string): BlendMode; - static positionModeFromString(str: string): PositionMode; - static spacingModeFromString(str: string): SpacingMode; - static rotateModeFromString(str: string): RotateMode; - static transformModeFromString(str: string): TransformMode; - } -} -declare module PIXI.spine.core { - class SkinEntry { - slotIndex: number; - name: string; - attachment: Attachment; - constructor(slotIndex: number, name: string, attachment: Attachment); - } - class Skin { - name: string; - attachments: Map[]; - bones: BoneData[]; - constraints: ConstraintData[]; - constructor(name: string); - setAttachment(slotIndex: number, name: string, attachment: Attachment): void; - addSkin(skin: Skin): void; - copySkin(skin: Skin): void; - getAttachment(slotIndex: number, name: string): Attachment; - removeAttachment(slotIndex: number, name: string): void; - getAttachments(): Array; - getAttachmentsForSlot(slotIndex: number, attachments: Array): void; - clear(): void; - attachAll(skeleton: Skeleton, oldSkin: Skin): void; - } -} -declare module PIXI.spine.core { - class Slot { - currentMesh: any; - currentSprite: any; - currentGraphics: any; - clippingContainer: any; - meshes: any; - currentMeshName: string; - sprites: any; - currentSpriteName: string; - blendMode: number; - tempRegion: TextureRegion; - tempAttachment: Attachment; - data: SlotData; - bone: Bone; - color: Color; - darkColor: Color; - private attachment; - private attachmentTime; - deform: number[]; - constructor(data: SlotData, bone: Bone); - getAttachment(): Attachment; - setAttachment(attachment: Attachment): void; - setAttachmentTime(time: number): void; - getAttachmentTime(): number; - setToSetupPose(): void; - } -} -declare module PIXI.spine.core { - class SlotData { - index: number; - name: string; - boneData: BoneData; - color: Color; - darkColor: Color; - attachmentName: string; - blendMode: BlendMode; - constructor(index: number, name: string, boneData: BoneData); - } -} -declare module PIXI.spine.core { - abstract class Texture { - protected _image: HTMLImageElement; - constructor(image: HTMLImageElement); - getImage(): HTMLImageElement; - abstract setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; - abstract setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; - abstract dispose(): void; - static filterFromString(text: string): TextureFilter; - static wrapFromString(text: string): TextureWrap; - } - enum TextureFilter { - Nearest = 9728, - Linear = 9729, - MipMap = 9987, - MipMapNearestNearest = 9984, - MipMapLinearNearest = 9985, - MipMapNearestLinear = 9986, - MipMapLinearLinear = 9987 - } - enum TextureWrap { - MirroredRepeat = 33648, - ClampToEdge = 33071, - Repeat = 10497 - } - class TextureRegion { - texture: PIXI.Texture; - size: PIXI.Rectangle; - readonly width: number; - readonly height: number; - readonly u: number; - readonly v: number; - readonly u2: number; - readonly v2: number; - readonly offsetX: number; - readonly offsetY: number; - readonly pixiOffsetY: number; - readonly spineOffsetY: number; - readonly originalWidth: number; - readonly originalHeight: number; - readonly x: number; - readonly y: number; - readonly rotate: boolean; - } -} -declare module PIXI.spine.core { - class TextureAtlas implements Disposable { - pages: TextureAtlasPage[]; - regions: TextureAtlasRegion[]; - constructor(atlasText?: string, textureLoader?: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback?: (obj: TextureAtlas) => any); - addTexture(name: string, texture: PIXI.Texture): TextureAtlasRegion; - addTextureHash(textures: Map, stripExtension: boolean): void; - addSpineAtlas(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any): void; - private load; - findRegion(name: string): TextureAtlasRegion; - dispose(): void; - } - class TextureAtlasPage { - name: string; - minFilter: TextureFilter; - magFilter: TextureFilter; - uWrap: TextureWrap; - vWrap: TextureWrap; - baseTexture: PIXI.BaseTexture; - width: number; - height: number; - setFilters(): void; - } - class TextureAtlasRegion extends TextureRegion { - page: TextureAtlasPage; - name: string; - index: number; - } -} -declare module PIXI.spine.core { - class TransformConstraint implements Updatable { - data: TransformConstraintData; - bones: Array; - target: Bone; - rotateMix: number; - translateMix: number; - scaleMix: number; - shearMix: number; - temp: Vector2; - active: boolean; - constructor(data: TransformConstraintData, skeleton: Skeleton); - isActive(): boolean; - apply(): void; - update(): void; - applyAbsoluteWorld(): void; - applyRelativeWorld(): void; - applyAbsoluteLocal(): void; - applyRelativeLocal(): void; - } -} -declare module PIXI.spine.core { - class TransformConstraintData extends ConstraintData { - bones: BoneData[]; - target: BoneData; - rotateMix: number; - translateMix: number; - scaleMix: number; - shearMix: number; - offsetRotation: number; - offsetX: number; - offsetY: number; - offsetScaleX: number; - offsetScaleY: number; - offsetShearY: number; - relative: boolean; - local: boolean; - constructor(name: string); - } -} -declare module PIXI.spine.core { - class Triangulator { - private convexPolygons; - private convexPolygonsIndices; - private indicesArray; - private isConcaveArray; - private triangles; - private polygonPool; - private polygonIndicesPool; - triangulate(verticesArray: ArrayLike): Array; - decompose(verticesArray: Array, triangles: Array): Array>; - private static isConcave; - private static positiveArea; - private static winding; - } -} -declare module PIXI.spine.core { - interface Updatable { - update(): void; - isActive(): boolean; - } -} -declare module PIXI.spine.core { - interface Map { - [key: string]: T; - } - class IntSet { - array: number[]; - add(value: number): boolean; - contains(value: number): boolean; - remove(value: number): void; - clear(): void; - } - interface Disposable { - dispose(): void; - } - interface Restorable { - restore(): void; - } - class Color { - r: number; - g: number; - b: number; - a: number; - static WHITE: Color; - static RED: Color; - static GREEN: Color; - static BLUE: Color; - static MAGENTA: Color; - constructor(r?: number, g?: number, b?: number, a?: number); - set(r: number, g: number, b: number, a: number): this; - setFromColor(c: Color): this; - setFromString(hex: string): this; - add(r: number, g: number, b: number, a: number): this; - clamp(): this; - static rgba8888ToColor(color: Color, value: number): void; - static rgb888ToColor(color: Color, value: number): void; - } - class MathUtils { - static PI: number; - static PI2: number; - static radiansToDegrees: number; - static radDeg: number; - static degreesToRadians: number; - static degRad: number; - static clamp(value: number, min: number, max: number): number; - static cosDeg(degrees: number): number; - static sinDeg(degrees: number): number; - static signum(value: number): number; - static toInt(x: number): number; - static cbrt(x: number): number; - static randomTriangular(min: number, max: number): number; - static randomTriangularWith(min: number, max: number, mode: number): number; - } - abstract class Interpolation { - protected abstract applyInternal(a: number): number; - apply(start: number, end: number, a: number): number; - } - class Pow extends Interpolation { - protected power: number; - constructor(power: number); - applyInternal(a: number): number; - } - class PowOut extends Pow { - constructor(power: number); - applyInternal(a: number): number; - } - class Utils { - static SUPPORTS_TYPED_ARRAYS: boolean; - static arrayCopy(source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number): void; - static setArraySize(array: Array, size: number, value?: any): Array; - static ensureArrayCapacity(array: Array, size: number, value?: any): Array; - static newArray(size: number, defaultValue: T): Array; - static newFloatArray(size: number): ArrayLike; - static newShortArray(size: number): ArrayLike; - static toFloatArray(array: Array): number[] | Float32Array; - static toSinglePrecision(value: number): number; - static webkit602BugfixHelper(alpha: number, blend: MixBlend): void; - static contains(array: Array, element: T, identity?: boolean): boolean; - } - class DebugUtils { - static logBones(skeleton: Skeleton): void; - } - class Pool { - private items; - private instantiator; - constructor(instantiator: () => T); - obtain(): T; - free(item: T): void; - freeAll(items: ArrayLike): void; - clear(): void; - } - class Vector2 { - x: number; - y: number; - constructor(x?: number, y?: number); - set(x: number, y: number): Vector2; - length(): number; - normalize(): this; - } - class TimeKeeper { - maxDelta: number; - framesPerSecond: number; - delta: number; - totalTime: number; - private lastTime; - private frameCount; - private frameTime; - update(): void; - } - interface ArrayLike { - length: number; - [n: number]: T; - } - class WindowedMean { - values: Array; - addedValues: number; - lastValue: number; - mean: number; - dirty: boolean; - constructor(windowSize?: number); - hasEnoughData(): boolean; - addValue(value: number): void; - getMean(): number; - } -} -declare module PIXI.spine.core { - interface VertexEffect { - begin(skeleton: Skeleton): void; - transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; - end(): void; - } -} -declare module PIXI.spine.core { - class JitterEffect implements VertexEffect { - jitterX: number; - jitterY: number; - constructor(jitterX: number, jitterY: number); - begin(skeleton: Skeleton): void; - transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; - end(): void; - } -} -declare module PIXI.spine.core { - class SwirlEffect implements VertexEffect { - static interpolation: PowOut; - centerX: number; - centerY: number; - radius: number; - angle: number; - private worldX; - private worldY; - constructor(radius: number); - begin(skeleton: Skeleton): void; - transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; - end(): void; - } -} -declare module PIXI.spine { -} -declare namespace PIXI.loaders { - interface IMetadata { - spineSkeletonScale?: number; - spineAtlas?: any; - spineAtlasSuffix?: string; - spineAtlasFile?: string; - spineMetadata?: any; - imageNamePrefix?: string; - atlasRawData?: string; - imageLoader?: any; - images?: any; - imageMetadata?: any; - image?: any; - } -} -declare module PIXI.spine { - function atlasParser(): (resource: PIXI.loaders.Resource, next: () => any) => any; - function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any): (line: string, callback: (baseTexture: PIXI.BaseTexture) => any) => void; - function syncImageLoaderAdapter(baseUrl: any, crossOrigin: any): (line: any, callback: any) => void; - function staticImageLoader(pages: { - [key: string]: (PIXI.BaseTexture | PIXI.Texture); - }): (line: any, callback: any) => void; -} -interface Math { - fround(n: number): number; -} -declare module PIXI.spine { - class SpineSprite extends PIXI.Sprite { - region: core.TextureRegion; - } - class SpineMesh extends PIXI.mesh.Mesh { - region: core.TextureRegion; - constructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number); - } - class Spine extends PIXI.Container { - static globalAutoUpdate: boolean; - static globalDelayLimit: number; - tintRgb: ArrayLike; - spineData: core.SkeletonData; - skeleton: core.Skeleton; - stateData: core.AnimationStateData; - state: core.AnimationState; - slotContainers: Array; - tempClipContainers: Array; - localDelayLimit: number; - constructor(spineData: core.SkeletonData); - autoUpdate: boolean; - tint: number; - readonly delayLimit: number; - update(dt: number): void; - private setSpriteRegion; - private setMeshRegion; - protected lastTime: number; - autoUpdateTransform(): void; - createSprite(slot: core.Slot, attachment: core.RegionAttachment, defName: string): SpineSprite; - createMesh(slot: core.Slot, attachment: core.MeshAttachment): SpineMesh; - static clippingPolygon: Array; - createGraphics(slot: core.Slot, clip: core.ClippingAttachment): PIXI.Graphics; - updateGraphics(slot: core.Slot, clip: core.ClippingAttachment): void; - hackTextureBySlotIndex(slotIndex: number, texture?: PIXI.Texture, size?: PIXI.Rectangle): boolean; - hackTextureBySlotName(slotName: string, texture?: PIXI.Texture, size?: PIXI.Rectangle): boolean; - newContainer(): PIXI.Container; - newSprite(tex: PIXI.Texture): SpineSprite; - newGraphics(): PIXI.Graphics; - newMesh(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number): SpineMesh; - transformHack(): number; - hackAttachmentGroups(nameSuffix: string, group: any, outGroup: any): any[][]; - destroy(options?: PIXI.DestroyOptions | boolean): void; - } -} +/// +declare module PIXI.spine.core { + class Animation { + name: string; + timelines: Array; + duration: number; + constructor(name: string, timelines: Array, duration: number); + apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + static binarySearch(values: ArrayLike, target: number, step?: number): number; + static linearSearch(values: ArrayLike, target: number, step: number): number; + } + interface Timeline { + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + getPropertyId(): number; + } + enum MixBlend { + setup = 0, + first = 1, + replace = 2, + add = 3 + } + enum MixDirection { + mixIn = 0, + mixOut = 1 + } + enum TimelineType { + rotate = 0, + translate = 1, + scale = 2, + shear = 3, + attachment = 4, + color = 5, + deform = 6, + event = 7, + drawOrder = 8, + ikConstraint = 9, + transformConstraint = 10, + pathConstraintPosition = 11, + pathConstraintSpacing = 12, + pathConstraintMix = 13, + twoColor = 14 + } + abstract class CurveTimeline implements Timeline { + static LINEAR: number; + static STEPPED: number; + static BEZIER: number; + static BEZIER_SIZE: number; + private curves; + abstract getPropertyId(): number; + constructor(frameCount: number); + getFrameCount(): number; + setLinear(frameIndex: number): void; + setStepped(frameIndex: number): void; + getCurveType(frameIndex: number): number; + setCurve(frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void; + getCurvePercent(frameIndex: number, percent: number): number; + abstract apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class RotateTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_ROTATION: number; + static ROTATION: number; + boneIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, degrees: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class TranslateTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_X: number; + static PREV_Y: number; + static X: number; + static Y: number; + boneIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, x: number, y: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class ScaleTimeline extends TranslateTimeline { + constructor(frameCount: number); + getPropertyId(): number; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class ShearTimeline extends TranslateTimeline { + constructor(frameCount: number); + getPropertyId(): number; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class ColorTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_R: number; + static PREV_G: number; + static PREV_B: number; + static PREV_A: number; + static R: number; + static G: number; + static B: number; + static A: number; + slotIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class TwoColorTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_R: number; + static PREV_G: number; + static PREV_B: number; + static PREV_A: number; + static PREV_R2: number; + static PREV_G2: number; + static PREV_B2: number; + static R: number; + static G: number; + static B: number; + static A: number; + static R2: number; + static G2: number; + static B2: number; + slotIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class AttachmentTimeline implements Timeline { + slotIndex: number; + frames: ArrayLike; + attachmentNames: Array; + constructor(frameCount: number); + getPropertyId(): number; + getFrameCount(): number; + setFrame(frameIndex: number, time: number, attachmentName: string): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class DeformTimeline extends CurveTimeline { + slotIndex: number; + attachment: VertexAttachment; + frames: ArrayLike; + frameVertices: Array>; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, vertices: ArrayLike): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class EventTimeline implements Timeline { + frames: ArrayLike; + events: Array; + constructor(frameCount: number); + getPropertyId(): number; + getFrameCount(): number; + setFrame(frameIndex: number, event: Event): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class DrawOrderTimeline implements Timeline { + frames: ArrayLike; + drawOrders: Array>; + constructor(frameCount: number); + getPropertyId(): number; + getFrameCount(): number; + setFrame(frameIndex: number, time: number, drawOrder: Array): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class IkConstraintTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_MIX: number; + static PREV_SOFTNESS: number; + static PREV_BEND_DIRECTION: number; + static PREV_COMPRESS: number; + static PREV_STRETCH: number; + static MIX: number; + static SOFTNESS: number; + static BEND_DIRECTION: number; + static COMPRESS: number; + static STRETCH: number; + ikConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, mix: number, softness: number, bendDirection: number, compress: boolean, stretch: boolean): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class TransformConstraintTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_ROTATE: number; + static PREV_TRANSLATE: number; + static PREV_SCALE: number; + static PREV_SHEAR: number; + static ROTATE: number; + static TRANSLATE: number; + static SCALE: number; + static SHEAR: number; + transformConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class PathConstraintPositionTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_VALUE: number; + static VALUE: number; + pathConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, value: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { + constructor(frameCount: number); + getPropertyId(): number; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class PathConstraintMixTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_ROTATE: number; + static PREV_TRANSLATE: number; + static ROTATE: number; + static TRANSLATE: number; + pathConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } +} +declare module PIXI.spine.core { + class AnimationState { + static emptyAnimation: Animation; + static SUBSEQUENT: number; + static FIRST: number; + static HOLD: number; + static HOLD_MIX: number; + static NOT_LAST: number; + data: AnimationStateData; + tracks: TrackEntry[]; + events: Event[]; + listeners: AnimationStateListener2[]; + queue: EventQueue; + propertyIDs: IntSet; + animationsChanged: boolean; + timeScale: number; + trackEntryPool: Pool; + constructor(data: AnimationStateData); + update(delta: number): void; + updateMixingFrom(to: TrackEntry, delta: number): boolean; + apply(skeleton: Skeleton): boolean; + applyMixingFrom(to: TrackEntry, skeleton: Skeleton, blend: MixBlend): number; + applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array, i: number, firstFrame: boolean): void; + queueEvents(entry: TrackEntry, animationTime: number): void; + clearTracks(): void; + clearTrack(trackIndex: number): void; + setCurrent(index: number, current: TrackEntry, interrupt: boolean): void; + setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry; + setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry; + addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): TrackEntry; + addAnimationWith(trackIndex: number, animation: Animation, loop: boolean, delay: number): TrackEntry; + setEmptyAnimation(trackIndex: number, mixDuration: number): TrackEntry; + addEmptyAnimation(trackIndex: number, mixDuration: number, delay: number): TrackEntry; + setEmptyAnimations(mixDuration: number): void; + expandToIndex(index: number): TrackEntry; + trackEntry(trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry): TrackEntry; + disposeNext(entry: TrackEntry): void; + _animationsChanged(): void; + computeHold(entry: TrackEntry): void; + computeNotLast(entry: TrackEntry): void; + hasTimeline(entry: TrackEntry, id: number): boolean; + getCurrent(trackIndex: number): TrackEntry; + addListener(listener: AnimationStateListener2): void; + removeListener(listener: AnimationStateListener2): void; + clearListeners(): void; + clearListenerNotifications(): void; + onComplete: (trackIndex: number, loopCount: number) => any; + onEvent: (trackIndex: number, event: Event) => any; + onStart: (trackIndex: number) => any; + onEnd: (trackIndex: number) => any; + private static deprecatedWarning1; + setAnimationByName(trackIndex: number, animationName: string, loop: boolean): void; + private static deprecatedWarning2; + addAnimationByName(trackIndex: number, animationName: string, loop: boolean, delay: number): void; + private static deprecatedWarning3; + hasAnimation(animationName: string): boolean; + hasAnimationByName(animationName: string): boolean; + } + class TrackEntry { + animation: Animation; + next: TrackEntry; + mixingFrom: TrackEntry; + mixingTo: TrackEntry; + listener: AnimationStateListener2; + trackIndex: number; + loop: boolean; + holdPrevious: boolean; + eventThreshold: number; + attachmentThreshold: number; + drawOrderThreshold: number; + animationStart: number; + animationEnd: number; + animationLast: number; + nextAnimationLast: number; + delay: number; + trackTime: number; + trackLast: number; + nextTrackLast: number; + trackEnd: number; + timeScale: number; + alpha: number; + mixTime: number; + mixDuration: number; + interruptAlpha: number; + totalAlpha: number; + mixBlend: MixBlend; + timelineMode: number[]; + timelineHoldMix: TrackEntry[]; + timelinesRotation: number[]; + reset(): void; + getAnimationTime(): number; + setAnimationLast(animationLast: number): void; + isComplete(): boolean; + resetRotationDirections(): void; + onComplete: (trackIndex: number, loopCount: number) => any; + onEvent: (trackIndex: number, event: Event) => any; + onStart: (trackIndex: number) => any; + onEnd: (trackIndex: number) => any; + private static deprecatedWarning1; + private static deprecatedWarning2; + time: number; + endTime: number; + loopsCount(): number; + } + class EventQueue { + objects: Array; + drainDisabled: boolean; + animState: AnimationState; + constructor(animState: AnimationState); + start(entry: TrackEntry): void; + interrupt(entry: TrackEntry): void; + end(entry: TrackEntry): void; + dispose(entry: TrackEntry): void; + complete(entry: TrackEntry): void; + event(entry: TrackEntry, event: Event): void; + private static deprecatedWarning1; + deprecateStuff(): boolean; + drain(): void; + clear(): void; + } + enum EventType { + start = 0, + interrupt = 1, + end = 2, + dispose = 3, + complete = 4, + event = 5 + } + interface AnimationStateListener2 { + start?(entry: TrackEntry): void; + interrupt?(entry: TrackEntry): void; + end?(entry: TrackEntry): void; + dispose?(entry: TrackEntry): void; + complete?(entry: TrackEntry): void; + event?(entry: TrackEntry, event: Event): void; + } + abstract class AnimationStateAdapter2 implements AnimationStateListener2 { + start(entry: TrackEntry): void; + interrupt(entry: TrackEntry): void; + end(entry: TrackEntry): void; + dispose(entry: TrackEntry): void; + complete(entry: TrackEntry): void; + event(entry: TrackEntry, event: Event): void; + } +} +declare module PIXI.spine.core { + class AnimationStateData { + skeletonData: SkeletonData; + animationToMixTime: Map; + defaultMix: number; + constructor(skeletonData: SkeletonData); + setMix(fromName: string, toName: string, duration: number): void; + private static deprecatedWarning1; + setMixByName(fromName: string, toName: string, duration: number): void; + setMixWith(from: Animation, to: Animation, duration: number): void; + getMix(from: Animation, to: Animation): number; + } +} +declare module PIXI.spine.core { + class AtlasAttachmentLoader implements AttachmentLoader { + atlas: TextureAtlas; + constructor(atlas: TextureAtlas); + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + newPathAttachment(skin: Skin, name: string): PathAttachment; + newPointAttachment(skin: Skin, name: string): PointAttachment; + newClippingAttachment(skin: Skin, name: string): ClippingAttachment; + } +} +declare module PIXI.spine.core { + abstract class Attachment { + name: string; + constructor(name: string); + abstract copy(): Attachment; + } + abstract class VertexAttachment extends Attachment { + private static nextID; + id: number; + bones: Array; + vertices: ArrayLike; + worldVerticesLength: number; + deformAttachment: VertexAttachment; + constructor(name: string); + computeWorldVerticesOld(slot: Slot, worldVertices: ArrayLike): void; + computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number, stride: number): void; + copyTo(attachment: VertexAttachment): void; + } +} +declare module PIXI.spine.core { + interface AttachmentLoader { + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + newPathAttachment(skin: Skin, name: string): PathAttachment; + newPointAttachment(skin: Skin, name: string): PointAttachment; + newClippingAttachment(skin: Skin, name: string): ClippingAttachment; + } +} +declare module PIXI.spine.core { + enum AttachmentType { + Region = 0, + BoundingBox = 1, + Mesh = 2, + LinkedMesh = 3, + Path = 4, + Point = 5, + Clipping = 6 + } +} +declare module PIXI.spine.core { + class BoundingBoxAttachment extends VertexAttachment { + color: Color; + constructor(name: string); + copy(): Attachment; + } +} +declare module PIXI.spine.core { + class ClippingAttachment extends VertexAttachment { + endSlot: SlotData; + color: Color; + constructor(name: string); + copy(): Attachment; + } +} +declare module PIXI.spine.core { + class MeshAttachment extends VertexAttachment { + region: TextureRegion; + path: string; + regionUVs: Float32Array; + uvs: ArrayLike; + triangles: Array; + color: Color; + width: number; + height: number; + hullLength: number; + edges: Array; + private parentMesh; + tempColor: Color; + constructor(name: string); + updateUVs(region: TextureRegion, uvs: ArrayLike): ArrayLike; + getParentMesh(): MeshAttachment; + setParentMesh(parentMesh: MeshAttachment): void; + copy(): Attachment; + newLinkedMesh(): MeshAttachment; + } +} +declare module PIXI.spine.core { + class PathAttachment extends VertexAttachment { + lengths: Array; + closed: boolean; + constantSpeed: boolean; + color: Color; + constructor(name: string); + copy(): Attachment; + } +} +declare module PIXI.spine.core { + class PointAttachment extends VertexAttachment { + x: number; + y: number; + rotation: number; + color: Color; + constructor(name: string); + computeWorldPosition(bone: Bone, point: Vector2): Vector2; + computeWorldRotation(bone: Bone): number; + copy(): Attachment; + } +} +declare module PIXI.spine.core { + class RegionAttachment extends Attachment { + static OX1: number; + static OY1: number; + static OX2: number; + static OY2: number; + static OX3: number; + static OY3: number; + static OX4: number; + static OY4: number; + static X1: number; + static Y1: number; + static C1R: number; + static C1G: number; + static C1B: number; + static C1A: number; + static U1: number; + static V1: number; + static X2: number; + static Y2: number; + static C2R: number; + static C2G: number; + static C2B: number; + static C2A: number; + static U2: number; + static V2: number; + static X3: number; + static Y3: number; + static C3R: number; + static C3G: number; + static C3B: number; + static C3A: number; + static U3: number; + static V3: number; + static X4: number; + static Y4: number; + static C4R: number; + static C4G: number; + static C4B: number; + static C4A: number; + static U4: number; + static V4: number; + x: number; + y: number; + scaleX: number; + scaleY: number; + rotation: number; + width: number; + height: number; + color: Color; + path: string; + rendererObject: any; + region: TextureRegion; + offset: ArrayLike; + uvs: ArrayLike; + tempColor: Color; + constructor(name: string); + updateOffset(): void; + setRegion(region: TextureRegion): void; + computeWorldVertices(bone: Bone, worldVertices: ArrayLike, offset: number, stride: number): void; + copy(): Attachment; + } +} +declare module PIXI.spine.core { + enum BlendMode { + Normal = 0, + Additive = 1, + Multiply = 2, + Screen = 3 + } +} +declare module PIXI.spine.core { + class Bone implements Updatable { + static yDown: boolean; + matrix: PIXI.Matrix; + readonly worldX: number; + readonly worldY: number; + data: BoneData; + skeleton: Skeleton; + parent: Bone; + children: Bone[]; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + ax: number; + ay: number; + arotation: number; + ascaleX: number; + ascaleY: number; + ashearX: number; + ashearY: number; + appliedValid: boolean; + sorted: boolean; + active: boolean; + constructor(data: BoneData, skeleton: Skeleton, parent: Bone); + isActive(): boolean; + update(): void; + updateWorldTransform(): void; + updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number): void; + setToSetupPose(): void; + getWorldRotationX(): number; + getWorldRotationY(): number; + getWorldScaleX(): number; + getWorldScaleY(): number; + updateAppliedTransform(): void; + worldToLocal(world: Vector2): Vector2; + localToWorld(local: Vector2): Vector2; + worldToLocalRotation(worldRotation: number): number; + localToWorldRotation(localRotation: number): number; + rotateWorld(degrees: number): void; + } +} +declare module PIXI.spine.core { + class BoneData { + index: number; + name: string; + parent: BoneData; + length: number; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + transformMode: TransformMode; + skinRequired: boolean; + color: Color; + constructor(index: number, name: string, parent: BoneData); + } + enum TransformMode { + Normal = 0, + OnlyTranslation = 1, + NoRotationOrReflection = 2, + NoScale = 3, + NoScaleOrReflection = 4 + } +} +declare module PIXI.spine.core { + abstract class ConstraintData { + name: string; + order: number; + skinRequired: boolean; + constructor(name: string, order: number, skinRequired: boolean); + } +} +declare module PIXI.spine.core { + class Event { + data: EventData; + intValue: number; + floatValue: number; + stringValue: string; + time: number; + volume: number; + balance: number; + constructor(time: number, data: EventData); + } +} +declare module PIXI.spine.core { + class EventData { + name: string; + intValue: number; + floatValue: number; + stringValue: string; + audioPath: string; + volume: number; + balance: number; + constructor(name: string); + } +} +declare module PIXI.spine.core { + class IkConstraint implements Updatable { + data: IkConstraintData; + bones: Array; + target: Bone; + bendDirection: number; + compress: boolean; + stretch: boolean; + mix: number; + softness: number; + active: boolean; + constructor(data: IkConstraintData, skeleton: Skeleton); + isActive(): boolean; + apply(): void; + update(): void; + apply1(bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number): void; + apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, softness: number, alpha: number): void; + } +} +declare module PIXI.spine.core { + class IkConstraintData extends ConstraintData { + bones: BoneData[]; + target: BoneData; + bendDirection: number; + compress: boolean; + stretch: boolean; + uniform: boolean; + mix: number; + softness: number; + constructor(name: string); + } +} +declare module PIXI.spine.core { + class PathConstraint implements Updatable { + static NONE: number; + static BEFORE: number; + static AFTER: number; + static epsilon: number; + data: PathConstraintData; + bones: Array; + target: Slot; + position: number; + spacing: number; + rotateMix: number; + translateMix: number; + spaces: number[]; + positions: number[]; + world: number[]; + curves: number[]; + lengths: number[]; + segments: number[]; + active: boolean; + constructor(data: PathConstraintData, skeleton: Skeleton); + isActive(): boolean; + apply(): void; + update(): void; + computeWorldPositions(path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean, percentSpacing: boolean): number[]; + addBeforePosition(p: number, temp: Array, i: number, out: Array, o: number): void; + addAfterPosition(p: number, temp: Array, i: number, out: Array, o: number): void; + addCurvePosition(p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, out: Array, o: number, tangents: boolean): void; + } +} +declare module PIXI.spine.core { + class PathConstraintData extends ConstraintData { + bones: BoneData[]; + target: SlotData; + positionMode: PositionMode; + spacingMode: SpacingMode; + rotateMode: RotateMode; + offsetRotation: number; + position: number; + spacing: number; + rotateMix: number; + translateMix: number; + constructor(name: string); + } + enum PositionMode { + Fixed = 0, + Percent = 1 + } + enum SpacingMode { + Length = 0, + Fixed = 1, + Percent = 2 + } + enum RotateMode { + Tangent = 0, + Chain = 1, + ChainScale = 2 + } +} +declare module PIXI.spine.core { + class Skeleton { + data: SkeletonData; + bones: Array; + slots: Array; + drawOrder: Array; + ikConstraints: Array; + transformConstraints: Array; + pathConstraints: Array; + _updateCache: Updatable[]; + updateCacheReset: Updatable[]; + skin: Skin; + color: Color; + time: number; + scaleX: number; + scaleY: number; + x: number; + y: number; + constructor(data: SkeletonData); + updateCache(): void; + sortIkConstraint(constraint: IkConstraint): void; + sortPathConstraint(constraint: PathConstraint): void; + sortTransformConstraint(constraint: TransformConstraint): void; + sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void; + sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void; + sortBone(bone: Bone): void; + sortReset(bones: Array): void; + updateWorldTransform(): void; + setToSetupPose(): void; + setBonesToSetupPose(): void; + setSlotsToSetupPose(): void; + getRootBone(): Bone; + findBone(boneName: string): Bone; + findBoneIndex(boneName: string): number; + findSlot(slotName: string): Slot; + findSlotIndex(slotName: string): number; + setSkinByName(skinName: string): void; + setSkin(newSkin: Skin): void; + getAttachmentByName(slotName: string, attachmentName: string): Attachment; + getAttachment(slotIndex: number, attachmentName: string): Attachment; + setAttachment(slotName: string, attachmentName: string): void; + findIkConstraint(constraintName: string): IkConstraint; + findTransformConstraint(constraintName: string): TransformConstraint; + findPathConstraint(constraintName: string): PathConstraint; + getBounds(offset: Vector2, size: Vector2, temp?: Array): void; + update(delta: number): void; + flipX: boolean; + flipY: boolean; + private static deprecatedWarning1; + } +} +declare module PIXI.spine.core { + class SkeletonBinary { + static AttachmentTypeValues: number[]; + static TransformModeValues: TransformMode[]; + static PositionModeValues: PositionMode[]; + static SpacingModeValues: SpacingMode[]; + static RotateModeValues: RotateMode[]; + static BlendModeValues: BlendMode[]; + static BONE_ROTATE: number; + static BONE_TRANSLATE: number; + static BONE_SCALE: number; + static BONE_SHEAR: number; + static SLOT_ATTACHMENT: number; + static SLOT_COLOR: number; + static SLOT_TWO_COLOR: number; + static PATH_POSITION: number; + static PATH_SPACING: number; + static PATH_MIX: number; + static CURVE_LINEAR: number; + static CURVE_STEPPED: number; + static CURVE_BEZIER: number; + attachmentLoader: AttachmentLoader; + scale: number; + private linkedMeshes; + constructor(attachmentLoader: AttachmentLoader); + readSkeletonData(binary: Uint8Array): SkeletonData; + private readSkin; + private readAttachment; + private readVertices; + private readFloatArray; + private readShortArray; + private readAnimation; + private readCurve; + setCurve(timeline: CurveTimeline, frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void; + } +} +declare module PIXI.spine.core { + class SkeletonBounds { + minX: number; + minY: number; + maxX: number; + maxY: number; + boundingBoxes: BoundingBoxAttachment[]; + polygons: ArrayLike[]; + private polygonPool; + update(skeleton: Skeleton, updateAabb: boolean): void; + aabbCompute(): void; + aabbContainsPoint(x: number, y: number): boolean; + aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean; + aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean; + containsPoint(x: number, y: number): BoundingBoxAttachment; + containsPointPolygon(polygon: ArrayLike, x: number, y: number): boolean; + intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment; + intersectsSegmentPolygon(polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number): boolean; + getPolygon(boundingBox: BoundingBoxAttachment): ArrayLike; + getWidth(): number; + getHeight(): number; + } +} +declare module PIXI.spine.core { + class SkeletonClipping { + private triangulator; + private clippingPolygon; + private clipOutput; + clippedVertices: number[]; + clippedTriangles: number[]; + private scratch; + private clipAttachment; + private clippingPolygons; + clipStart(slot: Slot, clip: ClippingAttachment): number; + clipEndWithSlot(slot: Slot): void; + clipEnd(): void; + isClipping(): boolean; + clipTriangles(vertices: ArrayLike, verticesLength: number, triangles: ArrayLike, trianglesLength: number, uvs: ArrayLike, light: Color, dark: Color, twoColor: boolean): void; + clip(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array, output: Array): boolean; + static makeClockwise(polygon: ArrayLike): void; + } +} +declare module PIXI.spine.core { + class SkeletonData { + name: string; + bones: BoneData[]; + slots: SlotData[]; + skins: Skin[]; + defaultSkin: Skin; + events: EventData[]; + animations: Animation[]; + ikConstraints: IkConstraintData[]; + transformConstraints: TransformConstraintData[]; + pathConstraints: PathConstraintData[]; + x: number; + y: number; + width: number; + height: number; + version: string; + hash: string; + fps: number; + imagesPath: string; + audioPath: string; + findBone(boneName: string): BoneData; + findBoneIndex(boneName: string): number; + findSlot(slotName: string): SlotData; + findSlotIndex(slotName: string): number; + findSkin(skinName: string): Skin; + findEvent(eventDataName: string): EventData; + findAnimation(animationName: string): Animation; + findIkConstraint(constraintName: string): IkConstraintData; + findTransformConstraint(constraintName: string): TransformConstraintData; + findPathConstraint(constraintName: string): PathConstraintData; + findPathConstraintIndex(pathConstraintName: string): number; + } +} +declare module PIXI.spine.core { + class SkeletonJson { + attachmentLoader: AttachmentLoader; + scale: number; + private linkedMeshes; + constructor(attachmentLoader: AttachmentLoader); + readSkeletonData(json: string | any): SkeletonData; + readAttachment(map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment; + readVertices(map: any, attachment: VertexAttachment, verticesLength: number): void; + readAnimation(map: any, name: string, skeletonData: SkeletonData): void; + readCurve(map: any, timeline: CurveTimeline, frameIndex: number): void; + getValue(map: any, prop: string, defaultValue: any): any; + static blendModeFromString(str: string): BlendMode; + static positionModeFromString(str: string): PositionMode; + static spacingModeFromString(str: string): SpacingMode; + static rotateModeFromString(str: string): RotateMode; + static transformModeFromString(str: string): TransformMode; + } +} +declare module PIXI.spine.core { + class SkinEntry { + slotIndex: number; + name: string; + attachment: Attachment; + constructor(slotIndex: number, name: string, attachment: Attachment); + } + class Skin { + name: string; + attachments: Map[]; + bones: BoneData[]; + constraints: ConstraintData[]; + constructor(name: string); + setAttachment(slotIndex: number, name: string, attachment: Attachment): void; + addSkin(skin: Skin): void; + copySkin(skin: Skin): void; + getAttachment(slotIndex: number, name: string): Attachment; + removeAttachment(slotIndex: number, name: string): void; + getAttachments(): Array; + getAttachmentsForSlot(slotIndex: number, attachments: Array): void; + clear(): void; + attachAll(skeleton: Skeleton, oldSkin: Skin): void; + } +} +declare module PIXI.spine.core { + class Slot { + currentMesh: any; + currentSprite: any; + currentGraphics: any; + clippingContainer: any; + meshes: any; + currentMeshName: string; + sprites: any; + currentSpriteName: string; + blendMode: number; + tempRegion: TextureRegion; + tempAttachment: Attachment; + data: SlotData; + bone: Bone; + color: Color; + darkColor: Color; + private attachment; + private attachmentTime; + deform: number[]; + constructor(data: SlotData, bone: Bone); + getAttachment(): Attachment; + setAttachment(attachment: Attachment): void; + setAttachmentTime(time: number): void; + getAttachmentTime(): number; + setToSetupPose(): void; + } +} +declare module PIXI.spine.core { + class SlotData { + index: number; + name: string; + boneData: BoneData; + color: Color; + darkColor: Color; + attachmentName: string; + blendMode: BlendMode; + constructor(index: number, name: string, boneData: BoneData); + } +} +declare module PIXI.spine.core { + abstract class Texture { + protected _image: HTMLImageElement; + constructor(image: HTMLImageElement); + getImage(): HTMLImageElement; + abstract setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; + abstract setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; + abstract dispose(): void; + static filterFromString(text: string): TextureFilter; + static wrapFromString(text: string): TextureWrap; + } + enum TextureFilter { + Nearest = 9728, + Linear = 9729, + MipMap = 9987, + MipMapNearestNearest = 9984, + MipMapLinearNearest = 9985, + MipMapNearestLinear = 9986, + MipMapLinearLinear = 9987 + } + enum TextureWrap { + MirroredRepeat = 33648, + ClampToEdge = 33071, + Repeat = 10497 + } + class TextureRegion { + texture: PIXI.Texture; + size: PIXI.Rectangle; + readonly width: number; + readonly height: number; + readonly u: number; + readonly v: number; + readonly u2: number; + readonly v2: number; + readonly offsetX: number; + readonly offsetY: number; + readonly pixiOffsetY: number; + readonly spineOffsetY: number; + readonly originalWidth: number; + readonly originalHeight: number; + readonly x: number; + readonly y: number; + readonly rotate: boolean; + } +} +declare module PIXI.spine.core { + class TextureAtlas implements Disposable { + pages: TextureAtlasPage[]; + regions: TextureAtlasRegion[]; + constructor(atlasText?: string, textureLoader?: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback?: (obj: TextureAtlas) => any); + addTexture(name: string, texture: PIXI.Texture): TextureAtlasRegion; + addTextureHash(textures: Map, stripExtension: boolean): void; + addSpineAtlas(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any): void; + private load; + findRegion(name: string): TextureAtlasRegion; + dispose(): void; + } + class TextureAtlasPage { + name: string; + minFilter: TextureFilter; + magFilter: TextureFilter; + uWrap: TextureWrap; + vWrap: TextureWrap; + baseTexture: PIXI.BaseTexture; + width: number; + height: number; + setFilters(): void; + } + class TextureAtlasRegion extends TextureRegion { + page: TextureAtlasPage; + name: string; + index: number; + } +} +declare module PIXI.spine.core { + class TransformConstraint implements Updatable { + data: TransformConstraintData; + bones: Array; + target: Bone; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + temp: Vector2; + active: boolean; + constructor(data: TransformConstraintData, skeleton: Skeleton); + isActive(): boolean; + apply(): void; + update(): void; + applyAbsoluteWorld(): void; + applyRelativeWorld(): void; + applyAbsoluteLocal(): void; + applyRelativeLocal(): void; + } +} +declare module PIXI.spine.core { + class TransformConstraintData extends ConstraintData { + bones: BoneData[]; + target: BoneData; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + offsetRotation: number; + offsetX: number; + offsetY: number; + offsetScaleX: number; + offsetScaleY: number; + offsetShearY: number; + relative: boolean; + local: boolean; + constructor(name: string); + } +} +declare module PIXI.spine.core { + class Triangulator { + private convexPolygons; + private convexPolygonsIndices; + private indicesArray; + private isConcaveArray; + private triangles; + private polygonPool; + private polygonIndicesPool; + triangulate(verticesArray: ArrayLike): Array; + decompose(verticesArray: Array, triangles: Array): Array>; + private static isConcave; + private static positiveArea; + private static winding; + } +} +declare module PIXI.spine.core { + interface Updatable { + update(): void; + isActive(): boolean; + } +} +declare module PIXI.spine.core { + interface Map { + [key: string]: T; + } + class IntSet { + array: number[]; + add(value: number): boolean; + contains(value: number): boolean; + remove(value: number): void; + clear(): void; + } + interface Disposable { + dispose(): void; + } + interface Restorable { + restore(): void; + } + class Color { + r: number; + g: number; + b: number; + a: number; + static WHITE: Color; + static RED: Color; + static GREEN: Color; + static BLUE: Color; + static MAGENTA: Color; + constructor(r?: number, g?: number, b?: number, a?: number); + set(r: number, g: number, b: number, a: number): this; + setFromColor(c: Color): this; + setFromString(hex: string): this; + add(r: number, g: number, b: number, a: number): this; + clamp(): this; + static rgba8888ToColor(color: Color, value: number): void; + static rgb888ToColor(color: Color, value: number): void; + } + class MathUtils { + static PI: number; + static PI2: number; + static radiansToDegrees: number; + static radDeg: number; + static degreesToRadians: number; + static degRad: number; + static clamp(value: number, min: number, max: number): number; + static cosDeg(degrees: number): number; + static sinDeg(degrees: number): number; + static signum(value: number): number; + static toInt(x: number): number; + static cbrt(x: number): number; + static randomTriangular(min: number, max: number): number; + static randomTriangularWith(min: number, max: number, mode: number): number; + } + abstract class Interpolation { + protected abstract applyInternal(a: number): number; + apply(start: number, end: number, a: number): number; + } + class Pow extends Interpolation { + protected power: number; + constructor(power: number); + applyInternal(a: number): number; + } + class PowOut extends Pow { + constructor(power: number); + applyInternal(a: number): number; + } + class Utils { + static SUPPORTS_TYPED_ARRAYS: boolean; + static arrayCopy(source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number): void; + static setArraySize(array: Array, size: number, value?: any): Array; + static ensureArrayCapacity(array: Array, size: number, value?: any): Array; + static newArray(size: number, defaultValue: T): Array; + static newFloatArray(size: number): ArrayLike; + static newShortArray(size: number): ArrayLike; + static toFloatArray(array: Array): number[] | Float32Array; + static toSinglePrecision(value: number): number; + static webkit602BugfixHelper(alpha: number, blend: MixBlend): void; + static contains(array: Array, element: T, identity?: boolean): boolean; + } + class DebugUtils { + static logBones(skeleton: Skeleton): void; + } + class Pool { + private items; + private instantiator; + constructor(instantiator: () => T); + obtain(): T; + free(item: T): void; + freeAll(items: ArrayLike): void; + clear(): void; + } + class Vector2 { + x: number; + y: number; + constructor(x?: number, y?: number); + set(x: number, y: number): Vector2; + length(): number; + normalize(): this; + } + class TimeKeeper { + maxDelta: number; + framesPerSecond: number; + delta: number; + totalTime: number; + private lastTime; + private frameCount; + private frameTime; + update(): void; + } + interface ArrayLike { + length: number; + [n: number]: T; + } + class WindowedMean { + values: Array; + addedValues: number; + lastValue: number; + mean: number; + dirty: boolean; + constructor(windowSize?: number); + hasEnoughData(): boolean; + addValue(value: number): void; + getMean(): number; + } +} +declare module PIXI.spine.core { + interface VertexEffect { + begin(skeleton: Skeleton): void; + transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; + end(): void; + } +} +declare module PIXI.spine.core { + class JitterEffect implements VertexEffect { + jitterX: number; + jitterY: number; + constructor(jitterX: number, jitterY: number); + begin(skeleton: Skeleton): void; + transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; + end(): void; + } +} +declare module PIXI.spine.core { + class SwirlEffect implements VertexEffect { + static interpolation: PowOut; + centerX: number; + centerY: number; + radius: number; + angle: number; + private worldX; + private worldY; + constructor(radius: number); + begin(skeleton: Skeleton): void; + transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; + end(): void; + } +} +declare module PIXI.spine { +} +declare namespace PIXI.loaders { + interface IMetadata { + spineSkeletonScale?: number; + spineAtlas?: any; + spineAtlasSuffix?: string; + spineAtlasFile?: string; + spineMetadata?: any; + imageNamePrefix?: string; + atlasRawData?: string; + imageLoader?: any; + images?: any; + imageMetadata?: any; + image?: any; + } +} +declare module PIXI.spine { + function atlasParser(): (resource: PIXI.loaders.Resource, next: () => any) => any; + function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any): (line: string, callback: (baseTexture: PIXI.BaseTexture) => any) => void; + function syncImageLoaderAdapter(baseUrl: any, crossOrigin: any): (line: any, callback: any) => void; + function staticImageLoader(pages: { + [key: string]: (PIXI.BaseTexture | PIXI.Texture); + }): (line: any, callback: any) => void; +} +interface Math { + fround(n: number): number; +} +declare module PIXI.spine { + class SpineSprite extends PIXI.Sprite { + region: core.TextureRegion; + } + class SpineMesh extends PIXI.mesh.Mesh { + region: core.TextureRegion; + constructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number); + } + class Spine extends PIXI.Container { + static globalAutoUpdate: boolean; + static globalDelayLimit: number; + tintRgb: ArrayLike; + spineData: core.SkeletonData; + skeleton: core.Skeleton; + stateData: core.AnimationStateData; + state: core.AnimationState; + slotContainers: Array; + tempClipContainers: Array; + localDelayLimit: number; + constructor(spineData: core.SkeletonData); + autoUpdate: boolean; + tint: number; + readonly delayLimit: number; + update(dt: number): void; + private setSpriteRegion; + private setMeshRegion; + protected lastTime: number; + autoUpdateTransform(): void; + createSprite(slot: core.Slot, attachment: core.RegionAttachment, defName: string): SpineSprite; + createMesh(slot: core.Slot, attachment: core.MeshAttachment): SpineMesh; + static clippingPolygon: Array; + createGraphics(slot: core.Slot, clip: core.ClippingAttachment): PIXI.Graphics; + updateGraphics(slot: core.Slot, clip: core.ClippingAttachment): void; + hackTextureBySlotIndex(slotIndex: number, texture?: PIXI.Texture, size?: PIXI.Rectangle): boolean; + hackTextureBySlotName(slotName: string, texture?: PIXI.Texture, size?: PIXI.Rectangle): boolean; + newContainer(): PIXI.Container; + newSprite(tex: PIXI.Texture): SpineSprite; + newGraphics(): PIXI.Graphics; + newMesh(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number): SpineMesh; + transformHack(): number; + hackAttachmentGroups(nameSuffix: string, group: any, outGroup: any): any[][]; + destroy(options?: PIXI.DestroyOptions | boolean): void; + } +} diff --git a/bin/pixi-spine.js b/bin/pixi-spine.js index d94048fd..a019fb0f 100644 --- a/bin/pixi-spine.js +++ b/bin/pixi-spine.js @@ -1,8816 +1,8824 @@ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var Animation = (function () { - function Animation(name, timelines, duration) { - if (name == null) - throw new Error("name cannot be null."); - if (timelines == null) - throw new Error("timelines cannot be null."); - this.name = name; - this.timelines = timelines; - this.duration = duration; - } - Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) { - if (skeleton == null) - throw new Error("skeleton cannot be null."); - if (loop && this.duration != 0) { - time %= this.duration; - if (lastTime > 0) - lastTime %= this.duration; - } - var timelines = this.timelines; - for (var i = 0, n = timelines.length; i < n; i++) - timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction); - }; - Animation.binarySearch = function (values, target, step) { - if (step === void 0) { step = 1; } - var low = 0; - var high = values.length / step - 2; - if (high == 0) - return step; - var current = high >>> 1; - while (true) { - if (values[(current + 1) * step] <= target) - low = current + 1; - else - high = current; - if (low == high) - return (low + 1) * step; - current = (low + high) >>> 1; - } - }; - Animation.linearSearch = function (values, target, step) { - for (var i = 0, last = values.length - step; i <= last; i += step) - if (values[i] > target) - return i; - return -1; - }; - return Animation; - }()); - core.Animation = Animation; - var MixBlend; - (function (MixBlend) { - MixBlend[MixBlend["setup"] = 0] = "setup"; - MixBlend[MixBlend["first"] = 1] = "first"; - MixBlend[MixBlend["replace"] = 2] = "replace"; - MixBlend[MixBlend["add"] = 3] = "add"; - })(MixBlend = core.MixBlend || (core.MixBlend = {})); - var MixDirection; - (function (MixDirection) { - MixDirection[MixDirection["mixIn"] = 0] = "mixIn"; - MixDirection[MixDirection["mixOut"] = 1] = "mixOut"; - })(MixDirection = core.MixDirection || (core.MixDirection = {})); - var TimelineType; - (function (TimelineType) { - TimelineType[TimelineType["rotate"] = 0] = "rotate"; - TimelineType[TimelineType["translate"] = 1] = "translate"; - TimelineType[TimelineType["scale"] = 2] = "scale"; - TimelineType[TimelineType["shear"] = 3] = "shear"; - TimelineType[TimelineType["attachment"] = 4] = "attachment"; - TimelineType[TimelineType["color"] = 5] = "color"; - TimelineType[TimelineType["deform"] = 6] = "deform"; - TimelineType[TimelineType["event"] = 7] = "event"; - TimelineType[TimelineType["drawOrder"] = 8] = "drawOrder"; - TimelineType[TimelineType["ikConstraint"] = 9] = "ikConstraint"; - TimelineType[TimelineType["transformConstraint"] = 10] = "transformConstraint"; - TimelineType[TimelineType["pathConstraintPosition"] = 11] = "pathConstraintPosition"; - TimelineType[TimelineType["pathConstraintSpacing"] = 12] = "pathConstraintSpacing"; - TimelineType[TimelineType["pathConstraintMix"] = 13] = "pathConstraintMix"; - TimelineType[TimelineType["twoColor"] = 14] = "twoColor"; - })(TimelineType = core.TimelineType || (core.TimelineType = {})); - var CurveTimeline = (function () { - function CurveTimeline(frameCount) { - if (frameCount <= 0) - throw new Error("frameCount must be > 0: " + frameCount); - this.curves = core.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE); - } - CurveTimeline.prototype.getFrameCount = function () { - return this.curves.length / CurveTimeline.BEZIER_SIZE + 1; - }; - CurveTimeline.prototype.setLinear = function (frameIndex) { - this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR; - }; - CurveTimeline.prototype.setStepped = function (frameIndex) { - this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED; - }; - CurveTimeline.prototype.getCurveType = function (frameIndex) { - var index = frameIndex * CurveTimeline.BEZIER_SIZE; - if (index == this.curves.length) - return CurveTimeline.LINEAR; - var type = this.curves[index]; - if (type == CurveTimeline.LINEAR) - return CurveTimeline.LINEAR; - if (type == CurveTimeline.STEPPED) - return CurveTimeline.STEPPED; - return CurveTimeline.BEZIER; - }; - CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) { - var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03; - var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006; - var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy; - var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667; - var i = frameIndex * CurveTimeline.BEZIER_SIZE; - var curves = this.curves; - curves[i++] = CurveTimeline.BEZIER; - var x = dfx, y = dfy; - for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) { - curves[i] = x; - curves[i + 1] = y; - dfx += ddfx; - dfy += ddfy; - ddfx += dddfx; - ddfy += dddfy; - x += dfx; - y += dfy; - } - }; - CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) { - percent = core.MathUtils.clamp(percent, 0, 1); - var curves = this.curves; - var i = frameIndex * CurveTimeline.BEZIER_SIZE; - var type = curves[i]; - if (type == CurveTimeline.LINEAR) - return percent; - if (type == CurveTimeline.STEPPED) - return 0; - i++; - var x = 0; - for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) { - x = curves[i]; - if (x >= percent) { - var prevX = void 0, prevY = void 0; - if (i == start) { - prevX = 0; - prevY = 0; - } - else { - prevX = curves[i - 2]; - prevY = curves[i - 1]; - } - return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX); - } - } - var y = curves[i - 1]; - return y + (1 - y) * (percent - x) / (1 - x); - }; - CurveTimeline.LINEAR = 0; - CurveTimeline.STEPPED = 1; - CurveTimeline.BEZIER = 2; - CurveTimeline.BEZIER_SIZE = 10 * 2 - 1; - return CurveTimeline; - }()); - core.CurveTimeline = CurveTimeline; - var RotateTimeline = (function (_super) { - __extends(RotateTimeline, _super); - function RotateTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount << 1); - return _this; - } - RotateTimeline.prototype.getPropertyId = function () { - return (TimelineType.rotate << 24) + this.boneIndex; - }; - RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) { - frameIndex <<= 1; - this.frames[frameIndex] = time; - this.frames[frameIndex + RotateTimeline.ROTATION] = degrees; - }; - RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { - var frames = this.frames; - var bone = skeleton.bones[this.boneIndex]; - if (!bone.active) - return; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - bone.rotation = bone.data.rotation; - return; - case MixBlend.first: - var r_1 = bone.data.rotation - bone.rotation; - bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha; - } - return; - } - if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { - var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION]; - switch (blend) { - case MixBlend.setup: - bone.rotation = bone.data.rotation + r_2 * alpha; - break; - case MixBlend.first: - case MixBlend.replace: - r_2 += bone.data.rotation - bone.rotation; - r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360; - case MixBlend.add: - bone.rotation += r_2 * alpha; - } - return; - } - var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES); - var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime)); - var r = frames[frame + RotateTimeline.ROTATION] - prevRotation; - r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent; - switch (blend) { - case MixBlend.setup: - bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha; - break; - case MixBlend.first: - case MixBlend.replace: - r += bone.data.rotation - bone.rotation; - case MixBlend.add: - bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha; - } - }; - RotateTimeline.ENTRIES = 2; - RotateTimeline.PREV_TIME = -2; - RotateTimeline.PREV_ROTATION = -1; - RotateTimeline.ROTATION = 1; - return RotateTimeline; - }(CurveTimeline)); - core.RotateTimeline = RotateTimeline; - var TranslateTimeline = (function (_super) { - __extends(TranslateTimeline, _super); - function TranslateTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES); - return _this; - } - TranslateTimeline.prototype.getPropertyId = function () { - return (TimelineType.translate << 24) + this.boneIndex; - }; - TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) { - frameIndex *= TranslateTimeline.ENTRIES; - this.frames[frameIndex] = time; - this.frames[frameIndex + TranslateTimeline.X] = x; - this.frames[frameIndex + TranslateTimeline.Y] = y; - }; - TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { - var frames = this.frames; - var bone = skeleton.bones[this.boneIndex]; - if (!bone.active) - return; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - bone.x = bone.data.x; - bone.y = bone.data.y; - return; - case MixBlend.first: - bone.x += (bone.data.x - bone.x) * alpha; - bone.y += (bone.data.y - bone.y) * alpha; - } - return; - } - var x = 0, y = 0; - if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { - x = frames[frames.length + TranslateTimeline.PREV_X]; - y = frames[frames.length + TranslateTimeline.PREV_Y]; - } - else { - var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES); - x = frames[frame + TranslateTimeline.PREV_X]; - y = frames[frame + TranslateTimeline.PREV_Y]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime)); - x += (frames[frame + TranslateTimeline.X] - x) * percent; - y += (frames[frame + TranslateTimeline.Y] - y) * percent; - } - switch (blend) { - case MixBlend.setup: - bone.x = bone.data.x + x * alpha; - bone.y = bone.data.y + y * alpha; - break; - case MixBlend.first: - case MixBlend.replace: - bone.x += (bone.data.x + x - bone.x) * alpha; - bone.y += (bone.data.y + y - bone.y) * alpha; - break; - case MixBlend.add: - bone.x += x * alpha; - bone.y += y * alpha; - } - }; - TranslateTimeline.ENTRIES = 3; - TranslateTimeline.PREV_TIME = -3; - TranslateTimeline.PREV_X = -2; - TranslateTimeline.PREV_Y = -1; - TranslateTimeline.X = 1; - TranslateTimeline.Y = 2; - return TranslateTimeline; - }(CurveTimeline)); - core.TranslateTimeline = TranslateTimeline; - var ScaleTimeline = (function (_super) { - __extends(ScaleTimeline, _super); - function ScaleTimeline(frameCount) { - return _super.call(this, frameCount) || this; - } - ScaleTimeline.prototype.getPropertyId = function () { - return (TimelineType.scale << 24) + this.boneIndex; - }; - ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { - var frames = this.frames; - var bone = skeleton.bones[this.boneIndex]; - if (!bone.active) - return; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - bone.scaleX = bone.data.scaleX; - bone.scaleY = bone.data.scaleY; - return; - case MixBlend.first: - bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha; - bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha; - } - return; - } - var x = 0, y = 0; - if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { - x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX; - y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY; - } - else { - var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES); - x = frames[frame + ScaleTimeline.PREV_X]; - y = frames[frame + ScaleTimeline.PREV_Y]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime)); - x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX; - y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY; - } - if (alpha == 1) { - if (blend == MixBlend.add) { - bone.scaleX += x - bone.data.scaleX; - bone.scaleY += y - bone.data.scaleY; - } - else { - bone.scaleX = x; - bone.scaleY = y; - } - } - else { - var bx = 0, by = 0; - if (direction == MixDirection.mixOut) { - switch (blend) { - case MixBlend.setup: - bx = bone.data.scaleX; - by = bone.data.scaleY; - bone.scaleX = bx + (Math.abs(x) * core.MathUtils.signum(bx) - bx) * alpha; - bone.scaleY = by + (Math.abs(y) * core.MathUtils.signum(by) - by) * alpha; - break; - case MixBlend.first: - case MixBlend.replace: - bx = bone.scaleX; - by = bone.scaleY; - bone.scaleX = bx + (Math.abs(x) * core.MathUtils.signum(bx) - bx) * alpha; - bone.scaleY = by + (Math.abs(y) * core.MathUtils.signum(by) - by) * alpha; - break; - case MixBlend.add: - bx = bone.scaleX; - by = bone.scaleY; - bone.scaleX = bx + (Math.abs(x) * core.MathUtils.signum(bx) - bone.data.scaleX) * alpha; - bone.scaleY = by + (Math.abs(y) * core.MathUtils.signum(by) - bone.data.scaleY) * alpha; - } - } - else { - switch (blend) { - case MixBlend.setup: - bx = Math.abs(bone.data.scaleX) * core.MathUtils.signum(x); - by = Math.abs(bone.data.scaleY) * core.MathUtils.signum(y); - bone.scaleX = bx + (x - bx) * alpha; - bone.scaleY = by + (y - by) * alpha; - break; - case MixBlend.first: - case MixBlend.replace: - bx = Math.abs(bone.scaleX) * core.MathUtils.signum(x); - by = Math.abs(bone.scaleY) * core.MathUtils.signum(y); - bone.scaleX = bx + (x - bx) * alpha; - bone.scaleY = by + (y - by) * alpha; - break; - case MixBlend.add: - bx = core.MathUtils.signum(x); - by = core.MathUtils.signum(y); - bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha; - bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha; - } - } - } - }; - return ScaleTimeline; - }(TranslateTimeline)); - core.ScaleTimeline = ScaleTimeline; - var ShearTimeline = (function (_super) { - __extends(ShearTimeline, _super); - function ShearTimeline(frameCount) { - return _super.call(this, frameCount) || this; - } - ShearTimeline.prototype.getPropertyId = function () { - return (TimelineType.shear << 24) + this.boneIndex; - }; - ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { - var frames = this.frames; - var bone = skeleton.bones[this.boneIndex]; - if (!bone.active) - return; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - bone.shearX = bone.data.shearX; - bone.shearY = bone.data.shearY; - return; - case MixBlend.first: - bone.shearX += (bone.data.shearX - bone.shearX) * alpha; - bone.shearY += (bone.data.shearY - bone.shearY) * alpha; - } - return; - } - var x = 0, y = 0; - if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { - x = frames[frames.length + ShearTimeline.PREV_X]; - y = frames[frames.length + ShearTimeline.PREV_Y]; - } - else { - var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES); - x = frames[frame + ShearTimeline.PREV_X]; - y = frames[frame + ShearTimeline.PREV_Y]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime)); - x = x + (frames[frame + ShearTimeline.X] - x) * percent; - y = y + (frames[frame + ShearTimeline.Y] - y) * percent; - } - switch (blend) { - case MixBlend.setup: - bone.shearX = bone.data.shearX + x * alpha; - bone.shearY = bone.data.shearY + y * alpha; - break; - case MixBlend.first: - case MixBlend.replace: - bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha; - bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha; - break; - case MixBlend.add: - bone.shearX += x * alpha; - bone.shearY += y * alpha; - } - }; - return ShearTimeline; - }(TranslateTimeline)); - core.ShearTimeline = ShearTimeline; - var ColorTimeline = (function (_super) { - __extends(ColorTimeline, _super); - function ColorTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES); - return _this; - } - ColorTimeline.prototype.getPropertyId = function () { - return (TimelineType.color << 24) + this.slotIndex; - }; - ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) { - frameIndex *= ColorTimeline.ENTRIES; - this.frames[frameIndex] = time; - this.frames[frameIndex + ColorTimeline.R] = r; - this.frames[frameIndex + ColorTimeline.G] = g; - this.frames[frameIndex + ColorTimeline.B] = b; - this.frames[frameIndex + ColorTimeline.A] = a; - }; - ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { - var slot = skeleton.slots[this.slotIndex]; - if (!slot.bone.active) - return; - var frames = this.frames; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - slot.color.setFromColor(slot.data.color); - return; - case MixBlend.first: - var color = slot.color, setup = slot.data.color; - color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha); - } - return; - } - var r = 0, g = 0, b = 0, a = 0; - if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { - var i = frames.length; - r = frames[i + ColorTimeline.PREV_R]; - g = frames[i + ColorTimeline.PREV_G]; - b = frames[i + ColorTimeline.PREV_B]; - a = frames[i + ColorTimeline.PREV_A]; - } - else { - var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES); - r = frames[frame + ColorTimeline.PREV_R]; - g = frames[frame + ColorTimeline.PREV_G]; - b = frames[frame + ColorTimeline.PREV_B]; - a = frames[frame + ColorTimeline.PREV_A]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime)); - r += (frames[frame + ColorTimeline.R] - r) * percent; - g += (frames[frame + ColorTimeline.G] - g) * percent; - b += (frames[frame + ColorTimeline.B] - b) * percent; - a += (frames[frame + ColorTimeline.A] - a) * percent; - } - if (alpha == 1) - slot.color.set(r, g, b, a); - else { - var color = slot.color; - if (blend == MixBlend.setup) - color.setFromColor(slot.data.color); - color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha); - } - }; - ColorTimeline.ENTRIES = 5; - ColorTimeline.PREV_TIME = -5; - ColorTimeline.PREV_R = -4; - ColorTimeline.PREV_G = -3; - ColorTimeline.PREV_B = -2; - ColorTimeline.PREV_A = -1; - ColorTimeline.R = 1; - ColorTimeline.G = 2; - ColorTimeline.B = 3; - ColorTimeline.A = 4; - return ColorTimeline; - }(CurveTimeline)); - core.ColorTimeline = ColorTimeline; - var TwoColorTimeline = (function (_super) { - __extends(TwoColorTimeline, _super); - function TwoColorTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES); - return _this; - } - TwoColorTimeline.prototype.getPropertyId = function () { - return (TimelineType.twoColor << 24) + this.slotIndex; - }; - TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) { - frameIndex *= TwoColorTimeline.ENTRIES; - this.frames[frameIndex] = time; - this.frames[frameIndex + TwoColorTimeline.R] = r; - this.frames[frameIndex + TwoColorTimeline.G] = g; - this.frames[frameIndex + TwoColorTimeline.B] = b; - this.frames[frameIndex + TwoColorTimeline.A] = a; - this.frames[frameIndex + TwoColorTimeline.R2] = r2; - this.frames[frameIndex + TwoColorTimeline.G2] = g2; - this.frames[frameIndex + TwoColorTimeline.B2] = b2; - }; - TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { - var slot = skeleton.slots[this.slotIndex]; - if (!slot.bone.active) - return; - var frames = this.frames; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - slot.color.setFromColor(slot.data.color); - slot.darkColor.setFromColor(slot.data.darkColor); - return; - case MixBlend.first: - var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor; - light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha); - dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0); - } - return; - } - var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0; - if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { - var i = frames.length; - r = frames[i + TwoColorTimeline.PREV_R]; - g = frames[i + TwoColorTimeline.PREV_G]; - b = frames[i + TwoColorTimeline.PREV_B]; - a = frames[i + TwoColorTimeline.PREV_A]; - r2 = frames[i + TwoColorTimeline.PREV_R2]; - g2 = frames[i + TwoColorTimeline.PREV_G2]; - b2 = frames[i + TwoColorTimeline.PREV_B2]; - } - else { - var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES); - r = frames[frame + TwoColorTimeline.PREV_R]; - g = frames[frame + TwoColorTimeline.PREV_G]; - b = frames[frame + TwoColorTimeline.PREV_B]; - a = frames[frame + TwoColorTimeline.PREV_A]; - r2 = frames[frame + TwoColorTimeline.PREV_R2]; - g2 = frames[frame + TwoColorTimeline.PREV_G2]; - b2 = frames[frame + TwoColorTimeline.PREV_B2]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime)); - r += (frames[frame + TwoColorTimeline.R] - r) * percent; - g += (frames[frame + TwoColorTimeline.G] - g) * percent; - b += (frames[frame + TwoColorTimeline.B] - b) * percent; - a += (frames[frame + TwoColorTimeline.A] - a) * percent; - r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent; - g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent; - b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent; - } - if (alpha == 1) { - slot.color.set(r, g, b, a); - slot.darkColor.set(r2, g2, b2, 1); - } - else { - var light = slot.color, dark = slot.darkColor; - if (blend == MixBlend.setup) { - light.setFromColor(slot.data.color); - dark.setFromColor(slot.data.darkColor); - } - light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha); - dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0); - } - }; - TwoColorTimeline.ENTRIES = 8; - TwoColorTimeline.PREV_TIME = -8; - TwoColorTimeline.PREV_R = -7; - TwoColorTimeline.PREV_G = -6; - TwoColorTimeline.PREV_B = -5; - TwoColorTimeline.PREV_A = -4; - TwoColorTimeline.PREV_R2 = -3; - TwoColorTimeline.PREV_G2 = -2; - TwoColorTimeline.PREV_B2 = -1; - TwoColorTimeline.R = 1; - TwoColorTimeline.G = 2; - TwoColorTimeline.B = 3; - TwoColorTimeline.A = 4; - TwoColorTimeline.R2 = 5; - TwoColorTimeline.G2 = 6; - TwoColorTimeline.B2 = 7; - return TwoColorTimeline; - }(CurveTimeline)); - core.TwoColorTimeline = TwoColorTimeline; - var AttachmentTimeline = (function () { - function AttachmentTimeline(frameCount) { - this.frames = core.Utils.newFloatArray(frameCount); - this.attachmentNames = new Array(frameCount); - } - AttachmentTimeline.prototype.getPropertyId = function () { - return (TimelineType.attachment << 24) + this.slotIndex; - }; - AttachmentTimeline.prototype.getFrameCount = function () { - return this.frames.length; - }; - AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) { - this.frames[frameIndex] = time; - this.attachmentNames[frameIndex] = attachmentName; - }; - AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { - var slot = skeleton.slots[this.slotIndex]; - if (!slot.bone.active) - return; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - var attachmentName_1 = slot.data.attachmentName; - slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); - return; - } - var frames = this.frames; - if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) { - var attachmentName_2 = slot.data.attachmentName; - slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); - } - return; - } - var frameIndex = 0; - if (time >= frames[frames.length - 1]) - frameIndex = frames.length - 1; - else - frameIndex = Animation.binarySearch(frames, time, 1) - 1; - var attachmentName = this.attachmentNames[frameIndex]; - skeleton.slots[this.slotIndex] - .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); - }; - return AttachmentTimeline; - }()); - core.AttachmentTimeline = AttachmentTimeline; - var zeros = null; - var DeformTimeline = (function (_super) { - __extends(DeformTimeline, _super); - function DeformTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount); - _this.frameVertices = new Array(frameCount); - if (zeros == null) - zeros = core.Utils.newFloatArray(64); - return _this; - } - DeformTimeline.prototype.getPropertyId = function () { - return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex; - }; - DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) { - this.frames[frameIndex] = time; - this.frameVertices[frameIndex] = vertices; - }; - DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { - var slot = skeleton.slots[this.slotIndex]; - if (!slot.bone.active) - return; - var slotAttachment = slot.getAttachment(); - if (!(slotAttachment instanceof core.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment)) - return; - var deformArray = slot.deform; - if (deformArray.length == 0) - blend = MixBlend.setup; - var frameVertices = this.frameVertices; - var vertexCount = frameVertices[0].length; - var frames = this.frames; - if (time < frames[0]) { - var vertexAttachment = slotAttachment; - switch (blend) { - case MixBlend.setup: - deformArray.length = 0; - return; - case MixBlend.first: - if (alpha == 1) { - deformArray.length = 0; - break; - } - var deform_1 = core.Utils.setArraySize(deformArray, vertexCount); - if (vertexAttachment.bones == null) { - var setupVertices = vertexAttachment.vertices; - for (var i = 0; i < vertexCount; i++) - deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha; - } - else { - alpha = 1 - alpha; - for (var i = 0; i < vertexCount; i++) - deform_1[i] *= alpha; - } - } - return; - } - var deform = core.Utils.setArraySize(deformArray, vertexCount); - if (time >= frames[frames.length - 1]) { - var lastVertices = frameVertices[frames.length - 1]; - if (alpha == 1) { - if (blend == MixBlend.add) { - var vertexAttachment = slotAttachment; - if (vertexAttachment.bones == null) { - var setupVertices = vertexAttachment.vertices; - for (var i_1 = 0; i_1 < vertexCount; i_1++) { - deform[i_1] += lastVertices[i_1] - setupVertices[i_1]; - } - } - else { - for (var i_2 = 0; i_2 < vertexCount; i_2++) - deform[i_2] += lastVertices[i_2]; - } - } - else { - core.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount); - } - } - else { - switch (blend) { - case MixBlend.setup: { - var vertexAttachment_1 = slotAttachment; - if (vertexAttachment_1.bones == null) { - var setupVertices = vertexAttachment_1.vertices; - for (var i_3 = 0; i_3 < vertexCount; i_3++) { - var setup = setupVertices[i_3]; - deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha; - } - } - else { - for (var i_4 = 0; i_4 < vertexCount; i_4++) - deform[i_4] = lastVertices[i_4] * alpha; - } - break; - } - case MixBlend.first: - case MixBlend.replace: - for (var i_5 = 0; i_5 < vertexCount; i_5++) - deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; - case MixBlend.add: - var vertexAttachment = slotAttachment; - if (vertexAttachment.bones == null) { - var setupVertices = vertexAttachment.vertices; - for (var i_6 = 0; i_6 < vertexCount; i_6++) { - deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha; - } - } - else { - for (var i_7 = 0; i_7 < vertexCount; i_7++) - deform[i_7] += lastVertices[i_7] * alpha; - } - } - } - return; - } - var frame = Animation.binarySearch(frames, time); - var prevVertices = frameVertices[frame - 1]; - var nextVertices = frameVertices[frame]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime)); - if (alpha == 1) { - if (blend == MixBlend.add) { - var vertexAttachment = slotAttachment; - if (vertexAttachment.bones == null) { - var setupVertices = vertexAttachment.vertices; - for (var i_8 = 0; i_8 < vertexCount; i_8++) { - var prev = prevVertices[i_8]; - deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8]; - } - } - else { - for (var i_9 = 0; i_9 < vertexCount; i_9++) { - var prev = prevVertices[i_9]; - deform[i_9] += prev + (nextVertices[i_9] - prev) * percent; - } - } - } - else { - for (var i_10 = 0; i_10 < vertexCount; i_10++) { - var prev = prevVertices[i_10]; - deform[i_10] = prev + (nextVertices[i_10] - prev) * percent; - } - } - } - else { - switch (blend) { - case MixBlend.setup: { - var vertexAttachment_2 = slotAttachment; - if (vertexAttachment_2.bones == null) { - var setupVertices = vertexAttachment_2.vertices; - for (var i_11 = 0; i_11 < vertexCount; i_11++) { - var prev = prevVertices[i_11], setup = setupVertices[i_11]; - deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha; - } - } - else { - for (var i_12 = 0; i_12 < vertexCount; i_12++) { - var prev = prevVertices[i_12]; - deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha; - } - } - break; - } - case MixBlend.first: - case MixBlend.replace: - for (var i_13 = 0; i_13 < vertexCount; i_13++) { - var prev = prevVertices[i_13]; - deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha; - } - break; - case MixBlend.add: - var vertexAttachment = slotAttachment; - if (vertexAttachment.bones == null) { - var setupVertices = vertexAttachment.vertices; - for (var i_14 = 0; i_14 < vertexCount; i_14++) { - var prev = prevVertices[i_14]; - deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha; - } - } - else { - for (var i_15 = 0; i_15 < vertexCount; i_15++) { - var prev = prevVertices[i_15]; - deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha; - } - } - } - } - }; - return DeformTimeline; - }(CurveTimeline)); - core.DeformTimeline = DeformTimeline; - var EventTimeline = (function () { - function EventTimeline(frameCount) { - this.frames = core.Utils.newFloatArray(frameCount); - this.events = new Array(frameCount); - } - EventTimeline.prototype.getPropertyId = function () { - return TimelineType.event << 24; - }; - EventTimeline.prototype.getFrameCount = function () { - return this.frames.length; - }; - EventTimeline.prototype.setFrame = function (frameIndex, event) { - this.frames[frameIndex] = event.time; - this.events[frameIndex] = event; - }; - EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { - if (firedEvents == null) - return; - var frames = this.frames; - var frameCount = this.frames.length; - if (lastTime > time) { - this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction); - lastTime = -1; - } - else if (lastTime >= frames[frameCount - 1]) - return; - if (time < frames[0]) - return; - var frame = 0; - if (lastTime < frames[0]) - frame = 0; - else { - frame = Animation.binarySearch(frames, lastTime); - var frameTime = frames[frame]; - while (frame > 0) { - if (frames[frame - 1] != frameTime) - break; - frame--; - } - } - for (; frame < frameCount && time >= frames[frame]; frame++) - firedEvents.push(this.events[frame]); - }; - return EventTimeline; - }()); - core.EventTimeline = EventTimeline; - var DrawOrderTimeline = (function () { - function DrawOrderTimeline(frameCount) { - this.frames = core.Utils.newFloatArray(frameCount); - this.drawOrders = new Array(frameCount); - } - DrawOrderTimeline.prototype.getPropertyId = function () { - return TimelineType.drawOrder << 24; - }; - DrawOrderTimeline.prototype.getFrameCount = function () { - return this.frames.length; - }; - DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) { - this.frames[frameIndex] = time; - this.drawOrders[frameIndex] = drawOrder; - }; - DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { - var drawOrder = skeleton.drawOrder; - var slots = skeleton.slots; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - core.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); - return; - } - var frames = this.frames; - if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) - core.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); - return; - } - var frame = 0; - if (time >= frames[frames.length - 1]) - frame = frames.length - 1; - else - frame = Animation.binarySearch(frames, time) - 1; - var drawOrderToSetupIndex = this.drawOrders[frame]; - if (drawOrderToSetupIndex == null) - core.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length); - else { - for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++) - drawOrder[i] = slots[drawOrderToSetupIndex[i]]; - } - }; - return DrawOrderTimeline; - }()); - core.DrawOrderTimeline = DrawOrderTimeline; - var IkConstraintTimeline = (function (_super) { - __extends(IkConstraintTimeline, _super); - function IkConstraintTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES); - return _this; - } - IkConstraintTimeline.prototype.getPropertyId = function () { - return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex; - }; - IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) { - frameIndex *= IkConstraintTimeline.ENTRIES; - this.frames[frameIndex] = time; - this.frames[frameIndex + IkConstraintTimeline.MIX] = mix; - this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness; - this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection; - this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0; - this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0; - }; - IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { - var frames = this.frames; - var constraint = skeleton.ikConstraints[this.ikConstraintIndex]; - if (!constraint.active) - return; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - constraint.mix = constraint.data.mix; - constraint.softness = constraint.data.softness; - constraint.bendDirection = constraint.data.bendDirection; - constraint.compress = constraint.data.compress; - constraint.stretch = constraint.data.stretch; - return; - case MixBlend.first: - constraint.mix += (constraint.data.mix - constraint.mix) * alpha; - constraint.softness += (constraint.data.softness - constraint.softness) * alpha; - constraint.bendDirection = constraint.data.bendDirection; - constraint.compress = constraint.data.compress; - constraint.stretch = constraint.data.stretch; - } - return; - } - if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { - if (blend == MixBlend.setup) { - constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha; - constraint.softness = constraint.data.softness - + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha; - if (direction == MixDirection.mixOut) { - constraint.bendDirection = constraint.data.bendDirection; - constraint.compress = constraint.data.compress; - constraint.stretch = constraint.data.stretch; - } - else { - constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]; - constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0; - constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0; - } - } - else { - constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha; - constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha; - if (direction == MixDirection.mixIn) { - constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]; - constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0; - constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0; - } - } - return; - } - var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES); - var mix = frames[frame + IkConstraintTimeline.PREV_MIX]; - var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime)); - if (blend == MixBlend.setup) { - constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha; - constraint.softness = constraint.data.softness - + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha; - if (direction == MixDirection.mixOut) { - constraint.bendDirection = constraint.data.bendDirection; - constraint.compress = constraint.data.compress; - constraint.stretch = constraint.data.stretch; - } - else { - constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]; - constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0; - constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0; - } - } - else { - constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha; - constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha; - if (direction == MixDirection.mixIn) { - constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]; - constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0; - constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0; - } - } - }; - IkConstraintTimeline.ENTRIES = 6; - IkConstraintTimeline.PREV_TIME = -6; - IkConstraintTimeline.PREV_MIX = -5; - IkConstraintTimeline.PREV_SOFTNESS = -4; - IkConstraintTimeline.PREV_BEND_DIRECTION = -3; - IkConstraintTimeline.PREV_COMPRESS = -2; - IkConstraintTimeline.PREV_STRETCH = -1; - IkConstraintTimeline.MIX = 1; - IkConstraintTimeline.SOFTNESS = 2; - IkConstraintTimeline.BEND_DIRECTION = 3; - IkConstraintTimeline.COMPRESS = 4; - IkConstraintTimeline.STRETCH = 5; - return IkConstraintTimeline; - }(CurveTimeline)); - core.IkConstraintTimeline = IkConstraintTimeline; - var TransformConstraintTimeline = (function (_super) { - __extends(TransformConstraintTimeline, _super); - function TransformConstraintTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES); - return _this; - } - TransformConstraintTimeline.prototype.getPropertyId = function () { - return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex; - }; - TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) { - frameIndex *= TransformConstraintTimeline.ENTRIES; - this.frames[frameIndex] = time; - this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix; - this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix; - this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix; - this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix; - }; - TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { - var frames = this.frames; - var constraint = skeleton.transformConstraints[this.transformConstraintIndex]; - if (!constraint.active) - return; - if (time < frames[0]) { - var data = constraint.data; - switch (blend) { - case MixBlend.setup: - constraint.rotateMix = data.rotateMix; - constraint.translateMix = data.translateMix; - constraint.scaleMix = data.scaleMix; - constraint.shearMix = data.shearMix; - return; - case MixBlend.first: - constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha; - constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha; - constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha; - constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha; - } - return; - } - var rotate = 0, translate = 0, scale = 0, shear = 0; - if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { - var i = frames.length; - rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE]; - translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE]; - scale = frames[i + TransformConstraintTimeline.PREV_SCALE]; - shear = frames[i + TransformConstraintTimeline.PREV_SHEAR]; - } - else { - var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES); - rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE]; - translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE]; - scale = frames[frame + TransformConstraintTimeline.PREV_SCALE]; - shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime)); - rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent; - translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent; - scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent; - shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent; - } - if (blend == MixBlend.setup) { - var data = constraint.data; - constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha; - constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha; - constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha; - constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha; - } - else { - constraint.rotateMix += (rotate - constraint.rotateMix) * alpha; - constraint.translateMix += (translate - constraint.translateMix) * alpha; - constraint.scaleMix += (scale - constraint.scaleMix) * alpha; - constraint.shearMix += (shear - constraint.shearMix) * alpha; - } - }; - TransformConstraintTimeline.ENTRIES = 5; - TransformConstraintTimeline.PREV_TIME = -5; - TransformConstraintTimeline.PREV_ROTATE = -4; - TransformConstraintTimeline.PREV_TRANSLATE = -3; - TransformConstraintTimeline.PREV_SCALE = -2; - TransformConstraintTimeline.PREV_SHEAR = -1; - TransformConstraintTimeline.ROTATE = 1; - TransformConstraintTimeline.TRANSLATE = 2; - TransformConstraintTimeline.SCALE = 3; - TransformConstraintTimeline.SHEAR = 4; - return TransformConstraintTimeline; - }(CurveTimeline)); - core.TransformConstraintTimeline = TransformConstraintTimeline; - var PathConstraintPositionTimeline = (function (_super) { - __extends(PathConstraintPositionTimeline, _super); - function PathConstraintPositionTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES); - return _this; - } - PathConstraintPositionTimeline.prototype.getPropertyId = function () { - return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex; - }; - PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) { - frameIndex *= PathConstraintPositionTimeline.ENTRIES; - this.frames[frameIndex] = time; - this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value; - }; - PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { - var frames = this.frames; - var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; - if (!constraint.active) - return; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - constraint.position = constraint.data.position; - return; - case MixBlend.first: - constraint.position += (constraint.data.position - constraint.position) * alpha; - } - return; - } - var position = 0; - if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) - position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE]; - else { - var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES); - position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime)); - position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent; - } - if (blend == MixBlend.setup) - constraint.position = constraint.data.position + (position - constraint.data.position) * alpha; - else - constraint.position += (position - constraint.position) * alpha; - }; - PathConstraintPositionTimeline.ENTRIES = 2; - PathConstraintPositionTimeline.PREV_TIME = -2; - PathConstraintPositionTimeline.PREV_VALUE = -1; - PathConstraintPositionTimeline.VALUE = 1; - return PathConstraintPositionTimeline; - }(CurveTimeline)); - core.PathConstraintPositionTimeline = PathConstraintPositionTimeline; - var PathConstraintSpacingTimeline = (function (_super) { - __extends(PathConstraintSpacingTimeline, _super); - function PathConstraintSpacingTimeline(frameCount) { - return _super.call(this, frameCount) || this; - } - PathConstraintSpacingTimeline.prototype.getPropertyId = function () { - return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex; - }; - PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { - var frames = this.frames; - var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; - if (!constraint.active) - return; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - constraint.spacing = constraint.data.spacing; - return; - case MixBlend.first: - constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha; - } - return; - } - var spacing = 0; - if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) - spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE]; - else { - var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES); - spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime)); - spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent; - } - if (blend == MixBlend.setup) - constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha; - else - constraint.spacing += (spacing - constraint.spacing) * alpha; - }; - return PathConstraintSpacingTimeline; - }(PathConstraintPositionTimeline)); - core.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline; - var PathConstraintMixTimeline = (function (_super) { - __extends(PathConstraintMixTimeline, _super); - function PathConstraintMixTimeline(frameCount) { - var _this = _super.call(this, frameCount) || this; - _this.frames = core.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES); - return _this; - } - PathConstraintMixTimeline.prototype.getPropertyId = function () { - return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex; - }; - PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) { - frameIndex *= PathConstraintMixTimeline.ENTRIES; - this.frames[frameIndex] = time; - this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix; - this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix; - }; - PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { - var frames = this.frames; - var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; - if (!constraint.active) - return; - if (time < frames[0]) { - switch (blend) { - case MixBlend.setup: - constraint.rotateMix = constraint.data.rotateMix; - constraint.translateMix = constraint.data.translateMix; - return; - case MixBlend.first: - constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha; - constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha; - } - return; - } - var rotate = 0, translate = 0; - if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { - rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE]; - translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE]; - } - else { - var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES); - rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE]; - translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE]; - var frameTime = frames[frame]; - var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime)); - rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent; - translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent; - } - if (blend == MixBlend.setup) { - constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha; - constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha; - } - else { - constraint.rotateMix += (rotate - constraint.rotateMix) * alpha; - constraint.translateMix += (translate - constraint.translateMix) * alpha; - } - }; - PathConstraintMixTimeline.ENTRIES = 3; - PathConstraintMixTimeline.PREV_TIME = -3; - PathConstraintMixTimeline.PREV_ROTATE = -2; - PathConstraintMixTimeline.PREV_TRANSLATE = -1; - PathConstraintMixTimeline.ROTATE = 1; - PathConstraintMixTimeline.TRANSLATE = 2; - return PathConstraintMixTimeline; - }(CurveTimeline)); - core.PathConstraintMixTimeline = PathConstraintMixTimeline; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var AnimationState = (function () { - function AnimationState(data) { - this.tracks = new Array(); - this.events = new Array(); - this.listeners = new Array(); - this.queue = new EventQueue(this); - this.propertyIDs = new core.IntSet(); - this.animationsChanged = false; - this.timeScale = 1; - this.trackEntryPool = new core.Pool(function () { return new TrackEntry(); }); - this.data = data; - } - AnimationState.prototype.update = function (delta) { - delta *= this.timeScale; - var tracks = this.tracks; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; - if (current == null) - continue; - current.animationLast = current.nextAnimationLast; - current.trackLast = current.nextTrackLast; - var currentDelta = delta * current.timeScale; - if (current.delay > 0) { - current.delay -= currentDelta; - if (current.delay > 0) - continue; - currentDelta = -current.delay; - current.delay = 0; - } - var next = current.next; - if (next != null) { - var nextTime = current.trackLast - next.delay; - if (nextTime >= 0) { - next.delay = 0; - next.trackTime = current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale; - current.trackTime += currentDelta; - this.setCurrent(i, next, true); - while (next.mixingFrom != null) { - next.mixTime += delta; - next = next.mixingFrom; - } - continue; - } - } - else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) { - tracks[i] = null; - this.queue.end(current); - this.disposeNext(current); - continue; - } - if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) { - var from = current.mixingFrom; - current.mixingFrom = null; - if (from != null) - from.mixingTo = null; - while (from != null) { - this.queue.end(from); - from = from.mixingFrom; - } - } - current.trackTime += currentDelta; - } - this.queue.drain(); - }; - AnimationState.prototype.updateMixingFrom = function (to, delta) { - var from = to.mixingFrom; - if (from == null) - return true; - var finished = this.updateMixingFrom(from, delta); - from.animationLast = from.nextAnimationLast; - from.trackLast = from.nextTrackLast; - if (to.mixTime > 0 && to.mixTime >= to.mixDuration) { - if (from.totalAlpha == 0 || to.mixDuration == 0) { - to.mixingFrom = from.mixingFrom; - if (from.mixingFrom != null) - from.mixingFrom.mixingTo = to; - to.interruptAlpha = from.interruptAlpha; - this.queue.end(from); - } - return finished; - } - from.trackTime += delta * from.timeScale; - to.mixTime += delta; - return false; - }; - AnimationState.prototype.apply = function (skeleton) { - if (skeleton == null) - throw new Error("skeleton cannot be null."); - if (this.animationsChanged) - this._animationsChanged(); - var events = this.events; - var tracks = this.tracks; - var applied = false; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; - if (current == null || current.delay > 0) - continue; - applied = true; - var blend = i == 0 ? core.MixBlend.first : current.mixBlend; - var mix = current.alpha; - if (current.mixingFrom != null) - mix *= this.applyMixingFrom(current, skeleton, blend); - else if (current.trackTime >= current.trackEnd && current.next == null) - mix = 0; - var animationLast = current.animationLast, animationTime = current.getAnimationTime(); - var timelineCount = current.animation.timelines.length; - var timelines = current.animation.timelines; - if ((i == 0 && mix == 1) || blend == core.MixBlend.add) { - for (var ii = 0; ii < timelineCount; ii++) { - core.Utils.webkit602BugfixHelper(mix, blend); - timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, core.MixDirection.mixIn); - } - } - else { - var timelineMode = current.timelineMode; - var firstFrame = current.timelinesRotation.length == 0; - if (firstFrame) - core.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); - var timelinesRotation = current.timelinesRotation; - for (var ii = 0; ii < timelineCount; ii++) { - var timeline = timelines[ii]; - var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : core.MixBlend.setup; - if (timeline instanceof core.RotateTimeline) { - this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); - } - else { - core.Utils.webkit602BugfixHelper(mix, blend); - timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, core.MixDirection.mixIn); - } - } - } - this.queueEvents(current, animationTime); - events.length = 0; - current.nextAnimationLast = animationTime; - current.nextTrackLast = current.trackTime; - } - this.queue.drain(); - return applied; - }; - AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) { - var from = to.mixingFrom; - if (from.mixingFrom != null) - this.applyMixingFrom(from, skeleton, blend); - var mix = 0; - if (to.mixDuration == 0) { - mix = 1; - if (blend == core.MixBlend.first) - blend = core.MixBlend.setup; - } - else { - mix = to.mixTime / to.mixDuration; - if (mix > 1) - mix = 1; - if (blend != core.MixBlend.first) - blend = from.mixBlend; - } - var events = mix < from.eventThreshold ? this.events : null; - var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold; - var animationLast = from.animationLast, animationTime = from.getAnimationTime(); - var timelineCount = from.animation.timelines.length; - var timelines = from.animation.timelines; - var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix); - if (blend == core.MixBlend.add) { - for (var i = 0; i < timelineCount; i++) - timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, core.MixDirection.mixOut); - } - else { - var timelineMode = from.timelineMode; - var timelineHoldMix = from.timelineHoldMix; - var firstFrame = from.timelinesRotation.length == 0; - if (firstFrame) - core.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null); - var timelinesRotation = from.timelinesRotation; - from.totalAlpha = 0; - for (var i = 0; i < timelineCount; i++) { - var timeline = timelines[i]; - var direction = core.MixDirection.mixOut; - var timelineBlend = void 0; - var alpha = 0; - switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { - case AnimationState.SUBSEQUENT: - if (!attachments && timeline instanceof core.AttachmentTimeline) { - if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - continue; - blend = core.MixBlend.setup; - } - if (!drawOrder && timeline instanceof core.DrawOrderTimeline) - continue; - timelineBlend = blend; - alpha = alphaMix; - break; - case AnimationState.FIRST: - timelineBlend = core.MixBlend.setup; - alpha = alphaMix; - break; - case AnimationState.HOLD: - timelineBlend = core.MixBlend.setup; - alpha = alphaHold; - break; - default: - timelineBlend = core.MixBlend.setup; - var holdMix = timelineHoldMix[i]; - alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration); - break; - } - from.totalAlpha += alpha; - if (timeline instanceof core.RotateTimeline) - this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); - else { - core.Utils.webkit602BugfixHelper(alpha, blend); - if (timelineBlend == core.MixBlend.setup) { - if (timeline instanceof core.AttachmentTimeline) { - if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - direction = core.MixDirection.mixIn; - } - else if (timeline instanceof core.DrawOrderTimeline) { - if (drawOrder) - direction = core.MixDirection.mixIn; - } - } - timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); - } - } - } - if (to.mixDuration > 0) - this.queueEvents(from, animationTime); - this.events.length = 0; - from.nextAnimationLast = animationTime; - from.nextTrackLast = from.trackTime; - return mix; - }; - AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { - if (firstFrame) - timelinesRotation[i] = 0; - if (alpha == 1) { - timeline.apply(skeleton, 0, time, null, 1, blend, core.MixDirection.mixIn); - return; - } - var rotateTimeline = timeline; - var frames = rotateTimeline.frames; - var bone = skeleton.bones[rotateTimeline.boneIndex]; - if (!bone.active) - return; - var r1 = 0, r2 = 0; - if (time < frames[0]) { - switch (blend) { - case core.MixBlend.setup: - bone.rotation = bone.data.rotation; - default: - return; - case core.MixBlend.first: - r1 = bone.rotation; - r2 = bone.data.rotation; - } - } - else { - r1 = blend == core.MixBlend.setup ? bone.data.rotation : bone.rotation; - if (time >= frames[frames.length - core.RotateTimeline.ENTRIES]) - r2 = bone.data.rotation + frames[frames.length + core.RotateTimeline.PREV_ROTATION]; - else { - var frame = core.Animation.binarySearch(frames, time, core.RotateTimeline.ENTRIES); - var prevRotation = frames[frame + core.RotateTimeline.PREV_ROTATION]; - var frameTime = frames[frame]; - var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + core.RotateTimeline.PREV_TIME] - frameTime)); - r2 = frames[frame + core.RotateTimeline.ROTATION] - prevRotation; - r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360; - r2 = prevRotation + r2 * percent + bone.data.rotation; - r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360; - } - } - var total = 0, diff = r2 - r1; - diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360; - if (diff == 0) { - total = timelinesRotation[i]; - } - else { - var lastTotal = 0, lastDiff = 0; - if (firstFrame) { - lastTotal = 0; - lastDiff = diff; - } - else { - lastTotal = timelinesRotation[i]; - lastDiff = timelinesRotation[i + 1]; - } - var current = diff > 0, dir = lastTotal >= 0; - if (core.MathUtils.signum(lastDiff) != core.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) { - if (Math.abs(lastTotal) > 180) - lastTotal += 360 * core.MathUtils.signum(lastTotal); - dir = current; - } - total = diff + lastTotal - lastTotal % 360; - if (dir != current) - total += 360 * core.MathUtils.signum(lastTotal); - timelinesRotation[i] = total; - } - timelinesRotation[i + 1] = diff; - r1 += total * alpha; - bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360; - }; - AnimationState.prototype.queueEvents = function (entry, animationTime) { - var animationStart = entry.animationStart, animationEnd = entry.animationEnd; - var duration = animationEnd - animationStart; - var trackLastWrapped = entry.trackLast % duration; - var events = this.events; - var i = 0, n = events.length; - for (; i < n; i++) { - var event_1 = events[i]; - if (event_1.time < trackLastWrapped) - break; - if (event_1.time > animationEnd) - continue; - this.queue.event(entry, event_1); - } - var complete = false; - if (entry.loop) - complete = duration == 0 || trackLastWrapped > entry.trackTime % duration; - else - complete = animationTime >= animationEnd && entry.animationLast < animationEnd; - if (complete) - this.queue.complete(entry); - for (; i < n; i++) { - var event_2 = events[i]; - if (event_2.time < animationStart) - continue; - this.queue.event(entry, events[i]); - } - }; - AnimationState.prototype.clearTracks = function () { - var oldDrainDisabled = this.queue.drainDisabled; - this.queue.drainDisabled = true; - for (var i = 0, n = this.tracks.length; i < n; i++) - this.clearTrack(i); - this.tracks.length = 0; - this.queue.drainDisabled = oldDrainDisabled; - this.queue.drain(); - }; - AnimationState.prototype.clearTrack = function (trackIndex) { - if (trackIndex >= this.tracks.length) - return; - var current = this.tracks[trackIndex]; - if (current == null) - return; - this.queue.end(current); - this.disposeNext(current); - var entry = current; - while (true) { - var from = entry.mixingFrom; - if (from == null) - break; - this.queue.end(from); - entry.mixingFrom = null; - entry.mixingTo = null; - entry = from; - } - this.tracks[current.trackIndex] = null; - this.queue.drain(); - }; - AnimationState.prototype.setCurrent = function (index, current, interrupt) { - var from = this.expandToIndex(index); - this.tracks[index] = current; - if (from != null) { - if (interrupt) - this.queue.interrupt(from); - current.mixingFrom = from; - from.mixingTo = current; - current.mixTime = 0; - if (from.mixingFrom != null && from.mixDuration > 0) - current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration); - from.timelinesRotation.length = 0; - } - this.queue.start(current); - }; - AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) { - var animation = this.data.skeletonData.findAnimation(animationName); - if (animation == null) - throw new Error("Animation not found: " + animationName); - return this.setAnimationWith(trackIndex, animation, loop); - }; - AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) { - if (animation == null) - throw new Error("animation cannot be null."); - var interrupt = true; - var current = this.expandToIndex(trackIndex); - if (current != null) { - if (current.nextTrackLast == -1) { - this.tracks[trackIndex] = current.mixingFrom; - this.queue.interrupt(current); - this.queue.end(current); - this.disposeNext(current); - current = current.mixingFrom; - interrupt = false; - } - else - this.disposeNext(current); - } - var entry = this.trackEntry(trackIndex, animation, loop, current); - this.setCurrent(trackIndex, entry, interrupt); - this.queue.drain(); - return entry; - }; - AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) { - var animation = this.data.skeletonData.findAnimation(animationName); - if (animation == null) - throw new Error("Animation not found: " + animationName); - return this.addAnimationWith(trackIndex, animation, loop, delay); - }; - AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) { - if (animation == null) - throw new Error("animation cannot be null."); - var last = this.expandToIndex(trackIndex); - if (last != null) { - while (last.next != null) - last = last.next; - } - var entry = this.trackEntry(trackIndex, animation, loop, last); - if (last == null) { - this.setCurrent(trackIndex, entry, true); - this.queue.drain(); - } - else { - last.next = entry; - if (delay <= 0) { - var duration = last.animationEnd - last.animationStart; - if (duration != 0) { - if (last.loop) - delay += duration * (1 + ((last.trackTime / duration) | 0)); - else - delay += Math.max(duration, last.trackTime); - delay -= this.data.getMix(last.animation, animation); - } - else - delay = last.trackTime; - } - } - entry.delay = delay; - return entry; - }; - AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) { - var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false); - entry.mixDuration = mixDuration; - entry.trackEnd = mixDuration; - return entry; - }; - AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) { - if (delay <= 0) - delay -= mixDuration; - var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay); - entry.mixDuration = mixDuration; - entry.trackEnd = mixDuration; - return entry; - }; - AnimationState.prototype.setEmptyAnimations = function (mixDuration) { - var oldDrainDisabled = this.queue.drainDisabled; - this.queue.drainDisabled = true; - for (var i = 0, n = this.tracks.length; i < n; i++) { - var current = this.tracks[i]; - if (current != null) - this.setEmptyAnimation(current.trackIndex, mixDuration); - } - this.queue.drainDisabled = oldDrainDisabled; - this.queue.drain(); - }; - AnimationState.prototype.expandToIndex = function (index) { - if (index < this.tracks.length) - return this.tracks[index]; - core.Utils.ensureArrayCapacity(this.tracks, index + 1, null); - this.tracks.length = index + 1; - return null; - }; - AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) { - var entry = this.trackEntryPool.obtain(); - entry.trackIndex = trackIndex; - entry.animation = animation; - entry.loop = loop; - entry.holdPrevious = false; - entry.eventThreshold = 0; - entry.attachmentThreshold = 0; - entry.drawOrderThreshold = 0; - entry.animationStart = 0; - entry.animationEnd = animation.duration; - entry.animationLast = -1; - entry.nextAnimationLast = -1; - entry.delay = 0; - entry.trackTime = 0; - entry.trackLast = -1; - entry.nextTrackLast = -1; - entry.trackEnd = Number.MAX_VALUE; - entry.timeScale = 1; - entry.alpha = 1; - entry.interruptAlpha = 1; - entry.mixTime = 0; - entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); - return entry; - }; - AnimationState.prototype.disposeNext = function (entry) { - var next = entry.next; - while (next != null) { - this.queue.dispose(next); - next = next.next; - } - entry.next = null; - }; - AnimationState.prototype._animationsChanged = function () { - this.animationsChanged = false; - this.propertyIDs.clear(); - for (var i = 0, n = this.tracks.length; i < n; i++) { - var entry = this.tracks[i]; - if (entry == null) - continue; - while (entry.mixingFrom != null) - entry = entry.mixingFrom; - do { - if (entry.mixingFrom == null || entry.mixBlend != core.MixBlend.add) - this.computeHold(entry); - entry = entry.mixingTo; - } while (entry != null); - } - this.propertyIDs.clear(); - for (var i = this.tracks.length - 1; i >= 0; i--) { - var entry = this.tracks[i]; - while (entry != null) { - this.computeNotLast(entry); - entry = entry.mixingFrom; - } - } - }; - AnimationState.prototype.computeHold = function (entry) { - var to = entry.mixingTo; - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = core.Utils.setArraySize(entry.timelineMode, timelinesCount); - entry.timelineHoldMix.length = 0; - var timelineDipMix = core.Utils.setArraySize(entry.timelineHoldMix, timelinesCount); - var propertyIDs = this.propertyIDs; - if (to != null && to.holdPrevious) { - for (var i = 0; i < timelinesCount; i++) { - propertyIDs.add(timelines[i].getPropertyId()); - timelineMode[i] = AnimationState.HOLD; - } - return; - } - outer: for (var i = 0; i < timelinesCount; i++) { - var timeline = timelines[i]; - var id = timeline.getPropertyId(); - if (!propertyIDs.add(id)) - timelineMode[i] = AnimationState.SUBSEQUENT; - else if (to == null || timeline instanceof core.AttachmentTimeline || timeline instanceof core.DrawOrderTimeline - || timeline instanceof core.EventTimeline || !this.hasTimeline(to, id)) { - timelineMode[i] = AnimationState.FIRST; - } - else { - for (var next = to.mixingTo; next != null; next = next.mixingTo) { - if (this.hasTimeline(next, id)) - continue; - if (entry.mixDuration > 0) { - timelineMode[i] = AnimationState.HOLD_MIX; - timelineDipMix[i] = next; - continue outer; - } - break; - } - timelineMode[i] = AnimationState.HOLD; - } - } - }; - AnimationState.prototype.computeNotLast = function (entry) { - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = entry.timelineMode; - var propertyIDs = this.propertyIDs; - for (var i = 0; i < timelinesCount; i++) { - if (timelines[i] instanceof core.AttachmentTimeline) { - var timeline = timelines[i]; - if (!propertyIDs.add(timeline.slotIndex)) - timelineMode[i] |= AnimationState.NOT_LAST; - } - } - }; - AnimationState.prototype.hasTimeline = function (entry, id) { - var timelines = entry.animation.timelines; - for (var i = 0, n = timelines.length; i < n; i++) - if (timelines[i].getPropertyId() == id) - return true; - return false; - }; - AnimationState.prototype.getCurrent = function (trackIndex) { - if (trackIndex >= this.tracks.length) - return null; - return this.tracks[trackIndex]; - }; - AnimationState.prototype.addListener = function (listener) { - if (listener == null) - throw new Error("listener cannot be null."); - this.listeners.push(listener); - }; - AnimationState.prototype.removeListener = function (listener) { - var index = this.listeners.indexOf(listener); - if (index >= 0) - this.listeners.splice(index, 1); - }; - AnimationState.prototype.clearListeners = function () { - this.listeners.length = 0; - }; - AnimationState.prototype.clearListenerNotifications = function () { - this.queue.clear(); - }; - AnimationState.prototype.setAnimationByName = function (trackIndex, animationName, loop) { - if (!AnimationState.deprecatedWarning1) { - AnimationState.deprecatedWarning1 = true; - console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on."); - } - this.setAnimation(trackIndex, animationName, loop); - }; - AnimationState.prototype.addAnimationByName = function (trackIndex, animationName, loop, delay) { - if (!AnimationState.deprecatedWarning2) { - AnimationState.deprecatedWarning2 = true; - console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on."); - } - this.addAnimation(trackIndex, animationName, loop, delay); - }; - AnimationState.prototype.hasAnimation = function (animationName) { - var animation = this.data.skeletonData.findAnimation(animationName); - return animation !== null; - }; - AnimationState.prototype.hasAnimationByName = function (animationName) { - if (!AnimationState.deprecatedWarning3) { - AnimationState.deprecatedWarning3 = true; - console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on."); - } - return this.hasAnimation(animationName); - }; - AnimationState.emptyAnimation = new core.Animation("", [], 0); - AnimationState.SUBSEQUENT = 0; - AnimationState.FIRST = 1; - AnimationState.HOLD = 2; - AnimationState.HOLD_MIX = 3; - AnimationState.NOT_LAST = 4; - AnimationState.deprecatedWarning1 = false; - AnimationState.deprecatedWarning2 = false; - AnimationState.deprecatedWarning3 = false; - return AnimationState; - }()); - core.AnimationState = AnimationState; - var TrackEntry = (function () { - function TrackEntry() { - this.mixBlend = core.MixBlend.replace; - this.timelineMode = new Array(); - this.timelineHoldMix = new Array(); - this.timelinesRotation = new Array(); - } - TrackEntry.prototype.reset = function () { - this.next = null; - this.mixingFrom = null; - this.mixingTo = null; - this.animation = null; - this.listener = null; - this.timelineMode.length = 0; - this.timelineHoldMix.length = 0; - this.timelinesRotation.length = 0; - }; - TrackEntry.prototype.getAnimationTime = function () { - if (this.loop) { - var duration = this.animationEnd - this.animationStart; - if (duration == 0) - return this.animationStart; - return (this.trackTime % duration) + this.animationStart; - } - return Math.min(this.trackTime + this.animationStart, this.animationEnd); - }; - TrackEntry.prototype.setAnimationLast = function (animationLast) { - this.animationLast = animationLast; - this.nextAnimationLast = animationLast; - }; - TrackEntry.prototype.isComplete = function () { - return this.trackTime >= this.animationEnd - this.animationStart; - }; - TrackEntry.prototype.resetRotationDirections = function () { - this.timelinesRotation.length = 0; - }; - Object.defineProperty(TrackEntry.prototype, "time", { - get: function () { - if (!TrackEntry.deprecatedWarning1) { - TrackEntry.deprecatedWarning1 = true; - console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on."); - } - return this.trackTime; - }, - set: function (value) { - if (!TrackEntry.deprecatedWarning1) { - TrackEntry.deprecatedWarning1 = true; - console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on."); - } - this.trackTime = value; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TrackEntry.prototype, "endTime", { - get: function () { - if (!TrackEntry.deprecatedWarning2) { - TrackEntry.deprecatedWarning2 = true; - console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on."); - } - return this.trackTime; - }, - set: function (value) { - if (!TrackEntry.deprecatedWarning2) { - TrackEntry.deprecatedWarning2 = true; - console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on."); - } - this.trackTime = value; - }, - enumerable: true, - configurable: true - }); - TrackEntry.prototype.loopsCount = function () { - return Math.floor(this.trackTime / this.trackEnd); - }; - TrackEntry.deprecatedWarning1 = false; - TrackEntry.deprecatedWarning2 = false; - return TrackEntry; - }()); - core.TrackEntry = TrackEntry; - var EventQueue = (function () { - function EventQueue(animState) { - this.objects = []; - this.drainDisabled = false; - this.animState = animState; - } - EventQueue.prototype.start = function (entry) { - this.objects.push(EventType.start); - this.objects.push(entry); - this.animState.animationsChanged = true; - }; - EventQueue.prototype.interrupt = function (entry) { - this.objects.push(EventType.interrupt); - this.objects.push(entry); - }; - EventQueue.prototype.end = function (entry) { - this.objects.push(EventType.end); - this.objects.push(entry); - this.animState.animationsChanged = true; - }; - EventQueue.prototype.dispose = function (entry) { - this.objects.push(EventType.dispose); - this.objects.push(entry); - }; - EventQueue.prototype.complete = function (entry) { - this.objects.push(EventType.complete); - this.objects.push(entry); - }; - EventQueue.prototype.event = function (entry, event) { - this.objects.push(EventType.event); - this.objects.push(entry); - this.objects.push(event); - }; - EventQueue.prototype.deprecateStuff = function () { - if (!EventQueue.deprecatedWarning1) { - EventQueue.deprecatedWarning1 = true; - console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'"); - } - return true; - }; - EventQueue.prototype.drain = function () { - if (this.drainDisabled) - return; - this.drainDisabled = true; - var objects = this.objects; - var listeners = this.animState.listeners; - for (var i = 0; i < objects.length; i += 2) { - var type = objects[i]; - var entry = objects[i + 1]; - switch (type) { - case EventType.start: - if (entry.listener != null && entry.listener.start) - entry.listener.start(entry); - for (var ii = 0; ii < listeners.length; ii++) - if (listeners[ii].start) - listeners[ii].start(entry); - entry.onStart && this.deprecateStuff() && entry.onStart(entry.trackIndex); - this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(entry.trackIndex); - break; - case EventType.interrupt: - if (entry.listener != null && entry.listener.interrupt) - entry.listener.interrupt(entry); - for (var ii = 0; ii < listeners.length; ii++) - if (listeners[ii].interrupt) - listeners[ii].interrupt(entry); - break; - case EventType.end: - if (entry.listener != null && entry.listener.end) - entry.listener.end(entry); - for (var ii = 0; ii < listeners.length; ii++) - if (listeners[ii].end) - listeners[ii].end(entry); - entry.onEnd && this.deprecateStuff() && entry.onEnd(entry.trackIndex); - this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(entry.trackIndex); - case EventType.dispose: - if (entry.listener != null && entry.listener.dispose) - entry.listener.dispose(entry); - for (var ii = 0; ii < listeners.length; ii++) - if (listeners[ii].dispose) - listeners[ii].dispose(entry); - this.animState.trackEntryPool.free(entry); - break; - case EventType.complete: - if (entry.listener != null && entry.listener.complete) - entry.listener.complete(entry); - for (var ii = 0; ii < listeners.length; ii++) - if (listeners[ii].complete) - listeners[ii].complete(entry); - var count = core.MathUtils.toInt(entry.loopsCount()); - entry.onComplete && this.deprecateStuff() && entry.onComplete(entry.trackIndex, count); - this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(entry.trackIndex, count); - break; - case EventType.event: - var event_3 = objects[i++ + 2]; - if (entry.listener != null && entry.listener.event) - entry.listener.event(entry, event_3); - for (var ii = 0; ii < listeners.length; ii++) - if (listeners[ii].event) - listeners[ii].event(entry, event_3); - entry.onEvent && this.deprecateStuff() && entry.onEvent(entry.trackIndex, event_3); - this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(entry.trackIndex, event_3); - break; - } - } - this.clear(); - this.drainDisabled = false; - }; - EventQueue.prototype.clear = function () { - this.objects.length = 0; - }; - EventQueue.deprecatedWarning1 = false; - return EventQueue; - }()); - core.EventQueue = EventQueue; - var EventType; - (function (EventType) { - EventType[EventType["start"] = 0] = "start"; - EventType[EventType["interrupt"] = 1] = "interrupt"; - EventType[EventType["end"] = 2] = "end"; - EventType[EventType["dispose"] = 3] = "dispose"; - EventType[EventType["complete"] = 4] = "complete"; - EventType[EventType["event"] = 5] = "event"; - })(EventType = core.EventType || (core.EventType = {})); - var AnimationStateAdapter2 = (function () { - function AnimationStateAdapter2() { - } - AnimationStateAdapter2.prototype.start = function (entry) { - }; - AnimationStateAdapter2.prototype.interrupt = function (entry) { - }; - AnimationStateAdapter2.prototype.end = function (entry) { - }; - AnimationStateAdapter2.prototype.dispose = function (entry) { - }; - AnimationStateAdapter2.prototype.complete = function (entry) { - }; - AnimationStateAdapter2.prototype.event = function (entry, event) { - }; - return AnimationStateAdapter2; - }()); - core.AnimationStateAdapter2 = AnimationStateAdapter2; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var AnimationStateData = (function () { - function AnimationStateData(skeletonData) { - this.animationToMixTime = {}; - this.defaultMix = 0; - if (skeletonData == null) - throw new Error("skeletonData cannot be null."); - this.skeletonData = skeletonData; - } - AnimationStateData.prototype.setMix = function (fromName, toName, duration) { - var from = this.skeletonData.findAnimation(fromName); - if (from == null) - throw new Error("Animation not found: " + fromName); - var to = this.skeletonData.findAnimation(toName); - if (to == null) - throw new Error("Animation not found: " + toName); - this.setMixWith(from, to, duration); - }; - AnimationStateData.prototype.setMixByName = function (fromName, toName, duration) { - if (!AnimationStateData.deprecatedWarning1) { - AnimationStateData.deprecatedWarning1 = true; - console.warn("Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on."); - } - this.setMix(fromName, toName, duration); - }; - AnimationStateData.prototype.setMixWith = function (from, to, duration) { - if (from == null) - throw new Error("from cannot be null."); - if (to == null) - throw new Error("to cannot be null."); - var key = from.name + "." + to.name; - this.animationToMixTime[key] = duration; - }; - AnimationStateData.prototype.getMix = function (from, to) { - var key = from.name + "." + to.name; - var value = this.animationToMixTime[key]; - return value === undefined ? this.defaultMix : value; - }; - AnimationStateData.deprecatedWarning1 = false; - return AnimationStateData; - }()); - core.AnimationStateData = AnimationStateData; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var AtlasAttachmentLoader = (function () { - function AtlasAttachmentLoader(atlas) { - this.atlas = atlas; - } - AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) { - var region = this.atlas.findRegion(path); - if (region == null) - throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")"); - var attachment = new core.RegionAttachment(name); - attachment.region = region; - return attachment; - }; - AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) { - var region = this.atlas.findRegion(path); - if (region == null) - throw new Error("Region not found in atlas: " + path + " (mesh attachment: " + name + ")"); - var attachment = new core.MeshAttachment(name); - attachment.region = region; - return attachment; - }; - AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) { - return new core.BoundingBoxAttachment(name); - }; - AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) { - return new core.PathAttachment(name); - }; - AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) { - return new core.PointAttachment(name); - }; - AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) { - return new core.ClippingAttachment(name); - }; - return AtlasAttachmentLoader; - }()); - core.AtlasAttachmentLoader = AtlasAttachmentLoader; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var BlendMode; - (function (BlendMode) { - BlendMode[BlendMode["Normal"] = 0] = "Normal"; - BlendMode[BlendMode["Additive"] = 1] = "Additive"; - BlendMode[BlendMode["Multiply"] = 2] = "Multiply"; - BlendMode[BlendMode["Screen"] = 3] = "Screen"; - })(BlendMode = core.BlendMode || (core.BlendMode = {})); - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var Bone = (function () { - function Bone(data, skeleton, parent) { - this.matrix = new PIXI.Matrix(); - this.children = new Array(); - this.x = 0; - this.y = 0; - this.rotation = 0; - this.scaleX = 0; - this.scaleY = 0; - this.shearX = 0; - this.shearY = 0; - this.ax = 0; - this.ay = 0; - this.arotation = 0; - this.ascaleX = 0; - this.ascaleY = 0; - this.ashearX = 0; - this.ashearY = 0; - this.appliedValid = false; - this.sorted = false; - this.active = false; - if (data == null) - throw new Error("data cannot be null."); - if (skeleton == null) - throw new Error("skeleton cannot be null."); - this.data = data; - this.skeleton = skeleton; - this.parent = parent; - this.setToSetupPose(); - } - Object.defineProperty(Bone.prototype, "worldX", { - get: function () { - return this.matrix.tx; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Bone.prototype, "worldY", { - get: function () { - return this.matrix.ty; - }, - enumerable: true, - configurable: true - }); - Bone.prototype.isActive = function () { - return this.active; - }; - Bone.prototype.update = function () { - this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); - }; - Bone.prototype.updateWorldTransform = function () { - this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); - }; - Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) { - this.ax = x; - this.ay = y; - this.arotation = rotation; - this.ascaleX = scaleX; - this.ascaleY = scaleY; - this.ashearX = shearX; - this.ashearY = shearY; - this.appliedValid = true; - var parent = this.parent; - var m = this.matrix; - var sx = this.skeleton.scaleX; - var sy = Bone.yDown ? -this.skeleton.scaleY : this.skeleton.scaleY; - if (parent == null) { - var skeleton = this.skeleton; - var rotationY = rotation + 90 + shearY; - m.a = core.MathUtils.cosDeg(rotation + shearX) * scaleX * sx; - m.c = core.MathUtils.cosDeg(rotationY) * scaleY * sx; - m.b = core.MathUtils.sinDeg(rotation + shearX) * scaleX * sy; - m.d = core.MathUtils.sinDeg(rotationY) * scaleY * sy; - m.tx = x * sx + skeleton.x; - m.ty = y * sy + skeleton.y; - return; - } - var pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d; - m.tx = pa * x + pb * y + parent.matrix.tx; - m.ty = pc * x + pd * y + parent.matrix.ty; - switch (this.data.transformMode) { - case core.TransformMode.Normal: { - var rotationY = rotation + 90 + shearY; - var la = core.MathUtils.cosDeg(rotation + shearX) * scaleX; - var lb = core.MathUtils.cosDeg(rotationY) * scaleY; - var lc = core.MathUtils.sinDeg(rotation + shearX) * scaleX; - var ld = core.MathUtils.sinDeg(rotationY) * scaleY; - m.a = pa * la + pb * lc; - m.c = pa * lb + pb * ld; - m.b = pc * la + pd * lc; - m.d = pc * lb + pd * ld; - return; - } - case core.TransformMode.OnlyTranslation: { - var rotationY = rotation + 90 + shearY; - m.a = core.MathUtils.cosDeg(rotation + shearX) * scaleX; - m.c = core.MathUtils.cosDeg(rotationY) * scaleY; - m.b = core.MathUtils.sinDeg(rotation + shearX) * scaleX; - m.d = core.MathUtils.sinDeg(rotationY) * scaleY; - break; - } - case core.TransformMode.NoRotationOrReflection: { - var s = pa * pa + pc * pc; - var prx = 0; - if (s > 0.0001) { - s = Math.abs(pa * pd - pb * pc) / s; - pb = pc * s; - pd = pa * s; - prx = Math.atan2(pc, pa) * core.MathUtils.radDeg; - } - else { - pa = 0; - pc = 0; - prx = 90 - Math.atan2(pd, pb) * core.MathUtils.radDeg; - } - var rx = rotation + shearX - prx; - var ry = rotation + shearY - prx + 90; - var la = core.MathUtils.cosDeg(rx) * scaleX; - var lb = core.MathUtils.cosDeg(ry) * scaleY; - var lc = core.MathUtils.sinDeg(rx) * scaleX; - var ld = core.MathUtils.sinDeg(ry) * scaleY; - m.a = pa * la - pb * lc; - m.c = pa * lb - pb * ld; - m.b = pc * la + pd * lc; - m.d = pc * lb + pd * ld; - break; - } - case core.TransformMode.NoScale: - case core.TransformMode.NoScaleOrReflection: { - var cos = core.MathUtils.cosDeg(rotation); - var sin = core.MathUtils.sinDeg(rotation); - var za = (pa * cos + pb * sin) / sx; - var zc = (pc * cos + pd * sin) / sy; - var s = Math.sqrt(za * za + zc * zc); - if (s > 0.00001) - s = 1 / s; - za *= s; - zc *= s; - s = Math.sqrt(za * za + zc * zc); - if (this.data.transformMode == core.TransformMode.NoScale - && (pa * pd - pb * pc < 0) != (Bone.yDown ? - (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) : - (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))) - s = -s; - var r = Math.PI / 2 + Math.atan2(zc, za); - var zb = Math.cos(r) * s; - var zd = Math.sin(r) * s; - var la = core.MathUtils.cosDeg(shearX) * scaleX; - var lb = core.MathUtils.cosDeg(90 + shearY) * scaleY; - var lc = core.MathUtils.sinDeg(shearX) * scaleX; - var ld = core.MathUtils.sinDeg(90 + shearY) * scaleY; - m.a = za * la + zb * lc; - m.c = za * lb + zb * ld; - m.b = zc * la + zd * lc; - m.d = zc * lb + zd * ld; - break; - } - } - m.a *= sx; - m.c *= sx; - m.b *= sy; - m.d *= sy; - }; - Bone.prototype.setToSetupPose = function () { - var data = this.data; - this.x = data.x; - this.y = data.y; - this.rotation = data.rotation; - this.scaleX = data.scaleX; - this.scaleY = data.scaleY; - this.shearX = data.shearX; - this.shearY = data.shearY; - }; - Bone.prototype.getWorldRotationX = function () { - return Math.atan2(this.matrix.b, this.matrix.a) * core.MathUtils.radDeg; - }; - Bone.prototype.getWorldRotationY = function () { - return Math.atan2(this.matrix.d, this.matrix.c) * core.MathUtils.radDeg; - }; - Bone.prototype.getWorldScaleX = function () { - var m = this.matrix; - return Math.sqrt(m.a * m.a + m.c * m.c); - }; - Bone.prototype.getWorldScaleY = function () { - var m = this.matrix; - return Math.sqrt(m.b * m.b + m.d * m.d); - }; - Bone.prototype.updateAppliedTransform = function () { - this.appliedValid = true; - var parent = this.parent; - var m = this.matrix; - if (parent == null) { - this.ax = m.tx; - this.ay = m.ty; - this.arotation = Math.atan2(m.b, m.a) * core.MathUtils.radDeg; - this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b); - this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d); - this.ashearX = 0; - this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * core.MathUtils.radDeg; - return; - } - var pm = parent.matrix; - var pid = 1 / (pm.a * pm.d - pm.b * pm.c); - var dx = m.tx - pm.tx, dy = m.ty - pm.ty; - this.ax = (dx * pm.d * pid - dy * pm.c * pid); - this.ay = (dy * pm.a * pid - dx * pm.b * pid); - var ia = pid * pm.d; - var id = pid * pm.a; - var ib = pid * pm.c; - var ic = pid * pm.b; - var ra = ia * m.a - ib * m.b; - var rb = ia * m.c - ib * m.d; - var rc = id * m.b - ic * m.a; - var rd = id * m.d - ic * m.c; - this.ashearX = 0; - this.ascaleX = Math.sqrt(ra * ra + rc * rc); - if (this.ascaleX > 0.0001) { - var det = ra * rd - rb * rc; - this.ascaleY = det / this.ascaleX; - this.ashearY = Math.atan2(ra * rb + rc * rd, det) * core.MathUtils.radDeg; - this.arotation = Math.atan2(rc, ra) * core.MathUtils.radDeg; - } - else { - this.ascaleX = 0; - this.ascaleY = Math.sqrt(rb * rb + rd * rd); - this.ashearY = 0; - this.arotation = 90 - Math.atan2(rd, rb) * core.MathUtils.radDeg; - } - }; - Bone.prototype.worldToLocal = function (world) { - var m = this.matrix; - var a = m.a, b = m.c, c = m.b, d = m.d; - var invDet = 1 / (a * d - b * c); - var x = world.x - m.tx, y = world.y - m.ty; - world.x = (x * d * invDet - y * b * invDet); - world.y = (y * a * invDet - x * c * invDet); - return world; - }; - Bone.prototype.localToWorld = function (local) { - var m = this.matrix; - var x = local.x, y = local.y; - local.x = x * m.a + y * m.c + m.tx; - local.y = x * m.b + y * m.d + m.ty; - return local; - }; - Bone.prototype.worldToLocalRotation = function (worldRotation) { - var sin = core.MathUtils.sinDeg(worldRotation), cos = core.MathUtils.cosDeg(worldRotation); - var mat = this.matrix; - return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * core.MathUtils.radDeg; - }; - Bone.prototype.localToWorldRotation = function (localRotation) { - var sin = core.MathUtils.sinDeg(localRotation), cos = core.MathUtils.cosDeg(localRotation); - var mat = this.matrix; - return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * core.MathUtils.radDeg; - }; - Bone.prototype.rotateWorld = function (degrees) { - var mat = this.matrix; - var a = mat.a, b = mat.c, c = mat.b, d = mat.d; - var cos = core.MathUtils.cosDeg(degrees), sin = core.MathUtils.sinDeg(degrees); - mat.a = cos * a - sin * c; - mat.c = cos * b - sin * d; - mat.b = sin * a + cos * c; - mat.d = sin * b + cos * d; - this.appliedValid = false; - }; - Bone.yDown = false; - return Bone; - }()); - core.Bone = Bone; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var BoneData = (function () { - function BoneData(index, name, parent) { - this.x = 0; - this.y = 0; - this.rotation = 0; - this.scaleX = 1; - this.scaleY = 1; - this.shearX = 0; - this.shearY = 0; - this.transformMode = TransformMode.Normal; - this.skinRequired = false; - this.color = new core.Color(); - if (index < 0) - throw new Error("index must be >= 0."); - if (name == null) - throw new Error("name cannot be null."); - this.index = index; - this.name = name; - this.parent = parent; - } - return BoneData; - }()); - core.BoneData = BoneData; - var TransformMode; - (function (TransformMode) { - TransformMode[TransformMode["Normal"] = 0] = "Normal"; - TransformMode[TransformMode["OnlyTranslation"] = 1] = "OnlyTranslation"; - TransformMode[TransformMode["NoRotationOrReflection"] = 2] = "NoRotationOrReflection"; - TransformMode[TransformMode["NoScale"] = 3] = "NoScale"; - TransformMode[TransformMode["NoScaleOrReflection"] = 4] = "NoScaleOrReflection"; - })(TransformMode = core.TransformMode || (core.TransformMode = {})); - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var ConstraintData = (function () { - function ConstraintData(name, order, skinRequired) { - this.name = name; - this.order = order; - this.skinRequired = skinRequired; - } - return ConstraintData; - }()); - core.ConstraintData = ConstraintData; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var Event = (function () { - function Event(time, data) { - if (data == null) - throw new Error("data cannot be null."); - this.time = time; - this.data = data; - } - return Event; - }()); - core.Event = Event; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var EventData = (function () { - function EventData(name) { - this.name = name; - } - return EventData; - }()); - core.EventData = EventData; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var IkConstraint = (function () { - function IkConstraint(data, skeleton) { - this.bendDirection = 0; - this.compress = false; - this.stretch = false; - this.mix = 1; - this.softness = 0; - this.active = false; - if (data == null) - throw new Error("data cannot be null."); - if (skeleton == null) - throw new Error("skeleton cannot be null."); - this.data = data; - this.mix = data.mix; - this.softness = data.softness; - this.bendDirection = data.bendDirection; - this.compress = data.compress; - this.stretch = data.stretch; - this.bones = new Array(); - for (var i = 0; i < data.bones.length; i++) - this.bones.push(skeleton.findBone(data.bones[i].name)); - this.target = skeleton.findBone(data.target.name); - } - IkConstraint.prototype.isActive = function () { - return this.active; - }; - IkConstraint.prototype.apply = function () { - this.update(); - }; - IkConstraint.prototype.update = function () { - var target = this.target; - var bones = this.bones; - switch (bones.length) { - case 1: - this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix); - break; - case 2: - this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix); - break; - } - }; - IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) { - if (!bone.appliedValid) - bone.updateAppliedTransform(); - var p = bone.parent.matrix; - var id = 1 / (p.a * p.d - p.b * p.c); - var x = targetX - p.tx, y = targetY - p.ty; - var tx = (x * p.d - y * p.c) * id - bone.ax, ty = (y * p.a - x * p.b) * id - bone.ay; - var rotationIK = Math.atan2(ty, tx) * core.MathUtils.radDeg - bone.ashearX - bone.arotation; - if (bone.ascaleX < 0) - rotationIK += 180; - if (rotationIK > 180) - rotationIK -= 360; - else if (rotationIK < -180) - rotationIK += 360; - var sx = bone.ascaleX, sy = bone.ascaleY; - if (compress || stretch) { - var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); - if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { - var s = (dd / b - 1) * alpha + 1; - sx *= s; - if (uniform) - sy *= s; - } - } - bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY); - }; - IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) { - if (alpha == 0) { - child.updateWorldTransform(); - return; - } - if (!parent.appliedValid) - parent.updateAppliedTransform(); - if (!child.appliedValid) - child.updateAppliedTransform(); - var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX; - var pmat = parent.matrix; - var os1 = 0, os2 = 0, s2 = 0; - if (psx < 0) { - psx = -psx; - os1 = 180; - s2 = -1; - } - else { - os1 = 0; - s2 = 1; - } - if (psy < 0) { - psy = -psy; - s2 = -s2; - } - if (csx < 0) { - csx = -csx; - os2 = 180; - } - else - os2 = 0; - var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d; - var u = Math.abs(psx - psy) <= 0.0001; - if (!u) { - cy = 0; - cwx = a * cx + pmat.tx; - cwy = c * cx + pmat.ty; - } - else { - cy = child.ay; - cwx = a * cx + b * cy + pmat.tx; - cwy = c * cx + d * cy + pmat.ty; - } - var pp = parent.parent.matrix; - a = pp.a; - b = pp.c; - c = pp.b; - d = pp.d; - var id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty; - var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py; - var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2; - if (l1 < 0.0001) { - this.apply1(parent, targetX, targetY, false, stretch, false, alpha); - child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY); - return; - } - x = targetX - pp.tx; - y = targetY - pp.ty; - var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py; - var dd = tx * tx + ty * ty; - if (softness != 0) { - softness *= psx * (csx + 1) / 2; - var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness; - if (sd > 0) { - var p = Math.min(1, sd / (softness * 2)) - 1; - p = (sd - softness * (1 - p * p)) / td; - tx -= p * tx; - ty -= p * ty; - dd = tx * tx + ty * ty; - } - } - outer: if (u) { - l2 *= psx; - var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2); - if (cos < -1) - cos = -1; - else if (cos > 1) { - cos = 1; - if (stretch) - sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1; - } - a2 = Math.acos(cos) * bendDir; - a = l1 + l2 * cos; - b = l2 * Math.sin(a2); - a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b); - } - else { - a = psx * l2; - b = psy * l2; - var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx); - c = bb * l1 * l1 + aa * dd - aa * bb; - var c1 = -2 * bb * l1, c2 = bb - aa; - d = c1 * c1 - 4 * c2 * c; - if (d >= 0) { - var q = Math.sqrt(d); - if (c1 < 0) - q = -q; - q = -(c1 + q) / 2; - var r0 = q / c2, r1 = c / q; - var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1; - if (r * r <= dd) { - y = Math.sqrt(dd - r * r) * bendDir; - a1 = ta - Math.atan2(y, r); - a2 = Math.atan2(y / psy, (r - l1) / psx); - break outer; - } - } - var minAngle = core.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0; - var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0; - c = -a * l1 / (aa - bb); - if (c >= -1 && c <= 1) { - c = Math.acos(c); - x = a * Math.cos(c) + l1; - y = b * Math.sin(c); - d = x * x + y * y; - if (d < minDist) { - minAngle = c; - minDist = d; - minX = x; - minY = y; - } - if (d > maxDist) { - maxAngle = c; - maxDist = d; - maxX = x; - maxY = y; - } - } - if (dd <= (minDist + maxDist) / 2) { - a1 = ta - Math.atan2(minY * bendDir, minX); - a2 = minAngle * bendDir; - } - else { - a1 = ta - Math.atan2(maxY * bendDir, maxX); - a2 = maxAngle * bendDir; - } - } - var os = Math.atan2(cy, cx) * s2; - var rotation = parent.arotation; - a1 = (a1 - os) * core.MathUtils.radDeg + os1 - rotation; - if (a1 > 180) - a1 -= 360; - else if (a1 < -180) - a1 += 360; - parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0); - rotation = child.arotation; - a2 = ((a2 + os) * core.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation; - if (a2 > 180) - a2 -= 360; - else if (a2 < -180) - a2 += 360; - child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY); - }; - return IkConstraint; - }()); - core.IkConstraint = IkConstraint; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var IkConstraintData = (function (_super) { - __extends(IkConstraintData, _super); - function IkConstraintData(name) { - var _this = _super.call(this, name, 0, false) || this; - _this.bones = new Array(); - _this.bendDirection = 1; - _this.compress = false; - _this.stretch = false; - _this.uniform = false; - _this.mix = 1; - _this.softness = 0; - return _this; - } - return IkConstraintData; - }(core.ConstraintData)); - core.IkConstraintData = IkConstraintData; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var PathConstraint = (function () { - function PathConstraint(data, skeleton) { - this.position = 0; - this.spacing = 0; - this.rotateMix = 0; - this.translateMix = 0; - this.spaces = new Array(); - this.positions = new Array(); - this.world = new Array(); - this.curves = new Array(); - this.lengths = new Array(); - this.segments = new Array(); - this.active = false; - if (data == null) - throw new Error("data cannot be null."); - if (skeleton == null) - throw new Error("skeleton cannot be null."); - this.data = data; - this.bones = new Array(); - for (var i = 0, n = data.bones.length; i < n; i++) - this.bones.push(skeleton.findBone(data.bones[i].name)); - this.target = skeleton.findSlot(data.target.name); - this.position = data.position; - this.spacing = data.spacing; - this.rotateMix = data.rotateMix; - this.translateMix = data.translateMix; - } - PathConstraint.prototype.isActive = function () { - return this.active; - }; - PathConstraint.prototype.apply = function () { - this.update(); - }; - PathConstraint.prototype.update = function () { - var attachment = this.target.getAttachment(); - if (!(attachment instanceof core.PathAttachment)) - return; - var rotateMix = this.rotateMix, translateMix = this.translateMix; - var translate = translateMix > 0, rotate = rotateMix > 0; - if (!translate && !rotate) - return; - var data = this.data; - var spacingMode = data.spacingMode; - var lengthSpacing = spacingMode == core.SpacingMode.Length; - var rotateMode = data.rotateMode; - var tangents = rotateMode == core.RotateMode.Tangent, scale = rotateMode == core.RotateMode.ChainScale; - var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1; - var bones = this.bones; - var spaces = core.Utils.setArraySize(this.spaces, spacesCount), lengths = null; - var spacing = this.spacing; - if (scale || lengthSpacing) { - if (scale) - lengths = core.Utils.setArraySize(this.lengths, boneCount); - for (var i = 0, n = spacesCount - 1; i < n;) { - var bone = bones[i]; - var setupLength = bone.data.length; - if (setupLength < PathConstraint.epsilon) { - if (scale) - lengths[i] = 0; - spaces[++i] = 0; - } - else { - var x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b; - var length_1 = Math.sqrt(x * x + y * y); - if (scale) - lengths[i] = length_1; - spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_1 / setupLength; - } - } - } - else { - for (var i = 1; i < spacesCount; i++) - spaces[i] = spacing; - } - var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == core.PositionMode.Percent, spacingMode == core.SpacingMode.Percent); - var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; - var tip = false; - if (offsetRotation == 0) - tip = rotateMode == core.RotateMode.Chain; - else { - tip = false; - var p = this.target.bone.matrix; - offsetRotation *= p.a * p.d - p.b * p.c > 0 ? core.MathUtils.degRad : -core.MathUtils.degRad; - } - for (var i = 0, p = 3; i < boneCount; i++, p += 3) { - var bone = bones[i]; - var mat = bone.matrix; - mat.tx += (boneX - mat.tx) * translateMix; - mat.ty += (boneY - mat.ty) * translateMix; - var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY; - if (scale) { - var length_2 = lengths[i]; - if (length_2 != 0) { - var s = (Math.sqrt(dx * dx + dy * dy) / length_2 - 1) * rotateMix + 1; - mat.a *= s; - mat.b *= s; - } - } - boneX = x; - boneY = y; - if (rotate) { - var a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0; - if (tangents) - r = positions[p - 1]; - else if (spaces[i + 1] == 0) - r = positions[p + 2]; - else - r = Math.atan2(dy, dx); - r -= Math.atan2(c, a); - if (tip) { - cos = Math.cos(r); - sin = Math.sin(r); - var length_3 = bone.data.length; - boneX += (length_3 * (cos * a - sin * c) - dx) * rotateMix; - boneY += (length_3 * (sin * a + cos * c) - dy) * rotateMix; - } - else { - r += offsetRotation; - } - if (r > core.MathUtils.PI) - r -= core.MathUtils.PI2; - else if (r < -core.MathUtils.PI) - r += core.MathUtils.PI2; - r *= rotateMix; - cos = Math.cos(r); - sin = Math.sin(r); - mat.a = cos * a - sin * c; - mat.c = cos * b - sin * d; - mat.b = sin * a + cos * c; - mat.d = sin * b + cos * d; - } - bone.appliedValid = false; - } - }; - PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) { - var target = this.target; - var position = this.position; - var spaces = this.spaces, out = core.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null; - var closed = path.closed; - var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE; - if (!path.constantSpeed) { - var lengths = path.lengths; - curveCount -= closed ? 1 : 2; - var pathLength_1 = lengths[curveCount]; - if (percentPosition) - position *= pathLength_1; - if (percentSpacing) { - for (var i = 0; i < spacesCount; i++) - spaces[i] *= pathLength_1; - } - world = core.Utils.setArraySize(this.world, 8); - for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) { - var space = spaces[i]; - position += space; - var p = position; - if (closed) { - p %= pathLength_1; - if (p < 0) - p += pathLength_1; - curve = 0; - } - else if (p < 0) { - if (prevCurve != PathConstraint.BEFORE) { - prevCurve = PathConstraint.BEFORE; - path.computeWorldVertices(target, 2, 4, world, 0, 2); - } - this.addBeforePosition(p, world, 0, out, o); - continue; - } - else if (p > pathLength_1) { - if (prevCurve != PathConstraint.AFTER) { - prevCurve = PathConstraint.AFTER; - path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2); - } - this.addAfterPosition(p - pathLength_1, world, 0, out, o); - continue; - } - for (;; curve++) { - var length_4 = lengths[curve]; - if (p > length_4) - continue; - if (curve == 0) - p /= length_4; - else { - var prev = lengths[curve - 1]; - p = (p - prev) / (length_4 - prev); - } - break; - } - if (curve != prevCurve) { - prevCurve = curve; - if (closed && curve == curveCount) { - path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2); - path.computeWorldVertices(target, 0, 4, world, 4, 2); - } - else - path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2); - } - this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0)); - } - return out; - } - if (closed) { - verticesLength += 2; - world = core.Utils.setArraySize(this.world, verticesLength); - path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2); - path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2); - world[verticesLength - 2] = world[0]; - world[verticesLength - 1] = world[1]; - } - else { - curveCount--; - verticesLength -= 4; - world = core.Utils.setArraySize(this.world, verticesLength); - path.computeWorldVertices(target, 2, verticesLength, world, 0, 2); - } - var curves = core.Utils.setArraySize(this.curves, curveCount); - var pathLength = 0; - var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0; - var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0; - for (var i = 0, w = 2; i < curveCount; i++, w += 6) { - cx1 = world[w]; - cy1 = world[w + 1]; - cx2 = world[w + 2]; - cy2 = world[w + 3]; - x2 = world[w + 4]; - y2 = world[w + 5]; - tmpx = (x1 - cx1 * 2 + cx2) * 0.1875; - tmpy = (y1 - cy1 * 2 + cy2) * 0.1875; - dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375; - dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375; - ddfx = tmpx * 2 + dddfx; - ddfy = tmpy * 2 + dddfy; - dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667; - dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667; - pathLength += Math.sqrt(dfx * dfx + dfy * dfy); - dfx += ddfx; - dfy += ddfy; - ddfx += dddfx; - ddfy += dddfy; - pathLength += Math.sqrt(dfx * dfx + dfy * dfy); - dfx += ddfx; - dfy += ddfy; - pathLength += Math.sqrt(dfx * dfx + dfy * dfy); - dfx += ddfx + dddfx; - dfy += ddfy + dddfy; - pathLength += Math.sqrt(dfx * dfx + dfy * dfy); - curves[i] = pathLength; - x1 = x2; - y1 = y2; - } - if (percentPosition) - position *= pathLength; - if (percentSpacing) { - for (var i = 0; i < spacesCount; i++) - spaces[i] *= pathLength; - } - var segments = this.segments; - var curveLength = 0; - for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) { - var space = spaces[i]; - position += space; - var p = position; - if (closed) { - p %= pathLength; - if (p < 0) - p += pathLength; - curve = 0; - } - else if (p < 0) { - this.addBeforePosition(p, world, 0, out, o); - continue; - } - else if (p > pathLength) { - this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o); - continue; - } - for (;; curve++) { - var length_5 = curves[curve]; - if (p > length_5) - continue; - if (curve == 0) - p /= length_5; - else { - var prev = curves[curve - 1]; - p = (p - prev) / (length_5 - prev); - } - break; - } - if (curve != prevCurve) { - prevCurve = curve; - var ii = curve * 6; - x1 = world[ii]; - y1 = world[ii + 1]; - cx1 = world[ii + 2]; - cy1 = world[ii + 3]; - cx2 = world[ii + 4]; - cy2 = world[ii + 5]; - x2 = world[ii + 6]; - y2 = world[ii + 7]; - tmpx = (x1 - cx1 * 2 + cx2) * 0.03; - tmpy = (y1 - cy1 * 2 + cy2) * 0.03; - dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006; - dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006; - ddfx = tmpx * 2 + dddfx; - ddfy = tmpy * 2 + dddfy; - dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667; - dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667; - curveLength = Math.sqrt(dfx * dfx + dfy * dfy); - segments[0] = curveLength; - for (ii = 1; ii < 8; ii++) { - dfx += ddfx; - dfy += ddfy; - ddfx += dddfx; - ddfy += dddfy; - curveLength += Math.sqrt(dfx * dfx + dfy * dfy); - segments[ii] = curveLength; - } - dfx += ddfx; - dfy += ddfy; - curveLength += Math.sqrt(dfx * dfx + dfy * dfy); - segments[8] = curveLength; - dfx += ddfx + dddfx; - dfy += ddfy + dddfy; - curveLength += Math.sqrt(dfx * dfx + dfy * dfy); - segments[9] = curveLength; - segment = 0; - } - p *= curveLength; - for (;; segment++) { - var length_6 = segments[segment]; - if (p > length_6) - continue; - if (segment == 0) - p /= length_6; - else { - var prev = segments[segment - 1]; - p = segment + (p - prev) / (length_6 - prev); - } - break; - } - this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0)); - } - return out; - }; - PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) { - var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx); - out[o] = x1 + p * Math.cos(r); - out[o + 1] = y1 + p * Math.sin(r); - out[o + 2] = r; - }; - PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) { - var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx); - out[o] = x1 + p * Math.cos(r); - out[o + 1] = y1 + p * Math.sin(r); - out[o + 2] = r; - }; - PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) { - if (p == 0 || isNaN(p)) - p = 0.0001; - var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u; - var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p; - var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt; - out[o] = x; - out[o + 1] = y; - if (tangents) - out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt)); - }; - PathConstraint.NONE = -1; - PathConstraint.BEFORE = -2; - PathConstraint.AFTER = -3; - PathConstraint.epsilon = 0.00001; - return PathConstraint; - }()); - core.PathConstraint = PathConstraint; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var PathConstraintData = (function (_super) { - __extends(PathConstraintData, _super); - function PathConstraintData(name) { - var _this = _super.call(this, name, 0, false) || this; - _this.bones = new Array(); - return _this; - } - return PathConstraintData; - }(core.ConstraintData)); - core.PathConstraintData = PathConstraintData; - var PositionMode; - (function (PositionMode) { - PositionMode[PositionMode["Fixed"] = 0] = "Fixed"; - PositionMode[PositionMode["Percent"] = 1] = "Percent"; - })(PositionMode = core.PositionMode || (core.PositionMode = {})); - var SpacingMode; - (function (SpacingMode) { - SpacingMode[SpacingMode["Length"] = 0] = "Length"; - SpacingMode[SpacingMode["Fixed"] = 1] = "Fixed"; - SpacingMode[SpacingMode["Percent"] = 2] = "Percent"; - })(SpacingMode = core.SpacingMode || (core.SpacingMode = {})); - var RotateMode; - (function (RotateMode) { - RotateMode[RotateMode["Tangent"] = 0] = "Tangent"; - RotateMode[RotateMode["Chain"] = 1] = "Chain"; - RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale"; - })(RotateMode = core.RotateMode || (core.RotateMode = {})); - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var Skeleton = (function () { - function Skeleton(data) { - this._updateCache = new Array(); - this.updateCacheReset = new Array(); - this.time = 0; - this.scaleX = 1; - this.scaleY = 1; - this.x = 0; - this.y = 0; - if (data == null) - throw new Error("data cannot be null."); - this.data = data; - this.bones = new Array(); - for (var i = 0; i < data.bones.length; i++) { - var boneData = data.bones[i]; - var bone = void 0; - if (boneData.parent == null) - bone = new core.Bone(boneData, this, null); - else { - var parent_1 = this.bones[boneData.parent.index]; - bone = new core.Bone(boneData, this, parent_1); - parent_1.children.push(bone); - } - this.bones.push(bone); - } - this.slots = new Array(); - this.drawOrder = new Array(); - for (var i = 0; i < data.slots.length; i++) { - var slotData = data.slots[i]; - var bone = this.bones[slotData.boneData.index]; - var slot = new core.Slot(slotData, bone); - this.slots.push(slot); - this.drawOrder.push(slot); - } - this.ikConstraints = new Array(); - for (var i = 0; i < data.ikConstraints.length; i++) { - var ikConstraintData = data.ikConstraints[i]; - this.ikConstraints.push(new core.IkConstraint(ikConstraintData, this)); - } - this.transformConstraints = new Array(); - for (var i = 0; i < data.transformConstraints.length; i++) { - var transformConstraintData = data.transformConstraints[i]; - this.transformConstraints.push(new core.TransformConstraint(transformConstraintData, this)); - } - this.pathConstraints = new Array(); - for (var i = 0; i < data.pathConstraints.length; i++) { - var pathConstraintData = data.pathConstraints[i]; - this.pathConstraints.push(new core.PathConstraint(pathConstraintData, this)); - } - this.color = new core.Color(1, 1, 1, 1); - this.updateCache(); - } - Skeleton.prototype.updateCache = function () { - var updateCache = this._updateCache; - updateCache.length = 0; - this.updateCacheReset.length = 0; - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) { - var bone = bones[i]; - bone.sorted = bone.data.skinRequired; - bone.active = !bone.sorted; - } - if (this.skin != null) { - var skinBones = this.skin.bones; - for (var i = 0, n = this.skin.bones.length; i < n; i++) { - var bone = this.bones[skinBones[i].index]; - do { - bone.sorted = false; - bone.active = true; - bone = bone.parent; - } while (bone != null); - } - } - var ikConstraints = this.ikConstraints; - var transformConstraints = this.transformConstraints; - var pathConstraints = this.pathConstraints; - var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length; - var constraintCount = ikCount + transformCount + pathCount; - outer: for (var i = 0; i < constraintCount; i++) { - for (var ii = 0; ii < ikCount; ii++) { - var constraint = ikConstraints[ii]; - if (constraint.data.order == i) { - this.sortIkConstraint(constraint); - continue outer; - } - } - for (var ii = 0; ii < transformCount; ii++) { - var constraint = transformConstraints[ii]; - if (constraint.data.order == i) { - this.sortTransformConstraint(constraint); - continue outer; - } - } - for (var ii = 0; ii < pathCount; ii++) { - var constraint = pathConstraints[ii]; - if (constraint.data.order == i) { - this.sortPathConstraint(constraint); - continue outer; - } - } - } - for (var i = 0, n = bones.length; i < n; i++) - this.sortBone(bones[i]); - }; - Skeleton.prototype.sortIkConstraint = function (constraint) { - constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && core.Utils.contains(this.skin.constraints, constraint.data, true))); - if (!constraint.active) - return; - var target = constraint.target; - this.sortBone(target); - var constrained = constraint.bones; - var parent = constrained[0]; - this.sortBone(parent); - if (constrained.length > 1) { - var child = constrained[constrained.length - 1]; - if (!(this._updateCache.indexOf(child) > -1)) - this.updateCacheReset.push(child); - } - this._updateCache.push(constraint); - this.sortReset(parent.children); - constrained[constrained.length - 1].sorted = true; - }; - Skeleton.prototype.sortPathConstraint = function (constraint) { - constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && core.Utils.contains(this.skin.constraints, constraint.data, true))); - if (!constraint.active) - return; - var slot = constraint.target; - var slotIndex = slot.data.index; - var slotBone = slot.bone; - if (this.skin != null) - this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone); - if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin) - this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone); - for (var i = 0, n = this.data.skins.length; i < n; i++) - this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone); - var attachment = slot.getAttachment(); - if (attachment instanceof core.PathAttachment) - this.sortPathConstraintAttachmentWith(attachment, slotBone); - var constrained = constraint.bones; - var boneCount = constrained.length; - for (var i = 0; i < boneCount; i++) - this.sortBone(constrained[i]); - this._updateCache.push(constraint); - for (var i = 0; i < boneCount; i++) - this.sortReset(constrained[i].children); - for (var i = 0; i < boneCount; i++) - constrained[i].sorted = true; - }; - Skeleton.prototype.sortTransformConstraint = function (constraint) { - constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && core.Utils.contains(this.skin.constraints, constraint.data, true))); - if (!constraint.active) - return; - this.sortBone(constraint.target); - var constrained = constraint.bones; - var boneCount = constrained.length; - if (constraint.data.local) { - for (var i = 0; i < boneCount; i++) { - var child = constrained[i]; - this.sortBone(child.parent); - if (!(this._updateCache.indexOf(child) > -1)) - this.updateCacheReset.push(child); - } - } - else { - for (var i = 0; i < boneCount; i++) { - this.sortBone(constrained[i]); - } - } - this._updateCache.push(constraint); - for (var ii = 0; ii < boneCount; ii++) - this.sortReset(constrained[ii].children); - for (var ii = 0; ii < boneCount; ii++) - constrained[ii].sorted = true; - }; - Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) { - var attachments = skin.attachments[slotIndex]; - if (!attachments) - return; - for (var key in attachments) { - this.sortPathConstraintAttachmentWith(attachments[key], slotBone); - } - }; - Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) { - if (!(attachment instanceof core.PathAttachment)) - return; - var pathBones = attachment.bones; - if (pathBones == null) - this.sortBone(slotBone); - else { - var bones = this.bones; - var i = 0; - while (i < pathBones.length) { - var boneCount = pathBones[i++]; - for (var n = i + boneCount; i < n; i++) { - var boneIndex = pathBones[i]; - this.sortBone(bones[boneIndex]); - } - } - } - }; - Skeleton.prototype.sortBone = function (bone) { - if (bone.sorted) - return; - var parent = bone.parent; - if (parent != null) - this.sortBone(parent); - bone.sorted = true; - this._updateCache.push(bone); - }; - Skeleton.prototype.sortReset = function (bones) { - for (var i = 0, n = bones.length; i < n; i++) { - var bone = bones[i]; - if (!bone.active) - continue; - if (bone.sorted) - this.sortReset(bone.children); - bone.sorted = false; - } - }; - Skeleton.prototype.updateWorldTransform = function () { - var updateCacheReset = this.updateCacheReset; - for (var i = 0, n = updateCacheReset.length; i < n; i++) { - var bone = updateCacheReset[i]; - bone.ax = bone.x; - bone.ay = bone.y; - bone.arotation = bone.rotation; - bone.ascaleX = bone.scaleX; - bone.ascaleY = bone.scaleY; - bone.ashearX = bone.shearX; - bone.ashearY = bone.shearY; - bone.appliedValid = true; - } - var updateCache = this._updateCache; - for (var i = 0, n = updateCache.length; i < n; i++) - updateCache[i].update(); - }; - Skeleton.prototype.setToSetupPose = function () { - this.setBonesToSetupPose(); - this.setSlotsToSetupPose(); - }; - Skeleton.prototype.setBonesToSetupPose = function () { - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) - bones[i].setToSetupPose(); - var ikConstraints = this.ikConstraints; - for (var i = 0, n = ikConstraints.length; i < n; i++) { - var constraint = ikConstraints[i]; - constraint.mix = constraint.data.mix; - constraint.softness = constraint.data.softness; - constraint.bendDirection = constraint.data.bendDirection; - constraint.compress = constraint.data.compress; - constraint.stretch = constraint.data.stretch; - } - var transformConstraints = this.transformConstraints; - for (var i = 0, n = transformConstraints.length; i < n; i++) { - var constraint = transformConstraints[i]; - var data = constraint.data; - constraint.rotateMix = data.rotateMix; - constraint.translateMix = data.translateMix; - constraint.scaleMix = data.scaleMix; - constraint.shearMix = data.shearMix; - } - var pathConstraints = this.pathConstraints; - for (var i = 0, n = pathConstraints.length; i < n; i++) { - var constraint = pathConstraints[i]; - var data = constraint.data; - constraint.position = data.position; - constraint.spacing = data.spacing; - constraint.rotateMix = data.rotateMix; - constraint.translateMix = data.translateMix; - } - }; - Skeleton.prototype.setSlotsToSetupPose = function () { - var slots = this.slots; - core.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length); - for (var i = 0, n = slots.length; i < n; i++) - slots[i].setToSetupPose(); - }; - Skeleton.prototype.getRootBone = function () { - if (this.bones.length == 0) - return null; - return this.bones[0]; - }; - Skeleton.prototype.findBone = function (boneName) { - if (boneName == null) - throw new Error("boneName cannot be null."); - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) { - var bone = bones[i]; - if (bone.data.name == boneName) - return bone; - } - return null; - }; - Skeleton.prototype.findBoneIndex = function (boneName) { - if (boneName == null) - throw new Error("boneName cannot be null."); - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) - if (bones[i].data.name == boneName) - return i; - return -1; - }; - Skeleton.prototype.findSlot = function (slotName) { - if (slotName == null) - throw new Error("slotName cannot be null."); - var slots = this.slots; - for (var i = 0, n = slots.length; i < n; i++) { - var slot = slots[i]; - if (slot.data.name == slotName) - return slot; - } - return null; - }; - Skeleton.prototype.findSlotIndex = function (slotName) { - if (slotName == null) - throw new Error("slotName cannot be null."); - var slots = this.slots; - for (var i = 0, n = slots.length; i < n; i++) - if (slots[i].data.name == slotName) - return i; - return -1; - }; - Skeleton.prototype.setSkinByName = function (skinName) { - var skin = this.data.findSkin(skinName); - if (skin == null) - throw new Error("Skin not found: " + skinName); - this.setSkin(skin); - }; - Skeleton.prototype.setSkin = function (newSkin) { - if (newSkin == this.skin) - return; - if (newSkin != null) { - if (this.skin != null) - newSkin.attachAll(this, this.skin); - else { - var slots = this.slots; - for (var i = 0, n = slots.length; i < n; i++) { - var slot = slots[i]; - var name_1 = slot.data.attachmentName; - if (name_1 != null) { - var attachment = newSkin.getAttachment(i, name_1); - if (attachment != null) - slot.setAttachment(attachment); - } - } - } - } - this.skin = newSkin; - this.updateCache(); - }; - Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) { - return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName); - }; - Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) { - if (attachmentName == null) - throw new Error("attachmentName cannot be null."); - if (this.skin != null) { - var attachment = this.skin.getAttachment(slotIndex, attachmentName); - if (attachment != null) - return attachment; - } - if (this.data.defaultSkin != null) - return this.data.defaultSkin.getAttachment(slotIndex, attachmentName); - return null; - }; - Skeleton.prototype.setAttachment = function (slotName, attachmentName) { - if (slotName == null) - throw new Error("slotName cannot be null."); - var slots = this.slots; - for (var i = 0, n = slots.length; i < n; i++) { - var slot = slots[i]; - if (slot.data.name == slotName) { - var attachment = null; - if (attachmentName != null) { - attachment = this.getAttachment(i, attachmentName); - if (attachment == null) - throw new Error("Attachment not found: " + attachmentName + ", for slot: " + slotName); - } - slot.setAttachment(attachment); - return; - } - } - throw new Error("Slot not found: " + slotName); - }; - Skeleton.prototype.findIkConstraint = function (constraintName) { - if (constraintName == null) - throw new Error("constraintName cannot be null."); - var ikConstraints = this.ikConstraints; - for (var i = 0, n = ikConstraints.length; i < n; i++) { - var ikConstraint = ikConstraints[i]; - if (ikConstraint.data.name == constraintName) - return ikConstraint; - } - return null; - }; - Skeleton.prototype.findTransformConstraint = function (constraintName) { - if (constraintName == null) - throw new Error("constraintName cannot be null."); - var transformConstraints = this.transformConstraints; - for (var i = 0, n = transformConstraints.length; i < n; i++) { - var constraint = transformConstraints[i]; - if (constraint.data.name == constraintName) - return constraint; - } - return null; - }; - Skeleton.prototype.findPathConstraint = function (constraintName) { - if (constraintName == null) - throw new Error("constraintName cannot be null."); - var pathConstraints = this.pathConstraints; - for (var i = 0, n = pathConstraints.length; i < n; i++) { - var constraint = pathConstraints[i]; - if (constraint.data.name == constraintName) - return constraint; - } - return null; - }; - Skeleton.prototype.getBounds = function (offset, size, temp) { - if (temp === void 0) { temp = new Array(2); } - if (offset == null) - throw new Error("offset cannot be null."); - if (size == null) - throw new Error("size cannot be null."); - var drawOrder = this.drawOrder; - var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY; - for (var i = 0, n = drawOrder.length; i < n; i++) { - var slot = drawOrder[i]; - if (!slot.bone.active) - continue; - var verticesLength = 0; - var vertices = null; - var attachment = slot.getAttachment(); - if (attachment instanceof core.RegionAttachment) { - verticesLength = 8; - vertices = core.Utils.setArraySize(temp, verticesLength, 0); - attachment.computeWorldVertices(slot.bone, vertices, 0, 2); - } - else if (attachment instanceof core.MeshAttachment) { - var mesh = attachment; - verticesLength = mesh.worldVerticesLength; - vertices = core.Utils.setArraySize(temp, verticesLength, 0); - mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2); - } - if (vertices != null) { - for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) { - var x = vertices[ii], y = vertices[ii + 1]; - minX = Math.min(minX, x); - minY = Math.min(minY, y); - maxX = Math.max(maxX, x); - maxY = Math.max(maxY, y); - } - } - } - offset.set(minX, minY); - size.set(maxX - minX, maxY - minY); - }; - Skeleton.prototype.update = function (delta) { - this.time += delta; - }; - Object.defineProperty(Skeleton.prototype, "flipX", { - get: function () { - return this.scaleX == -1; - }, - set: function (value) { - if (!Skeleton.deprecatedWarning1) { - Skeleton.deprecatedWarning1 = true; - console.warn("Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY"); - } - this.scaleX = value ? 1.0 : -1.0; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Skeleton.prototype, "flipY", { - get: function () { - return this.scaleY == -1; - }, - set: function (value) { - if (!Skeleton.deprecatedWarning1) { - Skeleton.deprecatedWarning1 = true; - console.warn("Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY"); - } - this.scaleY = value ? 1.0 : -1.0; - }, - enumerable: true, - configurable: true - }); - Skeleton.deprecatedWarning1 = false; - return Skeleton; - }()); - core.Skeleton = Skeleton; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var SkeletonBinary = (function () { - function SkeletonBinary(attachmentLoader) { - this.scale = 1; - this.linkedMeshes = new Array(); - this.attachmentLoader = attachmentLoader; - } - SkeletonBinary.prototype.readSkeletonData = function (binary) { - var scale = this.scale; - var skeletonData = new core.SkeletonData(); - skeletonData.name = ""; - var input = new BinaryInput(binary); - skeletonData.hash = input.readString(); - skeletonData.version = input.readString(); - skeletonData.x = input.readFloat(); - skeletonData.y = input.readFloat(); - skeletonData.width = input.readFloat(); - skeletonData.height = input.readFloat(); - var nonessential = input.readBoolean(); - if (nonessential) { - skeletonData.fps = input.readFloat(); - skeletonData.imagesPath = input.readString(); - skeletonData.audioPath = input.readString(); - } - var n = 0; - n = input.readInt(true); - for (var i = 0; i < n; i++) - input.strings.push(input.readString()); - n = input.readInt(true); - for (var i = 0; i < n; i++) { - var name_2 = input.readString(); - var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)]; - var data = new core.BoneData(i, name_2, parent_2); - data.rotation = input.readFloat(); - data.x = input.readFloat() * scale; - data.y = input.readFloat() * scale; - data.scaleX = input.readFloat(); - data.scaleY = input.readFloat(); - data.shearX = input.readFloat(); - data.shearY = input.readFloat(); - data.length = input.readFloat() * scale; - data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)]; - data.skinRequired = input.readBoolean(); - if (nonessential) - core.Color.rgba8888ToColor(data.color, input.readInt32()); - skeletonData.bones.push(data); - } - n = input.readInt(true); - for (var i = 0; i < n; i++) { - var slotName = input.readString(); - var boneData = skeletonData.bones[input.readInt(true)]; - var data = new core.SlotData(i, slotName, boneData); - core.Color.rgba8888ToColor(data.color, input.readInt32()); - var darkColor = input.readInt32(); - if (darkColor != -1) - core.Color.rgb888ToColor(data.darkColor = new core.Color(), darkColor); - data.attachmentName = input.readStringRef(); - data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)]; - skeletonData.slots.push(data); - } - n = input.readInt(true); - for (var i = 0, nn = void 0; i < n; i++) { - var data = new core.IkConstraintData(input.readString()); - data.order = input.readInt(true); - data.skinRequired = input.readBoolean(); - nn = input.readInt(true); - for (var ii = 0; ii < nn; ii++) - data.bones.push(skeletonData.bones[input.readInt(true)]); - data.target = skeletonData.bones[input.readInt(true)]; - data.mix = input.readFloat(); - data.softness = input.readFloat() * scale; - data.bendDirection = input.readByte(); - data.compress = input.readBoolean(); - data.stretch = input.readBoolean(); - data.uniform = input.readBoolean(); - skeletonData.ikConstraints.push(data); - } - n = input.readInt(true); - for (var i = 0, nn = void 0; i < n; i++) { - var data = new core.TransformConstraintData(input.readString()); - data.order = input.readInt(true); - data.skinRequired = input.readBoolean(); - nn = input.readInt(true); - for (var ii = 0; ii < nn; ii++) - data.bones.push(skeletonData.bones[input.readInt(true)]); - data.target = skeletonData.bones[input.readInt(true)]; - data.local = input.readBoolean(); - data.relative = input.readBoolean(); - data.offsetRotation = input.readFloat(); - data.offsetX = input.readFloat() * scale; - data.offsetY = input.readFloat() * scale; - data.offsetScaleX = input.readFloat(); - data.offsetScaleY = input.readFloat(); - data.offsetShearY = input.readFloat(); - data.rotateMix = input.readFloat(); - data.translateMix = input.readFloat(); - data.scaleMix = input.readFloat(); - data.shearMix = input.readFloat(); - skeletonData.transformConstraints.push(data); - } - n = input.readInt(true); - for (var i = 0, nn = void 0; i < n; i++) { - var data = new core.PathConstraintData(input.readString()); - data.order = input.readInt(true); - data.skinRequired = input.readBoolean(); - nn = input.readInt(true); - for (var ii = 0; ii < nn; ii++) - data.bones.push(skeletonData.bones[input.readInt(true)]); - data.target = skeletonData.slots[input.readInt(true)]; - data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)]; - data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)]; - data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)]; - data.offsetRotation = input.readFloat(); - data.position = input.readFloat(); - if (data.positionMode == core.PositionMode.Fixed) - data.position *= scale; - data.spacing = input.readFloat(); - if (data.spacingMode == core.SpacingMode.Length || data.spacingMode == core.SpacingMode.Fixed) - data.spacing *= scale; - data.rotateMix = input.readFloat(); - data.translateMix = input.readFloat(); - skeletonData.pathConstraints.push(data); - } - var defaultSkin = this.readSkin(input, skeletonData, true, nonessential); - if (defaultSkin != null) { - skeletonData.defaultSkin = defaultSkin; - skeletonData.skins.push(defaultSkin); - } - { - var i = skeletonData.skins.length; - core.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true)); - for (; i < n; i++) - skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential); - } - n = this.linkedMeshes.length; - for (var i = 0; i < n; i++) { - var linkedMesh = this.linkedMeshes[i]; - var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin); - if (skin == null) - throw new Error("Skin not found: " + linkedMesh.skin); - var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); - if (parent_3 == null) - throw new Error("Parent mesh not found: " + linkedMesh.parent); - linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh; - linkedMesh.mesh.setParentMesh(parent_3); - } - this.linkedMeshes.length = 0; - n = input.readInt(true); - for (var i = 0; i < n; i++) { - var data = new core.EventData(input.readStringRef()); - data.intValue = input.readInt(false); - data.floatValue = input.readFloat(); - data.stringValue = input.readString(); - data.audioPath = input.readString(); - if (data.audioPath != null) { - data.volume = input.readFloat(); - data.balance = input.readFloat(); - } - skeletonData.events.push(data); - } - n = input.readInt(true); - for (var i = 0; i < n; i++) - skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData)); - return skeletonData; - }; - SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) { - var skin = new core.Skin(defaultSkin ? "default" : input.readStringRef()); - if (!defaultSkin) { - skin.bones.length = input.readInt(true); - for (var i = 0, n = skin.bones.length; i < n; i++) - skin.bones[i] = skeletonData.bones[input.readInt(true)]; - for (var i = 0, n = input.readInt(true); i < n; i++) - skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]); - for (var i = 0, n = input.readInt(true); i < n; i++) - skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]); - for (var i = 0, n = input.readInt(true); i < n; i++) - skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]); - } - for (var i = 0, n = input.readInt(true); i < n; i++) { - var slotIndex = input.readInt(true); - for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { - var name_3 = input.readStringRef(); - var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential); - if (attachment != null) - skin.setAttachment(slotIndex, name_3, attachment); - } - } - return skin; - }; - SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) { - var scale = this.scale; - var name = input.readStringRef(); - if (name == null) - name = attachmentName; - var typeIndex = input.readByte(); - var type = SkeletonBinary.AttachmentTypeValues[typeIndex]; - switch (type) { - case core.AttachmentType.Region: { - var path = input.readStringRef(); - var rotation = input.readFloat(); - var x = input.readFloat(); - var y = input.readFloat(); - var scaleX = input.readFloat(); - var scaleY = input.readFloat(); - var width = input.readFloat(); - var height = input.readFloat(); - var color = input.readInt32(); - if (path == null) - path = name; - var region = this.attachmentLoader.newRegionAttachment(skin, name, path); - if (region == null) - return null; - region.path = path; - region.x = x * scale; - region.y = y * scale; - region.scaleX = scaleX; - region.scaleY = scaleY; - region.rotation = rotation; - region.width = width * scale; - region.height = height * scale; - core.Color.rgba8888ToColor(region.color, color); - return region; - } - case core.AttachmentType.BoundingBox: { - var vertexCount = input.readInt(true); - var vertices = this.readVertices(input, vertexCount); - var color = nonessential ? input.readInt32() : 0; - var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); - if (box == null) - return null; - box.worldVerticesLength = vertexCount << 1; - box.vertices = vertices.vertices; - box.bones = vertices.bones; - if (nonessential) - core.Color.rgba8888ToColor(box.color, color); - return box; - } - case core.AttachmentType.Mesh: { - var path = input.readStringRef(); - var color = input.readInt32(); - var vertexCount = input.readInt(true); - var uvs = this.readFloatArray(input, vertexCount << 1, 1); - var triangles = this.readShortArray(input); - var vertices = this.readVertices(input, vertexCount); - var hullLength = input.readInt(true); - var edges = null; - var width = 0, height = 0; - if (nonessential) { - edges = this.readShortArray(input); - width = input.readFloat(); - height = input.readFloat(); - } - if (path == null) - path = name; - var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path); - if (mesh == null) - return null; - mesh.path = path; - core.Color.rgba8888ToColor(mesh.color, color); - mesh.bones = vertices.bones; - mesh.vertices = vertices.vertices; - mesh.worldVerticesLength = vertexCount << 1; - mesh.triangles = triangles; - mesh.regionUVs = new Float32Array(uvs); - mesh.hullLength = hullLength << 1; - if (nonessential) { - mesh.edges = edges; - mesh.width = width * scale; - mesh.height = height * scale; - } - return mesh; - } - case core.AttachmentType.LinkedMesh: { - var path = input.readStringRef(); - var color = input.readInt32(); - var skinName = input.readStringRef(); - var parent_4 = input.readStringRef(); - var inheritDeform = input.readBoolean(); - var width = 0, height = 0; - if (nonessential) { - width = input.readFloat(); - height = input.readFloat(); - } - if (path == null) - path = name; - var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path); - if (mesh == null) - return null; - mesh.path = path; - core.Color.rgba8888ToColor(mesh.color, color); - if (nonessential) { - mesh.width = width * scale; - mesh.height = height * scale; - } - this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform)); - return mesh; - } - case core.AttachmentType.Path: { - var closed_1 = input.readBoolean(); - var constantSpeed = input.readBoolean(); - var vertexCount = input.readInt(true); - var vertices = this.readVertices(input, vertexCount); - var lengths = core.Utils.newArray(vertexCount / 3, 0); - for (var i = 0, n = lengths.length; i < n; i++) - lengths[i] = input.readFloat() * scale; - var color = nonessential ? input.readInt32() : 0; - var path = this.attachmentLoader.newPathAttachment(skin, name); - if (path == null) - return null; - path.closed = closed_1; - path.constantSpeed = constantSpeed; - path.worldVerticesLength = vertexCount << 1; - path.vertices = vertices.vertices; - path.bones = vertices.bones; - path.lengths = lengths; - if (nonessential) - core.Color.rgba8888ToColor(path.color, color); - return path; - } - case core.AttachmentType.Point: { - var rotation = input.readFloat(); - var x = input.readFloat(); - var y = input.readFloat(); - var color = nonessential ? input.readInt32() : 0; - var point = this.attachmentLoader.newPointAttachment(skin, name); - if (point == null) - return null; - point.x = x * scale; - point.y = y * scale; - point.rotation = rotation; - if (nonessential) - core.Color.rgba8888ToColor(point.color, color); - return point; - } - case core.AttachmentType.Clipping: { - var endSlotIndex = input.readInt(true); - var vertexCount = input.readInt(true); - var vertices = this.readVertices(input, vertexCount); - var color = nonessential ? input.readInt32() : 0; - var clip = this.attachmentLoader.newClippingAttachment(skin, name); - if (clip == null) - return null; - clip.endSlot = skeletonData.slots[endSlotIndex]; - clip.worldVerticesLength = vertexCount << 1; - clip.vertices = vertices.vertices; - clip.bones = vertices.bones; - if (nonessential) - core.Color.rgba8888ToColor(clip.color, color); - return clip; - } - } - return null; - }; - SkeletonBinary.prototype.readVertices = function (input, vertexCount) { - var verticesLength = vertexCount << 1; - var vertices = new Vertices(); - var scale = this.scale; - if (!input.readBoolean()) { - vertices.vertices = this.readFloatArray(input, verticesLength, scale); - return vertices; - } - var weights = new Array(); - var bonesArray = new Array(); - for (var i = 0; i < vertexCount; i++) { - var boneCount = input.readInt(true); - bonesArray.push(boneCount); - for (var ii = 0; ii < boneCount; ii++) { - bonesArray.push(input.readInt(true)); - weights.push(input.readFloat() * scale); - weights.push(input.readFloat() * scale); - weights.push(input.readFloat()); - } - } - vertices.vertices = core.Utils.toFloatArray(weights); - vertices.bones = bonesArray; - return vertices; - }; - SkeletonBinary.prototype.readFloatArray = function (input, n, scale) { - var array = new Array(n); - if (scale == 1) { - for (var i = 0; i < n; i++) - array[i] = input.readFloat(); - } - else { - for (var i = 0; i < n; i++) - array[i] = input.readFloat() * scale; - } - return array; - }; - SkeletonBinary.prototype.readShortArray = function (input) { - var n = input.readInt(true); - var array = new Array(n); - for (var i = 0; i < n; i++) - array[i] = input.readShort(); - return array; - }; - SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) { - var timelines = new Array(); - var scale = this.scale; - var duration = 0; - var tempColor1 = new core.Color(); - var tempColor2 = new core.Color(); - for (var i = 0, n = input.readInt(true); i < n; i++) { - var slotIndex = input.readInt(true); - for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { - var timelineType = input.readByte(); - var frameCount = input.readInt(true); - switch (timelineType) { - case SkeletonBinary.SLOT_ATTACHMENT: { - var timeline = new core.AttachmentTimeline(frameCount); - timeline.slotIndex = slotIndex; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) - timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef()); - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[frameCount - 1]); - break; - } - case SkeletonBinary.SLOT_COLOR: { - var timeline = new core.ColorTimeline(frameCount); - timeline.slotIndex = slotIndex; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - var time = input.readFloat(); - core.Color.rgba8888ToColor(tempColor1, input.readInt32()); - timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.ColorTimeline.ENTRIES]); - break; - } - case SkeletonBinary.SLOT_TWO_COLOR: { - var timeline = new core.TwoColorTimeline(frameCount); - timeline.slotIndex = slotIndex; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - var time = input.readFloat(); - core.Color.rgba8888ToColor(tempColor1, input.readInt32()); - core.Color.rgb888ToColor(tempColor2, input.readInt32()); - timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.TwoColorTimeline.ENTRIES]); - break; - } - } - } - } - for (var i = 0, n = input.readInt(true); i < n; i++) { - var boneIndex = input.readInt(true); - for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { - var timelineType = input.readByte(); - var frameCount = input.readInt(true); - switch (timelineType) { - case SkeletonBinary.BONE_ROTATE: { - var timeline = new core.RotateTimeline(frameCount); - timeline.boneIndex = boneIndex; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - timeline.setFrame(frameIndex, input.readFloat(), input.readFloat()); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.RotateTimeline.ENTRIES]); - break; - } - case SkeletonBinary.BONE_TRANSLATE: - case SkeletonBinary.BONE_SCALE: - case SkeletonBinary.BONE_SHEAR: { - var timeline = void 0; - var timelineScale = 1; - if (timelineType == SkeletonBinary.BONE_SCALE) - timeline = new core.ScaleTimeline(frameCount); - else if (timelineType == SkeletonBinary.BONE_SHEAR) - timeline = new core.ShearTimeline(frameCount); - else { - timeline = new core.TranslateTimeline(frameCount); - timelineScale = scale; - } - timeline.boneIndex = boneIndex; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.TranslateTimeline.ENTRIES]); - break; - } - } - } - } - for (var i = 0, n = input.readInt(true); i < n; i++) { - var index = input.readInt(true); - var frameCount = input.readInt(true); - var timeline = new core.IkConstraintTimeline(frameCount); - timeline.ikConstraintIndex = index; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean()); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.IkConstraintTimeline.ENTRIES]); - } - for (var i = 0, n = input.readInt(true); i < n; i++) { - var index = input.readInt(true); - var frameCount = input.readInt(true); - var timeline = new core.TransformConstraintTimeline(frameCount); - timeline.transformConstraintIndex = index; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat()); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.TransformConstraintTimeline.ENTRIES]); - } - for (var i = 0, n = input.readInt(true); i < n; i++) { - var index = input.readInt(true); - var data = skeletonData.pathConstraints[index]; - for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { - var timelineType = input.readByte(); - var frameCount = input.readInt(true); - switch (timelineType) { - case SkeletonBinary.PATH_POSITION: - case SkeletonBinary.PATH_SPACING: { - var timeline = void 0; - var timelineScale = 1; - if (timelineType == SkeletonBinary.PATH_SPACING) { - timeline = new core.PathConstraintSpacingTimeline(frameCount); - if (data.spacingMode == core.SpacingMode.Length || data.spacingMode == core.SpacingMode.Fixed) - timelineScale = scale; - } - else { - timeline = new core.PathConstraintPositionTimeline(frameCount); - if (data.positionMode == core.PositionMode.Fixed) - timelineScale = scale; - } - timeline.pathConstraintIndex = index; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.PathConstraintPositionTimeline.ENTRIES]); - break; - } - case SkeletonBinary.PATH_MIX: { - var timeline = new core.PathConstraintMixTimeline(frameCount); - timeline.pathConstraintIndex = index; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat()); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.PathConstraintMixTimeline.ENTRIES]); - break; - } - } - } - } - for (var i = 0, n = input.readInt(true); i < n; i++) { - var skin = skeletonData.skins[input.readInt(true)]; - for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { - var slotIndex = input.readInt(true); - for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) { - var attachment = skin.getAttachment(slotIndex, input.readStringRef()); - var weighted = attachment.bones != null; - var vertices = attachment.vertices; - var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length; - var frameCount = input.readInt(true); - var timeline = new core.DeformTimeline(frameCount); - timeline.slotIndex = slotIndex; - timeline.attachment = attachment; - for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { - var time = input.readFloat(); - var deform = void 0; - var end = input.readInt(true); - if (end == 0) - deform = weighted ? core.Utils.newFloatArray(deformLength) : vertices; - else { - deform = core.Utils.newFloatArray(deformLength); - var start = input.readInt(true); - end += start; - if (scale == 1) { - for (var v = start; v < end; v++) - deform[v] = input.readFloat(); - } - else { - for (var v = start; v < end; v++) - deform[v] = input.readFloat() * scale; - } - if (!weighted) { - for (var v = 0, vn = deform.length; v < vn; v++) - deform[v] += vertices[v]; - } - } - timeline.setFrame(frameIndex, time, deform); - if (frameIndex < frameCount - 1) - this.readCurve(input, frameIndex, timeline); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[frameCount - 1]); - } - } - } - var drawOrderCount = input.readInt(true); - if (drawOrderCount > 0) { - var timeline = new core.DrawOrderTimeline(drawOrderCount); - var slotCount = skeletonData.slots.length; - for (var i = 0; i < drawOrderCount; i++) { - var time = input.readFloat(); - var offsetCount = input.readInt(true); - var drawOrder = core.Utils.newArray(slotCount, 0); - for (var ii = slotCount - 1; ii >= 0; ii--) - drawOrder[ii] = -1; - var unchanged = core.Utils.newArray(slotCount - offsetCount, 0); - var originalIndex = 0, unchangedIndex = 0; - for (var ii = 0; ii < offsetCount; ii++) { - var slotIndex = input.readInt(true); - while (originalIndex != slotIndex) - unchanged[unchangedIndex++] = originalIndex++; - drawOrder[originalIndex + input.readInt(true)] = originalIndex++; - } - while (originalIndex < slotCount) - unchanged[unchangedIndex++] = originalIndex++; - for (var ii = slotCount - 1; ii >= 0; ii--) - if (drawOrder[ii] == -1) - drawOrder[ii] = unchanged[--unchangedIndex]; - timeline.setFrame(i, time, drawOrder); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[drawOrderCount - 1]); - } - var eventCount = input.readInt(true); - if (eventCount > 0) { - var timeline = new core.EventTimeline(eventCount); - for (var i = 0; i < eventCount; i++) { - var time = input.readFloat(); - var eventData = skeletonData.events[input.readInt(true)]; - var event_4 = new core.Event(time, eventData); - event_4.intValue = input.readInt(false); - event_4.floatValue = input.readFloat(); - event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue; - if (event_4.data.audioPath != null) { - event_4.volume = input.readFloat(); - event_4.balance = input.readFloat(); - } - timeline.setFrame(i, event_4); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[eventCount - 1]); - } - return new core.Animation(name, timelines, duration); - }; - SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) { - switch (input.readByte()) { - case SkeletonBinary.CURVE_STEPPED: - timeline.setStepped(frameIndex); - break; - case SkeletonBinary.CURVE_BEZIER: - this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat()); - break; - } - }; - SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) { - timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2); - }; - SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6]; - SkeletonBinary.TransformModeValues = [core.TransformMode.Normal, core.TransformMode.OnlyTranslation, core.TransformMode.NoRotationOrReflection, core.TransformMode.NoScale, core.TransformMode.NoScaleOrReflection]; - SkeletonBinary.PositionModeValues = [core.PositionMode.Fixed, core.PositionMode.Percent]; - SkeletonBinary.SpacingModeValues = [core.SpacingMode.Length, core.SpacingMode.Fixed, core.SpacingMode.Percent]; - SkeletonBinary.RotateModeValues = [core.RotateMode.Tangent, core.RotateMode.Chain, core.RotateMode.ChainScale]; - SkeletonBinary.BlendModeValues = [core.BlendMode.Normal, core.BlendMode.Additive, core.BlendMode.Multiply, core.BlendMode.Screen]; - SkeletonBinary.BONE_ROTATE = 0; - SkeletonBinary.BONE_TRANSLATE = 1; - SkeletonBinary.BONE_SCALE = 2; - SkeletonBinary.BONE_SHEAR = 3; - SkeletonBinary.SLOT_ATTACHMENT = 0; - SkeletonBinary.SLOT_COLOR = 1; - SkeletonBinary.SLOT_TWO_COLOR = 2; - SkeletonBinary.PATH_POSITION = 0; - SkeletonBinary.PATH_SPACING = 1; - SkeletonBinary.PATH_MIX = 2; - SkeletonBinary.CURVE_LINEAR = 0; - SkeletonBinary.CURVE_STEPPED = 1; - SkeletonBinary.CURVE_BEZIER = 2; - return SkeletonBinary; - }()); - core.SkeletonBinary = SkeletonBinary; - var BinaryInput = (function () { - function BinaryInput(data, strings, index, buffer) { - if (strings === void 0) { strings = new Array(); } - if (index === void 0) { index = 0; } - if (buffer === void 0) { buffer = new DataView(data.buffer); } - this.strings = strings; - this.index = index; - this.buffer = buffer; - } - BinaryInput.prototype.readByte = function () { - return this.buffer.getInt8(this.index++); - }; - BinaryInput.prototype.readShort = function () { - var value = this.buffer.getInt16(this.index); - this.index += 2; - return value; - }; - BinaryInput.prototype.readInt32 = function () { - var value = this.buffer.getInt32(this.index); - this.index += 4; - return value; - }; - BinaryInput.prototype.readInt = function (optimizePositive) { - var b = this.readByte(); - var result = b & 0x7F; - if ((b & 0x80) != 0) { - b = this.readByte(); - result |= (b & 0x7F) << 7; - if ((b & 0x80) != 0) { - b = this.readByte(); - result |= (b & 0x7F) << 14; - if ((b & 0x80) != 0) { - b = this.readByte(); - result |= (b & 0x7F) << 21; - if ((b & 0x80) != 0) { - b = this.readByte(); - result |= (b & 0x7F) << 28; - } - } - } - } - return optimizePositive ? result : ((result >>> 1) ^ -(result & 1)); - }; - BinaryInput.prototype.readStringRef = function () { - var index = this.readInt(true); - return index == 0 ? null : this.strings[index - 1]; - }; - BinaryInput.prototype.readString = function () { - var byteCount = this.readInt(true); - switch (byteCount) { - case 0: - return null; - case 1: - return ""; - } - byteCount--; - var chars = ""; - var charCount = 0; - for (var i = 0; i < byteCount;) { - var b = this.readByte(); - switch (b >> 4) { - case 12: - case 13: - chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F)); - i += 2; - break; - case 14: - chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F)); - i += 3; - break; - default: - chars += String.fromCharCode(b); - i++; - } - } - return chars; - }; - BinaryInput.prototype.readFloat = function () { - var value = this.buffer.getFloat32(this.index); - this.index += 4; - return value; - }; - BinaryInput.prototype.readBoolean = function () { - return this.readByte() != 0; - }; - return BinaryInput; - }()); - var LinkedMesh = (function () { - function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) { - this.mesh = mesh; - this.skin = skin; - this.slotIndex = slotIndex; - this.parent = parent; - this.inheritDeform = inheritDeform; - } - return LinkedMesh; - }()); - var Vertices = (function () { - function Vertices(bones, vertices) { - if (bones === void 0) { bones = null; } - if (vertices === void 0) { vertices = null; } - this.bones = bones; - this.vertices = vertices; - } - return Vertices; - }()); - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var SkeletonBounds = (function () { - function SkeletonBounds() { - this.minX = 0; - this.minY = 0; - this.maxX = 0; - this.maxY = 0; - this.boundingBoxes = new Array(); - this.polygons = new Array(); - this.polygonPool = new core.Pool(function () { - return core.Utils.newFloatArray(16); - }); - } - SkeletonBounds.prototype.update = function (skeleton, updateAabb) { - if (skeleton == null) - throw new Error("skeleton cannot be null."); - var boundingBoxes = this.boundingBoxes; - var polygons = this.polygons; - var polygonPool = this.polygonPool; - var slots = skeleton.slots; - var slotCount = slots.length; - boundingBoxes.length = 0; - polygonPool.freeAll(polygons); - polygons.length = 0; - for (var i = 0; i < slotCount; i++) { - var slot = slots[i]; - if (!slot.bone.active) - continue; - var attachment = slot.getAttachment(); - if (attachment instanceof core.BoundingBoxAttachment) { - var boundingBox = attachment; - boundingBoxes.push(boundingBox); - var polygon = polygonPool.obtain(); - if (polygon.length != boundingBox.worldVerticesLength) { - polygon = core.Utils.newFloatArray(boundingBox.worldVerticesLength); - } - polygons.push(polygon); - boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2); - } - } - if (updateAabb) { - this.aabbCompute(); - } - else { - this.minX = Number.POSITIVE_INFINITY; - this.minY = Number.POSITIVE_INFINITY; - this.maxX = Number.NEGATIVE_INFINITY; - this.maxY = Number.NEGATIVE_INFINITY; - } - }; - SkeletonBounds.prototype.aabbCompute = function () { - var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY; - var polygons = this.polygons; - for (var i = 0, n = polygons.length; i < n; i++) { - var polygon = polygons[i]; - var vertices = polygon; - for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) { - var x = vertices[ii]; - var y = vertices[ii + 1]; - minX = Math.min(minX, x); - minY = Math.min(minY, y); - maxX = Math.max(maxX, x); - maxY = Math.max(maxY, y); - } - } - this.minX = minX; - this.minY = minY; - this.maxX = maxX; - this.maxY = maxY; - }; - SkeletonBounds.prototype.aabbContainsPoint = function (x, y) { - return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY; - }; - SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) { - var minX = this.minX; - var minY = this.minY; - var maxX = this.maxX; - var maxY = this.maxY; - if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY)) - return false; - var m = (y2 - y1) / (x2 - x1); - var y = m * (minX - x1) + y1; - if (y > minY && y < maxY) - return true; - y = m * (maxX - x1) + y1; - if (y > minY && y < maxY) - return true; - var x = (minY - y1) / m + x1; - if (x > minX && x < maxX) - return true; - x = (maxY - y1) / m + x1; - if (x > minX && x < maxX) - return true; - return false; - }; - SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) { - return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY; - }; - SkeletonBounds.prototype.containsPoint = function (x, y) { - var polygons = this.polygons; - for (var i = 0, n = polygons.length; i < n; i++) - if (this.containsPointPolygon(polygons[i], x, y)) - return this.boundingBoxes[i]; - return null; - }; - SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) { - var vertices = polygon; - var nn = polygon.length; - var prevIndex = nn - 2; - var inside = false; - for (var ii = 0; ii < nn; ii += 2) { - var vertexY = vertices[ii + 1]; - var prevY = vertices[prevIndex + 1]; - if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) { - var vertexX = vertices[ii]; - if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) - inside = !inside; - } - prevIndex = ii; - } - return inside; - }; - SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) { - var polygons = this.polygons; - for (var i = 0, n = polygons.length; i < n; i++) - if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) - return this.boundingBoxes[i]; - return null; - }; - SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) { - var vertices = polygon; - var nn = polygon.length; - var width12 = x1 - x2, height12 = y1 - y2; - var det1 = x1 * y2 - y1 * x2; - var x3 = vertices[nn - 2], y3 = vertices[nn - 1]; - for (var ii = 0; ii < nn; ii += 2) { - var x4 = vertices[ii], y4 = vertices[ii + 1]; - var det2 = x3 * y4 - y3 * x4; - var width34 = x3 - x4, height34 = y3 - y4; - var det3 = width12 * height34 - height12 * width34; - var x = (det1 * width34 - width12 * det2) / det3; - if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) { - var y = (det1 * height34 - height12 * det2) / det3; - if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) - return true; - } - x3 = x4; - y3 = y4; - } - return false; - }; - SkeletonBounds.prototype.getPolygon = function (boundingBox) { - if (boundingBox == null) - throw new Error("boundingBox cannot be null."); - var index = this.boundingBoxes.indexOf(boundingBox); - return index == -1 ? null : this.polygons[index]; - }; - SkeletonBounds.prototype.getWidth = function () { - return this.maxX - this.minX; - }; - SkeletonBounds.prototype.getHeight = function () { - return this.maxY - this.minY; - }; - return SkeletonBounds; - }()); - core.SkeletonBounds = SkeletonBounds; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var SkeletonClipping = (function () { - function SkeletonClipping() { - this.triangulator = new core.Triangulator(); - this.clippingPolygon = new Array(); - this.clipOutput = new Array(); - this.clippedVertices = new Array(); - this.clippedTriangles = new Array(); - this.scratch = new Array(); - } - SkeletonClipping.prototype.clipStart = function (slot, clip) { - if (this.clipAttachment != null) - return 0; - this.clipAttachment = clip; - var n = clip.worldVerticesLength; - var vertices = core.Utils.setArraySize(this.clippingPolygon, n); - clip.computeWorldVertices(slot, 0, n, vertices, 0, 2); - var clippingPolygon = this.clippingPolygon; - SkeletonClipping.makeClockwise(clippingPolygon); - var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); - for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { - var polygon = clippingPolygons[i]; - SkeletonClipping.makeClockwise(polygon); - polygon.push(polygon[0]); - polygon.push(polygon[1]); - } - return clippingPolygons.length; - }; - SkeletonClipping.prototype.clipEndWithSlot = function (slot) { - if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data) - this.clipEnd(); - }; - SkeletonClipping.prototype.clipEnd = function () { - if (this.clipAttachment == null) - return; - this.clipAttachment = null; - this.clippingPolygons = null; - this.clippedVertices.length = 0; - this.clippedTriangles.length = 0; - this.clippingPolygon.length = 0; - }; - SkeletonClipping.prototype.isClipping = function () { - return this.clipAttachment != null; - }; - SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) { - var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices; - var clippedTriangles = this.clippedTriangles; - var polygons = this.clippingPolygons; - var polygonsCount = this.clippingPolygons.length; - var vertexSize = twoColor ? 12 : 8; - var index = 0; - clippedVertices.length = 0; - clippedTriangles.length = 0; - outer: for (var i = 0; i < trianglesLength; i += 3) { - var vertexOffset = triangles[i] << 1; - var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1]; - var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1]; - vertexOffset = triangles[i + 1] << 1; - var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1]; - var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1]; - vertexOffset = triangles[i + 2] << 1; - var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1]; - var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1]; - for (var p = 0; p < polygonsCount; p++) { - var s = clippedVertices.length; - if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) { - var clipOutputLength = clipOutput.length; - if (clipOutputLength == 0) - continue; - var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1; - var d = 1 / (d0 * d2 + d1 * (y1 - y3)); - var clipOutputCount = clipOutputLength >> 1; - var clipOutputItems = this.clipOutput; - var clippedVerticesItems = core.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize); - for (var ii = 0; ii < clipOutputLength; ii += 2) { - var x = clipOutputItems[ii], y = clipOutputItems[ii + 1]; - clippedVerticesItems[s] = x; - clippedVerticesItems[s + 1] = y; - clippedVerticesItems[s + 2] = light.r; - clippedVerticesItems[s + 3] = light.g; - clippedVerticesItems[s + 4] = light.b; - clippedVerticesItems[s + 5] = light.a; - var c0 = x - x3, c1 = y - y3; - var a = (d0 * c0 + d1 * c1) * d; - var b = (d4 * c0 + d2 * c1) * d; - var c = 1 - a - b; - clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c; - clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c; - if (twoColor) { - clippedVerticesItems[s + 8] = dark.r; - clippedVerticesItems[s + 9] = dark.g; - clippedVerticesItems[s + 10] = dark.b; - clippedVerticesItems[s + 11] = dark.a; - } - s += vertexSize; - } - s = clippedTriangles.length; - var clippedTrianglesItems = core.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2)); - clipOutputCount--; - for (var ii = 1; ii < clipOutputCount; ii++) { - clippedTrianglesItems[s] = index; - clippedTrianglesItems[s + 1] = (index + ii); - clippedTrianglesItems[s + 2] = (index + ii + 1); - s += 3; - } - index += clipOutputCount + 1; - } - else { - var clippedVerticesItems = core.Utils.setArraySize(clippedVertices, s + 3 * vertexSize); - clippedVerticesItems[s] = x1; - clippedVerticesItems[s + 1] = y1; - clippedVerticesItems[s + 2] = light.r; - clippedVerticesItems[s + 3] = light.g; - clippedVerticesItems[s + 4] = light.b; - clippedVerticesItems[s + 5] = light.a; - if (!twoColor) { - clippedVerticesItems[s + 6] = u1; - clippedVerticesItems[s + 7] = v1; - clippedVerticesItems[s + 8] = x2; - clippedVerticesItems[s + 9] = y2; - clippedVerticesItems[s + 10] = light.r; - clippedVerticesItems[s + 11] = light.g; - clippedVerticesItems[s + 12] = light.b; - clippedVerticesItems[s + 13] = light.a; - clippedVerticesItems[s + 14] = u2; - clippedVerticesItems[s + 15] = v2; - clippedVerticesItems[s + 16] = x3; - clippedVerticesItems[s + 17] = y3; - clippedVerticesItems[s + 18] = light.r; - clippedVerticesItems[s + 19] = light.g; - clippedVerticesItems[s + 20] = light.b; - clippedVerticesItems[s + 21] = light.a; - clippedVerticesItems[s + 22] = u3; - clippedVerticesItems[s + 23] = v3; - } - else { - clippedVerticesItems[s + 6] = u1; - clippedVerticesItems[s + 7] = v1; - clippedVerticesItems[s + 8] = dark.r; - clippedVerticesItems[s + 9] = dark.g; - clippedVerticesItems[s + 10] = dark.b; - clippedVerticesItems[s + 11] = dark.a; - clippedVerticesItems[s + 12] = x2; - clippedVerticesItems[s + 13] = y2; - clippedVerticesItems[s + 14] = light.r; - clippedVerticesItems[s + 15] = light.g; - clippedVerticesItems[s + 16] = light.b; - clippedVerticesItems[s + 17] = light.a; - clippedVerticesItems[s + 18] = u2; - clippedVerticesItems[s + 19] = v2; - clippedVerticesItems[s + 20] = dark.r; - clippedVerticesItems[s + 21] = dark.g; - clippedVerticesItems[s + 22] = dark.b; - clippedVerticesItems[s + 23] = dark.a; - clippedVerticesItems[s + 24] = x3; - clippedVerticesItems[s + 25] = y3; - clippedVerticesItems[s + 26] = light.r; - clippedVerticesItems[s + 27] = light.g; - clippedVerticesItems[s + 28] = light.b; - clippedVerticesItems[s + 29] = light.a; - clippedVerticesItems[s + 30] = u3; - clippedVerticesItems[s + 31] = v3; - clippedVerticesItems[s + 32] = dark.r; - clippedVerticesItems[s + 33] = dark.g; - clippedVerticesItems[s + 34] = dark.b; - clippedVerticesItems[s + 35] = dark.a; - } - s = clippedTriangles.length; - var clippedTrianglesItems = core.Utils.setArraySize(clippedTriangles, s + 3); - clippedTrianglesItems[s] = index; - clippedTrianglesItems[s + 1] = (index + 1); - clippedTrianglesItems[s + 2] = (index + 2); - index += 3; - continue outer; - } - } - } - }; - SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) { - var originalOutput = output; - var clipped = false; - var input = null; - if (clippingArea.length % 4 >= 2) { - input = output; - output = this.scratch; - } - else - input = this.scratch; - input.length = 0; - input.push(x1); - input.push(y1); - input.push(x2); - input.push(y2); - input.push(x3); - input.push(y3); - input.push(x1); - input.push(y1); - output.length = 0; - var clippingVertices = clippingArea; - var clippingVerticesLast = clippingArea.length - 4; - for (var i = 0;; i += 2) { - var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1]; - var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3]; - var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2; - var inputVertices = input; - var inputVerticesLength = input.length - 2, outputStart = output.length; - for (var ii = 0; ii < inputVerticesLength; ii += 2) { - var inputX = inputVertices[ii], inputY = inputVertices[ii + 1]; - var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3]; - var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0; - if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) { - if (side2) { - output.push(inputX2); - output.push(inputY2); - continue; - } - var c0 = inputY2 - inputY, c2 = inputX2 - inputX; - var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY)); - output.push(edgeX + (edgeX2 - edgeX) * ua); - output.push(edgeY + (edgeY2 - edgeY) * ua); - } - else if (side2) { - var c0 = inputY2 - inputY, c2 = inputX2 - inputX; - var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY)); - output.push(edgeX + (edgeX2 - edgeX) * ua); - output.push(edgeY + (edgeY2 - edgeY) * ua); - output.push(inputX2); - output.push(inputY2); - } - clipped = true; - } - if (outputStart == output.length) { - originalOutput.length = 0; - return true; - } - output.push(output[0]); - output.push(output[1]); - if (i == clippingVerticesLast) - break; - var temp = output; - output = input; - output.length = 0; - input = temp; - } - if (originalOutput != output) { - originalOutput.length = 0; - for (var i = 0, n = output.length - 2; i < n; i++) - originalOutput[i] = output[i]; - } - else - originalOutput.length = originalOutput.length - 2; - return clipped; - }; - SkeletonClipping.makeClockwise = function (polygon) { - var vertices = polygon; - var verticeslength = polygon.length; - var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0; - for (var i = 0, n = verticeslength - 3; i < n; i += 2) { - p1x = vertices[i]; - p1y = vertices[i + 1]; - p2x = vertices[i + 2]; - p2y = vertices[i + 3]; - area += p1x * p2y - p2x * p1y; - } - if (area < 0) - return; - for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) { - var x = vertices[i], y = vertices[i + 1]; - var other = lastX - i; - vertices[i] = vertices[other]; - vertices[i + 1] = vertices[other + 1]; - vertices[other] = x; - vertices[other + 1] = y; - } - }; - return SkeletonClipping; - }()); - core.SkeletonClipping = SkeletonClipping; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var SkeletonData = (function () { - function SkeletonData() { - this.bones = new Array(); - this.slots = new Array(); - this.skins = new Array(); - this.events = new Array(); - this.animations = new Array(); - this.ikConstraints = new Array(); - this.transformConstraints = new Array(); - this.pathConstraints = new Array(); - this.fps = 0; - } - SkeletonData.prototype.findBone = function (boneName) { - if (boneName == null) - throw new Error("boneName cannot be null."); - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) { - var bone = bones[i]; - if (bone.name == boneName) - return bone; - } - return null; - }; - SkeletonData.prototype.findBoneIndex = function (boneName) { - if (boneName == null) - throw new Error("boneName cannot be null."); - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) - if (bones[i].name == boneName) - return i; - return -1; - }; - SkeletonData.prototype.findSlot = function (slotName) { - if (slotName == null) - throw new Error("slotName cannot be null."); - var slots = this.slots; - for (var i = 0, n = slots.length; i < n; i++) { - var slot = slots[i]; - if (slot.name == slotName) - return slot; - } - return null; - }; - SkeletonData.prototype.findSlotIndex = function (slotName) { - if (slotName == null) - throw new Error("slotName cannot be null."); - var slots = this.slots; - for (var i = 0, n = slots.length; i < n; i++) - if (slots[i].name == slotName) - return i; - return -1; - }; - SkeletonData.prototype.findSkin = function (skinName) { - if (skinName == null) - throw new Error("skinName cannot be null."); - var skins = this.skins; - for (var i = 0, n = skins.length; i < n; i++) { - var skin = skins[i]; - if (skin.name == skinName) - return skin; - } - return null; - }; - SkeletonData.prototype.findEvent = function (eventDataName) { - if (eventDataName == null) - throw new Error("eventDataName cannot be null."); - var events = this.events; - for (var i = 0, n = events.length; i < n; i++) { - var event_5 = events[i]; - if (event_5.name == eventDataName) - return event_5; - } - return null; - }; - SkeletonData.prototype.findAnimation = function (animationName) { - if (animationName == null) - throw new Error("animationName cannot be null."); - var animations = this.animations; - for (var i = 0, n = animations.length; i < n; i++) { - var animation = animations[i]; - if (animation.name == animationName) - return animation; - } - return null; - }; - SkeletonData.prototype.findIkConstraint = function (constraintName) { - if (constraintName == null) - throw new Error("constraintName cannot be null."); - var ikConstraints = this.ikConstraints; - for (var i = 0, n = ikConstraints.length; i < n; i++) { - var constraint = ikConstraints[i]; - if (constraint.name == constraintName) - return constraint; - } - return null; - }; - SkeletonData.prototype.findTransformConstraint = function (constraintName) { - if (constraintName == null) - throw new Error("constraintName cannot be null."); - var transformConstraints = this.transformConstraints; - for (var i = 0, n = transformConstraints.length; i < n; i++) { - var constraint = transformConstraints[i]; - if (constraint.name == constraintName) - return constraint; - } - return null; - }; - SkeletonData.prototype.findPathConstraint = function (constraintName) { - if (constraintName == null) - throw new Error("constraintName cannot be null."); - var pathConstraints = this.pathConstraints; - for (var i = 0, n = pathConstraints.length; i < n; i++) { - var constraint = pathConstraints[i]; - if (constraint.name == constraintName) - return constraint; - } - return null; - }; - SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) { - if (pathConstraintName == null) - throw new Error("pathConstraintName cannot be null."); - var pathConstraints = this.pathConstraints; - for (var i = 0, n = pathConstraints.length; i < n; i++) - if (pathConstraints[i].name == pathConstraintName) - return i; - return -1; - }; - return SkeletonData; - }()); - core.SkeletonData = SkeletonData; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var SkeletonJson = (function () { - function SkeletonJson(attachmentLoader) { - this.scale = 1; - this.linkedMeshes = new Array(); - this.attachmentLoader = attachmentLoader; - } - SkeletonJson.prototype.readSkeletonData = function (json) { - var scale = this.scale; - var skeletonData = new core.SkeletonData(); - var root = typeof (json) === "string" ? JSON.parse(json) : json; - var skeletonMap = root.skeleton; - if (skeletonMap != null) { - skeletonData.hash = skeletonMap.hash; - skeletonData.version = skeletonMap.spine; - skeletonData.x = skeletonMap.x; - skeletonData.y = skeletonMap.y; - skeletonData.width = skeletonMap.width; - skeletonData.height = skeletonMap.height; - skeletonData.fps = skeletonMap.fps; - skeletonData.imagesPath = skeletonMap.images; - } - if (root.bones) { - for (var i = 0; i < root.bones.length; i++) { - var boneMap = root.bones[i]; - var parent_5 = null; - var parentName = this.getValue(boneMap, "parent", null); - if (parentName != null) { - parent_5 = skeletonData.findBone(parentName); - if (parent_5 == null) - throw new Error("Parent bone not found: " + parentName); - } - var data = new core.BoneData(skeletonData.bones.length, boneMap.name, parent_5); - data.length = this.getValue(boneMap, "length", 0) * scale; - data.x = this.getValue(boneMap, "x", 0) * scale; - data.y = this.getValue(boneMap, "y", 0) * scale; - data.rotation = this.getValue(boneMap, "rotation", 0); - data.scaleX = this.getValue(boneMap, "scaleX", 1); - data.scaleY = this.getValue(boneMap, "scaleY", 1); - data.shearX = this.getValue(boneMap, "shearX", 0); - data.shearY = this.getValue(boneMap, "shearY", 0); - data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, "transform", "normal")); - data.skinRequired = this.getValue(boneMap, "skin", false); - skeletonData.bones.push(data); - } - } - if (root.slots) { - for (var i = 0; i < root.slots.length; i++) { - var slotMap = root.slots[i]; - var slotName = slotMap.name; - var boneName = slotMap.bone; - var boneData = skeletonData.findBone(boneName); - if (boneData == null) - throw new Error("Slot bone not found: " + boneName); - var data = new core.SlotData(skeletonData.slots.length, slotName, boneData); - var color = this.getValue(slotMap, "color", null); - if (color != null) - data.color.setFromString(color); - var dark = this.getValue(slotMap, "dark", null); - if (dark != null) { - data.darkColor = new core.Color(1, 1, 1, 1); - data.darkColor.setFromString(dark); - } - data.attachmentName = this.getValue(slotMap, "attachment", null); - data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal")); - skeletonData.slots.push(data); - } - } - if (root.ik) { - for (var i = 0; i < root.ik.length; i++) { - var constraintMap = root.ik[i]; - var data = new core.IkConstraintData(constraintMap.name); - data.order = this.getValue(constraintMap, "order", 0); - data.skinRequired = this.getValue(constraintMap, "skin", false); - for (var j = 0; j < constraintMap.bones.length; j++) { - var boneName = constraintMap.bones[j]; - var bone = skeletonData.findBone(boneName); - if (bone == null) - throw new Error("IK bone not found: " + boneName); - data.bones.push(bone); - } - var targetName = constraintMap.target; - data.target = skeletonData.findBone(targetName); - if (data.target == null) - throw new Error("IK target bone not found: " + targetName); - data.mix = this.getValue(constraintMap, "mix", 1); - data.softness = this.getValue(constraintMap, "softness", 0) * scale; - data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1; - data.compress = this.getValue(constraintMap, "compress", false); - data.stretch = this.getValue(constraintMap, "stretch", false); - data.uniform = this.getValue(constraintMap, "uniform", false); - skeletonData.ikConstraints.push(data); - } - } - if (root.transform) { - for (var i = 0; i < root.transform.length; i++) { - var constraintMap = root.transform[i]; - var data = new core.TransformConstraintData(constraintMap.name); - data.order = this.getValue(constraintMap, "order", 0); - data.skinRequired = this.getValue(constraintMap, "skin", false); - for (var j = 0; j < constraintMap.bones.length; j++) { - var boneName = constraintMap.bones[j]; - var bone = skeletonData.findBone(boneName); - if (bone == null) - throw new Error("Transform constraint bone not found: " + boneName); - data.bones.push(bone); - } - var targetName = constraintMap.target; - data.target = skeletonData.findBone(targetName); - if (data.target == null) - throw new Error("Transform constraint target bone not found: " + targetName); - data.local = this.getValue(constraintMap, "local", false); - data.relative = this.getValue(constraintMap, "relative", false); - data.offsetRotation = this.getValue(constraintMap, "rotation", 0); - data.offsetX = this.getValue(constraintMap, "x", 0) * scale; - data.offsetY = this.getValue(constraintMap, "y", 0) * scale; - data.offsetScaleX = this.getValue(constraintMap, "scaleX", 0); - data.offsetScaleY = this.getValue(constraintMap, "scaleY", 0); - data.offsetShearY = this.getValue(constraintMap, "shearY", 0); - data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); - data.translateMix = this.getValue(constraintMap, "translateMix", 1); - data.scaleMix = this.getValue(constraintMap, "scaleMix", 1); - data.shearMix = this.getValue(constraintMap, "shearMix", 1); - skeletonData.transformConstraints.push(data); - } - } - if (root.path) { - for (var i = 0; i < root.path.length; i++) { - var constraintMap = root.path[i]; - var data = new core.PathConstraintData(constraintMap.name); - data.order = this.getValue(constraintMap, "order", 0); - data.skinRequired = this.getValue(constraintMap, "skin", false); - for (var j = 0; j < constraintMap.bones.length; j++) { - var boneName = constraintMap.bones[j]; - var bone = skeletonData.findBone(boneName); - if (bone == null) - throw new Error("Transform constraint bone not found: " + boneName); - data.bones.push(bone); - } - var targetName = constraintMap.target; - data.target = skeletonData.findSlot(targetName); - if (data.target == null) - throw new Error("Path target slot not found: " + targetName); - data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, "positionMode", "percent")); - data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, "spacingMode", "length")); - data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, "rotateMode", "tangent")); - data.offsetRotation = this.getValue(constraintMap, "rotation", 0); - data.position = this.getValue(constraintMap, "position", 0); - if (data.positionMode == core.PositionMode.Fixed) - data.position *= scale; - data.spacing = this.getValue(constraintMap, "spacing", 0); - if (data.spacingMode == core.SpacingMode.Length || data.spacingMode == core.SpacingMode.Fixed) - data.spacing *= scale; - data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); - data.translateMix = this.getValue(constraintMap, "translateMix", 1); - skeletonData.pathConstraints.push(data); - } - } - if (root.skins) { - for (var i = 0; i < root.skins.length; i++) { - var skinMap = root.skins[i]; - var skin = new core.Skin(skinMap.name); - if (skinMap.bones) { - for (var ii = 0; ii < skinMap.bones.length; ii++) { - var bone = skeletonData.findBone(skinMap.bones[ii]); - if (bone == null) - throw new Error("Skin bone not found: " + skinMap.bones[i]); - skin.bones.push(bone); - } - } - if (skinMap.ik) { - for (var ii = 0; ii < skinMap.ik.length; ii++) { - var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]); - if (constraint == null) - throw new Error("Skin IK constraint not found: " + skinMap.ik[i]); - skin.constraints.push(constraint); - } - } - if (skinMap.transform) { - for (var ii = 0; ii < skinMap.transform.length; ii++) { - var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]); - if (constraint == null) - throw new Error("Skin transform constraint not found: " + skinMap.transform[i]); - skin.constraints.push(constraint); - } - } - if (skinMap.path) { - for (var ii = 0; ii < skinMap.path.length; ii++) { - var constraint = skeletonData.findPathConstraint(skinMap.path[ii]); - if (constraint == null) - throw new Error("Skin path constraint not found: " + skinMap.path[i]); - skin.constraints.push(constraint); - } - } - for (var slotName in skinMap.attachments) { - var slot = skeletonData.findSlot(slotName); - if (slot == null) - throw new Error("Slot not found: " + slotName); - var slotMap = skinMap.attachments[slotName]; - for (var entryName in slotMap) { - var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData); - if (attachment != null) - skin.setAttachment(slot.index, entryName, attachment); - } - } - skeletonData.skins.push(skin); - if (skin.name == "default") - skeletonData.defaultSkin = skin; - } - } - for (var i = 0, n = this.linkedMeshes.length; i < n; i++) { - var linkedMesh = this.linkedMeshes[i]; - var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin); - if (skin == null) - throw new Error("Skin not found: " + linkedMesh.skin); - var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); - if (parent_6 == null) - throw new Error("Parent mesh not found: " + linkedMesh.parent); - linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh; - linkedMesh.mesh.setParentMesh(parent_6); - } - this.linkedMeshes.length = 0; - if (root.events) { - for (var eventName in root.events) { - var eventMap = root.events[eventName]; - var data = new core.EventData(eventName); - data.intValue = this.getValue(eventMap, "int", 0); - data.floatValue = this.getValue(eventMap, "float", 0); - data.stringValue = this.getValue(eventMap, "string", ""); - data.audioPath = this.getValue(eventMap, "audio", null); - if (data.audioPath != null) { - data.volume = this.getValue(eventMap, "volume", 1); - data.balance = this.getValue(eventMap, "balance", 0); - } - skeletonData.events.push(data); - } - } - if (root.animations) { - for (var animationName in root.animations) { - var animationMap = root.animations[animationName]; - this.readAnimation(animationMap, animationName, skeletonData); - } - } - return skeletonData; - }; - SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) { - var scale = this.scale; - name = this.getValue(map, "name", name); - var type = this.getValue(map, "type", "region"); - switch (type) { - case "region": { - var path = this.getValue(map, "path", name); - var region = this.attachmentLoader.newRegionAttachment(skin, name, path); - if (region == null) - return null; - region.path = path; - region.x = this.getValue(map, "x", 0) * scale; - region.y = this.getValue(map, "y", 0) * scale; - region.scaleX = this.getValue(map, "scaleX", 1); - region.scaleY = this.getValue(map, "scaleY", 1); - region.rotation = this.getValue(map, "rotation", 0); - region.width = map.width * scale; - region.height = map.height * scale; - var color = this.getValue(map, "color", null); - if (color != null) - region.color.setFromString(color); - return region; - } - case "boundingbox": { - var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); - if (box == null) - return null; - this.readVertices(map, box, map.vertexCount << 1); - var color = this.getValue(map, "color", null); - if (color != null) - box.color.setFromString(color); - return box; - } - case "mesh": - case "linkedmesh": { - var path = this.getValue(map, "path", name); - var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path); - if (mesh == null) - return null; - mesh.path = path; - var color = this.getValue(map, "color", null); - if (color != null) - mesh.color.setFromString(color); - mesh.width = this.getValue(map, "width", 0) * scale; - mesh.height = this.getValue(map, "height", 0) * scale; - var parent_7 = this.getValue(map, "parent", null); - if (parent_7 != null) { - this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent_7, this.getValue(map, "deform", true))); - return mesh; - } - var uvs = map.uvs; - this.readVertices(map, mesh, uvs.length); - mesh.triangles = map.triangles; - mesh.regionUVs = new Float32Array(uvs); - mesh.edges = this.getValue(map, "edges", null); - mesh.hullLength = this.getValue(map, "hull", 0) * 2; - return mesh; - } - case "path": { - var path = this.attachmentLoader.newPathAttachment(skin, name); - if (path == null) - return null; - path.closed = this.getValue(map, "closed", false); - path.constantSpeed = this.getValue(map, "constantSpeed", true); - var vertexCount = map.vertexCount; - this.readVertices(map, path, vertexCount << 1); - var lengths = core.Utils.newArray(vertexCount / 3, 0); - for (var i = 0; i < map.lengths.length; i++) - lengths[i] = map.lengths[i] * scale; - path.lengths = lengths; - var color = this.getValue(map, "color", null); - if (color != null) - path.color.setFromString(color); - return path; - } - case "point": { - var point = this.attachmentLoader.newPointAttachment(skin, name); - if (point == null) - return null; - point.x = this.getValue(map, "x", 0) * scale; - point.y = this.getValue(map, "y", 0) * scale; - point.rotation = this.getValue(map, "rotation", 0); - var color = this.getValue(map, "color", null); - if (color != null) - point.color.setFromString(color); - return point; - } - case "clipping": { - var clip = this.attachmentLoader.newClippingAttachment(skin, name); - if (clip == null) - return null; - var end = this.getValue(map, "end", null); - if (end != null) { - var slot = skeletonData.findSlot(end); - if (slot == null) - throw new Error("Clipping end slot not found: " + end); - clip.endSlot = slot; - } - var vertexCount = map.vertexCount; - this.readVertices(map, clip, vertexCount << 1); - var color = this.getValue(map, "color", null); - if (color != null) - clip.color.setFromString(color); - return clip; - } - } - return null; - }; - SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) { - var scale = this.scale; - attachment.worldVerticesLength = verticesLength; - var vertices = map.vertices; - if (verticesLength == vertices.length) { - var scaledVertices = core.Utils.toFloatArray(vertices); - if (scale != 1) { - for (var i = 0, n = vertices.length; i < n; i++) - scaledVertices[i] *= scale; - } - attachment.vertices = scaledVertices; - return; - } - var weights = new Array(); - var bones = new Array(); - for (var i = 0, n = vertices.length; i < n;) { - var boneCount = vertices[i++]; - bones.push(boneCount); - for (var nn = i + boneCount * 4; i < nn; i += 4) { - bones.push(vertices[i]); - weights.push(vertices[i + 1] * scale); - weights.push(vertices[i + 2] * scale); - weights.push(vertices[i + 3]); - } - } - attachment.bones = bones; - attachment.vertices = core.Utils.toFloatArray(weights); - }; - SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) { - var scale = this.scale; - var timelines = new Array(); - var duration = 0; - if (map.slots) { - for (var slotName in map.slots) { - var slotMap = map.slots[slotName]; - var slotIndex = skeletonData.findSlotIndex(slotName); - if (slotIndex == -1) - throw new Error("Slot not found: " + slotName); - for (var timelineName in slotMap) { - var timelineMap = slotMap[timelineName]; - if (timelineName == "attachment") { - var timeline = new core.AttachmentTimeline(timelineMap.length); - timeline.slotIndex = slotIndex; - var frameIndex = 0; - for (var i = 0; i < timelineMap.length; i++) { - var valueMap = timelineMap[i]; - timeline.setFrame(frameIndex++, this.getValue(valueMap, "time", 0), valueMap.name); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); - } - else if (timelineName == "color") { - var timeline = new core.ColorTimeline(timelineMap.length); - timeline.slotIndex = slotIndex; - var frameIndex = 0; - for (var i = 0; i < timelineMap.length; i++) { - var valueMap = timelineMap[i]; - var color = new core.Color(); - color.setFromString(valueMap.color || "ffffffff"); - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), color.r, color.g, color.b, color.a); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.ColorTimeline.ENTRIES]); - } - else if (timelineName == "twoColor") { - var timeline = new core.TwoColorTimeline(timelineMap.length); - timeline.slotIndex = slotIndex; - var frameIndex = 0; - for (var i = 0; i < timelineMap.length; i++) { - var valueMap = timelineMap[i]; - var light = new core.Color(); - var dark = new core.Color(); - light.setFromString(valueMap.light); - dark.setFromString(valueMap.dark); - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.TwoColorTimeline.ENTRIES]); - } - else - throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); - } - } - } - if (map.bones) { - for (var boneName in map.bones) { - var boneMap = map.bones[boneName]; - var boneIndex = skeletonData.findBoneIndex(boneName); - if (boneIndex == -1) - throw new Error("Bone not found: " + boneName); - for (var timelineName in boneMap) { - var timelineMap = boneMap[timelineName]; - if (timelineName === "rotate") { - var timeline = new core.RotateTimeline(timelineMap.length); - timeline.boneIndex = boneIndex; - var frameIndex = 0; - for (var i = 0; i < timelineMap.length; i++) { - var valueMap = timelineMap[i]; - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "angle", 0)); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.RotateTimeline.ENTRIES]); - } - else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") { - var timeline = null; - var timelineScale = 1, defaultValue = 0; - if (timelineName === "scale") { - timeline = new core.ScaleTimeline(timelineMap.length); - defaultValue = 1; - } - else if (timelineName === "shear") - timeline = new core.ShearTimeline(timelineMap.length); - else { - timeline = new core.TranslateTimeline(timelineMap.length); - timelineScale = scale; - } - timeline.boneIndex = boneIndex; - var frameIndex = 0; - for (var i = 0; i < timelineMap.length; i++) { - var valueMap = timelineMap[i]; - var x = this.getValue(valueMap, "x", defaultValue), y = this.getValue(valueMap, "y", defaultValue); - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), x * timelineScale, y * timelineScale); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.TranslateTimeline.ENTRIES]); - } - else - throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); - } - } - } - if (map.ik) { - for (var constraintName in map.ik) { - var constraintMap = map.ik[constraintName]; - var constraint = skeletonData.findIkConstraint(constraintName); - var timeline = new core.IkConstraintTimeline(constraintMap.length); - timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint); - var frameIndex = 0; - for (var i = 0; i < constraintMap.length; i++) { - var valueMap = constraintMap[i]; - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale, this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false)); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.IkConstraintTimeline.ENTRIES]); - } - } - if (map.transform) { - for (var constraintName in map.transform) { - var constraintMap = map.transform[constraintName]; - var constraint = skeletonData.findTransformConstraint(constraintName); - var timeline = new core.TransformConstraintTimeline(constraintMap.length); - timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint); - var frameIndex = 0; - for (var i = 0; i < constraintMap.length; i++) { - var valueMap = constraintMap[i]; - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1), this.getValue(valueMap, "scaleMix", 1), this.getValue(valueMap, "shearMix", 1)); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.TransformConstraintTimeline.ENTRIES]); - } - } - if (map.path) { - for (var constraintName in map.path) { - var constraintMap = map.path[constraintName]; - var index = skeletonData.findPathConstraintIndex(constraintName); - if (index == -1) - throw new Error("Path constraint not found: " + constraintName); - var data = skeletonData.pathConstraints[index]; - for (var timelineName in constraintMap) { - var timelineMap = constraintMap[timelineName]; - if (timelineName === "position" || timelineName === "spacing") { - var timeline = null; - var timelineScale = 1; - if (timelineName === "spacing") { - timeline = new core.PathConstraintSpacingTimeline(timelineMap.length); - if (data.spacingMode == core.SpacingMode.Length || data.spacingMode == core.SpacingMode.Fixed) - timelineScale = scale; - } - else { - timeline = new core.PathConstraintPositionTimeline(timelineMap.length); - if (data.positionMode == core.PositionMode.Fixed) - timelineScale = scale; - } - timeline.pathConstraintIndex = index; - var frameIndex = 0; - for (var i = 0; i < timelineMap.length; i++) { - var valueMap = timelineMap[i]; - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, timelineName, 0) * timelineScale); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.PathConstraintPositionTimeline.ENTRIES]); - } - else if (timelineName === "mix") { - var timeline = new core.PathConstraintMixTimeline(timelineMap.length); - timeline.pathConstraintIndex = index; - var frameIndex = 0; - for (var i = 0; i < timelineMap.length; i++) { - var valueMap = timelineMap[i]; - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1)); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.PathConstraintMixTimeline.ENTRIES]); - } - } - } - } - if (map.deform) { - for (var deformName in map.deform) { - var deformMap = map.deform[deformName]; - var skin = skeletonData.findSkin(deformName); - if (skin == null) - throw new Error("Skin not found: " + deformName); - for (var slotName in deformMap) { - var slotMap = deformMap[slotName]; - var slotIndex = skeletonData.findSlotIndex(slotName); - if (slotIndex == -1) - throw new Error("Slot not found: " + slotMap.name); - for (var timelineName in slotMap) { - var timelineMap = slotMap[timelineName]; - var attachment = skin.getAttachment(slotIndex, timelineName); - if (attachment == null) - throw new Error("Deform attachment not found: " + timelineMap.name); - var weighted = attachment.bones != null; - var vertices = attachment.vertices; - var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length; - var timeline = new core.DeformTimeline(timelineMap.length); - timeline.slotIndex = slotIndex; - timeline.attachment = attachment; - var frameIndex = 0; - for (var j = 0; j < timelineMap.length; j++) { - var valueMap = timelineMap[j]; - var deform = void 0; - var verticesValue = this.getValue(valueMap, "vertices", null); - if (verticesValue == null) - deform = weighted ? core.Utils.newFloatArray(deformLength) : vertices; - else { - deform = core.Utils.newFloatArray(deformLength); - var start = this.getValue(valueMap, "offset", 0); - core.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length); - if (scale != 1) { - for (var i = start, n = i + verticesValue.length; i < n; i++) - deform[i] *= scale; - } - if (!weighted) { - for (var i = 0; i < deformLength; i++) - deform[i] += vertices[i]; - } - } - timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), deform); - this.readCurve(valueMap, timeline, frameIndex); - frameIndex++; - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); - } - } - } - } - var drawOrderNode = map.drawOrder; - if (drawOrderNode == null) - drawOrderNode = map.draworder; - if (drawOrderNode != null) { - var timeline = new core.DrawOrderTimeline(drawOrderNode.length); - var slotCount = skeletonData.slots.length; - var frameIndex = 0; - for (var j = 0; j < drawOrderNode.length; j++) { - var drawOrderMap = drawOrderNode[j]; - var drawOrder = null; - var offsets = this.getValue(drawOrderMap, "offsets", null); - if (offsets != null) { - drawOrder = core.Utils.newArray(slotCount, -1); - var unchanged = core.Utils.newArray(slotCount - offsets.length, 0); - var originalIndex = 0, unchangedIndex = 0; - for (var i = 0; i < offsets.length; i++) { - var offsetMap = offsets[i]; - var slotIndex = skeletonData.findSlotIndex(offsetMap.slot); - if (slotIndex == -1) - throw new Error("Slot not found: " + offsetMap.slot); - while (originalIndex != slotIndex) - unchanged[unchangedIndex++] = originalIndex++; - drawOrder[originalIndex + offsetMap.offset] = originalIndex++; - } - while (originalIndex < slotCount) - unchanged[unchangedIndex++] = originalIndex++; - for (var i = slotCount - 1; i >= 0; i--) - if (drawOrder[i] == -1) - drawOrder[i] = unchanged[--unchangedIndex]; - } - timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, "time", 0), drawOrder); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); - } - if (map.events) { - var timeline = new core.EventTimeline(map.events.length); - var frameIndex = 0; - for (var i = 0; i < map.events.length; i++) { - var eventMap = map.events[i]; - var eventData = skeletonData.findEvent(eventMap.name); - if (eventData == null) - throw new Error("Event not found: " + eventMap.name); - var event_6 = new core.Event(core.Utils.toSinglePrecision(this.getValue(eventMap, "time", 0)), eventData); - event_6.intValue = this.getValue(eventMap, "int", eventData.intValue); - event_6.floatValue = this.getValue(eventMap, "float", eventData.floatValue); - event_6.stringValue = this.getValue(eventMap, "string", eventData.stringValue); - if (event_6.data.audioPath != null) { - event_6.volume = this.getValue(eventMap, "volume", 1); - event_6.balance = this.getValue(eventMap, "balance", 0); - } - timeline.setFrame(frameIndex++, event_6); - } - timelines.push(timeline); - duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); - } - if (isNaN(duration)) { - throw new Error("Error while parsing animation, duration is NaN"); - } - skeletonData.animations.push(new core.Animation(name, timelines, duration)); - }; - SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { - if (!map.curve) - return; - if (map.curve === "stepped") - timeline.setStepped(frameIndex); - else { - var curve = map.curve; - timeline.setCurve(frameIndex, curve, this.getValue(map, "c2", 0), this.getValue(map, "c3", 1), this.getValue(map, "c4", 1)); - } - }; - SkeletonJson.prototype.getValue = function (map, prop, defaultValue) { - return map[prop] !== undefined ? map[prop] : defaultValue; - }; - SkeletonJson.blendModeFromString = function (str) { - str = str.toLowerCase(); - if (str == "normal") - return core.BlendMode.Normal; - if (str == "additive") - return core.BlendMode.Additive; - if (str == "multiply") - return core.BlendMode.Multiply; - if (str == "screen") - return core.BlendMode.Screen; - throw new Error("Unknown blend mode: " + str); - }; - SkeletonJson.positionModeFromString = function (str) { - str = str.toLowerCase(); - if (str == "fixed") - return core.PositionMode.Fixed; - if (str == "percent") - return core.PositionMode.Percent; - throw new Error("Unknown position mode: " + str); - }; - SkeletonJson.spacingModeFromString = function (str) { - str = str.toLowerCase(); - if (str == "length") - return core.SpacingMode.Length; - if (str == "fixed") - return core.SpacingMode.Fixed; - if (str == "percent") - return core.SpacingMode.Percent; - throw new Error("Unknown position mode: " + str); - }; - SkeletonJson.rotateModeFromString = function (str) { - str = str.toLowerCase(); - if (str == "tangent") - return core.RotateMode.Tangent; - if (str == "chain") - return core.RotateMode.Chain; - if (str == "chainscale") - return core.RotateMode.ChainScale; - throw new Error("Unknown rotate mode: " + str); - }; - SkeletonJson.transformModeFromString = function (str) { - str = str.toLowerCase(); - if (str == "normal") - return core.TransformMode.Normal; - if (str == "onlytranslation") - return core.TransformMode.OnlyTranslation; - if (str == "norotationorreflection") - return core.TransformMode.NoRotationOrReflection; - if (str == "noscale") - return core.TransformMode.NoScale; - if (str == "noscaleorreflection") - return core.TransformMode.NoScaleOrReflection; - throw new Error("Unknown transform mode: " + str); - }; - return SkeletonJson; - }()); - core.SkeletonJson = SkeletonJson; - var LinkedMesh = (function () { - function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) { - this.mesh = mesh; - this.skin = skin; - this.slotIndex = slotIndex; - this.parent = parent; - this.inheritDeform = inheritDeform; - } - return LinkedMesh; - }()); - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var SkinEntry = (function () { - function SkinEntry(slotIndex, name, attachment) { - this.slotIndex = slotIndex; - this.name = name; - this.attachment = attachment; - } - return SkinEntry; - }()); - core.SkinEntry = SkinEntry; - var Skin = (function () { - function Skin(name) { - this.attachments = new Array(); - this.bones = Array(); - this.constraints = new Array(); - if (name == null) - throw new Error("name cannot be null."); - this.name = name; - } - Skin.prototype.setAttachment = function (slotIndex, name, attachment) { - if (attachment == null) - throw new Error("attachment cannot be null."); - var attachments = this.attachments; - if (slotIndex >= attachments.length) - attachments.length = slotIndex + 1; - if (!attachments[slotIndex]) - attachments[slotIndex] = {}; - attachments[slotIndex][name] = attachment; - }; - Skin.prototype.addSkin = function (skin) { - for (var i = 0; i < skin.bones.length; i++) { - var bone = skin.bones[i]; - var contained = false; - for (var j = 0; j < this.bones.length; j++) { - if (this.bones[j] == bone) { - contained = true; - break; - } - } - if (!contained) - this.bones.push(bone); - } - for (var i = 0; i < skin.constraints.length; i++) { - var constraint = skin.constraints[i]; - var contained = false; - for (var j = 0; j < this.constraints.length; j++) { - if (this.constraints[j] == constraint) { - contained = true; - break; - } - } - if (!contained) - this.constraints.push(constraint); - } - var attachments = skin.getAttachments(); - for (var i = 0; i < attachments.length; i++) { - var attachment = attachments[i]; - this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment); - } - }; - Skin.prototype.copySkin = function (skin) { - for (var i = 0; i < skin.bones.length; i++) { - var bone = skin.bones[i]; - var contained = false; - for (var j = 0; j < this.bones.length; j++) { - if (this.bones[j] == bone) { - contained = true; - break; - } - } - if (!contained) - this.bones.push(bone); - } - for (var i = 0; i < skin.constraints.length; i++) { - var constraint = skin.constraints[i]; - var contained = false; - for (var j = 0; j < this.constraints.length; j++) { - if (this.constraints[j] == constraint) { - contained = true; - break; - } - } - if (!contained) - this.constraints.push(constraint); - } - var attachments = skin.getAttachments(); - for (var i = 0; i < attachments.length; i++) { - var attachment = attachments[i]; - if (attachment.attachment == null) - continue; - if (attachment.attachment instanceof core.MeshAttachment) { - attachment.attachment = attachment.attachment.newLinkedMesh(); - this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment); - } - else { - attachment.attachment = attachment.attachment.copy(); - this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment); - } - } - }; - Skin.prototype.getAttachment = function (slotIndex, name) { - var dictionary = this.attachments[slotIndex]; - return dictionary ? dictionary[name] : null; - }; - Skin.prototype.removeAttachment = function (slotIndex, name) { - var dictionary = this.attachments[slotIndex]; - if (dictionary) - dictionary[name] = null; - }; - Skin.prototype.getAttachments = function () { - var entries = new Array(); - for (var i = 0; i < this.attachments.length; i++) { - var slotAttachments = this.attachments[i]; - if (slotAttachments) { - for (var name_4 in slotAttachments) { - var attachment = slotAttachments[name_4]; - if (attachment) - entries.push(new SkinEntry(i, name_4, attachment)); - } - } - } - return entries; - }; - Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) { - var slotAttachments = this.attachments[slotIndex]; - if (slotAttachments) { - for (var name_5 in slotAttachments) { - var attachment = slotAttachments[name_5]; - if (attachment) - attachments.push(new SkinEntry(slotIndex, name_5, attachment)); - } - } - }; - Skin.prototype.clear = function () { - this.attachments.length = 0; - this.bones.length = 0; - this.constraints.length = 0; - }; - Skin.prototype.attachAll = function (skeleton, oldSkin) { - var slotIndex = 0; - for (var i = 0; i < skeleton.slots.length; i++) { - var slot = skeleton.slots[i]; - var slotAttachment = slot.getAttachment(); - if (slotAttachment && slotIndex < oldSkin.attachments.length) { - var dictionary = oldSkin.attachments[slotIndex]; - for (var key in dictionary) { - var skinAttachment = dictionary[key]; - if (slotAttachment == skinAttachment) { - var attachment = this.getAttachment(slotIndex, key); - if (attachment != null) - slot.setAttachment(attachment); - break; - } - } - } - slotIndex++; - } - }; - return Skin; - }()); - core.Skin = Skin; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var Slot = (function () { - function Slot(data, bone) { - this.deform = new Array(); - if (data == null) - throw new Error("data cannot be null."); - if (bone == null) - throw new Error("bone cannot be null."); - this.data = data; - this.bone = bone; - this.color = new core.Color(); - this.darkColor = data.darkColor == null ? null : new core.Color(); - this.setToSetupPose(); - this.blendMode = this.data.blendMode; - } - Slot.prototype.getAttachment = function () { - return this.attachment; - }; - Slot.prototype.setAttachment = function (attachment) { - if (this.attachment == attachment) - return; - this.attachment = attachment; - this.attachmentTime = this.bone.skeleton.time; - this.deform.length = 0; - }; - Slot.prototype.setAttachmentTime = function (time) { - this.attachmentTime = this.bone.skeleton.time - time; - }; - Slot.prototype.getAttachmentTime = function () { - return this.bone.skeleton.time - this.attachmentTime; - }; - Slot.prototype.setToSetupPose = function () { - this.color.setFromColor(this.data.color); - if (this.darkColor != null) - this.darkColor.setFromColor(this.data.darkColor); - if (this.data.attachmentName == null) - this.attachment = null; - else { - this.attachment = null; - this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName)); - } - }; - return Slot; - }()); - core.Slot = Slot; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var SlotData = (function () { - function SlotData(index, name, boneData) { - this.color = new core.Color(1, 1, 1, 1); - if (index < 0) - throw new Error("index must be >= 0."); - if (name == null) - throw new Error("name cannot be null."); - if (boneData == null) - throw new Error("boneData cannot be null."); - this.index = index; - this.name = name; - this.boneData = boneData; - } - return SlotData; - }()); - core.SlotData = SlotData; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var Texture = (function () { - function Texture(image) { - this._image = image; - } - Texture.prototype.getImage = function () { - return this._image; - }; - Texture.filterFromString = function (text) { - switch (text.toLowerCase()) { - case "nearest": return TextureFilter.Nearest; - case "linear": return TextureFilter.Linear; - case "mipmap": return TextureFilter.MipMap; - case "mipmapnearestnearest": return TextureFilter.MipMapNearestNearest; - case "mipmaplinearnearest": return TextureFilter.MipMapLinearNearest; - case "mipmapnearestlinear": return TextureFilter.MipMapNearestLinear; - case "mipmaplinearlinear": return TextureFilter.MipMapLinearLinear; - default: throw new Error("Unknown texture filter " + text); - } - }; - Texture.wrapFromString = function (text) { - switch (text.toLowerCase()) { - case "mirroredtepeat": return TextureWrap.MirroredRepeat; - case "clamptoedge": return TextureWrap.ClampToEdge; - case "repeat": return TextureWrap.Repeat; - default: throw new Error("Unknown texture wrap " + text); - } - }; - return Texture; - }()); - core.Texture = Texture; - var TextureFilter; - (function (TextureFilter) { - TextureFilter[TextureFilter["Nearest"] = 9728] = "Nearest"; - TextureFilter[TextureFilter["Linear"] = 9729] = "Linear"; - TextureFilter[TextureFilter["MipMap"] = 9987] = "MipMap"; - TextureFilter[TextureFilter["MipMapNearestNearest"] = 9984] = "MipMapNearestNearest"; - TextureFilter[TextureFilter["MipMapLinearNearest"] = 9985] = "MipMapLinearNearest"; - TextureFilter[TextureFilter["MipMapNearestLinear"] = 9986] = "MipMapNearestLinear"; - TextureFilter[TextureFilter["MipMapLinearLinear"] = 9987] = "MipMapLinearLinear"; - })(TextureFilter = core.TextureFilter || (core.TextureFilter = {})); - var TextureWrap; - (function (TextureWrap) { - TextureWrap[TextureWrap["MirroredRepeat"] = 33648] = "MirroredRepeat"; - TextureWrap[TextureWrap["ClampToEdge"] = 33071] = "ClampToEdge"; - TextureWrap[TextureWrap["Repeat"] = 10497] = "Repeat"; - })(TextureWrap = core.TextureWrap || (core.TextureWrap = {})); - var TextureRegion = (function () { - function TextureRegion() { - this.size = null; - } - Object.defineProperty(TextureRegion.prototype, "width", { - get: function () { - var tex = this.texture; - if (PIXI.VERSION[0] == '3') { - return tex.crop.width; - } - if (tex.trim) { - return tex.trim.width; - } - return tex.orig.width; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "height", { - get: function () { - var tex = this.texture; - if (PIXI.VERSION[0] == '3') { - return tex.crop.height; - } - if (tex.trim) { - return tex.trim.height; - } - return tex.orig.height; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "u", { - get: function () { - return this.texture._uvs.x0; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "v", { - get: function () { - return this.texture._uvs.y0; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "u2", { - get: function () { - return this.texture._uvs.x2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "v2", { - get: function () { - return this.texture._uvs.y2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "offsetX", { - get: function () { - var tex = this.texture; - return tex.trim ? tex.trim.x : 0; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "offsetY", { - get: function () { - console.warn("Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on."); - return this.spineOffsetY; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "pixiOffsetY", { - get: function () { - var tex = this.texture; - return tex.trim ? tex.trim.y : 0; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "spineOffsetY", { - get: function () { - var tex = this.texture; - return this.originalHeight - this.height - (tex.trim ? tex.trim.y : 0); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "originalWidth", { - get: function () { - var tex = this.texture; - if (PIXI.VERSION[0] == '3') { - if (tex.trim) { - return tex.trim.width; - } - return tex.crop.width; - } - return tex.orig.width; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "originalHeight", { - get: function () { - var tex = this.texture; - if (PIXI.VERSION[0] == '3') { - if (tex.trim) { - return tex.trim.height; - } - return tex.crop.height; - } - return tex.orig.height; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "x", { - get: function () { - return this.texture.frame.x; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "y", { - get: function () { - return this.texture.frame.y; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TextureRegion.prototype, "rotate", { - get: function () { - return this.texture.rotate !== 0; - }, - enumerable: true, - configurable: true - }); - return TextureRegion; - }()); - core.TextureRegion = TextureRegion; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var TextureAtlas = (function () { - function TextureAtlas(atlasText, textureLoader, callback) { - this.pages = new Array(); - this.regions = new Array(); - if (atlasText) { - this.addSpineAtlas(atlasText, textureLoader, callback); - } - } - TextureAtlas.prototype.addTexture = function (name, texture) { - var pages = this.pages; - var page = null; - for (var i = 0; i < pages.length; i++) { - if (pages[i].baseTexture === texture.baseTexture) { - page = pages[i]; - break; - } - } - if (page === null) { - page = new TextureAtlasPage(); - page.name = 'texturePage'; - var baseTexture = texture.baseTexture; - page.width = baseTexture.realWidth; - page.height = baseTexture.realHeight; - page.baseTexture = baseTexture; - page.minFilter = page.magFilter = core.TextureFilter.Nearest; - page.uWrap = core.TextureWrap.ClampToEdge; - page.vWrap = core.TextureWrap.ClampToEdge; - pages.push(page); - } - var region = new TextureAtlasRegion(); - region.name = name; - region.page = page; - region.texture = texture; - region.index = -1; - this.regions.push(region); - return region; - }; - TextureAtlas.prototype.addTextureHash = function (textures, stripExtension) { - for (var key in textures) { - if (textures.hasOwnProperty(key)) { - this.addTexture(stripExtension && key.indexOf('.') !== -1 ? key.substr(0, key.lastIndexOf('.')) : key, textures[key]); - } - } - }; - TextureAtlas.prototype.addSpineAtlas = function (atlasText, textureLoader, callback) { - return this.load(atlasText, textureLoader, callback); - }; - TextureAtlas.prototype.load = function (atlasText, textureLoader, callback) { - var _this = this; - if (textureLoader == null) - throw new Error("textureLoader cannot be null."); - var reader = new TextureAtlasReader(atlasText); - var tuple = new Array(4); - var page = null; - var iterateParser = function () { - while (true) { - var line = reader.readLine(); - if (line == null) { - return callback && callback(_this); - } - line = line.trim(); - if (line.length == 0) - page = null; - else if (!page) { - page = new TextureAtlasPage(); - page.name = line; - if (reader.readTuple(tuple) == 2) { - page.width = parseInt(tuple[0]); - page.height = parseInt(tuple[1]); - reader.readTuple(tuple); - } - reader.readTuple(tuple); - page.minFilter = core.Texture.filterFromString(tuple[0]); - page.magFilter = core.Texture.filterFromString(tuple[1]); - var direction = reader.readValue(); - page.uWrap = core.TextureWrap.ClampToEdge; - page.vWrap = core.TextureWrap.ClampToEdge; - if (direction == "x") - page.uWrap = core.TextureWrap.Repeat; - else if (direction == "y") - page.vWrap = core.TextureWrap.Repeat; - else if (direction == "xy") - page.uWrap = page.vWrap = core.TextureWrap.Repeat; - textureLoader(line, function (texture) { - if (texture === null) { - _this.pages.splice(_this.pages.indexOf(page), 1); - return callback && callback(null); - } - page.baseTexture = texture; - if (!texture.hasLoaded) { - texture.width = page.width; - texture.height = page.height; - } - _this.pages.push(page); - page.setFilters(); - if (!page.width || !page.height) { - page.width = texture.realWidth; - page.height = texture.realHeight; - if (!page.width || !page.height) { - console.log("ERROR spine atlas page " + page.name + ": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)"); - } - } - iterateParser(); - }); - _this.pages.push(page); - break; - } - else { - var region = new TextureAtlasRegion(); - region.name = line; - region.page = page; - var rotateValue = reader.readValue(); - var rotate = 0; - if (rotateValue.toLocaleLowerCase() == "true") { - rotate = 6; - } - else if (rotateValue.toLocaleLowerCase() == "false") { - rotate = 0; - } - else { - rotate = ((720 - parseFloat(rotateValue)) % 360) / 45; - } - reader.readTuple(tuple); - var x = parseInt(tuple[0]); - var y = parseInt(tuple[1]); - reader.readTuple(tuple); - var width = parseInt(tuple[0]); - var height = parseInt(tuple[1]); - var resolution = page.baseTexture.resolution; - x /= resolution; - y /= resolution; - width /= resolution; - height /= resolution; - var frame = new PIXI.Rectangle(x, y, rotate ? height : width, rotate ? width : height); - if (reader.readTuple(tuple) == 4) { - if (reader.readTuple(tuple) == 4) { - reader.readTuple(tuple); - } - } - var originalWidth = parseInt(tuple[0]) / resolution; - var originalHeight = parseInt(tuple[1]) / resolution; - reader.readTuple(tuple); - var offsetX = parseInt(tuple[0]) / resolution; - var offsetY = parseInt(tuple[1]) / resolution; - var orig = new PIXI.Rectangle(0, 0, originalWidth, originalHeight); - var trim = new PIXI.Rectangle(offsetX, originalHeight - height - offsetY, width, height); - if (PIXI.VERSION[0] != '3') { - region.texture = new PIXI.Texture(region.page.baseTexture, frame, orig, trim, rotate); - } - else { - var frame2 = new PIXI.Rectangle(x, y, width, height); - var crop = frame2.clone(); - trim.width = originalWidth; - trim.height = originalHeight; - region.texture = new PIXI.Texture(region.page.baseTexture, frame2, crop, trim, rotate); - } - region.index = parseInt(reader.readValue()); - region.texture._updateUvs(); - _this.regions.push(region); - } - } - }; - iterateParser(); - }; - TextureAtlas.prototype.findRegion = function (name) { - for (var i = 0; i < this.regions.length; i++) { - if (this.regions[i].name == name) { - return this.regions[i]; - } - } - return null; - }; - TextureAtlas.prototype.dispose = function () { - for (var i = 0; i < this.pages.length; i++) { - this.pages[i].baseTexture.dispose(); - } - }; - return TextureAtlas; - }()); - core.TextureAtlas = TextureAtlas; - var TextureAtlasReader = (function () { - function TextureAtlasReader(text) { - this.index = 0; - this.lines = text.split(/\r\n|\r|\n/); - } - TextureAtlasReader.prototype.readLine = function () { - if (this.index >= this.lines.length) - return null; - return this.lines[this.index++]; - }; - TextureAtlasReader.prototype.readValue = function () { - var line = this.readLine(); - var colon = line.indexOf(":"); - if (colon == -1) - throw new Error("Invalid line: " + line); - return line.substring(colon + 1).trim(); - }; - TextureAtlasReader.prototype.readTuple = function (tuple) { - var line = this.readLine(); - var colon = line.indexOf(":"); - if (colon == -1) - throw new Error("Invalid line: " + line); - var i = 0, lastMatch = colon + 1; - for (; i < 3; i++) { - var comma = line.indexOf(",", lastMatch); - if (comma == -1) - break; - tuple[i] = line.substr(lastMatch, comma - lastMatch).trim(); - lastMatch = comma + 1; - } - tuple[i] = line.substring(lastMatch).trim(); - return i + 1; - }; - return TextureAtlasReader; - }()); - var TextureAtlasPage = (function () { - function TextureAtlasPage() { - } - TextureAtlasPage.prototype.setFilters = function () { - var tex = this.baseTexture; - var filter = this.minFilter; - if (filter == core.TextureFilter.Linear) { - tex.scaleMode = PIXI.SCALE_MODES.LINEAR; - } - else if (this.minFilter == core.TextureFilter.Nearest) { - tex.scaleMode = PIXI.SCALE_MODES.NEAREST; - } - else { - tex.mipmap = true; - if (filter == core.TextureFilter.MipMapNearestNearest) { - tex.scaleMode = PIXI.SCALE_MODES.NEAREST; - } - else { - tex.scaleMode = PIXI.SCALE_MODES.LINEAR; - } - } - }; - return TextureAtlasPage; - }()); - core.TextureAtlasPage = TextureAtlasPage; - var TextureAtlasRegion = (function (_super) { - __extends(TextureAtlasRegion, _super); - function TextureAtlasRegion() { - return _super !== null && _super.apply(this, arguments) || this; - } - return TextureAtlasRegion; - }(core.TextureRegion)); - core.TextureAtlasRegion = TextureAtlasRegion; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var TransformConstraint = (function () { - function TransformConstraint(data, skeleton) { - this.rotateMix = 0; - this.translateMix = 0; - this.scaleMix = 0; - this.shearMix = 0; - this.temp = new core.Vector2(); - this.active = false; - if (data == null) - throw new Error("data cannot be null."); - if (skeleton == null) - throw new Error("skeleton cannot be null."); - this.data = data; - this.rotateMix = data.rotateMix; - this.translateMix = data.translateMix; - this.scaleMix = data.scaleMix; - this.shearMix = data.shearMix; - this.bones = new Array(); - for (var i = 0; i < data.bones.length; i++) - this.bones.push(skeleton.findBone(data.bones[i].name)); - this.target = skeleton.findBone(data.target.name); - } - TransformConstraint.prototype.isActive = function () { - return this.active; - }; - TransformConstraint.prototype.apply = function () { - this.update(); - }; - TransformConstraint.prototype.update = function () { - if (this.data.local) { - if (this.data.relative) - this.applyRelativeLocal(); - else - this.applyAbsoluteLocal(); - } - else { - if (this.data.relative) - this.applyRelativeWorld(); - else - this.applyAbsoluteWorld(); - } - }; - TransformConstraint.prototype.applyAbsoluteWorld = function () { - var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; - var target = this.target; - var targetMat = target.matrix; - var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d; - var degRadReflect = ta * td - tb * tc > 0 ? core.MathUtils.degRad : -core.MathUtils.degRad; - var offsetRotation = this.data.offsetRotation * degRadReflect; - var offsetShearY = this.data.offsetShearY * degRadReflect; - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) { - var bone = bones[i]; - var modified = false; - var mat = bone.matrix; - if (rotateMix != 0) { - var a = mat.a, b = mat.c, c = mat.b, d = mat.d; - var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation; - if (r > core.MathUtils.PI) - r -= core.MathUtils.PI2; - else if (r < -core.MathUtils.PI) - r += core.MathUtils.PI2; - r *= rotateMix; - var cos = Math.cos(r), sin = Math.sin(r); - mat.a = cos * a - sin * c; - mat.c = cos * b - sin * d; - mat.b = sin * a + cos * c; - mat.d = sin * b + cos * d; - modified = true; - } - if (translateMix != 0) { - var temp = this.temp; - target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); - mat.tx += (temp.x - mat.tx) * translateMix; - mat.ty += (temp.y - mat.ty) * translateMix; - modified = true; - } - if (scaleMix > 0) { - var s = Math.sqrt(mat.a * mat.a + mat.b * mat.b); - var ts = Math.sqrt(ta * ta + tc * tc); - if (s > 0.00001) - s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s; - mat.a *= s; - mat.b *= s; - s = Math.sqrt(mat.c * mat.c + mat.d * mat.d); - ts = Math.sqrt(tb * tb + td * td); - if (s > 0.00001) - s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s; - mat.c *= s; - mat.d *= s; - modified = true; - } - if (shearMix > 0) { - var b = mat.c, d = mat.d; - var by = Math.atan2(d, b); - var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a)); - if (r > core.MathUtils.PI) - r -= core.MathUtils.PI2; - else if (r < -core.MathUtils.PI) - r += core.MathUtils.PI2; - r = by + (r + offsetShearY) * shearMix; - var s = Math.sqrt(b * b + d * d); - mat.c = Math.cos(r) * s; - mat.d = Math.sin(r) * s; - modified = true; - } - if (modified) - bone.appliedValid = false; - } - }; - TransformConstraint.prototype.applyRelativeWorld = function () { - var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; - var target = this.target; - var targetMat = target.matrix; - var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d; - var degRadReflect = ta * td - tb * tc > 0 ? core.MathUtils.degRad : -core.MathUtils.degRad; - var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect; - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) { - var bone = bones[i]; - var modified = false; - var mat = bone.matrix; - if (rotateMix != 0) { - var a = mat.a, b = mat.c, c = mat.b, d = mat.d; - var r = Math.atan2(tc, ta) + offsetRotation; - if (r > core.MathUtils.PI) - r -= core.MathUtils.PI2; - else if (r < -core.MathUtils.PI) - r += core.MathUtils.PI2; - r *= rotateMix; - var cos = Math.cos(r), sin = Math.sin(r); - mat.a = cos * a - sin * c; - mat.c = cos * b - sin * d; - mat.b = sin * a + cos * c; - mat.d = sin * b + cos * d; - modified = true; - } - if (translateMix != 0) { - var temp = this.temp; - target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); - mat.tx += temp.x * translateMix; - mat.ty += temp.y * translateMix; - modified = true; - } - if (scaleMix > 0) { - var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1; - mat.a *= s; - mat.b *= s; - s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1; - mat.c *= s; - mat.d *= s; - modified = true; - } - if (shearMix > 0) { - var r = Math.atan2(td, tb) - Math.atan2(tc, ta); - if (r > core.MathUtils.PI) - r -= core.MathUtils.PI2; - else if (r < -core.MathUtils.PI) - r += core.MathUtils.PI2; - var b = mat.c, d = mat.d; - r = Math.atan2(d, b) + (r - core.MathUtils.PI / 2 + offsetShearY) * shearMix; - var s = Math.sqrt(b * b + d * d); - mat.c = Math.cos(r) * s; - mat.d = Math.sin(r) * s; - modified = true; - } - if (modified) - bone.appliedValid = false; - } - }; - TransformConstraint.prototype.applyAbsoluteLocal = function () { - var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; - var target = this.target; - if (!target.appliedValid) - target.updateAppliedTransform(); - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) { - var bone = bones[i]; - if (!bone.appliedValid) - bone.updateAppliedTransform(); - var rotation = bone.arotation; - if (rotateMix != 0) { - var r = target.arotation - rotation + this.data.offsetRotation; - r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; - rotation += r * rotateMix; - } - var x = bone.ax, y = bone.ay; - if (translateMix != 0) { - x += (target.ax - x + this.data.offsetX) * translateMix; - y += (target.ay - y + this.data.offsetY) * translateMix; - } - var scaleX = bone.ascaleX, scaleY = bone.ascaleY; - if (scaleMix > 0) { - if (scaleX > 0.00001) - scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX; - if (scaleY > 0.00001) - scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY; - } - var shearY = bone.ashearY; - if (shearMix > 0) { - var r = target.ashearY - shearY + this.data.offsetShearY; - r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; - bone.shearY += r * shearMix; - } - bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY); - } - }; - TransformConstraint.prototype.applyRelativeLocal = function () { - var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; - var target = this.target; - if (!target.appliedValid) - target.updateAppliedTransform(); - var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) { - var bone = bones[i]; - if (!bone.appliedValid) - bone.updateAppliedTransform(); - var rotation = bone.arotation; - if (rotateMix != 0) - rotation += (target.arotation + this.data.offsetRotation) * rotateMix; - var x = bone.ax, y = bone.ay; - if (translateMix != 0) { - x += (target.ax + this.data.offsetX) * translateMix; - y += (target.ay + this.data.offsetY) * translateMix; - } - var scaleX = bone.ascaleX, scaleY = bone.ascaleY; - if (scaleMix > 0) { - if (scaleX > 0.00001) - scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1; - if (scaleY > 0.00001) - scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1; - } - var shearY = bone.ashearY; - if (shearMix > 0) - shearY += (target.ashearY + this.data.offsetShearY) * shearMix; - bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY); - } - }; - return TransformConstraint; - }()); - core.TransformConstraint = TransformConstraint; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var TransformConstraintData = (function (_super) { - __extends(TransformConstraintData, _super); - function TransformConstraintData(name) { - var _this = _super.call(this, name, 0, false) || this; - _this.bones = new Array(); - _this.rotateMix = 0; - _this.translateMix = 0; - _this.scaleMix = 0; - _this.shearMix = 0; - _this.offsetRotation = 0; - _this.offsetX = 0; - _this.offsetY = 0; - _this.offsetScaleX = 0; - _this.offsetScaleY = 0; - _this.offsetShearY = 0; - _this.relative = false; - _this.local = false; - return _this; - } - return TransformConstraintData; - }(core.ConstraintData)); - core.TransformConstraintData = TransformConstraintData; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var Triangulator = (function () { - function Triangulator() { - this.convexPolygons = new Array(); - this.convexPolygonsIndices = new Array(); - this.indicesArray = new Array(); - this.isConcaveArray = new Array(); - this.triangles = new Array(); - this.polygonPool = new core.Pool(function () { - return new Array(); - }); - this.polygonIndicesPool = new core.Pool(function () { - return new Array(); - }); - } - Triangulator.prototype.triangulate = function (verticesArray) { - var vertices = verticesArray; - var vertexCount = verticesArray.length >> 1; - var indices = this.indicesArray; - indices.length = 0; - for (var i = 0; i < vertexCount; i++) - indices[i] = i; - var isConcave = this.isConcaveArray; - isConcave.length = 0; - for (var i = 0, n = vertexCount; i < n; ++i) - isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices); - var triangles = this.triangles; - triangles.length = 0; - while (vertexCount > 3) { - var previous = vertexCount - 1, i = 0, next = 1; - while (true) { - outer: if (!isConcave[i]) { - var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1; - var p1x = vertices[p1], p1y = vertices[p1 + 1]; - var p2x = vertices[p2], p2y = vertices[p2 + 1]; - var p3x = vertices[p3], p3y = vertices[p3 + 1]; - for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) { - if (!isConcave[ii]) - continue; - var v = indices[ii] << 1; - var vx = vertices[v], vy = vertices[v + 1]; - if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) { - if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) { - if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy)) - break outer; - } - } - } - break; - } - if (next == 0) { - do { - if (!isConcave[i]) - break; - i--; - } while (i > 0); - break; - } - previous = i; - i = next; - next = (next + 1) % vertexCount; - } - triangles.push(indices[(vertexCount + i - 1) % vertexCount]); - triangles.push(indices[i]); - triangles.push(indices[(i + 1) % vertexCount]); - indices.splice(i, 1); - isConcave.splice(i, 1); - vertexCount--; - var previousIndex = (vertexCount + i - 1) % vertexCount; - var nextIndex = i == vertexCount ? 0 : i; - isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices); - isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices); - } - if (vertexCount == 3) { - triangles.push(indices[2]); - triangles.push(indices[0]); - triangles.push(indices[1]); - } - return triangles; - }; - Triangulator.prototype.decompose = function (verticesArray, triangles) { - var vertices = verticesArray; - var convexPolygons = this.convexPolygons; - this.polygonPool.freeAll(convexPolygons); - convexPolygons.length = 0; - var convexPolygonsIndices = this.convexPolygonsIndices; - this.polygonIndicesPool.freeAll(convexPolygonsIndices); - convexPolygonsIndices.length = 0; - var polygonIndices = this.polygonIndicesPool.obtain(); - polygonIndices.length = 0; - var polygon = this.polygonPool.obtain(); - polygon.length = 0; - var fanBaseIndex = -1, lastWinding = 0; - for (var i = 0, n = triangles.length; i < n; i += 3) { - var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1; - var x1 = vertices[t1], y1 = vertices[t1 + 1]; - var x2 = vertices[t2], y2 = vertices[t2 + 1]; - var x3 = vertices[t3], y3 = vertices[t3 + 1]; - var merged = false; - if (fanBaseIndex == t1) { - var o = polygon.length - 4; - var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3); - var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]); - if (winding1 == lastWinding && winding2 == lastWinding) { - polygon.push(x3); - polygon.push(y3); - polygonIndices.push(t3); - merged = true; - } - } - if (!merged) { - if (polygon.length > 0) { - convexPolygons.push(polygon); - convexPolygonsIndices.push(polygonIndices); - } - else { - this.polygonPool.free(polygon); - this.polygonIndicesPool.free(polygonIndices); - } - polygon = this.polygonPool.obtain(); - polygon.length = 0; - polygon.push(x1); - polygon.push(y1); - polygon.push(x2); - polygon.push(y2); - polygon.push(x3); - polygon.push(y3); - polygonIndices = this.polygonIndicesPool.obtain(); - polygonIndices.length = 0; - polygonIndices.push(t1); - polygonIndices.push(t2); - polygonIndices.push(t3); - lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3); - fanBaseIndex = t1; - } - } - if (polygon.length > 0) { - convexPolygons.push(polygon); - convexPolygonsIndices.push(polygonIndices); - } - for (var i = 0, n = convexPolygons.length; i < n; i++) { - polygonIndices = convexPolygonsIndices[i]; - if (polygonIndices.length == 0) - continue; - var firstIndex = polygonIndices[0]; - var lastIndex = polygonIndices[polygonIndices.length - 1]; - polygon = convexPolygons[i]; - var o = polygon.length - 4; - var prevPrevX = polygon[o], prevPrevY = polygon[o + 1]; - var prevX = polygon[o + 2], prevY = polygon[o + 3]; - var firstX = polygon[0], firstY = polygon[1]; - var secondX = polygon[2], secondY = polygon[3]; - var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY); - for (var ii = 0; ii < n; ii++) { - if (ii == i) - continue; - var otherIndices = convexPolygonsIndices[ii]; - if (otherIndices.length != 3) - continue; - var otherFirstIndex = otherIndices[0]; - var otherSecondIndex = otherIndices[1]; - var otherLastIndex = otherIndices[2]; - var otherPoly = convexPolygons[ii]; - var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1]; - if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) - continue; - var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3); - var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY); - if (winding1 == winding && winding2 == winding) { - otherPoly.length = 0; - otherIndices.length = 0; - polygon.push(x3); - polygon.push(y3); - polygonIndices.push(otherLastIndex); - prevPrevX = prevX; - prevPrevY = prevY; - prevX = x3; - prevY = y3; - ii = 0; - } - } - } - for (var i = convexPolygons.length - 1; i >= 0; i--) { - polygon = convexPolygons[i]; - if (polygon.length == 0) { - convexPolygons.splice(i, 1); - this.polygonPool.free(polygon); - polygonIndices = convexPolygonsIndices[i]; - convexPolygonsIndices.splice(i, 1); - this.polygonIndicesPool.free(polygonIndices); - } - } - return convexPolygons; - }; - Triangulator.isConcave = function (index, vertexCount, vertices, indices) { - var previous = indices[(vertexCount + index - 1) % vertexCount] << 1; - var current = indices[index] << 1; - var next = indices[(index + 1) % vertexCount] << 1; - return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]); - }; - Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) { - return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0; - }; - Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) { - var px = p2x - p1x, py = p2y - p1y; - return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1; - }; - return Triangulator; - }()); - core.Triangulator = Triangulator; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var IntSet = (function () { - function IntSet() { - this.array = new Array(); - } - IntSet.prototype.add = function (value) { - var contains = this.contains(value); - this.array[value | 0] = value | 0; - return !contains; - }; - IntSet.prototype.contains = function (value) { - return this.array[value | 0] != undefined; - }; - IntSet.prototype.remove = function (value) { - this.array[value | 0] = undefined; - }; - IntSet.prototype.clear = function () { - this.array.length = 0; - }; - return IntSet; - }()); - core.IntSet = IntSet; - var Color = (function () { - function Color(r, g, b, a) { - if (r === void 0) { r = 0; } - if (g === void 0) { g = 0; } - if (b === void 0) { b = 0; } - if (a === void 0) { a = 0; } - this.r = r; - this.g = g; - this.b = b; - this.a = a; - } - Color.prototype.set = function (r, g, b, a) { - this.r = r; - this.g = g; - this.b = b; - this.a = a; - this.clamp(); - return this; - }; - Color.prototype.setFromColor = function (c) { - this.r = c.r; - this.g = c.g; - this.b = c.b; - this.a = c.a; - return this; - }; - Color.prototype.setFromString = function (hex) { - hex = hex.charAt(0) == '#' ? hex.substr(1) : hex; - this.r = parseInt(hex.substr(0, 2), 16) / 255.0; - this.g = parseInt(hex.substr(2, 2), 16) / 255.0; - this.b = parseInt(hex.substr(4, 2), 16) / 255.0; - this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0; - return this; - }; - Color.prototype.add = function (r, g, b, a) { - this.r += r; - this.g += g; - this.b += b; - this.a += a; - this.clamp(); - return this; - }; - Color.prototype.clamp = function () { - if (this.r < 0) - this.r = 0; - else if (this.r > 1) - this.r = 1; - if (this.g < 0) - this.g = 0; - else if (this.g > 1) - this.g = 1; - if (this.b < 0) - this.b = 0; - else if (this.b > 1) - this.b = 1; - if (this.a < 0) - this.a = 0; - else if (this.a > 1) - this.a = 1; - return this; - }; - Color.rgba8888ToColor = function (color, value) { - color.r = ((value & 0xff000000) >>> 24) / 255; - color.g = ((value & 0x00ff0000) >>> 16) / 255; - color.b = ((value & 0x0000ff00) >>> 8) / 255; - color.a = ((value & 0x000000ff)) / 255; - }; - Color.rgb888ToColor = function (color, value) { - color.r = ((value & 0x00ff0000) >>> 16) / 255; - color.g = ((value & 0x0000ff00) >>> 8) / 255; - color.b = ((value & 0x000000ff)) / 255; - }; - Color.WHITE = new Color(1, 1, 1, 1); - Color.RED = new Color(1, 0, 0, 1); - Color.GREEN = new Color(0, 1, 0, 1); - Color.BLUE = new Color(0, 0, 1, 1); - Color.MAGENTA = new Color(1, 0, 1, 1); - return Color; - }()); - core.Color = Color; - var MathUtils = (function () { - function MathUtils() { - } - MathUtils.clamp = function (value, min, max) { - if (value < min) - return min; - if (value > max) - return max; - return value; - }; - MathUtils.cosDeg = function (degrees) { - return Math.cos(degrees * MathUtils.degRad); - }; - MathUtils.sinDeg = function (degrees) { - return Math.sin(degrees * MathUtils.degRad); - }; - MathUtils.signum = function (value) { - return value > 0 ? 1 : value < 0 ? -1 : 0; - }; - MathUtils.toInt = function (x) { - return x > 0 ? Math.floor(x) : Math.ceil(x); - }; - MathUtils.cbrt = function (x) { - var y = Math.pow(Math.abs(x), 1 / 3); - return x < 0 ? -y : y; - }; - MathUtils.randomTriangular = function (min, max) { - return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5); - }; - MathUtils.randomTriangularWith = function (min, max, mode) { - var u = Math.random(); - var d = max - min; - if (u <= (mode - min) / d) - return min + Math.sqrt(u * d * (mode - min)); - return max - Math.sqrt((1 - u) * d * (max - mode)); - }; - MathUtils.PI = 3.1415927; - MathUtils.PI2 = MathUtils.PI * 2; - MathUtils.radiansToDegrees = 180 / MathUtils.PI; - MathUtils.radDeg = MathUtils.radiansToDegrees; - MathUtils.degreesToRadians = MathUtils.PI / 180; - MathUtils.degRad = MathUtils.degreesToRadians; - return MathUtils; - }()); - core.MathUtils = MathUtils; - var Interpolation = (function () { - function Interpolation() { - } - Interpolation.prototype.apply = function (start, end, a) { - return start + (end - start) * this.applyInternal(a); - }; - return Interpolation; - }()); - core.Interpolation = Interpolation; - var Pow = (function (_super) { - __extends(Pow, _super); - function Pow(power) { - var _this = _super.call(this) || this; - _this.power = 2; - _this.power = power; - return _this; - } - Pow.prototype.applyInternal = function (a) { - if (a <= 0.5) - return Math.pow(a * 2, this.power) / 2; - return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1; - }; - return Pow; - }(Interpolation)); - core.Pow = Pow; - var PowOut = (function (_super) { - __extends(PowOut, _super); - function PowOut(power) { - return _super.call(this, power) || this; - } - PowOut.prototype.applyInternal = function (a) { - return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1; - }; - return PowOut; - }(Pow)); - core.PowOut = PowOut; - var Utils = (function () { - function Utils() { - } - Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) { - for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) { - dest[j] = source[i]; - } - }; - Utils.setArraySize = function (array, size, value) { - if (value === void 0) { value = 0; } - var oldSize = array.length; - if (oldSize == size) - return array; - array.length = size; - if (oldSize < size) { - for (var i = oldSize; i < size; i++) - array[i] = value; - } - return array; - }; - Utils.ensureArrayCapacity = function (array, size, value) { - if (value === void 0) { value = 0; } - if (array.length >= size) - return array; - return Utils.setArraySize(array, size, value); - }; - Utils.newArray = function (size, defaultValue) { - var array = new Array(size); - for (var i = 0; i < size; i++) - array[i] = defaultValue; - return array; - }; - Utils.newFloatArray = function (size) { - if (Utils.SUPPORTS_TYPED_ARRAYS) { - return new Float32Array(size); - } - else { - var array = new Array(size); - for (var i = 0; i < array.length; i++) - array[i] = 0; - return array; - } - }; - Utils.newShortArray = function (size) { - if (Utils.SUPPORTS_TYPED_ARRAYS) { - return new Int16Array(size); - } - else { - var array = new Array(size); - for (var i = 0; i < array.length; i++) - array[i] = 0; - return array; - } - }; - Utils.toFloatArray = function (array) { - return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array; - }; - Utils.toSinglePrecision = function (value) { - return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value; - }; - Utils.webkit602BugfixHelper = function (alpha, blend) { - }; - Utils.contains = function (array, element, identity) { - if (identity === void 0) { identity = true; } - for (var i = 0; i < array.length; i++) { - if (array[i] == element) - return true; - } - return false; - }; - Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined"; - return Utils; - }()); - core.Utils = Utils; - var DebugUtils = (function () { - function DebugUtils() { - } - DebugUtils.logBones = function (skeleton) { - for (var i = 0; i < skeleton.bones.length; i++) { - var bone = skeleton.bones[i]; - var mat = bone.matrix; - console.log(bone.data.name + ", " + mat.a + ", " + mat.b + ", " + mat.c + ", " + mat.d + ", " + mat.tx + ", " + mat.ty); - } - }; - return DebugUtils; - }()); - core.DebugUtils = DebugUtils; - var Pool = (function () { - function Pool(instantiator) { - this.items = new Array(); - this.instantiator = instantiator; - } - Pool.prototype.obtain = function () { - return this.items.length > 0 ? this.items.pop() : this.instantiator(); - }; - Pool.prototype.free = function (item) { - if (item.reset) - item.reset(); - this.items.push(item); - }; - Pool.prototype.freeAll = function (items) { - for (var i = 0; i < items.length; i++) { - if (items[i].reset) - items[i].reset(); - this.items[i] = items[i]; - } - }; - Pool.prototype.clear = function () { - this.items.length = 0; - }; - return Pool; - }()); - core.Pool = Pool; - var Vector2 = (function () { - function Vector2(x, y) { - if (x === void 0) { x = 0; } - if (y === void 0) { y = 0; } - this.x = x; - this.y = y; - } - Vector2.prototype.set = function (x, y) { - this.x = x; - this.y = y; - return this; - }; - Vector2.prototype.length = function () { - var x = this.x; - var y = this.y; - return Math.sqrt(x * x + y * y); - }; - Vector2.prototype.normalize = function () { - var len = this.length(); - if (len != 0) { - this.x /= len; - this.y /= len; - } - return this; - }; - return Vector2; - }()); - core.Vector2 = Vector2; - var TimeKeeper = (function () { - function TimeKeeper() { - this.maxDelta = 0.064; - this.framesPerSecond = 0; - this.delta = 0; - this.totalTime = 0; - this.lastTime = Date.now() / 1000; - this.frameCount = 0; - this.frameTime = 0; - } - TimeKeeper.prototype.update = function () { - var now = Date.now() / 1000; - this.delta = now - this.lastTime; - this.frameTime += this.delta; - this.totalTime += this.delta; - if (this.delta > this.maxDelta) - this.delta = this.maxDelta; - this.lastTime = now; - this.frameCount++; - if (this.frameTime > 1) { - this.framesPerSecond = this.frameCount / this.frameTime; - this.frameTime = 0; - this.frameCount = 0; - } - }; - return TimeKeeper; - }()); - core.TimeKeeper = TimeKeeper; - var WindowedMean = (function () { - function WindowedMean(windowSize) { - if (windowSize === void 0) { windowSize = 32; } - this.addedValues = 0; - this.lastValue = 0; - this.mean = 0; - this.dirty = true; - this.values = new Array(windowSize); - } - WindowedMean.prototype.hasEnoughData = function () { - return this.addedValues >= this.values.length; - }; - WindowedMean.prototype.addValue = function (value) { - if (this.addedValues < this.values.length) - this.addedValues++; - this.values[this.lastValue++] = value; - if (this.lastValue > this.values.length - 1) - this.lastValue = 0; - this.dirty = true; - }; - WindowedMean.prototype.getMean = function () { - if (this.hasEnoughData()) { - if (this.dirty) { - var mean = 0; - for (var i = 0; i < this.values.length; i++) { - mean += this.values[i]; - } - this.mean = mean / this.values.length; - this.dirty = false; - } - return this.mean; - } - else { - return 0; - } - }; - return WindowedMean; - }()); - core.WindowedMean = WindowedMean; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var Attachment = (function () { - function Attachment(name) { - if (name == null) - throw new Error("name cannot be null."); - this.name = name; - } - return Attachment; - }()); - core.Attachment = Attachment; - var VertexAttachment = (function (_super) { - __extends(VertexAttachment, _super); - function VertexAttachment(name) { - var _this = _super.call(this, name) || this; - _this.id = (VertexAttachment.nextID++ & 65535) << 11; - _this.worldVerticesLength = 0; - _this.deformAttachment = _this; - return _this; - } - VertexAttachment.prototype.computeWorldVerticesOld = function (slot, worldVertices) { - this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2); - }; - VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) { - count = offset + (count >> 1) * stride; - var skeleton = slot.bone.skeleton; - var deformArray = slot.deform; - var vertices = this.vertices; - var bones = this.bones; - if (bones == null) { - if (deformArray.length > 0) - vertices = deformArray; - var mat = slot.bone.matrix; - var x = mat.tx; - var y = mat.ty; - var a = mat.a, b = mat.c, c = mat.b, d = mat.d; - for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) { - var vx = vertices[v_1], vy = vertices[v_1 + 1]; - worldVertices[w] = vx * a + vy * b + x; - worldVertices[w + 1] = vx * c + vy * d + y; - } - return; - } - var v = 0, skip = 0; - for (var i = 0; i < start; i += 2) { - var n = bones[v]; - v += n + 1; - skip += n; - } - var skeletonBones = skeleton.bones; - if (deformArray.length == 0) { - for (var w = offset, b = skip * 3; w < count; w += stride) { - var wx = 0, wy = 0; - var n = bones[v++]; - n += v; - for (; v < n; v++, b += 3) { - var mat = skeletonBones[bones[v]].matrix; - var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; - wx += (vx * mat.a + vy * mat.c + mat.tx) * weight; - wy += (vx * mat.b + vy * mat.d + mat.ty) * weight; - } - worldVertices[w] = wx; - worldVertices[w + 1] = wy; - } - } - else { - var deform = deformArray; - for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) { - var wx = 0, wy = 0; - var n = bones[v++]; - n += v; - for (; v < n; v++, b += 3, f += 2) { - var mat = skeletonBones[bones[v]].matrix; - var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; - wx += (vx * mat.a + vy * mat.c + mat.tx) * weight; - wy += (vx * mat.b + vy * mat.d + mat.ty) * weight; - } - worldVertices[w] = wx; - worldVertices[w + 1] = wy; - } - } - }; - VertexAttachment.prototype.copyTo = function (attachment) { - if (this.bones != null) { - attachment.bones = new Array(this.bones.length); - core.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length); - } - else - attachment.bones = null; - if (this.vertices != null) { - attachment.vertices = core.Utils.newFloatArray(this.vertices.length); - core.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length); - } - else - attachment.vertices = null; - attachment.worldVerticesLength = this.worldVerticesLength; - attachment.deformAttachment = this.deformAttachment; - }; - VertexAttachment.nextID = 0; - return VertexAttachment; - }(Attachment)); - core.VertexAttachment = VertexAttachment; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var AttachmentType; - (function (AttachmentType) { - AttachmentType[AttachmentType["Region"] = 0] = "Region"; - AttachmentType[AttachmentType["BoundingBox"] = 1] = "BoundingBox"; - AttachmentType[AttachmentType["Mesh"] = 2] = "Mesh"; - AttachmentType[AttachmentType["LinkedMesh"] = 3] = "LinkedMesh"; - AttachmentType[AttachmentType["Path"] = 4] = "Path"; - AttachmentType[AttachmentType["Point"] = 5] = "Point"; - AttachmentType[AttachmentType["Clipping"] = 6] = "Clipping"; - })(AttachmentType = core.AttachmentType || (core.AttachmentType = {})); - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var BoundingBoxAttachment = (function (_super) { - __extends(BoundingBoxAttachment, _super); - function BoundingBoxAttachment(name) { - var _this = _super.call(this, name) || this; - _this.color = new core.Color(1, 1, 1, 1); - return _this; - } - BoundingBoxAttachment.prototype.copy = function () { - var copy = new BoundingBoxAttachment(name); - this.copyTo(copy); - copy.color.setFromColor(this.color); - return copy; - }; - return BoundingBoxAttachment; - }(core.VertexAttachment)); - core.BoundingBoxAttachment = BoundingBoxAttachment; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var ClippingAttachment = (function (_super) { - __extends(ClippingAttachment, _super); - function ClippingAttachment(name) { - var _this = _super.call(this, name) || this; - _this.color = new core.Color(0.2275, 0.2275, 0.8078, 1); - return _this; - } - ClippingAttachment.prototype.copy = function () { - var copy = new ClippingAttachment(name); - this.copyTo(copy); - copy.endSlot = this.endSlot; - copy.color.setFromColor(this.color); - return copy; - }; - return ClippingAttachment; - }(core.VertexAttachment)); - core.ClippingAttachment = ClippingAttachment; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var MeshAttachment = (function (_super) { - __extends(MeshAttachment, _super); - function MeshAttachment(name) { - var _this = _super.call(this, name) || this; - _this.color = new core.Color(1, 1, 1, 1); - _this.tempColor = new core.Color(0, 0, 0, 0); - return _this; - } - MeshAttachment.prototype.updateUVs = function (region, uvs) { - var regionUVs = this.regionUVs; - var n = regionUVs.length; - if (!uvs || uvs.length != n) { - uvs = core.Utils.newFloatArray(n); - } - if (region == null) { - return; - } - var texture = region.texture; - var r = texture._uvs; - var w1 = region.width, h1 = region.height, w2 = region.originalWidth, h2 = region.originalHeight; - var x = region.offsetX, y = region.pixiOffsetY; - for (var i = 0; i < n; i += 2) { - var u = this.regionUVs[i], v = this.regionUVs[i + 1]; - u = (u * w2 - x) / w1; - v = (v * h2 - y) / h1; - uvs[i] = (r.x0 * (1 - u) + r.x1 * u) * (1 - v) + (r.x3 * (1 - u) + r.x2 * u) * v; - uvs[i + 1] = (r.y0 * (1 - u) + r.y1 * u) * (1 - v) + (r.y3 * (1 - u) + r.y2 * u) * v; - } - return uvs; - }; - MeshAttachment.prototype.getParentMesh = function () { - return this.parentMesh; - }; - MeshAttachment.prototype.setParentMesh = function (parentMesh) { - this.parentMesh = parentMesh; - if (parentMesh != null) { - this.bones = parentMesh.bones; - this.vertices = parentMesh.vertices; - this.worldVerticesLength = parentMesh.worldVerticesLength; - this.regionUVs = parentMesh.regionUVs; - this.triangles = parentMesh.triangles; - this.hullLength = parentMesh.hullLength; - this.worldVerticesLength = parentMesh.worldVerticesLength; - } - }; - MeshAttachment.prototype.copy = function () { - if (this.parentMesh != null) - return this.newLinkedMesh(); - var copy = new MeshAttachment(this.name); - copy.region = this.region; - copy.path = this.path; - copy.color.setFromColor(this.color); - this.copyTo(copy); - copy.regionUVs = new Float32Array(this.regionUVs.length); - core.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length); - copy.uvs = new Array(this.uvs.length); - core.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length); - copy.triangles = new Array(this.triangles.length); - core.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length); - copy.hullLength = this.hullLength; - if (this.edges != null) { - copy.edges = new Array(this.edges.length); - core.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length); - } - copy.width = this.width; - copy.height = this.height; - return copy; - }; - MeshAttachment.prototype.newLinkedMesh = function () { - var copy = new MeshAttachment(this.name); - copy.region = this.region; - copy.path = this.path; - copy.color.setFromColor(this.color); - copy.deformAttachment = this.deformAttachment; - copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this); - return copy; - }; - return MeshAttachment; - }(core.VertexAttachment)); - core.MeshAttachment = MeshAttachment; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var PathAttachment = (function (_super) { - __extends(PathAttachment, _super); - function PathAttachment(name) { - var _this = _super.call(this, name) || this; - _this.closed = false; - _this.constantSpeed = false; - _this.color = new core.Color(1, 1, 1, 1); - return _this; - } - PathAttachment.prototype.copy = function () { - var copy = new PathAttachment(name); - this.copyTo(copy); - copy.lengths = new Array(this.lengths.length); - core.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length); - copy.closed = closed; - copy.constantSpeed = this.constantSpeed; - copy.color.setFromColor(this.color); - return copy; - }; - return PathAttachment; - }(core.VertexAttachment)); - core.PathAttachment = PathAttachment; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var PointAttachment = (function (_super) { - __extends(PointAttachment, _super); - function PointAttachment(name) { - var _this = _super.call(this, name) || this; - _this.color = new core.Color(0.38, 0.94, 0, 1); - return _this; - } - PointAttachment.prototype.computeWorldPosition = function (bone, point) { - var mat = bone.matrix; - point.x = this.x * mat.a + this.y * mat.c + bone.worldX; - point.y = this.x * mat.b + this.y * mat.d + bone.worldY; - return point; - }; - PointAttachment.prototype.computeWorldRotation = function (bone) { - var mat = bone.matrix; - var cos = core.MathUtils.cosDeg(this.rotation), sin = core.MathUtils.sinDeg(this.rotation); - var x = cos * mat.a + sin * mat.c; - var y = cos * mat.b + sin * mat.d; - return Math.atan2(y, x) * core.MathUtils.radDeg; - }; - PointAttachment.prototype.copy = function () { - var copy = new PointAttachment(name); - copy.x = this.x; - copy.y = this.y; - copy.rotation = this.rotation; - copy.color.setFromColor(this.color); - return copy; - }; - return PointAttachment; - }(core.VertexAttachment)); - core.PointAttachment = PointAttachment; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var RegionAttachment = (function (_super) { - __extends(RegionAttachment, _super); - function RegionAttachment(name) { - var _this = _super.call(this, name) || this; - _this.x = 0; - _this.y = 0; - _this.scaleX = 1; - _this.scaleY = 1; - _this.rotation = 0; - _this.width = 0; - _this.height = 0; - _this.color = new core.Color(1, 1, 1, 1); - _this.offset = core.Utils.newFloatArray(8); - _this.uvs = core.Utils.newFloatArray(8); - _this.tempColor = new core.Color(1, 1, 1, 1); - return _this; - } - RegionAttachment.prototype.updateOffset = function () { - var regionScaleX = this.width / this.region.originalWidth * this.scaleX; - var regionScaleY = this.height / this.region.originalHeight * this.scaleY; - var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX; - var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY; - var localX2 = localX + this.region.width * regionScaleX; - var localY2 = localY + this.region.height * regionScaleY; - var radians = this.rotation * Math.PI / 180; - var cos = Math.cos(radians); - var sin = Math.sin(radians); - var localXCos = localX * cos + this.x; - var localXSin = localX * sin; - var localYCos = localY * cos + this.y; - var localYSin = localY * sin; - var localX2Cos = localX2 * cos + this.x; - var localX2Sin = localX2 * sin; - var localY2Cos = localY2 * cos + this.y; - var localY2Sin = localY2 * sin; - var offset = this.offset; - offset[RegionAttachment.OX1] = localXCos - localYSin; - offset[RegionAttachment.OY1] = localYCos + localXSin; - offset[RegionAttachment.OX2] = localXCos - localY2Sin; - offset[RegionAttachment.OY2] = localY2Cos + localXSin; - offset[RegionAttachment.OX3] = localX2Cos - localY2Sin; - offset[RegionAttachment.OY3] = localY2Cos + localX2Sin; - offset[RegionAttachment.OX4] = localX2Cos - localYSin; - offset[RegionAttachment.OY4] = localYCos + localX2Sin; - }; - RegionAttachment.prototype.setRegion = function (region) { - this.region = region; - var uvs = this.uvs; - if (region.rotate) { - uvs[2] = region.u; - uvs[3] = region.v2; - uvs[4] = region.u; - uvs[5] = region.v; - uvs[6] = region.u2; - uvs[7] = region.v; - uvs[0] = region.u2; - uvs[1] = region.v2; - } - else { - uvs[0] = region.u; - uvs[1] = region.v2; - uvs[2] = region.u; - uvs[3] = region.v; - uvs[4] = region.u2; - uvs[5] = region.v; - uvs[6] = region.u2; - uvs[7] = region.v2; - } - }; - RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) { - var vertexOffset = this.offset; - var mat = bone.matrix; - var x = mat.tx, y = mat.ty; - var a = mat.a, b = mat.c, c = mat.b, d = mat.d; - var offsetX = 0, offsetY = 0; - offsetX = vertexOffset[RegionAttachment.OX1]; - offsetY = vertexOffset[RegionAttachment.OY1]; - worldVertices[offset] = offsetX * a + offsetY * b + x; - worldVertices[offset + 1] = offsetX * c + offsetY * d + y; - offset += stride; - offsetX = vertexOffset[RegionAttachment.OX2]; - offsetY = vertexOffset[RegionAttachment.OY2]; - worldVertices[offset] = offsetX * a + offsetY * b + x; - worldVertices[offset + 1] = offsetX * c + offsetY * d + y; - offset += stride; - offsetX = vertexOffset[RegionAttachment.OX3]; - offsetY = vertexOffset[RegionAttachment.OY3]; - worldVertices[offset] = offsetX * a + offsetY * b + x; - worldVertices[offset + 1] = offsetX * c + offsetY * d + y; - offset += stride; - offsetX = vertexOffset[RegionAttachment.OX4]; - offsetY = vertexOffset[RegionAttachment.OY4]; - worldVertices[offset] = offsetX * a + offsetY * b + x; - worldVertices[offset + 1] = offsetX * c + offsetY * d + y; - }; - RegionAttachment.prototype.copy = function () { - var copy = new RegionAttachment(name); - copy.region = this.region; - copy.rendererObject = this.rendererObject; - copy.path = this.path; - copy.x = this.x; - copy.y = this.y; - copy.scaleX = this.scaleX; - copy.scaleY = this.scaleY; - copy.rotation = this.rotation; - copy.width = this.width; - copy.height = this.height; - core.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8); - core.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8); - copy.color.setFromColor(this.color); - return copy; - }; - RegionAttachment.OX1 = 0; - RegionAttachment.OY1 = 1; - RegionAttachment.OX2 = 2; - RegionAttachment.OY2 = 3; - RegionAttachment.OX3 = 4; - RegionAttachment.OY3 = 5; - RegionAttachment.OX4 = 6; - RegionAttachment.OY4 = 7; - RegionAttachment.X1 = 0; - RegionAttachment.Y1 = 1; - RegionAttachment.C1R = 2; - RegionAttachment.C1G = 3; - RegionAttachment.C1B = 4; - RegionAttachment.C1A = 5; - RegionAttachment.U1 = 6; - RegionAttachment.V1 = 7; - RegionAttachment.X2 = 8; - RegionAttachment.Y2 = 9; - RegionAttachment.C2R = 10; - RegionAttachment.C2G = 11; - RegionAttachment.C2B = 12; - RegionAttachment.C2A = 13; - RegionAttachment.U2 = 14; - RegionAttachment.V2 = 15; - RegionAttachment.X3 = 16; - RegionAttachment.Y3 = 17; - RegionAttachment.C3R = 18; - RegionAttachment.C3G = 19; - RegionAttachment.C3B = 20; - RegionAttachment.C3A = 21; - RegionAttachment.U3 = 22; - RegionAttachment.V3 = 23; - RegionAttachment.X4 = 24; - RegionAttachment.Y4 = 25; - RegionAttachment.C4R = 26; - RegionAttachment.C4G = 27; - RegionAttachment.C4B = 28; - RegionAttachment.C4A = 29; - RegionAttachment.U4 = 30; - RegionAttachment.V4 = 31; - return RegionAttachment; - }(core.Attachment)); - core.RegionAttachment = RegionAttachment; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var JitterEffect = (function () { - function JitterEffect(jitterX, jitterY) { - this.jitterX = 0; - this.jitterY = 0; - this.jitterX = jitterX; - this.jitterY = jitterY; - } - JitterEffect.prototype.begin = function (skeleton) { - }; - JitterEffect.prototype.transform = function (position, uv, light, dark) { - position.x += core.MathUtils.randomTriangular(-this.jitterX, this.jitterY); - position.y += core.MathUtils.randomTriangular(-this.jitterX, this.jitterY); - }; - JitterEffect.prototype.end = function () { - }; - return JitterEffect; - }()); - core.JitterEffect = JitterEffect; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var core; - (function (core) { - var SwirlEffect = (function () { - function SwirlEffect(radius) { - this.centerX = 0; - this.centerY = 0; - this.radius = 0; - this.angle = 0; - this.worldX = 0; - this.worldY = 0; - this.radius = radius; - } - SwirlEffect.prototype.begin = function (skeleton) { - this.worldX = skeleton.x + this.centerX; - this.worldY = skeleton.y + this.centerY; - }; - SwirlEffect.prototype.transform = function (position, uv, light, dark) { - var radAngle = this.angle * core.MathUtils.degreesToRadians; - var x = position.x - this.worldX; - var y = position.y - this.worldY; - var dist = Math.sqrt(x * x + y * y); - if (dist < this.radius) { - var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius); - var cos = Math.cos(theta); - var sin = Math.sin(theta); - position.x = cos * x - sin * y + this.worldX; - position.y = sin * x + cos * y + this.worldY; - } - }; - SwirlEffect.prototype.end = function () { - }; - SwirlEffect.interpolation = new core.PowOut(2); - return SwirlEffect; - }()); - core.SwirlEffect = SwirlEffect; - })(core = pixi_spine.core || (pixi_spine.core = {})); -})(pixi_spine || (pixi_spine = {})); -(function () { - if (!Math.fround) { - Math.fround = Math.fround = (function (array) { - return function (x) { - return array[0] = x, array[0]; - }; - })(new Float32Array(1)); - } -})(); -var pixi_spine; -(function (pixi_spine) { - pixi_spine.core.Bone.yDown = true; - var tempRgb = [0, 0, 0]; - var SpineSprite = (function (_super) { - __extends(SpineSprite, _super); - function SpineSprite() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.region = null; - return _this; - } - return SpineSprite; - }(PIXI.Sprite)); - pixi_spine.SpineSprite = SpineSprite; - var SpineMesh = (function (_super) { - __extends(SpineMesh, _super); - function SpineMesh(texture, vertices, uvs, indices, drawMode) { - return _super.call(this, texture, vertices, uvs, indices, drawMode) || this; - } - return SpineMesh; - }(PIXI.mesh.Mesh)); - pixi_spine.SpineMesh = SpineMesh; - var Spine = (function (_super) { - __extends(Spine, _super); - function Spine(spineData) { - var _this = _super.call(this) || this; - if (!spineData) { - throw new Error('The spineData param is required.'); - } - if ((typeof spineData) === "string") { - throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.'); - } - _this.spineData = spineData; - _this.skeleton = new pixi_spine.core.Skeleton(spineData); - _this.skeleton.updateWorldTransform(); - _this.stateData = new pixi_spine.core.AnimationStateData(spineData); - _this.state = new pixi_spine.core.AnimationState(_this.stateData); - _this.slotContainers = []; - _this.tempClipContainers = []; - for (var i = 0, n = _this.skeleton.slots.length; i < n; i++) { - var slot = _this.skeleton.slots[i]; - var attachment = slot.getAttachment(); - var slotContainer = _this.newContainer(); - _this.slotContainers.push(slotContainer); - _this.addChild(slotContainer); - _this.tempClipContainers.push(null); - if (attachment instanceof pixi_spine.core.RegionAttachment) { - var spriteName = attachment.region.name; - var sprite = _this.createSprite(slot, attachment, spriteName); - slot.currentSprite = sprite; - slot.currentSpriteName = spriteName; - slotContainer.addChild(sprite); - } - else if (attachment instanceof pixi_spine.core.MeshAttachment) { - var mesh = _this.createMesh(slot, attachment); - slot.currentMesh = mesh; - slot.currentMeshName = attachment.name; - slotContainer.addChild(mesh); - } - else if (attachment instanceof pixi_spine.core.ClippingAttachment) { - _this.createGraphics(slot, attachment); - slotContainer.addChild(slot.clippingContainer); - slotContainer.addChild(slot.currentGraphics); - } - else { - continue; - } - } - _this.autoUpdate = true; - _this.tintRgb = new Float32Array([1, 1, 1]); - return _this; - } - Object.defineProperty(Spine.prototype, "autoUpdate", { - get: function () { - return (this.updateTransform === Spine.prototype.autoUpdateTransform); - }, - set: function (value) { - this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Spine.prototype, "tint", { - get: function () { - return PIXI.utils.rgb2hex(this.tintRgb); - }, - set: function (value) { - this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Spine.prototype, "delayLimit", { - get: function () { - var limit = typeof this.localDelayLimit !== "undefined" ? - this.localDelayLimit : Spine.globalDelayLimit; - return limit || Number.MAX_VALUE; - }, - enumerable: true, - configurable: true - }); - Spine.prototype.update = function (dt) { - var delayLimit = this.delayLimit; - if (dt > delayLimit) - dt = delayLimit; - this.state.update(dt); - this.state.apply(this.skeleton); - if (!this.skeleton) - return; - this.skeleton.updateWorldTransform(); - var slots = this.skeleton.slots; - var globalClr = this.color; - var light = null, dark = null; - if (globalClr) { - light = globalClr.light; - dark = globalClr.dark; - } - else { - light = this.tintRgb; - } - var thack = PIXI.TransformBase && (this.transformHack() == 1); - for (var i = 0, n = slots.length; i < n; i++) { - var slot = slots[i]; - var attachment = slot.getAttachment(); - var slotContainer = this.slotContainers[i]; - if (!attachment) { - slotContainer.visible = false; - continue; - } - var spriteColor = null; - var attColor = attachment.color; - if (attachment instanceof pixi_spine.core.RegionAttachment) { - var region = attachment.region; - if (region) { - if (slot.currentMesh) { - slot.currentMesh.visible = false; - slot.currentMesh = null; - slot.currentMeshName = undefined; - } - var ar = region; - if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) { - var spriteName = ar.name; - if (slot.currentSprite) { - slot.currentSprite.visible = false; - } - slot.sprites = slot.sprites || {}; - if (slot.sprites[spriteName] !== undefined) { - slot.sprites[spriteName].visible = true; - } - else { - var sprite = this.createSprite(slot, attachment, spriteName); - slotContainer.addChild(sprite); - } - slot.currentSprite = slot.sprites[spriteName]; - slot.currentSpriteName = spriteName; - } - } - if (slotContainer.transform) { - var transform = slotContainer.transform; - var transAny = transform; - var lt = null; - if (transAny.matrix2d) { - lt = transAny.matrix2d; - transAny._dirtyVersion++; - transAny.version = transAny._dirtyVersion; - transAny.isStatic = true; - transAny.operMode = 0; - } - else { - if (thack) { - if (transAny.position) { - transform = new PIXI.TransformBase(); - transform._parentID = -1; - transform._worldID = slotContainer.transform._worldID; - slotContainer.transform = transform; - } - lt = transform.localTransform; - } - else { - transAny.setFromMatrix(slot.bone.matrix); - } - } - if (lt) { - slot.bone.matrix.copy(lt); - } - } - else { - var lt = slotContainer.localTransform || new PIXI.Matrix(); - slot.bone.matrix.copy(lt); - slotContainer.localTransform = lt; - slotContainer.displayObjectUpdateTransform = SlotContainerUpdateTransformV3; - } - if (slot.currentSprite.color) { - spriteColor = slot.currentSprite.color; - } - else { - tempRgb[0] = light[0] * slot.color.r * attColor.r; - tempRgb[1] = light[1] * slot.color.g * attColor.g; - tempRgb[2] = light[2] * slot.color.b * attColor.b; - slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb); - } - slot.currentSprite.blendMode = slot.blendMode; - } - else if (attachment instanceof pixi_spine.core.MeshAttachment) { - if (slot.currentSprite) { - slot.currentSprite.visible = false; - slot.currentSprite = null; - slot.currentSpriteName = undefined; - if (slotContainer.transform) { - var transform = new PIXI.TransformStatic(); - transform._parentID = -1; - transform._worldID = slotContainer.transform._worldID; - slotContainer.transform = transform; - } - else { - slotContainer.localTransform = new PIXI.Matrix(); - slotContainer.displayObjectUpdateTransform = PIXI.DisplayObject.prototype.updateTransform; - } - } - if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) { - var meshName = attachment.name; - if (slot.currentMesh) { - slot.currentMesh.visible = false; - } - slot.meshes = slot.meshes || {}; - if (slot.meshes[meshName] !== undefined) { - slot.meshes[meshName].visible = true; - } - else { - var mesh = this.createMesh(slot, attachment); - slotContainer.addChild(mesh); - } - slot.currentMesh = slot.meshes[meshName]; - slot.currentMeshName = meshName; - } - attachment.computeWorldVerticesOld(slot, slot.currentMesh.vertices); - if (slot.currentMesh.color) { - spriteColor = slot.currentMesh.color; - } - else if (PIXI.VERSION[0] !== '3') { - var tintRgb = slot.currentMesh.tintRgb; - tintRgb[0] = light[0] * slot.color.r * attColor.r; - tintRgb[1] = light[1] * slot.color.g * attColor.g; - tintRgb[2] = light[2] * slot.color.b * attColor.b; - } - slot.currentMesh.blendMode = slot.blendMode; - } - else if (attachment instanceof pixi_spine.core.ClippingAttachment) { - if (!slot.currentGraphics) { - this.createGraphics(slot, attachment); - slotContainer.addChild(slot.clippingContainer); - slotContainer.addChild(slot.currentGraphics); - } - this.updateGraphics(slot, attachment); - } - else { - slotContainer.visible = false; - continue; - } - slotContainer.visible = true; - if (spriteColor) { - var r0 = slot.color.r * attColor.r; - var g0 = slot.color.g * attColor.g; - var b0 = slot.color.b * attColor.b; - spriteColor.setLight(light[0] * r0 + dark[0] * (1.0 - r0), light[1] * g0 + dark[1] * (1.0 - g0), light[2] * b0 + dark[2] * (1.0 - b0)); - if (slot.darkColor) { - r0 = slot.darkColor.r; - g0 = slot.darkColor.g; - b0 = slot.darkColor.b; - } - else { - r0 = 0.0; - g0 = 0.0; - b0 = 0.0; - } - spriteColor.setDark(light[0] * r0 + dark[0] * (1 - r0), light[1] * g0 + dark[1] * (1 - g0), light[2] * b0 + dark[2] * (1 - b0)); - } - slotContainer.alpha = slot.color.a; - } - var drawOrder = this.skeleton.drawOrder; - var clippingAttachment = null; - var clippingContainer = null; - for (var i = 0, n = drawOrder.length; i < n; i++) { - var slot = slots[drawOrder[i].data.index]; - var slotContainer = this.slotContainers[drawOrder[i].data.index]; - if (!clippingContainer) { - if (slotContainer.parent !== null && slotContainer.parent !== this) { - slotContainer.parent.removeChild(slotContainer); - slotContainer.parent = this; - } - } - if (slot.currentGraphics && slot.getAttachment()) { - clippingContainer = slot.clippingContainer; - clippingAttachment = slot.getAttachment(); - clippingContainer.children.length = 0; - this.children[i] = slotContainer; - if (clippingAttachment.endSlot == slot.data) { - clippingAttachment.endSlot = null; - } - } - else { - if (clippingContainer) { - var c = this.tempClipContainers[i]; - if (!c) { - c = this.tempClipContainers[i] = this.newContainer(); - c.visible = false; - } - this.children[i] = c; - slotContainer.parent = null; - clippingContainer.addChild(slotContainer); - if (clippingAttachment.endSlot == slot.data) { - clippingContainer.renderable = true; - clippingContainer = null; - clippingAttachment = null; - } - } - else { - this.children[i] = slotContainer; - } - } - } - }; - ; - Spine.prototype.setSpriteRegion = function (attachment, sprite, region) { - sprite.region = region; - sprite.texture = region.texture; - if (!region.size) { - sprite.scale.x = attachment.scaleX * attachment.width / region.originalWidth; - sprite.scale.y = -attachment.scaleY * attachment.height / region.originalHeight; - } - else { - sprite.scale.x = region.size.width / region.originalWidth; - sprite.scale.y = -region.size.height / region.originalHeight; - } - }; - Spine.prototype.setMeshRegion = function (attachment, mesh, region) { - mesh.region = region; - mesh.texture = region.texture; - region.texture._updateUvs(); - attachment.updateUVs(region, mesh.uvs); - mesh.dirty++; - }; - Spine.prototype.autoUpdateTransform = function () { - if (Spine.globalAutoUpdate) { - this.lastTime = this.lastTime || Date.now(); - var timeDelta = (Date.now() - this.lastTime) * 0.001; - this.lastTime = Date.now(); - this.update(timeDelta); - } - else { - this.lastTime = 0; - } - PIXI.Container.prototype.updateTransform.call(this); - }; - ; - Spine.prototype.createSprite = function (slot, attachment, defName) { - var region = attachment.region; - if (slot.tempAttachment === attachment) { - region = slot.tempRegion; - slot.tempAttachment = null; - slot.tempRegion = null; - } - var texture = region.texture; - var sprite = this.newSprite(texture); - sprite.rotation = attachment.rotation * pixi_spine.core.MathUtils.degRad; - sprite.anchor.x = 0.5; - sprite.anchor.y = 0.5; - sprite.position.x = attachment.x; - sprite.position.y = attachment.y; - sprite.alpha = attachment.color.a; - sprite.region = attachment.region; - this.setSpriteRegion(attachment, sprite, attachment.region); - slot.sprites = slot.sprites || {}; - slot.sprites[defName] = sprite; - return sprite; - }; - ; - Spine.prototype.createMesh = function (slot, attachment) { - var region = attachment.region; - if (slot.tempAttachment === attachment) { - region = slot.tempRegion; - slot.tempAttachment = null; - slot.tempRegion = null; - } - var strip = this.newMesh(region.texture, new Float32Array(attachment.regionUVs.length), new Float32Array(attachment.regionUVs.length), new Uint16Array(attachment.triangles), PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES); - strip.canvasPadding = 1.5; - strip.alpha = attachment.color.a; - strip.region = attachment.region; - this.setMeshRegion(attachment, strip, region); - slot.meshes = slot.meshes || {}; - slot.meshes[attachment.name] = strip; - return strip; - }; - ; - Spine.prototype.createGraphics = function (slot, clip) { - var graphics = this.newGraphics(); - var poly = new PIXI.Polygon([]); - graphics.clear(); - graphics.beginFill(0xffffff, 1); - graphics.drawPolygon(poly); - graphics.renderable = false; - slot.currentGraphics = graphics; - slot.clippingContainer = this.newContainer(); - slot.clippingContainer.mask = slot.currentGraphics; - return graphics; - }; - Spine.prototype.updateGraphics = function (slot, clip) { - var vertices = slot.currentGraphics.graphicsData[0].shape.points; - var n = clip.worldVerticesLength; - vertices.length = n; - clip.computeWorldVertices(slot, 0, n, vertices, 0, 2); - slot.currentGraphics.dirty++; - slot.currentGraphics.clearDirty++; - }; - Spine.prototype.hackTextureBySlotIndex = function (slotIndex, texture, size) { - if (texture === void 0) { texture = null; } - if (size === void 0) { size = null; } - var slot = this.skeleton.slots[slotIndex]; - if (!slot) { - return false; - } - var attachment = slot.getAttachment(); - var region = attachment.region; - if (texture) { - region = new pixi_spine.core.TextureRegion(); - region.texture = texture; - region.size = size; - } - if (slot.currentSprite && slot.currentSprite.region != region) { - this.setSpriteRegion(attachment, slot.currentSprite, region); - slot.currentSprite.region = region; - } - else if (slot.currentMesh && slot.currentMesh.region != region) { - this.setMeshRegion(attachment, slot.currentMesh, region); - } - else { - slot.tempRegion = region; - slot.tempAttachment = attachment; - } - return true; - }; - Spine.prototype.hackTextureBySlotName = function (slotName, texture, size) { - if (texture === void 0) { texture = null; } - if (size === void 0) { size = null; } - var index = this.skeleton.findSlotIndex(slotName); - if (index == -1) { - return false; - } - return this.hackTextureBySlotIndex(index, texture, size); - }; - Spine.prototype.newContainer = function () { - return new PIXI.Container(); - }; - Spine.prototype.newSprite = function (tex) { - return new SpineSprite(tex); - }; - Spine.prototype.newGraphics = function () { - return new PIXI.Graphics(); - }; - Spine.prototype.newMesh = function (texture, vertices, uvs, indices, drawMode) { - return new SpineMesh(texture, vertices, uvs, indices, drawMode); - }; - Spine.prototype.transformHack = function () { - return 1; - }; - Spine.prototype.hackAttachmentGroups = function (nameSuffix, group, outGroup) { - if (!nameSuffix) { - return; - } - var list_d = [], list_n = []; - for (var i = 0, len = this.skeleton.slots.length; i < len; i++) { - var slot = this.skeleton.slots[i]; - var name_6 = slot.currentSpriteName || slot.currentMeshName || ""; - var target = slot.currentSprite || slot.currentMesh; - if (name_6.endsWith(nameSuffix)) { - target.parentGroup = group; - list_n.push(target); - } - else if (outGroup && target) { - target.parentGroup = outGroup; - list_d.push(target); - } - } - return [list_d, list_n]; - }; - ; - Spine.prototype.destroy = function (options) { - for (var i = 0, n = this.skeleton.slots.length; i < n; i++) { - var slot = this.skeleton.slots[i]; - for (var name_7 in slot.meshes) { - slot.meshes[name_7].destroy(options); - } - slot.meshes = null; - for (var name_8 in slot.sprites) { - slot.sprites[name_8].destroy(options); - } - slot.sprites = null; - } - for (var i = 0, n = this.slotContainers.length; i < n; i++) { - this.slotContainers[i].destroy(options); - } - this.spineData = null; - this.skeleton = null; - this.slotContainers = null; - this.stateData = null; - this.state = null; - this.tempClipContainers = null; - _super.prototype.destroy.call(this, options); - }; - Spine.globalAutoUpdate = true; - Spine.globalDelayLimit = 0; - Spine.clippingPolygon = []; - return Spine; - }(PIXI.Container)); - pixi_spine.Spine = Spine; - function SlotContainerUpdateTransformV3() { - var pt = this.parent.worldTransform; - var wt = this.worldTransform; - var lt = this.localTransform; - wt.a = lt.a * pt.a + lt.b * pt.c; - wt.b = lt.a * pt.b + lt.b * pt.d; - wt.c = lt.c * pt.a + lt.d * pt.c; - wt.d = lt.c * pt.b + lt.d * pt.d; - wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx; - wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty; - this.worldAlpha = this.alpha * this.parent.worldAlpha; - this._currentBounds = null; - } -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - PIXI.spine = pixi_spine; - var TextureProto = PIXI.Texture.prototype; - if (!TextureProto._updateUvs) { - TextureProto._updateUvs = TextureProto.updateUvs; - } -})(pixi_spine || (pixi_spine = {})); -var pixi_spine; -(function (pixi_spine) { - var Resource = PIXI.loaders.Resource; - function isJson(resource) { - return resource.type == Resource.TYPE.JSON; - } - function isBuffer(resource) { - return resource.xhrType == Resource.XHR_RESPONSE_TYPE.BUFFER; - } - Resource.setExtensionXhrType('skel', Resource.XHR_RESPONSE_TYPE.BUFFER); - function atlasParser() { - return function atlasParser(resource, next) { - if (!resource.data) { - return next(); - } - var isJsonSpineModel = isJson(resource) && resource.data.bones; - var isBinarySpineModel = isBuffer(resource) && (resource.extension === 'skel' || resource.metadata.spineMetadata); - if (!isJsonSpineModel && !isBinarySpineModel) { - return next(); - } - var parser = null; - var dataToParse = resource.data; - if (isJsonSpineModel) { - parser = new pixi_spine.core.SkeletonJson(null); - } - else { - parser = new pixi_spine.core.SkeletonBinary(null); - if (resource.data instanceof ArrayBuffer) { - dataToParse = new Uint8Array(resource.data); - } - } - var metadata = resource.metadata || {}; - var metadataSkeletonScale = metadata ? resource.metadata.spineSkeletonScale : null; - if (metadataSkeletonScale) { - parser.scale = metadataSkeletonScale; - } - var metadataAtlas = metadata ? resource.metadata.spineAtlas : null; - if (metadataAtlas === false) { - return next(); - } - if (metadataAtlas && metadataAtlas.pages) { - parser.attachmentLoader = new pixi_spine.core.AtlasAttachmentLoader(metadataAtlas); - resource.spineData = parser.readSkeletonData(dataToParse); - resource.spineAtlas = metadataAtlas; - return next(); - } - var metadataAtlasSuffix = metadata.spineAtlasSuffix || '.atlas'; - var atlasPath = resource.url; - var queryStringPos = atlasPath.indexOf('?'); - if (queryStringPos > 0) { - atlasPath = atlasPath.substr(0, queryStringPos); - } - atlasPath = atlasPath.substr(0, atlasPath.lastIndexOf('.')) + metadataAtlasSuffix; - if (resource.metadata && resource.metadata.spineAtlasFile) { - atlasPath = resource.metadata.spineAtlasFile; - } - atlasPath = atlasPath.replace(this.baseUrl, ''); - var atlasOptions = { - crossOrigin: resource.crossOrigin, - xhrType: Resource.XHR_RESPONSE_TYPE.TEXT, - metadata: metadata.spineMetadata || null, - parentResource: resource - }; - var imageOptions = { - crossOrigin: resource.crossOrigin, - metadata: metadata.imageMetadata || null, - parentResource: resource - }; - var baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1); - baseUrl = baseUrl.replace(this.baseUrl, ''); - var namePrefix = metadata.imageNamePrefix || (resource.name + '_atlas_page_'); - var adapter = metadata.images ? staticImageLoader(metadata.images) - : metadata.image ? staticImageLoader({ 'default': metadata.image }) - : metadata.imageLoader ? metadata.imageLoader(this, namePrefix, baseUrl, imageOptions) - : imageLoaderAdapter(this, namePrefix, baseUrl, imageOptions); - var createSkeletonWithRawAtlas = function (rawData) { - new pixi_spine.core.TextureAtlas(rawData, adapter, function (spineAtlas) { - if (spineAtlas) { - parser.attachmentLoader = new pixi_spine.core.AtlasAttachmentLoader(spineAtlas); - resource.spineData = parser.readSkeletonData(dataToParse); - resource.spineAtlas = spineAtlas; - } - next(); - }); - }; - if (resource.metadata && resource.metadata.atlasRawData) { - createSkeletonWithRawAtlas(resource.metadata.atlasRawData); - } - else { - this.add(resource.name + '_atlas', atlasPath, atlasOptions, function (atlasResource) { - if (!atlasResource.error) { - createSkeletonWithRawAtlas(atlasResource.data); - } - else { - next(); - } - }); - } - }; - } - pixi_spine.atlasParser = atlasParser; - function imageLoaderAdapter(loader, namePrefix, baseUrl, imageOptions) { - if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) { - baseUrl += '/'; - } - return function (line, callback) { - var name = namePrefix + line; - var url = baseUrl + line; - var cachedResource = loader.resources[name]; - if (cachedResource) { - function done() { - callback(cachedResource.texture.baseTexture); - } - if (cachedResource.texture) { - done(); - } - else { - cachedResource.onAfterMiddleware.add(done); - } - } - else { - loader.add(name, url, imageOptions, function (resource) { - if (!resource.error) { - callback(resource.texture.baseTexture); - } - else { - callback(null); - } - }); - } - }; - } - pixi_spine.imageLoaderAdapter = imageLoaderAdapter; - function syncImageLoaderAdapter(baseUrl, crossOrigin) { - if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) { - baseUrl += '/'; - } - return function (line, callback) { - callback(PIXI.BaseTexture.fromImage(line, crossOrigin)); - }; - } - pixi_spine.syncImageLoaderAdapter = syncImageLoaderAdapter; - function staticImageLoader(pages) { - return function (line, callback) { - var page = pages[line] || pages['default']; - if (page && page.baseTexture) - callback(page.baseTexture); - else - callback(page); - }; - } - pixi_spine.staticImageLoader = staticImageLoader; - if (PIXI.loaders.Loader) { - PIXI.loaders.Loader.addPixiMiddleware(atlasParser); - PIXI.loader.use(atlasParser()); - } -})(pixi_spine || (pixi_spine = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var Animation = (function () { + function Animation(name, timelines, duration) { + if (name == null) + throw new Error("name cannot be null."); + if (timelines == null) + throw new Error("timelines cannot be null."); + this.name = name; + this.timelines = timelines; + this.duration = duration; + } + Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) { + if (skeleton == null) + throw new Error("skeleton cannot be null."); + if (loop && this.duration != 0) { + time %= this.duration; + if (lastTime > 0) + lastTime %= this.duration; + } + var timelines = this.timelines; + for (var i = 0, n = timelines.length; i < n; i++) + timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction); + }; + Animation.binarySearch = function (values, target, step) { + if (step === void 0) { step = 1; } + var low = 0; + var high = values.length / step - 2; + if (high == 0) + return step; + var current = high >>> 1; + while (true) { + if (values[(current + 1) * step] <= target) + low = current + 1; + else + high = current; + if (low == high) + return (low + 1) * step; + current = (low + high) >>> 1; + } + }; + Animation.linearSearch = function (values, target, step) { + for (var i = 0, last = values.length - step; i <= last; i += step) + if (values[i] > target) + return i; + return -1; + }; + return Animation; + }()); + core.Animation = Animation; + var MixBlend; + (function (MixBlend) { + MixBlend[MixBlend["setup"] = 0] = "setup"; + MixBlend[MixBlend["first"] = 1] = "first"; + MixBlend[MixBlend["replace"] = 2] = "replace"; + MixBlend[MixBlend["add"] = 3] = "add"; + })(MixBlend = core.MixBlend || (core.MixBlend = {})); + var MixDirection; + (function (MixDirection) { + MixDirection[MixDirection["mixIn"] = 0] = "mixIn"; + MixDirection[MixDirection["mixOut"] = 1] = "mixOut"; + })(MixDirection = core.MixDirection || (core.MixDirection = {})); + var TimelineType; + (function (TimelineType) { + TimelineType[TimelineType["rotate"] = 0] = "rotate"; + TimelineType[TimelineType["translate"] = 1] = "translate"; + TimelineType[TimelineType["scale"] = 2] = "scale"; + TimelineType[TimelineType["shear"] = 3] = "shear"; + TimelineType[TimelineType["attachment"] = 4] = "attachment"; + TimelineType[TimelineType["color"] = 5] = "color"; + TimelineType[TimelineType["deform"] = 6] = "deform"; + TimelineType[TimelineType["event"] = 7] = "event"; + TimelineType[TimelineType["drawOrder"] = 8] = "drawOrder"; + TimelineType[TimelineType["ikConstraint"] = 9] = "ikConstraint"; + TimelineType[TimelineType["transformConstraint"] = 10] = "transformConstraint"; + TimelineType[TimelineType["pathConstraintPosition"] = 11] = "pathConstraintPosition"; + TimelineType[TimelineType["pathConstraintSpacing"] = 12] = "pathConstraintSpacing"; + TimelineType[TimelineType["pathConstraintMix"] = 13] = "pathConstraintMix"; + TimelineType[TimelineType["twoColor"] = 14] = "twoColor"; + })(TimelineType = core.TimelineType || (core.TimelineType = {})); + var CurveTimeline = (function () { + function CurveTimeline(frameCount) { + if (frameCount <= 0) + throw new Error("frameCount must be > 0: " + frameCount); + this.curves = core.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE); + } + CurveTimeline.prototype.getFrameCount = function () { + return this.curves.length / CurveTimeline.BEZIER_SIZE + 1; + }; + CurveTimeline.prototype.setLinear = function (frameIndex) { + this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR; + }; + CurveTimeline.prototype.setStepped = function (frameIndex) { + this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED; + }; + CurveTimeline.prototype.getCurveType = function (frameIndex) { + var index = frameIndex * CurveTimeline.BEZIER_SIZE; + if (index == this.curves.length) + return CurveTimeline.LINEAR; + var type = this.curves[index]; + if (type == CurveTimeline.LINEAR) + return CurveTimeline.LINEAR; + if (type == CurveTimeline.STEPPED) + return CurveTimeline.STEPPED; + return CurveTimeline.BEZIER; + }; + CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) { + var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03; + var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006; + var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy; + var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667; + var i = frameIndex * CurveTimeline.BEZIER_SIZE; + var curves = this.curves; + curves[i++] = CurveTimeline.BEZIER; + var x = dfx, y = dfy; + for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) { + curves[i] = x; + curves[i + 1] = y; + dfx += ddfx; + dfy += ddfy; + ddfx += dddfx; + ddfy += dddfy; + x += dfx; + y += dfy; + } + }; + CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) { + percent = core.MathUtils.clamp(percent, 0, 1); + var curves = this.curves; + var i = frameIndex * CurveTimeline.BEZIER_SIZE; + var type = curves[i]; + if (type == CurveTimeline.LINEAR) + return percent; + if (type == CurveTimeline.STEPPED) + return 0; + i++; + var x = 0; + for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) { + x = curves[i]; + if (x >= percent) { + var prevX = void 0, prevY = void 0; + if (i == start) { + prevX = 0; + prevY = 0; + } + else { + prevX = curves[i - 2]; + prevY = curves[i - 1]; + } + return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX); + } + } + var y = curves[i - 1]; + return y + (1 - y) * (percent - x) / (1 - x); + }; + CurveTimeline.LINEAR = 0; + CurveTimeline.STEPPED = 1; + CurveTimeline.BEZIER = 2; + CurveTimeline.BEZIER_SIZE = 10 * 2 - 1; + return CurveTimeline; + }()); + core.CurveTimeline = CurveTimeline; + var RotateTimeline = (function (_super) { + __extends(RotateTimeline, _super); + function RotateTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount << 1); + return _this; + } + RotateTimeline.prototype.getPropertyId = function () { + return (TimelineType.rotate << 24) + this.boneIndex; + }; + RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) { + frameIndex <<= 1; + this.frames[frameIndex] = time; + this.frames[frameIndex + RotateTimeline.ROTATION] = degrees; + }; + RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { + var frames = this.frames; + var bone = skeleton.bones[this.boneIndex]; + if (!bone.active) + return; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + bone.rotation = bone.data.rotation; + return; + case MixBlend.first: + var r_1 = bone.data.rotation - bone.rotation; + bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha; + } + return; + } + if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { + var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION]; + switch (blend) { + case MixBlend.setup: + bone.rotation = bone.data.rotation + r_2 * alpha; + break; + case MixBlend.first: + case MixBlend.replace: + r_2 += bone.data.rotation - bone.rotation; + r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360; + case MixBlend.add: + bone.rotation += r_2 * alpha; + } + return; + } + var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES); + var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime)); + var r = frames[frame + RotateTimeline.ROTATION] - prevRotation; + r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent; + switch (blend) { + case MixBlend.setup: + bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha; + break; + case MixBlend.first: + case MixBlend.replace: + r += bone.data.rotation - bone.rotation; + case MixBlend.add: + bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha; + } + }; + RotateTimeline.ENTRIES = 2; + RotateTimeline.PREV_TIME = -2; + RotateTimeline.PREV_ROTATION = -1; + RotateTimeline.ROTATION = 1; + return RotateTimeline; + }(CurveTimeline)); + core.RotateTimeline = RotateTimeline; + var TranslateTimeline = (function (_super) { + __extends(TranslateTimeline, _super); + function TranslateTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES); + return _this; + } + TranslateTimeline.prototype.getPropertyId = function () { + return (TimelineType.translate << 24) + this.boneIndex; + }; + TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) { + frameIndex *= TranslateTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + TranslateTimeline.X] = x; + this.frames[frameIndex + TranslateTimeline.Y] = y; + }; + TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { + var frames = this.frames; + var bone = skeleton.bones[this.boneIndex]; + if (!bone.active) + return; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + bone.x = bone.data.x; + bone.y = bone.data.y; + return; + case MixBlend.first: + bone.x += (bone.data.x - bone.x) * alpha; + bone.y += (bone.data.y - bone.y) * alpha; + } + return; + } + var x = 0, y = 0; + if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { + x = frames[frames.length + TranslateTimeline.PREV_X]; + y = frames[frames.length + TranslateTimeline.PREV_Y]; + } + else { + var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES); + x = frames[frame + TranslateTimeline.PREV_X]; + y = frames[frame + TranslateTimeline.PREV_Y]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime)); + x += (frames[frame + TranslateTimeline.X] - x) * percent; + y += (frames[frame + TranslateTimeline.Y] - y) * percent; + } + switch (blend) { + case MixBlend.setup: + bone.x = bone.data.x + x * alpha; + bone.y = bone.data.y + y * alpha; + break; + case MixBlend.first: + case MixBlend.replace: + bone.x += (bone.data.x + x - bone.x) * alpha; + bone.y += (bone.data.y + y - bone.y) * alpha; + break; + case MixBlend.add: + bone.x += x * alpha; + bone.y += y * alpha; + } + }; + TranslateTimeline.ENTRIES = 3; + TranslateTimeline.PREV_TIME = -3; + TranslateTimeline.PREV_X = -2; + TranslateTimeline.PREV_Y = -1; + TranslateTimeline.X = 1; + TranslateTimeline.Y = 2; + return TranslateTimeline; + }(CurveTimeline)); + core.TranslateTimeline = TranslateTimeline; + var ScaleTimeline = (function (_super) { + __extends(ScaleTimeline, _super); + function ScaleTimeline(frameCount) { + return _super.call(this, frameCount) || this; + } + ScaleTimeline.prototype.getPropertyId = function () { + return (TimelineType.scale << 24) + this.boneIndex; + }; + ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { + var frames = this.frames; + var bone = skeleton.bones[this.boneIndex]; + if (!bone.active) + return; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + bone.scaleX = bone.data.scaleX; + bone.scaleY = bone.data.scaleY; + return; + case MixBlend.first: + bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha; + } + return; + } + var x = 0, y = 0; + if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { + x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX; + y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY; + } + else { + var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES); + x = frames[frame + ScaleTimeline.PREV_X]; + y = frames[frame + ScaleTimeline.PREV_Y]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime)); + x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX; + y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY; + } + if (alpha == 1) { + if (blend == MixBlend.add) { + bone.scaleX += x - bone.data.scaleX; + bone.scaleY += y - bone.data.scaleY; + } + else { + bone.scaleX = x; + bone.scaleY = y; + } + } + else { + var bx = 0, by = 0; + if (direction == MixDirection.mixOut) { + switch (blend) { + case MixBlend.setup: + bx = bone.data.scaleX; + by = bone.data.scaleY; + bone.scaleX = bx + (Math.abs(x) * core.MathUtils.signum(bx) - bx) * alpha; + bone.scaleY = by + (Math.abs(y) * core.MathUtils.signum(by) - by) * alpha; + break; + case MixBlend.first: + case MixBlend.replace: + bx = bone.scaleX; + by = bone.scaleY; + bone.scaleX = bx + (Math.abs(x) * core.MathUtils.signum(bx) - bx) * alpha; + bone.scaleY = by + (Math.abs(y) * core.MathUtils.signum(by) - by) * alpha; + break; + case MixBlend.add: + bx = bone.scaleX; + by = bone.scaleY; + bone.scaleX = bx + (Math.abs(x) * core.MathUtils.signum(bx) - bone.data.scaleX) * alpha; + bone.scaleY = by + (Math.abs(y) * core.MathUtils.signum(by) - bone.data.scaleY) * alpha; + } + } + else { + switch (blend) { + case MixBlend.setup: + bx = Math.abs(bone.data.scaleX) * core.MathUtils.signum(x); + by = Math.abs(bone.data.scaleY) * core.MathUtils.signum(y); + bone.scaleX = bx + (x - bx) * alpha; + bone.scaleY = by + (y - by) * alpha; + break; + case MixBlend.first: + case MixBlend.replace: + bx = Math.abs(bone.scaleX) * core.MathUtils.signum(x); + by = Math.abs(bone.scaleY) * core.MathUtils.signum(y); + bone.scaleX = bx + (x - bx) * alpha; + bone.scaleY = by + (y - by) * alpha; + break; + case MixBlend.add: + bx = core.MathUtils.signum(x); + by = core.MathUtils.signum(y); + bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha; + bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha; + } + } + } + }; + return ScaleTimeline; + }(TranslateTimeline)); + core.ScaleTimeline = ScaleTimeline; + var ShearTimeline = (function (_super) { + __extends(ShearTimeline, _super); + function ShearTimeline(frameCount) { + return _super.call(this, frameCount) || this; + } + ShearTimeline.prototype.getPropertyId = function () { + return (TimelineType.shear << 24) + this.boneIndex; + }; + ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { + var frames = this.frames; + var bone = skeleton.bones[this.boneIndex]; + if (!bone.active) + return; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + bone.shearX = bone.data.shearX; + bone.shearY = bone.data.shearY; + return; + case MixBlend.first: + bone.shearX += (bone.data.shearX - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY - bone.shearY) * alpha; + } + return; + } + var x = 0, y = 0; + if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { + x = frames[frames.length + ShearTimeline.PREV_X]; + y = frames[frames.length + ShearTimeline.PREV_Y]; + } + else { + var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES); + x = frames[frame + ShearTimeline.PREV_X]; + y = frames[frame + ShearTimeline.PREV_Y]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime)); + x = x + (frames[frame + ShearTimeline.X] - x) * percent; + y = y + (frames[frame + ShearTimeline.Y] - y) * percent; + } + switch (blend) { + case MixBlend.setup: + bone.shearX = bone.data.shearX + x * alpha; + bone.shearY = bone.data.shearY + y * alpha; + break; + case MixBlend.first: + case MixBlend.replace: + bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha; + break; + case MixBlend.add: + bone.shearX += x * alpha; + bone.shearY += y * alpha; + } + }; + return ShearTimeline; + }(TranslateTimeline)); + core.ShearTimeline = ShearTimeline; + var ColorTimeline = (function (_super) { + __extends(ColorTimeline, _super); + function ColorTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES); + return _this; + } + ColorTimeline.prototype.getPropertyId = function () { + return (TimelineType.color << 24) + this.slotIndex; + }; + ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) { + frameIndex *= ColorTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + ColorTimeline.R] = r; + this.frames[frameIndex + ColorTimeline.G] = g; + this.frames[frameIndex + ColorTimeline.B] = b; + this.frames[frameIndex + ColorTimeline.A] = a; + }; + ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { + var slot = skeleton.slots[this.slotIndex]; + if (!slot.bone.active) + return; + var frames = this.frames; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + slot.color.setFromColor(slot.data.color); + return; + case MixBlend.first: + var color = slot.color, setup = slot.data.color; + color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha); + } + return; + } + var r = 0, g = 0, b = 0, a = 0; + if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { + var i = frames.length; + r = frames[i + ColorTimeline.PREV_R]; + g = frames[i + ColorTimeline.PREV_G]; + b = frames[i + ColorTimeline.PREV_B]; + a = frames[i + ColorTimeline.PREV_A]; + } + else { + var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES); + r = frames[frame + ColorTimeline.PREV_R]; + g = frames[frame + ColorTimeline.PREV_G]; + b = frames[frame + ColorTimeline.PREV_B]; + a = frames[frame + ColorTimeline.PREV_A]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime)); + r += (frames[frame + ColorTimeline.R] - r) * percent; + g += (frames[frame + ColorTimeline.G] - g) * percent; + b += (frames[frame + ColorTimeline.B] - b) * percent; + a += (frames[frame + ColorTimeline.A] - a) * percent; + } + if (alpha == 1) + slot.color.set(r, g, b, a); + else { + var color = slot.color; + if (blend == MixBlend.setup) + color.setFromColor(slot.data.color); + color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha); + } + }; + ColorTimeline.ENTRIES = 5; + ColorTimeline.PREV_TIME = -5; + ColorTimeline.PREV_R = -4; + ColorTimeline.PREV_G = -3; + ColorTimeline.PREV_B = -2; + ColorTimeline.PREV_A = -1; + ColorTimeline.R = 1; + ColorTimeline.G = 2; + ColorTimeline.B = 3; + ColorTimeline.A = 4; + return ColorTimeline; + }(CurveTimeline)); + core.ColorTimeline = ColorTimeline; + var TwoColorTimeline = (function (_super) { + __extends(TwoColorTimeline, _super); + function TwoColorTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES); + return _this; + } + TwoColorTimeline.prototype.getPropertyId = function () { + return (TimelineType.twoColor << 24) + this.slotIndex; + }; + TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) { + frameIndex *= TwoColorTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + TwoColorTimeline.R] = r; + this.frames[frameIndex + TwoColorTimeline.G] = g; + this.frames[frameIndex + TwoColorTimeline.B] = b; + this.frames[frameIndex + TwoColorTimeline.A] = a; + this.frames[frameIndex + TwoColorTimeline.R2] = r2; + this.frames[frameIndex + TwoColorTimeline.G2] = g2; + this.frames[frameIndex + TwoColorTimeline.B2] = b2; + }; + TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { + var slot = skeleton.slots[this.slotIndex]; + if (!slot.bone.active) + return; + var frames = this.frames; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + slot.color.setFromColor(slot.data.color); + slot.darkColor.setFromColor(slot.data.darkColor); + return; + case MixBlend.first: + var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor; + light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha); + dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0); + } + return; + } + var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0; + if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { + var i = frames.length; + r = frames[i + TwoColorTimeline.PREV_R]; + g = frames[i + TwoColorTimeline.PREV_G]; + b = frames[i + TwoColorTimeline.PREV_B]; + a = frames[i + TwoColorTimeline.PREV_A]; + r2 = frames[i + TwoColorTimeline.PREV_R2]; + g2 = frames[i + TwoColorTimeline.PREV_G2]; + b2 = frames[i + TwoColorTimeline.PREV_B2]; + } + else { + var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES); + r = frames[frame + TwoColorTimeline.PREV_R]; + g = frames[frame + TwoColorTimeline.PREV_G]; + b = frames[frame + TwoColorTimeline.PREV_B]; + a = frames[frame + TwoColorTimeline.PREV_A]; + r2 = frames[frame + TwoColorTimeline.PREV_R2]; + g2 = frames[frame + TwoColorTimeline.PREV_G2]; + b2 = frames[frame + TwoColorTimeline.PREV_B2]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime)); + r += (frames[frame + TwoColorTimeline.R] - r) * percent; + g += (frames[frame + TwoColorTimeline.G] - g) * percent; + b += (frames[frame + TwoColorTimeline.B] - b) * percent; + a += (frames[frame + TwoColorTimeline.A] - a) * percent; + r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent; + g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent; + b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent; + } + if (alpha == 1) { + slot.color.set(r, g, b, a); + slot.darkColor.set(r2, g2, b2, 1); + } + else { + var light = slot.color, dark = slot.darkColor; + if (blend == MixBlend.setup) { + light.setFromColor(slot.data.color); + dark.setFromColor(slot.data.darkColor); + } + light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha); + dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0); + } + }; + TwoColorTimeline.ENTRIES = 8; + TwoColorTimeline.PREV_TIME = -8; + TwoColorTimeline.PREV_R = -7; + TwoColorTimeline.PREV_G = -6; + TwoColorTimeline.PREV_B = -5; + TwoColorTimeline.PREV_A = -4; + TwoColorTimeline.PREV_R2 = -3; + TwoColorTimeline.PREV_G2 = -2; + TwoColorTimeline.PREV_B2 = -1; + TwoColorTimeline.R = 1; + TwoColorTimeline.G = 2; + TwoColorTimeline.B = 3; + TwoColorTimeline.A = 4; + TwoColorTimeline.R2 = 5; + TwoColorTimeline.G2 = 6; + TwoColorTimeline.B2 = 7; + return TwoColorTimeline; + }(CurveTimeline)); + core.TwoColorTimeline = TwoColorTimeline; + var AttachmentTimeline = (function () { + function AttachmentTimeline(frameCount) { + this.frames = core.Utils.newFloatArray(frameCount); + this.attachmentNames = new Array(frameCount); + } + AttachmentTimeline.prototype.getPropertyId = function () { + return (TimelineType.attachment << 24) + this.slotIndex; + }; + AttachmentTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) { + this.frames[frameIndex] = time; + this.attachmentNames[frameIndex] = attachmentName; + }; + AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) { + var slot = skeleton.slots[this.slotIndex]; + if (!slot.bone.active) + return; + if (direction == MixDirection.mixOut && blend == MixBlend.setup) { + var attachmentName_1 = slot.data.attachmentName; + slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + return; + } + var frames = this.frames; + if (time < frames[0]) { + if (blend == MixBlend.setup || blend == MixBlend.first) { + var attachmentName_2 = slot.data.attachmentName; + slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); + } + return; + } + var frameIndex = 0; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = Animation.binarySearch(frames, time, 1) - 1; + var attachmentName = this.attachmentNames[frameIndex]; + skeleton.slots[this.slotIndex] + .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); + }; + return AttachmentTimeline; + }()); + core.AttachmentTimeline = AttachmentTimeline; + var zeros = null; + var DeformTimeline = (function (_super) { + __extends(DeformTimeline, _super); + function DeformTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount); + _this.frameVertices = new Array(frameCount); + if (zeros == null) + zeros = core.Utils.newFloatArray(64); + return _this; + } + DeformTimeline.prototype.getPropertyId = function () { + return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex; + }; + DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) { + this.frames[frameIndex] = time; + this.frameVertices[frameIndex] = vertices; + }; + DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { + var slot = skeleton.slots[this.slotIndex]; + if (!slot.bone.active) + return; + var slotAttachment = slot.getAttachment(); + if (!(slotAttachment instanceof core.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment)) + return; + var deformArray = slot.deform; + if (deformArray.length == 0) + blend = MixBlend.setup; + var frameVertices = this.frameVertices; + var vertexCount = frameVertices[0].length; + var frames = this.frames; + if (time < frames[0]) { + var vertexAttachment = slotAttachment; + switch (blend) { + case MixBlend.setup: + deformArray.length = 0; + return; + case MixBlend.first: + if (alpha == 1) { + deformArray.length = 0; + break; + } + var deform_1 = core.Utils.setArraySize(deformArray, vertexCount); + if (vertexAttachment.bones == null) { + var setupVertices = vertexAttachment.vertices; + for (var i = 0; i < vertexCount; i++) + deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha; + } + else { + alpha = 1 - alpha; + for (var i = 0; i < vertexCount; i++) + deform_1[i] *= alpha; + } + } + return; + } + var deform = core.Utils.setArraySize(deformArray, vertexCount); + if (time >= frames[frames.length - 1]) { + var lastVertices = frameVertices[frames.length - 1]; + if (alpha == 1) { + if (blend == MixBlend.add) { + var vertexAttachment = slotAttachment; + if (vertexAttachment.bones == null) { + var setupVertices = vertexAttachment.vertices; + for (var i_1 = 0; i_1 < vertexCount; i_1++) { + deform[i_1] += lastVertices[i_1] - setupVertices[i_1]; + } + } + else { + for (var i_2 = 0; i_2 < vertexCount; i_2++) + deform[i_2] += lastVertices[i_2]; + } + } + else { + core.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount); + } + } + else { + switch (blend) { + case MixBlend.setup: { + var vertexAttachment_1 = slotAttachment; + if (vertexAttachment_1.bones == null) { + var setupVertices = vertexAttachment_1.vertices; + for (var i_3 = 0; i_3 < vertexCount; i_3++) { + var setup = setupVertices[i_3]; + deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha; + } + } + else { + for (var i_4 = 0; i_4 < vertexCount; i_4++) + deform[i_4] = lastVertices[i_4] * alpha; + } + break; + } + case MixBlend.first: + case MixBlend.replace: + for (var i_5 = 0; i_5 < vertexCount; i_5++) + deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; + case MixBlend.add: + var vertexAttachment = slotAttachment; + if (vertexAttachment.bones == null) { + var setupVertices = vertexAttachment.vertices; + for (var i_6 = 0; i_6 < vertexCount; i_6++) { + deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha; + } + } + else { + for (var i_7 = 0; i_7 < vertexCount; i_7++) + deform[i_7] += lastVertices[i_7] * alpha; + } + } + } + return; + } + var frame = Animation.binarySearch(frames, time); + var prevVertices = frameVertices[frame - 1]; + var nextVertices = frameVertices[frame]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime)); + if (alpha == 1) { + if (blend == MixBlend.add) { + var vertexAttachment = slotAttachment; + if (vertexAttachment.bones == null) { + var setupVertices = vertexAttachment.vertices; + for (var i_8 = 0; i_8 < vertexCount; i_8++) { + var prev = prevVertices[i_8]; + deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8]; + } + } + else { + for (var i_9 = 0; i_9 < vertexCount; i_9++) { + var prev = prevVertices[i_9]; + deform[i_9] += prev + (nextVertices[i_9] - prev) * percent; + } + } + } + else { + for (var i_10 = 0; i_10 < vertexCount; i_10++) { + var prev = prevVertices[i_10]; + deform[i_10] = prev + (nextVertices[i_10] - prev) * percent; + } + } + } + else { + switch (blend) { + case MixBlend.setup: { + var vertexAttachment_2 = slotAttachment; + if (vertexAttachment_2.bones == null) { + var setupVertices = vertexAttachment_2.vertices; + for (var i_11 = 0; i_11 < vertexCount; i_11++) { + var prev = prevVertices[i_11], setup = setupVertices[i_11]; + deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha; + } + } + else { + for (var i_12 = 0; i_12 < vertexCount; i_12++) { + var prev = prevVertices[i_12]; + deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha; + } + } + break; + } + case MixBlend.first: + case MixBlend.replace: + for (var i_13 = 0; i_13 < vertexCount; i_13++) { + var prev = prevVertices[i_13]; + deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha; + } + break; + case MixBlend.add: + var vertexAttachment = slotAttachment; + if (vertexAttachment.bones == null) { + var setupVertices = vertexAttachment.vertices; + for (var i_14 = 0; i_14 < vertexCount; i_14++) { + var prev = prevVertices[i_14]; + deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha; + } + } + else { + for (var i_15 = 0; i_15 < vertexCount; i_15++) { + var prev = prevVertices[i_15]; + deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha; + } + } + } + } + }; + return DeformTimeline; + }(CurveTimeline)); + core.DeformTimeline = DeformTimeline; + var EventTimeline = (function () { + function EventTimeline(frameCount) { + this.frames = core.Utils.newFloatArray(frameCount); + this.events = new Array(frameCount); + } + EventTimeline.prototype.getPropertyId = function () { + return TimelineType.event << 24; + }; + EventTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + EventTimeline.prototype.setFrame = function (frameIndex, event) { + this.frames[frameIndex] = event.time; + this.events[frameIndex] = event; + }; + EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { + if (firedEvents == null) + return; + var frames = this.frames; + var frameCount = this.frames.length; + if (lastTime > time) { + this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction); + lastTime = -1; + } + else if (lastTime >= frames[frameCount - 1]) + return; + if (time < frames[0]) + return; + var frame = 0; + if (lastTime < frames[0]) + frame = 0; + else { + frame = Animation.binarySearch(frames, lastTime); + var frameTime = frames[frame]; + while (frame > 0) { + if (frames[frame - 1] != frameTime) + break; + frame--; + } + } + for (; frame < frameCount && time >= frames[frame]; frame++) + firedEvents.push(this.events[frame]); + }; + return EventTimeline; + }()); + core.EventTimeline = EventTimeline; + var DrawOrderTimeline = (function () { + function DrawOrderTimeline(frameCount) { + this.frames = core.Utils.newFloatArray(frameCount); + this.drawOrders = new Array(frameCount); + } + DrawOrderTimeline.prototype.getPropertyId = function () { + return TimelineType.drawOrder << 24; + }; + DrawOrderTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) { + this.frames[frameIndex] = time; + this.drawOrders[frameIndex] = drawOrder; + }; + DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { + var drawOrder = skeleton.drawOrder; + var slots = skeleton.slots; + if (direction == MixDirection.mixOut && blend == MixBlend.setup) { + core.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + return; + } + var frames = this.frames; + if (time < frames[0]) { + if (blend == MixBlend.setup || blend == MixBlend.first) + core.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + return; + } + var frame = 0; + if (time >= frames[frames.length - 1]) + frame = frames.length - 1; + else + frame = Animation.binarySearch(frames, time) - 1; + var drawOrderToSetupIndex = this.drawOrders[frame]; + if (drawOrderToSetupIndex == null) + core.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length); + else { + for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++) + drawOrder[i] = slots[drawOrderToSetupIndex[i]]; + } + }; + return DrawOrderTimeline; + }()); + core.DrawOrderTimeline = DrawOrderTimeline; + var IkConstraintTimeline = (function (_super) { + __extends(IkConstraintTimeline, _super); + function IkConstraintTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES); + return _this; + } + IkConstraintTimeline.prototype.getPropertyId = function () { + return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex; + }; + IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) { + frameIndex *= IkConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + IkConstraintTimeline.MIX] = mix; + this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness; + this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection; + this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0; + this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0; + }; + IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { + var frames = this.frames; + var constraint = skeleton.ikConstraints[this.ikConstraintIndex]; + if (!constraint.active) + return; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + constraint.mix = constraint.data.mix; + constraint.softness = constraint.data.softness; + constraint.bendDirection = constraint.data.bendDirection; + constraint.compress = constraint.data.compress; + constraint.stretch = constraint.data.stretch; + return; + case MixBlend.first: + constraint.mix += (constraint.data.mix - constraint.mix) * alpha; + constraint.softness += (constraint.data.softness - constraint.softness) * alpha; + constraint.bendDirection = constraint.data.bendDirection; + constraint.compress = constraint.data.compress; + constraint.stretch = constraint.data.stretch; + } + return; + } + if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { + if (blend == MixBlend.setup) { + constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha; + constraint.softness = constraint.data.softness + + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha; + if (direction == MixDirection.mixOut) { + constraint.bendDirection = constraint.data.bendDirection; + constraint.compress = constraint.data.compress; + constraint.stretch = constraint.data.stretch; + } + else { + constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]; + constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0; + constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0; + } + } + else { + constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha; + constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha; + if (direction == MixDirection.mixIn) { + constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]; + constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0; + constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0; + } + } + return; + } + var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES); + var mix = frames[frame + IkConstraintTimeline.PREV_MIX]; + var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime)); + if (blend == MixBlend.setup) { + constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha; + constraint.softness = constraint.data.softness + + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha; + if (direction == MixDirection.mixOut) { + constraint.bendDirection = constraint.data.bendDirection; + constraint.compress = constraint.data.compress; + constraint.stretch = constraint.data.stretch; + } + else { + constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]; + constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0; + constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0; + } + } + else { + constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha; + constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha; + if (direction == MixDirection.mixIn) { + constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]; + constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0; + constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0; + } + } + }; + IkConstraintTimeline.ENTRIES = 6; + IkConstraintTimeline.PREV_TIME = -6; + IkConstraintTimeline.PREV_MIX = -5; + IkConstraintTimeline.PREV_SOFTNESS = -4; + IkConstraintTimeline.PREV_BEND_DIRECTION = -3; + IkConstraintTimeline.PREV_COMPRESS = -2; + IkConstraintTimeline.PREV_STRETCH = -1; + IkConstraintTimeline.MIX = 1; + IkConstraintTimeline.SOFTNESS = 2; + IkConstraintTimeline.BEND_DIRECTION = 3; + IkConstraintTimeline.COMPRESS = 4; + IkConstraintTimeline.STRETCH = 5; + return IkConstraintTimeline; + }(CurveTimeline)); + core.IkConstraintTimeline = IkConstraintTimeline; + var TransformConstraintTimeline = (function (_super) { + __extends(TransformConstraintTimeline, _super); + function TransformConstraintTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES); + return _this; + } + TransformConstraintTimeline.prototype.getPropertyId = function () { + return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex; + }; + TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) { + frameIndex *= TransformConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix; + this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix; + this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix; + this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix; + }; + TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { + var frames = this.frames; + var constraint = skeleton.transformConstraints[this.transformConstraintIndex]; + if (!constraint.active) + return; + if (time < frames[0]) { + var data = constraint.data; + switch (blend) { + case MixBlend.setup: + constraint.rotateMix = data.rotateMix; + constraint.translateMix = data.translateMix; + constraint.scaleMix = data.scaleMix; + constraint.shearMix = data.shearMix; + return; + case MixBlend.first: + constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha; + constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha; + constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha; + constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha; + } + return; + } + var rotate = 0, translate = 0, scale = 0, shear = 0; + if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { + var i = frames.length; + rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE]; + translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE]; + scale = frames[i + TransformConstraintTimeline.PREV_SCALE]; + shear = frames[i + TransformConstraintTimeline.PREV_SHEAR]; + } + else { + var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES); + rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE]; + translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE]; + scale = frames[frame + TransformConstraintTimeline.PREV_SCALE]; + shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime)); + rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent; + translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent; + scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent; + shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent; + } + if (blend == MixBlend.setup) { + var data = constraint.data; + constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha; + constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha; + constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha; + constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha; + } + else { + constraint.rotateMix += (rotate - constraint.rotateMix) * alpha; + constraint.translateMix += (translate - constraint.translateMix) * alpha; + constraint.scaleMix += (scale - constraint.scaleMix) * alpha; + constraint.shearMix += (shear - constraint.shearMix) * alpha; + } + }; + TransformConstraintTimeline.ENTRIES = 5; + TransformConstraintTimeline.PREV_TIME = -5; + TransformConstraintTimeline.PREV_ROTATE = -4; + TransformConstraintTimeline.PREV_TRANSLATE = -3; + TransformConstraintTimeline.PREV_SCALE = -2; + TransformConstraintTimeline.PREV_SHEAR = -1; + TransformConstraintTimeline.ROTATE = 1; + TransformConstraintTimeline.TRANSLATE = 2; + TransformConstraintTimeline.SCALE = 3; + TransformConstraintTimeline.SHEAR = 4; + return TransformConstraintTimeline; + }(CurveTimeline)); + core.TransformConstraintTimeline = TransformConstraintTimeline; + var PathConstraintPositionTimeline = (function (_super) { + __extends(PathConstraintPositionTimeline, _super); + function PathConstraintPositionTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES); + return _this; + } + PathConstraintPositionTimeline.prototype.getPropertyId = function () { + return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex; + }; + PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) { + frameIndex *= PathConstraintPositionTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value; + }; + PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { + var frames = this.frames; + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (!constraint.active) + return; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + constraint.position = constraint.data.position; + return; + case MixBlend.first: + constraint.position += (constraint.data.position - constraint.position) * alpha; + } + return; + } + var position = 0; + if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) + position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE]; + else { + var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES); + position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime)); + position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent; + } + if (blend == MixBlend.setup) + constraint.position = constraint.data.position + (position - constraint.data.position) * alpha; + else + constraint.position += (position - constraint.position) * alpha; + }; + PathConstraintPositionTimeline.ENTRIES = 2; + PathConstraintPositionTimeline.PREV_TIME = -2; + PathConstraintPositionTimeline.PREV_VALUE = -1; + PathConstraintPositionTimeline.VALUE = 1; + return PathConstraintPositionTimeline; + }(CurveTimeline)); + core.PathConstraintPositionTimeline = PathConstraintPositionTimeline; + var PathConstraintSpacingTimeline = (function (_super) { + __extends(PathConstraintSpacingTimeline, _super); + function PathConstraintSpacingTimeline(frameCount) { + return _super.call(this, frameCount) || this; + } + PathConstraintSpacingTimeline.prototype.getPropertyId = function () { + return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex; + }; + PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { + var frames = this.frames; + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (!constraint.active) + return; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + constraint.spacing = constraint.data.spacing; + return; + case MixBlend.first: + constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha; + } + return; + } + var spacing = 0; + if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) + spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE]; + else { + var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES); + spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime)); + spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent; + } + if (blend == MixBlend.setup) + constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha; + else + constraint.spacing += (spacing - constraint.spacing) * alpha; + }; + return PathConstraintSpacingTimeline; + }(PathConstraintPositionTimeline)); + core.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline; + var PathConstraintMixTimeline = (function (_super) { + __extends(PathConstraintMixTimeline, _super); + function PathConstraintMixTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = core.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES); + return _this; + } + PathConstraintMixTimeline.prototype.getPropertyId = function () { + return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex; + }; + PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) { + frameIndex *= PathConstraintMixTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix; + this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix; + }; + PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { + var frames = this.frames; + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (!constraint.active) + return; + if (time < frames[0]) { + switch (blend) { + case MixBlend.setup: + constraint.rotateMix = constraint.data.rotateMix; + constraint.translateMix = constraint.data.translateMix; + return; + case MixBlend.first: + constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha; + constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha; + } + return; + } + var rotate = 0, translate = 0; + if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { + rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE]; + translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE]; + } + else { + var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES); + rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE]; + translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime)); + rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent; + translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent; + } + if (blend == MixBlend.setup) { + constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha; + constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha; + } + else { + constraint.rotateMix += (rotate - constraint.rotateMix) * alpha; + constraint.translateMix += (translate - constraint.translateMix) * alpha; + } + }; + PathConstraintMixTimeline.ENTRIES = 3; + PathConstraintMixTimeline.PREV_TIME = -3; + PathConstraintMixTimeline.PREV_ROTATE = -2; + PathConstraintMixTimeline.PREV_TRANSLATE = -1; + PathConstraintMixTimeline.ROTATE = 1; + PathConstraintMixTimeline.TRANSLATE = 2; + return PathConstraintMixTimeline; + }(CurveTimeline)); + core.PathConstraintMixTimeline = PathConstraintMixTimeline; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var AnimationState = (function () { + function AnimationState(data) { + this.tracks = new Array(); + this.events = new Array(); + this.listeners = new Array(); + this.queue = new EventQueue(this); + this.propertyIDs = new core.IntSet(); + this.animationsChanged = false; + this.timeScale = 1; + this.trackEntryPool = new core.Pool(function () { return new TrackEntry(); }); + this.data = data; + } + AnimationState.prototype.update = function (delta) { + delta *= this.timeScale; + var tracks = this.tracks; + for (var i = 0, n = tracks.length; i < n; i++) { + var current = tracks[i]; + if (current == null) + continue; + current.animationLast = current.nextAnimationLast; + current.trackLast = current.nextTrackLast; + var currentDelta = delta * current.timeScale; + if (current.delay > 0) { + current.delay -= currentDelta; + if (current.delay > 0) + continue; + currentDelta = -current.delay; + current.delay = 0; + } + var next = current.next; + if (next != null) { + var nextTime = current.trackLast - next.delay; + if (nextTime >= 0) { + next.delay = 0; + next.trackTime = current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale; + current.trackTime += currentDelta; + this.setCurrent(i, next, true); + while (next.mixingFrom != null) { + next.mixTime += delta; + next = next.mixingFrom; + } + continue; + } + } + else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) { + tracks[i] = null; + this.queue.end(current); + this.disposeNext(current); + continue; + } + if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) { + var from = current.mixingFrom; + current.mixingFrom = null; + if (from != null) + from.mixingTo = null; + while (from != null) { + this.queue.end(from); + from = from.mixingFrom; + } + } + current.trackTime += currentDelta; + } + this.queue.drain(); + }; + AnimationState.prototype.updateMixingFrom = function (to, delta) { + var from = to.mixingFrom; + if (from == null) + return true; + var finished = this.updateMixingFrom(from, delta); + from.animationLast = from.nextAnimationLast; + from.trackLast = from.nextTrackLast; + if (to.mixTime > 0 && to.mixTime >= to.mixDuration) { + if (from.totalAlpha == 0 || to.mixDuration == 0) { + to.mixingFrom = from.mixingFrom; + if (from.mixingFrom != null) + from.mixingFrom.mixingTo = to; + to.interruptAlpha = from.interruptAlpha; + this.queue.end(from); + } + return finished; + } + from.trackTime += delta * from.timeScale; + to.mixTime += delta; + return false; + }; + AnimationState.prototype.apply = function (skeleton) { + if (skeleton == null) + throw new Error("skeleton cannot be null."); + if (this.animationsChanged) + this._animationsChanged(); + var events = this.events; + var tracks = this.tracks; + var applied = false; + for (var i = 0, n = tracks.length; i < n; i++) { + var current = tracks[i]; + if (current == null || current.delay > 0) + continue; + applied = true; + var blend = i == 0 ? core.MixBlend.first : current.mixBlend; + var mix = current.alpha; + if (current.mixingFrom != null) + mix *= this.applyMixingFrom(current, skeleton, blend); + else if (current.trackTime >= current.trackEnd && current.next == null) + mix = 0; + var animationLast = current.animationLast, animationTime = current.getAnimationTime(); + var timelineCount = current.animation.timelines.length; + var timelines = current.animation.timelines; + if ((i == 0 && mix == 1) || blend == core.MixBlend.add) { + for (var ii = 0; ii < timelineCount; ii++) { + core.Utils.webkit602BugfixHelper(mix, blend); + timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, core.MixDirection.mixIn); + } + } + else { + var timelineMode = current.timelineMode; + var firstFrame = current.timelinesRotation.length == 0; + if (firstFrame) + core.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); + var timelinesRotation = current.timelinesRotation; + for (var ii = 0; ii < timelineCount; ii++) { + var timeline = timelines[ii]; + var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : core.MixBlend.setup; + if (timeline instanceof core.RotateTimeline) { + this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + } + else { + core.Utils.webkit602BugfixHelper(mix, blend); + timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, core.MixDirection.mixIn); + } + } + } + this.queueEvents(current, animationTime); + events.length = 0; + current.nextAnimationLast = animationTime; + current.nextTrackLast = current.trackTime; + } + this.queue.drain(); + return applied; + }; + AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) { + var from = to.mixingFrom; + if (from.mixingFrom != null) + this.applyMixingFrom(from, skeleton, blend); + var mix = 0; + if (to.mixDuration == 0) { + mix = 1; + if (blend == core.MixBlend.first) + blend = core.MixBlend.setup; + } + else { + mix = to.mixTime / to.mixDuration; + if (mix > 1) + mix = 1; + if (blend != core.MixBlend.first) + blend = from.mixBlend; + } + var events = mix < from.eventThreshold ? this.events : null; + var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold; + var animationLast = from.animationLast, animationTime = from.getAnimationTime(); + var timelineCount = from.animation.timelines.length; + var timelines = from.animation.timelines; + var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix); + if (blend == core.MixBlend.add) { + for (var i = 0; i < timelineCount; i++) + timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, core.MixDirection.mixOut); + } + else { + var timelineMode = from.timelineMode; + var timelineHoldMix = from.timelineHoldMix; + var firstFrame = from.timelinesRotation.length == 0; + if (firstFrame) + core.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null); + var timelinesRotation = from.timelinesRotation; + from.totalAlpha = 0; + for (var i = 0; i < timelineCount; i++) { + var timeline = timelines[i]; + var direction = core.MixDirection.mixOut; + var timelineBlend = void 0; + var alpha = 0; + switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { + case AnimationState.SUBSEQUENT: + if (!attachments && timeline instanceof core.AttachmentTimeline) { + if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) + continue; + blend = core.MixBlend.setup; + } + if (!drawOrder && timeline instanceof core.DrawOrderTimeline) + continue; + timelineBlend = blend; + alpha = alphaMix; + break; + case AnimationState.FIRST: + timelineBlend = core.MixBlend.setup; + alpha = alphaMix; + break; + case AnimationState.HOLD: + timelineBlend = core.MixBlend.setup; + alpha = alphaHold; + break; + default: + timelineBlend = core.MixBlend.setup; + var holdMix = timelineHoldMix[i]; + alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration); + break; + } + from.totalAlpha += alpha; + if (timeline instanceof core.RotateTimeline) + this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); + else { + core.Utils.webkit602BugfixHelper(alpha, blend); + if (timelineBlend == core.MixBlend.setup) { + if (timeline instanceof core.AttachmentTimeline) { + if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) + direction = core.MixDirection.mixIn; + } + else if (timeline instanceof core.DrawOrderTimeline) { + if (drawOrder) + direction = core.MixDirection.mixIn; + } + } + timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); + } + } + } + if (to.mixDuration > 0) + this.queueEvents(from, animationTime); + this.events.length = 0; + from.nextAnimationLast = animationTime; + from.nextTrackLast = from.trackTime; + return mix; + }; + AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { + if (firstFrame) + timelinesRotation[i] = 0; + if (alpha == 1) { + timeline.apply(skeleton, 0, time, null, 1, blend, core.MixDirection.mixIn); + return; + } + var rotateTimeline = timeline; + var frames = rotateTimeline.frames; + var bone = skeleton.bones[rotateTimeline.boneIndex]; + if (!bone.active) + return; + var r1 = 0, r2 = 0; + if (time < frames[0]) { + switch (blend) { + case core.MixBlend.setup: + bone.rotation = bone.data.rotation; + default: + return; + case core.MixBlend.first: + r1 = bone.rotation; + r2 = bone.data.rotation; + } + } + else { + r1 = blend == core.MixBlend.setup ? bone.data.rotation : bone.rotation; + if (time >= frames[frames.length - core.RotateTimeline.ENTRIES]) + r2 = bone.data.rotation + frames[frames.length + core.RotateTimeline.PREV_ROTATION]; + else { + var frame = core.Animation.binarySearch(frames, time, core.RotateTimeline.ENTRIES); + var prevRotation = frames[frame + core.RotateTimeline.PREV_ROTATION]; + var frameTime = frames[frame]; + var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + core.RotateTimeline.PREV_TIME] - frameTime)); + r2 = frames[frame + core.RotateTimeline.ROTATION] - prevRotation; + r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360; + r2 = prevRotation + r2 * percent + bone.data.rotation; + r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360; + } + } + var total = 0, diff = r2 - r1; + diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360; + if (diff == 0) { + total = timelinesRotation[i]; + } + else { + var lastTotal = 0, lastDiff = 0; + if (firstFrame) { + lastTotal = 0; + lastDiff = diff; + } + else { + lastTotal = timelinesRotation[i]; + lastDiff = timelinesRotation[i + 1]; + } + var current = diff > 0, dir = lastTotal >= 0; + if (core.MathUtils.signum(lastDiff) != core.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) { + if (Math.abs(lastTotal) > 180) + lastTotal += 360 * core.MathUtils.signum(lastTotal); + dir = current; + } + total = diff + lastTotal - lastTotal % 360; + if (dir != current) + total += 360 * core.MathUtils.signum(lastTotal); + timelinesRotation[i] = total; + } + timelinesRotation[i + 1] = diff; + r1 += total * alpha; + bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360; + }; + AnimationState.prototype.queueEvents = function (entry, animationTime) { + var animationStart = entry.animationStart, animationEnd = entry.animationEnd; + var duration = animationEnd - animationStart; + var trackLastWrapped = entry.trackLast % duration; + var events = this.events; + var i = 0, n = events.length; + for (; i < n; i++) { + var event_1 = events[i]; + if (event_1.time < trackLastWrapped) + break; + if (event_1.time > animationEnd) + continue; + this.queue.event(entry, event_1); + } + var complete = false; + if (entry.loop) + complete = duration == 0 || trackLastWrapped > entry.trackTime % duration; + else + complete = animationTime >= animationEnd && entry.animationLast < animationEnd; + if (complete) + this.queue.complete(entry); + for (; i < n; i++) { + var event_2 = events[i]; + if (event_2.time < animationStart) + continue; + this.queue.event(entry, events[i]); + } + }; + AnimationState.prototype.clearTracks = function () { + var oldDrainDisabled = this.queue.drainDisabled; + this.queue.drainDisabled = true; + for (var i = 0, n = this.tracks.length; i < n; i++) + this.clearTrack(i); + this.tracks.length = 0; + this.queue.drainDisabled = oldDrainDisabled; + this.queue.drain(); + }; + AnimationState.prototype.clearTrack = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return; + var current = this.tracks[trackIndex]; + if (current == null) + return; + this.queue.end(current); + this.disposeNext(current); + var entry = current; + while (true) { + var from = entry.mixingFrom; + if (from == null) + break; + this.queue.end(from); + entry.mixingFrom = null; + entry.mixingTo = null; + entry = from; + } + this.tracks[current.trackIndex] = null; + this.queue.drain(); + }; + AnimationState.prototype.setCurrent = function (index, current, interrupt) { + var from = this.expandToIndex(index); + this.tracks[index] = current; + if (from != null) { + if (interrupt) + this.queue.interrupt(from); + current.mixingFrom = from; + from.mixingTo = current; + current.mixTime = 0; + if (from.mixingFrom != null && from.mixDuration > 0) + current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration); + from.timelinesRotation.length = 0; + } + this.queue.start(current); + }; + AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) { + var animation = this.data.skeletonData.findAnimation(animationName); + if (animation == null) + throw new Error("Animation not found: " + animationName); + return this.setAnimationWith(trackIndex, animation, loop); + }; + AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) { + if (animation == null) + throw new Error("animation cannot be null."); + var interrupt = true; + var current = this.expandToIndex(trackIndex); + if (current != null) { + if (current.nextTrackLast == -1) { + this.tracks[trackIndex] = current.mixingFrom; + this.queue.interrupt(current); + this.queue.end(current); + this.disposeNext(current); + current = current.mixingFrom; + interrupt = false; + } + else + this.disposeNext(current); + } + var entry = this.trackEntry(trackIndex, animation, loop, current); + this.setCurrent(trackIndex, entry, interrupt); + this.queue.drain(); + return entry; + }; + AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) { + var animation = this.data.skeletonData.findAnimation(animationName); + if (animation == null) + throw new Error("Animation not found: " + animationName); + return this.addAnimationWith(trackIndex, animation, loop, delay); + }; + AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) { + if (animation == null) + throw new Error("animation cannot be null."); + var last = this.expandToIndex(trackIndex); + if (last != null) { + while (last.next != null) + last = last.next; + } + var entry = this.trackEntry(trackIndex, animation, loop, last); + if (last == null) { + this.setCurrent(trackIndex, entry, true); + this.queue.drain(); + } + else { + last.next = entry; + if (delay <= 0) { + var duration = last.animationEnd - last.animationStart; + if (duration != 0) { + if (last.loop) + delay += duration * (1 + ((last.trackTime / duration) | 0)); + else + delay += Math.max(duration, last.trackTime); + delay -= this.data.getMix(last.animation, animation); + } + else + delay = last.trackTime; + } + } + entry.delay = delay; + return entry; + }; + AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) { + var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false); + entry.mixDuration = mixDuration; + entry.trackEnd = mixDuration; + return entry; + }; + AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) { + if (delay <= 0) + delay -= mixDuration; + var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay); + entry.mixDuration = mixDuration; + entry.trackEnd = mixDuration; + return entry; + }; + AnimationState.prototype.setEmptyAnimations = function (mixDuration) { + var oldDrainDisabled = this.queue.drainDisabled; + this.queue.drainDisabled = true; + for (var i = 0, n = this.tracks.length; i < n; i++) { + var current = this.tracks[i]; + if (current != null) + this.setEmptyAnimation(current.trackIndex, mixDuration); + } + this.queue.drainDisabled = oldDrainDisabled; + this.queue.drain(); + }; + AnimationState.prototype.expandToIndex = function (index) { + if (index < this.tracks.length) + return this.tracks[index]; + core.Utils.ensureArrayCapacity(this.tracks, index + 1, null); + this.tracks.length = index + 1; + return null; + }; + AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) { + var entry = this.trackEntryPool.obtain(); + entry.trackIndex = trackIndex; + entry.animation = animation; + entry.loop = loop; + entry.holdPrevious = false; + entry.eventThreshold = 0; + entry.attachmentThreshold = 0; + entry.drawOrderThreshold = 0; + entry.animationStart = 0; + entry.animationEnd = animation.duration; + entry.animationLast = -1; + entry.nextAnimationLast = -1; + entry.delay = 0; + entry.trackTime = 0; + entry.trackLast = -1; + entry.nextTrackLast = -1; + entry.trackEnd = Number.MAX_VALUE; + entry.timeScale = 1; + entry.alpha = 1; + entry.interruptAlpha = 1; + entry.mixTime = 0; + entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + return entry; + }; + AnimationState.prototype.disposeNext = function (entry) { + var next = entry.next; + while (next != null) { + this.queue.dispose(next); + next = next.next; + } + entry.next = null; + }; + AnimationState.prototype._animationsChanged = function () { + this.animationsChanged = false; + this.propertyIDs.clear(); + for (var i = 0, n = this.tracks.length; i < n; i++) { + var entry = this.tracks[i]; + if (entry == null) + continue; + while (entry.mixingFrom != null) + entry = entry.mixingFrom; + do { + if (entry.mixingFrom == null || entry.mixBlend != core.MixBlend.add) + this.computeHold(entry); + entry = entry.mixingTo; + } while (entry != null); + } + this.propertyIDs.clear(); + for (var i = this.tracks.length - 1; i >= 0; i--) { + var entry = this.tracks[i]; + while (entry != null) { + this.computeNotLast(entry); + entry = entry.mixingFrom; + } + } + }; + AnimationState.prototype.computeHold = function (entry) { + var to = entry.mixingTo; + var timelines = entry.animation.timelines; + var timelinesCount = entry.animation.timelines.length; + var timelineMode = core.Utils.setArraySize(entry.timelineMode, timelinesCount); + entry.timelineHoldMix.length = 0; + var timelineDipMix = core.Utils.setArraySize(entry.timelineHoldMix, timelinesCount); + var propertyIDs = this.propertyIDs; + if (to != null && to.holdPrevious) { + for (var i = 0; i < timelinesCount; i++) { + propertyIDs.add(timelines[i].getPropertyId()); + timelineMode[i] = AnimationState.HOLD; + } + return; + } + outer: for (var i = 0; i < timelinesCount; i++) { + var timeline = timelines[i]; + var id = timeline.getPropertyId(); + if (!propertyIDs.add(id)) + timelineMode[i] = AnimationState.SUBSEQUENT; + else if (to == null || timeline instanceof core.AttachmentTimeline || timeline instanceof core.DrawOrderTimeline + || timeline instanceof core.EventTimeline || !this.hasTimeline(to, id)) { + timelineMode[i] = AnimationState.FIRST; + } + else { + for (var next = to.mixingTo; next != null; next = next.mixingTo) { + if (this.hasTimeline(next, id)) + continue; + if (entry.mixDuration > 0) { + timelineMode[i] = AnimationState.HOLD_MIX; + timelineDipMix[i] = next; + continue outer; + } + break; + } + timelineMode[i] = AnimationState.HOLD; + } + } + }; + AnimationState.prototype.computeNotLast = function (entry) { + var timelines = entry.animation.timelines; + var timelinesCount = entry.animation.timelines.length; + var timelineMode = entry.timelineMode; + var propertyIDs = this.propertyIDs; + for (var i = 0; i < timelinesCount; i++) { + if (timelines[i] instanceof core.AttachmentTimeline) { + var timeline = timelines[i]; + if (!propertyIDs.add(timeline.slotIndex)) + timelineMode[i] |= AnimationState.NOT_LAST; + } + } + }; + AnimationState.prototype.hasTimeline = function (entry, id) { + var timelines = entry.animation.timelines; + for (var i = 0, n = timelines.length; i < n; i++) + if (timelines[i].getPropertyId() == id) + return true; + return false; + }; + AnimationState.prototype.getCurrent = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return null; + return this.tracks[trackIndex]; + }; + AnimationState.prototype.addListener = function (listener) { + if (listener == null) + throw new Error("listener cannot be null."); + this.listeners.push(listener); + }; + AnimationState.prototype.removeListener = function (listener) { + var index = this.listeners.indexOf(listener); + if (index >= 0) + this.listeners.splice(index, 1); + }; + AnimationState.prototype.clearListeners = function () { + this.listeners.length = 0; + }; + AnimationState.prototype.clearListenerNotifications = function () { + this.queue.clear(); + }; + AnimationState.prototype.setAnimationByName = function (trackIndex, animationName, loop) { + if (!AnimationState.deprecatedWarning1) { + AnimationState.deprecatedWarning1 = true; + console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on."); + } + this.setAnimation(trackIndex, animationName, loop); + }; + AnimationState.prototype.addAnimationByName = function (trackIndex, animationName, loop, delay) { + if (!AnimationState.deprecatedWarning2) { + AnimationState.deprecatedWarning2 = true; + console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on."); + } + this.addAnimation(trackIndex, animationName, loop, delay); + }; + AnimationState.prototype.hasAnimation = function (animationName) { + var animation = this.data.skeletonData.findAnimation(animationName); + return animation !== null; + }; + AnimationState.prototype.hasAnimationByName = function (animationName) { + if (!AnimationState.deprecatedWarning3) { + AnimationState.deprecatedWarning3 = true; + console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on."); + } + return this.hasAnimation(animationName); + }; + AnimationState.emptyAnimation = new core.Animation("", [], 0); + AnimationState.SUBSEQUENT = 0; + AnimationState.FIRST = 1; + AnimationState.HOLD = 2; + AnimationState.HOLD_MIX = 3; + AnimationState.NOT_LAST = 4; + AnimationState.deprecatedWarning1 = false; + AnimationState.deprecatedWarning2 = false; + AnimationState.deprecatedWarning3 = false; + return AnimationState; + }()); + core.AnimationState = AnimationState; + var TrackEntry = (function () { + function TrackEntry() { + this.mixBlend = core.MixBlend.replace; + this.timelineMode = new Array(); + this.timelineHoldMix = new Array(); + this.timelinesRotation = new Array(); + } + TrackEntry.prototype.reset = function () { + this.next = null; + this.mixingFrom = null; + this.mixingTo = null; + this.animation = null; + this.listener = null; + this.timelineMode.length = 0; + this.timelineHoldMix.length = 0; + this.timelinesRotation.length = 0; + }; + TrackEntry.prototype.getAnimationTime = function () { + if (this.loop) { + var duration = this.animationEnd - this.animationStart; + if (duration == 0) + return this.animationStart; + return (this.trackTime % duration) + this.animationStart; + } + return Math.min(this.trackTime + this.animationStart, this.animationEnd); + }; + TrackEntry.prototype.setAnimationLast = function (animationLast) { + this.animationLast = animationLast; + this.nextAnimationLast = animationLast; + }; + TrackEntry.prototype.isComplete = function () { + return this.trackTime >= this.animationEnd - this.animationStart; + }; + TrackEntry.prototype.resetRotationDirections = function () { + this.timelinesRotation.length = 0; + }; + Object.defineProperty(TrackEntry.prototype, "time", { + get: function () { + if (!TrackEntry.deprecatedWarning1) { + TrackEntry.deprecatedWarning1 = true; + console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on."); + } + return this.trackTime; + }, + set: function (value) { + if (!TrackEntry.deprecatedWarning1) { + TrackEntry.deprecatedWarning1 = true; + console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on."); + } + this.trackTime = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TrackEntry.prototype, "endTime", { + get: function () { + if (!TrackEntry.deprecatedWarning2) { + TrackEntry.deprecatedWarning2 = true; + console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on."); + } + return this.trackTime; + }, + set: function (value) { + if (!TrackEntry.deprecatedWarning2) { + TrackEntry.deprecatedWarning2 = true; + console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on."); + } + this.trackTime = value; + }, + enumerable: true, + configurable: true + }); + TrackEntry.prototype.loopsCount = function () { + return Math.floor(this.trackTime / this.trackEnd); + }; + TrackEntry.deprecatedWarning1 = false; + TrackEntry.deprecatedWarning2 = false; + return TrackEntry; + }()); + core.TrackEntry = TrackEntry; + var EventQueue = (function () { + function EventQueue(animState) { + this.objects = []; + this.drainDisabled = false; + this.animState = animState; + } + EventQueue.prototype.start = function (entry) { + this.objects.push(EventType.start); + this.objects.push(entry); + this.animState.animationsChanged = true; + }; + EventQueue.prototype.interrupt = function (entry) { + this.objects.push(EventType.interrupt); + this.objects.push(entry); + }; + EventQueue.prototype.end = function (entry) { + this.objects.push(EventType.end); + this.objects.push(entry); + this.animState.animationsChanged = true; + }; + EventQueue.prototype.dispose = function (entry) { + this.objects.push(EventType.dispose); + this.objects.push(entry); + }; + EventQueue.prototype.complete = function (entry) { + this.objects.push(EventType.complete); + this.objects.push(entry); + }; + EventQueue.prototype.event = function (entry, event) { + this.objects.push(EventType.event); + this.objects.push(entry); + this.objects.push(event); + }; + EventQueue.prototype.deprecateStuff = function () { + if (!EventQueue.deprecatedWarning1) { + EventQueue.deprecatedWarning1 = true; + console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'"); + } + return true; + }; + EventQueue.prototype.drain = function () { + if (this.drainDisabled) + return; + this.drainDisabled = true; + var objects = this.objects; + var listeners = this.animState.listeners; + for (var i = 0; i < objects.length; i += 2) { + var type = objects[i]; + var entry = objects[i + 1]; + switch (type) { + case EventType.start: + if (entry.listener != null && entry.listener.start) + entry.listener.start(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].start) + listeners[ii].start(entry); + entry.onStart && this.deprecateStuff() && entry.onStart(entry.trackIndex); + this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(entry.trackIndex); + break; + case EventType.interrupt: + if (entry.listener != null && entry.listener.interrupt) + entry.listener.interrupt(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].interrupt) + listeners[ii].interrupt(entry); + break; + case EventType.end: + if (entry.listener != null && entry.listener.end) + entry.listener.end(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].end) + listeners[ii].end(entry); + entry.onEnd && this.deprecateStuff() && entry.onEnd(entry.trackIndex); + this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(entry.trackIndex); + case EventType.dispose: + if (entry.listener != null && entry.listener.dispose) + entry.listener.dispose(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].dispose) + listeners[ii].dispose(entry); + this.animState.trackEntryPool.free(entry); + break; + case EventType.complete: + if (entry.listener != null && entry.listener.complete) + entry.listener.complete(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].complete) + listeners[ii].complete(entry); + var count = core.MathUtils.toInt(entry.loopsCount()); + entry.onComplete && this.deprecateStuff() && entry.onComplete(entry.trackIndex, count); + this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(entry.trackIndex, count); + break; + case EventType.event: + var event_3 = objects[i++ + 2]; + if (entry.listener != null && entry.listener.event) + entry.listener.event(entry, event_3); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].event) + listeners[ii].event(entry, event_3); + entry.onEvent && this.deprecateStuff() && entry.onEvent(entry.trackIndex, event_3); + this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(entry.trackIndex, event_3); + break; + } + } + this.clear(); + this.drainDisabled = false; + }; + EventQueue.prototype.clear = function () { + this.objects.length = 0; + }; + EventQueue.deprecatedWarning1 = false; + return EventQueue; + }()); + core.EventQueue = EventQueue; + var EventType; + (function (EventType) { + EventType[EventType["start"] = 0] = "start"; + EventType[EventType["interrupt"] = 1] = "interrupt"; + EventType[EventType["end"] = 2] = "end"; + EventType[EventType["dispose"] = 3] = "dispose"; + EventType[EventType["complete"] = 4] = "complete"; + EventType[EventType["event"] = 5] = "event"; + })(EventType = core.EventType || (core.EventType = {})); + var AnimationStateAdapter2 = (function () { + function AnimationStateAdapter2() { + } + AnimationStateAdapter2.prototype.start = function (entry) { + }; + AnimationStateAdapter2.prototype.interrupt = function (entry) { + }; + AnimationStateAdapter2.prototype.end = function (entry) { + }; + AnimationStateAdapter2.prototype.dispose = function (entry) { + }; + AnimationStateAdapter2.prototype.complete = function (entry) { + }; + AnimationStateAdapter2.prototype.event = function (entry, event) { + }; + return AnimationStateAdapter2; + }()); + core.AnimationStateAdapter2 = AnimationStateAdapter2; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var AnimationStateData = (function () { + function AnimationStateData(skeletonData) { + this.animationToMixTime = {}; + this.defaultMix = 0; + if (skeletonData == null) + throw new Error("skeletonData cannot be null."); + this.skeletonData = skeletonData; + } + AnimationStateData.prototype.setMix = function (fromName, toName, duration) { + var from = this.skeletonData.findAnimation(fromName); + if (from == null) + throw new Error("Animation not found: " + fromName); + var to = this.skeletonData.findAnimation(toName); + if (to == null) + throw new Error("Animation not found: " + toName); + this.setMixWith(from, to, duration); + }; + AnimationStateData.prototype.setMixByName = function (fromName, toName, duration) { + if (!AnimationStateData.deprecatedWarning1) { + AnimationStateData.deprecatedWarning1 = true; + console.warn("Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on."); + } + this.setMix(fromName, toName, duration); + }; + AnimationStateData.prototype.setMixWith = function (from, to, duration) { + if (from == null) + throw new Error("from cannot be null."); + if (to == null) + throw new Error("to cannot be null."); + var key = from.name + "." + to.name; + this.animationToMixTime[key] = duration; + }; + AnimationStateData.prototype.getMix = function (from, to) { + var key = from.name + "." + to.name; + var value = this.animationToMixTime[key]; + return value === undefined ? this.defaultMix : value; + }; + AnimationStateData.deprecatedWarning1 = false; + return AnimationStateData; + }()); + core.AnimationStateData = AnimationStateData; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var AtlasAttachmentLoader = (function () { + function AtlasAttachmentLoader(atlas) { + this.atlas = atlas; + } + AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + if (region == null) + throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")"); + var attachment = new core.RegionAttachment(name); + attachment.region = region; + return attachment; + }; + AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + if (region == null) + throw new Error("Region not found in atlas: " + path + " (mesh attachment: " + name + ")"); + var attachment = new core.MeshAttachment(name); + attachment.region = region; + return attachment; + }; + AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) { + return new core.BoundingBoxAttachment(name); + }; + AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) { + return new core.PathAttachment(name); + }; + AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) { + return new core.PointAttachment(name); + }; + AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) { + return new core.ClippingAttachment(name); + }; + return AtlasAttachmentLoader; + }()); + core.AtlasAttachmentLoader = AtlasAttachmentLoader; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var BlendMode; + (function (BlendMode) { + BlendMode[BlendMode["Normal"] = 0] = "Normal"; + BlendMode[BlendMode["Additive"] = 1] = "Additive"; + BlendMode[BlendMode["Multiply"] = 2] = "Multiply"; + BlendMode[BlendMode["Screen"] = 3] = "Screen"; + })(BlendMode = core.BlendMode || (core.BlendMode = {})); + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var Bone = (function () { + function Bone(data, skeleton, parent) { + this.matrix = new PIXI.Matrix(); + this.children = new Array(); + this.x = 0; + this.y = 0; + this.rotation = 0; + this.scaleX = 0; + this.scaleY = 0; + this.shearX = 0; + this.shearY = 0; + this.ax = 0; + this.ay = 0; + this.arotation = 0; + this.ascaleX = 0; + this.ascaleY = 0; + this.ashearX = 0; + this.ashearY = 0; + this.appliedValid = false; + this.sorted = false; + this.active = false; + if (data == null) + throw new Error("data cannot be null."); + if (skeleton == null) + throw new Error("skeleton cannot be null."); + this.data = data; + this.skeleton = skeleton; + this.parent = parent; + this.setToSetupPose(); + } + Object.defineProperty(Bone.prototype, "worldX", { + get: function () { + return this.matrix.tx; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Bone.prototype, "worldY", { + get: function () { + return this.matrix.ty; + }, + enumerable: true, + configurable: true + }); + Bone.prototype.isActive = function () { + return this.active; + }; + Bone.prototype.update = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + Bone.prototype.updateWorldTransform = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) { + this.ax = x; + this.ay = y; + this.arotation = rotation; + this.ascaleX = scaleX; + this.ascaleY = scaleY; + this.ashearX = shearX; + this.ashearY = shearY; + this.appliedValid = true; + var parent = this.parent; + var m = this.matrix; + var sx = this.skeleton.scaleX; + var sy = Bone.yDown ? -this.skeleton.scaleY : this.skeleton.scaleY; + if (parent == null) { + var skeleton = this.skeleton; + var rotationY = rotation + 90 + shearY; + m.a = core.MathUtils.cosDeg(rotation + shearX) * scaleX * sx; + m.c = core.MathUtils.cosDeg(rotationY) * scaleY * sx; + m.b = core.MathUtils.sinDeg(rotation + shearX) * scaleX * sy; + m.d = core.MathUtils.sinDeg(rotationY) * scaleY * sy; + m.tx = x * sx + skeleton.x; + m.ty = y * sy + skeleton.y; + return; + } + var pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d; + m.tx = pa * x + pb * y + parent.matrix.tx; + m.ty = pc * x + pd * y + parent.matrix.ty; + switch (this.data.transformMode) { + case core.TransformMode.Normal: { + var rotationY = rotation + 90 + shearY; + var la = core.MathUtils.cosDeg(rotation + shearX) * scaleX; + var lb = core.MathUtils.cosDeg(rotationY) * scaleY; + var lc = core.MathUtils.sinDeg(rotation + shearX) * scaleX; + var ld = core.MathUtils.sinDeg(rotationY) * scaleY; + m.a = pa * la + pb * lc; + m.c = pa * lb + pb * ld; + m.b = pc * la + pd * lc; + m.d = pc * lb + pd * ld; + return; + } + case core.TransformMode.OnlyTranslation: { + var rotationY = rotation + 90 + shearY; + m.a = core.MathUtils.cosDeg(rotation + shearX) * scaleX; + m.c = core.MathUtils.cosDeg(rotationY) * scaleY; + m.b = core.MathUtils.sinDeg(rotation + shearX) * scaleX; + m.d = core.MathUtils.sinDeg(rotationY) * scaleY; + break; + } + case core.TransformMode.NoRotationOrReflection: { + var s = pa * pa + pc * pc; + var prx = 0; + if (s > 0.0001) { + s = Math.abs(pa * pd - pb * pc) / s; + pb = pc * s; + pd = pa * s; + prx = Math.atan2(pc, pa) * core.MathUtils.radDeg; + } + else { + pa = 0; + pc = 0; + prx = 90 - Math.atan2(pd, pb) * core.MathUtils.radDeg; + } + var rx = rotation + shearX - prx; + var ry = rotation + shearY - prx + 90; + var la = core.MathUtils.cosDeg(rx) * scaleX; + var lb = core.MathUtils.cosDeg(ry) * scaleY; + var lc = core.MathUtils.sinDeg(rx) * scaleX; + var ld = core.MathUtils.sinDeg(ry) * scaleY; + m.a = pa * la - pb * lc; + m.c = pa * lb - pb * ld; + m.b = pc * la + pd * lc; + m.d = pc * lb + pd * ld; + break; + } + case core.TransformMode.NoScale: + case core.TransformMode.NoScaleOrReflection: { + var cos = core.MathUtils.cosDeg(rotation); + var sin = core.MathUtils.sinDeg(rotation); + var za = (pa * cos + pb * sin) / sx; + var zc = (pc * cos + pd * sin) / sy; + var s = Math.sqrt(za * za + zc * zc); + if (s > 0.00001) + s = 1 / s; + za *= s; + zc *= s; + s = Math.sqrt(za * za + zc * zc); + if (this.data.transformMode == core.TransformMode.NoScale + && (pa * pd - pb * pc < 0) != (Bone.yDown ? + (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) : + (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))) + s = -s; + var r = Math.PI / 2 + Math.atan2(zc, za); + var zb = Math.cos(r) * s; + var zd = Math.sin(r) * s; + var la = core.MathUtils.cosDeg(shearX) * scaleX; + var lb = core.MathUtils.cosDeg(90 + shearY) * scaleY; + var lc = core.MathUtils.sinDeg(shearX) * scaleX; + var ld = core.MathUtils.sinDeg(90 + shearY) * scaleY; + m.a = za * la + zb * lc; + m.c = za * lb + zb * ld; + m.b = zc * la + zd * lc; + m.d = zc * lb + zd * ld; + break; + } + } + m.a *= sx; + m.c *= sx; + m.b *= sy; + m.d *= sy; + }; + Bone.prototype.setToSetupPose = function () { + var data = this.data; + this.x = data.x; + this.y = data.y; + this.rotation = data.rotation; + this.scaleX = data.scaleX; + this.scaleY = data.scaleY; + this.shearX = data.shearX; + this.shearY = data.shearY; + }; + Bone.prototype.getWorldRotationX = function () { + return Math.atan2(this.matrix.b, this.matrix.a) * core.MathUtils.radDeg; + }; + Bone.prototype.getWorldRotationY = function () { + return Math.atan2(this.matrix.d, this.matrix.c) * core.MathUtils.radDeg; + }; + Bone.prototype.getWorldScaleX = function () { + var m = this.matrix; + return Math.sqrt(m.a * m.a + m.c * m.c); + }; + Bone.prototype.getWorldScaleY = function () { + var m = this.matrix; + return Math.sqrt(m.b * m.b + m.d * m.d); + }; + Bone.prototype.updateAppliedTransform = function () { + this.appliedValid = true; + var parent = this.parent; + var m = this.matrix; + if (parent == null) { + this.ax = m.tx; + this.ay = m.ty; + this.arotation = Math.atan2(m.b, m.a) * core.MathUtils.radDeg; + this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b); + this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d); + this.ashearX = 0; + this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * core.MathUtils.radDeg; + return; + } + var pm = parent.matrix; + var pid = 1 / (pm.a * pm.d - pm.b * pm.c); + var dx = m.tx - pm.tx, dy = m.ty - pm.ty; + this.ax = (dx * pm.d * pid - dy * pm.c * pid); + this.ay = (dy * pm.a * pid - dx * pm.b * pid); + var ia = pid * pm.d; + var id = pid * pm.a; + var ib = pid * pm.c; + var ic = pid * pm.b; + var ra = ia * m.a - ib * m.b; + var rb = ia * m.c - ib * m.d; + var rc = id * m.b - ic * m.a; + var rd = id * m.d - ic * m.c; + this.ashearX = 0; + this.ascaleX = Math.sqrt(ra * ra + rc * rc); + if (this.ascaleX > 0.0001) { + var det = ra * rd - rb * rc; + this.ascaleY = det / this.ascaleX; + this.ashearY = Math.atan2(ra * rb + rc * rd, det) * core.MathUtils.radDeg; + this.arotation = Math.atan2(rc, ra) * core.MathUtils.radDeg; + } + else { + this.ascaleX = 0; + this.ascaleY = Math.sqrt(rb * rb + rd * rd); + this.ashearY = 0; + this.arotation = 90 - Math.atan2(rd, rb) * core.MathUtils.radDeg; + } + }; + Bone.prototype.worldToLocal = function (world) { + var m = this.matrix; + var a = m.a, b = m.c, c = m.b, d = m.d; + var invDet = 1 / (a * d - b * c); + var x = world.x - m.tx, y = world.y - m.ty; + world.x = (x * d * invDet - y * b * invDet); + world.y = (y * a * invDet - x * c * invDet); + return world; + }; + Bone.prototype.localToWorld = function (local) { + var m = this.matrix; + var x = local.x, y = local.y; + local.x = x * m.a + y * m.c + m.tx; + local.y = x * m.b + y * m.d + m.ty; + return local; + }; + Bone.prototype.worldToLocalRotation = function (worldRotation) { + var sin = core.MathUtils.sinDeg(worldRotation), cos = core.MathUtils.cosDeg(worldRotation); + var mat = this.matrix; + return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * core.MathUtils.radDeg; + }; + Bone.prototype.localToWorldRotation = function (localRotation) { + var sin = core.MathUtils.sinDeg(localRotation), cos = core.MathUtils.cosDeg(localRotation); + var mat = this.matrix; + return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * core.MathUtils.radDeg; + }; + Bone.prototype.rotateWorld = function (degrees) { + var mat = this.matrix; + var a = mat.a, b = mat.c, c = mat.b, d = mat.d; + var cos = core.MathUtils.cosDeg(degrees), sin = core.MathUtils.sinDeg(degrees); + mat.a = cos * a - sin * c; + mat.c = cos * b - sin * d; + mat.b = sin * a + cos * c; + mat.d = sin * b + cos * d; + this.appliedValid = false; + }; + Bone.yDown = false; + return Bone; + }()); + core.Bone = Bone; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var BoneData = (function () { + function BoneData(index, name, parent) { + this.x = 0; + this.y = 0; + this.rotation = 0; + this.scaleX = 1; + this.scaleY = 1; + this.shearX = 0; + this.shearY = 0; + this.transformMode = TransformMode.Normal; + this.skinRequired = false; + this.color = new core.Color(); + if (index < 0) + throw new Error("index must be >= 0."); + if (name == null) + throw new Error("name cannot be null."); + this.index = index; + this.name = name; + this.parent = parent; + } + return BoneData; + }()); + core.BoneData = BoneData; + var TransformMode; + (function (TransformMode) { + TransformMode[TransformMode["Normal"] = 0] = "Normal"; + TransformMode[TransformMode["OnlyTranslation"] = 1] = "OnlyTranslation"; + TransformMode[TransformMode["NoRotationOrReflection"] = 2] = "NoRotationOrReflection"; + TransformMode[TransformMode["NoScale"] = 3] = "NoScale"; + TransformMode[TransformMode["NoScaleOrReflection"] = 4] = "NoScaleOrReflection"; + })(TransformMode = core.TransformMode || (core.TransformMode = {})); + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var ConstraintData = (function () { + function ConstraintData(name, order, skinRequired) { + this.name = name; + this.order = order; + this.skinRequired = skinRequired; + } + return ConstraintData; + }()); + core.ConstraintData = ConstraintData; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var Event = (function () { + function Event(time, data) { + if (data == null) + throw new Error("data cannot be null."); + this.time = time; + this.data = data; + } + return Event; + }()); + core.Event = Event; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var EventData = (function () { + function EventData(name) { + this.name = name; + } + return EventData; + }()); + core.EventData = EventData; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var IkConstraint = (function () { + function IkConstraint(data, skeleton) { + this.bendDirection = 0; + this.compress = false; + this.stretch = false; + this.mix = 1; + this.softness = 0; + this.active = false; + if (data == null) + throw new Error("data cannot be null."); + if (skeleton == null) + throw new Error("skeleton cannot be null."); + this.data = data; + this.mix = data.mix; + this.softness = data.softness; + this.bendDirection = data.bendDirection; + this.compress = data.compress; + this.stretch = data.stretch; + this.bones = new Array(); + for (var i = 0; i < data.bones.length; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findBone(data.target.name); + } + IkConstraint.prototype.isActive = function () { + return this.active; + }; + IkConstraint.prototype.apply = function () { + this.update(); + }; + IkConstraint.prototype.update = function () { + var target = this.target; + var bones = this.bones; + switch (bones.length) { + case 1: + this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix); + break; + case 2: + this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix); + break; + } + }; + IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) { + if (!bone.appliedValid) + bone.updateAppliedTransform(); + var p = bone.parent.matrix; + var id = 1 / (p.a * p.d - p.b * p.c); + var x = targetX - p.tx, y = targetY - p.ty; + var tx = (x * p.d - y * p.c) * id - bone.ax, ty = (y * p.a - x * p.b) * id - bone.ay; + var rotationIK = Math.atan2(ty, tx) * core.MathUtils.radDeg - bone.ashearX - bone.arotation; + if (bone.ascaleX < 0) + rotationIK += 180; + if (rotationIK > 180) + rotationIK -= 360; + else if (rotationIK < -180) + rotationIK += 360; + var sx = bone.ascaleX, sy = bone.ascaleY; + if (compress || stretch) { + var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); + if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { + var s = (dd / b - 1) * alpha + 1; + sx *= s; + if (uniform) + sy *= s; + } + } + bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY); + }; + IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) { + if (alpha == 0) { + child.updateWorldTransform(); + return; + } + if (!parent.appliedValid) + parent.updateAppliedTransform(); + if (!child.appliedValid) + child.updateAppliedTransform(); + var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX; + var pmat = parent.matrix; + var os1 = 0, os2 = 0, s2 = 0; + if (psx < 0) { + psx = -psx; + os1 = 180; + s2 = -1; + } + else { + os1 = 0; + s2 = 1; + } + if (psy < 0) { + psy = -psy; + s2 = -s2; + } + if (csx < 0) { + csx = -csx; + os2 = 180; + } + else + os2 = 0; + var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d; + var u = Math.abs(psx - psy) <= 0.0001; + if (!u) { + cy = 0; + cwx = a * cx + pmat.tx; + cwy = c * cx + pmat.ty; + } + else { + cy = child.ay; + cwx = a * cx + b * cy + pmat.tx; + cwy = c * cx + d * cy + pmat.ty; + } + var pp = parent.parent.matrix; + a = pp.a; + b = pp.c; + c = pp.b; + d = pp.d; + var id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty; + var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py; + var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2; + if (l1 < 0.0001) { + this.apply1(parent, targetX, targetY, false, stretch, false, alpha); + child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY); + return; + } + x = targetX - pp.tx; + y = targetY - pp.ty; + var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py; + var dd = tx * tx + ty * ty; + if (softness != 0) { + softness *= psx * (csx + 1) / 2; + var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness; + if (sd > 0) { + var p = Math.min(1, sd / (softness * 2)) - 1; + p = (sd - softness * (1 - p * p)) / td; + tx -= p * tx; + ty -= p * ty; + dd = tx * tx + ty * ty; + } + } + outer: if (u) { + l2 *= psx; + var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2); + if (cos < -1) + cos = -1; + else if (cos > 1) { + cos = 1; + if (stretch) + sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1; + } + a2 = Math.acos(cos) * bendDir; + a = l1 + l2 * cos; + b = l2 * Math.sin(a2); + a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b); + } + else { + a = psx * l2; + b = psy * l2; + var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx); + c = bb * l1 * l1 + aa * dd - aa * bb; + var c1 = -2 * bb * l1, c2 = bb - aa; + d = c1 * c1 - 4 * c2 * c; + if (d >= 0) { + var q = Math.sqrt(d); + if (c1 < 0) + q = -q; + q = -(c1 + q) / 2; + var r0 = q / c2, r1 = c / q; + var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1; + if (r * r <= dd) { + y = Math.sqrt(dd - r * r) * bendDir; + a1 = ta - Math.atan2(y, r); + a2 = Math.atan2(y / psy, (r - l1) / psx); + break outer; + } + } + var minAngle = core.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0; + var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0; + c = -a * l1 / (aa - bb); + if (c >= -1 && c <= 1) { + c = Math.acos(c); + x = a * Math.cos(c) + l1; + y = b * Math.sin(c); + d = x * x + y * y; + if (d < minDist) { + minAngle = c; + minDist = d; + minX = x; + minY = y; + } + if (d > maxDist) { + maxAngle = c; + maxDist = d; + maxX = x; + maxY = y; + } + } + if (dd <= (minDist + maxDist) / 2) { + a1 = ta - Math.atan2(minY * bendDir, minX); + a2 = minAngle * bendDir; + } + else { + a1 = ta - Math.atan2(maxY * bendDir, maxX); + a2 = maxAngle * bendDir; + } + } + var os = Math.atan2(cy, cx) * s2; + var rotation = parent.arotation; + a1 = (a1 - os) * core.MathUtils.radDeg + os1 - rotation; + if (a1 > 180) + a1 -= 360; + else if (a1 < -180) + a1 += 360; + parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0); + rotation = child.arotation; + a2 = ((a2 + os) * core.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation; + if (a2 > 180) + a2 -= 360; + else if (a2 < -180) + a2 += 360; + child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY); + }; + return IkConstraint; + }()); + core.IkConstraint = IkConstraint; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var IkConstraintData = (function (_super) { + __extends(IkConstraintData, _super); + function IkConstraintData(name) { + var _this = _super.call(this, name, 0, false) || this; + _this.bones = new Array(); + _this.bendDirection = 1; + _this.compress = false; + _this.stretch = false; + _this.uniform = false; + _this.mix = 1; + _this.softness = 0; + return _this; + } + return IkConstraintData; + }(core.ConstraintData)); + core.IkConstraintData = IkConstraintData; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var PathConstraint = (function () { + function PathConstraint(data, skeleton) { + this.position = 0; + this.spacing = 0; + this.rotateMix = 0; + this.translateMix = 0; + this.spaces = new Array(); + this.positions = new Array(); + this.world = new Array(); + this.curves = new Array(); + this.lengths = new Array(); + this.segments = new Array(); + this.active = false; + if (data == null) + throw new Error("data cannot be null."); + if (skeleton == null) + throw new Error("skeleton cannot be null."); + this.data = data; + this.bones = new Array(); + for (var i = 0, n = data.bones.length; i < n; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findSlot(data.target.name); + this.position = data.position; + this.spacing = data.spacing; + this.rotateMix = data.rotateMix; + this.translateMix = data.translateMix; + } + PathConstraint.prototype.isActive = function () { + return this.active; + }; + PathConstraint.prototype.apply = function () { + this.update(); + }; + PathConstraint.prototype.update = function () { + var attachment = this.target.getAttachment(); + if (!(attachment instanceof core.PathAttachment)) + return; + var rotateMix = this.rotateMix, translateMix = this.translateMix; + var translate = translateMix > 0, rotate = rotateMix > 0; + if (!translate && !rotate) + return; + var data = this.data; + var spacingMode = data.spacingMode; + var lengthSpacing = spacingMode == core.SpacingMode.Length; + var rotateMode = data.rotateMode; + var tangents = rotateMode == core.RotateMode.Tangent, scale = rotateMode == core.RotateMode.ChainScale; + var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1; + var bones = this.bones; + var spaces = core.Utils.setArraySize(this.spaces, spacesCount), lengths = null; + var spacing = this.spacing; + if (scale || lengthSpacing) { + if (scale) + lengths = core.Utils.setArraySize(this.lengths, boneCount); + for (var i = 0, n = spacesCount - 1; i < n;) { + var bone = bones[i]; + var setupLength = bone.data.length; + if (setupLength < PathConstraint.epsilon) { + if (scale) + lengths[i] = 0; + spaces[++i] = 0; + } + else { + var x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b; + var length_1 = Math.sqrt(x * x + y * y); + if (scale) + lengths[i] = length_1; + spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_1 / setupLength; + } + } + } + else { + for (var i = 1; i < spacesCount; i++) + spaces[i] = spacing; + } + var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == core.PositionMode.Percent, spacingMode == core.SpacingMode.Percent); + var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; + var tip = false; + if (offsetRotation == 0) + tip = rotateMode == core.RotateMode.Chain; + else { + tip = false; + var p = this.target.bone.matrix; + offsetRotation *= p.a * p.d - p.b * p.c > 0 ? core.MathUtils.degRad : -core.MathUtils.degRad; + } + for (var i = 0, p = 3; i < boneCount; i++, p += 3) { + var bone = bones[i]; + var mat = bone.matrix; + mat.tx += (boneX - mat.tx) * translateMix; + mat.ty += (boneY - mat.ty) * translateMix; + var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY; + if (scale) { + var length_2 = lengths[i]; + if (length_2 != 0) { + var s = (Math.sqrt(dx * dx + dy * dy) / length_2 - 1) * rotateMix + 1; + mat.a *= s; + mat.b *= s; + } + } + boneX = x; + boneY = y; + if (rotate) { + var a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0; + if (tangents) + r = positions[p - 1]; + else if (spaces[i + 1] == 0) + r = positions[p + 2]; + else + r = Math.atan2(dy, dx); + r -= Math.atan2(c, a); + if (tip) { + cos = Math.cos(r); + sin = Math.sin(r); + var length_3 = bone.data.length; + boneX += (length_3 * (cos * a - sin * c) - dx) * rotateMix; + boneY += (length_3 * (sin * a + cos * c) - dy) * rotateMix; + } + else { + r += offsetRotation; + } + if (r > core.MathUtils.PI) + r -= core.MathUtils.PI2; + else if (r < -core.MathUtils.PI) + r += core.MathUtils.PI2; + r *= rotateMix; + cos = Math.cos(r); + sin = Math.sin(r); + mat.a = cos * a - sin * c; + mat.c = cos * b - sin * d; + mat.b = sin * a + cos * c; + mat.d = sin * b + cos * d; + } + bone.appliedValid = false; + } + }; + PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) { + var target = this.target; + var position = this.position; + var spaces = this.spaces, out = core.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null; + var closed = path.closed; + var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE; + if (!path.constantSpeed) { + var lengths = path.lengths; + curveCount -= closed ? 1 : 2; + var pathLength_1 = lengths[curveCount]; + if (percentPosition) + position *= pathLength_1; + if (percentSpacing) { + for (var i = 0; i < spacesCount; i++) + spaces[i] *= pathLength_1; + } + world = core.Utils.setArraySize(this.world, 8); + for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) { + var space = spaces[i]; + position += space; + var p = position; + if (closed) { + p %= pathLength_1; + if (p < 0) + p += pathLength_1; + curve = 0; + } + else if (p < 0) { + if (prevCurve != PathConstraint.BEFORE) { + prevCurve = PathConstraint.BEFORE; + path.computeWorldVertices(target, 2, 4, world, 0, 2); + } + this.addBeforePosition(p, world, 0, out, o); + continue; + } + else if (p > pathLength_1) { + if (prevCurve != PathConstraint.AFTER) { + prevCurve = PathConstraint.AFTER; + path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2); + } + this.addAfterPosition(p - pathLength_1, world, 0, out, o); + continue; + } + for (;; curve++) { + var length_4 = lengths[curve]; + if (p > length_4) + continue; + if (curve == 0) + p /= length_4; + else { + var prev = lengths[curve - 1]; + p = (p - prev) / (length_4 - prev); + } + break; + } + if (curve != prevCurve) { + prevCurve = curve; + if (closed && curve == curveCount) { + path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2); + path.computeWorldVertices(target, 0, 4, world, 4, 2); + } + else + path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2); + } + this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0)); + } + return out; + } + if (closed) { + verticesLength += 2; + world = core.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2); + path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2); + world[verticesLength - 2] = world[0]; + world[verticesLength - 1] = world[1]; + } + else { + curveCount--; + verticesLength -= 4; + world = core.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVertices(target, 2, verticesLength, world, 0, 2); + } + var curves = core.Utils.setArraySize(this.curves, curveCount); + var pathLength = 0; + var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0; + var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0; + for (var i = 0, w = 2; i < curveCount; i++, w += 6) { + cx1 = world[w]; + cy1 = world[w + 1]; + cx2 = world[w + 2]; + cy2 = world[w + 3]; + x2 = world[w + 4]; + y2 = world[w + 5]; + tmpx = (x1 - cx1 * 2 + cx2) * 0.1875; + tmpy = (y1 - cy1 * 2 + cy2) * 0.1875; + dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375; + dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375; + ddfx = tmpx * 2 + dddfx; + ddfy = tmpy * 2 + dddfy; + dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667; + dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667; + pathLength += Math.sqrt(dfx * dfx + dfy * dfy); + dfx += ddfx; + dfy += ddfy; + ddfx += dddfx; + ddfy += dddfy; + pathLength += Math.sqrt(dfx * dfx + dfy * dfy); + dfx += ddfx; + dfy += ddfy; + pathLength += Math.sqrt(dfx * dfx + dfy * dfy); + dfx += ddfx + dddfx; + dfy += ddfy + dddfy; + pathLength += Math.sqrt(dfx * dfx + dfy * dfy); + curves[i] = pathLength; + x1 = x2; + y1 = y2; + } + if (percentPosition) + position *= pathLength; + if (percentSpacing) { + for (var i = 0; i < spacesCount; i++) + spaces[i] *= pathLength; + } + var segments = this.segments; + var curveLength = 0; + for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) { + var space = spaces[i]; + position += space; + var p = position; + if (closed) { + p %= pathLength; + if (p < 0) + p += pathLength; + curve = 0; + } + else if (p < 0) { + this.addBeforePosition(p, world, 0, out, o); + continue; + } + else if (p > pathLength) { + this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o); + continue; + } + for (;; curve++) { + var length_5 = curves[curve]; + if (p > length_5) + continue; + if (curve == 0) + p /= length_5; + else { + var prev = curves[curve - 1]; + p = (p - prev) / (length_5 - prev); + } + break; + } + if (curve != prevCurve) { + prevCurve = curve; + var ii = curve * 6; + x1 = world[ii]; + y1 = world[ii + 1]; + cx1 = world[ii + 2]; + cy1 = world[ii + 3]; + cx2 = world[ii + 4]; + cy2 = world[ii + 5]; + x2 = world[ii + 6]; + y2 = world[ii + 7]; + tmpx = (x1 - cx1 * 2 + cx2) * 0.03; + tmpy = (y1 - cy1 * 2 + cy2) * 0.03; + dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006; + dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006; + ddfx = tmpx * 2 + dddfx; + ddfy = tmpy * 2 + dddfy; + dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667; + dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667; + curveLength = Math.sqrt(dfx * dfx + dfy * dfy); + segments[0] = curveLength; + for (ii = 1; ii < 8; ii++) { + dfx += ddfx; + dfy += ddfy; + ddfx += dddfx; + ddfy += dddfy; + curveLength += Math.sqrt(dfx * dfx + dfy * dfy); + segments[ii] = curveLength; + } + dfx += ddfx; + dfy += ddfy; + curveLength += Math.sqrt(dfx * dfx + dfy * dfy); + segments[8] = curveLength; + dfx += ddfx + dddfx; + dfy += ddfy + dddfy; + curveLength += Math.sqrt(dfx * dfx + dfy * dfy); + segments[9] = curveLength; + segment = 0; + } + p *= curveLength; + for (;; segment++) { + var length_6 = segments[segment]; + if (p > length_6) + continue; + if (segment == 0) + p /= length_6; + else { + var prev = segments[segment - 1]; + p = segment + (p - prev) / (length_6 - prev); + } + break; + } + this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0)); + } + return out; + }; + PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) { + var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx); + out[o] = x1 + p * Math.cos(r); + out[o + 1] = y1 + p * Math.sin(r); + out[o + 2] = r; + }; + PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) { + var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx); + out[o] = x1 + p * Math.cos(r); + out[o + 1] = y1 + p * Math.sin(r); + out[o + 2] = r; + }; + PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) { + if (p == 0 || isNaN(p)) + p = 0.0001; + var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u; + var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p; + var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt; + out[o] = x; + out[o + 1] = y; + if (tangents) + out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt)); + }; + PathConstraint.NONE = -1; + PathConstraint.BEFORE = -2; + PathConstraint.AFTER = -3; + PathConstraint.epsilon = 0.00001; + return PathConstraint; + }()); + core.PathConstraint = PathConstraint; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var PathConstraintData = (function (_super) { + __extends(PathConstraintData, _super); + function PathConstraintData(name) { + var _this = _super.call(this, name, 0, false) || this; + _this.bones = new Array(); + return _this; + } + return PathConstraintData; + }(core.ConstraintData)); + core.PathConstraintData = PathConstraintData; + var PositionMode; + (function (PositionMode) { + PositionMode[PositionMode["Fixed"] = 0] = "Fixed"; + PositionMode[PositionMode["Percent"] = 1] = "Percent"; + })(PositionMode = core.PositionMode || (core.PositionMode = {})); + var SpacingMode; + (function (SpacingMode) { + SpacingMode[SpacingMode["Length"] = 0] = "Length"; + SpacingMode[SpacingMode["Fixed"] = 1] = "Fixed"; + SpacingMode[SpacingMode["Percent"] = 2] = "Percent"; + })(SpacingMode = core.SpacingMode || (core.SpacingMode = {})); + var RotateMode; + (function (RotateMode) { + RotateMode[RotateMode["Tangent"] = 0] = "Tangent"; + RotateMode[RotateMode["Chain"] = 1] = "Chain"; + RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale"; + })(RotateMode = core.RotateMode || (core.RotateMode = {})); + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var Skeleton = (function () { + function Skeleton(data) { + this._updateCache = new Array(); + this.updateCacheReset = new Array(); + this.time = 0; + this.scaleX = 1; + this.scaleY = 1; + this.x = 0; + this.y = 0; + if (data == null) + throw new Error("data cannot be null."); + this.data = data; + this.bones = new Array(); + for (var i = 0; i < data.bones.length; i++) { + var boneData = data.bones[i]; + var bone = void 0; + if (boneData.parent == null) + bone = new core.Bone(boneData, this, null); + else { + var parent_1 = this.bones[boneData.parent.index]; + bone = new core.Bone(boneData, this, parent_1); + parent_1.children.push(bone); + } + this.bones.push(bone); + } + this.slots = new Array(); + this.drawOrder = new Array(); + for (var i = 0; i < data.slots.length; i++) { + var slotData = data.slots[i]; + var bone = this.bones[slotData.boneData.index]; + var slot = new core.Slot(slotData, bone); + this.slots.push(slot); + this.drawOrder.push(slot); + } + this.ikConstraints = new Array(); + for (var i = 0; i < data.ikConstraints.length; i++) { + var ikConstraintData = data.ikConstraints[i]; + this.ikConstraints.push(new core.IkConstraint(ikConstraintData, this)); + } + this.transformConstraints = new Array(); + for (var i = 0; i < data.transformConstraints.length; i++) { + var transformConstraintData = data.transformConstraints[i]; + this.transformConstraints.push(new core.TransformConstraint(transformConstraintData, this)); + } + this.pathConstraints = new Array(); + for (var i = 0; i < data.pathConstraints.length; i++) { + var pathConstraintData = data.pathConstraints[i]; + this.pathConstraints.push(new core.PathConstraint(pathConstraintData, this)); + } + this.color = new core.Color(1, 1, 1, 1); + this.updateCache(); + } + Skeleton.prototype.updateCache = function () { + var updateCache = this._updateCache; + updateCache.length = 0; + this.updateCacheReset.length = 0; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + bone.sorted = bone.data.skinRequired; + bone.active = !bone.sorted; + } + if (this.skin != null) { + var skinBones = this.skin.bones; + for (var i = 0, n = this.skin.bones.length; i < n; i++) { + var bone = this.bones[skinBones[i].index]; + do { + bone.sorted = false; + bone.active = true; + bone = bone.parent; + } while (bone != null); + } + } + var ikConstraints = this.ikConstraints; + var transformConstraints = this.transformConstraints; + var pathConstraints = this.pathConstraints; + var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length; + var constraintCount = ikCount + transformCount + pathCount; + outer: for (var i = 0; i < constraintCount; i++) { + for (var ii = 0; ii < ikCount; ii++) { + var constraint = ikConstraints[ii]; + if (constraint.data.order == i) { + this.sortIkConstraint(constraint); + continue outer; + } + } + for (var ii = 0; ii < transformCount; ii++) { + var constraint = transformConstraints[ii]; + if (constraint.data.order == i) { + this.sortTransformConstraint(constraint); + continue outer; + } + } + for (var ii = 0; ii < pathCount; ii++) { + var constraint = pathConstraints[ii]; + if (constraint.data.order == i) { + this.sortPathConstraint(constraint); + continue outer; + } + } + } + for (var i = 0, n = bones.length; i < n; i++) + this.sortBone(bones[i]); + }; + Skeleton.prototype.sortIkConstraint = function (constraint) { + constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && core.Utils.contains(this.skin.constraints, constraint.data, true))); + if (!constraint.active) + return; + var target = constraint.target; + this.sortBone(target); + var constrained = constraint.bones; + var parent = constrained[0]; + this.sortBone(parent); + if (constrained.length > 1) { + var child = constrained[constrained.length - 1]; + if (!(this._updateCache.indexOf(child) > -1)) + this.updateCacheReset.push(child); + } + this._updateCache.push(constraint); + this.sortReset(parent.children); + constrained[constrained.length - 1].sorted = true; + }; + Skeleton.prototype.sortPathConstraint = function (constraint) { + constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && core.Utils.contains(this.skin.constraints, constraint.data, true))); + if (!constraint.active) + return; + var slot = constraint.target; + var slotIndex = slot.data.index; + var slotBone = slot.bone; + if (this.skin != null) + this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone); + if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin) + this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone); + for (var i = 0, n = this.data.skins.length; i < n; i++) + this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone); + var attachment = slot.getAttachment(); + if (attachment instanceof core.PathAttachment) + this.sortPathConstraintAttachmentWith(attachment, slotBone); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var i = 0; i < boneCount; i++) + this.sortBone(constrained[i]); + this._updateCache.push(constraint); + for (var i = 0; i < boneCount; i++) + this.sortReset(constrained[i].children); + for (var i = 0; i < boneCount; i++) + constrained[i].sorted = true; + }; + Skeleton.prototype.sortTransformConstraint = function (constraint) { + constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && core.Utils.contains(this.skin.constraints, constraint.data, true))); + if (!constraint.active) + return; + this.sortBone(constraint.target); + var constrained = constraint.bones; + var boneCount = constrained.length; + if (constraint.data.local) { + for (var i = 0; i < boneCount; i++) { + var child = constrained[i]; + this.sortBone(child.parent); + if (!(this._updateCache.indexOf(child) > -1)) + this.updateCacheReset.push(child); + } + } + else { + for (var i = 0; i < boneCount; i++) { + this.sortBone(constrained[i]); + } + } + this._updateCache.push(constraint); + for (var ii = 0; ii < boneCount; ii++) + this.sortReset(constrained[ii].children); + for (var ii = 0; ii < boneCount; ii++) + constrained[ii].sorted = true; + }; + Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) { + var attachments = skin.attachments[slotIndex]; + if (!attachments) + return; + for (var key in attachments) { + this.sortPathConstraintAttachmentWith(attachments[key], slotBone); + } + }; + Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) { + if (!(attachment instanceof core.PathAttachment)) + return; + var pathBones = attachment.bones; + if (pathBones == null) + this.sortBone(slotBone); + else { + var bones = this.bones; + var i = 0; + while (i < pathBones.length) { + var boneCount = pathBones[i++]; + for (var n = i + boneCount; i < n; i++) { + var boneIndex = pathBones[i]; + this.sortBone(bones[boneIndex]); + } + } + } + }; + Skeleton.prototype.sortBone = function (bone) { + if (bone.sorted) + return; + var parent = bone.parent; + if (parent != null) + this.sortBone(parent); + bone.sorted = true; + this._updateCache.push(bone); + }; + Skeleton.prototype.sortReset = function (bones) { + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (!bone.active) + continue; + if (bone.sorted) + this.sortReset(bone.children); + bone.sorted = false; + } + }; + Skeleton.prototype.updateWorldTransform = function () { + var updateCacheReset = this.updateCacheReset; + for (var i = 0, n = updateCacheReset.length; i < n; i++) { + var bone = updateCacheReset[i]; + bone.ax = bone.x; + bone.ay = bone.y; + bone.arotation = bone.rotation; + bone.ascaleX = bone.scaleX; + bone.ascaleY = bone.scaleY; + bone.ashearX = bone.shearX; + bone.ashearY = bone.shearY; + bone.appliedValid = true; + } + var updateCache = this._updateCache; + for (var i = 0, n = updateCache.length; i < n; i++) + updateCache[i].update(); + }; + Skeleton.prototype.setToSetupPose = function () { + this.setBonesToSetupPose(); + this.setSlotsToSetupPose(); + }; + Skeleton.prototype.setBonesToSetupPose = function () { + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + bones[i].setToSetupPose(); + var ikConstraints = this.ikConstraints; + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var constraint = ikConstraints[i]; + constraint.mix = constraint.data.mix; + constraint.softness = constraint.data.softness; + constraint.bendDirection = constraint.data.bendDirection; + constraint.compress = constraint.data.compress; + constraint.stretch = constraint.data.stretch; + } + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + var data = constraint.data; + constraint.rotateMix = data.rotateMix; + constraint.translateMix = data.translateMix; + constraint.scaleMix = data.scaleMix; + constraint.shearMix = data.shearMix; + } + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + var data = constraint.data; + constraint.position = data.position; + constraint.spacing = data.spacing; + constraint.rotateMix = data.rotateMix; + constraint.translateMix = data.translateMix; + } + }; + Skeleton.prototype.setSlotsToSetupPose = function () { + var slots = this.slots; + core.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length); + for (var i = 0, n = slots.length; i < n; i++) + slots[i].setToSetupPose(); + }; + Skeleton.prototype.getRootBone = function () { + if (this.bones.length == 0) + return null; + return this.bones[0]; + }; + Skeleton.prototype.findBone = function (boneName) { + if (boneName == null) + throw new Error("boneName cannot be null."); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (bone.data.name == boneName) + return bone; + } + return null; + }; + Skeleton.prototype.findBoneIndex = function (boneName) { + if (boneName == null) + throw new Error("boneName cannot be null."); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + if (bones[i].data.name == boneName) + return i; + return -1; + }; + Skeleton.prototype.findSlot = function (slotName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.data.name == slotName) + return slot; + } + return null; + }; + Skeleton.prototype.findSlotIndex = function (slotName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) + if (slots[i].data.name == slotName) + return i; + return -1; + }; + Skeleton.prototype.setSkinByName = function (skinName) { + var skin = this.data.findSkin(skinName); + if (skin == null) + throw new Error("Skin not found: " + skinName); + this.setSkin(skin); + }; + Skeleton.prototype.setSkin = function (newSkin) { + if (newSkin == this.skin) + return; + if (newSkin != null) { + if (this.skin != null) + newSkin.attachAll(this, this.skin); + else { + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + var name_1 = slot.data.attachmentName; + if (name_1 != null) { + var attachment = newSkin.getAttachment(i, name_1); + if (attachment != null) + slot.setAttachment(attachment); + } + } + } + } + this.skin = newSkin; + this.updateCache(); + }; + Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) { + return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName); + }; + Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) { + if (attachmentName == null) + throw new Error("attachmentName cannot be null."); + if (this.skin != null) { + var attachment = this.skin.getAttachment(slotIndex, attachmentName); + if (attachment != null) + return attachment; + } + if (this.data.defaultSkin != null) + return this.data.defaultSkin.getAttachment(slotIndex, attachmentName); + return null; + }; + Skeleton.prototype.setAttachment = function (slotName, attachmentName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.data.name == slotName) { + var attachment = null; + if (attachmentName != null) { + attachment = this.getAttachment(i, attachmentName); + if (attachment == null) + throw new Error("Attachment not found: " + attachmentName + ", for slot: " + slotName); + } + slot.setAttachment(attachment); + return; + } + } + throw new Error("Slot not found: " + slotName); + }; + Skeleton.prototype.findIkConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var ikConstraints = this.ikConstraints; + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var ikConstraint = ikConstraints[i]; + if (ikConstraint.data.name == constraintName) + return ikConstraint; + } + return null; + }; + Skeleton.prototype.findTransformConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + if (constraint.data.name == constraintName) + return constraint; + } + return null; + }; + Skeleton.prototype.findPathConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + if (constraint.data.name == constraintName) + return constraint; + } + return null; + }; + Skeleton.prototype.getBounds = function (offset, size, temp) { + if (temp === void 0) { temp = new Array(2); } + if (offset == null) + throw new Error("offset cannot be null."); + if (size == null) + throw new Error("size cannot be null."); + var drawOrder = this.drawOrder; + var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY; + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = drawOrder[i]; + if (!slot.bone.active) + continue; + var verticesLength = 0; + var vertices = null; + var attachment = slot.getAttachment(); + if (attachment instanceof core.RegionAttachment) { + verticesLength = 8; + vertices = core.Utils.setArraySize(temp, verticesLength, 0); + attachment.computeWorldVertices(slot.bone, vertices, 0, 2); + } + else if (attachment instanceof core.MeshAttachment) { + var mesh = attachment; + verticesLength = mesh.worldVerticesLength; + vertices = core.Utils.setArraySize(temp, verticesLength, 0); + mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2); + } + if (vertices != null) { + for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) { + var x = vertices[ii], y = vertices[ii + 1]; + minX = Math.min(minX, x); + minY = Math.min(minY, y); + maxX = Math.max(maxX, x); + maxY = Math.max(maxY, y); + } + } + } + offset.set(minX, minY); + size.set(maxX - minX, maxY - minY); + }; + Skeleton.prototype.update = function (delta) { + this.time += delta; + }; + Object.defineProperty(Skeleton.prototype, "flipX", { + get: function () { + return this.scaleX == -1; + }, + set: function (value) { + if (!Skeleton.deprecatedWarning1) { + Skeleton.deprecatedWarning1 = true; + console.warn("Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY"); + } + this.scaleX = value ? 1.0 : -1.0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Skeleton.prototype, "flipY", { + get: function () { + return this.scaleY == -1; + }, + set: function (value) { + if (!Skeleton.deprecatedWarning1) { + Skeleton.deprecatedWarning1 = true; + console.warn("Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY"); + } + this.scaleY = value ? 1.0 : -1.0; + }, + enumerable: true, + configurable: true + }); + Skeleton.deprecatedWarning1 = false; + return Skeleton; + }()); + core.Skeleton = Skeleton; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var SkeletonBinary = (function () { + function SkeletonBinary(attachmentLoader) { + this.scale = 1; + this.linkedMeshes = new Array(); + this.attachmentLoader = attachmentLoader; + } + SkeletonBinary.prototype.readSkeletonData = function (binary) { + var scale = this.scale; + var skeletonData = new core.SkeletonData(); + skeletonData.name = ""; + var input = new BinaryInput(binary); + skeletonData.hash = input.readString(); + skeletonData.version = input.readString(); + skeletonData.x = input.readFloat(); + skeletonData.y = input.readFloat(); + skeletonData.width = input.readFloat(); + skeletonData.height = input.readFloat(); + var nonessential = input.readBoolean(); + if (nonessential) { + skeletonData.fps = input.readFloat(); + skeletonData.imagesPath = input.readString(); + skeletonData.audioPath = input.readString(); + } + var n = 0; + n = input.readInt(true); + for (var i = 0; i < n; i++) + input.strings.push(input.readString()); + n = input.readInt(true); + for (var i = 0; i < n; i++) { + var name_2 = input.readString(); + var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)]; + var data = new core.BoneData(i, name_2, parent_2); + data.rotation = input.readFloat(); + data.x = input.readFloat() * scale; + data.y = input.readFloat() * scale; + data.scaleX = input.readFloat(); + data.scaleY = input.readFloat(); + data.shearX = input.readFloat(); + data.shearY = input.readFloat(); + data.length = input.readFloat() * scale; + data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)]; + data.skinRequired = input.readBoolean(); + if (nonessential) + core.Color.rgba8888ToColor(data.color, input.readInt32()); + skeletonData.bones.push(data); + } + n = input.readInt(true); + for (var i = 0; i < n; i++) { + var slotName = input.readString(); + var boneData = skeletonData.bones[input.readInt(true)]; + var data = new core.SlotData(i, slotName, boneData); + core.Color.rgba8888ToColor(data.color, input.readInt32()); + var darkColor = input.readInt32(); + if (darkColor != -1) + core.Color.rgb888ToColor(data.darkColor = new core.Color(), darkColor); + data.attachmentName = input.readStringRef(); + data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)]; + skeletonData.slots.push(data); + } + n = input.readInt(true); + for (var i = 0, nn = void 0; i < n; i++) { + var data = new core.IkConstraintData(input.readString()); + data.order = input.readInt(true); + data.skinRequired = input.readBoolean(); + nn = input.readInt(true); + for (var ii = 0; ii < nn; ii++) + data.bones.push(skeletonData.bones[input.readInt(true)]); + data.target = skeletonData.bones[input.readInt(true)]; + data.mix = input.readFloat(); + data.softness = input.readFloat() * scale; + data.bendDirection = input.readByte(); + data.compress = input.readBoolean(); + data.stretch = input.readBoolean(); + data.uniform = input.readBoolean(); + skeletonData.ikConstraints.push(data); + } + n = input.readInt(true); + for (var i = 0, nn = void 0; i < n; i++) { + var data = new core.TransformConstraintData(input.readString()); + data.order = input.readInt(true); + data.skinRequired = input.readBoolean(); + nn = input.readInt(true); + for (var ii = 0; ii < nn; ii++) + data.bones.push(skeletonData.bones[input.readInt(true)]); + data.target = skeletonData.bones[input.readInt(true)]; + data.local = input.readBoolean(); + data.relative = input.readBoolean(); + data.offsetRotation = input.readFloat(); + data.offsetX = input.readFloat() * scale; + data.offsetY = input.readFloat() * scale; + data.offsetScaleX = input.readFloat(); + data.offsetScaleY = input.readFloat(); + data.offsetShearY = input.readFloat(); + data.rotateMix = input.readFloat(); + data.translateMix = input.readFloat(); + data.scaleMix = input.readFloat(); + data.shearMix = input.readFloat(); + skeletonData.transformConstraints.push(data); + } + n = input.readInt(true); + for (var i = 0, nn = void 0; i < n; i++) { + var data = new core.PathConstraintData(input.readString()); + data.order = input.readInt(true); + data.skinRequired = input.readBoolean(); + nn = input.readInt(true); + for (var ii = 0; ii < nn; ii++) + data.bones.push(skeletonData.bones[input.readInt(true)]); + data.target = skeletonData.slots[input.readInt(true)]; + data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)]; + data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)]; + data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)]; + data.offsetRotation = input.readFloat(); + data.position = input.readFloat(); + if (data.positionMode == core.PositionMode.Fixed) + data.position *= scale; + data.spacing = input.readFloat(); + if (data.spacingMode == core.SpacingMode.Length || data.spacingMode == core.SpacingMode.Fixed) + data.spacing *= scale; + data.rotateMix = input.readFloat(); + data.translateMix = input.readFloat(); + skeletonData.pathConstraints.push(data); + } + var defaultSkin = this.readSkin(input, skeletonData, true, nonessential); + if (defaultSkin != null) { + skeletonData.defaultSkin = defaultSkin; + skeletonData.skins.push(defaultSkin); + } + { + var i = skeletonData.skins.length; + core.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true)); + for (; i < n; i++) + skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential); + } + n = this.linkedMeshes.length; + for (var i = 0; i < n; i++) { + var linkedMesh = this.linkedMeshes[i]; + var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin); + if (skin == null) + throw new Error("Skin not found: " + linkedMesh.skin); + var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); + if (parent_3 == null) + throw new Error("Parent mesh not found: " + linkedMesh.parent); + linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh; + linkedMesh.mesh.setParentMesh(parent_3); + } + this.linkedMeshes.length = 0; + n = input.readInt(true); + for (var i = 0; i < n; i++) { + var data = new core.EventData(input.readStringRef()); + data.intValue = input.readInt(false); + data.floatValue = input.readFloat(); + data.stringValue = input.readString(); + data.audioPath = input.readString(); + if (data.audioPath != null) { + data.volume = input.readFloat(); + data.balance = input.readFloat(); + } + skeletonData.events.push(data); + } + n = input.readInt(true); + for (var i = 0; i < n; i++) + skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData)); + return skeletonData; + }; + SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) { + var skin = new core.Skin(defaultSkin ? "default" : input.readStringRef()); + if (!defaultSkin) { + skin.bones.length = input.readInt(true); + for (var i = 0, n = skin.bones.length; i < n; i++) + skin.bones[i] = skeletonData.bones[input.readInt(true)]; + for (var i = 0, n = input.readInt(true); i < n; i++) + skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]); + for (var i = 0, n = input.readInt(true); i < n; i++) + skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]); + for (var i = 0, n = input.readInt(true); i < n; i++) + skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]); + } + for (var i = 0, n = input.readInt(true); i < n; i++) { + var slotIndex = input.readInt(true); + for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { + var name_3 = input.readStringRef(); + var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential); + if (attachment != null) + skin.setAttachment(slotIndex, name_3, attachment); + } + } + return skin; + }; + SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) { + var scale = this.scale; + var name = input.readStringRef(); + if (name == null) + name = attachmentName; + var typeIndex = input.readByte(); + var type = SkeletonBinary.AttachmentTypeValues[typeIndex]; + switch (type) { + case core.AttachmentType.Region: { + var path = input.readStringRef(); + var rotation = input.readFloat(); + var x = input.readFloat(); + var y = input.readFloat(); + var scaleX = input.readFloat(); + var scaleY = input.readFloat(); + var width = input.readFloat(); + var height = input.readFloat(); + var color = input.readInt32(); + if (path == null) + path = name; + var region = this.attachmentLoader.newRegionAttachment(skin, name, path); + if (region == null) + return null; + region.path = path; + region.x = x * scale; + region.y = y * scale; + region.scaleX = scaleX; + region.scaleY = scaleY; + region.rotation = rotation; + region.width = width * scale; + region.height = height * scale; + core.Color.rgba8888ToColor(region.color, color); + return region; + } + case core.AttachmentType.BoundingBox: { + var vertexCount = input.readInt(true); + var vertices = this.readVertices(input, vertexCount); + var color = nonessential ? input.readInt32() : 0; + var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); + if (box == null) + return null; + box.worldVerticesLength = vertexCount << 1; + box.vertices = vertices.vertices; + box.bones = vertices.bones; + if (nonessential) + core.Color.rgba8888ToColor(box.color, color); + return box; + } + case core.AttachmentType.Mesh: { + var path = input.readStringRef(); + var color = input.readInt32(); + var vertexCount = input.readInt(true); + var uvs = this.readFloatArray(input, vertexCount << 1, 1); + var triangles = this.readShortArray(input); + var vertices = this.readVertices(input, vertexCount); + var hullLength = input.readInt(true); + var edges = null; + var width = 0, height = 0; + if (nonessential) { + edges = this.readShortArray(input); + width = input.readFloat(); + height = input.readFloat(); + } + if (path == null) + path = name; + var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path); + if (mesh == null) + return null; + mesh.path = path; + core.Color.rgba8888ToColor(mesh.color, color); + mesh.bones = vertices.bones; + mesh.vertices = vertices.vertices; + mesh.worldVerticesLength = vertexCount << 1; + mesh.triangles = triangles; + mesh.regionUVs = new Float32Array(uvs); + mesh.hullLength = hullLength << 1; + if (nonessential) { + mesh.edges = edges; + mesh.width = width * scale; + mesh.height = height * scale; + } + return mesh; + } + case core.AttachmentType.LinkedMesh: { + var path = input.readStringRef(); + var color = input.readInt32(); + var skinName = input.readStringRef(); + var parent_4 = input.readStringRef(); + var inheritDeform = input.readBoolean(); + var width = 0, height = 0; + if (nonessential) { + width = input.readFloat(); + height = input.readFloat(); + } + if (path == null) + path = name; + var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path); + if (mesh == null) + return null; + mesh.path = path; + core.Color.rgba8888ToColor(mesh.color, color); + if (nonessential) { + mesh.width = width * scale; + mesh.height = height * scale; + } + this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform)); + return mesh; + } + case core.AttachmentType.Path: { + var closed_1 = input.readBoolean(); + var constantSpeed = input.readBoolean(); + var vertexCount = input.readInt(true); + var vertices = this.readVertices(input, vertexCount); + var lengths = core.Utils.newArray(vertexCount / 3, 0); + for (var i = 0, n = lengths.length; i < n; i++) + lengths[i] = input.readFloat() * scale; + var color = nonessential ? input.readInt32() : 0; + var path = this.attachmentLoader.newPathAttachment(skin, name); + if (path == null) + return null; + path.closed = closed_1; + path.constantSpeed = constantSpeed; + path.worldVerticesLength = vertexCount << 1; + path.vertices = vertices.vertices; + path.bones = vertices.bones; + path.lengths = lengths; + if (nonessential) + core.Color.rgba8888ToColor(path.color, color); + return path; + } + case core.AttachmentType.Point: { + var rotation = input.readFloat(); + var x = input.readFloat(); + var y = input.readFloat(); + var color = nonessential ? input.readInt32() : 0; + var point = this.attachmentLoader.newPointAttachment(skin, name); + if (point == null) + return null; + point.x = x * scale; + point.y = y * scale; + point.rotation = rotation; + if (nonessential) + core.Color.rgba8888ToColor(point.color, color); + return point; + } + case core.AttachmentType.Clipping: { + var endSlotIndex = input.readInt(true); + var vertexCount = input.readInt(true); + var vertices = this.readVertices(input, vertexCount); + var color = nonessential ? input.readInt32() : 0; + var clip = this.attachmentLoader.newClippingAttachment(skin, name); + if (clip == null) + return null; + clip.endSlot = skeletonData.slots[endSlotIndex]; + clip.worldVerticesLength = vertexCount << 1; + clip.vertices = vertices.vertices; + clip.bones = vertices.bones; + if (nonessential) + core.Color.rgba8888ToColor(clip.color, color); + return clip; + } + } + return null; + }; + SkeletonBinary.prototype.readVertices = function (input, vertexCount) { + var verticesLength = vertexCount << 1; + var vertices = new Vertices(); + var scale = this.scale; + if (!input.readBoolean()) { + vertices.vertices = this.readFloatArray(input, verticesLength, scale); + return vertices; + } + var weights = new Array(); + var bonesArray = new Array(); + for (var i = 0; i < vertexCount; i++) { + var boneCount = input.readInt(true); + bonesArray.push(boneCount); + for (var ii = 0; ii < boneCount; ii++) { + bonesArray.push(input.readInt(true)); + weights.push(input.readFloat() * scale); + weights.push(input.readFloat() * scale); + weights.push(input.readFloat()); + } + } + vertices.vertices = core.Utils.toFloatArray(weights); + vertices.bones = bonesArray; + return vertices; + }; + SkeletonBinary.prototype.readFloatArray = function (input, n, scale) { + var array = new Array(n); + if (scale == 1) { + for (var i = 0; i < n; i++) + array[i] = input.readFloat(); + } + else { + for (var i = 0; i < n; i++) + array[i] = input.readFloat() * scale; + } + return array; + }; + SkeletonBinary.prototype.readShortArray = function (input) { + var n = input.readInt(true); + var array = new Array(n); + for (var i = 0; i < n; i++) + array[i] = input.readShort(); + return array; + }; + SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) { + var timelines = new Array(); + var scale = this.scale; + var duration = 0; + var tempColor1 = new core.Color(); + var tempColor2 = new core.Color(); + for (var i = 0, n = input.readInt(true); i < n; i++) { + var slotIndex = input.readInt(true); + for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { + var timelineType = input.readByte(); + var frameCount = input.readInt(true); + switch (timelineType) { + case SkeletonBinary.SLOT_ATTACHMENT: { + var timeline = new core.AttachmentTimeline(frameCount); + timeline.slotIndex = slotIndex; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) + timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef()); + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[frameCount - 1]); + break; + } + case SkeletonBinary.SLOT_COLOR: { + var timeline = new core.ColorTimeline(frameCount); + timeline.slotIndex = slotIndex; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + var time = input.readFloat(); + core.Color.rgba8888ToColor(tempColor1, input.readInt32()); + timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.ColorTimeline.ENTRIES]); + break; + } + case SkeletonBinary.SLOT_TWO_COLOR: { + var timeline = new core.TwoColorTimeline(frameCount); + timeline.slotIndex = slotIndex; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + var time = input.readFloat(); + core.Color.rgba8888ToColor(tempColor1, input.readInt32()); + core.Color.rgb888ToColor(tempColor2, input.readInt32()); + timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.TwoColorTimeline.ENTRIES]); + break; + } + } + } + } + for (var i = 0, n = input.readInt(true); i < n; i++) { + var boneIndex = input.readInt(true); + for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { + var timelineType = input.readByte(); + var frameCount = input.readInt(true); + switch (timelineType) { + case SkeletonBinary.BONE_ROTATE: { + var timeline = new core.RotateTimeline(frameCount); + timeline.boneIndex = boneIndex; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + timeline.setFrame(frameIndex, input.readFloat(), input.readFloat()); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.RotateTimeline.ENTRIES]); + break; + } + case SkeletonBinary.BONE_TRANSLATE: + case SkeletonBinary.BONE_SCALE: + case SkeletonBinary.BONE_SHEAR: { + var timeline = void 0; + var timelineScale = 1; + if (timelineType == SkeletonBinary.BONE_SCALE) + timeline = new core.ScaleTimeline(frameCount); + else if (timelineType == SkeletonBinary.BONE_SHEAR) + timeline = new core.ShearTimeline(frameCount); + else { + timeline = new core.TranslateTimeline(frameCount); + timelineScale = scale; + } + timeline.boneIndex = boneIndex; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.TranslateTimeline.ENTRIES]); + break; + } + } + } + } + for (var i = 0, n = input.readInt(true); i < n; i++) { + var index = input.readInt(true); + var frameCount = input.readInt(true); + var timeline = new core.IkConstraintTimeline(frameCount); + timeline.ikConstraintIndex = index; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean()); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.IkConstraintTimeline.ENTRIES]); + } + for (var i = 0, n = input.readInt(true); i < n; i++) { + var index = input.readInt(true); + var frameCount = input.readInt(true); + var timeline = new core.TransformConstraintTimeline(frameCount); + timeline.transformConstraintIndex = index; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat()); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.TransformConstraintTimeline.ENTRIES]); + } + for (var i = 0, n = input.readInt(true); i < n; i++) { + var index = input.readInt(true); + var data = skeletonData.pathConstraints[index]; + for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { + var timelineType = input.readByte(); + var frameCount = input.readInt(true); + switch (timelineType) { + case SkeletonBinary.PATH_POSITION: + case SkeletonBinary.PATH_SPACING: { + var timeline = void 0; + var timelineScale = 1; + if (timelineType == SkeletonBinary.PATH_SPACING) { + timeline = new core.PathConstraintSpacingTimeline(frameCount); + if (data.spacingMode == core.SpacingMode.Length || data.spacingMode == core.SpacingMode.Fixed) + timelineScale = scale; + } + else { + timeline = new core.PathConstraintPositionTimeline(frameCount); + if (data.positionMode == core.PositionMode.Fixed) + timelineScale = scale; + } + timeline.pathConstraintIndex = index; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.PathConstraintPositionTimeline.ENTRIES]); + break; + } + case SkeletonBinary.PATH_MIX: { + var timeline = new core.PathConstraintMixTimeline(frameCount); + timeline.pathConstraintIndex = index; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat()); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(frameCount - 1) * core.PathConstraintMixTimeline.ENTRIES]); + break; + } + } + } + } + for (var i = 0, n = input.readInt(true); i < n; i++) { + var skin = skeletonData.skins[input.readInt(true)]; + for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) { + var slotIndex = input.readInt(true); + for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) { + var attachment = skin.getAttachment(slotIndex, input.readStringRef()); + var weighted = attachment.bones != null; + var vertices = attachment.vertices; + var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length; + var frameCount = input.readInt(true); + var timeline = new core.DeformTimeline(frameCount); + timeline.slotIndex = slotIndex; + timeline.attachment = attachment; + for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) { + var time = input.readFloat(); + var deform = void 0; + var end = input.readInt(true); + if (end == 0) + deform = weighted ? core.Utils.newFloatArray(deformLength) : vertices; + else { + deform = core.Utils.newFloatArray(deformLength); + var start = input.readInt(true); + end += start; + if (scale == 1) { + for (var v = start; v < end; v++) + deform[v] = input.readFloat(); + } + else { + for (var v = start; v < end; v++) + deform[v] = input.readFloat() * scale; + } + if (!weighted) { + for (var v = 0, vn = deform.length; v < vn; v++) + deform[v] += vertices[v]; + } + } + timeline.setFrame(frameIndex, time, deform); + if (frameIndex < frameCount - 1) + this.readCurve(input, frameIndex, timeline); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[frameCount - 1]); + } + } + } + var drawOrderCount = input.readInt(true); + if (drawOrderCount > 0) { + var timeline = new core.DrawOrderTimeline(drawOrderCount); + var slotCount = skeletonData.slots.length; + for (var i = 0; i < drawOrderCount; i++) { + var time = input.readFloat(); + var offsetCount = input.readInt(true); + var drawOrder = core.Utils.newArray(slotCount, 0); + for (var ii = slotCount - 1; ii >= 0; ii--) + drawOrder[ii] = -1; + var unchanged = core.Utils.newArray(slotCount - offsetCount, 0); + var originalIndex = 0, unchangedIndex = 0; + for (var ii = 0; ii < offsetCount; ii++) { + var slotIndex = input.readInt(true); + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + drawOrder[originalIndex + input.readInt(true)] = originalIndex++; + } + while (originalIndex < slotCount) + unchanged[unchangedIndex++] = originalIndex++; + for (var ii = slotCount - 1; ii >= 0; ii--) + if (drawOrder[ii] == -1) + drawOrder[ii] = unchanged[--unchangedIndex]; + timeline.setFrame(i, time, drawOrder); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[drawOrderCount - 1]); + } + var eventCount = input.readInt(true); + if (eventCount > 0) { + var timeline = new core.EventTimeline(eventCount); + for (var i = 0; i < eventCount; i++) { + var time = input.readFloat(); + var eventData = skeletonData.events[input.readInt(true)]; + var event_4 = new core.Event(time, eventData); + event_4.intValue = input.readInt(false); + event_4.floatValue = input.readFloat(); + event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue; + if (event_4.data.audioPath != null) { + event_4.volume = input.readFloat(); + event_4.balance = input.readFloat(); + } + timeline.setFrame(i, event_4); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[eventCount - 1]); + } + return new core.Animation(name, timelines, duration); + }; + SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) { + switch (input.readByte()) { + case SkeletonBinary.CURVE_STEPPED: + timeline.setStepped(frameIndex); + break; + case SkeletonBinary.CURVE_BEZIER: + this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat()); + break; + } + }; + SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) { + timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2); + }; + SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6]; + SkeletonBinary.TransformModeValues = [core.TransformMode.Normal, core.TransformMode.OnlyTranslation, core.TransformMode.NoRotationOrReflection, core.TransformMode.NoScale, core.TransformMode.NoScaleOrReflection]; + SkeletonBinary.PositionModeValues = [core.PositionMode.Fixed, core.PositionMode.Percent]; + SkeletonBinary.SpacingModeValues = [core.SpacingMode.Length, core.SpacingMode.Fixed, core.SpacingMode.Percent]; + SkeletonBinary.RotateModeValues = [core.RotateMode.Tangent, core.RotateMode.Chain, core.RotateMode.ChainScale]; + SkeletonBinary.BlendModeValues = [core.BlendMode.Normal, core.BlendMode.Additive, core.BlendMode.Multiply, core.BlendMode.Screen]; + SkeletonBinary.BONE_ROTATE = 0; + SkeletonBinary.BONE_TRANSLATE = 1; + SkeletonBinary.BONE_SCALE = 2; + SkeletonBinary.BONE_SHEAR = 3; + SkeletonBinary.SLOT_ATTACHMENT = 0; + SkeletonBinary.SLOT_COLOR = 1; + SkeletonBinary.SLOT_TWO_COLOR = 2; + SkeletonBinary.PATH_POSITION = 0; + SkeletonBinary.PATH_SPACING = 1; + SkeletonBinary.PATH_MIX = 2; + SkeletonBinary.CURVE_LINEAR = 0; + SkeletonBinary.CURVE_STEPPED = 1; + SkeletonBinary.CURVE_BEZIER = 2; + return SkeletonBinary; + }()); + core.SkeletonBinary = SkeletonBinary; + var BinaryInput = (function () { + function BinaryInput(data, strings, index, buffer) { + if (strings === void 0) { strings = new Array(); } + if (index === void 0) { index = 0; } + if (buffer === void 0) { buffer = new DataView(data.buffer); } + this.strings = strings; + this.index = index; + this.buffer = buffer; + } + BinaryInput.prototype.readByte = function () { + return this.buffer.getInt8(this.index++); + }; + BinaryInput.prototype.readShort = function () { + var value = this.buffer.getInt16(this.index); + this.index += 2; + return value; + }; + BinaryInput.prototype.readInt32 = function () { + var value = this.buffer.getInt32(this.index); + this.index += 4; + return value; + }; + BinaryInput.prototype.readInt = function (optimizePositive) { + var b = this.readByte(); + var result = b & 0x7F; + if ((b & 0x80) != 0) { + b = this.readByte(); + result |= (b & 0x7F) << 7; + if ((b & 0x80) != 0) { + b = this.readByte(); + result |= (b & 0x7F) << 14; + if ((b & 0x80) != 0) { + b = this.readByte(); + result |= (b & 0x7F) << 21; + if ((b & 0x80) != 0) { + b = this.readByte(); + result |= (b & 0x7F) << 28; + } + } + } + } + return optimizePositive ? result : ((result >>> 1) ^ -(result & 1)); + }; + BinaryInput.prototype.readStringRef = function () { + var index = this.readInt(true); + return index == 0 ? null : this.strings[index - 1]; + }; + BinaryInput.prototype.readString = function () { + var byteCount = this.readInt(true); + switch (byteCount) { + case 0: + return null; + case 1: + return ""; + } + byteCount--; + var chars = ""; + var charCount = 0; + for (var i = 0; i < byteCount;) { + var b = this.readByte(); + switch (b >> 4) { + case 12: + case 13: + chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F)); + i += 2; + break; + case 14: + chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F)); + i += 3; + break; + default: + chars += String.fromCharCode(b); + i++; + } + } + return chars; + }; + BinaryInput.prototype.readFloat = function () { + var value = this.buffer.getFloat32(this.index); + this.index += 4; + return value; + }; + BinaryInput.prototype.readBoolean = function () { + return this.readByte() != 0; + }; + return BinaryInput; + }()); + var LinkedMesh = (function () { + function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) { + this.mesh = mesh; + this.skin = skin; + this.slotIndex = slotIndex; + this.parent = parent; + this.inheritDeform = inheritDeform; + } + return LinkedMesh; + }()); + var Vertices = (function () { + function Vertices(bones, vertices) { + if (bones === void 0) { bones = null; } + if (vertices === void 0) { vertices = null; } + this.bones = bones; + this.vertices = vertices; + } + return Vertices; + }()); + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var SkeletonBounds = (function () { + function SkeletonBounds() { + this.minX = 0; + this.minY = 0; + this.maxX = 0; + this.maxY = 0; + this.boundingBoxes = new Array(); + this.polygons = new Array(); + this.polygonPool = new core.Pool(function () { + return core.Utils.newFloatArray(16); + }); + } + SkeletonBounds.prototype.update = function (skeleton, updateAabb) { + if (skeleton == null) + throw new Error("skeleton cannot be null."); + var boundingBoxes = this.boundingBoxes; + var polygons = this.polygons; + var polygonPool = this.polygonPool; + var slots = skeleton.slots; + var slotCount = slots.length; + boundingBoxes.length = 0; + polygonPool.freeAll(polygons); + polygons.length = 0; + for (var i = 0; i < slotCount; i++) { + var slot = slots[i]; + if (!slot.bone.active) + continue; + var attachment = slot.getAttachment(); + if (attachment instanceof core.BoundingBoxAttachment) { + var boundingBox = attachment; + boundingBoxes.push(boundingBox); + var polygon = polygonPool.obtain(); + if (polygon.length != boundingBox.worldVerticesLength) { + polygon = core.Utils.newFloatArray(boundingBox.worldVerticesLength); + } + polygons.push(polygon); + boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2); + } + } + if (updateAabb) { + this.aabbCompute(); + } + else { + this.minX = Number.POSITIVE_INFINITY; + this.minY = Number.POSITIVE_INFINITY; + this.maxX = Number.NEGATIVE_INFINITY; + this.maxY = Number.NEGATIVE_INFINITY; + } + }; + SkeletonBounds.prototype.aabbCompute = function () { + var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY; + var polygons = this.polygons; + for (var i = 0, n = polygons.length; i < n; i++) { + var polygon = polygons[i]; + var vertices = polygon; + for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) { + var x = vertices[ii]; + var y = vertices[ii + 1]; + minX = Math.min(minX, x); + minY = Math.min(minY, y); + maxX = Math.max(maxX, x); + maxY = Math.max(maxY, y); + } + } + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + SkeletonBounds.prototype.aabbContainsPoint = function (x, y) { + return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY; + }; + SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY)) + return false; + var m = (y2 - y1) / (x2 - x1); + var y = m * (minX - x1) + y1; + if (y > minY && y < maxY) + return true; + y = m * (maxX - x1) + y1; + if (y > minY && y < maxY) + return true; + var x = (minY - y1) / m + x1; + if (x > minX && x < maxX) + return true; + x = (maxY - y1) / m + x1; + if (x > minX && x < maxX) + return true; + return false; + }; + SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) { + return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY; + }; + SkeletonBounds.prototype.containsPoint = function (x, y) { + var polygons = this.polygons; + for (var i = 0, n = polygons.length; i < n; i++) + if (this.containsPointPolygon(polygons[i], x, y)) + return this.boundingBoxes[i]; + return null; + }; + SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) { + var vertices = polygon; + var nn = polygon.length; + var prevIndex = nn - 2; + var inside = false; + for (var ii = 0; ii < nn; ii += 2) { + var vertexY = vertices[ii + 1]; + var prevY = vertices[prevIndex + 1]; + if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) { + var vertexX = vertices[ii]; + if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) + inside = !inside; + } + prevIndex = ii; + } + return inside; + }; + SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) { + var polygons = this.polygons; + for (var i = 0, n = polygons.length; i < n; i++) + if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) + return this.boundingBoxes[i]; + return null; + }; + SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) { + var vertices = polygon; + var nn = polygon.length; + var width12 = x1 - x2, height12 = y1 - y2; + var det1 = x1 * y2 - y1 * x2; + var x3 = vertices[nn - 2], y3 = vertices[nn - 1]; + for (var ii = 0; ii < nn; ii += 2) { + var x4 = vertices[ii], y4 = vertices[ii + 1]; + var det2 = x3 * y4 - y3 * x4; + var width34 = x3 - x4, height34 = y3 - y4; + var det3 = width12 * height34 - height12 * width34; + var x = (det1 * width34 - width12 * det2) / det3; + if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) { + var y = (det1 * height34 - height12 * det2) / det3; + if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) + return true; + } + x3 = x4; + y3 = y4; + } + return false; + }; + SkeletonBounds.prototype.getPolygon = function (boundingBox) { + if (boundingBox == null) + throw new Error("boundingBox cannot be null."); + var index = this.boundingBoxes.indexOf(boundingBox); + return index == -1 ? null : this.polygons[index]; + }; + SkeletonBounds.prototype.getWidth = function () { + return this.maxX - this.minX; + }; + SkeletonBounds.prototype.getHeight = function () { + return this.maxY - this.minY; + }; + return SkeletonBounds; + }()); + core.SkeletonBounds = SkeletonBounds; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var SkeletonClipping = (function () { + function SkeletonClipping() { + this.triangulator = new core.Triangulator(); + this.clippingPolygon = new Array(); + this.clipOutput = new Array(); + this.clippedVertices = new Array(); + this.clippedTriangles = new Array(); + this.scratch = new Array(); + } + SkeletonClipping.prototype.clipStart = function (slot, clip) { + if (this.clipAttachment != null) + return 0; + this.clipAttachment = clip; + var n = clip.worldVerticesLength; + var vertices = core.Utils.setArraySize(this.clippingPolygon, n); + clip.computeWorldVertices(slot, 0, n, vertices, 0, 2); + var clippingPolygon = this.clippingPolygon; + SkeletonClipping.makeClockwise(clippingPolygon); + var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); + for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + var polygon = clippingPolygons[i]; + SkeletonClipping.makeClockwise(polygon); + polygon.push(polygon[0]); + polygon.push(polygon[1]); + } + return clippingPolygons.length; + }; + SkeletonClipping.prototype.clipEndWithSlot = function (slot) { + if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data) + this.clipEnd(); + }; + SkeletonClipping.prototype.clipEnd = function () { + if (this.clipAttachment == null) + return; + this.clipAttachment = null; + this.clippingPolygons = null; + this.clippedVertices.length = 0; + this.clippedTriangles.length = 0; + this.clippingPolygon.length = 0; + }; + SkeletonClipping.prototype.isClipping = function () { + return this.clipAttachment != null; + }; + SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) { + var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices; + var clippedTriangles = this.clippedTriangles; + var polygons = this.clippingPolygons; + var polygonsCount = this.clippingPolygons.length; + var vertexSize = twoColor ? 12 : 8; + var index = 0; + clippedVertices.length = 0; + clippedTriangles.length = 0; + outer: for (var i = 0; i < trianglesLength; i += 3) { + var vertexOffset = triangles[i] << 1; + var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1]; + var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1]; + vertexOffset = triangles[i + 1] << 1; + var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1]; + var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1]; + vertexOffset = triangles[i + 2] << 1; + var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1]; + var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1]; + for (var p = 0; p < polygonsCount; p++) { + var s = clippedVertices.length; + if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) { + var clipOutputLength = clipOutput.length; + if (clipOutputLength == 0) + continue; + var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1; + var d = 1 / (d0 * d2 + d1 * (y1 - y3)); + var clipOutputCount = clipOutputLength >> 1; + var clipOutputItems = this.clipOutput; + var clippedVerticesItems = core.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize); + for (var ii = 0; ii < clipOutputLength; ii += 2) { + var x = clipOutputItems[ii], y = clipOutputItems[ii + 1]; + clippedVerticesItems[s] = x; + clippedVerticesItems[s + 1] = y; + clippedVerticesItems[s + 2] = light.r; + clippedVerticesItems[s + 3] = light.g; + clippedVerticesItems[s + 4] = light.b; + clippedVerticesItems[s + 5] = light.a; + var c0 = x - x3, c1 = y - y3; + var a = (d0 * c0 + d1 * c1) * d; + var b = (d4 * c0 + d2 * c1) * d; + var c = 1 - a - b; + clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c; + clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c; + if (twoColor) { + clippedVerticesItems[s + 8] = dark.r; + clippedVerticesItems[s + 9] = dark.g; + clippedVerticesItems[s + 10] = dark.b; + clippedVerticesItems[s + 11] = dark.a; + } + s += vertexSize; + } + s = clippedTriangles.length; + var clippedTrianglesItems = core.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2)); + clipOutputCount--; + for (var ii = 1; ii < clipOutputCount; ii++) { + clippedTrianglesItems[s] = index; + clippedTrianglesItems[s + 1] = (index + ii); + clippedTrianglesItems[s + 2] = (index + ii + 1); + s += 3; + } + index += clipOutputCount + 1; + } + else { + var clippedVerticesItems = core.Utils.setArraySize(clippedVertices, s + 3 * vertexSize); + clippedVerticesItems[s] = x1; + clippedVerticesItems[s + 1] = y1; + clippedVerticesItems[s + 2] = light.r; + clippedVerticesItems[s + 3] = light.g; + clippedVerticesItems[s + 4] = light.b; + clippedVerticesItems[s + 5] = light.a; + if (!twoColor) { + clippedVerticesItems[s + 6] = u1; + clippedVerticesItems[s + 7] = v1; + clippedVerticesItems[s + 8] = x2; + clippedVerticesItems[s + 9] = y2; + clippedVerticesItems[s + 10] = light.r; + clippedVerticesItems[s + 11] = light.g; + clippedVerticesItems[s + 12] = light.b; + clippedVerticesItems[s + 13] = light.a; + clippedVerticesItems[s + 14] = u2; + clippedVerticesItems[s + 15] = v2; + clippedVerticesItems[s + 16] = x3; + clippedVerticesItems[s + 17] = y3; + clippedVerticesItems[s + 18] = light.r; + clippedVerticesItems[s + 19] = light.g; + clippedVerticesItems[s + 20] = light.b; + clippedVerticesItems[s + 21] = light.a; + clippedVerticesItems[s + 22] = u3; + clippedVerticesItems[s + 23] = v3; + } + else { + clippedVerticesItems[s + 6] = u1; + clippedVerticesItems[s + 7] = v1; + clippedVerticesItems[s + 8] = dark.r; + clippedVerticesItems[s + 9] = dark.g; + clippedVerticesItems[s + 10] = dark.b; + clippedVerticesItems[s + 11] = dark.a; + clippedVerticesItems[s + 12] = x2; + clippedVerticesItems[s + 13] = y2; + clippedVerticesItems[s + 14] = light.r; + clippedVerticesItems[s + 15] = light.g; + clippedVerticesItems[s + 16] = light.b; + clippedVerticesItems[s + 17] = light.a; + clippedVerticesItems[s + 18] = u2; + clippedVerticesItems[s + 19] = v2; + clippedVerticesItems[s + 20] = dark.r; + clippedVerticesItems[s + 21] = dark.g; + clippedVerticesItems[s + 22] = dark.b; + clippedVerticesItems[s + 23] = dark.a; + clippedVerticesItems[s + 24] = x3; + clippedVerticesItems[s + 25] = y3; + clippedVerticesItems[s + 26] = light.r; + clippedVerticesItems[s + 27] = light.g; + clippedVerticesItems[s + 28] = light.b; + clippedVerticesItems[s + 29] = light.a; + clippedVerticesItems[s + 30] = u3; + clippedVerticesItems[s + 31] = v3; + clippedVerticesItems[s + 32] = dark.r; + clippedVerticesItems[s + 33] = dark.g; + clippedVerticesItems[s + 34] = dark.b; + clippedVerticesItems[s + 35] = dark.a; + } + s = clippedTriangles.length; + var clippedTrianglesItems = core.Utils.setArraySize(clippedTriangles, s + 3); + clippedTrianglesItems[s] = index; + clippedTrianglesItems[s + 1] = (index + 1); + clippedTrianglesItems[s + 2] = (index + 2); + index += 3; + continue outer; + } + } + } + }; + SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) { + var originalOutput = output; + var clipped = false; + var input = null; + if (clippingArea.length % 4 >= 2) { + input = output; + output = this.scratch; + } + else + input = this.scratch; + input.length = 0; + input.push(x1); + input.push(y1); + input.push(x2); + input.push(y2); + input.push(x3); + input.push(y3); + input.push(x1); + input.push(y1); + output.length = 0; + var clippingVertices = clippingArea; + var clippingVerticesLast = clippingArea.length - 4; + for (var i = 0;; i += 2) { + var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1]; + var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3]; + var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2; + var inputVertices = input; + var inputVerticesLength = input.length - 2, outputStart = output.length; + for (var ii = 0; ii < inputVerticesLength; ii += 2) { + var inputX = inputVertices[ii], inputY = inputVertices[ii + 1]; + var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3]; + var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0; + if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) { + if (side2) { + output.push(inputX2); + output.push(inputY2); + continue; + } + var c0 = inputY2 - inputY, c2 = inputX2 - inputX; + var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY)); + output.push(edgeX + (edgeX2 - edgeX) * ua); + output.push(edgeY + (edgeY2 - edgeY) * ua); + } + else if (side2) { + var c0 = inputY2 - inputY, c2 = inputX2 - inputX; + var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY)); + output.push(edgeX + (edgeX2 - edgeX) * ua); + output.push(edgeY + (edgeY2 - edgeY) * ua); + output.push(inputX2); + output.push(inputY2); + } + clipped = true; + } + if (outputStart == output.length) { + originalOutput.length = 0; + return true; + } + output.push(output[0]); + output.push(output[1]); + if (i == clippingVerticesLast) + break; + var temp = output; + output = input; + output.length = 0; + input = temp; + } + if (originalOutput != output) { + originalOutput.length = 0; + for (var i = 0, n = output.length - 2; i < n; i++) + originalOutput[i] = output[i]; + } + else + originalOutput.length = originalOutput.length - 2; + return clipped; + }; + SkeletonClipping.makeClockwise = function (polygon) { + var vertices = polygon; + var verticeslength = polygon.length; + var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0; + for (var i = 0, n = verticeslength - 3; i < n; i += 2) { + p1x = vertices[i]; + p1y = vertices[i + 1]; + p2x = vertices[i + 2]; + p2y = vertices[i + 3]; + area += p1x * p2y - p2x * p1y; + } + if (area < 0) + return; + for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) { + var x = vertices[i], y = vertices[i + 1]; + var other = lastX - i; + vertices[i] = vertices[other]; + vertices[i + 1] = vertices[other + 1]; + vertices[other] = x; + vertices[other + 1] = y; + } + }; + return SkeletonClipping; + }()); + core.SkeletonClipping = SkeletonClipping; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var SkeletonData = (function () { + function SkeletonData() { + this.bones = new Array(); + this.slots = new Array(); + this.skins = new Array(); + this.events = new Array(); + this.animations = new Array(); + this.ikConstraints = new Array(); + this.transformConstraints = new Array(); + this.pathConstraints = new Array(); + this.fps = 0; + } + SkeletonData.prototype.findBone = function (boneName) { + if (boneName == null) + throw new Error("boneName cannot be null."); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (bone.name == boneName) + return bone; + } + return null; + }; + SkeletonData.prototype.findBoneIndex = function (boneName) { + if (boneName == null) + throw new Error("boneName cannot be null."); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + if (bones[i].name == boneName) + return i; + return -1; + }; + SkeletonData.prototype.findSlot = function (slotName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.name == slotName) + return slot; + } + return null; + }; + SkeletonData.prototype.findSlotIndex = function (slotName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) + if (slots[i].name == slotName) + return i; + return -1; + }; + SkeletonData.prototype.findSkin = function (skinName) { + if (skinName == null) + throw new Error("skinName cannot be null."); + var skins = this.skins; + for (var i = 0, n = skins.length; i < n; i++) { + var skin = skins[i]; + if (skin.name == skinName) + return skin; + } + return null; + }; + SkeletonData.prototype.findEvent = function (eventDataName) { + if (eventDataName == null) + throw new Error("eventDataName cannot be null."); + var events = this.events; + for (var i = 0, n = events.length; i < n; i++) { + var event_5 = events[i]; + if (event_5.name == eventDataName) + return event_5; + } + return null; + }; + SkeletonData.prototype.findAnimation = function (animationName) { + if (animationName == null) + throw new Error("animationName cannot be null."); + var animations = this.animations; + for (var i = 0, n = animations.length; i < n; i++) { + var animation = animations[i]; + if (animation.name == animationName) + return animation; + } + return null; + }; + SkeletonData.prototype.findIkConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var ikConstraints = this.ikConstraints; + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var constraint = ikConstraints[i]; + if (constraint.name == constraintName) + return constraint; + } + return null; + }; + SkeletonData.prototype.findTransformConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + if (constraint.name == constraintName) + return constraint; + } + return null; + }; + SkeletonData.prototype.findPathConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + if (constraint.name == constraintName) + return constraint; + } + return null; + }; + SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) { + if (pathConstraintName == null) + throw new Error("pathConstraintName cannot be null."); + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) + if (pathConstraints[i].name == pathConstraintName) + return i; + return -1; + }; + return SkeletonData; + }()); + core.SkeletonData = SkeletonData; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var SkeletonJson = (function () { + function SkeletonJson(attachmentLoader) { + this.scale = 1; + this.linkedMeshes = new Array(); + this.attachmentLoader = attachmentLoader; + } + SkeletonJson.prototype.readSkeletonData = function (json) { + var scale = this.scale; + var skeletonData = new core.SkeletonData(); + var root = typeof (json) === "string" ? JSON.parse(json) : json; + var skeletonMap = root.skeleton; + if (skeletonMap != null) { + skeletonData.hash = skeletonMap.hash; + skeletonData.version = skeletonMap.spine; + skeletonData.x = skeletonMap.x; + skeletonData.y = skeletonMap.y; + skeletonData.width = skeletonMap.width; + skeletonData.height = skeletonMap.height; + skeletonData.fps = skeletonMap.fps; + skeletonData.imagesPath = skeletonMap.images; + } + if (root.bones) { + for (var i = 0; i < root.bones.length; i++) { + var boneMap = root.bones[i]; + var parent_5 = null; + var parentName = this.getValue(boneMap, "parent", null); + if (parentName != null) { + parent_5 = skeletonData.findBone(parentName); + if (parent_5 == null) + throw new Error("Parent bone not found: " + parentName); + } + var data = new core.BoneData(skeletonData.bones.length, boneMap.name, parent_5); + data.length = this.getValue(boneMap, "length", 0) * scale; + data.x = this.getValue(boneMap, "x", 0) * scale; + data.y = this.getValue(boneMap, "y", 0) * scale; + data.rotation = this.getValue(boneMap, "rotation", 0); + data.scaleX = this.getValue(boneMap, "scaleX", 1); + data.scaleY = this.getValue(boneMap, "scaleY", 1); + data.shearX = this.getValue(boneMap, "shearX", 0); + data.shearY = this.getValue(boneMap, "shearY", 0); + data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, "transform", "normal")); + data.skinRequired = this.getValue(boneMap, "skin", false); + skeletonData.bones.push(data); + } + } + if (root.slots) { + for (var i = 0; i < root.slots.length; i++) { + var slotMap = root.slots[i]; + var slotName = slotMap.name; + var boneName = slotMap.bone; + var boneData = skeletonData.findBone(boneName); + if (boneData == null) + throw new Error("Slot bone not found: " + boneName); + var data = new core.SlotData(skeletonData.slots.length, slotName, boneData); + var color = this.getValue(slotMap, "color", null); + if (color != null) + data.color.setFromString(color); + var dark = this.getValue(slotMap, "dark", null); + if (dark != null) { + data.darkColor = new core.Color(1, 1, 1, 1); + data.darkColor.setFromString(dark); + } + data.attachmentName = this.getValue(slotMap, "attachment", null); + data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal")); + skeletonData.slots.push(data); + } + } + if (root.ik) { + for (var i = 0; i < root.ik.length; i++) { + var constraintMap = root.ik[i]; + var data = new core.IkConstraintData(constraintMap.name); + data.order = this.getValue(constraintMap, "order", 0); + data.skinRequired = this.getValue(constraintMap, "skin", false); + for (var j = 0; j < constraintMap.bones.length; j++) { + var boneName = constraintMap.bones[j]; + var bone = skeletonData.findBone(boneName); + if (bone == null) + throw new Error("IK bone not found: " + boneName); + data.bones.push(bone); + } + var targetName = constraintMap.target; + data.target = skeletonData.findBone(targetName); + if (data.target == null) + throw new Error("IK target bone not found: " + targetName); + data.mix = this.getValue(constraintMap, "mix", 1); + data.softness = this.getValue(constraintMap, "softness", 0) * scale; + data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1; + data.compress = this.getValue(constraintMap, "compress", false); + data.stretch = this.getValue(constraintMap, "stretch", false); + data.uniform = this.getValue(constraintMap, "uniform", false); + skeletonData.ikConstraints.push(data); + } + } + if (root.transform) { + for (var i = 0; i < root.transform.length; i++) { + var constraintMap = root.transform[i]; + var data = new core.TransformConstraintData(constraintMap.name); + data.order = this.getValue(constraintMap, "order", 0); + data.skinRequired = this.getValue(constraintMap, "skin", false); + for (var j = 0; j < constraintMap.bones.length; j++) { + var boneName = constraintMap.bones[j]; + var bone = skeletonData.findBone(boneName); + if (bone == null) + throw new Error("Transform constraint bone not found: " + boneName); + data.bones.push(bone); + } + var targetName = constraintMap.target; + data.target = skeletonData.findBone(targetName); + if (data.target == null) + throw new Error("Transform constraint target bone not found: " + targetName); + data.local = this.getValue(constraintMap, "local", false); + data.relative = this.getValue(constraintMap, "relative", false); + data.offsetRotation = this.getValue(constraintMap, "rotation", 0); + data.offsetX = this.getValue(constraintMap, "x", 0) * scale; + data.offsetY = this.getValue(constraintMap, "y", 0) * scale; + data.offsetScaleX = this.getValue(constraintMap, "scaleX", 0); + data.offsetScaleY = this.getValue(constraintMap, "scaleY", 0); + data.offsetShearY = this.getValue(constraintMap, "shearY", 0); + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + data.scaleMix = this.getValue(constraintMap, "scaleMix", 1); + data.shearMix = this.getValue(constraintMap, "shearMix", 1); + skeletonData.transformConstraints.push(data); + } + } + if (root.path) { + for (var i = 0; i < root.path.length; i++) { + var constraintMap = root.path[i]; + var data = new core.PathConstraintData(constraintMap.name); + data.order = this.getValue(constraintMap, "order", 0); + data.skinRequired = this.getValue(constraintMap, "skin", false); + for (var j = 0; j < constraintMap.bones.length; j++) { + var boneName = constraintMap.bones[j]; + var bone = skeletonData.findBone(boneName); + if (bone == null) + throw new Error("Transform constraint bone not found: " + boneName); + data.bones.push(bone); + } + var targetName = constraintMap.target; + data.target = skeletonData.findSlot(targetName); + if (data.target == null) + throw new Error("Path target slot not found: " + targetName); + data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, "positionMode", "percent")); + data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, "spacingMode", "length")); + data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, "rotateMode", "tangent")); + data.offsetRotation = this.getValue(constraintMap, "rotation", 0); + data.position = this.getValue(constraintMap, "position", 0); + if (data.positionMode == core.PositionMode.Fixed) + data.position *= scale; + data.spacing = this.getValue(constraintMap, "spacing", 0); + if (data.spacingMode == core.SpacingMode.Length || data.spacingMode == core.SpacingMode.Fixed) + data.spacing *= scale; + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + skeletonData.pathConstraints.push(data); + } + } + if (root.skins) { + for (var i = 0; i < root.skins.length; i++) { + var skinMap = root.skins[i]; + var skin = new core.Skin(skinMap.name); + if (skinMap.bones) { + for (var ii = 0; ii < skinMap.bones.length; ii++) { + var bone = skeletonData.findBone(skinMap.bones[ii]); + if (bone == null) + throw new Error("Skin bone not found: " + skinMap.bones[i]); + skin.bones.push(bone); + } + } + if (skinMap.ik) { + for (var ii = 0; ii < skinMap.ik.length; ii++) { + var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]); + if (constraint == null) + throw new Error("Skin IK constraint not found: " + skinMap.ik[i]); + skin.constraints.push(constraint); + } + } + if (skinMap.transform) { + for (var ii = 0; ii < skinMap.transform.length; ii++) { + var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]); + if (constraint == null) + throw new Error("Skin transform constraint not found: " + skinMap.transform[i]); + skin.constraints.push(constraint); + } + } + if (skinMap.path) { + for (var ii = 0; ii < skinMap.path.length; ii++) { + var constraint = skeletonData.findPathConstraint(skinMap.path[ii]); + if (constraint == null) + throw new Error("Skin path constraint not found: " + skinMap.path[i]); + skin.constraints.push(constraint); + } + } + for (var slotName in skinMap.attachments) { + var slot = skeletonData.findSlot(slotName); + if (slot == null) + throw new Error("Slot not found: " + slotName); + var slotMap = skinMap.attachments[slotName]; + for (var entryName in slotMap) { + var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData); + if (attachment != null) + skin.setAttachment(slot.index, entryName, attachment); + } + } + skeletonData.skins.push(skin); + if (skin.name == "default") + skeletonData.defaultSkin = skin; + } + } + for (var i = 0, n = this.linkedMeshes.length; i < n; i++) { + var linkedMesh = this.linkedMeshes[i]; + var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin); + if (skin == null) + throw new Error("Skin not found: " + linkedMesh.skin); + var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); + if (parent_6 == null) + throw new Error("Parent mesh not found: " + linkedMesh.parent); + linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh; + linkedMesh.mesh.setParentMesh(parent_6); + } + this.linkedMeshes.length = 0; + if (root.events) { + for (var eventName in root.events) { + var eventMap = root.events[eventName]; + var data = new core.EventData(eventName); + data.intValue = this.getValue(eventMap, "int", 0); + data.floatValue = this.getValue(eventMap, "float", 0); + data.stringValue = this.getValue(eventMap, "string", ""); + data.audioPath = this.getValue(eventMap, "audio", null); + if (data.audioPath != null) { + data.volume = this.getValue(eventMap, "volume", 1); + data.balance = this.getValue(eventMap, "balance", 0); + } + skeletonData.events.push(data); + } + } + if (root.animations) { + for (var animationName in root.animations) { + var animationMap = root.animations[animationName]; + this.readAnimation(animationMap, animationName, skeletonData); + } + } + return skeletonData; + }; + SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) { + var scale = this.scale; + name = this.getValue(map, "name", name); + var type = this.getValue(map, "type", "region"); + switch (type) { + case "region": { + var path = this.getValue(map, "path", name); + var region = this.attachmentLoader.newRegionAttachment(skin, name, path); + if (region == null) + return null; + region.path = path; + region.x = this.getValue(map, "x", 0) * scale; + region.y = this.getValue(map, "y", 0) * scale; + region.scaleX = this.getValue(map, "scaleX", 1); + region.scaleY = this.getValue(map, "scaleY", 1); + region.rotation = this.getValue(map, "rotation", 0); + region.width = map.width * scale; + region.height = map.height * scale; + var color = this.getValue(map, "color", null); + if (color != null) + region.color.setFromString(color); + return region; + } + case "boundingbox": { + var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); + if (box == null) + return null; + this.readVertices(map, box, map.vertexCount << 1); + var color = this.getValue(map, "color", null); + if (color != null) + box.color.setFromString(color); + return box; + } + case "mesh": + case "linkedmesh": { + var path = this.getValue(map, "path", name); + var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path); + if (mesh == null) + return null; + mesh.path = path; + var color = this.getValue(map, "color", null); + if (color != null) + mesh.color.setFromString(color); + mesh.width = this.getValue(map, "width", 0) * scale; + mesh.height = this.getValue(map, "height", 0) * scale; + var parent_7 = this.getValue(map, "parent", null); + if (parent_7 != null) { + this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent_7, this.getValue(map, "deform", true))); + return mesh; + } + var uvs = map.uvs; + this.readVertices(map, mesh, uvs.length); + mesh.triangles = map.triangles; + mesh.regionUVs = new Float32Array(uvs); + mesh.edges = this.getValue(map, "edges", null); + mesh.hullLength = this.getValue(map, "hull", 0) * 2; + return mesh; + } + case "path": { + var path = this.attachmentLoader.newPathAttachment(skin, name); + if (path == null) + return null; + path.closed = this.getValue(map, "closed", false); + path.constantSpeed = this.getValue(map, "constantSpeed", true); + var vertexCount = map.vertexCount; + this.readVertices(map, path, vertexCount << 1); + var lengths = core.Utils.newArray(vertexCount / 3, 0); + for (var i = 0; i < map.lengths.length; i++) + lengths[i] = map.lengths[i] * scale; + path.lengths = lengths; + var color = this.getValue(map, "color", null); + if (color != null) + path.color.setFromString(color); + return path; + } + case "point": { + var point = this.attachmentLoader.newPointAttachment(skin, name); + if (point == null) + return null; + point.x = this.getValue(map, "x", 0) * scale; + point.y = this.getValue(map, "y", 0) * scale; + point.rotation = this.getValue(map, "rotation", 0); + var color = this.getValue(map, "color", null); + if (color != null) + point.color.setFromString(color); + return point; + } + case "clipping": { + var clip = this.attachmentLoader.newClippingAttachment(skin, name); + if (clip == null) + return null; + var end = this.getValue(map, "end", null); + if (end != null) { + var slot = skeletonData.findSlot(end); + if (slot == null) + throw new Error("Clipping end slot not found: " + end); + clip.endSlot = slot; + } + var vertexCount = map.vertexCount; + this.readVertices(map, clip, vertexCount << 1); + var color = this.getValue(map, "color", null); + if (color != null) + clip.color.setFromString(color); + return clip; + } + } + return null; + }; + SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) { + var scale = this.scale; + attachment.worldVerticesLength = verticesLength; + var vertices = map.vertices; + if (verticesLength == vertices.length) { + var scaledVertices = core.Utils.toFloatArray(vertices); + if (scale != 1) { + for (var i = 0, n = vertices.length; i < n; i++) + scaledVertices[i] *= scale; + } + attachment.vertices = scaledVertices; + return; + } + var weights = new Array(); + var bones = new Array(); + for (var i = 0, n = vertices.length; i < n;) { + var boneCount = vertices[i++]; + bones.push(boneCount); + for (var nn = i + boneCount * 4; i < nn; i += 4) { + bones.push(vertices[i]); + weights.push(vertices[i + 1] * scale); + weights.push(vertices[i + 2] * scale); + weights.push(vertices[i + 3]); + } + } + attachment.bones = bones; + attachment.vertices = core.Utils.toFloatArray(weights); + }; + SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) { + var scale = this.scale; + var timelines = new Array(); + var duration = 0; + if (map.slots) { + for (var slotName in map.slots) { + var slotMap = map.slots[slotName]; + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotName); + for (var timelineName in slotMap) { + var timelineMap = slotMap[timelineName]; + if (timelineName == "attachment") { + var timeline = new core.AttachmentTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex++, this.getValue(valueMap, "time", 0), valueMap.name); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + else if (timelineName == "color") { + var timeline = new core.ColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var color = new core.Color(); + color.setFromString(valueMap.color || "ffffffff"); + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), color.r, color.g, color.b, color.a); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.ColorTimeline.ENTRIES]); + } + else if (timelineName == "twoColor") { + var timeline = new core.TwoColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var light = new core.Color(); + var dark = new core.Color(); + light.setFromString(valueMap.light); + dark.setFromString(valueMap.dark); + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.TwoColorTimeline.ENTRIES]); + } + else + throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); + } + } + } + if (map.bones) { + for (var boneName in map.bones) { + var boneMap = map.bones[boneName]; + var boneIndex = skeletonData.findBoneIndex(boneName); + if (boneIndex == -1) + throw new Error("Bone not found: " + boneName); + for (var timelineName in boneMap) { + var timelineMap = boneMap[timelineName]; + if (timelineName === "rotate") { + var timeline = new core.RotateTimeline(timelineMap.length); + timeline.boneIndex = boneIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "angle", 0)); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.RotateTimeline.ENTRIES]); + } + else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") { + var timeline = null; + var timelineScale = 1, defaultValue = 0; + if (timelineName === "scale") { + timeline = new core.ScaleTimeline(timelineMap.length); + defaultValue = 1; + } + else if (timelineName === "shear") + timeline = new core.ShearTimeline(timelineMap.length); + else { + timeline = new core.TranslateTimeline(timelineMap.length); + timelineScale = scale; + } + timeline.boneIndex = boneIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var x = this.getValue(valueMap, "x", defaultValue), y = this.getValue(valueMap, "y", defaultValue); + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), x * timelineScale, y * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.TranslateTimeline.ENTRIES]); + } + else + throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); + } + } + } + if (map.ik) { + for (var constraintName in map.ik) { + var constraintMap = map.ik[constraintName]; + var constraint = skeletonData.findIkConstraint(constraintName); + var timeline = new core.IkConstraintTimeline(constraintMap.length); + timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint); + var frameIndex = 0; + for (var i = 0; i < constraintMap.length; i++) { + var valueMap = constraintMap[i]; + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale, this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false)); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.IkConstraintTimeline.ENTRIES]); + } + } + if (map.transform) { + for (var constraintName in map.transform) { + var constraintMap = map.transform[constraintName]; + var constraint = skeletonData.findTransformConstraint(constraintName); + var timeline = new core.TransformConstraintTimeline(constraintMap.length); + timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint); + var frameIndex = 0; + for (var i = 0; i < constraintMap.length; i++) { + var valueMap = constraintMap[i]; + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1), this.getValue(valueMap, "scaleMix", 1), this.getValue(valueMap, "shearMix", 1)); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.TransformConstraintTimeline.ENTRIES]); + } + } + if (map.path) { + for (var constraintName in map.path) { + var constraintMap = map.path[constraintName]; + var index = skeletonData.findPathConstraintIndex(constraintName); + if (index == -1) + throw new Error("Path constraint not found: " + constraintName); + var data = skeletonData.pathConstraints[index]; + for (var timelineName in constraintMap) { + var timelineMap = constraintMap[timelineName]; + if (timelineName === "position" || timelineName === "spacing") { + var timeline = null; + var timelineScale = 1; + if (timelineName === "spacing") { + timeline = new core.PathConstraintSpacingTimeline(timelineMap.length); + if (data.spacingMode == core.SpacingMode.Length || data.spacingMode == core.SpacingMode.Fixed) + timelineScale = scale; + } + else { + timeline = new core.PathConstraintPositionTimeline(timelineMap.length); + if (data.positionMode == core.PositionMode.Fixed) + timelineScale = scale; + } + timeline.pathConstraintIndex = index; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, timelineName, 0) * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.PathConstraintPositionTimeline.ENTRIES]); + } + else if (timelineName === "mix") { + var timeline = new core.PathConstraintMixTimeline(timelineMap.length); + timeline.pathConstraintIndex = index; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1)); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * core.PathConstraintMixTimeline.ENTRIES]); + } + } + } + } + if (map.deform) { + for (var deformName in map.deform) { + var deformMap = map.deform[deformName]; + var skin = skeletonData.findSkin(deformName); + if (skin == null) + throw new Error("Skin not found: " + deformName); + for (var slotName in deformMap) { + var slotMap = deformMap[slotName]; + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotMap.name); + for (var timelineName in slotMap) { + var timelineMap = slotMap[timelineName]; + var attachment = skin.getAttachment(slotIndex, timelineName); + if (attachment == null) + throw new Error("Deform attachment not found: " + timelineMap.name); + var weighted = attachment.bones != null; + var vertices = attachment.vertices; + var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length; + var timeline = new core.DeformTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + timeline.attachment = attachment; + var frameIndex = 0; + for (var j = 0; j < timelineMap.length; j++) { + var valueMap = timelineMap[j]; + var deform = void 0; + var verticesValue = this.getValue(valueMap, "vertices", null); + if (verticesValue == null) + deform = weighted ? core.Utils.newFloatArray(deformLength) : vertices; + else { + deform = core.Utils.newFloatArray(deformLength); + var start = this.getValue(valueMap, "offset", 0); + core.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length); + if (scale != 1) { + for (var i = start, n = i + verticesValue.length; i < n; i++) + deform[i] *= scale; + } + if (!weighted) { + for (var i = 0; i < deformLength; i++) + deform[i] += vertices[i]; + } + } + timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), deform); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + } + } + } + var drawOrderNode = map.drawOrder; + if (drawOrderNode == null) + drawOrderNode = map.draworder; + if (drawOrderNode != null) { + var timeline = new core.DrawOrderTimeline(drawOrderNode.length); + var slotCount = skeletonData.slots.length; + var frameIndex = 0; + for (var j = 0; j < drawOrderNode.length; j++) { + var drawOrderMap = drawOrderNode[j]; + var drawOrder = null; + var offsets = this.getValue(drawOrderMap, "offsets", null); + if (offsets != null) { + drawOrder = core.Utils.newArray(slotCount, -1); + var unchanged = core.Utils.newArray(slotCount - offsets.length, 0); + var originalIndex = 0, unchangedIndex = 0; + for (var i = 0; i < offsets.length; i++) { + var offsetMap = offsets[i]; + var slotIndex = skeletonData.findSlotIndex(offsetMap.slot); + if (slotIndex == -1) + throw new Error("Slot not found: " + offsetMap.slot); + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + drawOrder[originalIndex + offsetMap.offset] = originalIndex++; + } + while (originalIndex < slotCount) + unchanged[unchangedIndex++] = originalIndex++; + for (var i = slotCount - 1; i >= 0; i--) + if (drawOrder[i] == -1) + drawOrder[i] = unchanged[--unchangedIndex]; + } + timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, "time", 0), drawOrder); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + if (map.events) { + var timeline = new core.EventTimeline(map.events.length); + var frameIndex = 0; + for (var i = 0; i < map.events.length; i++) { + var eventMap = map.events[i]; + var eventData = skeletonData.findEvent(eventMap.name); + if (eventData == null) + throw new Error("Event not found: " + eventMap.name); + var event_6 = new core.Event(core.Utils.toSinglePrecision(this.getValue(eventMap, "time", 0)), eventData); + event_6.intValue = this.getValue(eventMap, "int", eventData.intValue); + event_6.floatValue = this.getValue(eventMap, "float", eventData.floatValue); + event_6.stringValue = this.getValue(eventMap, "string", eventData.stringValue); + if (event_6.data.audioPath != null) { + event_6.volume = this.getValue(eventMap, "volume", 1); + event_6.balance = this.getValue(eventMap, "balance", 0); + } + timeline.setFrame(frameIndex++, event_6); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + if (isNaN(duration)) { + throw new Error("Error while parsing animation, duration is NaN"); + } + skeletonData.animations.push(new core.Animation(name, timelines, duration)); + }; + SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { + if (!map.curve) + return; + if (map.curve === "stepped") + timeline.setStepped(frameIndex); + else { + var curve = map.curve; + timeline.setCurve(frameIndex, curve, this.getValue(map, "c2", 0), this.getValue(map, "c3", 1), this.getValue(map, "c4", 1)); + } + }; + SkeletonJson.prototype.getValue = function (map, prop, defaultValue) { + return map[prop] !== undefined ? map[prop] : defaultValue; + }; + SkeletonJson.blendModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "normal") + return core.BlendMode.Normal; + if (str == "additive") + return core.BlendMode.Additive; + if (str == "multiply") + return core.BlendMode.Multiply; + if (str == "screen") + return core.BlendMode.Screen; + throw new Error("Unknown blend mode: " + str); + }; + SkeletonJson.positionModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "fixed") + return core.PositionMode.Fixed; + if (str == "percent") + return core.PositionMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.spacingModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "length") + return core.SpacingMode.Length; + if (str == "fixed") + return core.SpacingMode.Fixed; + if (str == "percent") + return core.SpacingMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.rotateModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "tangent") + return core.RotateMode.Tangent; + if (str == "chain") + return core.RotateMode.Chain; + if (str == "chainscale") + return core.RotateMode.ChainScale; + throw new Error("Unknown rotate mode: " + str); + }; + SkeletonJson.transformModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "normal") + return core.TransformMode.Normal; + if (str == "onlytranslation") + return core.TransformMode.OnlyTranslation; + if (str == "norotationorreflection") + return core.TransformMode.NoRotationOrReflection; + if (str == "noscale") + return core.TransformMode.NoScale; + if (str == "noscaleorreflection") + return core.TransformMode.NoScaleOrReflection; + throw new Error("Unknown transform mode: " + str); + }; + return SkeletonJson; + }()); + core.SkeletonJson = SkeletonJson; + var LinkedMesh = (function () { + function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) { + this.mesh = mesh; + this.skin = skin; + this.slotIndex = slotIndex; + this.parent = parent; + this.inheritDeform = inheritDeform; + } + return LinkedMesh; + }()); + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var SkinEntry = (function () { + function SkinEntry(slotIndex, name, attachment) { + this.slotIndex = slotIndex; + this.name = name; + this.attachment = attachment; + } + return SkinEntry; + }()); + core.SkinEntry = SkinEntry; + var Skin = (function () { + function Skin(name) { + this.attachments = new Array(); + this.bones = Array(); + this.constraints = new Array(); + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + Skin.prototype.setAttachment = function (slotIndex, name, attachment) { + if (attachment == null) + throw new Error("attachment cannot be null."); + var attachments = this.attachments; + if (slotIndex >= attachments.length) + attachments.length = slotIndex + 1; + if (!attachments[slotIndex]) + attachments[slotIndex] = {}; + attachments[slotIndex][name] = attachment; + }; + Skin.prototype.addSkin = function (skin) { + for (var i = 0; i < skin.bones.length; i++) { + var bone = skin.bones[i]; + var contained = false; + for (var j = 0; j < this.bones.length; j++) { + if (this.bones[j] == bone) { + contained = true; + break; + } + } + if (!contained) + this.bones.push(bone); + } + for (var i = 0; i < skin.constraints.length; i++) { + var constraint = skin.constraints[i]; + var contained = false; + for (var j = 0; j < this.constraints.length; j++) { + if (this.constraints[j] == constraint) { + contained = true; + break; + } + } + if (!contained) + this.constraints.push(constraint); + } + var attachments = skin.getAttachments(); + for (var i = 0; i < attachments.length; i++) { + var attachment = attachments[i]; + this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment); + } + }; + Skin.prototype.copySkin = function (skin) { + for (var i = 0; i < skin.bones.length; i++) { + var bone = skin.bones[i]; + var contained = false; + for (var j = 0; j < this.bones.length; j++) { + if (this.bones[j] == bone) { + contained = true; + break; + } + } + if (!contained) + this.bones.push(bone); + } + for (var i = 0; i < skin.constraints.length; i++) { + var constraint = skin.constraints[i]; + var contained = false; + for (var j = 0; j < this.constraints.length; j++) { + if (this.constraints[j] == constraint) { + contained = true; + break; + } + } + if (!contained) + this.constraints.push(constraint); + } + var attachments = skin.getAttachments(); + for (var i = 0; i < attachments.length; i++) { + var attachment = attachments[i]; + if (attachment.attachment == null) + continue; + if (attachment.attachment instanceof core.MeshAttachment) { + attachment.attachment = attachment.attachment.newLinkedMesh(); + this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment); + } + else { + attachment.attachment = attachment.attachment.copy(); + this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment); + } + } + }; + Skin.prototype.getAttachment = function (slotIndex, name) { + var dictionary = this.attachments[slotIndex]; + return dictionary ? dictionary[name] : null; + }; + Skin.prototype.removeAttachment = function (slotIndex, name) { + var dictionary = this.attachments[slotIndex]; + if (dictionary) + dictionary[name] = null; + }; + Skin.prototype.getAttachments = function () { + var entries = new Array(); + for (var i = 0; i < this.attachments.length; i++) { + var slotAttachments = this.attachments[i]; + if (slotAttachments) { + for (var name_4 in slotAttachments) { + var attachment = slotAttachments[name_4]; + if (attachment) + entries.push(new SkinEntry(i, name_4, attachment)); + } + } + } + return entries; + }; + Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) { + var slotAttachments = this.attachments[slotIndex]; + if (slotAttachments) { + for (var name_5 in slotAttachments) { + var attachment = slotAttachments[name_5]; + if (attachment) + attachments.push(new SkinEntry(slotIndex, name_5, attachment)); + } + } + }; + Skin.prototype.clear = function () { + this.attachments.length = 0; + this.bones.length = 0; + this.constraints.length = 0; + }; + Skin.prototype.attachAll = function (skeleton, oldSkin) { + var slotIndex = 0; + for (var i = 0; i < skeleton.slots.length; i++) { + var slot = skeleton.slots[i]; + var slotAttachment = slot.getAttachment(); + if (slotAttachment && slotIndex < oldSkin.attachments.length) { + var dictionary = oldSkin.attachments[slotIndex]; + for (var key in dictionary) { + var skinAttachment = dictionary[key]; + if (slotAttachment == skinAttachment) { + var attachment = this.getAttachment(slotIndex, key); + if (attachment != null) + slot.setAttachment(attachment); + break; + } + } + } + else { + var attachmentName = slot.data.attachmentName; + if (attachmentName != null) { + var attachment = this.getAttachment(slotIndex, attachmentName); + if (attachment != null) + slot.setAttachment(attachment); + } + } + slotIndex++; + } + }; + return Skin; + }()); + core.Skin = Skin; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var Slot = (function () { + function Slot(data, bone) { + this.deform = new Array(); + if (data == null) + throw new Error("data cannot be null."); + if (bone == null) + throw new Error("bone cannot be null."); + this.data = data; + this.bone = bone; + this.color = new core.Color(); + this.darkColor = data.darkColor == null ? null : new core.Color(); + this.setToSetupPose(); + this.blendMode = this.data.blendMode; + } + Slot.prototype.getAttachment = function () { + return this.attachment; + }; + Slot.prototype.setAttachment = function (attachment) { + if (this.attachment == attachment) + return; + this.attachment = attachment; + this.attachmentTime = this.bone.skeleton.time; + this.deform.length = 0; + }; + Slot.prototype.setAttachmentTime = function (time) { + this.attachmentTime = this.bone.skeleton.time - time; + }; + Slot.prototype.getAttachmentTime = function () { + return this.bone.skeleton.time - this.attachmentTime; + }; + Slot.prototype.setToSetupPose = function () { + this.color.setFromColor(this.data.color); + if (this.darkColor != null) + this.darkColor.setFromColor(this.data.darkColor); + if (this.data.attachmentName == null) + this.attachment = null; + else { + this.attachment = null; + this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName)); + } + }; + return Slot; + }()); + core.Slot = Slot; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var SlotData = (function () { + function SlotData(index, name, boneData) { + this.color = new core.Color(1, 1, 1, 1); + if (index < 0) + throw new Error("index must be >= 0."); + if (name == null) + throw new Error("name cannot be null."); + if (boneData == null) + throw new Error("boneData cannot be null."); + this.index = index; + this.name = name; + this.boneData = boneData; + } + return SlotData; + }()); + core.SlotData = SlotData; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var Texture = (function () { + function Texture(image) { + this._image = image; + } + Texture.prototype.getImage = function () { + return this._image; + }; + Texture.filterFromString = function (text) { + switch (text.toLowerCase()) { + case "nearest": return TextureFilter.Nearest; + case "linear": return TextureFilter.Linear; + case "mipmap": return TextureFilter.MipMap; + case "mipmapnearestnearest": return TextureFilter.MipMapNearestNearest; + case "mipmaplinearnearest": return TextureFilter.MipMapLinearNearest; + case "mipmapnearestlinear": return TextureFilter.MipMapNearestLinear; + case "mipmaplinearlinear": return TextureFilter.MipMapLinearLinear; + default: throw new Error("Unknown texture filter " + text); + } + }; + Texture.wrapFromString = function (text) { + switch (text.toLowerCase()) { + case "mirroredtepeat": return TextureWrap.MirroredRepeat; + case "clamptoedge": return TextureWrap.ClampToEdge; + case "repeat": return TextureWrap.Repeat; + default: throw new Error("Unknown texture wrap " + text); + } + }; + return Texture; + }()); + core.Texture = Texture; + var TextureFilter; + (function (TextureFilter) { + TextureFilter[TextureFilter["Nearest"] = 9728] = "Nearest"; + TextureFilter[TextureFilter["Linear"] = 9729] = "Linear"; + TextureFilter[TextureFilter["MipMap"] = 9987] = "MipMap"; + TextureFilter[TextureFilter["MipMapNearestNearest"] = 9984] = "MipMapNearestNearest"; + TextureFilter[TextureFilter["MipMapLinearNearest"] = 9985] = "MipMapLinearNearest"; + TextureFilter[TextureFilter["MipMapNearestLinear"] = 9986] = "MipMapNearestLinear"; + TextureFilter[TextureFilter["MipMapLinearLinear"] = 9987] = "MipMapLinearLinear"; + })(TextureFilter = core.TextureFilter || (core.TextureFilter = {})); + var TextureWrap; + (function (TextureWrap) { + TextureWrap[TextureWrap["MirroredRepeat"] = 33648] = "MirroredRepeat"; + TextureWrap[TextureWrap["ClampToEdge"] = 33071] = "ClampToEdge"; + TextureWrap[TextureWrap["Repeat"] = 10497] = "Repeat"; + })(TextureWrap = core.TextureWrap || (core.TextureWrap = {})); + var TextureRegion = (function () { + function TextureRegion() { + this.size = null; + } + Object.defineProperty(TextureRegion.prototype, "width", { + get: function () { + var tex = this.texture; + if (PIXI.VERSION[0] == '3') { + return tex.crop.width; + } + if (tex.trim) { + return tex.trim.width; + } + return tex.orig.width; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "height", { + get: function () { + var tex = this.texture; + if (PIXI.VERSION[0] == '3') { + return tex.crop.height; + } + if (tex.trim) { + return tex.trim.height; + } + return tex.orig.height; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "u", { + get: function () { + return this.texture._uvs.x0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "v", { + get: function () { + return this.texture._uvs.y0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "u2", { + get: function () { + return this.texture._uvs.x2; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "v2", { + get: function () { + return this.texture._uvs.y2; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "offsetX", { + get: function () { + var tex = this.texture; + return tex.trim ? tex.trim.x : 0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "offsetY", { + get: function () { + console.warn("Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on."); + return this.spineOffsetY; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "pixiOffsetY", { + get: function () { + var tex = this.texture; + return tex.trim ? tex.trim.y : 0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "spineOffsetY", { + get: function () { + var tex = this.texture; + return this.originalHeight - this.height - (tex.trim ? tex.trim.y : 0); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "originalWidth", { + get: function () { + var tex = this.texture; + if (PIXI.VERSION[0] == '3') { + if (tex.trim) { + return tex.trim.width; + } + return tex.crop.width; + } + return tex.orig.width; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "originalHeight", { + get: function () { + var tex = this.texture; + if (PIXI.VERSION[0] == '3') { + if (tex.trim) { + return tex.trim.height; + } + return tex.crop.height; + } + return tex.orig.height; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "x", { + get: function () { + return this.texture.frame.x; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "y", { + get: function () { + return this.texture.frame.y; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextureRegion.prototype, "rotate", { + get: function () { + return this.texture.rotate !== 0; + }, + enumerable: true, + configurable: true + }); + return TextureRegion; + }()); + core.TextureRegion = TextureRegion; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var TextureAtlas = (function () { + function TextureAtlas(atlasText, textureLoader, callback) { + this.pages = new Array(); + this.regions = new Array(); + if (atlasText) { + this.addSpineAtlas(atlasText, textureLoader, callback); + } + } + TextureAtlas.prototype.addTexture = function (name, texture) { + var pages = this.pages; + var page = null; + for (var i = 0; i < pages.length; i++) { + if (pages[i].baseTexture === texture.baseTexture) { + page = pages[i]; + break; + } + } + if (page === null) { + page = new TextureAtlasPage(); + page.name = 'texturePage'; + var baseTexture = texture.baseTexture; + page.width = baseTexture.realWidth; + page.height = baseTexture.realHeight; + page.baseTexture = baseTexture; + page.minFilter = page.magFilter = core.TextureFilter.Nearest; + page.uWrap = core.TextureWrap.ClampToEdge; + page.vWrap = core.TextureWrap.ClampToEdge; + pages.push(page); + } + var region = new TextureAtlasRegion(); + region.name = name; + region.page = page; + region.texture = texture; + region.index = -1; + this.regions.push(region); + return region; + }; + TextureAtlas.prototype.addTextureHash = function (textures, stripExtension) { + for (var key in textures) { + if (textures.hasOwnProperty(key)) { + this.addTexture(stripExtension && key.indexOf('.') !== -1 ? key.substr(0, key.lastIndexOf('.')) : key, textures[key]); + } + } + }; + TextureAtlas.prototype.addSpineAtlas = function (atlasText, textureLoader, callback) { + return this.load(atlasText, textureLoader, callback); + }; + TextureAtlas.prototype.load = function (atlasText, textureLoader, callback) { + var _this = this; + if (textureLoader == null) + throw new Error("textureLoader cannot be null."); + var reader = new TextureAtlasReader(atlasText); + var tuple = new Array(4); + var page = null; + var iterateParser = function () { + while (true) { + var line = reader.readLine(); + if (line == null) { + return callback && callback(_this); + } + line = line.trim(); + if (line.length == 0) + page = null; + else if (!page) { + page = new TextureAtlasPage(); + page.name = line; + if (reader.readTuple(tuple) == 2) { + page.width = parseInt(tuple[0]); + page.height = parseInt(tuple[1]); + reader.readTuple(tuple); + } + reader.readTuple(tuple); + page.minFilter = core.Texture.filterFromString(tuple[0]); + page.magFilter = core.Texture.filterFromString(tuple[1]); + var direction = reader.readValue(); + page.uWrap = core.TextureWrap.ClampToEdge; + page.vWrap = core.TextureWrap.ClampToEdge; + if (direction == "x") + page.uWrap = core.TextureWrap.Repeat; + else if (direction == "y") + page.vWrap = core.TextureWrap.Repeat; + else if (direction == "xy") + page.uWrap = page.vWrap = core.TextureWrap.Repeat; + textureLoader(line, function (texture) { + if (texture === null) { + _this.pages.splice(_this.pages.indexOf(page), 1); + return callback && callback(null); + } + page.baseTexture = texture; + if (!texture.hasLoaded) { + texture.width = page.width; + texture.height = page.height; + } + _this.pages.push(page); + page.setFilters(); + if (!page.width || !page.height) { + page.width = texture.realWidth; + page.height = texture.realHeight; + if (!page.width || !page.height) { + console.log("ERROR spine atlas page " + page.name + ": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)"); + } + } + iterateParser(); + }); + _this.pages.push(page); + break; + } + else { + var region = new TextureAtlasRegion(); + region.name = line; + region.page = page; + var rotateValue = reader.readValue(); + var rotate = 0; + if (rotateValue.toLocaleLowerCase() == "true") { + rotate = 6; + } + else if (rotateValue.toLocaleLowerCase() == "false") { + rotate = 0; + } + else { + rotate = ((720 - parseFloat(rotateValue)) % 360) / 45; + } + reader.readTuple(tuple); + var x = parseInt(tuple[0]); + var y = parseInt(tuple[1]); + reader.readTuple(tuple); + var width = parseInt(tuple[0]); + var height = parseInt(tuple[1]); + var resolution = page.baseTexture.resolution; + x /= resolution; + y /= resolution; + width /= resolution; + height /= resolution; + var frame = new PIXI.Rectangle(x, y, rotate ? height : width, rotate ? width : height); + if (reader.readTuple(tuple) == 4) { + if (reader.readTuple(tuple) == 4) { + reader.readTuple(tuple); + } + } + var originalWidth = parseInt(tuple[0]) / resolution; + var originalHeight = parseInt(tuple[1]) / resolution; + reader.readTuple(tuple); + var offsetX = parseInt(tuple[0]) / resolution; + var offsetY = parseInt(tuple[1]) / resolution; + var orig = new PIXI.Rectangle(0, 0, originalWidth, originalHeight); + var trim = new PIXI.Rectangle(offsetX, originalHeight - height - offsetY, width, height); + if (PIXI.VERSION[0] != '3') { + region.texture = new PIXI.Texture(region.page.baseTexture, frame, orig, trim, rotate); + } + else { + var frame2 = new PIXI.Rectangle(x, y, width, height); + var crop = frame2.clone(); + trim.width = originalWidth; + trim.height = originalHeight; + region.texture = new PIXI.Texture(region.page.baseTexture, frame2, crop, trim, rotate); + } + region.index = parseInt(reader.readValue()); + region.texture._updateUvs(); + _this.regions.push(region); + } + } + }; + iterateParser(); + }; + TextureAtlas.prototype.findRegion = function (name) { + for (var i = 0; i < this.regions.length; i++) { + if (this.regions[i].name == name) { + return this.regions[i]; + } + } + return null; + }; + TextureAtlas.prototype.dispose = function () { + for (var i = 0; i < this.pages.length; i++) { + this.pages[i].baseTexture.dispose(); + } + }; + return TextureAtlas; + }()); + core.TextureAtlas = TextureAtlas; + var TextureAtlasReader = (function () { + function TextureAtlasReader(text) { + this.index = 0; + this.lines = text.split(/\r\n|\r|\n/); + } + TextureAtlasReader.prototype.readLine = function () { + if (this.index >= this.lines.length) + return null; + return this.lines[this.index++]; + }; + TextureAtlasReader.prototype.readValue = function () { + var line = this.readLine(); + var colon = line.indexOf(":"); + if (colon == -1) + throw new Error("Invalid line: " + line); + return line.substring(colon + 1).trim(); + }; + TextureAtlasReader.prototype.readTuple = function (tuple) { + var line = this.readLine(); + var colon = line.indexOf(":"); + if (colon == -1) + throw new Error("Invalid line: " + line); + var i = 0, lastMatch = colon + 1; + for (; i < 3; i++) { + var comma = line.indexOf(",", lastMatch); + if (comma == -1) + break; + tuple[i] = line.substr(lastMatch, comma - lastMatch).trim(); + lastMatch = comma + 1; + } + tuple[i] = line.substring(lastMatch).trim(); + return i + 1; + }; + return TextureAtlasReader; + }()); + var TextureAtlasPage = (function () { + function TextureAtlasPage() { + } + TextureAtlasPage.prototype.setFilters = function () { + var tex = this.baseTexture; + var filter = this.minFilter; + if (filter == core.TextureFilter.Linear) { + tex.scaleMode = PIXI.SCALE_MODES.LINEAR; + } + else if (this.minFilter == core.TextureFilter.Nearest) { + tex.scaleMode = PIXI.SCALE_MODES.NEAREST; + } + else { + tex.mipmap = true; + if (filter == core.TextureFilter.MipMapNearestNearest) { + tex.scaleMode = PIXI.SCALE_MODES.NEAREST; + } + else { + tex.scaleMode = PIXI.SCALE_MODES.LINEAR; + } + } + }; + return TextureAtlasPage; + }()); + core.TextureAtlasPage = TextureAtlasPage; + var TextureAtlasRegion = (function (_super) { + __extends(TextureAtlasRegion, _super); + function TextureAtlasRegion() { + return _super !== null && _super.apply(this, arguments) || this; + } + return TextureAtlasRegion; + }(core.TextureRegion)); + core.TextureAtlasRegion = TextureAtlasRegion; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var TransformConstraint = (function () { + function TransformConstraint(data, skeleton) { + this.rotateMix = 0; + this.translateMix = 0; + this.scaleMix = 0; + this.shearMix = 0; + this.temp = new core.Vector2(); + this.active = false; + if (data == null) + throw new Error("data cannot be null."); + if (skeleton == null) + throw new Error("skeleton cannot be null."); + this.data = data; + this.rotateMix = data.rotateMix; + this.translateMix = data.translateMix; + this.scaleMix = data.scaleMix; + this.shearMix = data.shearMix; + this.bones = new Array(); + for (var i = 0; i < data.bones.length; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findBone(data.target.name); + } + TransformConstraint.prototype.isActive = function () { + return this.active; + }; + TransformConstraint.prototype.apply = function () { + this.update(); + }; + TransformConstraint.prototype.update = function () { + if (this.data.local) { + if (this.data.relative) + this.applyRelativeLocal(); + else + this.applyAbsoluteLocal(); + } + else { + if (this.data.relative) + this.applyRelativeWorld(); + else + this.applyAbsoluteWorld(); + } + }; + TransformConstraint.prototype.applyAbsoluteWorld = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + var targetMat = target.matrix; + var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d; + var degRadReflect = ta * td - tb * tc > 0 ? core.MathUtils.degRad : -core.MathUtils.degRad; + var offsetRotation = this.data.offsetRotation * degRadReflect; + var offsetShearY = this.data.offsetShearY * degRadReflect; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + var modified = false; + var mat = bone.matrix; + if (rotateMix != 0) { + var a = mat.a, b = mat.c, c = mat.b, d = mat.d; + var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation; + if (r > core.MathUtils.PI) + r -= core.MathUtils.PI2; + else if (r < -core.MathUtils.PI) + r += core.MathUtils.PI2; + r *= rotateMix; + var cos = Math.cos(r), sin = Math.sin(r); + mat.a = cos * a - sin * c; + mat.c = cos * b - sin * d; + mat.b = sin * a + cos * c; + mat.d = sin * b + cos * d; + modified = true; + } + if (translateMix != 0) { + var temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + mat.tx += (temp.x - mat.tx) * translateMix; + mat.ty += (temp.y - mat.ty) * translateMix; + modified = true; + } + if (scaleMix > 0) { + var s = Math.sqrt(mat.a * mat.a + mat.b * mat.b); + var ts = Math.sqrt(ta * ta + tc * tc); + if (s > 0.00001) + s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s; + mat.a *= s; + mat.b *= s; + s = Math.sqrt(mat.c * mat.c + mat.d * mat.d); + ts = Math.sqrt(tb * tb + td * td); + if (s > 0.00001) + s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s; + mat.c *= s; + mat.d *= s; + modified = true; + } + if (shearMix > 0) { + var b = mat.c, d = mat.d; + var by = Math.atan2(d, b); + var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a)); + if (r > core.MathUtils.PI) + r -= core.MathUtils.PI2; + else if (r < -core.MathUtils.PI) + r += core.MathUtils.PI2; + r = by + (r + offsetShearY) * shearMix; + var s = Math.sqrt(b * b + d * d); + mat.c = Math.cos(r) * s; + mat.d = Math.sin(r) * s; + modified = true; + } + if (modified) + bone.appliedValid = false; + } + }; + TransformConstraint.prototype.applyRelativeWorld = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + var targetMat = target.matrix; + var ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d; + var degRadReflect = ta * td - tb * tc > 0 ? core.MathUtils.degRad : -core.MathUtils.degRad; + var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + var modified = false; + var mat = bone.matrix; + if (rotateMix != 0) { + var a = mat.a, b = mat.c, c = mat.b, d = mat.d; + var r = Math.atan2(tc, ta) + offsetRotation; + if (r > core.MathUtils.PI) + r -= core.MathUtils.PI2; + else if (r < -core.MathUtils.PI) + r += core.MathUtils.PI2; + r *= rotateMix; + var cos = Math.cos(r), sin = Math.sin(r); + mat.a = cos * a - sin * c; + mat.c = cos * b - sin * d; + mat.b = sin * a + cos * c; + mat.d = sin * b + cos * d; + modified = true; + } + if (translateMix != 0) { + var temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + mat.tx += temp.x * translateMix; + mat.ty += temp.y * translateMix; + modified = true; + } + if (scaleMix > 0) { + var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1; + mat.a *= s; + mat.b *= s; + s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1; + mat.c *= s; + mat.d *= s; + modified = true; + } + if (shearMix > 0) { + var r = Math.atan2(td, tb) - Math.atan2(tc, ta); + if (r > core.MathUtils.PI) + r -= core.MathUtils.PI2; + else if (r < -core.MathUtils.PI) + r += core.MathUtils.PI2; + var b = mat.c, d = mat.d; + r = Math.atan2(d, b) + (r - core.MathUtils.PI / 2 + offsetShearY) * shearMix; + var s = Math.sqrt(b * b + d * d); + mat.c = Math.cos(r) * s; + mat.d = Math.sin(r) * s; + modified = true; + } + if (modified) + bone.appliedValid = false; + } + }; + TransformConstraint.prototype.applyAbsoluteLocal = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + if (!target.appliedValid) + target.updateAppliedTransform(); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (!bone.appliedValid) + bone.updateAppliedTransform(); + var rotation = bone.arotation; + if (rotateMix != 0) { + var r = target.arotation - rotation + this.data.offsetRotation; + r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; + rotation += r * rotateMix; + } + var x = bone.ax, y = bone.ay; + if (translateMix != 0) { + x += (target.ax - x + this.data.offsetX) * translateMix; + y += (target.ay - y + this.data.offsetY) * translateMix; + } + var scaleX = bone.ascaleX, scaleY = bone.ascaleY; + if (scaleMix > 0) { + if (scaleX > 0.00001) + scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX; + if (scaleY > 0.00001) + scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY; + } + var shearY = bone.ashearY; + if (shearMix > 0) { + var r = target.ashearY - shearY + this.data.offsetShearY; + r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; + bone.shearY += r * shearMix; + } + bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY); + } + }; + TransformConstraint.prototype.applyRelativeLocal = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + if (!target.appliedValid) + target.updateAppliedTransform(); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (!bone.appliedValid) + bone.updateAppliedTransform(); + var rotation = bone.arotation; + if (rotateMix != 0) + rotation += (target.arotation + this.data.offsetRotation) * rotateMix; + var x = bone.ax, y = bone.ay; + if (translateMix != 0) { + x += (target.ax + this.data.offsetX) * translateMix; + y += (target.ay + this.data.offsetY) * translateMix; + } + var scaleX = bone.ascaleX, scaleY = bone.ascaleY; + if (scaleMix > 0) { + if (scaleX > 0.00001) + scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1; + if (scaleY > 0.00001) + scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1; + } + var shearY = bone.ashearY; + if (shearMix > 0) + shearY += (target.ashearY + this.data.offsetShearY) * shearMix; + bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY); + } + }; + return TransformConstraint; + }()); + core.TransformConstraint = TransformConstraint; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var TransformConstraintData = (function (_super) { + __extends(TransformConstraintData, _super); + function TransformConstraintData(name) { + var _this = _super.call(this, name, 0, false) || this; + _this.bones = new Array(); + _this.rotateMix = 0; + _this.translateMix = 0; + _this.scaleMix = 0; + _this.shearMix = 0; + _this.offsetRotation = 0; + _this.offsetX = 0; + _this.offsetY = 0; + _this.offsetScaleX = 0; + _this.offsetScaleY = 0; + _this.offsetShearY = 0; + _this.relative = false; + _this.local = false; + return _this; + } + return TransformConstraintData; + }(core.ConstraintData)); + core.TransformConstraintData = TransformConstraintData; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var Triangulator = (function () { + function Triangulator() { + this.convexPolygons = new Array(); + this.convexPolygonsIndices = new Array(); + this.indicesArray = new Array(); + this.isConcaveArray = new Array(); + this.triangles = new Array(); + this.polygonPool = new core.Pool(function () { + return new Array(); + }); + this.polygonIndicesPool = new core.Pool(function () { + return new Array(); + }); + } + Triangulator.prototype.triangulate = function (verticesArray) { + var vertices = verticesArray; + var vertexCount = verticesArray.length >> 1; + var indices = this.indicesArray; + indices.length = 0; + for (var i = 0; i < vertexCount; i++) + indices[i] = i; + var isConcave = this.isConcaveArray; + isConcave.length = 0; + for (var i = 0, n = vertexCount; i < n; ++i) + isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices); + var triangles = this.triangles; + triangles.length = 0; + while (vertexCount > 3) { + var previous = vertexCount - 1, i = 0, next = 1; + while (true) { + outer: if (!isConcave[i]) { + var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1; + var p1x = vertices[p1], p1y = vertices[p1 + 1]; + var p2x = vertices[p2], p2y = vertices[p2 + 1]; + var p3x = vertices[p3], p3y = vertices[p3 + 1]; + for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) { + if (!isConcave[ii]) + continue; + var v = indices[ii] << 1; + var vx = vertices[v], vy = vertices[v + 1]; + if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) { + if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) { + if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy)) + break outer; + } + } + } + break; + } + if (next == 0) { + do { + if (!isConcave[i]) + break; + i--; + } while (i > 0); + break; + } + previous = i; + i = next; + next = (next + 1) % vertexCount; + } + triangles.push(indices[(vertexCount + i - 1) % vertexCount]); + triangles.push(indices[i]); + triangles.push(indices[(i + 1) % vertexCount]); + indices.splice(i, 1); + isConcave.splice(i, 1); + vertexCount--; + var previousIndex = (vertexCount + i - 1) % vertexCount; + var nextIndex = i == vertexCount ? 0 : i; + isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices); + isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices); + } + if (vertexCount == 3) { + triangles.push(indices[2]); + triangles.push(indices[0]); + triangles.push(indices[1]); + } + return triangles; + }; + Triangulator.prototype.decompose = function (verticesArray, triangles) { + var vertices = verticesArray; + var convexPolygons = this.convexPolygons; + this.polygonPool.freeAll(convexPolygons); + convexPolygons.length = 0; + var convexPolygonsIndices = this.convexPolygonsIndices; + this.polygonIndicesPool.freeAll(convexPolygonsIndices); + convexPolygonsIndices.length = 0; + var polygonIndices = this.polygonIndicesPool.obtain(); + polygonIndices.length = 0; + var polygon = this.polygonPool.obtain(); + polygon.length = 0; + var fanBaseIndex = -1, lastWinding = 0; + for (var i = 0, n = triangles.length; i < n; i += 3) { + var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1; + var x1 = vertices[t1], y1 = vertices[t1 + 1]; + var x2 = vertices[t2], y2 = vertices[t2 + 1]; + var x3 = vertices[t3], y3 = vertices[t3 + 1]; + var merged = false; + if (fanBaseIndex == t1) { + var o = polygon.length - 4; + var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3); + var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]); + if (winding1 == lastWinding && winding2 == lastWinding) { + polygon.push(x3); + polygon.push(y3); + polygonIndices.push(t3); + merged = true; + } + } + if (!merged) { + if (polygon.length > 0) { + convexPolygons.push(polygon); + convexPolygonsIndices.push(polygonIndices); + } + else { + this.polygonPool.free(polygon); + this.polygonIndicesPool.free(polygonIndices); + } + polygon = this.polygonPool.obtain(); + polygon.length = 0; + polygon.push(x1); + polygon.push(y1); + polygon.push(x2); + polygon.push(y2); + polygon.push(x3); + polygon.push(y3); + polygonIndices = this.polygonIndicesPool.obtain(); + polygonIndices.length = 0; + polygonIndices.push(t1); + polygonIndices.push(t2); + polygonIndices.push(t3); + lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3); + fanBaseIndex = t1; + } + } + if (polygon.length > 0) { + convexPolygons.push(polygon); + convexPolygonsIndices.push(polygonIndices); + } + for (var i = 0, n = convexPolygons.length; i < n; i++) { + polygonIndices = convexPolygonsIndices[i]; + if (polygonIndices.length == 0) + continue; + var firstIndex = polygonIndices[0]; + var lastIndex = polygonIndices[polygonIndices.length - 1]; + polygon = convexPolygons[i]; + var o = polygon.length - 4; + var prevPrevX = polygon[o], prevPrevY = polygon[o + 1]; + var prevX = polygon[o + 2], prevY = polygon[o + 3]; + var firstX = polygon[0], firstY = polygon[1]; + var secondX = polygon[2], secondY = polygon[3]; + var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY); + for (var ii = 0; ii < n; ii++) { + if (ii == i) + continue; + var otherIndices = convexPolygonsIndices[ii]; + if (otherIndices.length != 3) + continue; + var otherFirstIndex = otherIndices[0]; + var otherSecondIndex = otherIndices[1]; + var otherLastIndex = otherIndices[2]; + var otherPoly = convexPolygons[ii]; + var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1]; + if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) + continue; + var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3); + var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY); + if (winding1 == winding && winding2 == winding) { + otherPoly.length = 0; + otherIndices.length = 0; + polygon.push(x3); + polygon.push(y3); + polygonIndices.push(otherLastIndex); + prevPrevX = prevX; + prevPrevY = prevY; + prevX = x3; + prevY = y3; + ii = 0; + } + } + } + for (var i = convexPolygons.length - 1; i >= 0; i--) { + polygon = convexPolygons[i]; + if (polygon.length == 0) { + convexPolygons.splice(i, 1); + this.polygonPool.free(polygon); + polygonIndices = convexPolygonsIndices[i]; + convexPolygonsIndices.splice(i, 1); + this.polygonIndicesPool.free(polygonIndices); + } + } + return convexPolygons; + }; + Triangulator.isConcave = function (index, vertexCount, vertices, indices) { + var previous = indices[(vertexCount + index - 1) % vertexCount] << 1; + var current = indices[index] << 1; + var next = indices[(index + 1) % vertexCount] << 1; + return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]); + }; + Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) { + return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0; + }; + Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) { + var px = p2x - p1x, py = p2y - p1y; + return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1; + }; + return Triangulator; + }()); + core.Triangulator = Triangulator; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var IntSet = (function () { + function IntSet() { + this.array = new Array(); + } + IntSet.prototype.add = function (value) { + var contains = this.contains(value); + this.array[value | 0] = value | 0; + return !contains; + }; + IntSet.prototype.contains = function (value) { + return this.array[value | 0] != undefined; + }; + IntSet.prototype.remove = function (value) { + this.array[value | 0] = undefined; + }; + IntSet.prototype.clear = function () { + this.array.length = 0; + }; + return IntSet; + }()); + core.IntSet = IntSet; + var Color = (function () { + function Color(r, g, b, a) { + if (r === void 0) { r = 0; } + if (g === void 0) { g = 0; } + if (b === void 0) { b = 0; } + if (a === void 0) { a = 0; } + this.r = r; + this.g = g; + this.b = b; + this.a = a; + } + Color.prototype.set = function (r, g, b, a) { + this.r = r; + this.g = g; + this.b = b; + this.a = a; + this.clamp(); + return this; + }; + Color.prototype.setFromColor = function (c) { + this.r = c.r; + this.g = c.g; + this.b = c.b; + this.a = c.a; + return this; + }; + Color.prototype.setFromString = function (hex) { + hex = hex.charAt(0) == '#' ? hex.substr(1) : hex; + this.r = parseInt(hex.substr(0, 2), 16) / 255.0; + this.g = parseInt(hex.substr(2, 2), 16) / 255.0; + this.b = parseInt(hex.substr(4, 2), 16) / 255.0; + this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0; + return this; + }; + Color.prototype.add = function (r, g, b, a) { + this.r += r; + this.g += g; + this.b += b; + this.a += a; + this.clamp(); + return this; + }; + Color.prototype.clamp = function () { + if (this.r < 0) + this.r = 0; + else if (this.r > 1) + this.r = 1; + if (this.g < 0) + this.g = 0; + else if (this.g > 1) + this.g = 1; + if (this.b < 0) + this.b = 0; + else if (this.b > 1) + this.b = 1; + if (this.a < 0) + this.a = 0; + else if (this.a > 1) + this.a = 1; + return this; + }; + Color.rgba8888ToColor = function (color, value) { + color.r = ((value & 0xff000000) >>> 24) / 255; + color.g = ((value & 0x00ff0000) >>> 16) / 255; + color.b = ((value & 0x0000ff00) >>> 8) / 255; + color.a = ((value & 0x000000ff)) / 255; + }; + Color.rgb888ToColor = function (color, value) { + color.r = ((value & 0x00ff0000) >>> 16) / 255; + color.g = ((value & 0x0000ff00) >>> 8) / 255; + color.b = ((value & 0x000000ff)) / 255; + }; + Color.WHITE = new Color(1, 1, 1, 1); + Color.RED = new Color(1, 0, 0, 1); + Color.GREEN = new Color(0, 1, 0, 1); + Color.BLUE = new Color(0, 0, 1, 1); + Color.MAGENTA = new Color(1, 0, 1, 1); + return Color; + }()); + core.Color = Color; + var MathUtils = (function () { + function MathUtils() { + } + MathUtils.clamp = function (value, min, max) { + if (value < min) + return min; + if (value > max) + return max; + return value; + }; + MathUtils.cosDeg = function (degrees) { + return Math.cos(degrees * MathUtils.degRad); + }; + MathUtils.sinDeg = function (degrees) { + return Math.sin(degrees * MathUtils.degRad); + }; + MathUtils.signum = function (value) { + return value > 0 ? 1 : value < 0 ? -1 : 0; + }; + MathUtils.toInt = function (x) { + return x > 0 ? Math.floor(x) : Math.ceil(x); + }; + MathUtils.cbrt = function (x) { + var y = Math.pow(Math.abs(x), 1 / 3); + return x < 0 ? -y : y; + }; + MathUtils.randomTriangular = function (min, max) { + return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5); + }; + MathUtils.randomTriangularWith = function (min, max, mode) { + var u = Math.random(); + var d = max - min; + if (u <= (mode - min) / d) + return min + Math.sqrt(u * d * (mode - min)); + return max - Math.sqrt((1 - u) * d * (max - mode)); + }; + MathUtils.PI = 3.1415927; + MathUtils.PI2 = MathUtils.PI * 2; + MathUtils.radiansToDegrees = 180 / MathUtils.PI; + MathUtils.radDeg = MathUtils.radiansToDegrees; + MathUtils.degreesToRadians = MathUtils.PI / 180; + MathUtils.degRad = MathUtils.degreesToRadians; + return MathUtils; + }()); + core.MathUtils = MathUtils; + var Interpolation = (function () { + function Interpolation() { + } + Interpolation.prototype.apply = function (start, end, a) { + return start + (end - start) * this.applyInternal(a); + }; + return Interpolation; + }()); + core.Interpolation = Interpolation; + var Pow = (function (_super) { + __extends(Pow, _super); + function Pow(power) { + var _this = _super.call(this) || this; + _this.power = 2; + _this.power = power; + return _this; + } + Pow.prototype.applyInternal = function (a) { + if (a <= 0.5) + return Math.pow(a * 2, this.power) / 2; + return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1; + }; + return Pow; + }(Interpolation)); + core.Pow = Pow; + var PowOut = (function (_super) { + __extends(PowOut, _super); + function PowOut(power) { + return _super.call(this, power) || this; + } + PowOut.prototype.applyInternal = function (a) { + return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1; + }; + return PowOut; + }(Pow)); + core.PowOut = PowOut; + var Utils = (function () { + function Utils() { + } + Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) { + for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) { + dest[j] = source[i]; + } + }; + Utils.setArraySize = function (array, size, value) { + if (value === void 0) { value = 0; } + var oldSize = array.length; + if (oldSize == size) + return array; + array.length = size; + if (oldSize < size) { + for (var i = oldSize; i < size; i++) + array[i] = value; + } + return array; + }; + Utils.ensureArrayCapacity = function (array, size, value) { + if (value === void 0) { value = 0; } + if (array.length >= size) + return array; + return Utils.setArraySize(array, size, value); + }; + Utils.newArray = function (size, defaultValue) { + var array = new Array(size); + for (var i = 0; i < size; i++) + array[i] = defaultValue; + return array; + }; + Utils.newFloatArray = function (size) { + if (Utils.SUPPORTS_TYPED_ARRAYS) { + return new Float32Array(size); + } + else { + var array = new Array(size); + for (var i = 0; i < array.length; i++) + array[i] = 0; + return array; + } + }; + Utils.newShortArray = function (size) { + if (Utils.SUPPORTS_TYPED_ARRAYS) { + return new Int16Array(size); + } + else { + var array = new Array(size); + for (var i = 0; i < array.length; i++) + array[i] = 0; + return array; + } + }; + Utils.toFloatArray = function (array) { + return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array; + }; + Utils.toSinglePrecision = function (value) { + return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value; + }; + Utils.webkit602BugfixHelper = function (alpha, blend) { + }; + Utils.contains = function (array, element, identity) { + if (identity === void 0) { identity = true; } + for (var i = 0; i < array.length; i++) { + if (array[i] == element) + return true; + } + return false; + }; + Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined"; + return Utils; + }()); + core.Utils = Utils; + var DebugUtils = (function () { + function DebugUtils() { + } + DebugUtils.logBones = function (skeleton) { + for (var i = 0; i < skeleton.bones.length; i++) { + var bone = skeleton.bones[i]; + var mat = bone.matrix; + console.log(bone.data.name + ", " + mat.a + ", " + mat.b + ", " + mat.c + ", " + mat.d + ", " + mat.tx + ", " + mat.ty); + } + }; + return DebugUtils; + }()); + core.DebugUtils = DebugUtils; + var Pool = (function () { + function Pool(instantiator) { + this.items = new Array(); + this.instantiator = instantiator; + } + Pool.prototype.obtain = function () { + return this.items.length > 0 ? this.items.pop() : this.instantiator(); + }; + Pool.prototype.free = function (item) { + if (item.reset) + item.reset(); + this.items.push(item); + }; + Pool.prototype.freeAll = function (items) { + for (var i = 0; i < items.length; i++) { + if (items[i].reset) + items[i].reset(); + this.items[i] = items[i]; + } + }; + Pool.prototype.clear = function () { + this.items.length = 0; + }; + return Pool; + }()); + core.Pool = Pool; + var Vector2 = (function () { + function Vector2(x, y) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = 0; } + this.x = x; + this.y = y; + } + Vector2.prototype.set = function (x, y) { + this.x = x; + this.y = y; + return this; + }; + Vector2.prototype.length = function () { + var x = this.x; + var y = this.y; + return Math.sqrt(x * x + y * y); + }; + Vector2.prototype.normalize = function () { + var len = this.length(); + if (len != 0) { + this.x /= len; + this.y /= len; + } + return this; + }; + return Vector2; + }()); + core.Vector2 = Vector2; + var TimeKeeper = (function () { + function TimeKeeper() { + this.maxDelta = 0.064; + this.framesPerSecond = 0; + this.delta = 0; + this.totalTime = 0; + this.lastTime = Date.now() / 1000; + this.frameCount = 0; + this.frameTime = 0; + } + TimeKeeper.prototype.update = function () { + var now = Date.now() / 1000; + this.delta = now - this.lastTime; + this.frameTime += this.delta; + this.totalTime += this.delta; + if (this.delta > this.maxDelta) + this.delta = this.maxDelta; + this.lastTime = now; + this.frameCount++; + if (this.frameTime > 1) { + this.framesPerSecond = this.frameCount / this.frameTime; + this.frameTime = 0; + this.frameCount = 0; + } + }; + return TimeKeeper; + }()); + core.TimeKeeper = TimeKeeper; + var WindowedMean = (function () { + function WindowedMean(windowSize) { + if (windowSize === void 0) { windowSize = 32; } + this.addedValues = 0; + this.lastValue = 0; + this.mean = 0; + this.dirty = true; + this.values = new Array(windowSize); + } + WindowedMean.prototype.hasEnoughData = function () { + return this.addedValues >= this.values.length; + }; + WindowedMean.prototype.addValue = function (value) { + if (this.addedValues < this.values.length) + this.addedValues++; + this.values[this.lastValue++] = value; + if (this.lastValue > this.values.length - 1) + this.lastValue = 0; + this.dirty = true; + }; + WindowedMean.prototype.getMean = function () { + if (this.hasEnoughData()) { + if (this.dirty) { + var mean = 0; + for (var i = 0; i < this.values.length; i++) { + mean += this.values[i]; + } + this.mean = mean / this.values.length; + this.dirty = false; + } + return this.mean; + } + else { + return 0; + } + }; + return WindowedMean; + }()); + core.WindowedMean = WindowedMean; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var Attachment = (function () { + function Attachment(name) { + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return Attachment; + }()); + core.Attachment = Attachment; + var VertexAttachment = (function (_super) { + __extends(VertexAttachment, _super); + function VertexAttachment(name) { + var _this = _super.call(this, name) || this; + _this.id = (VertexAttachment.nextID++ & 65535) << 11; + _this.worldVerticesLength = 0; + _this.deformAttachment = _this; + return _this; + } + VertexAttachment.prototype.computeWorldVerticesOld = function (slot, worldVertices) { + this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2); + }; + VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) { + count = offset + (count >> 1) * stride; + var skeleton = slot.bone.skeleton; + var deformArray = slot.deform; + var vertices = this.vertices; + var bones = this.bones; + if (bones == null) { + if (deformArray.length > 0) + vertices = deformArray; + var mat = slot.bone.matrix; + var x = mat.tx; + var y = mat.ty; + var a = mat.a, b = mat.c, c = mat.b, d = mat.d; + for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) { + var vx = vertices[v_1], vy = vertices[v_1 + 1]; + worldVertices[w] = vx * a + vy * b + x; + worldVertices[w + 1] = vx * c + vy * d + y; + } + return; + } + var v = 0, skip = 0; + for (var i = 0; i < start; i += 2) { + var n = bones[v]; + v += n + 1; + skip += n; + } + var skeletonBones = skeleton.bones; + if (deformArray.length == 0) { + for (var w = offset, b = skip * 3; w < count; w += stride) { + var wx = 0, wy = 0; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3) { + var mat = skeletonBones[bones[v]].matrix; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * mat.a + vy * mat.c + mat.tx) * weight; + wy += (vx * mat.b + vy * mat.d + mat.ty) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + else { + var deform = deformArray; + for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) { + var wx = 0, wy = 0; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3, f += 2) { + var mat = skeletonBones[bones[v]].matrix; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * mat.a + vy * mat.c + mat.tx) * weight; + wy += (vx * mat.b + vy * mat.d + mat.ty) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + }; + VertexAttachment.prototype.copyTo = function (attachment) { + if (this.bones != null) { + attachment.bones = new Array(this.bones.length); + core.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length); + } + else + attachment.bones = null; + if (this.vertices != null) { + attachment.vertices = core.Utils.newFloatArray(this.vertices.length); + core.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length); + } + else + attachment.vertices = null; + attachment.worldVerticesLength = this.worldVerticesLength; + attachment.deformAttachment = this.deformAttachment; + }; + VertexAttachment.nextID = 0; + return VertexAttachment; + }(Attachment)); + core.VertexAttachment = VertexAttachment; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var AttachmentType; + (function (AttachmentType) { + AttachmentType[AttachmentType["Region"] = 0] = "Region"; + AttachmentType[AttachmentType["BoundingBox"] = 1] = "BoundingBox"; + AttachmentType[AttachmentType["Mesh"] = 2] = "Mesh"; + AttachmentType[AttachmentType["LinkedMesh"] = 3] = "LinkedMesh"; + AttachmentType[AttachmentType["Path"] = 4] = "Path"; + AttachmentType[AttachmentType["Point"] = 5] = "Point"; + AttachmentType[AttachmentType["Clipping"] = 6] = "Clipping"; + })(AttachmentType = core.AttachmentType || (core.AttachmentType = {})); + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var BoundingBoxAttachment = (function (_super) { + __extends(BoundingBoxAttachment, _super); + function BoundingBoxAttachment(name) { + var _this = _super.call(this, name) || this; + _this.color = new core.Color(1, 1, 1, 1); + return _this; + } + BoundingBoxAttachment.prototype.copy = function () { + var copy = new BoundingBoxAttachment(name); + this.copyTo(copy); + copy.color.setFromColor(this.color); + return copy; + }; + return BoundingBoxAttachment; + }(core.VertexAttachment)); + core.BoundingBoxAttachment = BoundingBoxAttachment; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var ClippingAttachment = (function (_super) { + __extends(ClippingAttachment, _super); + function ClippingAttachment(name) { + var _this = _super.call(this, name) || this; + _this.color = new core.Color(0.2275, 0.2275, 0.8078, 1); + return _this; + } + ClippingAttachment.prototype.copy = function () { + var copy = new ClippingAttachment(name); + this.copyTo(copy); + copy.endSlot = this.endSlot; + copy.color.setFromColor(this.color); + return copy; + }; + return ClippingAttachment; + }(core.VertexAttachment)); + core.ClippingAttachment = ClippingAttachment; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var MeshAttachment = (function (_super) { + __extends(MeshAttachment, _super); + function MeshAttachment(name) { + var _this = _super.call(this, name) || this; + _this.color = new core.Color(1, 1, 1, 1); + _this.tempColor = new core.Color(0, 0, 0, 0); + return _this; + } + MeshAttachment.prototype.updateUVs = function (region, uvs) { + var regionUVs = this.regionUVs; + var n = regionUVs.length; + if (!uvs || uvs.length != n) { + uvs = core.Utils.newFloatArray(n); + } + if (region == null) { + return; + } + var texture = region.texture; + var r = texture._uvs; + var w1 = region.width, h1 = region.height, w2 = region.originalWidth, h2 = region.originalHeight; + var x = region.offsetX, y = region.pixiOffsetY; + for (var i = 0; i < n; i += 2) { + var u = this.regionUVs[i], v = this.regionUVs[i + 1]; + u = (u * w2 - x) / w1; + v = (v * h2 - y) / h1; + uvs[i] = (r.x0 * (1 - u) + r.x1 * u) * (1 - v) + (r.x3 * (1 - u) + r.x2 * u) * v; + uvs[i + 1] = (r.y0 * (1 - u) + r.y1 * u) * (1 - v) + (r.y3 * (1 - u) + r.y2 * u) * v; + } + return uvs; + }; + MeshAttachment.prototype.getParentMesh = function () { + return this.parentMesh; + }; + MeshAttachment.prototype.setParentMesh = function (parentMesh) { + this.parentMesh = parentMesh; + if (parentMesh != null) { + this.bones = parentMesh.bones; + this.vertices = parentMesh.vertices; + this.worldVerticesLength = parentMesh.worldVerticesLength; + this.regionUVs = parentMesh.regionUVs; + this.triangles = parentMesh.triangles; + this.hullLength = parentMesh.hullLength; + this.worldVerticesLength = parentMesh.worldVerticesLength; + } + }; + MeshAttachment.prototype.copy = function () { + if (this.parentMesh != null) + return this.newLinkedMesh(); + var copy = new MeshAttachment(this.name); + copy.region = this.region; + copy.path = this.path; + copy.color.setFromColor(this.color); + this.copyTo(copy); + copy.regionUVs = new Float32Array(this.regionUVs.length); + core.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length); + copy.uvs = new Array(this.uvs.length); + core.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length); + copy.triangles = new Array(this.triangles.length); + core.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length); + copy.hullLength = this.hullLength; + if (this.edges != null) { + copy.edges = new Array(this.edges.length); + core.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length); + } + copy.width = this.width; + copy.height = this.height; + return copy; + }; + MeshAttachment.prototype.newLinkedMesh = function () { + var copy = new MeshAttachment(this.name); + copy.region = this.region; + copy.path = this.path; + copy.color.setFromColor(this.color); + copy.deformAttachment = this.deformAttachment; + copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this); + return copy; + }; + return MeshAttachment; + }(core.VertexAttachment)); + core.MeshAttachment = MeshAttachment; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var PathAttachment = (function (_super) { + __extends(PathAttachment, _super); + function PathAttachment(name) { + var _this = _super.call(this, name) || this; + _this.closed = false; + _this.constantSpeed = false; + _this.color = new core.Color(1, 1, 1, 1); + return _this; + } + PathAttachment.prototype.copy = function () { + var copy = new PathAttachment(name); + this.copyTo(copy); + copy.lengths = new Array(this.lengths.length); + core.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length); + copy.closed = closed; + copy.constantSpeed = this.constantSpeed; + copy.color.setFromColor(this.color); + return copy; + }; + return PathAttachment; + }(core.VertexAttachment)); + core.PathAttachment = PathAttachment; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var PointAttachment = (function (_super) { + __extends(PointAttachment, _super); + function PointAttachment(name) { + var _this = _super.call(this, name) || this; + _this.color = new core.Color(0.38, 0.94, 0, 1); + return _this; + } + PointAttachment.prototype.computeWorldPosition = function (bone, point) { + var mat = bone.matrix; + point.x = this.x * mat.a + this.y * mat.c + bone.worldX; + point.y = this.x * mat.b + this.y * mat.d + bone.worldY; + return point; + }; + PointAttachment.prototype.computeWorldRotation = function (bone) { + var mat = bone.matrix; + var cos = core.MathUtils.cosDeg(this.rotation), sin = core.MathUtils.sinDeg(this.rotation); + var x = cos * mat.a + sin * mat.c; + var y = cos * mat.b + sin * mat.d; + return Math.atan2(y, x) * core.MathUtils.radDeg; + }; + PointAttachment.prototype.copy = function () { + var copy = new PointAttachment(name); + copy.x = this.x; + copy.y = this.y; + copy.rotation = this.rotation; + copy.color.setFromColor(this.color); + return copy; + }; + return PointAttachment; + }(core.VertexAttachment)); + core.PointAttachment = PointAttachment; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var RegionAttachment = (function (_super) { + __extends(RegionAttachment, _super); + function RegionAttachment(name) { + var _this = _super.call(this, name) || this; + _this.x = 0; + _this.y = 0; + _this.scaleX = 1; + _this.scaleY = 1; + _this.rotation = 0; + _this.width = 0; + _this.height = 0; + _this.color = new core.Color(1, 1, 1, 1); + _this.offset = core.Utils.newFloatArray(8); + _this.uvs = core.Utils.newFloatArray(8); + _this.tempColor = new core.Color(1, 1, 1, 1); + return _this; + } + RegionAttachment.prototype.updateOffset = function () { + var regionScaleX = this.width / this.region.originalWidth * this.scaleX; + var regionScaleY = this.height / this.region.originalHeight * this.scaleY; + var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX; + var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY; + var localX2 = localX + this.region.width * regionScaleX; + var localY2 = localY + this.region.height * regionScaleY; + var radians = this.rotation * Math.PI / 180; + var cos = Math.cos(radians); + var sin = Math.sin(radians); + var localXCos = localX * cos + this.x; + var localXSin = localX * sin; + var localYCos = localY * cos + this.y; + var localYSin = localY * sin; + var localX2Cos = localX2 * cos + this.x; + var localX2Sin = localX2 * sin; + var localY2Cos = localY2 * cos + this.y; + var localY2Sin = localY2 * sin; + var offset = this.offset; + offset[RegionAttachment.OX1] = localXCos - localYSin; + offset[RegionAttachment.OY1] = localYCos + localXSin; + offset[RegionAttachment.OX2] = localXCos - localY2Sin; + offset[RegionAttachment.OY2] = localY2Cos + localXSin; + offset[RegionAttachment.OX3] = localX2Cos - localY2Sin; + offset[RegionAttachment.OY3] = localY2Cos + localX2Sin; + offset[RegionAttachment.OX4] = localX2Cos - localYSin; + offset[RegionAttachment.OY4] = localYCos + localX2Sin; + }; + RegionAttachment.prototype.setRegion = function (region) { + this.region = region; + var uvs = this.uvs; + if (region.rotate) { + uvs[2] = region.u; + uvs[3] = region.v2; + uvs[4] = region.u; + uvs[5] = region.v; + uvs[6] = region.u2; + uvs[7] = region.v; + uvs[0] = region.u2; + uvs[1] = region.v2; + } + else { + uvs[0] = region.u; + uvs[1] = region.v2; + uvs[2] = region.u; + uvs[3] = region.v; + uvs[4] = region.u2; + uvs[5] = region.v; + uvs[6] = region.u2; + uvs[7] = region.v2; + } + }; + RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) { + var vertexOffset = this.offset; + var mat = bone.matrix; + var x = mat.tx, y = mat.ty; + var a = mat.a, b = mat.c, c = mat.b, d = mat.d; + var offsetX = 0, offsetY = 0; + offsetX = vertexOffset[RegionAttachment.OX1]; + offsetY = vertexOffset[RegionAttachment.OY1]; + worldVertices[offset] = offsetX * a + offsetY * b + x; + worldVertices[offset + 1] = offsetX * c + offsetY * d + y; + offset += stride; + offsetX = vertexOffset[RegionAttachment.OX2]; + offsetY = vertexOffset[RegionAttachment.OY2]; + worldVertices[offset] = offsetX * a + offsetY * b + x; + worldVertices[offset + 1] = offsetX * c + offsetY * d + y; + offset += stride; + offsetX = vertexOffset[RegionAttachment.OX3]; + offsetY = vertexOffset[RegionAttachment.OY3]; + worldVertices[offset] = offsetX * a + offsetY * b + x; + worldVertices[offset + 1] = offsetX * c + offsetY * d + y; + offset += stride; + offsetX = vertexOffset[RegionAttachment.OX4]; + offsetY = vertexOffset[RegionAttachment.OY4]; + worldVertices[offset] = offsetX * a + offsetY * b + x; + worldVertices[offset + 1] = offsetX * c + offsetY * d + y; + }; + RegionAttachment.prototype.copy = function () { + var copy = new RegionAttachment(name); + copy.region = this.region; + copy.rendererObject = this.rendererObject; + copy.path = this.path; + copy.x = this.x; + copy.y = this.y; + copy.scaleX = this.scaleX; + copy.scaleY = this.scaleY; + copy.rotation = this.rotation; + copy.width = this.width; + copy.height = this.height; + core.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8); + core.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8); + copy.color.setFromColor(this.color); + return copy; + }; + RegionAttachment.OX1 = 0; + RegionAttachment.OY1 = 1; + RegionAttachment.OX2 = 2; + RegionAttachment.OY2 = 3; + RegionAttachment.OX3 = 4; + RegionAttachment.OY3 = 5; + RegionAttachment.OX4 = 6; + RegionAttachment.OY4 = 7; + RegionAttachment.X1 = 0; + RegionAttachment.Y1 = 1; + RegionAttachment.C1R = 2; + RegionAttachment.C1G = 3; + RegionAttachment.C1B = 4; + RegionAttachment.C1A = 5; + RegionAttachment.U1 = 6; + RegionAttachment.V1 = 7; + RegionAttachment.X2 = 8; + RegionAttachment.Y2 = 9; + RegionAttachment.C2R = 10; + RegionAttachment.C2G = 11; + RegionAttachment.C2B = 12; + RegionAttachment.C2A = 13; + RegionAttachment.U2 = 14; + RegionAttachment.V2 = 15; + RegionAttachment.X3 = 16; + RegionAttachment.Y3 = 17; + RegionAttachment.C3R = 18; + RegionAttachment.C3G = 19; + RegionAttachment.C3B = 20; + RegionAttachment.C3A = 21; + RegionAttachment.U3 = 22; + RegionAttachment.V3 = 23; + RegionAttachment.X4 = 24; + RegionAttachment.Y4 = 25; + RegionAttachment.C4R = 26; + RegionAttachment.C4G = 27; + RegionAttachment.C4B = 28; + RegionAttachment.C4A = 29; + RegionAttachment.U4 = 30; + RegionAttachment.V4 = 31; + return RegionAttachment; + }(core.Attachment)); + core.RegionAttachment = RegionAttachment; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var JitterEffect = (function () { + function JitterEffect(jitterX, jitterY) { + this.jitterX = 0; + this.jitterY = 0; + this.jitterX = jitterX; + this.jitterY = jitterY; + } + JitterEffect.prototype.begin = function (skeleton) { + }; + JitterEffect.prototype.transform = function (position, uv, light, dark) { + position.x += core.MathUtils.randomTriangular(-this.jitterX, this.jitterY); + position.y += core.MathUtils.randomTriangular(-this.jitterX, this.jitterY); + }; + JitterEffect.prototype.end = function () { + }; + return JitterEffect; + }()); + core.JitterEffect = JitterEffect; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var core; + (function (core) { + var SwirlEffect = (function () { + function SwirlEffect(radius) { + this.centerX = 0; + this.centerY = 0; + this.radius = 0; + this.angle = 0; + this.worldX = 0; + this.worldY = 0; + this.radius = radius; + } + SwirlEffect.prototype.begin = function (skeleton) { + this.worldX = skeleton.x + this.centerX; + this.worldY = skeleton.y + this.centerY; + }; + SwirlEffect.prototype.transform = function (position, uv, light, dark) { + var radAngle = this.angle * core.MathUtils.degreesToRadians; + var x = position.x - this.worldX; + var y = position.y - this.worldY; + var dist = Math.sqrt(x * x + y * y); + if (dist < this.radius) { + var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius); + var cos = Math.cos(theta); + var sin = Math.sin(theta); + position.x = cos * x - sin * y + this.worldX; + position.y = sin * x + cos * y + this.worldY; + } + }; + SwirlEffect.prototype.end = function () { + }; + SwirlEffect.interpolation = new core.PowOut(2); + return SwirlEffect; + }()); + core.SwirlEffect = SwirlEffect; + })(core = pixi_spine.core || (pixi_spine.core = {})); +})(pixi_spine || (pixi_spine = {})); +(function () { + if (!Math.fround) { + Math.fround = Math.fround = (function (array) { + return function (x) { + return array[0] = x, array[0]; + }; + })(new Float32Array(1)); + } +})(); +var pixi_spine; +(function (pixi_spine) { + pixi_spine.core.Bone.yDown = true; + var tempRgb = [0, 0, 0]; + var SpineSprite = (function (_super) { + __extends(SpineSprite, _super); + function SpineSprite() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.region = null; + return _this; + } + return SpineSprite; + }(PIXI.Sprite)); + pixi_spine.SpineSprite = SpineSprite; + var SpineMesh = (function (_super) { + __extends(SpineMesh, _super); + function SpineMesh(texture, vertices, uvs, indices, drawMode) { + return _super.call(this, texture, vertices, uvs, indices, drawMode) || this; + } + return SpineMesh; + }(PIXI.mesh.Mesh)); + pixi_spine.SpineMesh = SpineMesh; + var Spine = (function (_super) { + __extends(Spine, _super); + function Spine(spineData) { + var _this = _super.call(this) || this; + if (!spineData) { + throw new Error('The spineData param is required.'); + } + if ((typeof spineData) === "string") { + throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.'); + } + _this.spineData = spineData; + _this.skeleton = new pixi_spine.core.Skeleton(spineData); + _this.skeleton.updateWorldTransform(); + _this.stateData = new pixi_spine.core.AnimationStateData(spineData); + _this.state = new pixi_spine.core.AnimationState(_this.stateData); + _this.slotContainers = []; + _this.tempClipContainers = []; + for (var i = 0, n = _this.skeleton.slots.length; i < n; i++) { + var slot = _this.skeleton.slots[i]; + var attachment = slot.getAttachment(); + var slotContainer = _this.newContainer(); + _this.slotContainers.push(slotContainer); + _this.addChild(slotContainer); + _this.tempClipContainers.push(null); + if (attachment instanceof pixi_spine.core.RegionAttachment) { + var spriteName = attachment.region.name; + var sprite = _this.createSprite(slot, attachment, spriteName); + slot.currentSprite = sprite; + slot.currentSpriteName = spriteName; + slotContainer.addChild(sprite); + } + else if (attachment instanceof pixi_spine.core.MeshAttachment) { + var mesh = _this.createMesh(slot, attachment); + slot.currentMesh = mesh; + slot.currentMeshName = attachment.name; + slotContainer.addChild(mesh); + } + else if (attachment instanceof pixi_spine.core.ClippingAttachment) { + _this.createGraphics(slot, attachment); + slotContainer.addChild(slot.clippingContainer); + slotContainer.addChild(slot.currentGraphics); + } + else { + continue; + } + } + _this.autoUpdate = true; + _this.tintRgb = new Float32Array([1, 1, 1]); + return _this; + } + Object.defineProperty(Spine.prototype, "autoUpdate", { + get: function () { + return (this.updateTransform === Spine.prototype.autoUpdateTransform); + }, + set: function (value) { + this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Spine.prototype, "tint", { + get: function () { + return PIXI.utils.rgb2hex(this.tintRgb); + }, + set: function (value) { + this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Spine.prototype, "delayLimit", { + get: function () { + var limit = typeof this.localDelayLimit !== "undefined" ? + this.localDelayLimit : Spine.globalDelayLimit; + return limit || Number.MAX_VALUE; + }, + enumerable: true, + configurable: true + }); + Spine.prototype.update = function (dt) { + var delayLimit = this.delayLimit; + if (dt > delayLimit) + dt = delayLimit; + this.state.update(dt); + this.state.apply(this.skeleton); + if (!this.skeleton) + return; + this.skeleton.updateWorldTransform(); + var slots = this.skeleton.slots; + var globalClr = this.color; + var light = null, dark = null; + if (globalClr) { + light = globalClr.light; + dark = globalClr.dark; + } + else { + light = this.tintRgb; + } + var thack = PIXI.TransformBase && (this.transformHack() == 1); + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + var attachment = slot.getAttachment(); + var slotContainer = this.slotContainers[i]; + if (!attachment) { + slotContainer.visible = false; + continue; + } + var spriteColor = null; + var attColor = attachment.color; + if (attachment instanceof pixi_spine.core.RegionAttachment) { + var region = attachment.region; + if (region) { + if (slot.currentMesh) { + slot.currentMesh.visible = false; + slot.currentMesh = null; + slot.currentMeshName = undefined; + } + var ar = region; + if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) { + var spriteName = ar.name; + if (slot.currentSprite) { + slot.currentSprite.visible = false; + } + slot.sprites = slot.sprites || {}; + if (slot.sprites[spriteName] !== undefined) { + slot.sprites[spriteName].visible = true; + } + else { + var sprite = this.createSprite(slot, attachment, spriteName); + slotContainer.addChild(sprite); + } + slot.currentSprite = slot.sprites[spriteName]; + slot.currentSpriteName = spriteName; + } + } + if (slotContainer.transform) { + var transform = slotContainer.transform; + var transAny = transform; + var lt = null; + if (transAny.matrix2d) { + lt = transAny.matrix2d; + transAny._dirtyVersion++; + transAny.version = transAny._dirtyVersion; + transAny.isStatic = true; + transAny.operMode = 0; + } + else { + if (thack) { + if (transAny.position) { + transform = new PIXI.TransformBase(); + transform._parentID = -1; + transform._worldID = slotContainer.transform._worldID; + slotContainer.transform = transform; + } + lt = transform.localTransform; + } + else { + transAny.setFromMatrix(slot.bone.matrix); + } + } + if (lt) { + slot.bone.matrix.copy(lt); + } + } + else { + var lt = slotContainer.localTransform || new PIXI.Matrix(); + slot.bone.matrix.copy(lt); + slotContainer.localTransform = lt; + slotContainer.displayObjectUpdateTransform = SlotContainerUpdateTransformV3; + } + if (slot.currentSprite.color) { + spriteColor = slot.currentSprite.color; + } + else { + tempRgb[0] = light[0] * slot.color.r * attColor.r; + tempRgb[1] = light[1] * slot.color.g * attColor.g; + tempRgb[2] = light[2] * slot.color.b * attColor.b; + slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb); + } + slot.currentSprite.blendMode = slot.blendMode; + } + else if (attachment instanceof pixi_spine.core.MeshAttachment) { + if (slot.currentSprite) { + slot.currentSprite.visible = false; + slot.currentSprite = null; + slot.currentSpriteName = undefined; + if (slotContainer.transform) { + var transform = new PIXI.TransformStatic(); + transform._parentID = -1; + transform._worldID = slotContainer.transform._worldID; + slotContainer.transform = transform; + } + else { + slotContainer.localTransform = new PIXI.Matrix(); + slotContainer.displayObjectUpdateTransform = PIXI.DisplayObject.prototype.updateTransform; + } + } + if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) { + var meshName = attachment.name; + if (slot.currentMesh) { + slot.currentMesh.visible = false; + } + slot.meshes = slot.meshes || {}; + if (slot.meshes[meshName] !== undefined) { + slot.meshes[meshName].visible = true; + } + else { + var mesh = this.createMesh(slot, attachment); + slotContainer.addChild(mesh); + } + slot.currentMesh = slot.meshes[meshName]; + slot.currentMeshName = meshName; + } + attachment.computeWorldVerticesOld(slot, slot.currentMesh.vertices); + if (slot.currentMesh.color) { + spriteColor = slot.currentMesh.color; + } + else if (PIXI.VERSION[0] !== '3') { + var tintRgb = slot.currentMesh.tintRgb; + tintRgb[0] = light[0] * slot.color.r * attColor.r; + tintRgb[1] = light[1] * slot.color.g * attColor.g; + tintRgb[2] = light[2] * slot.color.b * attColor.b; + } + slot.currentMesh.blendMode = slot.blendMode; + } + else if (attachment instanceof pixi_spine.core.ClippingAttachment) { + if (!slot.currentGraphics) { + this.createGraphics(slot, attachment); + slotContainer.addChild(slot.clippingContainer); + slotContainer.addChild(slot.currentGraphics); + } + this.updateGraphics(slot, attachment); + } + else { + slotContainer.visible = false; + continue; + } + slotContainer.visible = true; + if (spriteColor) { + var r0 = slot.color.r * attColor.r; + var g0 = slot.color.g * attColor.g; + var b0 = slot.color.b * attColor.b; + spriteColor.setLight(light[0] * r0 + dark[0] * (1.0 - r0), light[1] * g0 + dark[1] * (1.0 - g0), light[2] * b0 + dark[2] * (1.0 - b0)); + if (slot.darkColor) { + r0 = slot.darkColor.r; + g0 = slot.darkColor.g; + b0 = slot.darkColor.b; + } + else { + r0 = 0.0; + g0 = 0.0; + b0 = 0.0; + } + spriteColor.setDark(light[0] * r0 + dark[0] * (1 - r0), light[1] * g0 + dark[1] * (1 - g0), light[2] * b0 + dark[2] * (1 - b0)); + } + slotContainer.alpha = slot.color.a; + } + var drawOrder = this.skeleton.drawOrder; + var clippingAttachment = null; + var clippingContainer = null; + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = slots[drawOrder[i].data.index]; + var slotContainer = this.slotContainers[drawOrder[i].data.index]; + if (!clippingContainer) { + if (slotContainer.parent !== null && slotContainer.parent !== this) { + slotContainer.parent.removeChild(slotContainer); + slotContainer.parent = this; + } + } + if (slot.currentGraphics && slot.getAttachment()) { + clippingContainer = slot.clippingContainer; + clippingAttachment = slot.getAttachment(); + clippingContainer.children.length = 0; + this.children[i] = slotContainer; + if (clippingAttachment.endSlot == slot.data) { + clippingAttachment.endSlot = null; + } + } + else { + if (clippingContainer) { + var c = this.tempClipContainers[i]; + if (!c) { + c = this.tempClipContainers[i] = this.newContainer(); + c.visible = false; + } + this.children[i] = c; + slotContainer.parent = null; + clippingContainer.addChild(slotContainer); + if (clippingAttachment.endSlot == slot.data) { + clippingContainer.renderable = true; + clippingContainer = null; + clippingAttachment = null; + } + } + else { + this.children[i] = slotContainer; + } + } + } + }; + ; + Spine.prototype.setSpriteRegion = function (attachment, sprite, region) { + sprite.region = region; + sprite.texture = region.texture; + if (!region.size) { + sprite.scale.x = attachment.scaleX * attachment.width / region.originalWidth; + sprite.scale.y = -attachment.scaleY * attachment.height / region.originalHeight; + } + else { + sprite.scale.x = region.size.width / region.originalWidth; + sprite.scale.y = -region.size.height / region.originalHeight; + } + }; + Spine.prototype.setMeshRegion = function (attachment, mesh, region) { + mesh.region = region; + mesh.texture = region.texture; + region.texture._updateUvs(); + attachment.updateUVs(region, mesh.uvs); + mesh.dirty++; + }; + Spine.prototype.autoUpdateTransform = function () { + if (Spine.globalAutoUpdate) { + this.lastTime = this.lastTime || Date.now(); + var timeDelta = (Date.now() - this.lastTime) * 0.001; + this.lastTime = Date.now(); + this.update(timeDelta); + } + else { + this.lastTime = 0; + } + PIXI.Container.prototype.updateTransform.call(this); + }; + ; + Spine.prototype.createSprite = function (slot, attachment, defName) { + var region = attachment.region; + if (slot.tempAttachment === attachment) { + region = slot.tempRegion; + slot.tempAttachment = null; + slot.tempRegion = null; + } + var texture = region.texture; + var sprite = this.newSprite(texture); + sprite.rotation = attachment.rotation * pixi_spine.core.MathUtils.degRad; + sprite.anchor.x = 0.5; + sprite.anchor.y = 0.5; + sprite.position.x = attachment.x; + sprite.position.y = attachment.y; + sprite.alpha = attachment.color.a; + sprite.region = attachment.region; + this.setSpriteRegion(attachment, sprite, attachment.region); + slot.sprites = slot.sprites || {}; + slot.sprites[defName] = sprite; + return sprite; + }; + ; + Spine.prototype.createMesh = function (slot, attachment) { + var region = attachment.region; + if (slot.tempAttachment === attachment) { + region = slot.tempRegion; + slot.tempAttachment = null; + slot.tempRegion = null; + } + var strip = this.newMesh(region.texture, new Float32Array(attachment.regionUVs.length), new Float32Array(attachment.regionUVs.length), new Uint16Array(attachment.triangles), PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES); + strip.canvasPadding = 1.5; + strip.alpha = attachment.color.a; + strip.region = attachment.region; + this.setMeshRegion(attachment, strip, region); + slot.meshes = slot.meshes || {}; + slot.meshes[attachment.name] = strip; + return strip; + }; + ; + Spine.prototype.createGraphics = function (slot, clip) { + var graphics = this.newGraphics(); + var poly = new PIXI.Polygon([]); + graphics.clear(); + graphics.beginFill(0xffffff, 1); + graphics.drawPolygon(poly); + graphics.renderable = false; + slot.currentGraphics = graphics; + slot.clippingContainer = this.newContainer(); + slot.clippingContainer.mask = slot.currentGraphics; + return graphics; + }; + Spine.prototype.updateGraphics = function (slot, clip) { + var vertices = slot.currentGraphics.graphicsData[0].shape.points; + var n = clip.worldVerticesLength; + vertices.length = n; + clip.computeWorldVertices(slot, 0, n, vertices, 0, 2); + slot.currentGraphics.dirty++; + slot.currentGraphics.clearDirty++; + }; + Spine.prototype.hackTextureBySlotIndex = function (slotIndex, texture, size) { + if (texture === void 0) { texture = null; } + if (size === void 0) { size = null; } + var slot = this.skeleton.slots[slotIndex]; + if (!slot) { + return false; + } + var attachment = slot.getAttachment(); + var region = attachment.region; + if (texture) { + region = new pixi_spine.core.TextureRegion(); + region.texture = texture; + region.size = size; + } + if (slot.currentSprite && slot.currentSprite.region != region) { + this.setSpriteRegion(attachment, slot.currentSprite, region); + slot.currentSprite.region = region; + } + else if (slot.currentMesh && slot.currentMesh.region != region) { + this.setMeshRegion(attachment, slot.currentMesh, region); + } + else { + slot.tempRegion = region; + slot.tempAttachment = attachment; + } + return true; + }; + Spine.prototype.hackTextureBySlotName = function (slotName, texture, size) { + if (texture === void 0) { texture = null; } + if (size === void 0) { size = null; } + var index = this.skeleton.findSlotIndex(slotName); + if (index == -1) { + return false; + } + return this.hackTextureBySlotIndex(index, texture, size); + }; + Spine.prototype.newContainer = function () { + return new PIXI.Container(); + }; + Spine.prototype.newSprite = function (tex) { + return new SpineSprite(tex); + }; + Spine.prototype.newGraphics = function () { + return new PIXI.Graphics(); + }; + Spine.prototype.newMesh = function (texture, vertices, uvs, indices, drawMode) { + return new SpineMesh(texture, vertices, uvs, indices, drawMode); + }; + Spine.prototype.transformHack = function () { + return 1; + }; + Spine.prototype.hackAttachmentGroups = function (nameSuffix, group, outGroup) { + if (!nameSuffix) { + return; + } + var list_d = [], list_n = []; + for (var i = 0, len = this.skeleton.slots.length; i < len; i++) { + var slot = this.skeleton.slots[i]; + var name_6 = slot.currentSpriteName || slot.currentMeshName || ""; + var target = slot.currentSprite || slot.currentMesh; + if (name_6.endsWith(nameSuffix)) { + target.parentGroup = group; + list_n.push(target); + } + else if (outGroup && target) { + target.parentGroup = outGroup; + list_d.push(target); + } + } + return [list_d, list_n]; + }; + ; + Spine.prototype.destroy = function (options) { + for (var i = 0, n = this.skeleton.slots.length; i < n; i++) { + var slot = this.skeleton.slots[i]; + for (var name_7 in slot.meshes) { + slot.meshes[name_7].destroy(options); + } + slot.meshes = null; + for (var name_8 in slot.sprites) { + slot.sprites[name_8].destroy(options); + } + slot.sprites = null; + } + for (var i = 0, n = this.slotContainers.length; i < n; i++) { + this.slotContainers[i].destroy(options); + } + this.spineData = null; + this.skeleton = null; + this.slotContainers = null; + this.stateData = null; + this.state = null; + this.tempClipContainers = null; + _super.prototype.destroy.call(this, options); + }; + Spine.globalAutoUpdate = true; + Spine.globalDelayLimit = 0; + Spine.clippingPolygon = []; + return Spine; + }(PIXI.Container)); + pixi_spine.Spine = Spine; + function SlotContainerUpdateTransformV3() { + var pt = this.parent.worldTransform; + var wt = this.worldTransform; + var lt = this.localTransform; + wt.a = lt.a * pt.a + lt.b * pt.c; + wt.b = lt.a * pt.b + lt.b * pt.d; + wt.c = lt.c * pt.a + lt.d * pt.c; + wt.d = lt.c * pt.b + lt.d * pt.d; + wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx; + wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty; + this.worldAlpha = this.alpha * this.parent.worldAlpha; + this._currentBounds = null; + } +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + PIXI.spine = pixi_spine; + var TextureProto = PIXI.Texture.prototype; + if (!TextureProto._updateUvs) { + TextureProto._updateUvs = TextureProto.updateUvs; + } +})(pixi_spine || (pixi_spine = {})); +var pixi_spine; +(function (pixi_spine) { + var Resource = PIXI.loaders.Resource; + function isJson(resource) { + return resource.type == Resource.TYPE.JSON; + } + function isBuffer(resource) { + return resource.xhrType == Resource.XHR_RESPONSE_TYPE.BUFFER; + } + Resource.setExtensionXhrType('skel', Resource.XHR_RESPONSE_TYPE.BUFFER); + function atlasParser() { + return function atlasParser(resource, next) { + if (!resource.data) { + return next(); + } + var isJsonSpineModel = isJson(resource) && resource.data.bones; + var isBinarySpineModel = isBuffer(resource) && (resource.extension === 'skel' || resource.metadata.spineMetadata); + if (!isJsonSpineModel && !isBinarySpineModel) { + return next(); + } + var parser = null; + var dataToParse = resource.data; + if (isJsonSpineModel) { + parser = new pixi_spine.core.SkeletonJson(null); + } + else { + parser = new pixi_spine.core.SkeletonBinary(null); + if (resource.data instanceof ArrayBuffer) { + dataToParse = new Uint8Array(resource.data); + } + } + var metadata = resource.metadata || {}; + var metadataSkeletonScale = metadata ? resource.metadata.spineSkeletonScale : null; + if (metadataSkeletonScale) { + parser.scale = metadataSkeletonScale; + } + var metadataAtlas = metadata ? resource.metadata.spineAtlas : null; + if (metadataAtlas === false) { + return next(); + } + if (metadataAtlas && metadataAtlas.pages) { + parser.attachmentLoader = new pixi_spine.core.AtlasAttachmentLoader(metadataAtlas); + resource.spineData = parser.readSkeletonData(dataToParse); + resource.spineAtlas = metadataAtlas; + return next(); + } + var metadataAtlasSuffix = metadata.spineAtlasSuffix || '.atlas'; + var atlasPath = resource.url; + var queryStringPos = atlasPath.indexOf('?'); + if (queryStringPos > 0) { + atlasPath = atlasPath.substr(0, queryStringPos); + } + atlasPath = atlasPath.substr(0, atlasPath.lastIndexOf('.')) + metadataAtlasSuffix; + if (resource.metadata && resource.metadata.spineAtlasFile) { + atlasPath = resource.metadata.spineAtlasFile; + } + atlasPath = atlasPath.replace(this.baseUrl, ''); + var atlasOptions = { + crossOrigin: resource.crossOrigin, + xhrType: Resource.XHR_RESPONSE_TYPE.TEXT, + metadata: metadata.spineMetadata || null, + parentResource: resource + }; + var imageOptions = { + crossOrigin: resource.crossOrigin, + metadata: metadata.imageMetadata || null, + parentResource: resource + }; + var baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1); + baseUrl = baseUrl.replace(this.baseUrl, ''); + var namePrefix = metadata.imageNamePrefix || (resource.name + '_atlas_page_'); + var adapter = metadata.images ? staticImageLoader(metadata.images) + : metadata.image ? staticImageLoader({ 'default': metadata.image }) + : metadata.imageLoader ? metadata.imageLoader(this, namePrefix, baseUrl, imageOptions) + : imageLoaderAdapter(this, namePrefix, baseUrl, imageOptions); + var createSkeletonWithRawAtlas = function (rawData) { + new pixi_spine.core.TextureAtlas(rawData, adapter, function (spineAtlas) { + if (spineAtlas) { + parser.attachmentLoader = new pixi_spine.core.AtlasAttachmentLoader(spineAtlas); + resource.spineData = parser.readSkeletonData(dataToParse); + resource.spineAtlas = spineAtlas; + } + next(); + }); + }; + if (resource.metadata && resource.metadata.atlasRawData) { + createSkeletonWithRawAtlas(resource.metadata.atlasRawData); + } + else { + this.add(resource.name + '_atlas', atlasPath, atlasOptions, function (atlasResource) { + if (!atlasResource.error) { + createSkeletonWithRawAtlas(atlasResource.data); + } + else { + next(); + } + }); + } + }; + } + pixi_spine.atlasParser = atlasParser; + function imageLoaderAdapter(loader, namePrefix, baseUrl, imageOptions) { + if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) { + baseUrl += '/'; + } + return function (line, callback) { + var name = namePrefix + line; + var url = baseUrl + line; + var cachedResource = loader.resources[name]; + if (cachedResource) { + function done() { + callback(cachedResource.texture.baseTexture); + } + if (cachedResource.texture) { + done(); + } + else { + cachedResource.onAfterMiddleware.add(done); + } + } + else { + loader.add(name, url, imageOptions, function (resource) { + if (!resource.error) { + callback(resource.texture.baseTexture); + } + else { + callback(null); + } + }); + } + }; + } + pixi_spine.imageLoaderAdapter = imageLoaderAdapter; + function syncImageLoaderAdapter(baseUrl, crossOrigin) { + if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) { + baseUrl += '/'; + } + return function (line, callback) { + callback(PIXI.BaseTexture.fromImage(line, crossOrigin)); + }; + } + pixi_spine.syncImageLoaderAdapter = syncImageLoaderAdapter; + function staticImageLoader(pages) { + return function (line, callback) { + var page = pages[line] || pages['default']; + if (page && page.baseTexture) + callback(page.baseTexture); + else + callback(page); + }; + } + pixi_spine.staticImageLoader = staticImageLoader; + if (PIXI.loaders.Loader) { + PIXI.loaders.Loader.addPixiMiddleware(atlasParser); + PIXI.loader.use(atlasParser()); + } +})(pixi_spine || (pixi_spine = {})); //# sourceMappingURL=pixi-spine.js.map \ No newline at end of file diff --git a/bin/pixi-spine.js.map b/bin/pixi-spine.js.map index 7085ae33..9620f9aa 100644 --- a/bin/pixi-spine.js.map +++ b/bin/pixi-spine.js.map @@ -1 +1 @@ -{"version":3,"file":"pixi-spine.js","sourceRoot":"","sources":["../src/core/Animation.ts","../src/core/AnimationState.ts","../src/core/AnimationStateData.ts","../src/core/AtlasAttachmentLoader.ts","../src/core/BlendMode.ts","../src/core/Bone.ts","../src/core/BoneData.ts","../src/core/Constraint.ts","../src/core/Event.ts","../src/core/EventData.ts","../src/core/IkConstraint.ts","../src/core/IkConstraintData.ts","../src/core/PathConstraint.ts","../src/core/PathConstraintData.ts","../src/core/Skeleton.ts","../src/core/SkeletonBinary.ts","../src/core/SkeletonBounds.ts","../src/core/SkeletonClipping.ts","../src/core/SkeletonData.ts","../src/core/SkeletonJson.ts","../src/core/Skin.ts","../src/core/Slot.ts","../src/core/SlotData.ts","../src/core/Texture.ts","../src/core/TextureAtlas.ts","../src/core/TransformConstraint.ts","../src/core/TransformConstraintData.ts","../src/core/Triangulator.ts","../src/core/Updatable.ts","../src/core/Utils.ts","../src/core/VertexEffect.ts","../src/core/attachments/Attachment.ts","../src/core/attachments/AttachmentLoader.ts","../src/core/attachments/AttachmentType.ts","../src/core/attachments/BoundingBoxAttachment.ts","../src/core/attachments/ClippingAttachment.ts","../src/core/attachments/MeshAttachment.ts","../src/core/attachments/PathAttachment.ts","../src/core/attachments/PointAttachment.ts","../src/core/attachments/RegionAttachment.ts","../src/core/vertexeffects/JitterEffect.ts","../src/core/vertexeffects/SwirlEffect.ts","../src/polyfills.ts","../src/Spine.ts","../src/exporter.ts","../src/loaders.ts"],"names":[],"mappings":";;;;;;;;;;AA6BA,IAAU,UAAU,CA42CnB;AA52CD,WAAU,UAAU;IAAC,IAAA,IAAI,CA42CxB;IA52CoB,WAAA,IAAI;QACrB;YAKI,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;gBACnE,IAAI,IAAI,IAAI,IAAI;oBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBAC1D,IAAI,SAAS,IAAI,IAAI;oBAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;gBACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;gBACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;gBAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7B,CAAC;YAED,yBAAK,GAAL,UAAO,QAAkB,EAAE,QAAgB,EAAE,IAAY,EAAE,IAAa,EAAE,MAAoB,EAAE,KAAa,EAAE,KAAe,EAAE,SAAuB;gBACnJ,IAAI,QAAQ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W,CAAC,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAA;IACL,CAAC;IAPe,iCAAsB,yBAOrC,CAAA;IAED,2BAAkC,KAA2D;QACzF,OAAO,UAAU,IAAS,EAAE,QAAa;YACrC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,SAAS,CAAQ,CAAC;YAClD,IAAI,IAAI,IAAI,IAAI,CAAC,WAAW;gBACxB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;;gBAE3B,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,CAAA;IACL,CAAC;IARe,4BAAiB,oBAQhC,CAAA;IAED,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QACrB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;KAClC;AACL,CAAC,EAvLS,UAAU,KAAV,UAAU,QAuLnB","sourcesContent":["/******************************************************************************\r\n * Spine Runtimes License Agreement\r\n * Last updated May 1, 2019. Replaces all prior versions.\r\n *\r\n * Copyright (c) 2013-2019, Esoteric Software LLC\r\n *\r\n * Integration of the Spine Runtimes into software or otherwise creating\r\n * derivative works of the Spine Runtimes is permitted under the terms and\r\n * conditions of Section 2 of the Spine Editor License Agreement:\r\n * http://esotericsoftware.com/spine-editor-license\r\n *\r\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\r\n * or otherwise create derivative works of the Spine Runtimes (collectively,\r\n * \"Products\"), provided that each user of the Products must obtain their own\r\n * Spine Editor license and redistribution of the Products in any form must\r\n * include this license and copyright notice.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\r\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\r\n * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\r\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\r\n * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\r\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Animation {\r\n name: string;\r\n timelines: Array;\r\n duration: number;\r\n\r\n constructor (name: string, timelines: Array, duration: number) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n if (timelines == null) throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.duration = duration;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0) lastTime %= this.duration;\r\n }\r\n\r\n let timelines = this.timelines;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n }\r\n\r\n static binarySearch (values: ArrayLike, target: number, step: number = 1) {\r\n let low = 0;\r\n let high = values.length / step - 2;\r\n if (high == 0) return step;\r\n let current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high) return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n }\r\n\r\n static linearSearch (values: ArrayLike, target: number, step: number) {\r\n for (let i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target) return i;\r\n return -1;\r\n }\r\n }\r\n\r\n export interface Timeline {\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void;\r\n getPropertyId (): number;\r\n }\r\n\r\n export enum MixBlend {\r\n setup,\r\n first,\r\n replace,\r\n add\r\n }\r\n\r\n export enum MixDirection {\r\n mixIn, mixOut\r\n }\r\n\r\n export enum TimelineType {\r\n rotate, translate, scale, shear,\r\n attachment, color, deform,\r\n event, drawOrder,\r\n ikConstraint, transformConstraint,\r\n pathConstraintPosition, pathConstraintSpacing, pathConstraintMix,\r\n twoColor\r\n }\r\n\r\n export abstract class CurveTimeline implements Timeline {\r\n static LINEAR = 0; static STEPPED = 1; static BEZIER = 2;\r\n static BEZIER_SIZE = 10 * 2 - 1;\r\n\r\n private curves: ArrayLike; // type, x, y, ...\r\n\r\n abstract getPropertyId(): number;\r\n\r\n constructor (frameCount: number) {\r\n if (frameCount <= 0) throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n\r\n getFrameCount () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n }\r\n\r\n setLinear (frameIndex: number) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n }\r\n\r\n setStepped (frameIndex: number) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n }\r\n\r\n getCurveType (frameIndex: number): number {\r\n let index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length) return CurveTimeline.LINEAR;\r\n let type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR) return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED) return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n }\r\n\r\n /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.\r\n * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of\r\n * the difference between the keyframe's values. */\r\n setCurve (frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\r\n let tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n let dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n let ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n let dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n\r\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n let curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n\r\n let x = dfx, y = dfy;\r\n for (let n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n }\r\n\r\n getCurvePercent (frameIndex: number, percent: number) {\r\n percent = MathUtils.clamp(percent, 0, 1);\r\n let curves = this.curves;\r\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n let type = curves[i];\r\n if (type == CurveTimeline.LINEAR) return percent;\r\n if (type == CurveTimeline.STEPPED) return 0;\r\n i++;\r\n let x = 0;\r\n for (let start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n let prevX: number, prevY: number;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n } else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n let y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\r\n }\r\n\r\n abstract apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void;\r\n }\r\n\r\n export class RotateTimeline extends CurveTimeline {\r\n static ENTRIES = 2;\r\n static PREV_TIME = -2; static PREV_ROTATION = -1;\r\n static ROTATION = 1;\r\n\r\n boneIndex: number;\r\n frames: ArrayLike; // time, degrees, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount << 1);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n }\r\n\r\n /** Sets the time and angle of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, degrees: number) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n let r = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\r\n let r = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; // Wrap within -180 and 180.\r\n case MixBlend.add:\r\n bone.rotation += r * alpha;\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent((frame >> 1) - 1,\r\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n\r\n let r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n }\r\n }\r\n\r\n export class TranslateTimeline extends CurveTimeline {\r\n static ENTRIES = 3;\r\n static PREV_TIME = -3; static PREV_X = -2; static PREV_Y = -1;\r\n static X = 1; static Y = 2;\r\n\r\n boneIndex: number;\r\n frames: ArrayLike; // time, x, y, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n }\r\n\r\n /** Sets the time and value of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, x: number, y: number) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n }\r\n }\r\n\r\n export class ScaleTimeline extends TranslateTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n } else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n } else {\r\n let bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = MathUtils.signum(x);\r\n by = MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class ShearTimeline extends TranslateTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n }\r\n\r\n export class ColorTimeline extends CurveTimeline {\r\n static ENTRIES = 5;\r\n static PREV_TIME = -5; static PREV_R = -4; static PREV_G = -3; static PREV_B = -2; static PREV_A = -1;\r\n static R = 1; static G = 2; static B = 3; static A = 4;\r\n\r\n slotIndex: number;\r\n frames: ArrayLike; // time, r, g, b, a, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n }\r\n\r\n /** Sets the time and value of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n let color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,\r\n (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n\r\n let r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n let color = slot.color;\r\n if (blend == MixBlend.setup) color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n }\r\n }\r\n\r\n export class TwoColorTimeline extends CurveTimeline {\r\n static ENTRIES = 8;\r\n static PREV_TIME = -8; static PREV_R = -7; static PREV_G = -6; static PREV_B = -5; static PREV_A = -4;\r\n static PREV_R2 = -3; static PREV_G2 = -2; static PREV_B2 = -1;\r\n static R = 1; static G = 2; static B = 3; static A = 4; static R2 = 5; static G2 = 6; static B2 = 7;\r\n\r\n slotIndex: number;\r\n frames: ArrayLike; // time, r, g, b, a, r2, g2, b2, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n }\r\n\r\n /** Sets the time and value of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n let light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha,\r\n (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n } else {\r\n let light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n }\r\n }\r\n\r\n export class AttachmentTimeline implements Timeline {\r\n slotIndex: number;\r\n frames: ArrayLike // time, ...\r\n attachmentNames: Array;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n }\r\n\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time and value of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, attachmentName: string) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\r\n let attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n return;\r\n }\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first) {\r\n let attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n }\r\n return;\r\n }\r\n\r\n let frameIndex = 0;\r\n if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n\r\n let attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n }\r\n }\r\n\r\n let zeros : ArrayLike = null;\r\n\r\n export class DeformTimeline extends CurveTimeline {\r\n slotIndex: number;\r\n attachment: VertexAttachment;\r\n frames: ArrayLike; // time, ...\r\n frameVertices: Array>;\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.frameVertices = new Array>(frameCount);\r\n if (zeros == null) zeros = Utils.newFloatArray(64);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.deform << 27) + + this.attachment.id + this.slotIndex;\r\n }\r\n\r\n /** Sets the time of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, vertices: ArrayLike) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let slot: Slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active) return;\r\n let slotAttachment: Attachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof VertexAttachment) || !((slotAttachment).deformAttachment == this.attachment)) return;\r\n\r\n let deformArray: Array = slot.deform;\r\n if (deformArray.length == 0) blend = MixBlend.setup;\r\n\r\n let frameVertices = this.frameVertices;\r\n let vertexCount = frameVertices[0].length;\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n let vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n let deform: Array = Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\r\n } else {\r\n // Weighted deform offsets.\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n\r\n let deform: Array = Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) { // Time is after last frame.\r\n let lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n deform[i] += lastVertices[i] - setupVertices[i];\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += lastVertices[i];\r\n }\r\n } else {\r\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let setup = setupVertices[i];\r\n deform[i] = setup + (lastVertices[i] - setup) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] = lastVertices[i] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += (lastVertices[i] - deform[i]) * alpha;\r\n case MixBlend.add:\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n deform[i] += (lastVertices[i] - setupVertices[i]) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++)\r\n deform[i] += lastVertices[i] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time);\r\n let prevVertices = frameVertices[frame - 1];\r\n let nextVertices = frameVertices[frame];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += prev + (nextVertices[i] - prev) * percent - setupVertices[i];\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += prev + (nextVertices[i] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] = prev + (nextVertices[i] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i], setup = setupVertices[i];\r\n deform[i] = setup + (prev + (nextVertices[i] - prev) * percent - setup) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] = (prev + (nextVertices[i] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent - deform[i]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n let vertexAttachment = slotAttachment as VertexAttachment;\r\n if (vertexAttachment.bones == null) {\r\n // Unweighted vertex positions, with alpha.\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent - setupVertices[i]) * alpha;\r\n }\r\n } else {\r\n // Weighted deform offsets, with alpha.\r\n for (let i = 0; i < vertexCount; i++) {\r\n let prev = prevVertices[i];\r\n deform[i] += (prev + (nextVertices[i] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class EventTimeline implements Timeline {\r\n frames: ArrayLike; // time, ...\r\n events: Array;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return TimelineType.event << 24;\r\n }\r\n\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time of the specified keyframe. */\r\n setFrame (frameIndex: number, event: Event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n }\r\n\r\n /** Fires events for frames > lastTime and <= time. */\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n if (firedEvents == null) return;\r\n let frames = this.frames;\r\n let frameCount = this.frames.length;\r\n\r\n if (lastTime > time) { // Fire events after last time for looped animations.\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n } else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\r\n return;\r\n if (time < frames[0]) return; // Time is before first frame.\r\n\r\n let frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n let frameTime = frames[frame];\r\n while (frame > 0) { // Fire multiple events with the same frame.\r\n if (frames[frame - 1] != frameTime) break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n }\r\n }\r\n\r\n export class DrawOrderTimeline implements Timeline {\r\n frames: ArrayLike; // time, ...\r\n drawOrders: Array>;\r\n\r\n constructor (frameCount: number) {\r\n this.frames = Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array>(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return TimelineType.drawOrder << 24;\r\n }\r\n\r\n getFrameCount () {\r\n return this.frames.length;\r\n }\r\n\r\n /** Sets the time of the specified keyframe.\r\n * @param drawOrder May be null to use bind pose draw order. */\r\n setFrame (frameIndex: number, time: number, drawOrder: Array) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let drawOrder: Array = skeleton.drawOrder;\r\n let slots: Array = skeleton.slots;\r\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first) Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n\r\n let frame = 0;\r\n if (time >= frames[frames.length - 1]) // Time is after last frame.\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n\r\n let drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n }\r\n }\r\n\r\n export class IkConstraintTimeline extends CurveTimeline {\r\n static ENTRIES = 6;\r\n static PREV_TIME = -6; static PREV_MIX = -5; static PREV_SOFTNESS = -4; static PREV_BEND_DIRECTION = -3; static PREV_COMPRESS = -2; static PREV_STRETCH = -1;\r\n static MIX = 1; static SOFTNESS = 2; static BEND_DIRECTION = 3; static COMPRESS = 4; static STRETCH = 5;\r\n\r\n ikConstraintIndex: number;\r\n frames: ArrayLike; // time, mix, softness, bendDirection, compress, stretch, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n }\r\n\r\n /** Sets the time, mix, softness, and bend direction of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, mix: number, softness: number, bendDirection: number, compress: boolean, stretch: boolean) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: IkConstraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n } else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n let mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n let softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n } else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class TransformConstraintTimeline extends CurveTimeline {\r\n static ENTRIES = 5;\r\n static PREV_TIME = -5; static PREV_ROTATE = -4; static PREV_TRANSLATE = -3; static PREV_SCALE = -2; static PREV_SHEAR = -1;\r\n static ROTATE = 1; static TRANSLATE = 2; static SCALE = 3; static SHEAR = 4;\r\n\r\n transformConstraintIndex: number;\r\n frames: ArrayLike; // time, rotate mix, translate mix, scale mix, shear mix, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n }\r\n\r\n /** Sets the time and mixes of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n\r\n let constraint: TransformConstraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n let data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\r\n let i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n let data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n } else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n }\r\n }\r\n\r\n export class PathConstraintPositionTimeline extends CurveTimeline {\r\n static ENTRIES = 2;\r\n static PREV_TIME = -2; static PREV_VALUE = -1;\r\n static VALUE = 1;\r\n\r\n pathConstraintIndex: number;\r\n\r\n frames: ArrayLike; // time, position, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n /** Sets the time and value of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, value: number) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) // Time is after last frame.\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n }\r\n }\r\n\r\n export class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) // Time is after last frame.\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n }\r\n }\r\n\r\n export class PathConstraintMixTimeline extends CurveTimeline {\r\n static ENTRIES = 3;\r\n static PREV_TIME = -3; static PREV_ROTATE = -2; static PREV_TRANSLATE = -1;\r\n static ROTATE = 1; static TRANSLATE = 2;\r\n\r\n pathConstraintIndex: number;\r\n\r\n frames: ArrayLike; // time, rotate mix, translate mix, ...\r\n\r\n constructor (frameCount: number) {\r\n super(frameCount);\r\n this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n }\r\n\r\n getPropertyId () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n }\r\n\r\n /** Sets the time and mixes of the specified keyframe. */\r\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n }\r\n\r\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\r\n let frames = this.frames;\r\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active) return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n\r\n let rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n } else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n let frameTime = frames[frame];\r\n let percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1,\r\n 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n } else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class AnimationState {\r\n static emptyAnimation = new Animation(\"\", [], 0);\r\n static SUBSEQUENT = 0;\r\n static FIRST = 1;\r\n static HOLD = 2;\r\n static HOLD_MIX = 3;\r\n static NOT_LAST = 4;\r\n\r\n data: AnimationStateData;\r\n tracks = new Array();\r\n events = new Array();\r\n listeners = new Array();\r\n queue = new EventQueue(this);\r\n propertyIDs = new IntSet();\r\n animationsChanged = false;\r\n timeScale = 1;\r\n\r\n trackEntryPool = new Pool(() => new TrackEntry());\r\n\r\n constructor (data: AnimationStateData) {\r\n this.data = data;\r\n }\r\n\r\n update (delta: number) {\r\n delta *= this.timeScale;\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (current == null) continue;\r\n\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n\r\n let currentDelta = delta * current.timeScale;\r\n\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0) continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n\r\n let next = current.next;\r\n if (next != null) {\r\n // When the next entry's delay is passed, change to the next entry, preserving leftover time.\r\n let nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime = current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n } else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n // End mixing from entries once all have completed.\r\n let from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null) from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n\r\n current.trackTime += currentDelta;\r\n }\r\n\r\n this.queue.drain();\r\n }\r\n\r\n updateMixingFrom (to: TrackEntry, delta: number): boolean {\r\n let from = to.mixingFrom;\r\n if (from == null) return true;\r\n\r\n let finished = this.updateMixingFrom(from, delta);\r\n\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n\r\n // Require mixTime > 0 to ensure the mixing from entry was applied at least once.\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null) from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n }\r\n\r\n apply (skeleton: Skeleton) : boolean {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged) this._animationsChanged();\r\n\r\n let events = this.events;\r\n let tracks = this.tracks;\r\n let applied = false;\r\n\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (current == null || current.delay > 0) continue;\r\n applied = true;\r\n let blend: MixBlend = i == 0 ? MixBlend.first : current.mixBlend;\r\n\r\n // Apply mixing from entries first.\r\n let mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n\r\n // Apply current entry.\r\n let animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n let timelineCount = current.animation.timelines.length;\r\n let timelines = current.animation.timelines;\r\n if ((i == 0 && mix == 1) || blend == MixBlend.add) {\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets\r\n // to sometimes stop rendering when using color correction, as their RGBA values become NaN.\r\n // (https://github.com/pixijs/pixi-spine/issues/302)\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, MixDirection.mixIn);\r\n }\r\n } else {\r\n let timelineMode = current.timelineMode;\r\n\r\n let firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame) Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n let timelinesRotation = current.timelinesRotation;\r\n\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n let timeline = timelines[ii];\r\n let timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : MixBlend.setup;\r\n if (timeline instanceof RotateTimeline) {\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n } else {\r\n // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n\r\n this.queue.drain();\r\n return applied;\r\n }\r\n\r\n applyMixingFrom (to: TrackEntry, skeleton: Skeleton, blend: MixBlend) {\r\n let from = to.mixingFrom;\r\n if (from.mixingFrom != null) this.applyMixingFrom(from, skeleton, blend);\r\n\r\n let mix = 0;\r\n if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.\r\n mix = 1;\r\n if (blend == MixBlend.first) blend = MixBlend.setup;\r\n } else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1) mix = 1;\r\n if (blend != MixBlend.first) blend = from.mixBlend;\r\n }\r\n\r\n let events = mix < from.eventThreshold ? this.events : null;\r\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n let animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n let timelineCount = from.animation.timelines.length;\r\n let timelines = from.animation.timelines;\r\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == MixBlend.add) {\r\n for (let i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, MixDirection.mixOut);\r\n } else {\r\n let timelineMode = from.timelineMode;\r\n let timelineHoldMix = from.timelineHoldMix;\r\n\r\n let firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame) Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n let timelinesRotation = from.timelinesRotation;\r\n\r\n from.totalAlpha = 0;\r\n for (let i = 0; i < timelineCount; i++) {\r\n let timeline = timelines[i];\r\n let direction = MixDirection.mixOut;\r\n let timelineBlend: MixBlend;\r\n let alpha = 0;\r\n switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!attachments && timeline instanceof AttachmentTimeline) {\r\n if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) continue;\r\n blend = MixBlend.setup;\r\n }\r\n if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD:\r\n timelineBlend = MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = MixBlend.setup;\r\n let holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else {\r\n // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n Utils.webkit602BugfixHelper(alpha, blend);\r\n if (timelineBlend == MixBlend.setup) {\r\n if (timeline instanceof AttachmentTimeline) {\r\n if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) direction = MixDirection.mixIn;\r\n } else if (timeline instanceof DrawOrderTimeline) {\r\n if (drawOrder) direction = MixDirection.mixIn;\r\n }\r\n }\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n\r\n if (to.mixDuration > 0) this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n\r\n return mix;\r\n }\r\n\r\n applyRotateTimeline (timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend,\r\n timelinesRotation: Array, i: number, firstFrame: boolean) {\r\n\r\n if (firstFrame) timelinesRotation[i] = 0;\r\n\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, MixDirection.mixIn);\r\n return;\r\n }\r\n\r\n let rotateTimeline = timeline as RotateTimeline;\r\n let frames = rotateTimeline.frames;\r\n let bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active) return;\r\n let r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n } else {\r\n r1 = blend == MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) // Time is after last frame.\r\n r2 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n else {\r\n // Interpolate between the previous frame and the current frame.\r\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n let frameTime = frames[frame];\r\n let percent = rotateTimeline.getCurvePercent((frame >> 1) - 1,\r\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n\r\n r2 = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n\r\n // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.\r\n let total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n } else {\r\n let lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n } else {\r\n lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.\r\n lastDiff = timelinesRotation[i + 1]; // Difference between bones.\r\n }\r\n let current = diff > 0, dir = lastTotal >= 0;\r\n // Detect cross at 0 (not 180).\r\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n // A cross after a 360 rotation is a loop.\r\n if (Math.abs(lastTotal) > 180) lastTotal += 360 * MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.\r\n if (dir != current) total += 360 * MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n }\r\n\r\n queueEvents (entry: TrackEntry, animationTime: number) {\r\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n let duration = animationEnd - animationStart;\r\n let trackLastWrapped = entry.trackLast % duration;\r\n\r\n // Queue events before complete.\r\n let events = this.events;\r\n let i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < trackLastWrapped) break;\r\n if (event.time > animationEnd) continue; // Discard events outside animation start/end.\r\n this.queue.event(entry, event);\r\n }\r\n\r\n // Queue complete if completed a loop iteration or the animation.\r\n let complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete) this.queue.complete(entry);\r\n\r\n // Queue events after complete.\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < animationStart) continue; // Discard events outside animation start/end.\r\n this.queue.event(entry, events[i]);\r\n }\r\n }\r\n\r\n clearTracks () {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n\r\n clearTrack (trackIndex: number) {\r\n if (trackIndex >= this.tracks.length) return;\r\n let current = this.tracks[trackIndex];\r\n if (current == null) return;\r\n\r\n this.queue.end(current);\r\n\r\n this.disposeNext(current);\r\n\r\n let entry = current;\r\n while (true) {\r\n let from = entry.mixingFrom;\r\n if (from == null) break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n\r\n this.tracks[current.trackIndex] = null;\r\n\r\n this.queue.drain();\r\n }\r\n\r\n setCurrent (index: number, current: TrackEntry, interrupt: boolean) {\r\n let from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n\r\n if (from != null) {\r\n if (interrupt) this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n\r\n // Store the interrupted mix percentage.\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n\r\n from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.\r\n }\r\n\r\n this.queue.start(current);\r\n }\r\n\r\n setAnimation (trackIndex: number, animationName: string, loop: boolean) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null) throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n }\r\n\r\n setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) {\r\n if (animation == null) throw new Error(\"animation cannot be null.\");\r\n let interrupt = true;\r\n let current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n // Don't mix from an entry that was never applied.\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n } else\r\n this.disposeNext(current);\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n }\r\n\r\n addAnimation (trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null) throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n }\r\n\r\n addAnimationWith (trackIndex: number, animation: Animation, loop: boolean, delay: number) {\r\n if (animation == null) throw new Error(\"animation cannot be null.\");\r\n\r\n let last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n\r\n let entry = this.trackEntry(trackIndex, animation, loop, last);\r\n\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n } else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n let duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n } else\r\n delay = last.trackTime;\r\n }\r\n }\r\n\r\n entry.delay = delay;\r\n return entry;\r\n }\r\n\r\n setEmptyAnimation (trackIndex: number, mixDuration: number) {\r\n let entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n\r\n addEmptyAnimation (trackIndex: number, mixDuration: number, delay: number) {\r\n if (delay <= 0) delay -= mixDuration;\r\n let entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n\r\n setEmptyAnimations (mixDuration: number) {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let current = this.tracks[i];\r\n if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n\r\n expandToIndex (index: number) {\r\n if (index < this.tracks.length) return this.tracks[index];\r\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n\r\n trackEntry (trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry) {\r\n let entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n return entry;\r\n }\r\n\r\n disposeNext (entry: TrackEntry) {\r\n let next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n }\r\n\r\n _animationsChanged () {\r\n this.animationsChanged = false;\r\n\r\n this.propertyIDs.clear();\r\n\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let entry = this.tracks[i];\r\n if (entry == null) continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != MixBlend.add) this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null)\r\n }\r\n\r\n this.propertyIDs.clear();\r\n for (let i = this.tracks.length - 1; i >= 0; i--) {\r\n let entry = this.tracks[i];\r\n while (entry != null) {\r\n this.computeNotLast(entry);\r\n entry = entry.mixingFrom;\r\n }\r\n }\r\n }\r\n\r\n computeHold (entry: TrackEntry) {\r\n let to = entry.mixingTo;\r\n let timelines = entry.animation.timelines;\r\n let timelinesCount = entry.animation.timelines.length;\r\n let timelineMode = Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n let timelineDipMix = Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n let propertyIDs = this.propertyIDs;\r\n\r\n if (to != null && to.holdPrevious) {\r\n for (let i = 0; i < timelinesCount; i++) {\r\n propertyIDs.add(timelines[i].getPropertyId());\r\n timelineMode[i] = AnimationState.HOLD;\r\n }\r\n return;\r\n }\r\n\r\n outer:\r\n for (let i = 0; i < timelinesCount; i++) {\r\n let timeline = timelines[i];\r\n let id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline\r\n || timeline instanceof EventTimeline || !this.hasTimeline(to, id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n } else {\r\n for (let next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (this.hasTimeline(next, id)) continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD;\r\n }\r\n }\r\n }\r\n\r\n computeNotLast (entry: TrackEntry) {\r\n let timelines = entry.animation.timelines;\r\n let timelinesCount = entry.animation.timelines.length;\r\n let timelineMode = entry.timelineMode;\r\n let propertyIDs = this.propertyIDs;\r\n\r\n for (let i = 0; i < timelinesCount; i++) {\r\n if (timelines[i] instanceof AttachmentTimeline) {\r\n let timeline = timelines[i] as AttachmentTimeline;\r\n if (!propertyIDs.add(timeline.slotIndex)) timelineMode[i] |= AnimationState.NOT_LAST;\r\n }\r\n }\r\n }\r\n\r\n hasTimeline (entry: TrackEntry, id: number) : boolean {\r\n let timelines = entry.animation.timelines;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n if (timelines[i].getPropertyId() == id) return true;\r\n return false;\r\n }\r\n\r\n getCurrent (trackIndex: number) {\r\n if (trackIndex >= this.tracks.length) return null;\r\n return this.tracks[trackIndex];\r\n }\r\n\r\n addListener (listener: AnimationStateListener2) {\r\n if (listener == null) throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n }\r\n\r\n /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */\r\n removeListener (listener: AnimationStateListener2) {\r\n let index = this.listeners.indexOf(listener);\r\n if (index >= 0) this.listeners.splice(index, 1);\r\n }\r\n\r\n clearListeners () {\r\n this.listeners.length = 0;\r\n }\r\n\r\n clearListenerNotifications () {\r\n this.queue.clear();\r\n }\r\n\r\n //deprecated stuff\r\n onComplete: (trackIndex: number, loopCount: number) => any;\r\n onEvent: (trackIndex: number, event: Event) => any;\r\n onStart: (trackIndex: number) => any;\r\n onEnd: (trackIndex: number) => any;\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n\r\n setAnimationByName(trackIndex: number, animationName: string, loop: boolean) {\r\n if (!AnimationState.deprecatedWarning1) {\r\n AnimationState.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.\");\r\n }\r\n this.setAnimation(trackIndex, animationName, loop);\r\n }\r\n\r\n private static deprecatedWarning2: boolean = false;\r\n\r\n addAnimationByName(trackIndex: number, animationName: string, loop: boolean, delay: number) {\r\n if (!AnimationState.deprecatedWarning2) {\r\n AnimationState.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.\");\r\n }\r\n this.addAnimation(trackIndex, animationName, loop, delay);\r\n }\r\n\r\n private static deprecatedWarning3: boolean = false;\r\n\r\n hasAnimation(animationName: string): boolean {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n return animation !== null;\r\n }\r\n\r\n hasAnimationByName(animationName: string): boolean {\r\n if (!AnimationState.deprecatedWarning3) {\r\n AnimationState.deprecatedWarning3 = true;\r\n console.warn(\"Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\r\n }\r\n return this.hasAnimation(animationName);\r\n }\r\n }\r\n\r\n export class TrackEntry {\r\n animation: Animation;\r\n next: TrackEntry; mixingFrom: TrackEntry; mixingTo: TrackEntry;\r\n listener: AnimationStateListener2;\r\n trackIndex: number;\r\n loop: boolean;\r\n holdPrevious: boolean;\r\n eventThreshold: number; attachmentThreshold: number; drawOrderThreshold: number;\r\n animationStart: number; animationEnd: number; animationLast: number; nextAnimationLast: number;\r\n delay: number; trackTime: number; trackLast: number; nextTrackLast: number; trackEnd: number; timeScale: number;\r\n alpha: number; mixTime: number; mixDuration: number; interruptAlpha: number; totalAlpha: number;\r\n mixBlend = MixBlend.replace;\r\n timelineMode = new Array();\r\n timelineHoldMix = new Array();\r\n timelinesRotation = new Array();\r\n\r\n reset () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n }\r\n\r\n getAnimationTime () {\r\n if (this.loop) {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration == 0) return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n }\r\n\r\n setAnimationLast(animationLast: number) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n }\r\n\r\n isComplete () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n }\r\n\r\n resetRotationDirections () {\r\n this.timelinesRotation.length = 0;\r\n }\r\n\r\n //deprecated stuff\r\n onComplete: (trackIndex: number, loopCount: number) => any;\r\n onEvent: (trackIndex: number, event: Event) => any;\r\n onStart: (trackIndex: number) => any;\r\n onEnd: (trackIndex: number) => any;\r\n\r\n private static deprecatedWarning1: Boolean = false;\r\n private static deprecatedWarning2: Boolean = false;\r\n\r\n get time() {\r\n if (!TrackEntry.deprecatedWarning1) {\r\n TrackEntry.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n }\r\n return this.trackTime;\r\n }\r\n\r\n set time(value: number) {\r\n if (!TrackEntry.deprecatedWarning1) {\r\n TrackEntry.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\r\n }\r\n this.trackTime = value;\r\n }\r\n\r\n get endTime() {\r\n if (!TrackEntry.deprecatedWarning2) {\r\n TrackEntry.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n }\r\n return this.trackTime;\r\n }\r\n\r\n set endTime(value: number) {\r\n if (!TrackEntry.deprecatedWarning2) {\r\n TrackEntry.deprecatedWarning2 = true;\r\n console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\r\n }\r\n this.trackTime = value;\r\n }\r\n\r\n loopsCount() {\r\n return Math.floor(this.trackTime / this.trackEnd);\r\n }\r\n }\r\n\r\n export class EventQueue {\r\n objects: Array = [];\r\n drainDisabled = false;\r\n animState: AnimationState;\r\n\r\n constructor(animState: AnimationState) {\r\n this.animState = animState;\r\n }\r\n\r\n start (entry: TrackEntry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n\r\n interrupt (entry: TrackEntry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n }\r\n\r\n end (entry: TrackEntry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n\r\n dispose (entry: TrackEntry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n }\r\n\r\n complete (entry: TrackEntry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n }\r\n\r\n event (entry: TrackEntry, event: Event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n }\r\n\r\n private static deprecatedWarning1: Boolean = false;\r\n\r\n deprecateStuff() {\r\n if (!EventQueue.deprecatedWarning1) {\r\n EventQueue.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'\");\r\n }\r\n return true;\r\n }\r\n\r\n drain () {\r\n if (this.drainDisabled) return;\r\n this.drainDisabled = true;\r\n\r\n let objects = this.objects;\r\n let listeners = this.animState.listeners;\r\n\r\n for (let i = 0; i < objects.length; i += 2) {\r\n let type = objects[i] as EventType;\r\n let entry = objects[i + 1] as TrackEntry;\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start) entry.listener.start(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start) listeners[ii].start(entry);\r\n //deprecation\r\n entry.onStart && this.deprecateStuff() && entry.onStart(entry.trackIndex);\r\n this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(entry.trackIndex);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt) entry.listener.interrupt(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt) listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end) entry.listener.end(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end) listeners[ii].end(entry);\r\n //deprecation\r\n entry.onEnd && this.deprecateStuff() && entry.onEnd(entry.trackIndex);\r\n this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(entry.trackIndex);\r\n // Fall through.\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose) entry.listener.dispose(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose) listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete) entry.listener.complete(entry);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete) listeners[ii].complete(entry);\r\n //deprecation\r\n\r\n let count = MathUtils.toInt(entry.loopsCount()) ;\r\n entry.onComplete && this.deprecateStuff() && entry.onComplete(entry.trackIndex, count);\r\n this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(entry.trackIndex, count);\r\n break;\r\n case EventType.event:\r\n let event = objects[i++ + 2] as Event;\r\n if (entry.listener != null && entry.listener.event) entry.listener.event(entry, event);\r\n for (let ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event) listeners[ii].event(entry, event);\r\n //deprecation\r\n entry.onEvent && this.deprecateStuff() && entry.onEvent(entry.trackIndex, event);\r\n this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(entry.trackIndex, event);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n\r\n this.drainDisabled = false;\r\n }\r\n\r\n clear () {\r\n this.objects.length = 0;\r\n }\r\n }\r\n\r\n export enum EventType {\r\n start, interrupt, end, dispose, complete, event\r\n }\r\n\r\n export interface AnimationStateListener2 {\r\n /** Invoked when this entry has been set as the current entry. */\r\n start? (entry: TrackEntry): void;\r\n\r\n /** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for\r\n * mixing. */\r\n interrupt? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry is no longer the current entry and will never be applied again. */\r\n end? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.\r\n * References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */\r\n dispose? (entry: TrackEntry): void;\r\n\r\n /** Invoked every time this entry's animation completes a loop. */\r\n complete? (entry: TrackEntry): void;\r\n\r\n /** Invoked when this entry's animation triggers an event. */\r\n event? (entry: TrackEntry, event: Event): void;\r\n }\r\n\r\n export abstract class AnimationStateAdapter2 implements AnimationStateListener2 {\r\n start (entry: TrackEntry) {\r\n }\r\n\r\n interrupt (entry: TrackEntry) {\r\n }\r\n\r\n end (entry: TrackEntry) {\r\n }\r\n\r\n dispose (entry: TrackEntry) {\r\n }\r\n\r\n complete (entry: TrackEntry) {\r\n }\r\n\r\n event (entry: TrackEntry, event: Event) {\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class AnimationStateData {\r\n skeletonData: SkeletonData;\r\n animationToMixTime: Map = {};\r\n defaultMix = 0;\r\n\r\n constructor(skeletonData: SkeletonData) {\r\n if (skeletonData == null) throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n\r\n setMix(fromName: string, toName: string, duration: number) {\r\n let from = this.skeletonData.findAnimation(fromName);\r\n if (from == null) throw new Error(\"Animation not found: \" + fromName);\r\n let to = this.skeletonData.findAnimation(toName);\r\n if (to == null) throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n }\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n\r\n setMixByName(fromName: string, toName: string, duration: number) {\r\n if (!AnimationStateData.deprecatedWarning1) {\r\n AnimationStateData.deprecatedWarning1 = true;\r\n console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\r\n }\r\n this.setMix(fromName, toName, duration);\r\n }\r\n\r\n setMixWith(from: Animation, to: Animation, duration: number) {\r\n if (from == null) throw new Error(\"from cannot be null.\");\r\n if (to == null) throw new Error(\"to cannot be null.\");\r\n let key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n }\r\n\r\n getMix(from: Animation, to: Animation) {\r\n let key = from.name + \".\" + to.name;\r\n let value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class AtlasAttachmentLoader implements AttachmentLoader {\r\n atlas: TextureAtlas;\r\n\r\n constructor(atlas: TextureAtlas) {\r\n this.atlas = atlas;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment {\r\n let region = this.atlas.findRegion(path);\r\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n let attachment = new RegionAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment {\r\n let region = this.atlas.findRegion(path);\r\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n let attachment = new MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n }\r\n\r\n /** @return May be null to not load an attachment. */\r\n newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment {\r\n return new BoundingBoxAttachment(name);\r\n }\r\n\r\n /** @return May be null to not load an attachment */\r\n newPathAttachment(skin: Skin, name: string): PathAttachment {\r\n return new PathAttachment(name);\r\n }\r\n\r\n newPointAttachment(skin: Skin, name: string): PointAttachment {\r\n return new PointAttachment(name);\r\n }\r\n\r\n newClippingAttachment(skin: Skin, name: string): ClippingAttachment {\r\n return new ClippingAttachment(name);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export enum BlendMode {\r\n Normal = 0,\r\n Additive = 1,\r\n Multiply = 2,\r\n Screen = 3\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Bone implements Updatable {\r\n static yDown: boolean = false;\r\n //be careful! Spine b,c is c,b in pixi matrix\r\n matrix = new PIXI.Matrix();\r\n\r\n get worldX(): number {\r\n return this.matrix.tx;\r\n }\r\n\r\n get worldY(): number {\r\n return this.matrix.ty;\r\n }\r\n\r\n data: BoneData;\r\n skeleton: Skeleton;\r\n parent: Bone;\r\n children = new Array();\r\n x = 0;\r\n y = 0;\r\n rotation = 0;\r\n scaleX = 0;\r\n scaleY = 0;\r\n shearX = 0;\r\n shearY = 0;\r\n ax = 0;\r\n ay = 0;\r\n arotation = 0;\r\n ascaleX = 0;\r\n ascaleY = 0;\r\n ashearX = 0;\r\n ashearY = 0;\r\n appliedValid = false;\r\n\r\n sorted = false;\r\n active = false;\r\n\r\n /** @param parent May be null. */\r\n constructor(data: BoneData, skeleton: Skeleton, parent: Bone) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */\r\n update() {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n }\r\n\r\n /** Computes the world transform using the parent bone and this bone's local transform. */\r\n updateWorldTransform() {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n }\r\n\r\n /** Computes the world transform using the parent bone and the specified local transform. */\r\n updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n\r\n let parent = this.parent;\r\n let m = this.matrix;\r\n\r\n let sx = this.skeleton.scaleX;\r\n let sy = Bone.yDown? -this.skeleton.scaleY : this.skeleton.scaleY;\r\n\r\n if (parent == null) { // Root bone.\r\n let skeleton = this.skeleton;\r\n let rotationY = rotation + 90 + shearY;\r\n m.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n m.c = MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n m.b = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n m.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n m.tx = x * sx + skeleton.x;\r\n m.ty = y * sy + skeleton.y;\r\n return;\r\n }\r\n\r\n let pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d;\r\n m.tx = pa * x + pb * y + parent.matrix.tx;\r\n m.ty = pc * x + pd * y + parent.matrix.ty;\r\n switch (this.data.transformMode) {\r\n case TransformMode.Normal: {\r\n let rotationY = rotation + 90 + shearY;\r\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\r\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * scaleY;\r\n m.a = pa * la + pb * lc;\r\n m.c = pa * lb + pb * ld;\r\n m.b = pc * la + pd * lc;\r\n m.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case TransformMode.OnlyTranslation: {\r\n let rotationY = rotation + 90 + shearY;\r\n m.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n m.c = MathUtils.cosDeg(rotationY) * scaleY;\r\n m.b = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n m.d = MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case TransformMode.NoRotationOrReflection: {\r\n let s = pa * pa + pc * pc;\r\n let prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * MathUtils.radDeg;\r\n } else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\r\n }\r\n let rx = rotation + shearX - prx;\r\n let ry = rotation + shearY - prx + 90;\r\n let la = MathUtils.cosDeg(rx) * scaleX;\r\n let lb = MathUtils.cosDeg(ry) * scaleY;\r\n let lc = MathUtils.sinDeg(rx) * scaleX;\r\n let ld = MathUtils.sinDeg(ry) * scaleY;\r\n m.a = pa * la - pb * lc;\r\n m.c = pa * lb - pb * ld;\r\n m.b = pc * la + pd * lc;\r\n m.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case TransformMode.NoScale:\r\n case TransformMode.NoScaleOrReflection: {\r\n let cos = MathUtils.cosDeg(rotation);\r\n let sin = MathUtils.sinDeg(rotation);\r\n let za = (pa * cos + pb * sin) / sx;\r\n let zc = (pc * cos + pd * sin) / sy;\r\n let s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001) s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (\r\n this.data.transformMode == TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (Bone.yDown?\r\n (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) :\r\n (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n ) s = -s;\r\n let r = Math.PI / 2 + Math.atan2(zc, za);\r\n let zb = Math.cos(r) * s;\r\n let zd = Math.sin(r) * s;\r\n let la = MathUtils.cosDeg(shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\r\n let lc = MathUtils.sinDeg(shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(90 + shearY) * scaleY;\r\n m.a = za * la + zb * lc;\r\n m.c = za * lb + zb * ld;\r\n m.b = zc * la + zd * lc;\r\n m.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n m.a *= sx;\r\n m.c *= sx;\r\n m.b *= sy;\r\n m.d *= sy;\r\n }\r\n\r\n setToSetupPose() {\r\n let data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n }\r\n\r\n getWorldRotationX() {\r\n return Math.atan2(this.matrix.b, this.matrix.a) * MathUtils.radDeg;\r\n }\r\n\r\n getWorldRotationY() {\r\n return Math.atan2(this.matrix.d, this.matrix.c) * MathUtils.radDeg;\r\n }\r\n\r\n getWorldScaleX() {\r\n let m = this.matrix;\r\n return Math.sqrt(m.a * m.a + m.c * m.c);\r\n }\r\n\r\n getWorldScaleY() {\r\n let m = this.matrix;\r\n return Math.sqrt(m.b * m.b + m.d * m.d);\r\n }\r\n\r\n /** Computes the individual applied transform values from the world transform. This can be useful to perform processing using\r\n * the applied transform after the world transform has been modified directly (eg, by a constraint).\r\n *

\r\n * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */\r\n updateAppliedTransform() {\r\n this.appliedValid = true;\r\n let parent = this.parent;\r\n let m = this.matrix;\r\n if (parent == null) {\r\n this.ax = m.tx;\r\n this.ay = m.ty;\r\n this.arotation = Math.atan2(m.b, m.a) * MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b);\r\n this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * MathUtils.radDeg;\r\n return;\r\n }\r\n let pm = parent.matrix;\r\n let pid = 1 / (pm.a * pm.d - pm.b * pm.c);\r\n let dx = m.tx - pm.tx, dy = m.ty - pm.ty;\r\n this.ax = (dx * pm.d * pid - dy * pm.c * pid);\r\n this.ay = (dy * pm.a * pid - dx * pm.b * pid);\r\n let ia = pid * pm.d;\r\n let id = pid * pm.a;\r\n let ib = pid * pm.c;\r\n let ic = pid * pm.b;\r\n let ra = ia * m.a - ib * m.b;\r\n let rb = ia * m.c - ib * m.d;\r\n let rc = id * m.b - ic * m.a;\r\n let rd = id * m.d - ic * m.c;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n let det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\r\n } else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\r\n }\r\n }\r\n\r\n worldToLocal(world: Vector2) {\r\n let m = this.matrix;\r\n let a = m.a, b = m.c, c = m.b, d = m.d;\r\n let invDet = 1 / (a * d - b * c);\r\n let x = world.x - m.tx, y = world.y - m.ty;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n }\r\n\r\n localToWorld(local: Vector2) {\r\n let m = this.matrix;\r\n let x = local.x, y = local.y;\r\n local.x = x * m.a + y * m.c + m.tx;\r\n local.y = x * m.b + y * m.d + m.ty;\r\n return local;\r\n }\r\n\r\n worldToLocalRotation (worldRotation: number) {\r\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\r\n let mat = this.matrix;\r\n return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * MathUtils.radDeg;\r\n }\r\n\r\n localToWorldRotation (localRotation: number) {\r\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\r\n let mat = this.matrix;\r\n return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * MathUtils.radDeg;\r\n }\r\n\r\n rotateWorld (degrees: number) {\r\n let mat = this.matrix;\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class BoneData {\r\n index: number;\r\n name: string;\r\n parent: BoneData;\r\n length: number;\r\n x = 0;\r\n y = 0;\r\n rotation = 0;\r\n scaleX = 1;\r\n scaleY = 1;\r\n shearX = 0;\r\n shearY = 0;\r\n transformMode = TransformMode.Normal;\r\n skinRequired = false;\r\n\r\n color = new Color();\r\n\r\n constructor(index: number, name: string, parent: BoneData) {\r\n if (index < 0) throw new Error(\"index must be >= 0.\");\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n }\r\n\r\n export enum TransformMode {\r\n Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class ConstraintData {\r\n constructor(public name: string, public order: number, public skinRequired: boolean) { }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Event {\r\n data: EventData;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n time: number;\r\n volume: number;\r\n balance: number;\r\n\r\n\r\n constructor(time: number, data: EventData) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class EventData {\r\n name: string;\r\n intValue: number;\r\n floatValue: number;\r\n stringValue: string;\r\n audioPath: string;\r\n volume: number;\r\n balance: number;\r\n\r\n constructor (name: string) {\r\n this.name = name;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class IkConstraint implements Updatable {\r\n data: IkConstraintData;\r\n bones: Array;\r\n target: Bone;\r\n bendDirection = 0;\r\n compress = false;\r\n stretch = false;\r\n mix = 1;\r\n softness = 0;\r\n active = false;\r\n\r\n constructor (data: IkConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply () {\r\n this.update();\r\n }\r\n\r\n update () {\r\n let target = this.target;\r\n let bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n }\r\n\r\n /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\r\n * coordinate system. */\r\n apply1 (bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number) {\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n let p = bone.parent.matrix;\r\n let id = 1 / (p.a * p.d - p.b * p.c);\r\n let x = targetX - p.tx, y = targetY - p.ty;\r\n let tx = (x * p.d - y * p.c) * id - bone.ax, ty = (y * p.a - x * p.b) * id - bone.ay;\r\n let rotationIK = Math.atan2(ty, tx) * MathUtils.radDeg - bone.ashearX - bone.arotation;\r\n if (bone.ascaleX < 0) rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180) rotationIK += 360;\r\n let sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n let s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform) sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX,\r\n bone.ashearY);\r\n }\r\n\r\n /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\r\n * target is specified in the world coordinate system.\r\n * @param child A direct descendant of the parent bone. */\r\n apply2 (parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, softness: number, alpha: number) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid) parent.updateAppliedTransform();\r\n if (!child.appliedValid) child.updateAppliedTransform();\r\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n let pmat = parent.matrix;\r\n let os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n } else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n } else\r\n os2 = 0;\r\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d;\r\n let u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + pmat.tx;\r\n cwy = c * cx + pmat.ty;\r\n } else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + pmat.tx;\r\n cwy = c * cx + d * cy + pmat.ty;\r\n }\r\n let pp = parent.parent.matrix;\r\n a = pp.a;\r\n b = pp.c;\r\n c = pp.b;\r\n d = pp.d;\r\n let id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty;\r\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.tx;\r\n y = targetY - pp.ty;\r\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n let dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n let p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer:\r\n if (u) {\r\n l2 *= psx;\r\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch) sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n } else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n let c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n let q = Math.sqrt(d);\r\n if (c1 < 0) q = -q;\r\n q = -(c1 + q) / 2;\r\n let r0 = q / c2, r1 = c / q;\r\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n } else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n let os = Math.atan2(cy, cx) * s2;\r\n let rotation = parent.arotation;\r\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180) a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180) a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class IkConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: BoneData;\r\n bendDirection = 1;\r\n compress = false;\r\n stretch = false;\r\n uniform = false;\r\n mix = 1;\r\n softness = 0;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class PathConstraint implements Updatable {\r\n static NONE = -1; static BEFORE = -2; static AFTER = -3;\r\n static epsilon = 0.00001;\r\n\r\n data: PathConstraintData;\r\n bones: Array;\r\n target: Slot;\r\n position = 0; spacing = 0; rotateMix = 0; translateMix = 0;\r\n\r\n spaces = new Array(); positions = new Array();\r\n world = new Array(); curves = new Array(); lengths = new Array();\r\n segments = new Array();\r\n\r\n active = false;\r\n\r\n constructor (data: PathConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply () {\r\n this.update();\r\n }\r\n\r\n update () {\r\n let attachment = this.target.getAttachment();\r\n if (!(attachment instanceof PathAttachment)) return;\r\n\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n let translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate) return;\r\n\r\n let data = this.data;\r\n let spacingMode = data.spacingMode;\r\n let lengthSpacing = spacingMode == SpacingMode.Length;\r\n let rotateMode = data.rotateMode;\r\n let tangents = rotateMode == RotateMode.Tangent, scale = rotateMode == RotateMode.ChainScale;\r\n let boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n let bones = this.bones;\r\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths: Array = null;\r\n let spacing = this.spacing;\r\n if (scale || lengthSpacing) {\r\n if (scale) lengths = Utils.setArraySize(this.lengths, boneCount);\r\n for (let i = 0, n = spacesCount - 1; i < n;) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale) lengths[i] = 0;\r\n spaces[++i] = 0;\r\n } else {\r\n let x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale) lengths[i] = length;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\r\n }\r\n }\r\n } else {\r\n for (let i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n\r\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents,\r\n data.positionMode == PositionMode.Percent, spacingMode == SpacingMode.Percent);\r\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n let tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == RotateMode.Chain;\r\n else {\r\n tip = false;\r\n let p = this.target.bone.matrix;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n }\r\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n let bone = bones[i];\r\n let mat = bone.matrix;\r\n mat.tx += (boneX - mat.tx) * translateMix;\r\n mat.ty += (boneY - mat.ty) * translateMix;\r\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n let length = lengths[i];\r\n if (length != 0) {\r\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * rotateMix + 1;\r\n mat.a *= s;\r\n mat.b *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n let length = bone.data.length;\r\n boneX += (length * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length * (sin * a + cos * c) - dy) * rotateMix;\r\n } else {\r\n r += offsetRotation;\r\n }\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) //\r\n r += MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n }\r\n\r\n computeWorldPositions (path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean,\r\n percentSpacing: boolean) {\r\n let target = this.target;\r\n let position = this.position;\r\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world: Array = null;\r\n let closed = path.closed;\r\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n\r\n if (!path.constantSpeed) {\r\n let lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n let pathLength = lengths[curveCount];\r\n if (percentPosition) position *= pathLength;\r\n if (percentSpacing) {\r\n for (let i = 0; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n world = Utils.setArraySize(this.world, 8);\r\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i];\r\n position += space;\r\n let p = position;\r\n\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0) p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength, world, 0, out, o);\r\n continue;\r\n }\r\n\r\n // Determine curve containing position.\r\n for (;; curve++) {\r\n let length = lengths[curve];\r\n if (p > length) continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = lengths[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n } else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o,\r\n tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n\r\n // World vertices.\r\n if (closed) {\r\n verticesLength += 2;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n } else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n\r\n // Curve lengths.\r\n let curves = Utils.setArraySize(this.curves, curveCount);\r\n let pathLength = 0;\r\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition) position *= pathLength;\r\n if (percentSpacing) {\r\n for (let i = 0; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n\r\n let segments = this.segments;\r\n let curveLength = 0;\r\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i];\r\n position += space;\r\n let p = position;\r\n\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0) p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n\r\n // Determine curve containing position.\r\n for (;; curve++) {\r\n let length = curves[curve];\r\n if (p > length) continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = curves[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n\r\n // Curve segment lengths.\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n let ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n\r\n // Weight by segment length.\r\n p *= curveLength;\r\n for (;; segment++) {\r\n let length = segments[segment];\r\n if (p > length) continue;\r\n if (segment == 0)\r\n p /= length;\r\n else {\r\n let prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n\r\n addBeforePosition (p: number, temp: Array, i: number, out: Array, o: number) {\r\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n\r\n addAfterPosition (p: number, temp: Array, i: number, out: Array, o: number) {\r\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n\r\n addCurvePosition (p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number,\r\n out: Array, o: number, tangents: boolean) {\r\n if (p == 0 || isNaN(p)) p = 0.0001;\r\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class PathConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: SlotData;\r\n positionMode: PositionMode;\r\n spacingMode: SpacingMode;\r\n rotateMode: RotateMode;\r\n offsetRotation: number;\r\n position: number; spacing: number; rotateMix: number; translateMix: number;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n\r\n export enum PositionMode {\r\n Fixed, Percent\r\n }\r\n\r\n export enum SpacingMode {\r\n Length, Fixed, Percent\r\n }\r\n\r\n export enum RotateMode {\r\n Tangent, Chain, ChainScale\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Skeleton {\r\n data: SkeletonData;\r\n bones: Array;\r\n slots: Array;\r\n drawOrder: Array;\r\n ikConstraints: Array;\r\n transformConstraints: Array;\r\n pathConstraints: Array;\r\n _updateCache = new Array();\r\n updateCacheReset = new Array();\r\n skin: Skin;\r\n color: Color;\r\n time = 0;\r\n scaleX = 1; scaleY = 1;\r\n x = 0; y = 0;\r\n\r\n constructor (data: SkeletonData) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let boneData = data.bones[i];\r\n let bone: Bone;\r\n if (boneData.parent == null)\r\n bone = new Bone(boneData, this, null);\r\n else {\r\n let parent = this.bones[boneData.parent.index];\r\n bone = new Bone(boneData, this, parent);\r\n parent.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (let i = 0; i < data.slots.length; i++) {\r\n let slotData = data.slots[i];\r\n let bone = this.bones[slotData.boneData.index];\r\n let slot = new Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n\r\n this.ikConstraints = new Array();\r\n for (let i = 0; i < data.ikConstraints.length; i++) {\r\n let ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\r\n }\r\n\r\n this.transformConstraints = new Array();\r\n for (let i = 0; i < data.transformConstraints.length; i++) {\r\n let transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\r\n }\r\n\r\n this.pathConstraints = new Array();\r\n for (let i = 0; i < data.pathConstraints.length; i++) {\r\n let pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\r\n }\r\n\r\n this.color = new Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n\r\n updateCache () {\r\n let updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n\r\n if (this.skin != null) {\r\n let skinBones = this.skin.bones;\r\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\r\n let bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n\r\n // IK first, lowest hierarchy depth first.\r\n let ikConstraints = this.ikConstraints;\r\n let transformConstraints = this.transformConstraints;\r\n let pathConstraints = this.pathConstraints;\r\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n let constraintCount = ikCount + transformCount + pathCount;\r\n\r\n outer:\r\n for (let i = 0; i < constraintCount; i++) {\r\n for (let ii = 0; ii < ikCount; ii++) {\r\n let constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < transformCount; ii++) {\r\n let constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < pathCount; ii++) {\r\n let constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n }\r\n\r\n sortIkConstraint (constraint: IkConstraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n let target = constraint.target;\r\n this.sortBone(target);\r\n\r\n let constrained = constraint.bones;\r\n let parent = constrained[0];\r\n this.sortBone(parent);\r\n\r\n if (constrained.length > 1) {\r\n let child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\r\n }\r\n\r\n this._updateCache.push(constraint);\r\n\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n }\r\n\r\n sortPathConstraint (constraint: PathConstraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n let slot = constraint.target;\r\n let slotIndex = slot.data.index;\r\n let slotBone = slot.bone;\r\n if (this.skin != null) this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (let i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof PathAttachment) this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n\r\n this._updateCache.push(constraint);\r\n\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n\r\n sortTransformConstraint (constraint: TransformConstraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active) return;\r\n\r\n this.sortBone(constraint.target);\r\n\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (let i = 0; i < boneCount; i++) {\r\n let child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\r\n }\r\n } else {\r\n for (let i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n\r\n this._updateCache.push(constraint);\r\n\r\n for (let ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (let ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n }\r\n\r\n sortPathConstraintAttachment (skin: Skin, slotIndex: number, slotBone: Bone) {\r\n let attachments = skin.attachments[slotIndex];\r\n if (!attachments) return;\r\n for (let key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n }\r\n\r\n sortPathConstraintAttachmentWith (attachment: Attachment, slotBone: Bone) {\r\n if (!(attachment instanceof PathAttachment)) return;\r\n let pathBones = (attachment).bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n let bones = this.bones;\r\n let i = 0;\r\n while (i < pathBones.length) {\r\n let boneCount = pathBones[i++];\r\n for (let n = i + boneCount; i < n; i++) {\r\n let boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n sortBone (bone: Bone) {\r\n if (bone.sorted) return;\r\n let parent = bone.parent;\r\n if (parent != null) this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n }\r\n\r\n sortReset (bones: Array) {\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.active) continue;\r\n if (bone.sorted) this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n }\r\n\r\n /** Updates the world transform for each bone and applies constraints. */\r\n updateWorldTransform () {\r\n let updateCacheReset = this.updateCacheReset;\r\n for (let i = 0, n = updateCacheReset.length; i < n; i++) {\r\n let bone = updateCacheReset[i] as Bone;\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n }\r\n\r\n /** Sets the bones, constraints, and slots to their setup pose values. */\r\n setToSetupPose () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n }\r\n\r\n /** Sets the bones and constraints to their setup pose values. */\r\n setBonesToSetupPose () {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n let data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n let data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n }\r\n\r\n setSlotsToSetupPose () {\r\n let slots = this.slots;\r\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n }\r\n\r\n /** @return May return null. */\r\n getRootBone () {\r\n if (this.bones.length == 0) return null;\r\n return this.bones[0];\r\n }\r\n\r\n /** @return May be null. */\r\n findBone (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.data.name == boneName) return bone;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return -1 if the bone was not found. */\r\n findBoneIndex (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName) return i;\r\n return -1;\r\n }\r\n\r\n /** @return May be null. */\r\n findSlot (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) return slot;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return -1 if the bone was not found. */\r\n findSlotIndex (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName) return i;\r\n return -1;\r\n }\r\n\r\n /** Sets a skin by name.\r\n * @see #setSkin(Skin) */\r\n setSkinByName (skinName: string) {\r\n let skin = this.data.findSkin(skinName);\r\n if (skin == null) throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n }\r\n\r\n /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\r\n * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\r\n * old skin, each slot's setup mode attachment is attached from the new skin.\r\n * @param newSkin May be null. */\r\n setSkin (newSkin: Skin) {\r\n if (newSkin == this.skin) return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let name = slot.data.attachmentName;\r\n if (name != null) {\r\n let attachment: Attachment = newSkin.getAttachment(i, name);\r\n if (attachment != null) slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachmentByName (slotName: string, attachmentName: string): Attachment {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (slotIndex: number, attachmentName: string): Attachment {\r\n if (attachmentName == null) throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n let attachment: Attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null) return attachment;\r\n }\r\n if (this.data.defaultSkin != null) return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n }\r\n\r\n /** @param attachmentName May be null. */\r\n setAttachment (slotName: string, attachmentName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n let attachment: Attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n }\r\n\r\n /** @return May be null. */\r\n findIkConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName) return ikConstraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return May be null. */\r\n findTransformConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** @return May be null. */\r\n findPathConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * @param size The width and height of the AABB.\r\n * @param temp Working memory */\r\n getBounds (offset: Vector2, size: Vector2, temp: Array = new Array(2)) {\r\n if (offset == null) throw new Error(\"offset cannot be null.\");\r\n if (size == null) throw new Error(\"size cannot be null.\");\r\n let drawOrder = this.drawOrder;\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active) continue;\r\n let verticesLength = 0;\r\n let vertices: ArrayLike = null;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n (attachment).computeWorldVertices(slot.bone, vertices, 0, 2);\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = (attachment);\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n }\r\n\r\n update (delta: number) {\r\n this.time += delta;\r\n }\r\n\r\n get flipX(): boolean {\r\n return this.scaleX == -1;\r\n }\r\n\r\n set flipX(value: boolean) {\r\n if (!Skeleton.deprecatedWarning1) {\r\n Skeleton.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n }\r\n this.scaleX = value ? 1.0 : -1.0;\r\n }\r\n\r\n get flipY(): boolean {\r\n return this.scaleY == -1;\r\n }\r\n\r\n set flipY(value: boolean) {\r\n if (!Skeleton.deprecatedWarning1) {\r\n Skeleton.deprecatedWarning1 = true;\r\n console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\r\n }\r\n this.scaleY = value ? 1.0 : -1.0;\r\n }\r\n\r\n private static deprecatedWarning1: boolean = false;\r\n }\r\n}\r\n","/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated May 1, 2019. Replaces all prior versions.\n *\n * Copyright (c) 2013-2019, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\n * or otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\n * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\n * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n\texport class SkeletonBinary {\n\t\tstatic AttachmentTypeValues = [ 0 /*AttachmentType.Region*/, 1/*AttachmentType.BoundingBox*/, 2/*AttachmentType.Mesh*/, 3/*AttachmentType.LinkedMesh*/, 4/*AttachmentType.Path*/, 5/*AttachmentType.Point*/, 6/*AttachmentType.Clipping*/ ];\n\t\tstatic TransformModeValues = [TransformMode.Normal, TransformMode.OnlyTranslation, TransformMode.NoRotationOrReflection, TransformMode.NoScale, TransformMode.NoScaleOrReflection];\n\t\tstatic PositionModeValues = [ PositionMode.Fixed, PositionMode.Percent ];\n\t\tstatic SpacingModeValues = [ SpacingMode.Length, SpacingMode.Fixed, SpacingMode.Percent];\n\t\tstatic RotateModeValues = [ RotateMode.Tangent, RotateMode.Chain, RotateMode.ChainScale ];\n\t\tstatic BlendModeValues = [ BlendMode.Normal, BlendMode.Additive, BlendMode.Multiply, BlendMode.Screen];\n\n\t\tstatic BONE_ROTATE = 0;\n\t\tstatic BONE_TRANSLATE = 1;\n\t\tstatic BONE_SCALE = 2;\n\t\tstatic BONE_SHEAR = 3;\n\n\t\tstatic SLOT_ATTACHMENT = 0;\n\t\tstatic SLOT_COLOR = 1;\n\t\tstatic SLOT_TWO_COLOR = 2;\n\n\t\tstatic PATH_POSITION = 0;\n\t\tstatic PATH_SPACING = 1;\n\t\tstatic PATH_MIX = 2;\n\n\t\tstatic CURVE_LINEAR = 0;\n\t\tstatic CURVE_STEPPED = 1;\n\t\tstatic CURVE_BEZIER = 2;\n\n\t\tattachmentLoader: AttachmentLoader;\n\t\tscale = 1;\n\t\tprivate linkedMeshes = new Array();\n\n\t\tconstructor (attachmentLoader: AttachmentLoader) {\n\t\t\tthis.attachmentLoader = attachmentLoader;\n\t\t}\n\n\t\treadSkeletonData (binary: Uint8Array): SkeletonData {\n\t\t\tlet scale = this.scale;\n\n\t\t\tlet skeletonData = new SkeletonData();\n\t\t\tskeletonData.name = \"\"; // BOZO\n\n\t\t\tlet input = new BinaryInput(binary);\n\n\t\t\tskeletonData.hash = input.readString();\n\t\t\tskeletonData.version = input.readString();\n\t\t\tskeletonData.x = input.readFloat();\n\t\t\tskeletonData.y = input.readFloat();\n\t\t\tskeletonData.width = input.readFloat();\n\t\t\tskeletonData.height = input.readFloat();\n\n\t\t\tlet nonessential = input.readBoolean();\n\t\t\tif (nonessential) {\n\t\t\t\tskeletonData.fps = input.readFloat();\n\n\t\t\t\tskeletonData.imagesPath = input.readString();\n\t\t\t\tskeletonData.audioPath = input.readString();\n\t\t\t}\n\n\t\t\tlet n = 0;\n\t\t\t// Strings.\n\t\t\tn = input.readInt(true)\n\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\tinput.strings.push(input.readString());\n\n\t\t\t// Bones.\n\t\t\tn = input.readInt(true)\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tlet name = input.readString();\n\t\t\t\tlet parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n\t\t\t\tlet data = new BoneData(i, name, parent);\n\t\t\t\tdata.rotation = input.readFloat();\n\t\t\t\tdata.x = input.readFloat() * scale;\n\t\t\t\tdata.y = input.readFloat() * scale;\n\t\t\t\tdata.scaleX = input.readFloat();\n\t\t\t\tdata.scaleY = input.readFloat();\n\t\t\t\tdata.shearX = input.readFloat();\n\t\t\t\tdata.shearY = input.readFloat();\n\t\t\t\tdata.length = input.readFloat() * scale;\n\t\t\t\tdata.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\n\t\t\t\tdata.skinRequired = input.readBoolean();\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(data.color, input.readInt32());\n\t\t\t\tskeletonData.bones.push(data);\n\t\t\t}\n\n\t\t\t// Slots.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tlet slotName = input.readString();\n\t\t\t\tlet boneData = skeletonData.bones[input.readInt(true)];\n\t\t\t\tlet data = new SlotData(i, slotName, boneData);\n\t\t\t\tColor.rgba8888ToColor(data.color, input.readInt32());\n\n\t\t\t\tlet darkColor = input.readInt32();\n\t\t\t\tif (darkColor != -1) Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n\n\t\t\t\tdata.attachmentName = input.readStringRef();\n\t\t\t\tdata.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\n\t\t\t\tskeletonData.slots.push(data);\n\t\t\t}\n\n\t\t\t// IK constraints.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0, nn; i < n; i++) {\n\t\t\t\tlet data = new IkConstraintData(input.readString());\n\t\t\t\tdata.order = input.readInt(true);\n\t\t\t\tdata.skinRequired = input.readBoolean();\n\t\t\t\tnn = input.readInt(true);\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\n\t\t\t\tdata.target = skeletonData.bones[input.readInt(true)];\n\t\t\t\tdata.mix = input.readFloat();\n\t\t\t\tdata.softness = input.readFloat() * scale;\n\t\t\t\tdata.bendDirection = input.readByte();\n\t\t\t\tdata.compress = input.readBoolean();\n\t\t\t\tdata.stretch = input.readBoolean();\n\t\t\t\tdata.uniform = input.readBoolean();\n\t\t\t\tskeletonData.ikConstraints.push(data);\n\t\t\t}\n\n\t\t\t// Transform constraints.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0, nn; i < n; i++) {\n\t\t\t\tlet data = new TransformConstraintData(input.readString());\n\t\t\t\tdata.order = input.readInt(true);\n\t\t\t\tdata.skinRequired = input.readBoolean();\n\t\t\t\tnn = input.readInt(true);\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\n\t\t\t\tdata.target = skeletonData.bones[input.readInt(true)];\n\t\t\t\tdata.local = input.readBoolean();\n\t\t\t\tdata.relative = input.readBoolean();\n\t\t\t\tdata.offsetRotation = input.readFloat();\n\t\t\t\tdata.offsetX = input.readFloat() * scale;\n\t\t\t\tdata.offsetY = input.readFloat() * scale;\n\t\t\t\tdata.offsetScaleX = input.readFloat();\n\t\t\t\tdata.offsetScaleY = input.readFloat();\n\t\t\t\tdata.offsetShearY = input.readFloat();\n\t\t\t\tdata.rotateMix = input.readFloat();\n\t\t\t\tdata.translateMix = input.readFloat();\n\t\t\t\tdata.scaleMix = input.readFloat();\n\t\t\t\tdata.shearMix = input.readFloat();\n\t\t\t\tskeletonData.transformConstraints.push(data);\n\t\t\t}\n\n\t\t\t// Path constraints.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0, nn; i < n; i++) {\n\t\t\t\tlet data = new PathConstraintData(input.readString());\n\t\t\t\tdata.order = input.readInt(true);\n\t\t\t\tdata.skinRequired = input.readBoolean();\n\t\t\t\tnn = input.readInt(true);\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\n\t\t\t\tdata.target = skeletonData.slots[input.readInt(true)];\n\t\t\t\tdata.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\n\t\t\t\tdata.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\n\t\t\t\tdata.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\n\t\t\t\tdata.offsetRotation = input.readFloat();\n\t\t\t\tdata.position = input.readFloat();\n\t\t\t\tif (data.positionMode == PositionMode.Fixed) data.position *= scale;\n\t\t\t\tdata.spacing = input.readFloat();\n\t\t\t\tif (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\n\t\t\t\tdata.rotateMix = input.readFloat();\n\t\t\t\tdata.translateMix = input.readFloat();\n\t\t\t\tskeletonData.pathConstraints.push(data);\n\t\t\t}\n\n\t\t\t// Default skin.\n\t\t\tlet defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n\t\t\tif (defaultSkin != null) {\n\t\t\t\tskeletonData.defaultSkin = defaultSkin;\n\t\t\t\tskeletonData.skins.push(defaultSkin);\n\t\t\t}\n\n\t\t\t// Skins.\n\t\t\t{\n\t\t\t\tlet i = skeletonData.skins.length;\n\t\t\t\tUtils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n\t\t\t\tfor (; i < n; i++)\n\t\t\t\t\tskeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\n\t\t\t}\n\n\t\t\t// Linked meshes.\n\t\t\tn = this.linkedMeshes.length;\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tlet linkedMesh = this.linkedMeshes[i];\n\t\t\t\tlet skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n\t\t\t\tif (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\n\t\t\t\tlet parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n\t\t\t\tif (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n\t\t\t\tlinkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent as VertexAttachment : linkedMesh.mesh;\n\t\t\t\tlinkedMesh.mesh.setParentMesh(parent as MeshAttachment);\n\t\t\t\t// linkedMesh.mesh.updateUVs();\n\t\t\t}\n\t\t\tthis.linkedMeshes.length = 0;\n\n\t\t\t// Events.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tlet data = new EventData(input.readStringRef());\n\t\t\t\tdata.intValue = input.readInt(false);\n\t\t\t\tdata.floatValue = input.readFloat();\n\t\t\t\tdata.stringValue = input.readString();\n\t\t\t\tdata.audioPath = input.readString();\n\t\t\t\tif (data.audioPath != null) {\n\t\t\t\t\tdata.volume = input.readFloat();\n\t\t\t\t\tdata.balance = input.readFloat();\n\t\t\t\t}\n\t\t\t\tskeletonData.events.push(data);\n\t\t\t}\n\n\t\t\t// Animations.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\tskeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\n\t\t\treturn skeletonData;\n\t\t}\n\n\t\tprivate readSkin (input: BinaryInput, skeletonData: SkeletonData, defaultSkin: boolean, nonessential: boolean): Skin {\n\t\t\tlet skin = new Skin(defaultSkin ? \"default\" : input.readStringRef());\n\n\t\t\tif (!defaultSkin) {\n\t\t\t\tskin.bones.length = input.readInt(true);\n\t\t\t\tfor (let i = 0, n = skin.bones.length; i < n; i++)\n\t\t\t\t\tskin.bones[i] = skeletonData.bones[input.readInt(true)];\n\n\t\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++)\n\t\t\t\t\tskin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n\t\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++)\n\t\t\t\t\tskin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n\t\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++)\n\t\t\t\t\tskin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\n\t\t\t}\n\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet slotIndex = input.readInt(true);\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet name = input.readStringRef();\n\t\t\t\t\tlet attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n\t\t\t\t\tif (attachment != null) skin.setAttachment(slotIndex, name, attachment);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn skin;\n\t\t}\n\n\t\tprivate readAttachment(input: BinaryInput, skeletonData: SkeletonData, skin: Skin, slotIndex: number, attachmentName: string, nonessential: boolean): Attachment {\n\t\t\tlet scale = this.scale;\n\n\t\t\tlet name = input.readStringRef();\n\t\t\tif (name == null) name = attachmentName;\n\n\t\t\tlet typeIndex = input.readByte();\n\t\t\tlet type = SkeletonBinary.AttachmentTypeValues[typeIndex];\n\t\t\tswitch (type) {\n\t\t\tcase AttachmentType.Region: {\n\t\t\t\tlet path = input.readStringRef();\n\t\t\t\tlet rotation = input.readFloat();\n\t\t\t\tlet x = input.readFloat();\n\t\t\t\tlet y = input.readFloat();\n\t\t\t\tlet scaleX = input.readFloat();\n\t\t\t\tlet scaleY = input.readFloat();\n\t\t\t\tlet width = input.readFloat();\n\t\t\t\tlet height = input.readFloat();\n\t\t\t\tlet color = input.readInt32();\n\n\t\t\t\tif (path == null) path = name;\n\t\t\t\tlet region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n\t\t\t\tif (region == null) return null;\n\t\t\t\tregion.path = path;\n\t\t\t\tregion.x = x * scale;\n\t\t\t\tregion.y = y * scale;\n\t\t\t\tregion.scaleX = scaleX;\n\t\t\t\tregion.scaleY = scaleY;\n\t\t\t\tregion.rotation = rotation;\n\t\t\t\tregion.width = width * scale;\n\t\t\t\tregion.height = height * scale;\n\t\t\t\tColor.rgba8888ToColor(region.color, color);\n\t\t\t\t// region.updateOffset();\n\t\t\t\treturn region;\n\t\t\t}\n\t\t\tcase AttachmentType.BoundingBox: {\n\t\t\t\tlet vertexCount = input.readInt(true);\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\n\n\t\t\t\tlet box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n\t\t\t\tif (box == null) return null;\n\t\t\t\tbox.worldVerticesLength = vertexCount << 1;\n\t\t\t\tbox.vertices = vertices.vertices;\n\t\t\t\tbox.bones = vertices.bones;\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(box.color, color);\n\t\t\t\treturn box;\n\t\t\t}\n\t\t\tcase AttachmentType.Mesh: {\n\t\t\t\tlet path = input.readStringRef();\n\t\t\t\tlet color = input.readInt32();\n\t\t\t\tlet vertexCount = input.readInt(true);\n\t\t\t\tlet uvs = this.readFloatArray(input, vertexCount << 1, 1);\n\t\t\t\tlet triangles = this.readShortArray(input);\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\n\t\t\t\tlet hullLength = input.readInt(true);\n\t\t\t\tlet edges = null;\n\t\t\t\tlet width = 0, height = 0;\n\t\t\t\tif (nonessential) {\n\t\t\t\t\tedges = this.readShortArray(input);\n\t\t\t\t\twidth = input.readFloat();\n\t\t\t\t\theight = input.readFloat();\n\t\t\t\t}\n\n\t\t\t\tif (path == null) path = name;\n\t\t\t\tlet mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n\t\t\t\tif (mesh == null) return null;\n\t\t\t\tmesh.path = path;\n\t\t\t\tColor.rgba8888ToColor(mesh.color, color);\n\t\t\t\tmesh.bones = vertices.bones;\n\t\t\t\tmesh.vertices = vertices.vertices;\n\t\t\t\tmesh.worldVerticesLength = vertexCount << 1;\n\t\t\t\tmesh.triangles = triangles;\n\t\t\t\tmesh.regionUVs = new Float32Array(uvs);\n\t\t\t\t// mesh.updateUVs();\n\t\t\t\tmesh.hullLength = hullLength << 1;\n\t\t\t\tif (nonessential) {\n\t\t\t\t\tmesh.edges = edges;\n\t\t\t\t\tmesh.width = width * scale;\n\t\t\t\t\tmesh.height = height * scale;\n\t\t\t\t}\n\t\t\t\treturn mesh;\n\t\t\t}\n\t\t\tcase AttachmentType.LinkedMesh: {\n\t\t\t\tlet path = input.readStringRef();\n\t\t\t\tlet color = input.readInt32();\n\t\t\t\tlet skinName = input.readStringRef();\n\t\t\t\tlet parent = input.readStringRef();\n\t\t\t\tlet inheritDeform = input.readBoolean();\n\t\t\t\tlet width = 0, height = 0;\n\t\t\t\tif (nonessential) {\n\t\t\t\t\twidth = input.readFloat();\n\t\t\t\t\theight = input.readFloat();\n\t\t\t\t}\n\n\t\t\t\tif (path == null) path = name;\n\t\t\t\tlet mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n\t\t\t\tif (mesh == null) return null;\n\t\t\t\tmesh.path = path;\n\t\t\t\tColor.rgba8888ToColor(mesh.color, color);\n\t\t\t\tif (nonessential) {\n\t\t\t\t\tmesh.width = width * scale;\n\t\t\t\t\tmesh.height = height * scale;\n\t\t\t\t}\n\t\t\t\tthis.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritDeform));\n\t\t\t\treturn mesh;\n\t\t\t}\n\t\t\tcase AttachmentType.Path: {\n\t\t\t\tlet closed = input.readBoolean();\n\t\t\t\tlet constantSpeed = input.readBoolean();\n\t\t\t\tlet vertexCount = input.readInt(true);\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\n\t\t\t\tlet lengths = Utils.newArray(vertexCount / 3, 0);\n\t\t\t\tfor (let i = 0, n = lengths.length; i < n; i++)\n\t\t\t\t\tlengths[i] = input.readFloat() * scale;\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\n\n\t\t\t\tlet path = this.attachmentLoader.newPathAttachment(skin, name);\n\t\t\t\tif (path == null) return null;\n\t\t\t\tpath.closed = closed;\n\t\t\t\tpath.constantSpeed = constantSpeed;\n\t\t\t\tpath.worldVerticesLength = vertexCount << 1;\n\t\t\t\tpath.vertices = vertices.vertices;\n\t\t\t\tpath.bones = vertices.bones;\n\t\t\t\tpath.lengths = lengths;\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(path.color, color);\n\t\t\t\treturn path;\n\t\t\t}\n\t\t\tcase AttachmentType.Point: {\n\t\t\t\tlet rotation = input.readFloat();\n\t\t\t\tlet x = input.readFloat();\n\t\t\t\tlet y = input.readFloat();\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\n\n\t\t\t\tlet point = this.attachmentLoader.newPointAttachment(skin, name);\n\t\t\t\tif (point == null) return null;\n\t\t\t\tpoint.x = x * scale;\n\t\t\t\tpoint.y = y * scale;\n\t\t\t\tpoint.rotation = rotation;\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(point.color, color);\n\t\t\t\treturn point;\n\t\t\t}\n\t\t\tcase AttachmentType.Clipping: {\n\t\t\t\tlet endSlotIndex = input.readInt(true);\n\t\t\t\tlet vertexCount = input.readInt(true);\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\n\n\t\t\t\tlet clip = this.attachmentLoader.newClippingAttachment(skin, name);\n\t\t\t\tif (clip == null) return null;\n\t\t\t\tclip.endSlot = skeletonData.slots[endSlotIndex];\n\t\t\t\tclip.worldVerticesLength = vertexCount << 1;\n\t\t\t\tclip.vertices = vertices.vertices;\n\t\t\t\tclip.bones = vertices.bones;\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(clip.color, color);\n\t\t\t\treturn clip;\n\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tprivate readVertices (input: BinaryInput, vertexCount: number): Vertices {\n\t\t\tlet verticesLength = vertexCount << 1;\n\t\t\tlet vertices = new Vertices();\n\t\t\tlet scale = this.scale;\n\t\t\tif (!input.readBoolean()) {\n\t\t\t\tvertices.vertices = this.readFloatArray(input, verticesLength, scale);\n\t\t\t\treturn vertices;\n\t\t\t}\n\t\t\tlet weights = new Array();\n\t\t\tlet bonesArray = new Array();\n\t\t\tfor (let i = 0; i < vertexCount; i++) {\n\t\t\t\tlet boneCount = input.readInt(true);\n\t\t\t\tbonesArray.push(boneCount);\n\t\t\t\tfor (let ii = 0; ii < boneCount; ii++) {\n\t\t\t\t\tbonesArray.push(input.readInt(true));\n\t\t\t\t\tweights.push(input.readFloat() * scale);\n\t\t\t\t\tweights.push(input.readFloat() * scale);\n\t\t\t\t\tweights.push(input.readFloat());\n\t\t\t\t}\n\t\t\t}\n\t\t\tvertices.vertices = Utils.toFloatArray(weights);\n\t\t\tvertices.bones = bonesArray;\n\t\t\treturn vertices;\n\t\t}\n\n\t\tprivate readFloatArray (input: BinaryInput, n: number, scale: number): number[] {\n\t\t\tlet array = new Array(n);\n\t\t\tif (scale == 1) {\n\t\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\t\tarray[i] = input.readFloat();\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\t\tarray[i] = input.readFloat() * scale;\n\t\t\t}\n\t\t\treturn array;\n\t\t}\n\n\t\tprivate readShortArray (input: BinaryInput): number[] {\n\t\t\tlet n = input.readInt(true);\n\t\t\tlet array = new Array(n);\n\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\tarray[i] = input.readShort();\n\t\t\treturn array;\n\t\t}\n\n\t\tprivate readAnimation (input: BinaryInput, name: string, skeletonData: SkeletonData): Animation {\n\t\t\tlet timelines = new Array();\n\t\t\tlet scale = this.scale;\n\t\t\tlet duration = 0;\n\t\t\tlet tempColor1 = new Color();\n\t\t\tlet tempColor2 = new Color();\n\n\t\t\t// Slot timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet slotIndex = input.readInt(true);\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet timelineType = input.readByte();\n\t\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\t\tswitch (timelineType) {\n\t\t\t\t\tcase SkeletonBinary.SLOT_ATTACHMENT: {\n\t\t\t\t\t\tlet timeline = new AttachmentTimeline(frameCount);\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++)\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[frameCount - 1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SkeletonBinary.SLOT_COLOR: {\n\t\t\t\t\t\tlet timeline = new ColorTimeline(frameCount);\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\t\t\tColor.rgba8888ToColor(tempColor1, input.readInt32());\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * ColorTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SkeletonBinary.SLOT_TWO_COLOR: {\n\t\t\t\t\t\tlet timeline = new TwoColorTimeline(frameCount);\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\t\t\tColor.rgba8888ToColor(tempColor1, input.readInt32());\n\t\t\t\t\t\t\tColor.rgb888ToColor(tempColor2, input.readInt32());\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r,\n\t\t\t\t\t\t\t\ttempColor2.g, tempColor2.b);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TwoColorTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Bone timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet boneIndex = input.readInt(true);\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet timelineType = input.readByte();\n\t\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\t\tswitch (timelineType) {\n\t\t\t\t\tcase SkeletonBinary.BONE_ROTATE: {\n\t\t\t\t\t\tlet timeline = new RotateTimeline(frameCount);\n\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * RotateTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SkeletonBinary.BONE_TRANSLATE:\n\t\t\t\t\tcase SkeletonBinary.BONE_SCALE:\n\t\t\t\t\tcase SkeletonBinary.BONE_SHEAR: {\n\t\t\t\t\t\tlet timeline;\n\t\t\t\t\t\tlet timelineScale = 1;\n\t\t\t\t\t\tif (timelineType == SkeletonBinary.BONE_SCALE)\n\t\t\t\t\t\t\ttimeline = new ScaleTimeline(frameCount);\n\t\t\t\t\t\telse if (timelineType == SkeletonBinary.BONE_SHEAR)\n\t\t\t\t\t\t\ttimeline = new ShearTimeline(frameCount);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttimeline = new TranslateTimeline(frameCount);\n\t\t\t\t\t\t\ttimelineScale = scale;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale,\n\t\t\t\t\t\t\t\tinput.readFloat() * timelineScale);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TranslateTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// IK constraint timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet index = input.readInt(true);\n\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\tlet timeline = new IkConstraintTimeline(frameCount);\n\t\t\t\ttimeline.ikConstraintIndex = index;\n\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(),\n\t\t\t\t\t\tinput.readBoolean());\n\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t}\n\t\t\t\ttimelines.push(timeline);\n\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * IkConstraintTimeline.ENTRIES]);\n\t\t\t}\n\n\t\t\t// Transform constraint timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet index = input.readInt(true);\n\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\tlet timeline = new TransformConstraintTimeline(frameCount);\n\t\t\t\ttimeline.transformConstraintIndex = index;\n\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(),\n\t\t\t\t\t\tinput.readFloat());\n\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t}\n\t\t\t\ttimelines.push(timeline);\n\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TransformConstraintTimeline.ENTRIES]);\n\t\t\t}\n\n\t\t\t// Path constraint timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet index = input.readInt(true);\n\t\t\t\tlet data = skeletonData.pathConstraints[index];\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet timelineType = input.readByte();\n\t\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\t\tswitch (timelineType) {\n\t\t\t\t\tcase SkeletonBinary.PATH_POSITION:\n\t\t\t\t\tcase SkeletonBinary.PATH_SPACING: {\n\t\t\t\t\t\tlet timeline;\n\t\t\t\t\t\tlet timelineScale = 1;\n\t\t\t\t\t\tif (timelineType == SkeletonBinary.PATH_SPACING) {\n\t\t\t\t\t\t\ttimeline = new PathConstraintSpacingTimeline(frameCount);\n\t\t\t\t\t\t\tif (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttimeline = new PathConstraintPositionTimeline(frameCount);\n\t\t\t\t\t\t\tif (data.positionMode == PositionMode.Fixed) timelineScale = scale;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintPositionTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SkeletonBinary.PATH_MIX: {\n\t\t\t\t\t\tlet timeline = new PathConstraintMixTimeline(frameCount);\n\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintMixTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Deform timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet skin = skeletonData.skins[input.readInt(true)];\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet slotIndex = input.readInt(true);\n\t\t\t\t\tfor (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n\t\t\t\t\t\tlet attachment = skin.getAttachment(slotIndex, input.readStringRef()) as VertexAttachment;\n\t\t\t\t\t\tlet weighted = attachment.bones != null;\n\t\t\t\t\t\tlet vertices = attachment.vertices;\n\t\t\t\t\t\tlet deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n\n\t\t\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\t\t\tlet timeline = new DeformTimeline(frameCount);\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\n\t\t\t\t\t\ttimeline.attachment = attachment;\n\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\t\t\tlet deform;\n\t\t\t\t\t\t\tlet end = input.readInt(true);\n\t\t\t\t\t\t\tif (end == 0)\n\t\t\t\t\t\t\t\tdeform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tdeform = Utils.newFloatArray(deformLength);\n\t\t\t\t\t\t\t\tlet start = input.readInt(true);\n\t\t\t\t\t\t\t\tend += start;\n\t\t\t\t\t\t\t\tif (scale == 1) {\n\t\t\t\t\t\t\t\t\tfor (let v = start; v < end; v++)\n\t\t\t\t\t\t\t\t\t\tdeform[v] = input.readFloat();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfor (let v = start; v < end; v++)\n\t\t\t\t\t\t\t\t\t\tdeform[v] = input.readFloat() * scale;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!weighted) {\n\t\t\t\t\t\t\t\t\tfor (let v = 0, vn = deform.length; v < vn; v++)\n\t\t\t\t\t\t\t\t\t\tdeform[v] += vertices[v];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, deform);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[frameCount - 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Draw order timeline.\n\t\t\tlet drawOrderCount = input.readInt(true);\n\t\t\tif (drawOrderCount > 0) {\n\t\t\t\tlet timeline = new DrawOrderTimeline(drawOrderCount);\n\t\t\t\tlet slotCount = skeletonData.slots.length;\n\t\t\t\tfor (let i = 0; i < drawOrderCount; i++) {\n\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\tlet offsetCount = input.readInt(true);\n\t\t\t\t\tlet drawOrder = Utils.newArray(slotCount, 0);\n\t\t\t\t\tfor (let ii = slotCount - 1; ii >= 0; ii--)\n\t\t\t\t\t\tdrawOrder[ii] = -1;\n\t\t\t\t\tlet unchanged = Utils.newArray(slotCount - offsetCount, 0);\n\t\t\t\t\tlet originalIndex = 0, unchangedIndex = 0;\n\t\t\t\t\tfor (let ii = 0; ii < offsetCount; ii++) {\n\t\t\t\t\t\tlet slotIndex = input.readInt(true);\n\t\t\t\t\t\t// Collect unchanged items.\n\t\t\t\t\t\twhile (originalIndex != slotIndex)\n\t\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\n\t\t\t\t\t\t// Set changed items.\n\t\t\t\t\t\tdrawOrder[originalIndex + input.readInt(true)] = originalIndex++;\n\t\t\t\t\t}\n\t\t\t\t\t// Collect remaining unchanged items.\n\t\t\t\t\twhile (originalIndex < slotCount)\n\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\n\t\t\t\t\t// Fill in unchanged items.\n\t\t\t\t\tfor (let ii = slotCount - 1; ii >= 0; ii--)\n\t\t\t\t\t\tif (drawOrder[ii] == -1) drawOrder[ii] = unchanged[--unchangedIndex];\n\t\t\t\t\ttimeline.setFrame(i, time, drawOrder);\n\t\t\t\t}\n\t\t\t\ttimelines.push(timeline);\n\t\t\t\tduration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\n\t\t\t}\n\n\t\t\t// Event timeline.\n\t\t\tlet eventCount = input.readInt(true);\n\t\t\tif (eventCount > 0) {\n\t\t\t\tlet timeline = new EventTimeline(eventCount);\n\t\t\t\tfor (let i = 0; i < eventCount; i++) {\n\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\tlet eventData = skeletonData.events[input.readInt(true)];\n\t\t\t\t\tlet event = new Event(time, eventData);\n\t\t\t\t\tevent.intValue = input.readInt(false);\n\t\t\t\t\tevent.floatValue = input.readFloat();\n\t\t\t\t\tevent.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n\t\t\t\t\tif (event.data.audioPath != null) {\n\t\t\t\t\t\tevent.volume = input.readFloat();\n\t\t\t\t\t\tevent.balance = input.readFloat();\n\t\t\t\t\t}\n\t\t\t\t\ttimeline.setFrame(i, event);\n\t\t\t\t}\n\t\t\t\ttimelines.push(timeline);\n\t\t\t\tduration = Math.max(duration, timeline.frames[eventCount - 1]);\n\t\t\t}\n\n\t\t\treturn new Animation(name, timelines, duration);\n\t\t}\n\n\t\tprivate readCurve (input: BinaryInput, frameIndex: number, timeline: CurveTimeline) {\n\t\t\tswitch (input.readByte()) {\n\t\t\tcase SkeletonBinary.CURVE_STEPPED:\n\t\t\t\ttimeline.setStepped(frameIndex);\n\t\t\t\tbreak;\n\t\t\tcase SkeletonBinary.CURVE_BEZIER:\n\t\t\t\tthis.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tsetCurve (timeline: CurveTimeline, frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\n\t\t\ttimeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\n\t\t}\n\t}\n\n\tclass BinaryInput {\n\t\tconstructor(data: Uint8Array, public strings = new Array(), private index: number = 0, private buffer = new DataView(data.buffer)) { \n\n\t\t}\n\n\t\treadByte(): number {\n\t\t\treturn this.buffer.getInt8(this.index++);\n\t\t}\n\n\t\treadShort(): number {\n\t\t\tlet value = this.buffer.getInt16(this.index);\n\t\t\tthis.index += 2;\n\t\t\treturn value;\n\t\t}\n\n\t\treadInt32(): number {\n\t\t\t let value = this.buffer.getInt32(this.index)\n\t\t\t this.index += 4;\n\t\t\t return value;\n\t\t}\n\n\t\treadInt(optimizePositive: boolean) {\n\t\t\tlet b = this.readByte();\n\t\t\tlet result = b & 0x7F;\n\t\t\tif ((b & 0x80) != 0) {\n\t\t\t\tb = this.readByte();\n\t\t\t\tresult |= (b & 0x7F) << 7;\n\t\t\t\tif ((b & 0x80) != 0) {\n\t\t\t\t\tb = this.readByte();\n\t\t\t\t\tresult |= (b & 0x7F) << 14;\n\t\t\t\t\tif ((b & 0x80) != 0) {\n\t\t\t\t\t\tb = this.readByte();\n\t\t\t\t\t\tresult |= (b & 0x7F) << 21;\n\t\t\t\t\t\tif ((b & 0x80) != 0) {\n\t\t\t\t\t\t\tb = this.readByte();\n\t\t\t\t\t\t\tresult |= (b & 0x7F) << 28;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\n\t\t}\n\n\t\treadStringRef (): string {\n\t\t\tlet index = this.readInt(true);\n\t\t\treturn index == 0 ? null : this.strings[index - 1];\n\t\t}\n\n\t\treadString (): string {\n\t\t\tlet byteCount = this.readInt(true);\n\t\t\tswitch (byteCount) {\n\t\t\tcase 0:\n\t\t\t\treturn null;\n\t\t\tcase 1:\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tbyteCount--;\n\t\t\tlet chars = \"\";\n\t\t\tlet charCount = 0;\n\t\t\tfor (let i = 0; i < byteCount;) {\n\t\t\t\tlet b = this.readByte();\n\t\t\t\tswitch (b >> 4) {\n\t\t\t\tcase 12:\n\t\t\t\tcase 13:\n\t\t\t\t\tchars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\n\t\t\t\t\ti += 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 14:\n\t\t\t\t\tchars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\n\t\t\t\t\ti += 3;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tchars += String.fromCharCode(b);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn chars;\n\t\t}\n\n\t\treadFloat (): number {\n\t\t\tlet value = this.buffer.getFloat32(this.index);\n\t\t\tthis.index += 4;\n\t\t\treturn value;\n\t\t}\n\n\t\treadBoolean (): boolean {\n\t\t\treturn this.readByte() != 0;\n\t\t}\n\t}\n\n\tclass LinkedMesh {\n\t\tparent: string; skin: string;\n\t\tslotIndex: number;\n\t\tmesh: MeshAttachment;\n\t\tinheritDeform: boolean;\n\n\t\tconstructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {\n\t\t\tthis.mesh = mesh;\n\t\t\tthis.skin = skin;\n\t\t\tthis.slotIndex = slotIndex;\n\t\t\tthis.parent = parent;\n\t\t\tthis.inheritDeform = inheritDeform;\n\t\t}\n\t}\n\n\tclass Vertices {\n\t\tconstructor(public bones: Array = null, public vertices: Array | Float32Array = null) { }\n\t}\n}\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkeletonBounds {\r\n minX = 0; minY = 0; maxX = 0; maxY = 0;\r\n boundingBoxes = new Array();\r\n polygons = new Array>();\r\n private polygonPool = new Pool>(() => {\r\n return Utils.newFloatArray(16);\r\n });\r\n\r\n update (skeleton: Skeleton, updateAabb: boolean) {\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n let boundingBoxes = this.boundingBoxes;\r\n let polygons = this.polygons;\r\n let polygonPool = this.polygonPool;\r\n let slots = skeleton.slots;\r\n let slotCount = slots.length;\r\n\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n\r\n for (let i = 0; i < slotCount; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active) continue;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof BoundingBoxAttachment) {\r\n let boundingBox = attachment as BoundingBoxAttachment;\r\n boundingBoxes.push(boundingBox);\r\n\r\n let polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n } else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n }\r\n\r\n aabbCompute () {\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n let vertices = polygon;\r\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n let x = vertices[ii];\r\n let y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box contains the point. */\r\n aabbContainsPoint (x: number, y: number) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box intersects the line segment. */\r\n aabbIntersectsSegment (x1: number, y1: number, x2: number, y2: number) {\r\n let minX = this.minX;\r\n let minY = this.minY;\r\n let maxX = this.maxX;\r\n let maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n let m = (y2 - y1) / (x2 - x1);\r\n let y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY) return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY) return true;\r\n let x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX) return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX) return true;\r\n return false;\r\n }\r\n\r\n /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */\r\n aabbIntersectsSkeleton (bounds: SkeletonBounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n }\r\n\r\n /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more\r\n * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */\r\n containsPoint (x: number, y: number): BoundingBoxAttachment {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y)) return this.boundingBoxes[i];\r\n return null;\r\n }\r\n\r\n /** Returns true if the polygon contains the point. */\r\n containsPointPolygon (polygon: ArrayLike, x: number, y: number) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n\r\n let prevIndex = nn - 2;\r\n let inside = false;\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let vertexY = vertices[ii + 1];\r\n let prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n let vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n }\r\n\r\n /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it\r\n * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns\r\n * true. */\r\n intersectsSegment (x1: number, y1: number, x2: number, y2: number) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) return this.boundingBoxes[i];\r\n return null;\r\n }\r\n\r\n /** Returns true if the polygon contains any part of the line segment. */\r\n intersectsSegmentPolygon (polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n\r\n let width12 = x1 - x2, height12 = y1 - y2;\r\n let det1 = x1 * y2 - y1 * x2;\r\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let x4 = vertices[ii], y4 = vertices[ii + 1];\r\n let det2 = x3 * y4 - y3 * x4;\r\n let width34 = x3 - x4, height34 = y3 - y4;\r\n let det3 = width12 * height34 - height12 * width34;\r\n let x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n let y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n }\r\n\r\n /** Returns the polygon for the specified bounding box, or null. */\r\n getPolygon (boundingBox: BoundingBoxAttachment) {\r\n if (boundingBox == null) throw new Error(\"boundingBox cannot be null.\");\r\n let index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n }\r\n\r\n getWidth () {\r\n return this.maxX - this.minX;\r\n }\r\n\r\n getHeight () {\r\n return this.maxY - this.minY;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class SkeletonClipping {\r\n\t\tprivate triangulator = new Triangulator();\r\n\t\tprivate clippingPolygon = new Array();\r\n\t\tprivate clipOutput = new Array();\r\n\t\tclippedVertices = new Array();\r\n\t\tclippedTriangles = new Array();\r\n\t\tprivate scratch = new Array();\r\n\r\n\t\tprivate clipAttachment: ClippingAttachment;\r\n\t\tprivate clippingPolygons: Array>;\r\n\r\n\t\tclipStart (slot: Slot, clip: ClippingAttachment): number {\r\n\t\t\tif (this.clipAttachment != null) return 0;\r\n\t\t\tthis.clipAttachment = clip;\r\n\r\n\t\t\tlet n = clip.worldVerticesLength;\r\n\t\t\tlet vertices = Utils.setArraySize(this.clippingPolygon, n);\r\n\t\t\tclip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n\t\t\tlet clippingPolygon = this.clippingPolygon;\r\n\t\t\tSkeletonClipping.makeClockwise(clippingPolygon);\r\n\t\t\tlet clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n\t\t\tfor (let i = 0, n = clippingPolygons.length; i < n; i++) {\r\n\t\t\t\tlet polygon = clippingPolygons[i];\r\n\t\t\t\tSkeletonClipping.makeClockwise(polygon);\r\n\t\t\t\tpolygon.push(polygon[0]);\r\n\t\t\t\tpolygon.push(polygon[1]);\r\n\t\t\t}\r\n\r\n\t\t\treturn clippingPolygons.length;\r\n\t\t}\r\n\r\n\t\tclipEndWithSlot (slot: Slot) {\r\n\t\t\tif (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data) this.clipEnd();\r\n\t\t}\r\n\r\n\t\tclipEnd () {\r\n\t\t\tif (this.clipAttachment == null) return;\r\n\t\t\tthis.clipAttachment = null;\r\n\t\t\tthis.clippingPolygons = null;\r\n\t\t\tthis.clippedVertices.length = 0;\r\n\t\t\tthis.clippedTriangles.length = 0;\r\n\t\t\tthis.clippingPolygon.length = 0;\r\n\t\t}\r\n\r\n\t\tisClipping (): boolean {\r\n\t\t\treturn this.clipAttachment != null;\r\n\t\t}\r\n\r\n\t\tclipTriangles (vertices: ArrayLike, verticesLength: number, triangles: ArrayLike, trianglesLength: number, uvs: ArrayLike,\r\n\t\t\tlight: Color, dark: Color, twoColor: boolean) {\r\n\r\n\t\t\tlet clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n\t\t\tlet clippedTriangles = this.clippedTriangles;\r\n\t\t\tlet polygons = this.clippingPolygons;\r\n\t\t\tlet polygonsCount = this.clippingPolygons.length;\r\n\t\t\tlet vertexSize = twoColor ? 12 : 8;\r\n\r\n\t\t\tlet index = 0;\r\n\t\t\tclippedVertices.length = 0;\r\n\t\t\tclippedTriangles.length = 0;\r\n\t\t\touter:\r\n\t\t\tfor (let i = 0; i < trianglesLength; i += 3) {\r\n\t\t\t\tlet vertexOffset = triangles[i] << 1;\r\n\t\t\t\tlet x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tvertexOffset = triangles[i + 1] << 1;\r\n\t\t\t\tlet x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tvertexOffset = triangles[i + 2] << 1;\r\n\t\t\t\tlet x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n\t\t\t\tlet u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n\r\n\t\t\t\tfor (let p = 0; p < polygonsCount; p++) {\r\n\t\t\t\t\tlet s = clippedVertices.length;\r\n\t\t\t\t\tif (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n\t\t\t\t\t\tlet clipOutputLength = clipOutput.length;\r\n\t\t\t\t\t\tif (clipOutputLength == 0) continue;\r\n\t\t\t\t\t\tlet d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n\t\t\t\t\t\tlet d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n\r\n\t\t\t\t\t\tlet clipOutputCount = clipOutputLength >> 1;\r\n\t\t\t\t\t\tlet clipOutputItems = this.clipOutput;\r\n\t\t\t\t\t\tlet clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n\t\t\t\t\t\tfor (let ii = 0; ii < clipOutputLength; ii += 2) {\r\n\t\t\t\t\t\t\tlet x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n\t\t\t\t\t\t\tclippedVerticesItems[s] = x;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 1] = y;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\r\n\t\t\t\t\t\t\tlet c0 = x - x3, c1 = y - y3;\r\n\t\t\t\t\t\t\tlet a = (d0 * c0 + d1 * c1) * d;\r\n\t\t\t\t\t\t\tlet b = (d4 * c0 + d2 * c1) * d;\r\n\t\t\t\t\t\t\tlet c = 1 - a - b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n\t\t\t\t\t\t\tif (twoColor) {\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ts += vertexSize;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts = clippedTriangles.length;\r\n\t\t\t\t\t\tlet clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n\t\t\t\t\t\tclipOutputCount--;\r\n\t\t\t\t\t\tfor (let ii = 1; ii < clipOutputCount; ii++) {\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s] = index;\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + ii);\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + ii + 1);\r\n\t\t\t\t\t\t\ts += 3;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tindex += clipOutputCount + 1;\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlet clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n\t\t\t\t\t\tclippedVerticesItems[s] = x1;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 1] = y1;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\r\n\t\t\t\t\t\tif (!twoColor) {\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = x2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = y2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = u2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = v2;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = x3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = y3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = u3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = v3;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = x2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = y2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = u2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = v2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = dark.a;\r\n\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 24] = x3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 25] = y3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 26] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 27] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 28] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 29] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 30] = u3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 31] = v3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 32] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 33] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 34] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 35] = dark.a;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts = clippedTriangles.length;\r\n\t\t\t\t\t\tlet clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);\r\n\t\t\t\t\t\tclippedTrianglesItems[s] = index;\r\n\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + 1);\r\n\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + 2);\r\n\t\t\t\t\t\tindex += 3;\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping\r\n\t\t * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */\r\n\t\tclip (x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array, output: Array) {\r\n\t\t\tlet originalOutput = output;\r\n\t\t\tlet clipped = false;\r\n\r\n\t\t\t// Avoid copy at the end.\r\n\t\t\tlet input: Array = null;\r\n\t\t\tif (clippingArea.length % 4 >= 2) {\r\n\t\t\t\tinput = output;\r\n\t\t\t\toutput = this.scratch;\r\n\t\t\t} else\r\n\t\t\t\tinput = this.scratch;\r\n\r\n\t\t\tinput.length = 0;\r\n\t\t\tinput.push(x1);\r\n\t\t\tinput.push(y1);\r\n\t\t\tinput.push(x2);\r\n\t\t\tinput.push(y2);\r\n\t\t\tinput.push(x3);\r\n\t\t\tinput.push(y3);\r\n\t\t\tinput.push(x1);\r\n\t\t\tinput.push(y1);\r\n\t\t\toutput.length = 0;\r\n\r\n\t\t\tlet clippingVertices = clippingArea;\r\n\t\t\tlet clippingVerticesLast = clippingArea.length - 4;\r\n\t\t\tfor (let i = 0;; i += 2) {\r\n\t\t\t\tlet edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n\t\t\t\tlet edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n\t\t\t\tlet deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n\r\n\t\t\t\tlet inputVertices = input;\r\n\t\t\t\tlet inputVerticesLength = input.length - 2, outputStart = output.length;\r\n\t\t\t\tfor (let ii = 0; ii < inputVerticesLength; ii += 2) {\r\n\t\t\t\t\tlet inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n\t\t\t\t\tlet inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n\t\t\t\t\tlet side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n\t\t\t\t\tif (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n\t\t\t\t\t\tif (side2) { // v1 inside, v2 inside\r\n\t\t\t\t\t\t\toutput.push(inputX2);\r\n\t\t\t\t\t\t\toutput.push(inputY2);\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// v1 inside, v2 outside\r\n\t\t\t\t\t\tlet c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n\t\t\t\t\t\tlet ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\r\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\r\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\r\n\t\t\t\t\t} else if (side2) { // v1 outside, v2 inside\r\n\t\t\t\t\t\tlet c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n\t\t\t\t\t\tlet ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\r\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\r\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\r\n\t\t\t\t\t\toutput.push(inputX2);\r\n\t\t\t\t\t\toutput.push(inputY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclipped = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (outputStart == output.length) { // All edges outside.\r\n\t\t\t\t\toriginalOutput.length = 0;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutput.push(output[0]);\r\n\t\t\t\toutput.push(output[1]);\r\n\r\n\t\t\t\tif (i == clippingVerticesLast) break;\r\n\t\t\t\tlet temp = output;\r\n\t\t\t\toutput = input;\r\n\t\t\t\toutput.length = 0;\r\n\t\t\t\tinput = temp;\r\n\t\t\t}\r\n\r\n\t\t\tif (originalOutput != output) {\r\n\t\t\t\toriginalOutput.length = 0;\r\n\t\t\t\tfor (let i = 0, n = output.length - 2; i < n; i++)\r\n\t\t\t\t\toriginalOutput[i] = output[i];\r\n\t\t\t} else\r\n\t\t\t\toriginalOutput.length = originalOutput.length - 2;\r\n\r\n\t\t\treturn clipped;\r\n\t\t}\r\n\r\n\t\tpublic static makeClockwise (polygon: ArrayLike) {\r\n\t\t\tlet vertices = polygon;\r\n\t\t\tlet verticeslength = polygon.length;\r\n\r\n\t\t\tlet area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n\t\t\tfor (let i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n\t\t\t\tp1x = vertices[i];\r\n\t\t\t\tp1y = vertices[i + 1];\r\n\t\t\t\tp2x = vertices[i + 2];\r\n\t\t\t\tp2y = vertices[i + 3];\r\n\t\t\t\tarea += p1x * p2y - p2x * p1y;\r\n\t\t\t}\r\n\t\t\tif (area < 0) return;\r\n\r\n\t\t\tfor (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n\t\t\t\tlet x = vertices[i], y = vertices[i + 1];\r\n\t\t\t\tlet other = lastX - i;\r\n\t\t\t\tvertices[i] = vertices[other];\r\n\t\t\t\tvertices[i + 1] = vertices[other + 1];\r\n\t\t\t\tvertices[other] = x;\r\n\t\t\t\tvertices[other + 1] = y;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkeletonData {\r\n name: string;\r\n bones = new Array(); // Ordered parents first.\r\n slots = new Array(); // Setup pose draw order.\r\n skins = new Array();\r\n defaultSkin: Skin;\r\n events = new Array();\r\n animations = new Array();\r\n ikConstraints = new Array();\r\n transformConstraints = new Array();\r\n pathConstraints = new Array();\r\n x: number; y: number; width: number; height: number;\r\n version: string; hash: string;\r\n\r\n // Nonessential\r\n fps = 0;\r\n imagesPath: string;\r\n audioPath: string;\r\n\r\n findBone (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.name == boneName) return bone;\r\n }\r\n return null;\r\n }\r\n\r\n findBoneIndex (boneName: string) {\r\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName) return i;\r\n return -1;\r\n }\r\n\r\n findSlot (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.name == slotName) return slot;\r\n }\r\n return null;\r\n }\r\n\r\n findSlotIndex (slotName: string) {\r\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName) return i;\r\n return -1;\r\n }\r\n\r\n findSkin (skinName: string) {\r\n if (skinName == null) throw new Error(\"skinName cannot be null.\");\r\n let skins = this.skins;\r\n for (let i = 0, n = skins.length; i < n; i++) {\r\n let skin = skins[i];\r\n if (skin.name == skinName) return skin;\r\n }\r\n return null;\r\n }\r\n\r\n findEvent (eventDataName: string) {\r\n if (eventDataName == null) throw new Error(\"eventDataName cannot be null.\");\r\n let events = this.events;\r\n for (let i = 0, n = events.length; i < n; i++) {\r\n let event = events[i];\r\n if (event.name == eventDataName) return event;\r\n }\r\n return null;\r\n }\r\n\r\n findAnimation (animationName: string) {\r\n if (animationName == null) throw new Error(\"animationName cannot be null.\");\r\n let animations = this.animations;\r\n for (let i = 0, n = animations.length; i < n; i++) {\r\n let animation = animations[i];\r\n if (animation.name == animationName) return animation;\r\n }\r\n return null;\r\n }\r\n\r\n findIkConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findTransformConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findPathConstraint (constraintName: string) {\r\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.name == constraintName) return constraint;\r\n }\r\n return null;\r\n }\r\n\r\n findPathConstraintIndex (pathConstraintName: string) {\r\n if (pathConstraintName == null) throw new Error(\"pathConstraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName) return i;\r\n return -1;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class SkeletonJson {\n attachmentLoader: AttachmentLoader;\n scale = 1;\n private linkedMeshes = new Array();\n\n constructor (attachmentLoader: AttachmentLoader) {\n this.attachmentLoader = attachmentLoader;\n }\n\n readSkeletonData (json: string | any): SkeletonData {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof(json) === \"string\" ? JSON.parse(json) : json;\n\n // Skeleton\n let skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n skeletonData.x = skeletonMap.x;\n skeletonData.y = skeletonMap.y;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n\n // Bones\n if (root.bones) {\n for (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n\n let parent: BoneData = null;\n let parentName: string = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent = skeletonData.findBone(parentName);\n if (parent == null) throw new Error(\"Parent bone not found: \" + parentName);\n }\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\n\n skeletonData.bones.push(data);\n }\n }\n\n // Slots.\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let slotName: string = slotMap.name;\n let boneName: string = slotMap.bone;\n let boneData = skeletonData.findBone(boneName);\n if (boneData == null) throw new Error(\"Slot bone not found: \" + boneName);\n let data = new SlotData(skeletonData.slots.length, slotName, boneData);\n\n let color: string = this.getValue(slotMap, \"color\", null);\n if (color != null) data.color.setFromString(color);\n\n let dark: string = this.getValue(slotMap, \"dark\", null);\n if (dark != null) {\n data.darkColor = new Color(1, 1, 1, 1);\n data.darkColor.setFromString(dark);\n }\n\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n\n // IK constraints\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"IK target bone not found: \" + targetName);\n\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = this.getValue(constraintMap, \"compress\", false);\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\n\n skeletonData.ikConstraints.push(data);\n }\n }\n\n // Transform constraints.\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"Transform constraint target bone not found: \" + targetName);\n\n data.local = this.getValue(constraintMap, \"local\", false);\n data.relative = this.getValue(constraintMap, \"relative\", false);\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n\n skeletonData.transformConstraints.push(data);\n }\n }\n\n // Path constraints.\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null) throw new Error(\"Path target slot not found: \" + targetName);\n\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == PositionMode.Fixed) data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n\n skeletonData.pathConstraints.push(data);\n }\n }\n\n // Skins.\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i]\n let skin = new Skin(skinMap.name);\n\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let bone = skeletonData.findBone(skinMap.bones[ii]);\n if (bone == null) throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\n skin.bones.push(bone);\n }\n }\n\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\n if (constraint == null) throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\n skin.constraints.push(constraint);\n }\n }\n\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\n if (constraint == null) throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\n skin.constraints.push(constraint);\n }\n }\n\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\n if (constraint == null) throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\n skin.constraints.push(constraint);\n }\n }\n\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (slot == null) throw new Error(\"Slot not found: \" + slotName);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment != null) skin.setAttachment(slot.index, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\") skeletonData.defaultSkin = skin;\n }\n }\n\n // Linked meshes.\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh( parent);\n // linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n\n // Events.\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\n data.audioPath = this.getValue(eventMap, \"audio\", null);\n if (data.audioPath != null) {\n data.volume = this.getValue(eventMap, \"volume\", 1);\n data.balance = this.getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n\n // Animations.\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n\n return skeletonData;\n }\n\n readAttachment (map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment {\n let scale = this.scale;\n name = this.getValue(map, \"name\", name);\n\n let type = this.getValue(map, \"type\", \"region\");\n\n switch (type) {\n case \"region\": {\n let path = this.getValue(map, \"path\", name);\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null) return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) region.color.setFromString(color);\n\n // region.updateOffset();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null) return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = this.getValue(map, \"path\", name);\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null) return null;\n mesh.path = path;\n\n let color = this.getValue(map, \"color\", null);\n if (color != null) mesh.color.setFromString(color);\n\n mesh.width = this.getValue(map, \"width\", 0) * scale;\n mesh.height = this.getValue(map, \"height\", 0) * scale;\n\n let parent: string = this.getValue(map, \"parent\", null);\n if (parent != null) {\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent, this.getValue(map, \"deform\", true)));\n return mesh;\n }\n\n let uvs: Array = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = new Float32Array(uvs);\n // mesh.updateUVs();\n\n mesh.edges = this.getValue(map, \"edges\", null);\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null) return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n\n let lengths: Array = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null) return null;\n point.x = this.getValue(map, \"x\", 0) * scale;\n point.y = this.getValue(map, \"y\", 0) * scale;\n point.rotation = this.getValue(map, \"rotation\", 0);\n\n let color = this.getValue(map, \"color\", null);\n if (color != null) point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null) return null;\n\n let end = this.getValue(map, \"end\", null);\n if (end != null) {\n let slot = skeletonData.findSlot(end);\n if (slot == null) throw new Error(\"Clipping end slot not found: \" + end);\n clip.endSlot = slot;\n }\n\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n\n readVertices (map: any, attachment: VertexAttachment, verticesLength: number) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices: Array = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n;) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = Utils.toFloatArray(weights);\n }\n\n readAnimation (map: any, name: string, skeletonData: SkeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n let duration = 0;\n\n // Slot timelines.\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n } else if (timelineName == \"color\") {\n let timeline = new ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let color = new Color();\n color.setFromString(valueMap.color || \"ffffffff\");\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);\n\n } else if (timelineName == \"twoColor\") {\n let timeline = new TwoColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let light = new Color();\n let dark = new Color();\n light.setFromString(valueMap.light);\n dark.setFromString(valueMap.dark);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TwoColorTimeline.ENTRIES]);\n\n } else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n\n // Bone timelines.\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1) throw new Error(\"Bone not found: \" + boneName);\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n let timeline = new RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);\n\n } else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n let timeline: TranslateTimeline = null;\n let timelineScale = 1, defaultValue = 0;\n if (timelineName === \"scale\") {\n timeline = new ScaleTimeline(timelineMap.length);\n defaultValue = 1;\n } else if (timelineName === \"shear\")\n timeline = new ShearTimeline(timelineMap.length);\n else {\n timeline = new TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);\n\n } else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n\n // IK constraint timelines.\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let constraint = skeletonData.findIkConstraint(constraintName);\n let timeline = new IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale,\n this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline.ENTRIES]);\n }\n }\n\n // Transform constraint timelines.\n if (map.transform) {\n for (let constraintName in map.transform) {\n let constraintMap = map.transform[constraintName];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n let timeline = new TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline.ENTRIES]);\n }\n }\n\n // Path constraint timelines.\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1) throw new Error(\"Path constraint not found: \" + constraintName);\n let data = skeletonData.pathConstraints[index];\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n let timeline: PathConstraintPositionTimeline = null;\n let timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\n } else {\n timeline = new PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == PositionMode.Fixed) timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n\n // Deform timelines.\n if (map.deform) {\n for (let deformName in map.deform) {\n let deformMap = map.deform[deformName];\n let skin = skeletonData.findSkin(deformName);\n if (skin == null) throw new Error(\"Skin not found: \" + deformName);\n for (let slotName in deformMap) {\n let slotMap = deformMap[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotMap.name);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n let attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null) throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n let weighted = attachment.bones != null;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n\n let timeline = new DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n\n let frameIndex = 0;\n for (let j = 0; j < timelineMap.length; j++) {\n let valueMap = timelineMap[j];\n let deform: ArrayLike;\n let verticesValue: Array = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = this.getValue(valueMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n\n // Draw order timeline.\n let drawOrderNode = map.drawOrder;\n if (drawOrderNode == null) drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n let timeline = new DrawOrderTimeline(drawOrderNode.length);\n let slotCount = skeletonData.slots.length;\n let frameIndex = 0;\n for (let j = 0; j < drawOrderNode.length; j++) {\n let drawOrderMap = drawOrderNode[j];\n let drawOrder: Array = null;\n let offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let i = 0; i < offsets.length; i++) {\n let offsetMap = offsets[i];\n let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + offsetMap.slot);\n // Collect unchanged items.\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n // Set changed items.\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n // Collect remaining unchanged items.\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n // Fill in unchanged items.\n for (let i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1) drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n // Event timeline.\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frameIndex = 0;\n for (let i = 0; i < map.events.length; i++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null) throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath != null) {\n event.volume = this.getValue(eventMap, \"volume\", 1);\n event.balance = this.getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frameIndex++, event);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n\n readCurve (map: any, timeline: CurveTimeline, frameIndex: number) {\n if (!map.curve) return;\n if (map.curve === \"stepped\")\n timeline.setStepped(frameIndex);\n else {\n let curve: number = map.curve;\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\n }\n }\n\n getValue (map: any, prop: string, defaultValue: any) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n }\n\n static blendModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"normal\") return BlendMode.Normal;\n if (str == \"additive\") return BlendMode.Additive;\n if (str == \"multiply\") return BlendMode.Multiply;\n if (str == \"screen\") return BlendMode.Screen;\n throw new Error(`Unknown blend mode: ${str}`);\n }\n\n static positionModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"fixed\") return PositionMode.Fixed;\n if (str == \"percent\") return PositionMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static spacingModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"length\") return SpacingMode.Length;\n if (str == \"fixed\") return SpacingMode.Fixed;\n if (str == \"percent\") return SpacingMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static rotateModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"tangent\") return RotateMode.Tangent;\n if (str == \"chain\") return RotateMode.Chain;\n if (str == \"chainscale\") return RotateMode.ChainScale;\n throw new Error(`Unknown rotate mode: ${str}`);\n }\n\n static transformModeFromString(str: string) {\n str = str.toLowerCase();\n if (str == \"normal\") return TransformMode.Normal;\n if (str == \"onlytranslation\") return TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\") return TransformMode.NoRotationOrReflection;\n if (str == \"noscale\") return TransformMode.NoScale;\n if (str == \"noscaleorreflection\") return TransformMode.NoScaleOrReflection;\n throw new Error(`Unknown transform mode: ${str}`);\n }\n }\n\n class LinkedMesh {\n parent: string; skin: string;\n slotIndex: number;\n mesh: MeshAttachment;\n inheritDeform: boolean;\n\n constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n }\n}\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SkinEntry {\r\n constructor(public slotIndex: number, public name: string, public attachment: Attachment) { }\r\n }\r\n\r\n export class Skin {\r\n name: string;\r\n attachments = new Array>();\r\n bones = Array();\r\n constraints = new Array();\r\n\r\n constructor (name: string) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n\r\n setAttachment (slotIndex: number, name: string, attachment: Attachment) {\r\n if (attachment == null) throw new Error(\"attachment cannot be null.\");\r\n let attachments = this.attachments;\r\n if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex]) attachments[slotIndex] = { };\r\n attachments[slotIndex][name] = attachment;\r\n }\r\n\r\n addSkin (skin: Skin) {\r\n for(let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.bones.push(bone);\r\n }\r\n\r\n for(let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.constraints.push(constraint);\r\n }\r\n\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n\r\n copySkin (skin: Skin) {\r\n for(let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.bones.push(bone);\r\n }\r\n\r\n for(let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained) this.constraints.push(constraint);\r\n }\r\n\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null) continue;\r\n if (attachment.attachment instanceof MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n } else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (slotIndex: number, name: string): Attachment {\r\n let dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n }\r\n\r\n removeAttachment (slotIndex: number, name: string) {\r\n let dictionary = this.attachments[slotIndex];\r\n if (dictionary) dictionary[name] = null;\r\n }\r\n\r\n getAttachments (): Array {\r\n let entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n let slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment) entries.push(new SkinEntry(i, name, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n }\r\n\r\n getAttachmentsForSlot (slotIndex: number, attachments: Array) {\r\n let slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment) attachments.push(new SkinEntry(slotIndex, name, attachment));\r\n }\r\n }\r\n }\r\n\r\n clear () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n }\r\n\r\n /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\r\n attachAll (skeleton: Skeleton, oldSkin: Skin) {\r\n let slotIndex = 0;\r\n for (let i = 0; i < skeleton.slots.length; i++) {\r\n let slot = skeleton.slots[i];\r\n let slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n let dictionary = oldSkin.attachments[slotIndex];\r\n for (let key in dictionary) {\r\n let skinAttachment:Attachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n let attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null) slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class Slot {\r\n //this is for PIXI\r\n currentMesh: any;\r\n currentSprite: any;\r\n currentGraphics: any;\r\n clippingContainer: any;\r\n\r\n meshes: any;\r\n currentMeshName: string;\r\n sprites: any;\r\n currentSpriteName: string;\r\n\r\n blendMode: number;\r\n //assign hack region a bit later\r\n tempRegion: TextureRegion;\r\n tempAttachment: Attachment;\r\n\r\n //this is canon\r\n data: SlotData;\r\n bone: Bone;\r\n color: Color;\r\n darkColor: Color;\r\n private attachment: Attachment;\r\n private attachmentTime: number;\r\n deform = new Array();\r\n\r\n constructor (data: SlotData, bone: Bone) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (bone == null) throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new Color();\r\n this.darkColor = data.darkColor == null ? null : new Color();\r\n this.setToSetupPose();\r\n\r\n this.blendMode = this.data.blendMode;\r\n }\r\n\r\n /** @return May be null. */\r\n getAttachment (): Attachment {\r\n return this.attachment;\r\n }\r\n\r\n /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}.\r\n * @param attachment May be null. */\r\n setAttachment (attachment: Attachment) {\r\n if (this.attachment == attachment) return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n }\r\n\r\n setAttachmentTime (time: number) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n }\r\n\r\n /** Returns the time since the attachment was set. */\r\n getAttachmentTime (): number {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n }\r\n\r\n setToSetupPose () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null) this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class SlotData {\r\n index: number;\r\n name: string;\r\n boneData: BoneData;\r\n color = new Color(1, 1, 1, 1);\r\n darkColor: Color;\r\n attachmentName: string;\r\n blendMode: BlendMode;\r\n\r\n constructor (index: number, name: string, boneData: BoneData) {\r\n if (index < 0) throw new Error(\"index must be >= 0.\");\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n if (boneData == null) throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class Texture {\r\n protected _image: HTMLImageElement;\r\n\r\n constructor (image: HTMLImageElement) {\r\n this._image = image;\r\n }\r\n\r\n getImage (): HTMLImageElement {\r\n return this._image;\r\n }\r\n\r\n abstract setFilters (minFilter: TextureFilter, magFilter: TextureFilter): void;\r\n abstract setWraps (uWrap: TextureWrap, vWrap: TextureWrap): void;\r\n abstract dispose (): void;\r\n\r\n\r\n public static filterFromString (text: string): TextureFilter {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(`Unknown texture filter ${text}`);\r\n }\r\n }\r\n\r\n public static wrapFromString (text: string): TextureWrap {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(`Unknown texture wrap ${text}`);\r\n }\r\n }\r\n }\r\n\r\n export enum TextureFilter {\r\n Nearest = 9728, // WebGLRenderingContext.NEAREST\r\n Linear = 9729, // WebGLRenderingContext.LINEAR\r\n MipMap = 9987, // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\r\n MipMapNearestNearest = 9984, // WebGLRenderingContext.NEAREST_MIPMAP_NEAREST\r\n MipMapLinearNearest = 9985, // WebGLRenderingContext.LINEAR_MIPMAP_NEAREST\r\n MipMapNearestLinear = 9986, // WebGLRenderingContext.NEAREST_MIPMAP_LINEAR\r\n MipMapLinearLinear = 9987 // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\r\n }\r\n\r\n export enum TextureWrap {\r\n MirroredRepeat = 33648, // WebGLRenderingContext.MIRRORED_REPEAT\r\n ClampToEdge = 33071, // WebGLRenderingContext.CLAMP_TO_EDGE\r\n Repeat = 10497 // WebGLRenderingContext.REPEAT\r\n }\r\n\r\n export class TextureRegion {\r\n texture: PIXI.Texture;\r\n\r\n //thats for overrides\r\n size: PIXI.Rectangle = null;\r\n\r\n get width(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n return (tex as any).crop.width;\r\n }\r\n if (tex.trim) {\r\n return tex.trim.width;\r\n }\r\n return tex.orig.width;\r\n }\r\n\r\n get height(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n return (tex as any).crop.height;\r\n }\r\n if (tex.trim) {\r\n return tex.trim.height;\r\n }\r\n return tex.orig.height;\r\n }\r\n\r\n get u(): number {\r\n return (this.texture as any)._uvs.x0;\r\n }\r\n\r\n get v(): number {\r\n return (this.texture as any)._uvs.y0;\r\n }\r\n\r\n get u2(): number {\r\n return (this.texture as any)._uvs.x2;\r\n }\r\n\r\n get v2(): number {\r\n return (this.texture as any)._uvs.y2;\r\n }\r\n\r\n get offsetX(): number {\r\n const tex = this.texture;\r\n return tex.trim ? tex.trim.x : 0;\r\n }\r\n\r\n get offsetY(): number {\r\n console.warn(\"Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on.\");\r\n return this.spineOffsetY;\r\n }\r\n\r\n get pixiOffsetY(): number {\r\n const tex = this.texture;\r\n return tex.trim ? tex.trim.y : 0;\r\n }\r\n\r\n get spineOffsetY(): number {\r\n let tex = this.texture;\r\n return this.originalHeight - this.height - (tex.trim ? tex.trim.y : 0);\r\n }\r\n\r\n get originalWidth(): number {\r\n let tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n if (tex.trim) {\r\n return tex.trim.width;\r\n }\r\n return (tex as any).crop.width;\r\n }\r\n return tex.orig.width;\r\n }\r\n\r\n get originalHeight(): number {\r\n const tex = this.texture;\r\n if (PIXI.VERSION[0] == '3') {\r\n if (tex.trim) {\r\n return tex.trim.height;\r\n }\r\n return (tex as any).crop.height;\r\n }\r\n return tex.orig.height;\r\n }\r\n\r\n get x(): number {\r\n return this.texture.frame.x;\r\n }\r\n\r\n get y(): number {\r\n return this.texture.frame.y;\r\n }\r\n\r\n get rotate(): boolean {\r\n return this.texture.rotate !== 0;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TextureAtlas implements Disposable {\r\n pages = new Array();\r\n regions = new Array();\r\n\r\n constructor(atlasText?: string, textureLoader?: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback?: (obj: TextureAtlas) => any) {\r\n if (atlasText) {\r\n this.addSpineAtlas(atlasText, textureLoader, callback);\r\n }\r\n }\r\n\r\n addTexture(name: string, texture: PIXI.Texture) {\r\n let pages = this.pages;\r\n let page: TextureAtlasPage = null;\r\n for (let i = 0; i < pages.length; i++) {\r\n if (pages[i].baseTexture === texture.baseTexture) {\r\n page = pages[i];\r\n break;\r\n }\r\n }\r\n if (page === null) {\r\n page = new TextureAtlasPage();\r\n page.name = 'texturePage';\r\n let baseTexture = texture.baseTexture;\r\n page.width = baseTexture.realWidth;\r\n page.height = baseTexture.realHeight;\r\n page.baseTexture = baseTexture;\r\n //those fields are not relevant in Pixi\r\n page.minFilter = page.magFilter = TextureFilter.Nearest;\r\n page.uWrap = TextureWrap.ClampToEdge;\r\n page.vWrap = TextureWrap.ClampToEdge;\r\n pages.push(page);\r\n }\r\n let region = new TextureAtlasRegion();\r\n region.name = name;\r\n region.page = page;\r\n region.texture = texture;\r\n region.index = -1;\r\n this.regions.push(region);\r\n return region;\r\n }\r\n\r\n addTextureHash(textures: Map, stripExtension: boolean) {\r\n for (let key in textures) {\r\n if (textures.hasOwnProperty(key)) {\r\n this.addTexture(stripExtension && key.indexOf('.') !== -1 ? key.substr(0, key.lastIndexOf('.')) : key, textures[key]);\r\n }\r\n }\r\n }\r\n\r\n public addSpineAtlas(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {\r\n return this.load(atlasText, textureLoader, callback);\r\n }\r\n\r\n private load(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n\r\n let reader = new TextureAtlasReader(atlasText);\r\n let tuple = new Array(4);\r\n let page: TextureAtlasPage = null;\r\n\r\n let iterateParser = () => {\r\n while (true) {\r\n let line = reader.readLine();\r\n if (line == null) {\r\n return callback && callback(this);\r\n }\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n\r\n if (reader.readTuple(tuple) == 2) { // size is only optional for an atlas packed with an old TexturePacker.\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n // page.format = Format[tuple[0]]; we don't need format in WebGL\r\n\r\n reader.readTuple(tuple);\r\n page.minFilter = Texture.filterFromString(tuple[0]);\r\n page.magFilter = Texture.filterFromString(tuple[1]);\r\n\r\n let direction = reader.readValue();\r\n page.uWrap = TextureWrap.ClampToEdge;\r\n page.vWrap = TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = TextureWrap.Repeat;\r\n\r\n textureLoader(line, (texture: PIXI.BaseTexture) => {\r\n if (texture === null) {\r\n this.pages.splice(this.pages.indexOf(page), 1);\r\n return callback && callback(null);\r\n }\r\n page.baseTexture = texture;\r\n if (!texture.hasLoaded) {\r\n texture.width = page.width;\r\n texture.height = page.height;\r\n }\r\n this.pages.push(page);\r\n page.setFilters();\r\n\r\n if (!page.width || !page.height) {\r\n page.width = texture.realWidth;\r\n page.height = texture.realHeight;\r\n if (!page.width || !page.height) {\r\n console.log(\"ERROR spine atlas page \" + page.name + \": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)\");\r\n }\r\n }\r\n iterateParser();\r\n });\r\n this.pages.push(page);\r\n break;\r\n } else {\r\n let region: TextureAtlasRegion = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n\r\n let rotateValue = reader.readValue();\r\n let rotate = 0;\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n rotate = 6;\r\n } else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n rotate = 0;\r\n } else {\r\n rotate = ((720 - parseFloat(rotateValue))% 360) / 45;\r\n }\r\n\r\n reader.readTuple(tuple);\r\n let x = parseInt(tuple[0]);\r\n let y = parseInt(tuple[1]);\r\n\r\n reader.readTuple(tuple);\r\n let width = parseInt(tuple[0]);\r\n let height = parseInt(tuple[1]);\r\n\r\n let resolution = page.baseTexture.resolution;\r\n x /= resolution;\r\n y /= resolution;\r\n width /= resolution;\r\n height /= resolution;\r\n\r\n let frame = new PIXI.Rectangle(x, y, rotate ? height : width, rotate ? width : height);\r\n\r\n if (reader.readTuple(tuple) == 4) { // split is optional\r\n // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3]));\r\n\r\n if (reader.readTuple(tuple) == 4) { // pad is optional, but only present with splits\r\n //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3]));\r\n\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n\r\n let originalWidth = parseInt(tuple[0]) / resolution;\r\n let originalHeight = parseInt(tuple[1]) / resolution;\r\n reader.readTuple(tuple);\r\n let offsetX = parseInt(tuple[0]) / resolution;\r\n let offsetY = parseInt(tuple[1]) / resolution;\r\n\r\n let orig = new PIXI.Rectangle(0, 0, originalWidth, originalHeight);\r\n let trim = new PIXI.Rectangle(offsetX, originalHeight - height - offsetY, width, height);\r\n\r\n //TODO: pixiv3 uses different frame/crop/trim\r\n\r\n if (PIXI.VERSION[0] != '3') {\r\n // pixi v4 or v5\r\n region.texture = new PIXI.Texture(region.page.baseTexture, frame, orig, trim, rotate);\r\n } else {\r\n // pixi v3.0.11\r\n let frame2 = new PIXI.Rectangle(x, y, width, height);\r\n let crop = frame2.clone();\r\n trim.width = originalWidth;\r\n trim.height = originalHeight;\r\n region.texture = new PIXI.Texture(region.page.baseTexture, frame2, crop, trim, rotate);\r\n }\r\n\r\n region.index = parseInt(reader.readValue());\r\n (region.texture as any)._updateUvs();\r\n\r\n this.regions.push(region);\r\n }\r\n }\r\n }\r\n\r\n iterateParser();\r\n }\r\n\r\n findRegion(name: string): TextureAtlasRegion {\r\n for (let i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n dispose() {\r\n for (let i = 0; i < this.pages.length; i++) {\r\n this.pages[i].baseTexture.dispose();\r\n }\r\n }\r\n }\r\n\r\n class TextureAtlasReader {\r\n lines: Array;\r\n index: number = 0;\r\n\r\n constructor(text: string) {\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n\r\n readLine(): string {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n }\r\n\r\n readValue(): string {\r\n let line = this.readLine();\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n }\r\n\r\n readTuple(tuple: Array): number {\r\n let line = this.readLine();\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n let i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n let comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1) break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n }\r\n }\r\n\r\n export class TextureAtlasPage {\r\n name: string;\r\n minFilter: TextureFilter;\r\n magFilter: TextureFilter;\r\n uWrap: TextureWrap;\r\n vWrap: TextureWrap;\r\n baseTexture: PIXI.BaseTexture;\r\n width: number;\r\n height: number;\r\n\r\n public setFilters() {\r\n let tex = this.baseTexture;\r\n let filter = this.minFilter;\r\n if (filter == TextureFilter.Linear) {\r\n tex.scaleMode = PIXI.SCALE_MODES.LINEAR;\r\n } else if (this.minFilter == TextureFilter.Nearest) {\r\n tex.scaleMode = PIXI.SCALE_MODES.NEAREST;\r\n } else {\r\n tex.mipmap = true;\r\n if (filter == TextureFilter.MipMapNearestNearest) {\r\n tex.scaleMode = PIXI.SCALE_MODES.NEAREST;\r\n } else {\r\n tex.scaleMode = PIXI.SCALE_MODES.LINEAR;\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class TextureAtlasRegion extends TextureRegion {\r\n page: TextureAtlasPage;\r\n name: string;\r\n index: number;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TransformConstraint implements Updatable {\r\n data: TransformConstraintData;\r\n bones: Array;\r\n target: Bone;\r\n rotateMix = 0;\r\n translateMix = 0;\r\n scaleMix = 0;\r\n shearMix = 0;\r\n temp = new Vector2();\r\n active = false;\r\n\r\n constructor(data: TransformConstraintData, skeleton: Skeleton) {\r\n if (data == null) throw new Error(\"data cannot be null.\");\r\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n\r\n isActive () {\r\n return this.active;\r\n }\r\n\r\n apply() {\r\n this.update();\r\n }\r\n\r\n update() {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n\r\n } else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n }\r\n\r\n applyAbsoluteWorld() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n let targetMat = target.matrix;\r\n let ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect;\r\n let offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let modified = false;\r\n let mat = bone.matrix;\r\n\r\n if (rotateMix != 0) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= rotateMix;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n\r\n if (translateMix != 0) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n mat.tx += (temp.x - mat.tx) * translateMix;\r\n mat.ty += (temp.y - mat.ty) * translateMix;\r\n modified = true;\r\n }\r\n\r\n if (scaleMix > 0) {\r\n let s = Math.sqrt(mat.a * mat.a + mat.b * mat.b);\r\n let ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n mat.a *= s;\r\n mat.b *= s;\r\n s = Math.sqrt(mat.c * mat.c + mat.d * mat.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n mat.c *= s;\r\n mat.d *= s;\r\n modified = true;\r\n }\r\n\r\n if (shearMix > 0) {\r\n let b = mat.c, d = mat.d;\r\n let by = Math.atan2(d, b);\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a));\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n let s = Math.sqrt(b * b + d * d);\r\n mat.c = Math.cos(r) * s;\r\n mat.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n\r\n if (modified) bone.appliedValid = false;\r\n }\r\n }\r\n\r\n applyRelativeWorld() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n let targetMat = target.matrix;\r\n let ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect,\r\n offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let modified = false;\r\n let mat = bone.matrix;\r\n\r\n if (rotateMix != 0) {\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) r += MathUtils.PI2;\r\n r *= rotateMix;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n mat.a = cos * a - sin * c;\r\n mat.c = cos * b - sin * d;\r\n mat.b = sin * a + cos * c;\r\n mat.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n\r\n if (translateMix != 0) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n mat.tx += temp.x * translateMix;\r\n mat.ty += temp.y * translateMix;\r\n modified = true;\r\n }\r\n\r\n if (scaleMix > 0) {\r\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n mat.a *= s;\r\n mat.b *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n mat.c *= s;\r\n mat.d *= s;\r\n modified = true;\r\n }\r\n\r\n if (shearMix > 0) {\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI) r += MathUtils.PI2;\r\n let b = mat.c, d = mat.d;\r\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n let s = Math.sqrt(b * b + d * d);\r\n mat.c = Math.cos(r) * s;\r\n mat.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n\r\n if (modified) bone.appliedValid = false;\r\n }\r\n }\r\n\r\n applyAbsoluteLocal() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n if (!target.appliedValid) target.updateAppliedTransform();\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n\r\n let rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n let r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n\r\n let x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix > 0) {\r\n if (scaleX > 0.00001) scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001) scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n\r\n let shearY = bone.ashearY;\r\n if (shearMix > 0) {\r\n let r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n\r\n applyRelativeLocal() {\r\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\r\n shearMix = this.shearMix;\r\n let target = this.target;\r\n if (!target.appliedValid) target.updateAppliedTransform();\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.appliedValid) bone.updateAppliedTransform();\r\n\r\n let rotation = bone.arotation;\r\n if (rotateMix != 0) rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n\r\n let x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix > 0) {\r\n if (scaleX > 0.00001) scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001) scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n\r\n let shearY = bone.ashearY;\r\n if (shearMix > 0) shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n }\r\n\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class TransformConstraintData extends ConstraintData {\r\n bones = new Array();\r\n target: BoneData;\r\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\r\n offsetRotation = 0; offsetX = 0; offsetY = 0; offsetScaleX = 0; offsetScaleY = 0; offsetShearY = 0;\r\n relative = false;\r\n local = false;\r\n\r\n constructor (name: string) {\r\n super(name, 0, false);\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class Triangulator {\r\n\t\tprivate convexPolygons = new Array>();\r\n\t\tprivate convexPolygonsIndices = new Array>();\r\n\r\n\t\tprivate indicesArray = new Array();\r\n\t\tprivate isConcaveArray = new Array();\r\n\t\tprivate triangles = new Array();\r\n\r\n\t\tprivate polygonPool = new Pool>(() => {\r\n\t\t\treturn new Array();\r\n\t\t});\r\n\r\n\t\tprivate polygonIndicesPool = new Pool>(() => {\r\n\t\t\treturn new Array();\r\n\t\t});\r\n\r\n\t\tpublic triangulate (verticesArray: ArrayLike): Array {\r\n\t\t\tlet vertices = verticesArray;\r\n\t\t\tlet vertexCount = verticesArray.length >> 1;\r\n\r\n\t\t\tlet indices = this.indicesArray;\r\n\t\t\tindices.length = 0;\r\n\t\t\tfor (let i = 0; i < vertexCount; i++)\r\n\t\t\t\tindices[i] = i;\r\n\r\n\t\t\tlet isConcave = this.isConcaveArray;\r\n\t\t\tisConcave.length = 0;\r\n\t\t\tfor (let i = 0, n = vertexCount; i < n; ++i)\r\n\t\t\t\tisConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n\r\n\t\t\tlet triangles = this.triangles;\r\n\t\t\ttriangles.length = 0;\r\n\r\n\t\t\twhile (vertexCount > 3) {\r\n\t\t\t\t// Find ear tip.\r\n\t\t\t\tlet previous = vertexCount - 1, i = 0, next = 1;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\touter:\r\n\t\t\t\t\tif (!isConcave[i]) {\r\n\t\t\t\t\t\tlet p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n\t\t\t\t\t\tlet p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n\t\t\t\t\t\tlet p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n\t\t\t\t\t\tlet p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n\t\t\t\t\t\tfor (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n\t\t\t\t\t\t\tif (!isConcave[ii]) continue;\r\n\t\t\t\t\t\t\tlet v = indices[ii] << 1;\r\n\t\t\t\t\t\t\tlet vx = vertices[v], vy = vertices[v + 1];\r\n\t\t\t\t\t\t\tif (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n\t\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy)) break outer;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (next == 0) {\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\tif (!isConcave[i]) break;\r\n\t\t\t\t\t\t\ti--;\r\n\t\t\t\t\t\t} while (i > 0);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tprevious = i;\r\n\t\t\t\t\ti = next;\r\n\t\t\t\t\tnext = (next + 1) % vertexCount;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Cut ear tip.\r\n\t\t\t\ttriangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n\t\t\t\ttriangles.push(indices[i]);\r\n\t\t\t\ttriangles.push(indices[(i + 1) % vertexCount]);\r\n\t\t\t\tindices.splice(i, 1);\r\n\t\t\t\tisConcave.splice(i, 1);\r\n\t\t\t\tvertexCount--;\r\n\r\n\t\t\t\tlet previousIndex = (vertexCount + i - 1) % vertexCount;\r\n\t\t\t\tlet nextIndex = i == vertexCount ? 0 : i;\r\n\t\t\t\tisConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n\t\t\t\tisConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n\t\t\t}\r\n\r\n\t\t\tif (vertexCount == 3) {\r\n\t\t\t\ttriangles.push(indices[2]);\r\n\t\t\t\ttriangles.push(indices[0]);\r\n\t\t\t\ttriangles.push(indices[1]);\r\n\t\t\t}\r\n\r\n\t\t\treturn triangles;\r\n\t\t}\r\n\r\n\t\tdecompose (verticesArray: Array, triangles: Array) : Array> {\r\n\t\t\tlet vertices = verticesArray;\r\n\t\t\tlet convexPolygons = this.convexPolygons;\r\n\t\t\tthis.polygonPool.freeAll(convexPolygons);\r\n\t\t\tconvexPolygons.length = 0;\r\n\r\n\t\t\tlet convexPolygonsIndices = this.convexPolygonsIndices;\r\n\t\t\tthis.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n\t\t\tconvexPolygonsIndices.length = 0;\r\n\r\n\t\t\tlet polygonIndices = this.polygonIndicesPool.obtain();\r\n\t\t\tpolygonIndices.length = 0;\r\n\r\n\t\t\tlet polygon = this.polygonPool.obtain();\r\n\t\t\tpolygon.length = 0;\r\n\r\n\t\t\t// Merge subsequent triangles if they form a triangle fan.\r\n\t\t\tlet fanBaseIndex = -1, lastWinding = 0;\r\n\t\t\tfor (let i = 0, n = triangles.length; i < n; i += 3) {\r\n\t\t\t\tlet t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n\t\t\t\tlet x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n\t\t\t\tlet x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n\t\t\t\tlet x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n\r\n\t\t\t\t// If the base of the last triangle is the same as this triangle, check if they form a convex polygon (triangle fan).\r\n\t\t\t\tlet merged = false;\r\n\t\t\t\tif (fanBaseIndex == t1) {\r\n\t\t\t\t\tlet o = polygon.length - 4;\r\n\t\t\t\t\tlet winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n\t\t\t\t\tlet winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n\t\t\t\t\tif (winding1 == lastWinding && winding2 == lastWinding) {\r\n\t\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\t\tpolygonIndices.push(t3);\r\n\t\t\t\t\t\tmerged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Otherwise make this triangle the new base.\r\n\t\t\t\tif (!merged) {\r\n\t\t\t\t\tif (polygon.length > 0) {\r\n\t\t\t\t\t\tconvexPolygons.push(polygon);\r\n\t\t\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.polygonPool.free(polygon)\r\n\t\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpolygon = this.polygonPool.obtain();\r\n\t\t\t\t\tpolygon.length = 0;\r\n\t\t\t\t\tpolygon.push(x1);\r\n\t\t\t\t\tpolygon.push(y1);\r\n\t\t\t\t\tpolygon.push(x2);\r\n\t\t\t\t\tpolygon.push(y2);\r\n\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\tpolygonIndices = this.polygonIndicesPool.obtain();\r\n\t\t\t\t\tpolygonIndices.length = 0;\r\n\t\t\t\t\tpolygonIndices.push(t1);\r\n\t\t\t\t\tpolygonIndices.push(t2);\r\n\t\t\t\t\tpolygonIndices.push(t3);\r\n\t\t\t\t\tlastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n\t\t\t\t\tfanBaseIndex = t1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (polygon.length > 0) {\r\n\t\t\t\tconvexPolygons.push(polygon);\r\n\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\r\n\t\t\t}\r\n\r\n\t\t\t// Go through the list of polygons and try to merge the remaining triangles with the found triangle fans.\r\n\t\t\tfor (let i = 0, n = convexPolygons.length; i < n; i++) {\r\n\t\t\t\tpolygonIndices = convexPolygonsIndices[i];\r\n\t\t\t\tif (polygonIndices.length == 0) continue;\r\n\t\t\t\tlet firstIndex = polygonIndices[0];\r\n\t\t\t\tlet lastIndex = polygonIndices[polygonIndices.length - 1];\r\n\r\n\t\t\t\tpolygon = convexPolygons[i];\r\n\t\t\t\tlet o = polygon.length - 4;\r\n\t\t\t\tlet prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n\t\t\t\tlet prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n\t\t\t\tlet firstX = polygon[0], firstY = polygon[1];\r\n\t\t\t\tlet secondX = polygon[2], secondY = polygon[3];\r\n\t\t\t\tlet winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n\r\n\t\t\t\tfor (let ii = 0; ii < n; ii++) {\r\n\t\t\t\t\tif (ii == i) continue;\r\n\t\t\t\t\tlet otherIndices = convexPolygonsIndices[ii];\r\n\t\t\t\t\tif (otherIndices.length != 3) continue;\r\n\t\t\t\t\tlet otherFirstIndex = otherIndices[0];\r\n\t\t\t\t\tlet otherSecondIndex = otherIndices[1];\r\n\t\t\t\t\tlet otherLastIndex = otherIndices[2];\r\n\r\n\t\t\t\t\tlet otherPoly = convexPolygons[ii];\r\n\t\t\t\t\tlet x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n\r\n\t\t\t\t\tif (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue;\r\n\t\t\t\t\tlet winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n\t\t\t\t\tlet winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n\t\t\t\t\tif (winding1 == winding && winding2 == winding) {\r\n\t\t\t\t\t\totherPoly.length = 0;\r\n\t\t\t\t\t\totherIndices.length = 0;\r\n\t\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\t\tpolygonIndices.push(otherLastIndex);\r\n\t\t\t\t\t\tprevPrevX = prevX;\r\n\t\t\t\t\t\tprevPrevY = prevY;\r\n\t\t\t\t\t\tprevX = x3;\r\n\t\t\t\t\t\tprevY = y3;\r\n\t\t\t\t\t\tii = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove empty polygons that resulted from the merge step above.\r\n\t\t\tfor (let i = convexPolygons.length - 1; i >= 0; i--) {\r\n\t\t\t\tpolygon = convexPolygons[i];\r\n\t\t\t\tif (polygon.length == 0) {\r\n\t\t\t\t\tconvexPolygons.splice(i, 1);\r\n\t\t\t\t\tthis.polygonPool.free(polygon);\r\n\t\t\t\t\tpolygonIndices = convexPolygonsIndices[i]\r\n\t\t\t\t\tconvexPolygonsIndices.splice(i, 1)\r\n\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn convexPolygons;\r\n\t\t}\r\n\r\n\t\tprivate static isConcave (index: number, vertexCount: number, vertices: ArrayLike, indices: ArrayLike): boolean {\r\n\t\t\tlet previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n\t\t\tlet current = indices[index] << 1;\r\n\t\t\tlet next = indices[(index + 1) % vertexCount] << 1;\r\n\t\t\treturn !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next],\r\n\t\t\t\tvertices[next + 1]);\r\n\t\t}\r\n\r\n\t\tprivate static positiveArea (p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): boolean {\r\n\t\t\treturn p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n\t\t}\r\n\r\n\t\tprivate static winding (p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): number {\r\n\t\t\tlet px = p2x - p1x, py = p2y - p1y;\r\n\t\t\treturn p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface Updatable {\r\n update(): void;\r\n\r\n isActive(): boolean;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface Map {\r\n [key: string]: T;\r\n }\r\n\r\n export class IntSet {\r\n array = new Array();\r\n\r\n add (value: number): boolean {\r\n let contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n }\r\n\r\n contains (value: number) {\r\n return this.array[value | 0] != undefined;\r\n }\r\n\r\n remove (value: number) {\r\n this.array[value | 0] = undefined;\r\n }\r\n\r\n clear () {\r\n this.array.length = 0;\r\n }\r\n }\r\n\r\n export interface Disposable {\r\n dispose (): void;\r\n }\r\n\r\n export interface Restorable {\r\n restore (): void;\r\n }\r\n\r\n export class Color {\r\n public static WHITE = new Color(1, 1, 1, 1);\r\n public static RED = new Color(1, 0, 0, 1);\r\n public static GREEN = new Color(0, 1, 0, 1);\r\n public static BLUE = new Color(0, 0, 1, 1);\r\n public static MAGENTA = new Color(1, 0, 1, 1);\r\n\r\n constructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) {\r\n }\r\n\r\n set (r: number, g: number, b: number, a: number) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n }\r\n\r\n setFromColor (c: Color) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n }\r\n\r\n setFromString (hex: string) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n }\r\n\r\n add (r: number, g: number, b: number, a: number) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n }\r\n\r\n clamp () {\r\n if (this.r < 0) this.r = 0;\r\n else if (this.r > 1) this.r = 1;\r\n\r\n if (this.g < 0) this.g = 0;\r\n else if (this.g > 1) this.g = 1;\r\n\r\n if (this.b < 0) this.b = 0;\r\n else if (this.b > 1) this.b = 1;\r\n\r\n if (this.a < 0) this.a = 0;\r\n else if (this.a > 1) this.a = 1;\r\n return this;\r\n }\r\n\r\n static rgba8888ToColor(color: Color, value: number) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n }\r\n\r\n static rgb888ToColor (color: Color, value: number) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n }\r\n }\r\n\r\n export class MathUtils {\r\n static PI = 3.1415927;\r\n static PI2 = MathUtils.PI * 2;\r\n static radiansToDegrees = 180 / MathUtils.PI;\r\n static radDeg = MathUtils.radiansToDegrees;\r\n static degreesToRadians = MathUtils.PI / 180;\r\n static degRad = MathUtils.degreesToRadians;\r\n\r\n static clamp (value: number, min: number, max: number) {\r\n if (value < min) return min;\r\n if (value > max) return max;\r\n return value;\r\n }\r\n\r\n static cosDeg (degrees: number) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n }\r\n\r\n static sinDeg (degrees: number) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n }\r\n\r\n static signum (value: number): number {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n }\r\n\r\n static toInt (x: number) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n }\r\n\r\n static cbrt (x: number) {\r\n let y = Math.pow(Math.abs(x), 1/3);\r\n return x < 0 ? -y : y;\r\n }\r\n\r\n static randomTriangular (min: number, max: number): number {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n }\r\n\r\n static randomTriangularWith (min: number, max: number, mode: number): number {\r\n let u = Math.random();\r\n let d = max - min;\r\n if (u <= (mode - min) / d) return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n }\r\n }\r\n\r\n export abstract class Interpolation {\r\n protected abstract applyInternal (a: number): number;\r\n apply(start: number, end: number, a: number): number {\r\n return start + (end - start) * this.applyInternal(a);\r\n }\r\n }\r\n\r\n export class Pow extends Interpolation {\r\n protected power = 2;\r\n\r\n constructor (power: number) {\r\n super();\r\n this.power = power;\r\n }\r\n\r\n applyInternal (a: number): number {\r\n if (a <= 0.5) return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n }\r\n }\r\n\r\n export class PowOut extends Pow {\r\n constructor (power: number) {\r\n super(power);\r\n }\r\n\r\n applyInternal (a: number) : number {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n }\r\n }\r\n\r\n export class Utils {\r\n static SUPPORTS_TYPED_ARRAYS = typeof(Float32Array) !== \"undefined\";\r\n\r\n static arrayCopy (source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number) {\r\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n }\r\n\r\n static setArraySize (array: Array, size: number, value: any = 0): Array {\r\n let oldSize = array.length;\r\n if (oldSize == size) return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (let i = oldSize; i < size; i++) array[i] = value;\r\n }\r\n return array;\r\n }\r\n\r\n static ensureArrayCapacity (array: Array, size: number, value: any = 0): Array {\r\n if (array.length >= size) return array;\r\n return Utils.setArraySize(array, size, value);\r\n }\r\n\r\n static newArray (size: number, defaultValue: T): Array {\r\n let array = new Array(size);\r\n for (let i = 0; i < size; i++) array[i] = defaultValue;\r\n return array;\r\n }\r\n\r\n static newFloatArray (size: number): ArrayLike {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size)\r\n } else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++) array[i] = 0;\r\n return array;\r\n }\r\n }\r\n\r\n static newShortArray (size: number): ArrayLike {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size)\r\n } else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++) array[i] = 0;\r\n return array;\r\n }\r\n }\r\n\r\n static toFloatArray (array: Array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n }\r\n\r\n static toSinglePrecision (value: number) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n }\r\n\r\n // This function is used to fix WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\r\n static webkit602BugfixHelper (alpha: number, blend: MixBlend) {\r\n\r\n }\r\n\r\n static contains (array: Array, element: T, identity = true) {\r\n for (let i = 0; i < array.length; i++) {\r\n if (array[i] == element) return true;\r\n }\r\n return false;\r\n }\r\n }\r\n\r\n export class DebugUtils {\r\n static logBones(skeleton: Skeleton) {\r\n for (let i = 0; i < skeleton.bones.length; i++) {\r\n let bone = skeleton.bones[i];\r\n let mat = bone.matrix;\r\n console.log(bone.data.name + \", \" + mat.a + \", \" + mat.b + \", \" + mat.c + \", \" + mat.d + \", \" + mat.tx + \", \" + mat.ty);\r\n }\r\n }\r\n }\r\n\r\n export class Pool {\r\n private items = new Array();\r\n private instantiator: () => T;\r\n\r\n constructor (instantiator: () => T) {\r\n this.instantiator = instantiator;\r\n }\r\n\r\n obtain () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n }\r\n\r\n free (item: T) {\r\n if ((item as any).reset) (item as any).reset();\r\n this.items.push(item);\r\n }\r\n\r\n freeAll (items: ArrayLike) {\r\n for (let i = 0; i < items.length; i++) {\r\n if ((items[i] as any).reset) (items[i] as any).reset();\r\n this.items[i] = items[i];\r\n }\r\n }\r\n\r\n clear () {\r\n this.items.length = 0;\r\n }\r\n }\r\n\r\n export class Vector2 {\r\n constructor (public x = 0, public y = 0) {\r\n }\r\n\r\n set (x: number, y: number): Vector2 {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n\r\n length () {\r\n let x = this.x;\r\n let y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n }\r\n\r\n normalize () {\r\n let len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n }\r\n }\r\n\r\n export class TimeKeeper {\r\n maxDelta = 0.064;\r\n framesPerSecond = 0;\r\n delta = 0;\r\n totalTime = 0;\r\n\r\n private lastTime = Date.now() / 1000;\r\n private frameCount = 0;\r\n private frameTime = 0;\r\n\r\n update () {\r\n let now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta) this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n }\r\n }\r\n\r\n export interface ArrayLike {\r\n length: number;\r\n [n: number]: T;\r\n }\r\n\r\n export class WindowedMean {\r\n values: Array;\r\n addedValues = 0;\r\n lastValue = 0;\r\n mean = 0;\r\n dirty = true;\r\n\r\n constructor (windowSize: number = 32) {\r\n this.values = new Array(windowSize);\r\n }\r\n\r\n hasEnoughData () {\r\n return this.addedValues >= this.values.length;\r\n }\r\n\r\n addValue (value: number) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1) this.lastValue = 0;\r\n this.dirty = true;\r\n }\r\n\r\n getMean () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n let mean = 0;\r\n for (let i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport interface VertexEffect {\r\n\t\tbegin(skeleton: Skeleton): void;\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void;\r\n\t\tend(): void;\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export abstract class Attachment {\r\n name: string;\r\n\r\n constructor(name: string) {\r\n if (name == null) throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n\r\n abstract copy (): Attachment;\r\n }\r\n\r\n export abstract class VertexAttachment extends Attachment {\r\n private static nextID = 0;\r\n\r\n id = (VertexAttachment.nextID++ & 65535) << 11;\r\n bones: Array;\r\n vertices: ArrayLike;\r\n worldVerticesLength = 0;\r\n deformAttachment: VertexAttachment = this;\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n\r\n computeWorldVerticesOld(slot: Slot, worldVertices: ArrayLike) {\r\n this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2);\r\n }\r\n\r\n /** Transforms local vertices to world coordinates.\r\n * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\r\n * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\r\n * @param worldVertices The output world vertices. Must have a length >= offset + count.\r\n * @param offset The worldVertices index to begin writing values. */\r\n computeWorldVertices (slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number, stride: number) {\r\n count = offset + (count >> 1) * stride;\r\n let skeleton = slot.bone.skeleton;\r\n let deformArray = slot.deform;\r\n let vertices = this.vertices;\r\n let bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0) vertices = deformArray;\r\n let mat = slot.bone.matrix;\r\n let x = mat.tx;\r\n let y = mat.ty;\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n for (let v = start, w = offset; w < count; v += 2, w += stride) {\r\n let vx = vertices[v], vy = vertices[v + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n let v = 0, skip = 0;\r\n for (let i = 0; i < start; i += 2) {\r\n let n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n let skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (let w = offset, b = skip * 3; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n let mat = skeletonBones[bones[v]].matrix;\r\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n } else {\r\n let deform = deformArray;\r\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n let mat = skeletonBones[bones[v]].matrix;\r\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\r\n wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n }\r\n\r\n copyTo (attachment: VertexAttachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n } else\r\n attachment.bones = null;\r\n\r\n if (this.vertices != null) {\r\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n } else\r\n attachment.vertices = null;\r\n\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export interface AttachmentLoader {\r\n /** @return May be null to not load an attachment. */\r\n newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment;\r\n\r\n /** @return May be null to not load an attachment. */\r\n newMeshAttachment (skin: Skin, name: string, path: string): MeshAttachment;\r\n\r\n /** @return May be null to not load an attachment. */\r\n newBoundingBoxAttachment (skin: Skin, name: string): BoundingBoxAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newPathAttachment(skin: Skin, name: string): PathAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newPointAttachment(skin: Skin, name: string): PointAttachment;\r\n\r\n /** @return May be null to not load an attachment */\r\n newClippingAttachment(skin: Skin, name: string): ClippingAttachment;\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export enum AttachmentType {\r\n Region, BoundingBox, Mesh, LinkedMesh, Path, Point, Clipping\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class BoundingBoxAttachment extends VertexAttachment {\r\n color = new Color(1, 1, 1, 1);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n\r\n copy (): Attachment {\r\n let copy = new BoundingBoxAttachment(name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class ClippingAttachment extends VertexAttachment {\r\n endSlot: SlotData;\r\n\r\n // Nonessential.\r\n color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n\r\n copy (): Attachment {\r\n let copy = new ClippingAttachment(name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class MeshAttachment extends VertexAttachment {\r\n region: TextureRegion;\r\n path: string;\r\n regionUVs: Float32Array; uvs: ArrayLike;\r\n triangles: Array;\r\n color = new Color(1, 1, 1, 1);\r\n width: number;\r\n height: number;\r\n hullLength: number;\r\n edges: Array;\r\n private parentMesh: MeshAttachment;\r\n tempColor = new Color(0, 0, 0, 0);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n\r\n updateUVs(region: TextureRegion, uvs: ArrayLike): ArrayLike {\r\n let regionUVs = this.regionUVs;\r\n let n = regionUVs.length;\r\n if (!uvs || uvs.length != n) {\r\n uvs = Utils.newFloatArray(n);\r\n }\r\n\r\n if (region == null) {\r\n return;\r\n }\r\n\r\n let texture = region.texture;\r\n let r = (texture as any)._uvs;\r\n let w1 = region.width, h1 = region.height, w2 = region.originalWidth, h2 = region.originalHeight;\r\n let x = region.offsetX, y = region.pixiOffsetY;\r\n\r\n for (let i = 0; i < n; i += 2) {\r\n let u = this.regionUVs[i], v = this.regionUVs[i + 1];\r\n u = (u * w2 - x) / w1;\r\n v = (v * h2 - y) / h1;\r\n uvs[i] = (r.x0 * (1 - u) + r.x1 * u) * (1 - v) + (r.x3 * (1 - u) + r.x2 * u) * v;\r\n uvs[i + 1] = (r.y0 * (1 - u) + r.y1 * u) * (1 - v) + (r.y3 * (1 - u) + r.y2 * u) * v;\r\n }\r\n\r\n return uvs;\r\n }\r\n\r\n getParentMesh () {\r\n return this.parentMesh;\r\n }\r\n\r\n /** @param parentMesh May be null. */\r\n setParentMesh (parentMesh: MeshAttachment) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength\r\n }\r\n }\r\n\r\n copy (): Attachment {\r\n if (this.parentMesh != null) return this.newLinkedMesh();\r\n\r\n let copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n\r\n this.copyTo(copy);\r\n copy.regionUVs = new Float32Array(this.regionUVs.length);\r\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n\r\n // Nonessential.\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n\r\n return copy;\r\n }\r\n\r\n newLinkedMesh (): MeshAttachment {\r\n let copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n // copy.updateUVs();\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class PathAttachment extends VertexAttachment {\r\n lengths: Array;\r\n closed = false; constantSpeed = false;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n\r\n copy (): Attachment {\r\n let copy = new PathAttachment(name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class PointAttachment extends VertexAttachment {\r\n x: number; y: number; rotation: number;\r\n color = new Color(0.38, 0.94, 0, 1);\r\n\r\n constructor (name: string) {\r\n super(name);\r\n }\r\n\r\n computeWorldPosition(bone: Bone, point: Vector2) {\r\n const mat = bone.matrix;\r\n point.x = this.x * mat.a + this.y * mat.c + bone.worldX;\r\n point.y = this.x * mat.b + this.y * mat.d + bone.worldY;\r\n return point;\r\n }\r\n\r\n computeWorldRotation(bone: Bone) {\r\n const mat = bone.matrix;\r\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\r\n let x = cos * mat.a + sin * mat.c;\r\n let y = cos * mat.b + sin * mat.d;\r\n return Math.atan2(y, x) * MathUtils.radDeg;\r\n }\r\n\r\n copy (): Attachment {\r\n let copy = new PointAttachment(name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License\r\n * Version 2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n export class RegionAttachment extends Attachment {\r\n static OX1 = 0;\r\n static OY1 = 1;\r\n static OX2 = 2;\r\n static OY2 = 3;\r\n static OX3 = 4;\r\n static OY3 = 5;\r\n static OX4 = 6;\r\n static OY4 = 7;\r\n\r\n static X1 = 0;\r\n static Y1 = 1;\r\n static C1R = 2;\r\n static C1G = 3;\r\n static C1B = 4;\r\n static C1A = 5;\r\n static U1 = 6;\r\n static V1 = 7;\r\n\r\n static X2 = 8;\r\n static Y2 = 9;\r\n static C2R = 10;\r\n static C2G = 11;\r\n static C2B = 12;\r\n static C2A = 13;\r\n static U2 = 14;\r\n static V2 = 15;\r\n\r\n static X3 = 16;\r\n static Y3 = 17;\r\n static C3R = 18;\r\n static C3G = 19;\r\n static C3B = 20;\r\n static C3A = 21;\r\n static U3 = 22;\r\n static V3 = 23;\r\n\r\n static X4 = 24;\r\n static Y4 = 25;\r\n static C4R = 26;\r\n static C4G = 27;\r\n static C4B = 28;\r\n static C4A = 29;\r\n static U4 = 30;\r\n static V4 = 31;\r\n\r\n x = 0;\r\n y = 0;\r\n scaleX = 1;\r\n scaleY = 1;\r\n rotation = 0;\r\n width = 0;\r\n height = 0;\r\n color = new Color(1, 1, 1, 1);\r\n\r\n path: string;\r\n rendererObject: any;\r\n region: TextureRegion;\r\n\r\n offset = Utils.newFloatArray(8);\r\n uvs = Utils.newFloatArray(8);\r\n\r\n tempColor = new Color(1, 1, 1, 1);\r\n\r\n constructor(name: string) {\r\n super(name);\r\n }\r\n\r\n updateOffset(): void {\r\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n let localX2 = localX + this.region.width * regionScaleX;\r\n let localY2 = localY + this.region.height * regionScaleY;\r\n let radians = this.rotation * Math.PI / 180;\r\n let cos = Math.cos(radians);\r\n let sin = Math.sin(radians);\r\n let localXCos = localX * cos + this.x;\r\n let localXSin = localX * sin;\r\n let localYCos = localY * cos + this.y;\r\n let localYSin = localY * sin;\r\n let localX2Cos = localX2 * cos + this.x;\r\n let localX2Sin = localX2 * sin;\r\n let localY2Cos = localY2 * cos + this.y;\r\n let localY2Sin = localY2 * sin;\r\n let offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n }\r\n\r\n setRegion(region: TextureRegion): void {\r\n this.region = region;\r\n let uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n } else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n }\r\n\r\n computeWorldVertices(bone: Bone, worldVertices: ArrayLike, offset: number, stride: number) {\r\n let vertexOffset = this.offset;\r\n let mat = bone.matrix;\r\n let x = mat.tx, y = mat.ty;\r\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\r\n let offsetX = 0, offsetY = 0;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // br\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // bl\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // ul\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x; // ur\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n }\r\n\r\n copy (): Attachment {\r\n let copy = new RegionAttachment(name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n }\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class JitterEffect implements VertexEffect {\r\n\t\tjitterX = 0;\r\n\t\tjitterY = 0;\r\n\r\n\t\tconstructor (jitterX: number, jitterY: number) {\r\n\t\t\tthis.jitterX = jitterX;\r\n\t\t\tthis.jitterY = jitterY;\r\n\t\t}\r\n\r\n\t\tbegin(skeleton: Skeleton): void {\r\n\t\t}\r\n\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void {\r\n\t\t\tposition.x += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n\t\t\tposition.y += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n\t\t}\r\n\r\n\t\tend(): void {\r\n\t\t}\r\n\t}\r\n}\r\n","/******************************************************************************\r\n * Spine Runtimes Software License v2.5\r\n *\r\n * Copyright (c) 2013-2016, Esoteric Software\r\n * All rights reserved.\r\n *\r\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\r\n * non-transferable license to use, install, execute, and perform the Spine\r\n * Runtimes software and derivative works solely for personal or internal\r\n * use. Without the written permission of Esoteric Software (see Section 2 of\r\n * the Spine Software License Agreement), you may not (a) modify, translate,\r\n * adapt, or develop new applications using the Spine Runtimes or otherwise\r\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\r\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\r\n * or other intellectual property or proprietary rights notices on or in the\r\n * Software, including any copy thereof. Redistributions in binary or source\r\n * form must include this license and terms.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\r\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\r\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\r\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\r\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n *****************************************************************************/\r\n\r\nnamespace pixi_spine.core {\r\n\texport class SwirlEffect implements VertexEffect {\r\n\t\tstatic interpolation = new PowOut(2);\r\n\t\tcenterX = 0;\r\n\t\tcenterY = 0;\r\n\t\tradius = 0;\r\n\t\tangle = 0;\r\n\t\tprivate worldX = 0;\r\n\t\tprivate worldY = 0;\r\n\r\n\t\tconstructor (radius: number) {\r\n\t\t\tthis.radius = radius;\r\n\t\t}\r\n\r\n\t\tbegin(skeleton: Skeleton): void {\r\n\t\t\tthis.worldX = skeleton.x + this.centerX;\r\n\t\t\tthis.worldY = skeleton.y + this.centerY;\r\n\t\t}\r\n\r\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void {\r\n\t\t\tlet radAngle = this.angle * MathUtils.degreesToRadians;\r\n\t\t\tlet x = position.x - this.worldX;\r\n\t\t\tlet y = position.y - this.worldY;\r\n\t\t\tlet dist = Math.sqrt(x * x + y * y);\r\n\t\t\tif (dist < this.radius) {\r\n\t\t\t\tlet theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n\t\t\t\tlet cos = Math.cos(theta);\r\n\t\t\t\tlet sin = Math.sin(theta);\r\n\t\t\t\tposition.x = cos * x - sin * y + this.worldX;\r\n\t\t\t\tposition.y = sin * x + cos * y + this.worldY;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tend(): void {\r\n\t\t}\r\n\t}\r\n}\r\n","interface Math {\r\n fround(n: number): number;\r\n}\r\n\r\n(() => {\r\n if (!Math.fround) {\r\n Math.fround = Math.fround = (function(array) {\r\n return function(x: number) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\n","/// \r\n/// \r\n/// \r\nnamespace pixi_spine {\r\n /* Esoteric Software SPINE wrapper for pixi.js */\r\n core.Bone.yDown = true;\r\n\r\n let tempRgb = [0, 0, 0];\r\n\r\n export class SpineSprite extends PIXI.Sprite {\r\n region: core.TextureRegion = null;\r\n }\r\n\r\n export class SpineMesh extends PIXI.mesh.Mesh {\r\n region: core.TextureRegion;\r\n\r\n constructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number) {\r\n super(texture, vertices, uvs, indices, drawMode);\r\n }\r\n }\r\n\r\n /**\r\n * A class that enables the you to import and run your spine animations in pixi.\r\n * The Spine animation data needs to be loaded using either the Loader or a SpineLoader before it can be used by this class\r\n * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source\r\n *\r\n * ```js\r\n * let spineAnimation = new spine(spineData);\r\n * ```\r\n *\r\n * @class\r\n * @extends Container\r\n * @memberof spine\r\n * @param spineData {object} The spine data loaded from a spine atlas.\r\n */\r\n export class Spine extends PIXI.Container {\r\n static globalAutoUpdate: boolean = true;\r\n static globalDelayLimit: number = 0;\r\n\r\n tintRgb: ArrayLike;\r\n spineData: core.SkeletonData;\r\n skeleton: core.Skeleton;\r\n stateData: core.AnimationStateData;\r\n state: core.AnimationState;\r\n slotContainers: Array;\r\n tempClipContainers: Array;\r\n localDelayLimit: number;\r\n\r\n constructor(spineData: core.SkeletonData) {\r\n super();\r\n\r\n if (!spineData) {\r\n throw new Error('The spineData param is required.');\r\n }\r\n\r\n if ((typeof spineData) === \"string\") {\r\n throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas(\"YOUR_RESOURCE_NAME\") from now on.');\r\n }\r\n\r\n /**\r\n * The spineData object\r\n *\r\n * @member {object}\r\n */\r\n this.spineData = spineData;\r\n\r\n /**\r\n * A spine Skeleton object\r\n *\r\n * @member {object}\r\n */\r\n this.skeleton = new core.Skeleton(spineData);\r\n this.skeleton.updateWorldTransform();\r\n\r\n /**\r\n * A spine AnimationStateData object created from the spine data passed in the constructor\r\n *\r\n * @member {object}\r\n */\r\n this.stateData = new core.AnimationStateData(spineData);\r\n\r\n /**\r\n * A spine AnimationState object created from the spine AnimationStateData object\r\n *\r\n * @member {object}\r\n */\r\n this.state = new core.AnimationState(this.stateData);\r\n\r\n /**\r\n * An array of containers\r\n *\r\n * @member {Container[]}\r\n */\r\n this.slotContainers = [];\r\n\r\n this.tempClipContainers = [];\r\n\r\n for (let i = 0, n = this.skeleton.slots.length; i < n; i++) {\r\n let slot = this.skeleton.slots[i];\r\n let attachment: any = slot.getAttachment();\r\n let slotContainer = this.newContainer();\r\n this.slotContainers.push(slotContainer);\r\n this.addChild(slotContainer);\r\n this.tempClipContainers.push(null);\r\n\r\n if (attachment instanceof core.RegionAttachment) {\r\n let spriteName = (attachment.region as core.TextureAtlasRegion).name;\r\n let sprite = this.createSprite(slot, attachment, spriteName);\r\n slot.currentSprite = sprite;\r\n slot.currentSpriteName = spriteName;\r\n slotContainer.addChild(sprite);\r\n }\r\n else if (attachment instanceof core.MeshAttachment) {\r\n let mesh = this.createMesh(slot, attachment);\r\n slot.currentMesh = mesh;\r\n slot.currentMeshName = attachment.name;\r\n slotContainer.addChild(mesh);\r\n }\r\n else if (attachment instanceof core.ClippingAttachment) {\r\n this.createGraphics(slot, attachment);\r\n slotContainer.addChild(slot.clippingContainer);\r\n slotContainer.addChild(slot.currentGraphics);\r\n }\r\n else {\r\n continue;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Should the Spine object update its transforms\r\n *\r\n * @member {boolean}\r\n */\r\n this.autoUpdate = true;\r\n\r\n /**\r\n * The tint applied to all spine slots. This is a [r,g,b] value. A value of [1,1,1] will remove any tint effect.\r\n *\r\n * @member {number}\r\n * @memberof spine.Spine#\r\n */\r\n this.tintRgb = new Float32Array([1, 1, 1]);\r\n }\r\n\r\n /**\r\n * If this flag is set to true, the spine animation will be autoupdated every time\r\n * the object id drawn. The down side of this approach is that the delta time is\r\n * automatically calculated and you could miss out on cool effects like slow motion,\r\n * pause, skip ahead and the sorts. Most of these effects can be achieved even with\r\n * autoupdate enabled but are harder to achieve.\r\n *\r\n * @member {boolean}\r\n * @memberof spine.Spine#\r\n * @default true\r\n */\r\n get autoUpdate(): boolean {\r\n return (this.updateTransform === Spine.prototype.autoUpdateTransform);\r\n }\r\n\r\n set autoUpdate(value: boolean) {\r\n this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform;\r\n }\r\n\r\n /**\r\n * The tint applied to the spine object. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\r\n *\r\n * @member {number}\r\n * @memberof spine.Spine#\r\n * @default 0xFFFFFF\r\n */\r\n get tint(): number {\r\n return PIXI.utils.rgb2hex(this.tintRgb as any);\r\n }\r\n\r\n set tint(value: number) {\r\n this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb as any);\r\n }\r\n\r\n /**\r\n * Limit value for the update dt with Spine.globalDelayLimit\r\n * that can be overridden with localDelayLimit\r\n * @return {number} - Maximum processed dt value for the update\r\n */\r\n get delayLimit() : number {\r\n let limit = typeof this.localDelayLimit !== \"undefined\"?\r\n this.localDelayLimit: Spine.globalDelayLimit;\r\n\r\n // If limit is 0, this means there is no limit for the delay\r\n return limit || Number.MAX_VALUE\r\n }\r\n\r\n /**\r\n * Update the spine skeleton and its animations by delta time (dt)\r\n *\r\n * @param dt {number} Delta time. Time by which the animation should be updated\r\n */\r\n update(dt: number) {\r\n // Limit delta value to avoid animation jumps\r\n let delayLimit = this.delayLimit;\r\n if (dt > delayLimit) dt = delayLimit;\r\n\r\n this.state.update(dt);\r\n this.state.apply(this.skeleton);\r\n\r\n //check we haven't been destroyed via a spine event callback in state update\r\n if(!this.skeleton)\r\n return;\r\n\r\n this.skeleton.updateWorldTransform();\r\n\r\n let slots = this.skeleton.slots;\r\n\r\n\r\n // in case pixi has double tint\r\n let globalClr = (this as any).color;\r\n let light: ArrayLike = null, dark: ArrayLike = null;\r\n if (globalClr) {\r\n light = globalClr.light;\r\n dark = globalClr.dark;\r\n } else {\r\n light = this.tintRgb;\r\n }\r\n\r\n let thack = PIXI.TransformBase && (this.transformHack() == 1);\r\n\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let attachment = slot.getAttachment();\r\n let slotContainer = this.slotContainers[i];\r\n\r\n if (!attachment) {\r\n slotContainer.visible = false;\r\n continue;\r\n }\r\n\r\n let spriteColor: any = null;\r\n\r\n let attColor = (attachment as any).color;\r\n if (attachment instanceof core.RegionAttachment) {\r\n let region = (attachment as core.RegionAttachment).region;\r\n if (region) {\r\n if (slot.currentMesh) {\r\n slot.currentMesh.visible = false;\r\n slot.currentMesh = null;\r\n slot.currentMeshName = undefined;\r\n }\r\n let ar = region as core.TextureAtlasRegion;\r\n if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) {\r\n let spriteName = ar.name;\r\n if (slot.currentSprite) {\r\n slot.currentSprite.visible = false;\r\n }\r\n slot.sprites = slot.sprites || {};\r\n if (slot.sprites[spriteName] !== undefined) {\r\n slot.sprites[spriteName].visible = true;\r\n }\r\n else {\r\n let sprite = this.createSprite(slot, attachment, spriteName);\r\n slotContainer.addChild(sprite);\r\n }\r\n slot.currentSprite = slot.sprites[spriteName];\r\n slot.currentSpriteName = spriteName;\r\n }\r\n }\r\n\r\n if (slotContainer.transform) {\r\n //TODO: refactor this thing, switch it on and off for container\r\n let transform = slotContainer.transform;\r\n let transAny: any = transform;\r\n let lt: PIXI.Matrix = null;\r\n if (transAny.matrix2d) {\r\n //gameofbombs pixi fork, sorry for that, we really use it :)\r\n lt = transAny.matrix2d;\r\n transAny._dirtyVersion++;\r\n transAny.version = transAny._dirtyVersion;\r\n transAny.isStatic = true;\r\n transAny.operMode = 0;\r\n } else {\r\n if (thack) {\r\n if (transAny.position) {\r\n //TODO: refactor this shit\r\n transform = new PIXI.TransformBase();\r\n (transform as any)._parentID = -1;\r\n (transform as any)._worldID = (slotContainer.transform as any)._worldID;\r\n slotContainer.transform = transform;\r\n }\r\n lt = transform.localTransform;\r\n } else {\r\n // if (transAny.autoUpdateLocal) {\r\n // transAny.autoUpdateLocal = false;\r\n // }\r\n transAny.setFromMatrix(slot.bone.matrix);\r\n }\r\n }\r\n if (lt) {\r\n slot.bone.matrix.copy(lt);\r\n }\r\n } else {\r\n //PIXI v3\r\n let lt = slotContainer.localTransform || new PIXI.Matrix();\r\n slot.bone.matrix.copy(lt);\r\n slotContainer.localTransform = lt;\r\n (slotContainer as any).displayObjectUpdateTransform = SlotContainerUpdateTransformV3;\r\n }\r\n if (slot.currentSprite.color) {\r\n //YAY! double - tint!\r\n spriteColor = slot.currentSprite.color;\r\n } else {\r\n tempRgb[0] = light[0] * slot.color.r * attColor.r;\r\n tempRgb[1] = light[1] * slot.color.g * attColor.g;\r\n tempRgb[2] = light[2] * slot.color.b * attColor.b;\r\n slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb);\r\n }\r\n slot.currentSprite.blendMode = slot.blendMode;\r\n }\r\n else if (attachment instanceof core.MeshAttachment) {\r\n if (slot.currentSprite) {\r\n //TODO: refactor this thing, switch it on and off for container\r\n slot.currentSprite.visible = false;\r\n slot.currentSprite = null;\r\n slot.currentSpriteName = undefined;\r\n\r\n if (slotContainer.transform) {\r\n //TODO: refactor this shit\r\n const transform = new PIXI.TransformStatic();\r\n (transform as any)._parentID = -1;\r\n (transform as any)._worldID = (slotContainer.transform as any)._worldID;\r\n slotContainer.transform = transform;\r\n }\r\n else {\r\n slotContainer.localTransform = new PIXI.Matrix();\r\n (slotContainer as any).displayObjectUpdateTransform = PIXI.DisplayObject.prototype.updateTransform;\r\n }\r\n }\r\n if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) {\r\n let meshName = attachment.name;\r\n if (slot.currentMesh) {\r\n slot.currentMesh.visible = false;\r\n }\r\n\r\n slot.meshes = slot.meshes || {};\r\n\r\n if (slot.meshes[meshName] !== undefined) {\r\n slot.meshes[meshName].visible = true;\r\n }\r\n else {\r\n let mesh = this.createMesh(slot, attachment);\r\n slotContainer.addChild(mesh);\r\n }\r\n\r\n slot.currentMesh = slot.meshes[meshName];\r\n slot.currentMeshName = meshName;\r\n }\r\n (attachment as core.VertexAttachment).computeWorldVerticesOld(slot, slot.currentMesh.vertices);\r\n if (slot.currentMesh.color) {\r\n spriteColor = slot.currentMesh.color;\r\n } else if (PIXI.VERSION[0] !== '3') {\r\n // PIXI version 4\r\n // slot.currentMesh.dirty++;\r\n //only for PIXI v4\r\n let tintRgb = slot.currentMesh.tintRgb;\r\n tintRgb[0] = light[0] * slot.color.r * attColor.r;\r\n tintRgb[1] = light[1] * slot.color.g * attColor.g;\r\n tintRgb[2] = light[2] * slot.color.b * attColor.b;\r\n }\r\n slot.currentMesh.blendMode = slot.blendMode;\r\n }\r\n else if (attachment instanceof core.ClippingAttachment) {\r\n if (!slot.currentGraphics) {\r\n this.createGraphics(slot, attachment);\r\n slotContainer.addChild(slot.clippingContainer);\r\n slotContainer.addChild(slot.currentGraphics);\r\n }\r\n this.updateGraphics(slot, attachment);\r\n }\r\n else {\r\n slotContainer.visible = false;\r\n continue;\r\n }\r\n slotContainer.visible = true;\r\n\r\n // pixi has double tint\r\n if (spriteColor) {\r\n let r0 = slot.color.r * attColor.r;\r\n let g0 = slot.color.g * attColor.g;\r\n let b0 = slot.color.b * attColor.b;\r\n\r\n //YAY! double-tint!\r\n spriteColor.setLight(\r\n light[0] * r0 + dark[0] * (1.0 - r0),\r\n light[1] * g0 + dark[1] * (1.0 - g0),\r\n light[2] * b0 + dark[2] * (1.0 - b0),\r\n );\r\n if (slot.darkColor) {\r\n r0 = slot.darkColor.r;\r\n g0 = slot.darkColor.g;\r\n b0 = slot.darkColor.b;\r\n } else {\r\n r0 = 0.0;\r\n g0 = 0.0;\r\n b0 = 0.0;\r\n }\r\n spriteColor.setDark(\r\n light[0] * r0 + dark[0] * (1 - r0),\r\n light[1] * g0 + dark[1] * (1 - g0),\r\n light[2] * b0 + dark[2] * (1 - b0),\r\n );\r\n }\r\n\r\n slotContainer.alpha = slot.color.a;\r\n }\r\n\r\n //== this is clipping implementation ===\r\n //TODO: remove parent hacks when pixi masks allow it\r\n let drawOrder = this.skeleton.drawOrder;\r\n let clippingAttachment: core.ClippingAttachment = null;\r\n let clippingContainer: PIXI.Container = null;\r\n\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = slots[drawOrder[i].data.index];\r\n let slotContainer = this.slotContainers[drawOrder[i].data.index];\r\n\r\n if (!clippingContainer) {\r\n\t\t\t\t\t//Adding null check as it is possible for slotContainer.parent to be null in the event of a spine being disposed off in its loop callback\r\n if (slotContainer.parent !== null && slotContainer.parent !== this) {\r\n slotContainer.parent.removeChild(slotContainer);\r\n //silend add hack\r\n slotContainer.parent = this;\r\n }\r\n }\r\n if (slot.currentGraphics && slot.getAttachment()) {\r\n clippingContainer = slot.clippingContainer;\r\n clippingAttachment = slot.getAttachment() as core.ClippingAttachment;\r\n clippingContainer.children.length = 0;\r\n this.children[i] = slotContainer;\r\n\r\n if (clippingAttachment.endSlot == slot.data) {\r\n clippingAttachment.endSlot = null;\r\n }\r\n\r\n } else {\r\n if (clippingContainer) {\r\n let c = this.tempClipContainers[i];\r\n if (!c) {\r\n c = this.tempClipContainers[i] = this.newContainer();\r\n c.visible = false;\r\n }\r\n this.children[i] = c;\r\n\r\n //silent remove hack\r\n slotContainer.parent = null;\r\n clippingContainer.addChild(slotContainer);\r\n if (clippingAttachment.endSlot == slot.data) {\r\n clippingContainer.renderable = true;\r\n clippingContainer = null;\r\n clippingAttachment = null;\r\n }\r\n } else {\r\n this.children[i] = slotContainer;\r\n }\r\n }\r\n }\r\n };\r\n\r\n private setSpriteRegion(attachment: core.RegionAttachment, sprite: SpineSprite, region: core.TextureRegion) {\r\n sprite.region = region;\r\n sprite.texture = region.texture;\r\n if (!region.size) {\r\n sprite.scale.x = attachment.scaleX * attachment.width / region.originalWidth;\r\n sprite.scale.y = -attachment.scaleY * attachment.height / region.originalHeight;\r\n } else {\r\n //hacked!\r\n sprite.scale.x = region.size.width / region.originalWidth;\r\n sprite.scale.y = -region.size.height / region.originalHeight;\r\n }\r\n }\r\n\r\n private setMeshRegion(attachment: core.MeshAttachment, mesh: SpineMesh, region: core.TextureRegion) {\r\n mesh.region = region;\r\n mesh.texture = region.texture;\r\n (region.texture as any)._updateUvs();\r\n attachment.updateUVs(region, mesh.uvs);\r\n // if (PIXI.VERSION[0] !== '3') {\r\n // PIXI version 4\r\n // mesh.indexDirty++;\r\n // } else {\r\n // PIXI version 3\r\n mesh.dirty++;\r\n // }\r\n }\r\n\r\n protected lastTime: number;\r\n\r\n /**\r\n * When autoupdate is set to yes this function is used as pixi's updateTransform function\r\n *\r\n * @private\r\n */\r\n autoUpdateTransform() {\r\n if (Spine.globalAutoUpdate) {\r\n this.lastTime = this.lastTime || Date.now();\r\n let timeDelta = (Date.now() - this.lastTime) * 0.001;\r\n this.lastTime = Date.now();\r\n this.update(timeDelta);\r\n } else {\r\n this.lastTime = 0;\r\n }\r\n\r\n PIXI.Container.prototype.updateTransform.call(this);\r\n };\r\n\r\n /**\r\n * Create a new sprite to be used with core.RegionAttachment\r\n *\r\n * @param slot {spine.Slot} The slot to which the attachment is parented\r\n * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\r\n * @private\r\n */\r\n createSprite(slot: core.Slot, attachment: core.RegionAttachment, defName: string) {\r\n let region = attachment.region;\r\n if (slot.tempAttachment === attachment) {\r\n region = slot.tempRegion;\r\n slot.tempAttachment = null;\r\n slot.tempRegion = null;\r\n }\r\n let texture = region.texture;\r\n let sprite = this.newSprite(texture);\r\n sprite.rotation = attachment.rotation * core.MathUtils.degRad;\r\n sprite.anchor.x = 0.5;\r\n sprite.anchor.y = 0.5;\r\n sprite.position.x = attachment.x;\r\n sprite.position.y = attachment.y;\r\n sprite.alpha = attachment.color.a;\r\n\r\n sprite.region = attachment.region;\r\n this.setSpriteRegion(attachment, sprite, attachment.region);\r\n\r\n slot.sprites = slot.sprites || {};\r\n slot.sprites[defName] = sprite;\r\n return sprite;\r\n };\r\n\r\n /**\r\n * Creates a Strip from the spine data\r\n * @param slot {spine.Slot} The slot to which the attachment is parented\r\n * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\r\n * @private\r\n */\r\n createMesh(slot: core.Slot, attachment: core.MeshAttachment) {\r\n let region = attachment.region;\r\n if (slot.tempAttachment === attachment) {\r\n region = slot.tempRegion;\r\n slot.tempAttachment = null;\r\n slot.tempRegion = null;\r\n }\r\n let strip = this.newMesh(\r\n region.texture,\r\n new Float32Array(attachment.regionUVs.length),\r\n new Float32Array(attachment.regionUVs.length),\r\n new Uint16Array(attachment.triangles),\r\n PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);\r\n\r\n strip.canvasPadding = 1.5;\r\n\r\n strip.alpha = attachment.color.a;\r\n\r\n strip.region = attachment.region;\r\n this.setMeshRegion(attachment, strip, region);\r\n\r\n slot.meshes = slot.meshes || {};\r\n slot.meshes[attachment.name] = strip;\r\n return strip;\r\n };\r\n\r\n static clippingPolygon: Array = [];\r\n\r\n createGraphics(slot: core.Slot, clip: core.ClippingAttachment) {\r\n let graphics = this.newGraphics();\r\n let poly = new PIXI.Polygon([]);\r\n graphics.clear();\r\n graphics.beginFill(0xffffff, 1);\r\n graphics.drawPolygon(poly as any);\r\n graphics.renderable = false;\r\n slot.currentGraphics = graphics;\r\n slot.clippingContainer = this.newContainer();\r\n slot.clippingContainer.mask = slot.currentGraphics;\r\n\r\n return graphics;\r\n }\r\n\r\n updateGraphics(slot: core.Slot, clip: core.ClippingAttachment) {\r\n let vertices = (slot.currentGraphics.graphicsData[0].shape as PIXI.Polygon).points;\r\n let n = clip.worldVerticesLength;\r\n vertices.length = n;\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n slot.currentGraphics.dirty++;\r\n slot.currentGraphics.clearDirty++;\r\n }\r\n\r\n /**\r\n * Changes texture in attachment in specific slot.\r\n *\r\n * PIXI runtime feature, it was made to satisfy our users.\r\n *\r\n * @param slotIndex {number}\r\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\r\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\r\n * @returns {boolean} Success flag\r\n */\r\n hackTextureBySlotIndex(slotIndex: number, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\r\n let slot = this.skeleton.slots[slotIndex];\r\n if (!slot) {\r\n return false;\r\n }\r\n let attachment: any = slot.getAttachment();\r\n let region: core.TextureRegion = attachment.region;\r\n if (texture) {\r\n region = new core.TextureRegion();\r\n region.texture = texture;\r\n region.size = size;\r\n }\r\n if (slot.currentSprite && slot.currentSprite.region != region) {\r\n this.setSpriteRegion(attachment, slot.currentSprite, region);\r\n slot.currentSprite.region = region;\r\n } else if (slot.currentMesh && slot.currentMesh.region != region) {\r\n this.setMeshRegion(attachment, slot.currentMesh, region);\r\n } else {\r\n slot.tempRegion = region;\r\n slot.tempAttachment = attachment;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Changes texture in attachment in specific slot.\r\n *\r\n * PIXI runtime feature, it was made to satisfy our users.\r\n *\r\n * @param slotName {string}\r\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\r\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\r\n * @returns {boolean} Success flag\r\n */\r\n hackTextureBySlotName(slotName: string, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\r\n let index = this.skeleton.findSlotIndex(slotName);\r\n if (index == -1) {\r\n return false;\r\n }\r\n return this.hackTextureBySlotIndex(index, texture, size);\r\n }\r\n\r\n //those methods can be overriden to spawn different classes\r\n newContainer() {\r\n return new PIXI.Container();\r\n }\r\n\r\n newSprite(tex: PIXI.Texture) {\r\n return new SpineSprite(tex);\r\n }\r\n\r\n newGraphics() {\r\n return new PIXI.Graphics();\r\n }\r\n\r\n newMesh(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number) {\r\n return new SpineMesh(texture, vertices, uvs, indices, drawMode);\r\n }\r\n\r\n transformHack() {\r\n return 1;\r\n }\r\n\r\n /**\r\n * Hack for pixi-display and pixi-lights. Every attachment name ending with a suffix will be added to different layer\r\n * @param nameSuffix\r\n * @param group\r\n * @param outGroup\r\n */\r\n hackAttachmentGroups(nameSuffix: string, group: any, outGroup: any) {\r\n if (!nameSuffix) {\r\n return;\r\n }\r\n const list_d = [], list_n = [];\r\n for (let i = 0, len = this.skeleton.slots.length; i < len; i++) {\r\n const slot = this.skeleton.slots[i];\r\n const name = slot.currentSpriteName || slot.currentMeshName || \"\";\r\n const target = slot.currentSprite || slot.currentMesh;\r\n if(name.endsWith(nameSuffix)){\r\n target.parentGroup = group;\r\n list_n.push(target);\r\n }else if(outGroup && target){\r\n target.parentGroup = outGroup;\r\n list_d.push(target);\r\n }\r\n }\r\n return [list_d,list_n];\r\n };\r\n\r\n destroy(options?: PIXI.DestroyOptions | boolean): void {\r\n for (let i = 0, n = this.skeleton.slots.length; i < n; i++) {\r\n let slot = this.skeleton.slots[i];\r\n for (let name in slot.meshes) {\r\n slot.meshes[name].destroy(options);\r\n }\r\n slot.meshes = null;\r\n\r\n for (let name in slot.sprites) {\r\n slot.sprites[name].destroy(options);\r\n }\r\n slot.sprites = null;\r\n }\r\n\r\n for (let i = 0, n = this.slotContainers.length; i < n; i++) {\r\n this.slotContainers[i].destroy(options);\r\n }\r\n this.spineData = null;\r\n this.skeleton = null;\r\n this.slotContainers = null;\r\n this.stateData = null;\r\n this.state = null;\r\n this.tempClipContainers = null;\r\n\r\n super.destroy(options);\r\n }\r\n }\r\n\r\n function SlotContainerUpdateTransformV3() {\r\n let pt = this.parent.worldTransform;\r\n let wt = this.worldTransform;\r\n let lt = this.localTransform;\r\n wt.a = lt.a * pt.a + lt.b * pt.c;\r\n wt.b = lt.a * pt.b + lt.b * pt.d;\r\n wt.c = lt.c * pt.a + lt.d * pt.c;\r\n wt.d = lt.c * pt.b + lt.d * pt.d;\r\n wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx;\r\n wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty;\r\n this.worldAlpha = this.alpha * this.parent.worldAlpha;\r\n this._currentBounds = null;\r\n }\r\n}\r\n","namespace pixi_spine {\r\n (PIXI as any).spine = pixi_spine;\r\n\r\n // texture patch for v5\r\n\r\n const TextureProto = PIXI.Texture.prototype as any;\r\n\r\n if (!TextureProto._updateUvs) {\r\n TextureProto._updateUvs = TextureProto.updateUvs;\r\n }\r\n}\r\n","declare namespace PIXI.loaders {\r\n export interface IMetadata {\r\n spineSkeletonScale?: number;\r\n spineAtlas?: any;\r\n spineAtlasSuffix?: string;\r\n spineAtlasFile?: string;\r\n spineMetadata?: any;\r\n imageNamePrefix?: string;\r\n atlasRawData?: string;\r\n imageLoader?: any;\r\n images?: any;\r\n imageMetadata?: any;\r\n image?: any;\r\n }\r\n}\r\n\r\nnamespace pixi_spine {\r\n const Resource = PIXI.loaders.Resource;\r\n\r\n function isJson(resource: any) {\r\n return resource.type == Resource.TYPE.JSON;\r\n }\r\n\r\n function isBuffer(resource: any) {\r\n return resource.xhrType == Resource.XHR_RESPONSE_TYPE.BUFFER;\r\n }\r\n\r\n Resource.setExtensionXhrType('skel', Resource.XHR_RESPONSE_TYPE.BUFFER);\r\n\r\n export function atlasParser() {\r\n return function atlasParser(resource: PIXI.loaders.Resource, next: () => any) {\r\n // skip if no data, its not json, or it isn't atlas data\r\n if (!resource.data) {\r\n return next();\r\n }\r\n\r\n const isJsonSpineModel = isJson(resource) && resource.data.bones;\r\n const isBinarySpineModel = isBuffer(resource) && (resource.extension === 'skel' || resource.metadata.spineMetadata);\r\n\r\n if (!isJsonSpineModel && !isBinarySpineModel) {\r\n return next();\r\n }\r\n\r\n let parser: any = null;\r\n let dataToParse = resource.data;\r\n\r\n if (isJsonSpineModel) {\r\n parser = new core.SkeletonJson(null);\r\n } else {\r\n parser = new core.SkeletonBinary(null);\r\n if (resource.data instanceof ArrayBuffer) {\r\n dataToParse = new Uint8Array(resource.data);\r\n }\r\n }\r\n\r\n const metadata = resource.metadata || {};\r\n const metadataSkeletonScale = metadata ? resource.metadata.spineSkeletonScale : null;\r\n\r\n if (metadataSkeletonScale) {\r\n parser.scale = metadataSkeletonScale;\r\n }\r\n\r\n const metadataAtlas = metadata ? resource.metadata.spineAtlas : null;\r\n if (metadataAtlas === false) {\r\n return next();\r\n }\r\n if (metadataAtlas && metadataAtlas.pages) {\r\n //its an atlas!\r\n parser.attachmentLoader = new core.AtlasAttachmentLoader(metadataAtlas);\r\n resource.spineData = parser.readSkeletonData(dataToParse);\r\n resource.spineAtlas = metadataAtlas;\r\n\r\n return next();\r\n }\r\n\r\n const metadataAtlasSuffix = metadata.spineAtlasSuffix || '.atlas';\r\n\r\n /**\r\n * use a bit of hackery to load the atlas file, here we assume that the .json, .atlas and .png files\r\n * that correspond to the spine file are in the same base URL and that the .json and .atlas files\r\n * have the same name\r\n */\r\n let atlasPath = resource.url;\r\n let queryStringPos = atlasPath.indexOf('?');\r\n if (queryStringPos > 0) {\r\n //remove querystring\r\n atlasPath = atlasPath.substr(0, queryStringPos)\r\n }\r\n atlasPath = atlasPath.substr(0, atlasPath.lastIndexOf('.')) + metadataAtlasSuffix;\r\n // use atlas path as a params. (no need to use same atlas file name with json file name)\r\n if (resource.metadata && resource.metadata.spineAtlasFile) {\r\n atlasPath = resource.metadata.spineAtlasFile;\r\n }\r\n\r\n //remove the baseUrl\r\n atlasPath = atlasPath.replace(this.baseUrl, '');\r\n\r\n const atlasOptions = {\r\n crossOrigin: resource.crossOrigin,\r\n xhrType: Resource.XHR_RESPONSE_TYPE.TEXT,\r\n metadata: metadata.spineMetadata || null,\r\n parentResource: resource\r\n };\r\n const imageOptions = {\r\n crossOrigin: resource.crossOrigin,\r\n metadata: metadata.imageMetadata || null,\r\n parentResource: resource\r\n };\r\n let baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);\r\n //remove the baseUrl\r\n baseUrl = baseUrl.replace(this.baseUrl, '');\r\n\r\n const namePrefix = metadata.imageNamePrefix || (resource.name + '_atlas_page_');\r\n\r\n const adapter = metadata.images ? staticImageLoader(metadata.images)\r\n : metadata.image ? staticImageLoader({ 'default': metadata.image })\r\n : metadata.imageLoader ? metadata.imageLoader(this, namePrefix, baseUrl, imageOptions)\r\n : imageLoaderAdapter(this, namePrefix, baseUrl, imageOptions);\r\n\r\n const createSkeletonWithRawAtlas = function (rawData: string) {\r\n new core.TextureAtlas(rawData, adapter, function (spineAtlas) {\r\n if (spineAtlas) {\r\n parser.attachmentLoader = new core.AtlasAttachmentLoader(spineAtlas);\r\n resource.spineData = parser.readSkeletonData(dataToParse);\r\n resource.spineAtlas = spineAtlas;\r\n }\r\n next();\r\n });\r\n };\r\n\r\n if (resource.metadata && resource.metadata.atlasRawData) {\r\n createSkeletonWithRawAtlas(resource.metadata.atlasRawData)\r\n } else {\r\n this.add(resource.name + '_atlas', atlasPath, atlasOptions, function (atlasResource: any) {\r\n if (!atlasResource.error) {\r\n createSkeletonWithRawAtlas(atlasResource.data);\r\n } else {\r\n next();\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n export function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any) {\r\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\r\n baseUrl += '/';\r\n }\r\n return function (line: string, callback: (baseTexture: PIXI.BaseTexture) => any) {\r\n const name = namePrefix + line;\r\n const url = baseUrl + line;\r\n\r\n const cachedResource = loader.resources[name];\r\n if (cachedResource) {\r\n function done() {\r\n callback(cachedResource.texture.baseTexture)\r\n }\r\n\r\n if (cachedResource.texture) {\r\n done();\r\n }\r\n else {\r\n cachedResource.onAfterMiddleware.add(done);\r\n }\r\n } else {\r\n loader.add(name, url, imageOptions, (resource: PIXI.loaders.Resource) => {\r\n if (!resource.error) {\r\n callback(resource.texture.baseTexture);\r\n } else {\r\n callback(null);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n export function syncImageLoaderAdapter(baseUrl: any, crossOrigin: any) {\r\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\r\n baseUrl += '/';\r\n }\r\n return function (line: any, callback: any) {\r\n callback(PIXI.BaseTexture.fromImage(line, crossOrigin));\r\n }\r\n }\r\n\r\n export function staticImageLoader(pages: { [key: string]: (PIXI.BaseTexture | PIXI.Texture) }) {\r\n return function (line: any, callback: any) {\r\n let page = pages[line] || pages['default'] as any;\r\n if (page && page.baseTexture)\r\n callback(page.baseTexture);\r\n else\r\n callback(page);\r\n }\r\n }\r\n\r\n if (PIXI.loaders.Loader) {\r\n PIXI.loaders.Loader.addPixiMiddleware(atlasParser);\r\n PIXI.loader.use(atlasParser());\r\n }\r\n}\r\n"]} \ No newline at end of file +{"version":3,"file":"pixi-spine.js","sourceRoot":"","sources":["../src/core/Animation.ts","../src/core/AnimationState.ts","../src/core/AnimationStateData.ts","../src/core/AtlasAttachmentLoader.ts","../src/core/BlendMode.ts","../src/core/Bone.ts","../src/core/BoneData.ts","../src/core/Constraint.ts","../src/core/Event.ts","../src/core/EventData.ts","../src/core/IkConstraint.ts","../src/core/IkConstraintData.ts","../src/core/PathConstraint.ts","../src/core/PathConstraintData.ts","../src/core/Skeleton.ts","../src/core/SkeletonBinary.ts","../src/core/SkeletonBounds.ts","../src/core/SkeletonClipping.ts","../src/core/SkeletonData.ts","../src/core/SkeletonJson.ts","../src/core/Skin.ts","../src/core/Slot.ts","../src/core/SlotData.ts","../src/core/Texture.ts","../src/core/TextureAtlas.ts","../src/core/TransformConstraint.ts","../src/core/TransformConstraintData.ts","../src/core/Triangulator.ts","../src/core/Updatable.ts","../src/core/Utils.ts","../src/core/VertexEffect.ts","../src/core/attachments/Attachment.ts","../src/core/attachments/AttachmentLoader.ts","../src/core/attachments/AttachmentType.ts","../src/core/attachments/BoundingBoxAttachment.ts","../src/core/attachments/ClippingAttachment.ts","../src/core/attachments/MeshAttachment.ts","../src/core/attachments/PathAttachment.ts","../src/core/attachments/PointAttachment.ts","../src/core/attachments/RegionAttachment.ts","../src/core/vertexeffects/JitterEffect.ts","../src/core/vertexeffects/SwirlEffect.ts","../src/polyfills.ts","../src/Spine.ts","../src/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,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;;gBAE3B,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,CAAA;IACL,CAAC;IARe,4BAAiB,oBAQhC,CAAA;IAED,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QACrB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;KAClC;AACL,CAAC,EAvLS,UAAU,KAAV,UAAU,QAuLnB","sourcesContent":["/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated May 1, 2019. Replaces all prior versions.\n *\n * Copyright (c) 2013-2019, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\n * or otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\n * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\n * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class Animation {\n name: string;\n timelines: Array;\n duration: number;\n\n constructor (name: string, timelines: Array, duration: number) {\n if (name == null) throw new Error(\"name cannot be null.\");\n if (timelines == null) throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.duration = duration;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0) lastTime %= this.duration;\n }\n\n let timelines = this.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n }\n\n static binarySearch (values: ArrayLike, target: number, step: number = 1) {\n let low = 0;\n let high = values.length / step - 2;\n if (high == 0) return step;\n let current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high) return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n }\n\n static linearSearch (values: ArrayLike, target: number, step: number) {\n for (let i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target) return i;\n return -1;\n }\n }\n\n export interface Timeline {\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void;\n getPropertyId (): number;\n }\n\n export enum MixBlend {\n setup,\n first,\n replace,\n add\n }\n\n export enum MixDirection {\n mixIn, mixOut\n }\n\n export enum TimelineType {\n rotate, translate, scale, shear,\n attachment, color, deform,\n event, drawOrder,\n ikConstraint, transformConstraint,\n pathConstraintPosition, pathConstraintSpacing, pathConstraintMix,\n twoColor\n }\n\n export abstract class CurveTimeline implements Timeline {\n static LINEAR = 0; static STEPPED = 1; static BEZIER = 2;\n static BEZIER_SIZE = 10 * 2 - 1;\n\n private curves: ArrayLike; // type, x, y, ...\n\n abstract getPropertyId(): number;\n\n constructor (frameCount: number) {\n if (frameCount <= 0) throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n\n getFrameCount () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n }\n\n setLinear (frameIndex: number) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n }\n\n setStepped (frameIndex: number) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n }\n\n getCurveType (frameIndex: number): number {\n let index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length) return CurveTimeline.LINEAR;\n let type = this.curves[index];\n if (type == CurveTimeline.LINEAR) return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED) return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n }\n\n /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.\n * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of\n * the difference between the keyframe's values. */\n setCurve (frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\n let tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n let dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n let ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n let dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\n let curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n\n let x = dfx, y = dfy;\n for (let n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n }\n\n getCurvePercent (frameIndex: number, percent: number) {\n percent = MathUtils.clamp(percent, 0, 1);\n let curves = this.curves;\n let i = frameIndex * CurveTimeline.BEZIER_SIZE;\n let type = curves[i];\n if (type == CurveTimeline.LINEAR) return percent;\n if (type == CurveTimeline.STEPPED) return 0;\n i++;\n let x = 0;\n for (let start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n let prevX: number, prevY: number;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n } else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n let y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1.\n }\n\n abstract apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void;\n }\n\n export class RotateTimeline extends CurveTimeline {\n static ENTRIES = 2;\n static PREV_TIME = -2; static PREV_ROTATION = -1;\n static ROTATION = 1;\n\n boneIndex: number;\n frames: ArrayLike; // time, degrees, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount << 1);\n }\n\n getPropertyId () {\n return (TimelineType.rotate << 24) + this.boneIndex;\n }\n\n /** Sets the time and angle of the specified keyframe. */\n setFrame (frameIndex: number, time: number, degrees: number) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active) return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation;\n return;\n case MixBlend.first:\n let r = bone.data.rotation - bone.rotation;\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n }\n return;\n }\n\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame.\n let r = frames[frames.length + RotateTimeline.PREV_ROTATION];\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + r * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r += bone.data.rotation - bone.rotation;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; // Wrap within -180 and 180.\n case MixBlend.add:\n bone.rotation += r * alpha;\n }\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent((frame >> 1) - 1,\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n\n let r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r += bone.data.rotation - bone.rotation;\n case MixBlend.add:\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n }\n }\n }\n\n export class TranslateTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_X = -2; static PREV_Y = -1;\n static X = 1; static Y = 2;\n\n boneIndex: number;\n frames: ArrayLike; // time, x, y, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n }\n\n getPropertyId () {\n return (TimelineType.translate << 24) + this.boneIndex;\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, x: number, y: number) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active) return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case MixBlend.first:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n\n let x = 0, y = 0;\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame.\n x = frames[frames.length + TranslateTimeline.PREV_X];\n y = frames[frames.length + TranslateTimeline.PREV_Y];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n x = frames[frame + TranslateTimeline.PREV_X];\n y = frames[frame + TranslateTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case MixBlend.add:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n }\n }\n\n export class ScaleTimeline extends TranslateTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n getPropertyId () {\n return (TimelineType.scale << 24) + this.boneIndex;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active) return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case MixBlend.first:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n\n let x = 0, y = 0;\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame.\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n x = frames[frame + ScaleTimeline.PREV_X];\n y = frames[frame + ScaleTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\n }\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n } else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n } else {\n let bx = 0, by = 0;\n if (direction == MixDirection.mixOut) {\n switch (blend) {\n case MixBlend.setup:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.add:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bone.data.scaleX) * alpha;\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - bone.data.scaleY) * alpha;\n }\n } else {\n switch (blend) {\n case MixBlend.setup:\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.add:\n bx = MathUtils.signum(x);\n by = MathUtils.signum(y);\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\n }\n }\n }\n }\n }\n\n export class ShearTimeline extends TranslateTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n getPropertyId () {\n return (TimelineType.shear << 24) + this.boneIndex;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n\n let bone = skeleton.bones[this.boneIndex];\n if (!bone.active) return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case MixBlend.first:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n\n let x = 0, y = 0;\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame.\n x = frames[frames.length + ShearTimeline.PREV_X];\n y = frames[frames.length + ShearTimeline.PREV_Y];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n x = frames[frame + ShearTimeline.PREV_X];\n y = frames[frame + ShearTimeline.PREV_Y];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case MixBlend.add:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n }\n }\n\n export class ColorTimeline extends CurveTimeline {\n static ENTRIES = 5;\n static PREV_TIME = -5; static PREV_R = -4; static PREV_G = -3; static PREV_B = -2; static PREV_A = -1;\n static R = 1; static G = 2; static B = 3; static A = 4;\n\n slotIndex: number;\n frames: ArrayLike; // time, r, g, b, a, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n }\n\n getPropertyId () {\n return (TimelineType.color << 24) + this.slotIndex;\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active) return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n return;\n case MixBlend.first:\n let color = slot.color, setup = slot.data.color;\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,\n (setup.a - color.a) * alpha);\n }\n return;\n }\n\n let r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n if (alpha == 1)\n slot.color.set(r, g, b, a);\n else {\n let color = slot.color;\n if (blend == MixBlend.setup) color.setFromColor(slot.data.color);\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n }\n }\n }\n\n export class TwoColorTimeline extends CurveTimeline {\n static ENTRIES = 8;\n static PREV_TIME = -8; static PREV_R = -7; static PREV_G = -6; static PREV_B = -5; static PREV_A = -4;\n static PREV_R2 = -3; static PREV_G2 = -2; static PREV_B2 = -1;\n static R = 1; static G = 2; static B = 3; static A = 4; static R2 = 5; static G2 = 6; static B2 = 7;\n\n slotIndex: number;\n frames: ArrayLike; // time, r, g, b, a, r2, g2, b2, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\n }\n\n getPropertyId () {\n return (TimelineType.twoColor << 24) + this.slotIndex;\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number) {\n frameIndex *= TwoColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TwoColorTimeline.R] = r;\n this.frames[frameIndex + TwoColorTimeline.G] = g;\n this.frames[frameIndex + TwoColorTimeline.B] = b;\n this.frames[frameIndex + TwoColorTimeline.A] = a;\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active) return;\n let frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n slot.darkColor.setFromColor(slot.data.darkColor);\n return;\n case MixBlend.first:\n let light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha,\n (setupLight.a - light.a) * alpha);\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\n }\n return;\n }\n\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n r = frames[i + TwoColorTimeline.PREV_R];\n g = frames[i + TwoColorTimeline.PREV_G];\n b = frames[i + TwoColorTimeline.PREV_B];\n a = frames[i + TwoColorTimeline.PREV_A];\n r2 = frames[i + TwoColorTimeline.PREV_R2];\n g2 = frames[i + TwoColorTimeline.PREV_G2];\n b2 = frames[i + TwoColorTimeline.PREV_B2];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\n r = frames[frame + TwoColorTimeline.PREV_R];\n g = frames[frame + TwoColorTimeline.PREV_G];\n b = frames[frame + TwoColorTimeline.PREV_B];\n a = frames[frame + TwoColorTimeline.PREV_A];\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\n\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\n }\n if (alpha == 1) {\n slot.color.set(r, g, b, a);\n slot.darkColor.set(r2, g2, b2, 1);\n } else {\n let light = slot.color, dark = slot.darkColor;\n if (blend == MixBlend.setup) {\n light.setFromColor(slot.data.color);\n dark.setFromColor(slot.data.darkColor);\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\n }\n }\n }\n\n export class AttachmentTimeline implements Timeline {\n slotIndex: number;\n frames: ArrayLike // time, ...\n attachmentNames: Array;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n\n getPropertyId () {\n return (TimelineType.attachment << 24) + this.slotIndex;\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, attachmentName: string) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active) return;\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\n let attachmentName = slot.data.attachmentName;\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n return;\n }\n\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first) {\n let attachmentName = slot.data.attachmentName;\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n return;\n }\n\n let frameIndex = 0;\n if (time >= frames[frames.length - 1]) // Time is after last frame.\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n\n let attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n }\n }\n\n let zeros : ArrayLike = null;\n\n export class DeformTimeline extends CurveTimeline {\n slotIndex: number;\n attachment: VertexAttachment;\n frames: ArrayLike; // time, ...\n frameVertices: Array>;\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount);\n this.frameVertices = new Array>(frameCount);\n if (zeros == null) zeros = Utils.newFloatArray(64);\n }\n\n getPropertyId () {\n return (TimelineType.deform << 27) + + this.attachment.id + this.slotIndex;\n }\n\n /** Sets the time of the specified keyframe. */\n setFrame (frameIndex: number, time: number, vertices: ArrayLike) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let slot: Slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active) return;\n let slotAttachment: Attachment = slot.getAttachment();\n if (!(slotAttachment instanceof VertexAttachment) || !((slotAttachment).deformAttachment == this.attachment)) return;\n\n let deformArray: Array = slot.deform;\n if (deformArray.length == 0) blend = MixBlend.setup;\n\n let frameVertices = this.frameVertices;\n let vertexCount = frameVertices[0].length;\n\n let frames = this.frames;\n if (time < frames[0]) {\n let vertexAttachment = slotAttachment;\n switch (blend) {\n case MixBlend.setup:\n deformArray.length = 0;\n return;\n case MixBlend.first:\n if (alpha == 1) {\n deformArray.length = 0;\n break;\n }\n let deform: Array = Utils.setArraySize(deformArray, vertexCount);\n if (vertexAttachment.bones == null) {\n // Unweighted vertex positions.\n let setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\n } else {\n // Weighted deform offsets.\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform[i] *= alpha;\n }\n }\n return;\n }\n\n let deform: Array = Utils.setArraySize(deformArray, vertexCount);\n if (time >= frames[frames.length - 1]) { // Time is after last frame.\n let lastVertices = frameVertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n let vertexAttachment = slotAttachment as VertexAttachment;\n if (vertexAttachment.bones == null) {\n // Unweighted vertex positions, with alpha.\n let setupVertices = vertexAttachment.vertices;\n for (let i = 0; i < vertexCount; i++) {\n deform[i] += lastVertices[i] - setupVertices[i];\n }\n } else {\n // Weighted deform offsets, with alpha.\n for (let i = 0; i < vertexCount; i++)\n deform[i] += lastVertices[i];\n }\n } else {\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n }\n } else {\n switch (blend) {\n case MixBlend.setup: {\n let vertexAttachment = slotAttachment as VertexAttachment;\n if (vertexAttachment.bones == null) {\n // Unweighted vertex positions, with alpha.\n let setupVertices = vertexAttachment.vertices;\n for (let i = 0; i < vertexCount; i++) {\n let setup = setupVertices[i];\n deform[i] = setup + (lastVertices[i] - setup) * alpha;\n }\n } else {\n // Weighted deform offsets, with alpha.\n for (let i = 0; i < vertexCount; i++)\n deform[i] = lastVertices[i] * alpha;\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (let i = 0; i < vertexCount; i++)\n deform[i] += (lastVertices[i] - deform[i]) * alpha;\n case MixBlend.add:\n let vertexAttachment = slotAttachment as VertexAttachment;\n if (vertexAttachment.bones == null) {\n // Unweighted vertex positions, with alpha.\n let setupVertices = vertexAttachment.vertices;\n for (let i = 0; i < vertexCount; i++) {\n deform[i] += (lastVertices[i] - setupVertices[i]) * alpha;\n }\n } else {\n // Weighted deform offsets, with alpha.\n for (let i = 0; i < vertexCount; i++)\n deform[i] += lastVertices[i] * alpha;\n }\n }\n }\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time);\n let prevVertices = frameVertices[frame - 1];\n let nextVertices = frameVertices[frame];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n let vertexAttachment = slotAttachment as VertexAttachment;\n if (vertexAttachment.bones == null) {\n // Unweighted vertex positions, with alpha.\n let setupVertices = vertexAttachment.vertices;\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n deform[i] += prev + (nextVertices[i] - prev) * percent - setupVertices[i];\n }\n } else {\n // Weighted deform offsets, with alpha.\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n deform[i] += prev + (nextVertices[i] - prev) * percent;\n }\n }\n } else {\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n deform[i] = prev + (nextVertices[i] - prev) * percent;\n }\n }\n } else {\n switch (blend) {\n case MixBlend.setup: {\n let vertexAttachment = slotAttachment as VertexAttachment;\n if (vertexAttachment.bones == null) {\n // Unweighted vertex positions, with alpha.\n let setupVertices = vertexAttachment.vertices;\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i], setup = setupVertices[i];\n deform[i] = setup + (prev + (nextVertices[i] - prev) * percent - setup) * alpha;\n }\n } else {\n // Weighted deform offsets, with alpha.\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n deform[i] = (prev + (nextVertices[i] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n deform[i] += (prev + (nextVertices[i] - prev) * percent - deform[i]) * alpha;\n }\n break;\n case MixBlend.add:\n let vertexAttachment = slotAttachment as VertexAttachment;\n if (vertexAttachment.bones == null) {\n // Unweighted vertex positions, with alpha.\n let setupVertices = vertexAttachment.vertices;\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n deform[i] += (prev + (nextVertices[i] - prev) * percent - setupVertices[i]) * alpha;\n }\n } else {\n // Weighted deform offsets, with alpha.\n for (let i = 0; i < vertexCount; i++) {\n let prev = prevVertices[i];\n deform[i] += (prev + (nextVertices[i] - prev) * percent) * alpha;\n }\n }\n }\n }\n }\n }\n\n export class EventTimeline implements Timeline {\n frames: ArrayLike; // time, ...\n events: Array;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n\n getPropertyId () {\n return TimelineType.event << 24;\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time of the specified keyframe. */\n setFrame (frameIndex: number, event: Event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n }\n\n /** Fires events for frames > lastTime and <= time. */\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n if (firedEvents == null) return;\n let frames = this.frames;\n let frameCount = this.frames.length;\n\n if (lastTime > time) { // Fire events after last time for looped animations.\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n } else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame.\n return;\n if (time < frames[0]) return; // Time is before first frame.\n\n let frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n let frameTime = frames[frame];\n while (frame > 0) { // Fire multiple events with the same frame.\n if (frames[frame - 1] != frameTime) break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n }\n }\n\n export class DrawOrderTimeline implements Timeline {\n frames: ArrayLike; // time, ...\n drawOrders: Array>;\n\n constructor (frameCount: number) {\n this.frames = Utils.newFloatArray(frameCount);\n this.drawOrders = new Array>(frameCount);\n }\n\n getPropertyId () {\n return TimelineType.drawOrder << 24;\n }\n\n getFrameCount () {\n return this.frames.length;\n }\n\n /** Sets the time of the specified keyframe.\n * @param drawOrder May be null to use bind pose draw order. */\n setFrame (frameIndex: number, time: number, drawOrder: Array) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let drawOrder: Array = skeleton.drawOrder;\n let slots: Array = skeleton.slots;\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n\n let frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first) Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n\n let frame = 0;\n if (time >= frames[frames.length - 1]) // Time is after last frame.\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n\n let drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n }\n }\n\n export class IkConstraintTimeline extends CurveTimeline {\n static ENTRIES = 6;\n static PREV_TIME = -6; static PREV_MIX = -5; static PREV_SOFTNESS = -4; static PREV_BEND_DIRECTION = -3; static PREV_COMPRESS = -2; static PREV_STRETCH = -1;\n static MIX = 1; static SOFTNESS = 2; static BEND_DIRECTION = 3; static COMPRESS = 4; static STRETCH = 5;\n\n ikConstraintIndex: number;\n frames: ArrayLike; // time, mix, softness, bendDirection, compress, stretch, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n }\n\n getPropertyId () {\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\n }\n\n /** Sets the time, mix, softness, and bend direction of the specified keyframe. */\n setFrame (frameIndex: number, time: number, mix: number, softness: number, bendDirection: number, compress: boolean, stretch: boolean) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n let constraint: IkConstraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active) return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n return;\n case MixBlend.first:\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n return;\n }\n\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame.\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n } else {\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n return;\n }\n\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n let mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n let softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n } else {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n } else {\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n }\n }\n\n export class TransformConstraintTimeline extends CurveTimeline {\n static ENTRIES = 5;\n static PREV_TIME = -5; static PREV_ROTATE = -4; static PREV_TRANSLATE = -3; static PREV_SCALE = -2; static PREV_SHEAR = -1;\n static ROTATE = 1; static TRANSLATE = 2; static SCALE = 3; static SHEAR = 4;\n\n transformConstraintIndex: number;\n frames: ArrayLike; // time, rotate mix, translate mix, scale mix, shear mix, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n }\n\n getPropertyId () {\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\n }\n\n /** Sets the time and mixes of the specified keyframe. */\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n\n let constraint: TransformConstraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active) return;\n if (time < frames[0]) {\n let data = constraint.data;\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\n }\n return;\n }\n\n let rotate = 0, translate = 0, scale = 0, shear = 0;\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame.\n let i = frames.length;\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\n }\n if (blend == MixBlend.setup) {\n let data = constraint.data;\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\n } else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\n }\n }\n }\n\n export class PathConstraintPositionTimeline extends CurveTimeline {\n static ENTRIES = 2;\n static PREV_TIME = -2; static PREV_VALUE = -1;\n static VALUE = 1;\n\n pathConstraintIndex: number;\n\n frames: ArrayLike; // time, position, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n }\n\n getPropertyId () {\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\n }\n\n /** Sets the time and value of the specified keyframe. */\n setFrame (frameIndex: number, time: number, value: number) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active) return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.position = constraint.data.position;\n return;\n case MixBlend.first:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n\n let position = 0;\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) // Time is after last frame.\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\n else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n }\n }\n\n export class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {\n constructor (frameCount: number) {\n super(frameCount);\n }\n\n getPropertyId () {\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active) return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.spacing = constraint.data.spacing;\n return;\n case MixBlend.first:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n\n let spacing = 0;\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) // Time is after last frame.\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\n else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\n }\n\n if (blend == MixBlend.setup)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n }\n }\n\n export class PathConstraintMixTimeline extends CurveTimeline {\n static ENTRIES = 3;\n static PREV_TIME = -3; static PREV_ROTATE = -2; static PREV_TRANSLATE = -1;\n static ROTATE = 1; static TRANSLATE = 2;\n\n pathConstraintIndex: number;\n\n frames: ArrayLike; // time, rotate mix, translate mix, ...\n\n constructor (frameCount: number) {\n super(frameCount);\n this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n }\n\n getPropertyId () {\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\n }\n\n /** Sets the time and mixes of the specified keyframe. */\n setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n }\n\n apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection) {\n let frames = this.frames;\n let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active) return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = constraint.data.rotateMix;\n constraint.translateMix = constraint.data.translateMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\n }\n return;\n }\n\n let rotate = 0, translate = 0;\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame.\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\n } else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n let frameTime = frames[frame];\n let percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1,\n 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\n }\n\n if (blend == MixBlend.setup) {\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\n } else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n }\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class AnimationState {\n static emptyAnimation = new Animation(\"\", [], 0);\n static SUBSEQUENT = 0;\n static FIRST = 1;\n static HOLD = 2;\n static HOLD_MIX = 3;\n static NOT_LAST = 4;\n\n data: AnimationStateData;\n tracks = new Array();\n events = new Array();\n listeners = new Array();\n queue = new EventQueue(this);\n propertyIDs = new IntSet();\n animationsChanged = false;\n timeScale = 1;\n\n trackEntryPool = new Pool(() => new TrackEntry());\n\n constructor (data: AnimationStateData) {\n this.data = data;\n }\n\n update (delta: number) {\n delta *= this.timeScale;\n let tracks = this.tracks;\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (current == null) continue;\n\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n\n let currentDelta = delta * current.timeScale;\n\n if (current.delay > 0) {\n current.delay -= currentDelta;\n if (current.delay > 0) continue;\n currentDelta = -current.delay;\n current.delay = 0;\n }\n\n let next = current.next;\n if (next != null) {\n // When the next entry's delay is passed, change to the next entry, preserving leftover time.\n let nextTime = current.trackLast - next.delay;\n if (nextTime >= 0) {\n next.delay = 0;\n next.trackTime = current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\n current.trackTime += currentDelta;\n this.setCurrent(i, next, true);\n while (next.mixingFrom != null) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n } else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\n tracks[i] = null;\n this.queue.end(current);\n this.disposeNext(current);\n continue;\n }\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\n // End mixing from entries once all have completed.\n let from = current.mixingFrom;\n current.mixingFrom = null;\n if (from != null) from.mixingTo = null;\n while (from != null) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n\n current.trackTime += currentDelta;\n }\n\n this.queue.drain();\n }\n\n updateMixingFrom (to: TrackEntry, delta: number): boolean {\n let from = to.mixingFrom;\n if (from == null) return true;\n\n let finished = this.updateMixingFrom(from, delta);\n\n from.animationLast = from.nextAnimationLast;\n from.trackLast = from.nextTrackLast;\n\n // Require mixTime > 0 to ensure the mixing from entry was applied at least once.\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\n // Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\n to.mixingFrom = from.mixingFrom;\n if (from.mixingFrom != null) from.mixingFrom.mixingTo = to;\n to.interruptAlpha = from.interruptAlpha;\n this.queue.end(from);\n }\n return finished;\n }\n\n from.trackTime += delta * from.timeScale;\n to.mixTime += delta;\n return false;\n }\n\n apply (skeleton: Skeleton) : boolean {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged) this._animationsChanged();\n\n let events = this.events;\n let tracks = this.tracks;\n let applied = false;\n\n for (let i = 0, n = tracks.length; i < n; i++) {\n let current = tracks[i];\n if (current == null || current.delay > 0) continue;\n applied = true;\n let blend: MixBlend = i == 0 ? MixBlend.first : current.mixBlend;\n\n // Apply mixing from entries first.\n let mix = current.alpha;\n if (current.mixingFrom != null)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && current.next == null)\n mix = 0;\n\n // Apply current entry.\n let animationLast = current.animationLast, animationTime = current.getAnimationTime();\n let timelineCount = current.animation.timelines.length;\n let timelines = current.animation.timelines;\n if ((i == 0 && mix == 1) || blend == MixBlend.add) {\n for (let ii = 0; ii < timelineCount; ii++) {\n // Fixes issue #302 on IOS9 where mix, blend sometimes became undefined and caused assets\n // to sometimes stop rendering when using color correction, as their RGBA values become NaN.\n // (https://github.com/pixijs/pixi-spine/issues/302)\n Utils.webkit602BugfixHelper(mix, blend);\n timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, MixDirection.mixIn);\n }\n } else {\n let timelineMode = current.timelineMode;\n\n let firstFrame = current.timelinesRotation.length == 0;\n if (firstFrame) Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\n let timelinesRotation = current.timelinesRotation;\n\n for (let ii = 0; ii < timelineCount; ii++) {\n let timeline = timelines[ii];\n let timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : MixBlend.setup;\n if (timeline instanceof RotateTimeline) {\n this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\n } else {\n // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\n Utils.webkit602BugfixHelper(mix, blend);\n timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, MixDirection.mixIn);\n }\n }\n }\n this.queueEvents(current, animationTime);\n events.length = 0;\n current.nextAnimationLast = animationTime;\n current.nextTrackLast = current.trackTime;\n }\n\n this.queue.drain();\n return applied;\n }\n\n applyMixingFrom (to: TrackEntry, skeleton: Skeleton, blend: MixBlend) {\n let from = to.mixingFrom;\n if (from.mixingFrom != null) this.applyMixingFrom(from, skeleton, blend);\n\n let mix = 0;\n if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.\n mix = 1;\n if (blend == MixBlend.first) blend = MixBlend.setup;\n } else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1) mix = 1;\n if (blend != MixBlend.first) blend = from.mixBlend;\n }\n\n let events = mix < from.eventThreshold ? this.events : null;\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n let animationLast = from.animationLast, animationTime = from.getAnimationTime();\n let timelineCount = from.animation.timelines.length;\n let timelines = from.animation.timelines;\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n if (blend == MixBlend.add) {\n for (let i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, MixDirection.mixOut);\n } else {\n let timelineMode = from.timelineMode;\n let timelineHoldMix = from.timelineHoldMix;\n\n let firstFrame = from.timelinesRotation.length == 0;\n if (firstFrame) Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\n let timelinesRotation = from.timelinesRotation;\n\n from.totalAlpha = 0;\n for (let i = 0; i < timelineCount; i++) {\n let timeline = timelines[i];\n let direction = MixDirection.mixOut;\n let timelineBlend: MixBlend;\n let alpha = 0;\n switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) {\n case AnimationState.SUBSEQUENT:\n if (!attachments && timeline instanceof AttachmentTimeline) {\n if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) continue;\n blend = MixBlend.setup;\n }\n if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case AnimationState.FIRST:\n timelineBlend = MixBlend.setup;\n alpha = alphaMix;\n break;\n case AnimationState.HOLD:\n timelineBlend = MixBlend.setup;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = MixBlend.setup;\n let holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (timeline instanceof RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\n else {\n // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\n Utils.webkit602BugfixHelper(alpha, blend);\n if (timelineBlend == MixBlend.setup) {\n if (timeline instanceof AttachmentTimeline) {\n if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) direction = MixDirection.mixIn;\n } else if (timeline instanceof DrawOrderTimeline) {\n if (drawOrder) direction = MixDirection.mixIn;\n }\n }\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\n }\n }\n }\n\n if (to.mixDuration > 0) this.queueEvents(from, animationTime);\n this.events.length = 0;\n from.nextAnimationLast = animationTime;\n from.nextTrackLast = from.trackTime;\n\n return mix;\n }\n\n applyRotateTimeline (timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend,\n timelinesRotation: Array, i: number, firstFrame: boolean) {\n\n if (firstFrame) timelinesRotation[i] = 0;\n\n if (alpha == 1) {\n timeline.apply(skeleton, 0, time, null, 1, blend, MixDirection.mixIn);\n return;\n }\n\n let rotateTimeline = timeline as RotateTimeline;\n let frames = rotateTimeline.frames;\n let bone = skeleton.bones[rotateTimeline.boneIndex];\n if (!bone.active) return;\n let r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case MixBlend.first:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n } else {\n r1 = blend == MixBlend.setup ? bone.data.rotation : bone.rotation;\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) // Time is after last frame.\n r2 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION];\n else {\n // Interpolate between the previous frame and the current frame.\n let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n let frameTime = frames[frame];\n let percent = rotateTimeline.getCurvePercent((frame >> 1) - 1,\n 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n\n r2 = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n r2 = prevRotation + r2 * percent + bone.data.rotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n }\n }\n\n // Mix between rotations using the direction of the shortest route on the first frame while detecting crosses.\n let total = 0, diff = r2 - r1;\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n } else {\n let lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n } else {\n lastTotal = timelinesRotation[i]; // Angle and direction of mix, including loops.\n lastDiff = timelinesRotation[i + 1]; // Difference between bones.\n }\n let current = diff > 0, dir = lastTotal >= 0;\n // Detect cross at 0 (not 180).\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n // A cross after a 360 rotation is a loop.\n if (Math.abs(lastTotal) > 180) lastTotal += 360 * MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360; // Store loops as part of lastTotal.\n if (dir != current) total += 360 * MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n r1 += total * alpha;\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\n }\n\n queueEvents (entry: TrackEntry, animationTime: number) {\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n let duration = animationEnd - animationStart;\n let trackLastWrapped = entry.trackLast % duration;\n\n // Queue events before complete.\n let events = this.events;\n let i = 0, n = events.length;\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < trackLastWrapped) break;\n if (event.time > animationEnd) continue; // Discard events outside animation start/end.\n this.queue.event(entry, event);\n }\n\n // Queue complete if completed a loop iteration or the animation.\n let complete = false;\n if (entry.loop)\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\n else\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\n if (complete) this.queue.complete(entry);\n\n // Queue events after complete.\n for (; i < n; i++) {\n let event = events[i];\n if (event.time < animationStart) continue; // Discard events outside animation start/end.\n this.queue.event(entry, events[i]);\n }\n }\n\n clearTracks () {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++)\n this.clearTrack(i);\n this.tracks.length = 0;\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n\n clearTrack (trackIndex: number) {\n if (trackIndex >= this.tracks.length) return;\n let current = this.tracks[trackIndex];\n if (current == null) return;\n\n this.queue.end(current);\n\n this.disposeNext(current);\n\n let entry = current;\n while (true) {\n let from = entry.mixingFrom;\n if (from == null) break;\n this.queue.end(from);\n entry.mixingFrom = null;\n entry.mixingTo = null;\n entry = from;\n }\n\n this.tracks[current.trackIndex] = null;\n\n this.queue.drain();\n }\n\n setCurrent (index: number, current: TrackEntry, interrupt: boolean) {\n let from = this.expandToIndex(index);\n this.tracks[index] = current;\n\n if (from != null) {\n if (interrupt) this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n\n // Store the interrupted mix percentage.\n if (from.mixingFrom != null && from.mixDuration > 0)\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\n\n from.timelinesRotation.length = 0; // Reset rotation for mixing out, in case entry was mixed in.\n }\n\n this.queue.start(current);\n }\n\n setAnimation (trackIndex: number, animationName: string, loop: boolean) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null) throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n }\n\n setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) {\n if (animation == null) throw new Error(\"animation cannot be null.\");\n let interrupt = true;\n let current = this.expandToIndex(trackIndex);\n if (current != null) {\n if (current.nextTrackLast == -1) {\n // Don't mix from an entry that was never applied.\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.disposeNext(current);\n current = current.mixingFrom;\n interrupt = false;\n } else\n this.disposeNext(current);\n }\n let entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n }\n\n addAnimation (trackIndex: number, animationName: string, loop: boolean, delay: number) {\n let animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null) throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n }\n\n addAnimationWith (trackIndex: number, animation: Animation, loop: boolean, delay: number) {\n if (animation == null) throw new Error(\"animation cannot be null.\");\n\n let last = this.expandToIndex(trackIndex);\n if (last != null) {\n while (last.next != null)\n last = last.next;\n }\n\n let entry = this.trackEntry(trackIndex, animation, loop, last);\n\n if (last == null) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n } else {\n last.next = entry;\n if (delay <= 0) {\n let duration = last.animationEnd - last.animationStart;\n if (duration != 0) {\n if (last.loop)\n delay += duration * (1 + ((last.trackTime / duration) | 0));\n else\n delay += Math.max(duration, last.trackTime);\n delay -= this.data.getMix(last.animation, animation);\n } else\n delay = last.trackTime;\n }\n }\n\n entry.delay = delay;\n return entry;\n }\n\n setEmptyAnimation (trackIndex: number, mixDuration: number) {\n let entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n\n addEmptyAnimation (trackIndex: number, mixDuration: number, delay: number) {\n if (delay <= 0) delay -= mixDuration;\n let entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n }\n\n setEmptyAnimations (mixDuration: number) {\n let oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let current = this.tracks[i];\n if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n }\n\n expandToIndex (index: number) {\n if (index < this.tracks.length) return this.tracks[index];\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n }\n\n trackEntry (trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry) {\n let entry = this.trackEntryPool.obtain();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n\n entry.eventThreshold = 0;\n entry.attachmentThreshold = 0;\n entry.drawOrderThreshold = 0;\n\n entry.animationStart = 0;\n entry.animationEnd = animation.duration;\n entry.animationLast = -1;\n entry.nextAnimationLast = -1;\n\n entry.delay = 0;\n entry.trackTime = 0;\n entry.trackLast = -1;\n entry.nextTrackLast = -1;\n entry.trackEnd = Number.MAX_VALUE;\n entry.timeScale = 1;\n\n entry.alpha = 1;\n entry.interruptAlpha = 1;\n entry.mixTime = 0;\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\n return entry;\n }\n\n disposeNext (entry: TrackEntry) {\n let next = entry.next;\n while (next != null) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n }\n\n _animationsChanged () {\n this.animationsChanged = false;\n\n this.propertyIDs.clear();\n\n for (let i = 0, n = this.tracks.length; i < n; i++) {\n let entry = this.tracks[i];\n if (entry == null) continue;\n while (entry.mixingFrom != null)\n entry = entry.mixingFrom;\n\n do {\n if (entry.mixingFrom == null || entry.mixBlend != MixBlend.add) this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry != null)\n }\n\n this.propertyIDs.clear();\n for (let i = this.tracks.length - 1; i >= 0; i--) {\n let entry = this.tracks[i];\n while (entry != null) {\n this.computeNotLast(entry);\n entry = entry.mixingFrom;\n }\n }\n }\n\n computeHold (entry: TrackEntry) {\n let to = entry.mixingTo;\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = Utils.setArraySize(entry.timelineMode, timelinesCount);\n entry.timelineHoldMix.length = 0;\n let timelineDipMix = Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\n let propertyIDs = this.propertyIDs;\n\n if (to != null && to.holdPrevious) {\n for (let i = 0; i < timelinesCount; i++) {\n propertyIDs.add(timelines[i].getPropertyId());\n timelineMode[i] = AnimationState.HOLD;\n }\n return;\n }\n\n outer:\n for (let i = 0; i < timelinesCount; i++) {\n let timeline = timelines[i];\n let id = timeline.getPropertyId();\n if (!propertyIDs.add(id))\n timelineMode[i] = AnimationState.SUBSEQUENT;\n else if (to == null || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline\n || timeline instanceof EventTimeline || !this.hasTimeline(to, id)) {\n timelineMode[i] = AnimationState.FIRST;\n } else {\n for (let next = to.mixingTo; next != null; next = next.mixingTo) {\n if (this.hasTimeline(next, id)) continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = AnimationState.HOLD_MIX;\n timelineDipMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = AnimationState.HOLD;\n }\n }\n }\n\n computeNotLast (entry: TrackEntry) {\n let timelines = entry.animation.timelines;\n let timelinesCount = entry.animation.timelines.length;\n let timelineMode = entry.timelineMode;\n let propertyIDs = this.propertyIDs;\n\n for (let i = 0; i < timelinesCount; i++) {\n if (timelines[i] instanceof AttachmentTimeline) {\n let timeline = timelines[i] as AttachmentTimeline;\n if (!propertyIDs.add(timeline.slotIndex)) timelineMode[i] |= AnimationState.NOT_LAST;\n }\n }\n }\n\n hasTimeline (entry: TrackEntry, id: number) : boolean {\n let timelines = entry.animation.timelines;\n for (let i = 0, n = timelines.length; i < n; i++)\n if (timelines[i].getPropertyId() == id) return true;\n return false;\n }\n\n getCurrent (trackIndex: number) {\n if (trackIndex >= this.tracks.length) return null;\n return this.tracks[trackIndex];\n }\n\n addListener (listener: AnimationStateListener2) {\n if (listener == null) throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n }\n\n /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */\n removeListener (listener: AnimationStateListener2) {\n let index = this.listeners.indexOf(listener);\n if (index >= 0) this.listeners.splice(index, 1);\n }\n\n clearListeners () {\n this.listeners.length = 0;\n }\n\n clearListenerNotifications () {\n this.queue.clear();\n }\n\n //deprecated stuff\n onComplete: (trackIndex: number, loopCount: number) => any;\n onEvent: (trackIndex: number, event: Event) => any;\n onStart: (trackIndex: number) => any;\n onEnd: (trackIndex: number) => any;\n\n private static deprecatedWarning1: boolean = false;\n\n setAnimationByName(trackIndex: number, animationName: string, loop: boolean) {\n if (!AnimationState.deprecatedWarning1) {\n AnimationState.deprecatedWarning1 = true;\n console.warn(\"Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.\");\n }\n this.setAnimation(trackIndex, animationName, loop);\n }\n\n private static deprecatedWarning2: boolean = false;\n\n addAnimationByName(trackIndex: number, animationName: string, loop: boolean, delay: number) {\n if (!AnimationState.deprecatedWarning2) {\n AnimationState.deprecatedWarning2 = true;\n console.warn(\"Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.\");\n }\n this.addAnimation(trackIndex, animationName, loop, delay);\n }\n\n private static deprecatedWarning3: boolean = false;\n\n hasAnimation(animationName: string): boolean {\n let animation = this.data.skeletonData.findAnimation(animationName);\n return animation !== null;\n }\n\n hasAnimationByName(animationName: string): boolean {\n if (!AnimationState.deprecatedWarning3) {\n AnimationState.deprecatedWarning3 = true;\n console.warn(\"Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.\");\n }\n return this.hasAnimation(animationName);\n }\n }\n\n export class TrackEntry {\n animation: Animation;\n next: TrackEntry; mixingFrom: TrackEntry; mixingTo: TrackEntry;\n listener: AnimationStateListener2;\n trackIndex: number;\n loop: boolean;\n holdPrevious: boolean;\n eventThreshold: number; attachmentThreshold: number; drawOrderThreshold: number;\n animationStart: number; animationEnd: number; animationLast: number; nextAnimationLast: number;\n delay: number; trackTime: number; trackLast: number; nextTrackLast: number; trackEnd: number; timeScale: number;\n alpha: number; mixTime: number; mixDuration: number; interruptAlpha: number; totalAlpha: number;\n mixBlend = MixBlend.replace;\n timelineMode = new Array();\n timelineHoldMix = new Array();\n timelinesRotation = new Array();\n\n reset () {\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.animation = null;\n this.listener = null;\n this.timelineMode.length = 0;\n this.timelineHoldMix.length = 0;\n this.timelinesRotation.length = 0;\n }\n\n getAnimationTime () {\n if (this.loop) {\n let duration = this.animationEnd - this.animationStart;\n if (duration == 0) return this.animationStart;\n return (this.trackTime % duration) + this.animationStart;\n }\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\n }\n\n setAnimationLast(animationLast: number) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n }\n\n isComplete () {\n return this.trackTime >= this.animationEnd - this.animationStart;\n }\n\n resetRotationDirections () {\n this.timelinesRotation.length = 0;\n }\n\n //deprecated stuff\n onComplete: (trackIndex: number, loopCount: number) => any;\n onEvent: (trackIndex: number, event: Event) => any;\n onStart: (trackIndex: number) => any;\n onEnd: (trackIndex: number) => any;\n\n private static deprecatedWarning1: Boolean = false;\n private static deprecatedWarning2: Boolean = false;\n\n get time() {\n if (!TrackEntry.deprecatedWarning1) {\n TrackEntry.deprecatedWarning1 = true;\n console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\n }\n return this.trackTime;\n }\n\n set time(value: number) {\n if (!TrackEntry.deprecatedWarning1) {\n TrackEntry.deprecatedWarning1 = true;\n console.warn(\"Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.\");\n }\n this.trackTime = value;\n }\n\n get endTime() {\n if (!TrackEntry.deprecatedWarning2) {\n TrackEntry.deprecatedWarning2 = true;\n console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\n }\n return this.trackTime;\n }\n\n set endTime(value: number) {\n if (!TrackEntry.deprecatedWarning2) {\n TrackEntry.deprecatedWarning2 = true;\n console.warn(\"Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.\");\n }\n this.trackTime = value;\n }\n\n loopsCount() {\n return Math.floor(this.trackTime / this.trackEnd);\n }\n }\n\n export class EventQueue {\n objects: Array = [];\n drainDisabled = false;\n animState: AnimationState;\n\n constructor(animState: AnimationState) {\n this.animState = animState;\n }\n\n start (entry: TrackEntry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n\n interrupt (entry: TrackEntry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n }\n\n end (entry: TrackEntry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n }\n\n dispose (entry: TrackEntry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n }\n\n complete (entry: TrackEntry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n }\n\n event (entry: TrackEntry, event: Event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n }\n\n private static deprecatedWarning1: Boolean = false;\n\n deprecateStuff() {\n if (!EventQueue.deprecatedWarning1) {\n EventQueue.deprecatedWarning1 = true;\n console.warn(\"Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'\");\n }\n return true;\n }\n\n drain () {\n if (this.drainDisabled) return;\n this.drainDisabled = true;\n\n let objects = this.objects;\n let listeners = this.animState.listeners;\n\n for (let i = 0; i < objects.length; i += 2) {\n let type = objects[i] as EventType;\n let entry = objects[i + 1] as TrackEntry;\n switch (type) {\n case EventType.start:\n if (entry.listener != null && entry.listener.start) entry.listener.start(entry);\n for (let ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].start) listeners[ii].start(entry);\n //deprecation\n entry.onStart && this.deprecateStuff() && entry.onStart(entry.trackIndex);\n this.animState.onStart && this.deprecateStuff() && this.deprecateStuff && this.animState.onStart(entry.trackIndex);\n break;\n case EventType.interrupt:\n if (entry.listener != null && entry.listener.interrupt) entry.listener.interrupt(entry);\n for (let ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].interrupt) listeners[ii].interrupt(entry);\n break;\n case EventType.end:\n if (entry.listener != null && entry.listener.end) entry.listener.end(entry);\n for (let ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].end) listeners[ii].end(entry);\n //deprecation\n entry.onEnd && this.deprecateStuff() && entry.onEnd(entry.trackIndex);\n this.animState.onEnd && this.deprecateStuff() && this.animState.onEnd(entry.trackIndex);\n // Fall through.\n case EventType.dispose:\n if (entry.listener != null && entry.listener.dispose) entry.listener.dispose(entry);\n for (let ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].dispose) listeners[ii].dispose(entry);\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener != null && entry.listener.complete) entry.listener.complete(entry);\n for (let ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].complete) listeners[ii].complete(entry);\n //deprecation\n\n let count = MathUtils.toInt(entry.loopsCount()) ;\n entry.onComplete && this.deprecateStuff() && entry.onComplete(entry.trackIndex, count);\n this.animState.onComplete && this.deprecateStuff() && this.animState.onComplete(entry.trackIndex, count);\n break;\n case EventType.event:\n let event = objects[i++ + 2] as Event;\n if (entry.listener != null && entry.listener.event) entry.listener.event(entry, event);\n for (let ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].event) listeners[ii].event(entry, event);\n //deprecation\n entry.onEvent && this.deprecateStuff() && entry.onEvent(entry.trackIndex, event);\n this.animState.onEvent && this.deprecateStuff() && this.animState.onEvent(entry.trackIndex, event);\n break;\n }\n }\n this.clear();\n\n this.drainDisabled = false;\n }\n\n clear () {\n this.objects.length = 0;\n }\n }\n\n export enum EventType {\n start, interrupt, end, dispose, complete, event\n }\n\n export interface AnimationStateListener2 {\n /** Invoked when this entry has been set as the current entry. */\n start? (entry: TrackEntry): void;\n\n /** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for\n * mixing. */\n interrupt? (entry: TrackEntry): void;\n\n /** Invoked when this entry is no longer the current entry and will never be applied again. */\n end? (entry: TrackEntry): void;\n\n /** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.\n * References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */\n dispose? (entry: TrackEntry): void;\n\n /** Invoked every time this entry's animation completes a loop. */\n complete? (entry: TrackEntry): void;\n\n /** Invoked when this entry's animation triggers an event. */\n event? (entry: TrackEntry, event: Event): void;\n }\n\n export abstract class AnimationStateAdapter2 implements AnimationStateListener2 {\n start (entry: TrackEntry) {\n }\n\n interrupt (entry: TrackEntry) {\n }\n\n end (entry: TrackEntry) {\n }\n\n dispose (entry: TrackEntry) {\n }\n\n complete (entry: TrackEntry) {\n }\n\n event (entry: TrackEntry, event: Event) {\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class AnimationStateData {\n skeletonData: SkeletonData;\n animationToMixTime: Map = {};\n defaultMix = 0;\n\n constructor(skeletonData: SkeletonData) {\n if (skeletonData == null) throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n\n setMix(fromName: string, toName: string, duration: number) {\n let from = this.skeletonData.findAnimation(fromName);\n if (from == null) throw new Error(\"Animation not found: \" + fromName);\n let to = this.skeletonData.findAnimation(toName);\n if (to == null) throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n }\n\n private static deprecatedWarning1: boolean = false;\n\n setMixByName(fromName: string, toName: string, duration: number) {\n if (!AnimationStateData.deprecatedWarning1) {\n AnimationStateData.deprecatedWarning1 = true;\n console.warn(\"Deprecation Warning: AnimationStateData.setMixByName is deprecated, please use setMix from now on.\");\n }\n this.setMix(fromName, toName, duration);\n }\n\n setMixWith(from: Animation, to: Animation, duration: number) {\n if (from == null) throw new Error(\"from cannot be null.\");\n if (to == null) throw new Error(\"to cannot be null.\");\n let key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n }\n\n getMix(from: Animation, to: Animation) {\n let key = from.name + \".\" + to.name;\n let value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class AtlasAttachmentLoader implements AttachmentLoader {\n atlas: TextureAtlas;\n\n constructor(atlas: TextureAtlas) {\n this.atlas = atlas;\n }\n\n /** @return May be null to not load an attachment. */\n newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment {\n let region = this.atlas.findRegion(path);\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n let attachment = new RegionAttachment(name);\n attachment.region = region;\n return attachment;\n }\n\n /** @return May be null to not load an attachment. */\n newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment {\n let region = this.atlas.findRegion(path);\n if (region == null) throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n let attachment = new MeshAttachment(name);\n attachment.region = region;\n return attachment;\n }\n\n /** @return May be null to not load an attachment. */\n newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment {\n return new BoundingBoxAttachment(name);\n }\n\n /** @return May be null to not load an attachment */\n newPathAttachment(skin: Skin, name: string): PathAttachment {\n return new PathAttachment(name);\n }\n\n newPointAttachment(skin: Skin, name: string): PointAttachment {\n return new PointAttachment(name);\n }\n\n newClippingAttachment(skin: Skin, name: string): ClippingAttachment {\n return new ClippingAttachment(name);\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export enum BlendMode {\n Normal = 0,\n Additive = 1,\n Multiply = 2,\n Screen = 3\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class Bone implements Updatable {\n static yDown: boolean = false;\n //be careful! Spine b,c is c,b in pixi matrix\n matrix = new PIXI.Matrix();\n\n get worldX(): number {\n return this.matrix.tx;\n }\n\n get worldY(): number {\n return this.matrix.ty;\n }\n\n data: BoneData;\n skeleton: Skeleton;\n parent: Bone;\n children = new Array();\n x = 0;\n y = 0;\n rotation = 0;\n scaleX = 0;\n scaleY = 0;\n shearX = 0;\n shearY = 0;\n ax = 0;\n ay = 0;\n arotation = 0;\n ascaleX = 0;\n ascaleY = 0;\n ashearX = 0;\n ashearY = 0;\n appliedValid = false;\n\n sorted = false;\n active = false;\n\n /** @param parent May be null. */\n constructor(data: BoneData, skeleton: Skeleton, parent: Bone) {\n if (data == null) throw new Error(\"data cannot be null.\");\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.skeleton = skeleton;\n this.parent = parent;\n this.setToSetupPose();\n }\n\n isActive () {\n return this.active;\n }\n\n /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */\n update() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n\n /** Computes the world transform using the parent bone and this bone's local transform. */\n updateWorldTransform() {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n }\n\n /** Computes the world transform using the parent bone and the specified local transform. */\n updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number) {\n this.ax = x;\n this.ay = y;\n this.arotation = rotation;\n this.ascaleX = scaleX;\n this.ascaleY = scaleY;\n this.ashearX = shearX;\n this.ashearY = shearY;\n this.appliedValid = true;\n\n let parent = this.parent;\n let m = this.matrix;\n\n let sx = this.skeleton.scaleX;\n let sy = Bone.yDown? -this.skeleton.scaleY : this.skeleton.scaleY;\n\n if (parent == null) { // Root bone.\n let skeleton = this.skeleton;\n let rotationY = rotation + 90 + shearY;\n m.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n m.c = MathUtils.cosDeg(rotationY) * scaleY * sx;\n m.b = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n m.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\n m.tx = x * sx + skeleton.x;\n m.ty = y * sy + skeleton.y;\n return;\n }\n\n let pa = parent.matrix.a, pb = parent.matrix.c, pc = parent.matrix.b, pd = parent.matrix.d;\n m.tx = pa * x + pb * y + parent.matrix.tx;\n m.ty = pc * x + pd * y + parent.matrix.ty;\n switch (this.data.transformMode) {\n case TransformMode.Normal: {\n let rotationY = rotation + 90 + shearY;\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\n let ld = MathUtils.sinDeg(rotationY) * scaleY;\n m.a = pa * la + pb * lc;\n m.c = pa * lb + pb * ld;\n m.b = pc * la + pd * lc;\n m.d = pc * lb + pd * ld;\n return;\n }\n case TransformMode.OnlyTranslation: {\n let rotationY = rotation + 90 + shearY;\n m.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\n m.c = MathUtils.cosDeg(rotationY) * scaleY;\n m.b = MathUtils.sinDeg(rotation + shearX) * scaleX;\n m.d = MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case TransformMode.NoRotationOrReflection: {\n let s = pa * pa + pc * pc;\n let prx = 0;\n if (s > 0.0001) {\n s = Math.abs(pa * pd - pb * pc) / s;\n pb = pc * s;\n pd = pa * s;\n prx = Math.atan2(pc, pa) * MathUtils.radDeg;\n } else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\n }\n let rx = rotation + shearX - prx;\n let ry = rotation + shearY - prx + 90;\n let la = MathUtils.cosDeg(rx) * scaleX;\n let lb = MathUtils.cosDeg(ry) * scaleY;\n let lc = MathUtils.sinDeg(rx) * scaleX;\n let ld = MathUtils.sinDeg(ry) * scaleY;\n m.a = pa * la - pb * lc;\n m.c = pa * lb - pb * ld;\n m.b = pc * la + pd * lc;\n m.d = pc * lb + pd * ld;\n break;\n }\n case TransformMode.NoScale:\n case TransformMode.NoScaleOrReflection: {\n let cos = MathUtils.cosDeg(rotation);\n let sin = MathUtils.sinDeg(rotation);\n let za = (pa * cos + pb * sin) / sx;\n let zc = (pc * cos + pd * sin) / sy;\n let s = Math.sqrt(za * za + zc * zc);\n if (s > 0.00001) s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (\n this.data.transformMode == TransformMode.NoScale\n && (pa * pd - pb * pc < 0) != (Bone.yDown?\n (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) :\n (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n ) s = -s;\n let r = Math.PI / 2 + Math.atan2(zc, za);\n let zb = Math.cos(r) * s;\n let zd = Math.sin(r) * s;\n let la = MathUtils.cosDeg(shearX) * scaleX;\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\n let lc = MathUtils.sinDeg(shearX) * scaleX;\n let ld = MathUtils.sinDeg(90 + shearY) * scaleY;\n m.a = za * la + zb * lc;\n m.c = za * lb + zb * ld;\n m.b = zc * la + zd * lc;\n m.d = zc * lb + zd * ld;\n break;\n }\n }\n m.a *= sx;\n m.c *= sx;\n m.b *= sy;\n m.d *= sy;\n }\n\n setToSetupPose() {\n let data = this.data;\n this.x = data.x;\n this.y = data.y;\n this.rotation = data.rotation;\n this.scaleX = data.scaleX;\n this.scaleY = data.scaleY;\n this.shearX = data.shearX;\n this.shearY = data.shearY;\n }\n\n getWorldRotationX() {\n return Math.atan2(this.matrix.b, this.matrix.a) * MathUtils.radDeg;\n }\n\n getWorldRotationY() {\n return Math.atan2(this.matrix.d, this.matrix.c) * MathUtils.radDeg;\n }\n\n getWorldScaleX() {\n let m = this.matrix;\n return Math.sqrt(m.a * m.a + m.c * m.c);\n }\n\n getWorldScaleY() {\n let m = this.matrix;\n return Math.sqrt(m.b * m.b + m.d * m.d);\n }\n\n /** Computes the individual applied transform values from the world transform. This can be useful to perform processing using\n * the applied transform after the world transform has been modified directly (eg, by a constraint).\n *

\n * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */\n updateAppliedTransform() {\n this.appliedValid = true;\n let parent = this.parent;\n let m = this.matrix;\n if (parent == null) {\n this.ax = m.tx;\n this.ay = m.ty;\n this.arotation = Math.atan2(m.b, m.a) * MathUtils.radDeg;\n this.ascaleX = Math.sqrt(m.a * m.a + m.b * m.b);\n this.ascaleY = Math.sqrt(m.c * m.c + m.d * m.d);\n this.ashearX = 0;\n this.ashearY = Math.atan2(m.a * m.c + m.b * m.d, m.a * m.d - m.b * m.c) * MathUtils.radDeg;\n return;\n }\n let pm = parent.matrix;\n let pid = 1 / (pm.a * pm.d - pm.b * pm.c);\n let dx = m.tx - pm.tx, dy = m.ty - pm.ty;\n this.ax = (dx * pm.d * pid - dy * pm.c * pid);\n this.ay = (dy * pm.a * pid - dx * pm.b * pid);\n let ia = pid * pm.d;\n let id = pid * pm.a;\n let ib = pid * pm.c;\n let ic = pid * pm.b;\n let ra = ia * m.a - ib * m.b;\n let rb = ia * m.c - ib * m.d;\n let rc = id * m.b - ic * m.a;\n let rd = id * m.d - ic * m.c;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 0.0001) {\n let det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\n } else {\n this.ascaleX = 0;\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\n this.ashearY = 0;\n this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\n }\n }\n\n worldToLocal(world: Vector2) {\n let m = this.matrix;\n let a = m.a, b = m.c, c = m.b, d = m.d;\n let invDet = 1 / (a * d - b * c);\n let x = world.x - m.tx, y = world.y - m.ty;\n world.x = (x * d * invDet - y * b * invDet);\n world.y = (y * a * invDet - x * c * invDet);\n return world;\n }\n\n localToWorld(local: Vector2) {\n let m = this.matrix;\n let x = local.x, y = local.y;\n local.x = x * m.a + y * m.c + m.tx;\n local.y = x * m.b + y * m.d + m.ty;\n return local;\n }\n\n worldToLocalRotation (worldRotation: number) {\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\n let mat = this.matrix;\n return Math.atan2(mat.a * sin - mat.b * cos, mat.d * cos - mat.c * sin) * MathUtils.radDeg;\n }\n\n localToWorldRotation (localRotation: number) {\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\n let mat = this.matrix;\n return Math.atan2(cos * mat.b + sin * mat.d, cos * mat.a + sin * mat.c) * MathUtils.radDeg;\n }\n\n rotateWorld (degrees: number) {\n let mat = this.matrix;\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\n mat.a = cos * a - sin * c;\n mat.c = cos * b - sin * d;\n mat.b = sin * a + cos * c;\n mat.d = sin * b + cos * d;\n this.appliedValid = false;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class BoneData {\n index: number;\n name: string;\n parent: BoneData;\n length: number;\n x = 0;\n y = 0;\n rotation = 0;\n scaleX = 1;\n scaleY = 1;\n shearX = 0;\n shearY = 0;\n transformMode = TransformMode.Normal;\n skinRequired = false;\n\n color = new Color();\n\n constructor(index: number, name: string, parent: BoneData) {\n if (index < 0) throw new Error(\"index must be >= 0.\");\n if (name == null) throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n }\n\n export enum TransformMode {\n Normal, OnlyTranslation, NoRotationOrReflection, NoScale, NoScaleOrReflection\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export abstract class ConstraintData {\n constructor(public name: string, public order: number, public skinRequired: boolean) { }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class Event {\n data: EventData;\n intValue: number;\n floatValue: number;\n stringValue: string;\n time: number;\n volume: number;\n balance: number;\n\n\n constructor(time: number, data: EventData) {\n if (data == null) throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class EventData {\n name: string;\n intValue: number;\n floatValue: number;\n stringValue: string;\n audioPath: string;\n volume: number;\n balance: number;\n\n constructor (name: string) {\n this.name = name;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class IkConstraint implements Updatable {\n data: IkConstraintData;\n bones: Array;\n target: Bone;\n bendDirection = 0;\n compress = false;\n stretch = false;\n mix = 1;\n softness = 0;\n active = false;\n\n constructor (data: IkConstraintData, skeleton: Skeleton) {\n if (data == null) throw new Error(\"data cannot be null.\");\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mix = data.mix;\n this.softness = data.softness;\n this.bendDirection = data.bendDirection;\n this.compress = data.compress;\n this.stretch = data.stretch;\n\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n\n isActive () {\n return this.active;\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let target = this.target;\n let bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\n break;\n }\n }\n\n /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world\n * coordinate system. */\n apply1 (bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number) {\n if (!bone.appliedValid) bone.updateAppliedTransform();\n let p = bone.parent.matrix;\n let id = 1 / (p.a * p.d - p.b * p.c);\n let x = targetX - p.tx, y = targetY - p.ty;\n let tx = (x * p.d - y * p.c) * id - bone.ax, ty = (y * p.a - x * p.b) * id - bone.ay;\n let rotationIK = Math.atan2(ty, tx) * MathUtils.radDeg - bone.ashearX - bone.arotation;\n if (bone.ascaleX < 0) rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180) rotationIK += 360;\n let sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\n let s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform) sy *= s;\n }\n }\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX,\n bone.ashearY);\n }\n\n /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The\n * target is specified in the world coordinate system.\n * @param child A direct descendant of the parent bone. */\n apply2 (parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, softness: number, alpha: number) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid) parent.updateAppliedTransform();\n if (!child.appliedValid) child.updateAppliedTransform();\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\n let pmat = parent.matrix;\n let os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n } else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n } else\n os2 = 0;\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d;\n let u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + pmat.tx;\n cwy = c * cx + pmat.ty;\n } else {\n cy = child.ay;\n cwx = a * cx + b * cy + pmat.tx;\n cwy = c * cx + d * cy + pmat.ty;\n }\n let pp = parent.parent.matrix;\n a = pp.a;\n b = pp.c;\n c = pp.b;\n d = pp.d;\n let id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty;\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 0.0001) {\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n return;\n }\n x = targetX - pp.tx;\n y = targetY - pp.ty;\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n let dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) / 2;\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n let p = Math.min(1, sd / (softness * 2)) - 1;\n p = (sd - softness * (1 - p * p)) / td;\n tx -= p * tx;\n ty -= p * ty;\n dd = tx * tx + ty * ty;\n }\n }\n outer:\n if (u) {\n l2 *= psx;\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) {\n cos = 1;\n if (stretch) sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n }\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n } else {\n a = psx * l2;\n b = psy * l2;\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n let c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n let q = Math.sqrt(d);\n if (c1 < 0) q = -q;\n q = -(c1 + q) / 2;\n let r0 = q / c2, r1 = c / q;\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\n c = -a * l1 / (aa - bb);\n if (c >= -1 && c <= 1) {\n c = Math.acos(c);\n x = a * Math.cos(c) + l1;\n y = b * Math.sin(c);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = c;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = c;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n } else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n let os = Math.atan2(cy, cx) * s2;\n let rotation = parent.arotation;\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180) a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180) a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class IkConstraintData extends ConstraintData {\n bones = new Array();\n target: BoneData;\n bendDirection = 1;\n compress = false;\n stretch = false;\n uniform = false;\n mix = 1;\n softness = 0;\n\n constructor (name: string) {\n super(name, 0, false);\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class PathConstraint implements Updatable {\n static NONE = -1; static BEFORE = -2; static AFTER = -3;\n static epsilon = 0.00001;\n\n data: PathConstraintData;\n bones: Array;\n target: Slot;\n position = 0; spacing = 0; rotateMix = 0; translateMix = 0;\n\n spaces = new Array(); positions = new Array();\n world = new Array(); curves = new Array(); lengths = new Array();\n segments = new Array();\n\n active = false;\n\n constructor (data: PathConstraintData, skeleton: Skeleton) {\n if (data == null) throw new Error(\"data cannot be null.\");\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (let i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n\n isActive () {\n return this.active;\n }\n\n apply () {\n this.update();\n }\n\n update () {\n let attachment = this.target.getAttachment();\n if (!(attachment instanceof PathAttachment)) return;\n\n let rotateMix = this.rotateMix, translateMix = this.translateMix;\n let translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate) return;\n\n let data = this.data;\n let spacingMode = data.spacingMode;\n let lengthSpacing = spacingMode == SpacingMode.Length;\n let rotateMode = data.rotateMode;\n let tangents = rotateMode == RotateMode.Tangent, scale = rotateMode == RotateMode.ChainScale;\n let boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n let bones = this.bones;\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths: Array = null;\n let spacing = this.spacing;\n if (scale || lengthSpacing) {\n if (scale) lengths = Utils.setArraySize(this.lengths, boneCount);\n for (let i = 0, n = spacesCount - 1; i < n;) {\n let bone = bones[i];\n let setupLength = bone.data.length;\n if (setupLength < PathConstraint.epsilon) {\n if (scale) lengths[i] = 0;\n spaces[++i] = 0;\n } else {\n let x = setupLength * bone.matrix.a, y = setupLength * bone.matrix.b;\n let length = Math.sqrt(x * x + y * y);\n if (scale) lengths[i] = length;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\n }\n }\n } else {\n for (let i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents,\n data.positionMode == PositionMode.Percent, spacingMode == SpacingMode.Percent);\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n let tip = false;\n if (offsetRotation == 0)\n tip = rotateMode == RotateMode.Chain;\n else {\n tip = false;\n let p = this.target.bone.matrix;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\n }\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\n let bone = bones[i];\n let mat = bone.matrix;\n mat.tx += (boneX - mat.tx) * translateMix;\n mat.ty += (boneY - mat.ty) * translateMix;\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n let length = lengths[i];\n if (length != 0) {\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * rotateMix + 1;\n mat.a *= s;\n mat.b *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a);\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n let length = bone.data.length;\n boneX += (length * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length * (sin * a + cos * c) - dy) * rotateMix;\n } else {\n r += offsetRotation;\n }\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI) //\n r += MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n mat.a = cos * a - sin * c;\n mat.c = cos * b - sin * d;\n mat.b = sin * a + cos * c;\n mat.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n }\n\n computeWorldPositions (path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean,\n percentSpacing: boolean) {\n let target = this.target;\n let position = this.position;\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world: Array = null;\n let closed = path.closed;\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n\n if (!path.constantSpeed) {\n let lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n let pathLength = lengths[curveCount];\n if (percentPosition) position *= pathLength;\n if (percentSpacing) {\n for (let i = 0; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n world = Utils.setArraySize(this.world, 8);\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i];\n position += space;\n let p = position;\n\n if (closed) {\n p %= pathLength;\n if (p < 0) p += pathLength;\n curve = 0;\n } else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength, world, 0, out, o);\n continue;\n }\n\n // Determine curve containing position.\n for (;; curve++) {\n let length = lengths[curve];\n if (p > length) continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = lengths[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n } else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o,\n tangents || (i > 0 && space == 0));\n }\n return out;\n }\n\n // World vertices.\n if (closed) {\n verticesLength += 2;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n } else {\n curveCount--;\n verticesLength -= 4;\n world = Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n\n // Curve lengths.\n let curves = Utils.setArraySize(this.curves, curveCount);\n let pathLength = 0;\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition) position *= pathLength;\n if (percentSpacing) {\n for (let i = 0; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n\n let segments = this.segments;\n let curveLength = 0;\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n let space = spaces[i];\n position += space;\n let p = position;\n\n if (closed) {\n p %= pathLength;\n if (p < 0) p += pathLength;\n curve = 0;\n } else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n } else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n\n // Determine curve containing position.\n for (;; curve++) {\n let length = curves[curve];\n if (p > length) continue;\n if (curve == 0)\n p /= length;\n else {\n let prev = curves[curve - 1];\n p = (p - prev) / (length - prev);\n }\n break;\n }\n\n // Curve segment lengths.\n if (curve != prevCurve) {\n prevCurve = curve;\n let ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n\n // Weight by segment length.\n p *= curveLength;\n for (;; segment++) {\n let length = segments[segment];\n if (p > length) continue;\n if (segment == 0)\n p /= length;\n else {\n let prev = segments[segment - 1];\n p = segment + (p - prev) / (length - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n\n addBeforePosition (p: number, temp: Array, i: number, out: Array, o: number) {\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n }\n\n addAfterPosition (p: number, temp: Array, i: number, out: Array, o: number) {\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n }\n\n addCurvePosition (p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number,\n out: Array, o: number, tangents: boolean) {\n if (p == 0 || isNaN(p)) p = 0.0001;\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class PathConstraintData extends ConstraintData {\n bones = new Array();\n target: SlotData;\n positionMode: PositionMode;\n spacingMode: SpacingMode;\n rotateMode: RotateMode;\n offsetRotation: number;\n position: number; spacing: number; rotateMix: number; translateMix: number;\n\n constructor (name: string) {\n super(name, 0, false);\n }\n }\n\n export enum PositionMode {\n Fixed, Percent\n }\n\n export enum SpacingMode {\n Length, Fixed, Percent\n }\n\n export enum RotateMode {\n Tangent, Chain, ChainScale\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class Skeleton {\n data: SkeletonData;\n bones: Array;\n slots: Array;\n drawOrder: Array;\n ikConstraints: Array;\n transformConstraints: Array;\n pathConstraints: Array;\n _updateCache = new Array();\n updateCacheReset = new Array();\n skin: Skin;\n color: Color;\n time = 0;\n scaleX = 1; scaleY = 1;\n x = 0; y = 0;\n\n constructor (data: SkeletonData) {\n if (data == null) throw new Error(\"data cannot be null.\");\n this.data = data;\n\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++) {\n let boneData = data.bones[i];\n let bone: Bone;\n if (boneData.parent == null)\n bone = new Bone(boneData, this, null);\n else {\n let parent = this.bones[boneData.parent.index];\n bone = new Bone(boneData, this, parent);\n parent.children.push(bone);\n }\n this.bones.push(bone);\n }\n\n this.slots = new Array();\n this.drawOrder = new Array();\n for (let i = 0; i < data.slots.length; i++) {\n let slotData = data.slots[i];\n let bone = this.bones[slotData.boneData.index];\n let slot = new Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n\n this.ikConstraints = new Array();\n for (let i = 0; i < data.ikConstraints.length; i++) {\n let ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\n }\n\n this.transformConstraints = new Array();\n for (let i = 0; i < data.transformConstraints.length; i++) {\n let transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\n }\n\n this.pathConstraints = new Array();\n for (let i = 0; i < data.pathConstraints.length; i++) {\n let pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\n }\n\n this.color = new Color(1, 1, 1, 1);\n this.updateCache();\n }\n\n updateCache () {\n let updateCache = this._updateCache;\n updateCache.length = 0;\n this.updateCacheReset.length = 0;\n\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n\n if (this.skin != null) {\n let skinBones = this.skin.bones;\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\n let bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone != null);\n }\n }\n\n // IK first, lowest hierarchy depth first.\n let ikConstraints = this.ikConstraints;\n let transformConstraints = this.transformConstraints;\n let pathConstraints = this.pathConstraints;\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n let constraintCount = ikCount + transformCount + pathCount;\n\n outer:\n for (let i = 0; i < constraintCount; i++) {\n for (let ii = 0; ii < ikCount; ii++) {\n let constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < transformCount; ii++) {\n let constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (let ii = 0; ii < pathCount; ii++) {\n let constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n\n for (let i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n }\n\n sortIkConstraint (constraint: IkConstraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active) return;\n\n let target = constraint.target;\n this.sortBone(target);\n\n let constrained = constraint.bones;\n let parent = constrained[0];\n this.sortBone(parent);\n\n if (constrained.length > 1) {\n let child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\n }\n\n this._updateCache.push(constraint);\n\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n }\n\n sortPathConstraint (constraint: PathConstraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active) return;\n\n let slot = constraint.target;\n let slotIndex = slot.data.index;\n let slotBone = slot.bone;\n if (this.skin != null) this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (let i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n\n let attachment = slot.getAttachment();\n if (attachment instanceof PathAttachment) this.sortPathConstraintAttachmentWith(attachment, slotBone);\n\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n for (let i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n\n this._updateCache.push(constraint);\n\n for (let i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (let i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n }\n\n sortTransformConstraint (constraint: TransformConstraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active) return;\n\n this.sortBone(constraint.target);\n\n let constrained = constraint.bones;\n let boneCount = constrained.length;\n if (constraint.data.local) {\n for (let i = 0; i < boneCount; i++) {\n let child = constrained[i];\n this.sortBone(child.parent);\n if (!(this._updateCache.indexOf(child) > -1)) this.updateCacheReset.push(child);\n }\n } else {\n for (let i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n\n this._updateCache.push(constraint);\n\n for (let ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (let ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n }\n\n sortPathConstraintAttachment (skin: Skin, slotIndex: number, slotBone: Bone) {\n let attachments = skin.attachments[slotIndex];\n if (!attachments) return;\n for (let key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n }\n\n sortPathConstraintAttachmentWith (attachment: Attachment, slotBone: Bone) {\n if (!(attachment instanceof PathAttachment)) return;\n let pathBones = (attachment).bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n let bones = this.bones;\n let i = 0;\n while (i < pathBones.length) {\n let boneCount = pathBones[i++];\n for (let n = i + boneCount; i < n; i++) {\n let boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n }\n\n sortBone (bone: Bone) {\n if (bone.sorted) return;\n let parent = bone.parent;\n if (parent != null) this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n }\n\n sortReset (bones: Array) {\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (!bone.active) continue;\n if (bone.sorted) this.sortReset(bone.children);\n bone.sorted = false;\n }\n }\n\n /** Updates the world transform for each bone and applies constraints. */\n updateWorldTransform () {\n let updateCacheReset = this.updateCacheReset;\n for (let i = 0, n = updateCacheReset.length; i < n; i++) {\n let bone = updateCacheReset[i] as Bone;\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n let updateCache = this._updateCache;\n for (let i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n }\n\n /** Sets the bones, constraints, and slots to their setup pose values. */\n setToSetupPose () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n }\n\n /** Sets the bones and constraints to their setup pose values. */\n setBonesToSetupPose () {\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n let data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n let data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n }\n\n setSlotsToSetupPose () {\n let slots = this.slots;\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (let i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n }\n\n /** @return May return null. */\n getRootBone () {\n if (this.bones.length == 0) return null;\n return this.bones[0];\n }\n\n /** @return May be null. */\n findBone (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.data.name == boneName) return bone;\n }\n return null;\n }\n\n /** @return -1 if the bone was not found. */\n findBoneIndex (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName) return i;\n return -1;\n }\n\n /** @return May be null. */\n findSlot (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) return slot;\n }\n return null;\n }\n\n /** @return -1 if the bone was not found. */\n findSlotIndex (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName) return i;\n return -1;\n }\n\n /** Sets a skin by name.\n * @see #setSkin(Skin) */\n setSkinByName (skinName: string) {\n let skin = this.data.findSkin(skinName);\n if (skin == null) throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n }\n\n /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}.\n * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no\n * old skin, each slot's setup mode attachment is attached from the new skin.\n * @param newSkin May be null. */\n setSkin (newSkin: Skin) {\n if (newSkin == this.skin) return;\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let name = slot.data.attachmentName;\n if (name != null) {\n let attachment: Attachment = newSkin.getAttachment(i, name);\n if (attachment != null) slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n }\n\n /** @return May be null. */\n getAttachmentByName (slotName: string, attachmentName: string): Attachment {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n }\n\n /** @return May be null. */\n getAttachment (slotIndex: number, attachmentName: string): Attachment {\n if (attachmentName == null) throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n let attachment: Attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null) return attachment;\n }\n if (this.data.defaultSkin != null) return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n }\n\n /** @param attachmentName May be null. */\n setAttachment (slotName: string, attachmentName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.data.name == slotName) {\n let attachment: Attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n }\n\n /** @return May be null. */\n findIkConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName) return ikConstraint;\n }\n return null;\n }\n\n /** @return May be null. */\n findTransformConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.data.name == constraintName) return constraint;\n }\n return null;\n }\n\n /** @return May be null. */\n findPathConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.data.name == constraintName) return constraint;\n }\n return null;\n }\n\n /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n * @param offset The distance from the skeleton origin to the bottom left corner of the AABB.\n * @param size The width and height of the AABB.\n * @param temp Working memory */\n getBounds (offset: Vector2, size: Vector2, temp: Array = new Array(2)) {\n if (offset == null) throw new Error(\"offset cannot be null.\");\n if (size == null) throw new Error(\"size cannot be null.\");\n let drawOrder = this.drawOrder;\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = drawOrder[i];\n if (!slot.bone.active) continue;\n let verticesLength = 0;\n let vertices: ArrayLike = null;\n let attachment = slot.getAttachment();\n if (attachment instanceof RegionAttachment) {\n verticesLength = 8;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n (attachment).computeWorldVertices(slot.bone, vertices, 0, 2);\n } else if (attachment instanceof MeshAttachment) {\n let mesh = (attachment);\n verticesLength = mesh.worldVerticesLength;\n vertices = Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices != null) {\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n let x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n }\n\n update (delta: number) {\n this.time += delta;\n }\n\n get flipX(): boolean {\n return this.scaleX == -1;\n }\n\n set flipX(value: boolean) {\n if (!Skeleton.deprecatedWarning1) {\n Skeleton.deprecatedWarning1 = true;\n console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\n }\n this.scaleX = value ? 1.0 : -1.0;\n }\n\n get flipY(): boolean {\n return this.scaleY == -1;\n }\n\n set flipY(value: boolean) {\n if (!Skeleton.deprecatedWarning1) {\n Skeleton.deprecatedWarning1 = true;\n console.warn(\"Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY\");\n }\n this.scaleY = value ? 1.0 : -1.0;\n }\n\n private static deprecatedWarning1: boolean = false;\n }\n}\n","/******************************************************************************\n * Spine Runtimes License Agreement\n * Last updated May 1, 2019. Replaces all prior versions.\n *\n * Copyright (c) 2013-2019, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software\n * or otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN\n * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS\n * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n\texport class SkeletonBinary {\n\t\tstatic AttachmentTypeValues = [ 0 /*AttachmentType.Region*/, 1/*AttachmentType.BoundingBox*/, 2/*AttachmentType.Mesh*/, 3/*AttachmentType.LinkedMesh*/, 4/*AttachmentType.Path*/, 5/*AttachmentType.Point*/, 6/*AttachmentType.Clipping*/ ];\n\t\tstatic TransformModeValues = [TransformMode.Normal, TransformMode.OnlyTranslation, TransformMode.NoRotationOrReflection, TransformMode.NoScale, TransformMode.NoScaleOrReflection];\n\t\tstatic PositionModeValues = [ PositionMode.Fixed, PositionMode.Percent ];\n\t\tstatic SpacingModeValues = [ SpacingMode.Length, SpacingMode.Fixed, SpacingMode.Percent];\n\t\tstatic RotateModeValues = [ RotateMode.Tangent, RotateMode.Chain, RotateMode.ChainScale ];\n\t\tstatic BlendModeValues = [ BlendMode.Normal, BlendMode.Additive, BlendMode.Multiply, BlendMode.Screen];\n\n\t\tstatic BONE_ROTATE = 0;\n\t\tstatic BONE_TRANSLATE = 1;\n\t\tstatic BONE_SCALE = 2;\n\t\tstatic BONE_SHEAR = 3;\n\n\t\tstatic SLOT_ATTACHMENT = 0;\n\t\tstatic SLOT_COLOR = 1;\n\t\tstatic SLOT_TWO_COLOR = 2;\n\n\t\tstatic PATH_POSITION = 0;\n\t\tstatic PATH_SPACING = 1;\n\t\tstatic PATH_MIX = 2;\n\n\t\tstatic CURVE_LINEAR = 0;\n\t\tstatic CURVE_STEPPED = 1;\n\t\tstatic CURVE_BEZIER = 2;\n\n\t\tattachmentLoader: AttachmentLoader;\n\t\tscale = 1;\n\t\tprivate linkedMeshes = new Array();\n\n\t\tconstructor (attachmentLoader: AttachmentLoader) {\n\t\t\tthis.attachmentLoader = attachmentLoader;\n\t\t}\n\n\t\treadSkeletonData (binary: Uint8Array): SkeletonData {\n\t\t\tlet scale = this.scale;\n\n\t\t\tlet skeletonData = new SkeletonData();\n\t\t\tskeletonData.name = \"\"; // BOZO\n\n\t\t\tlet input = new BinaryInput(binary);\n\n\t\t\tskeletonData.hash = input.readString();\n\t\t\tskeletonData.version = input.readString();\n\t\t\tskeletonData.x = input.readFloat();\n\t\t\tskeletonData.y = input.readFloat();\n\t\t\tskeletonData.width = input.readFloat();\n\t\t\tskeletonData.height = input.readFloat();\n\n\t\t\tlet nonessential = input.readBoolean();\n\t\t\tif (nonessential) {\n\t\t\t\tskeletonData.fps = input.readFloat();\n\n\t\t\t\tskeletonData.imagesPath = input.readString();\n\t\t\t\tskeletonData.audioPath = input.readString();\n\t\t\t}\n\n\t\t\tlet n = 0;\n\t\t\t// Strings.\n\t\t\tn = input.readInt(true)\n\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\tinput.strings.push(input.readString());\n\n\t\t\t// Bones.\n\t\t\tn = input.readInt(true)\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tlet name = input.readString();\n\t\t\t\tlet parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n\t\t\t\tlet data = new BoneData(i, name, parent);\n\t\t\t\tdata.rotation = input.readFloat();\n\t\t\t\tdata.x = input.readFloat() * scale;\n\t\t\t\tdata.y = input.readFloat() * scale;\n\t\t\t\tdata.scaleX = input.readFloat();\n\t\t\t\tdata.scaleY = input.readFloat();\n\t\t\t\tdata.shearX = input.readFloat();\n\t\t\t\tdata.shearY = input.readFloat();\n\t\t\t\tdata.length = input.readFloat() * scale;\n\t\t\t\tdata.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\n\t\t\t\tdata.skinRequired = input.readBoolean();\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(data.color, input.readInt32());\n\t\t\t\tskeletonData.bones.push(data);\n\t\t\t}\n\n\t\t\t// Slots.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tlet slotName = input.readString();\n\t\t\t\tlet boneData = skeletonData.bones[input.readInt(true)];\n\t\t\t\tlet data = new SlotData(i, slotName, boneData);\n\t\t\t\tColor.rgba8888ToColor(data.color, input.readInt32());\n\n\t\t\t\tlet darkColor = input.readInt32();\n\t\t\t\tif (darkColor != -1) Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\n\n\t\t\t\tdata.attachmentName = input.readStringRef();\n\t\t\t\tdata.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\n\t\t\t\tskeletonData.slots.push(data);\n\t\t\t}\n\n\t\t\t// IK constraints.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0, nn; i < n; i++) {\n\t\t\t\tlet data = new IkConstraintData(input.readString());\n\t\t\t\tdata.order = input.readInt(true);\n\t\t\t\tdata.skinRequired = input.readBoolean();\n\t\t\t\tnn = input.readInt(true);\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\n\t\t\t\tdata.target = skeletonData.bones[input.readInt(true)];\n\t\t\t\tdata.mix = input.readFloat();\n\t\t\t\tdata.softness = input.readFloat() * scale;\n\t\t\t\tdata.bendDirection = input.readByte();\n\t\t\t\tdata.compress = input.readBoolean();\n\t\t\t\tdata.stretch = input.readBoolean();\n\t\t\t\tdata.uniform = input.readBoolean();\n\t\t\t\tskeletonData.ikConstraints.push(data);\n\t\t\t}\n\n\t\t\t// Transform constraints.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0, nn; i < n; i++) {\n\t\t\t\tlet data = new TransformConstraintData(input.readString());\n\t\t\t\tdata.order = input.readInt(true);\n\t\t\t\tdata.skinRequired = input.readBoolean();\n\t\t\t\tnn = input.readInt(true);\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\n\t\t\t\tdata.target = skeletonData.bones[input.readInt(true)];\n\t\t\t\tdata.local = input.readBoolean();\n\t\t\t\tdata.relative = input.readBoolean();\n\t\t\t\tdata.offsetRotation = input.readFloat();\n\t\t\t\tdata.offsetX = input.readFloat() * scale;\n\t\t\t\tdata.offsetY = input.readFloat() * scale;\n\t\t\t\tdata.offsetScaleX = input.readFloat();\n\t\t\t\tdata.offsetScaleY = input.readFloat();\n\t\t\t\tdata.offsetShearY = input.readFloat();\n\t\t\t\tdata.rotateMix = input.readFloat();\n\t\t\t\tdata.translateMix = input.readFloat();\n\t\t\t\tdata.scaleMix = input.readFloat();\n\t\t\t\tdata.shearMix = input.readFloat();\n\t\t\t\tskeletonData.transformConstraints.push(data);\n\t\t\t}\n\n\t\t\t// Path constraints.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0, nn; i < n; i++) {\n\t\t\t\tlet data = new PathConstraintData(input.readString());\n\t\t\t\tdata.order = input.readInt(true);\n\t\t\t\tdata.skinRequired = input.readBoolean();\n\t\t\t\tnn = input.readInt(true);\n\t\t\t\tfor (let ii = 0; ii < nn; ii++)\n\t\t\t\t\tdata.bones.push(skeletonData.bones[input.readInt(true)]);\n\t\t\t\tdata.target = skeletonData.slots[input.readInt(true)];\n\t\t\t\tdata.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\n\t\t\t\tdata.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\n\t\t\t\tdata.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\n\t\t\t\tdata.offsetRotation = input.readFloat();\n\t\t\t\tdata.position = input.readFloat();\n\t\t\t\tif (data.positionMode == PositionMode.Fixed) data.position *= scale;\n\t\t\t\tdata.spacing = input.readFloat();\n\t\t\t\tif (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\n\t\t\t\tdata.rotateMix = input.readFloat();\n\t\t\t\tdata.translateMix = input.readFloat();\n\t\t\t\tskeletonData.pathConstraints.push(data);\n\t\t\t}\n\n\t\t\t// Default skin.\n\t\t\tlet defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n\t\t\tif (defaultSkin != null) {\n\t\t\t\tskeletonData.defaultSkin = defaultSkin;\n\t\t\t\tskeletonData.skins.push(defaultSkin);\n\t\t\t}\n\n\t\t\t// Skins.\n\t\t\t{\n\t\t\t\tlet i = skeletonData.skins.length;\n\t\t\t\tUtils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n\t\t\t\tfor (; i < n; i++)\n\t\t\t\t\tskeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\n\t\t\t}\n\n\t\t\t// Linked meshes.\n\t\t\tn = this.linkedMeshes.length;\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tlet linkedMesh = this.linkedMeshes[i];\n\t\t\t\tlet skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n\t\t\t\tif (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\n\t\t\t\tlet parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n\t\t\t\tif (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n\t\t\t\tlinkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent as VertexAttachment : linkedMesh.mesh;\n\t\t\t\tlinkedMesh.mesh.setParentMesh(parent as MeshAttachment);\n\t\t\t\t// linkedMesh.mesh.updateUVs();\n\t\t\t}\n\t\t\tthis.linkedMeshes.length = 0;\n\n\t\t\t// Events.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tlet data = new EventData(input.readStringRef());\n\t\t\t\tdata.intValue = input.readInt(false);\n\t\t\t\tdata.floatValue = input.readFloat();\n\t\t\t\tdata.stringValue = input.readString();\n\t\t\t\tdata.audioPath = input.readString();\n\t\t\t\tif (data.audioPath != null) {\n\t\t\t\t\tdata.volume = input.readFloat();\n\t\t\t\t\tdata.balance = input.readFloat();\n\t\t\t\t}\n\t\t\t\tskeletonData.events.push(data);\n\t\t\t}\n\n\t\t\t// Animations.\n\t\t\tn = input.readInt(true);\n\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\tskeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\n\t\t\treturn skeletonData;\n\t\t}\n\n\t\tprivate readSkin (input: BinaryInput, skeletonData: SkeletonData, defaultSkin: boolean, nonessential: boolean): Skin {\n\t\t\tlet skin = new Skin(defaultSkin ? \"default\" : input.readStringRef());\n\n\t\t\tif (!defaultSkin) {\n\t\t\t\tskin.bones.length = input.readInt(true);\n\t\t\t\tfor (let i = 0, n = skin.bones.length; i < n; i++)\n\t\t\t\t\tskin.bones[i] = skeletonData.bones[input.readInt(true)];\n\n\t\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++)\n\t\t\t\t\tskin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n\t\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++)\n\t\t\t\t\tskin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n\t\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++)\n\t\t\t\t\tskin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\n\t\t\t}\n\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet slotIndex = input.readInt(true);\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet name = input.readStringRef();\n\t\t\t\t\tlet attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\n\t\t\t\t\tif (attachment != null) skin.setAttachment(slotIndex, name, attachment);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn skin;\n\t\t}\n\n\t\tprivate readAttachment(input: BinaryInput, skeletonData: SkeletonData, skin: Skin, slotIndex: number, attachmentName: string, nonessential: boolean): Attachment {\n\t\t\tlet scale = this.scale;\n\n\t\t\tlet name = input.readStringRef();\n\t\t\tif (name == null) name = attachmentName;\n\n\t\t\tlet typeIndex = input.readByte();\n\t\t\tlet type = SkeletonBinary.AttachmentTypeValues[typeIndex];\n\t\t\tswitch (type) {\n\t\t\tcase AttachmentType.Region: {\n\t\t\t\tlet path = input.readStringRef();\n\t\t\t\tlet rotation = input.readFloat();\n\t\t\t\tlet x = input.readFloat();\n\t\t\t\tlet y = input.readFloat();\n\t\t\t\tlet scaleX = input.readFloat();\n\t\t\t\tlet scaleY = input.readFloat();\n\t\t\t\tlet width = input.readFloat();\n\t\t\t\tlet height = input.readFloat();\n\t\t\t\tlet color = input.readInt32();\n\n\t\t\t\tif (path == null) path = name;\n\t\t\t\tlet region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n\t\t\t\tif (region == null) return null;\n\t\t\t\tregion.path = path;\n\t\t\t\tregion.x = x * scale;\n\t\t\t\tregion.y = y * scale;\n\t\t\t\tregion.scaleX = scaleX;\n\t\t\t\tregion.scaleY = scaleY;\n\t\t\t\tregion.rotation = rotation;\n\t\t\t\tregion.width = width * scale;\n\t\t\t\tregion.height = height * scale;\n\t\t\t\tColor.rgba8888ToColor(region.color, color);\n\t\t\t\t// region.updateOffset();\n\t\t\t\treturn region;\n\t\t\t}\n\t\t\tcase AttachmentType.BoundingBox: {\n\t\t\t\tlet vertexCount = input.readInt(true);\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\n\n\t\t\t\tlet box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n\t\t\t\tif (box == null) return null;\n\t\t\t\tbox.worldVerticesLength = vertexCount << 1;\n\t\t\t\tbox.vertices = vertices.vertices;\n\t\t\t\tbox.bones = vertices.bones;\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(box.color, color);\n\t\t\t\treturn box;\n\t\t\t}\n\t\t\tcase AttachmentType.Mesh: {\n\t\t\t\tlet path = input.readStringRef();\n\t\t\t\tlet color = input.readInt32();\n\t\t\t\tlet vertexCount = input.readInt(true);\n\t\t\t\tlet uvs = this.readFloatArray(input, vertexCount << 1, 1);\n\t\t\t\tlet triangles = this.readShortArray(input);\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\n\t\t\t\tlet hullLength = input.readInt(true);\n\t\t\t\tlet edges = null;\n\t\t\t\tlet width = 0, height = 0;\n\t\t\t\tif (nonessential) {\n\t\t\t\t\tedges = this.readShortArray(input);\n\t\t\t\t\twidth = input.readFloat();\n\t\t\t\t\theight = input.readFloat();\n\t\t\t\t}\n\n\t\t\t\tif (path == null) path = name;\n\t\t\t\tlet mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n\t\t\t\tif (mesh == null) return null;\n\t\t\t\tmesh.path = path;\n\t\t\t\tColor.rgba8888ToColor(mesh.color, color);\n\t\t\t\tmesh.bones = vertices.bones;\n\t\t\t\tmesh.vertices = vertices.vertices;\n\t\t\t\tmesh.worldVerticesLength = vertexCount << 1;\n\t\t\t\tmesh.triangles = triangles;\n\t\t\t\tmesh.regionUVs = new Float32Array(uvs);\n\t\t\t\t// mesh.updateUVs();\n\t\t\t\tmesh.hullLength = hullLength << 1;\n\t\t\t\tif (nonessential) {\n\t\t\t\t\tmesh.edges = edges;\n\t\t\t\t\tmesh.width = width * scale;\n\t\t\t\t\tmesh.height = height * scale;\n\t\t\t\t}\n\t\t\t\treturn mesh;\n\t\t\t}\n\t\t\tcase AttachmentType.LinkedMesh: {\n\t\t\t\tlet path = input.readStringRef();\n\t\t\t\tlet color = input.readInt32();\n\t\t\t\tlet skinName = input.readStringRef();\n\t\t\t\tlet parent = input.readStringRef();\n\t\t\t\tlet inheritDeform = input.readBoolean();\n\t\t\t\tlet width = 0, height = 0;\n\t\t\t\tif (nonessential) {\n\t\t\t\t\twidth = input.readFloat();\n\t\t\t\t\theight = input.readFloat();\n\t\t\t\t}\n\n\t\t\t\tif (path == null) path = name;\n\t\t\t\tlet mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n\t\t\t\tif (mesh == null) return null;\n\t\t\t\tmesh.path = path;\n\t\t\t\tColor.rgba8888ToColor(mesh.color, color);\n\t\t\t\tif (nonessential) {\n\t\t\t\t\tmesh.width = width * scale;\n\t\t\t\t\tmesh.height = height * scale;\n\t\t\t\t}\n\t\t\t\tthis.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritDeform));\n\t\t\t\treturn mesh;\n\t\t\t}\n\t\t\tcase AttachmentType.Path: {\n\t\t\t\tlet closed = input.readBoolean();\n\t\t\t\tlet constantSpeed = input.readBoolean();\n\t\t\t\tlet vertexCount = input.readInt(true);\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\n\t\t\t\tlet lengths = Utils.newArray(vertexCount / 3, 0);\n\t\t\t\tfor (let i = 0, n = lengths.length; i < n; i++)\n\t\t\t\t\tlengths[i] = input.readFloat() * scale;\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\n\n\t\t\t\tlet path = this.attachmentLoader.newPathAttachment(skin, name);\n\t\t\t\tif (path == null) return null;\n\t\t\t\tpath.closed = closed;\n\t\t\t\tpath.constantSpeed = constantSpeed;\n\t\t\t\tpath.worldVerticesLength = vertexCount << 1;\n\t\t\t\tpath.vertices = vertices.vertices;\n\t\t\t\tpath.bones = vertices.bones;\n\t\t\t\tpath.lengths = lengths;\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(path.color, color);\n\t\t\t\treturn path;\n\t\t\t}\n\t\t\tcase AttachmentType.Point: {\n\t\t\t\tlet rotation = input.readFloat();\n\t\t\t\tlet x = input.readFloat();\n\t\t\t\tlet y = input.readFloat();\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\n\n\t\t\t\tlet point = this.attachmentLoader.newPointAttachment(skin, name);\n\t\t\t\tif (point == null) return null;\n\t\t\t\tpoint.x = x * scale;\n\t\t\t\tpoint.y = y * scale;\n\t\t\t\tpoint.rotation = rotation;\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(point.color, color);\n\t\t\t\treturn point;\n\t\t\t}\n\t\t\tcase AttachmentType.Clipping: {\n\t\t\t\tlet endSlotIndex = input.readInt(true);\n\t\t\t\tlet vertexCount = input.readInt(true);\n\t\t\t\tlet vertices = this.readVertices(input, vertexCount);\n\t\t\t\tlet color = nonessential ? input.readInt32() : 0;\n\n\t\t\t\tlet clip = this.attachmentLoader.newClippingAttachment(skin, name);\n\t\t\t\tif (clip == null) return null;\n\t\t\t\tclip.endSlot = skeletonData.slots[endSlotIndex];\n\t\t\t\tclip.worldVerticesLength = vertexCount << 1;\n\t\t\t\tclip.vertices = vertices.vertices;\n\t\t\t\tclip.bones = vertices.bones;\n\t\t\t\tif (nonessential) Color.rgba8888ToColor(clip.color, color);\n\t\t\t\treturn clip;\n\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tprivate readVertices (input: BinaryInput, vertexCount: number): Vertices {\n\t\t\tlet verticesLength = vertexCount << 1;\n\t\t\tlet vertices = new Vertices();\n\t\t\tlet scale = this.scale;\n\t\t\tif (!input.readBoolean()) {\n\t\t\t\tvertices.vertices = this.readFloatArray(input, verticesLength, scale);\n\t\t\t\treturn vertices;\n\t\t\t}\n\t\t\tlet weights = new Array();\n\t\t\tlet bonesArray = new Array();\n\t\t\tfor (let i = 0; i < vertexCount; i++) {\n\t\t\t\tlet boneCount = input.readInt(true);\n\t\t\t\tbonesArray.push(boneCount);\n\t\t\t\tfor (let ii = 0; ii < boneCount; ii++) {\n\t\t\t\t\tbonesArray.push(input.readInt(true));\n\t\t\t\t\tweights.push(input.readFloat() * scale);\n\t\t\t\t\tweights.push(input.readFloat() * scale);\n\t\t\t\t\tweights.push(input.readFloat());\n\t\t\t\t}\n\t\t\t}\n\t\t\tvertices.vertices = Utils.toFloatArray(weights);\n\t\t\tvertices.bones = bonesArray;\n\t\t\treturn vertices;\n\t\t}\n\n\t\tprivate readFloatArray (input: BinaryInput, n: number, scale: number): number[] {\n\t\t\tlet array = new Array(n);\n\t\t\tif (scale == 1) {\n\t\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\t\tarray[i] = input.readFloat();\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\t\tarray[i] = input.readFloat() * scale;\n\t\t\t}\n\t\t\treturn array;\n\t\t}\n\n\t\tprivate readShortArray (input: BinaryInput): number[] {\n\t\t\tlet n = input.readInt(true);\n\t\t\tlet array = new Array(n);\n\t\t\tfor (let i = 0; i < n; i++)\n\t\t\t\tarray[i] = input.readShort();\n\t\t\treturn array;\n\t\t}\n\n\t\tprivate readAnimation (input: BinaryInput, name: string, skeletonData: SkeletonData): Animation {\n\t\t\tlet timelines = new Array();\n\t\t\tlet scale = this.scale;\n\t\t\tlet duration = 0;\n\t\t\tlet tempColor1 = new Color();\n\t\t\tlet tempColor2 = new Color();\n\n\t\t\t// Slot timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet slotIndex = input.readInt(true);\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet timelineType = input.readByte();\n\t\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\t\tswitch (timelineType) {\n\t\t\t\t\tcase SkeletonBinary.SLOT_ATTACHMENT: {\n\t\t\t\t\t\tlet timeline = new AttachmentTimeline(frameCount);\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++)\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[frameCount - 1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SkeletonBinary.SLOT_COLOR: {\n\t\t\t\t\t\tlet timeline = new ColorTimeline(frameCount);\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\t\t\tColor.rgba8888ToColor(tempColor1, input.readInt32());\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * ColorTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SkeletonBinary.SLOT_TWO_COLOR: {\n\t\t\t\t\t\tlet timeline = new TwoColorTimeline(frameCount);\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\t\t\tColor.rgba8888ToColor(tempColor1, input.readInt32());\n\t\t\t\t\t\t\tColor.rgb888ToColor(tempColor2, input.readInt32());\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r,\n\t\t\t\t\t\t\t\ttempColor2.g, tempColor2.b);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TwoColorTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Bone timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet boneIndex = input.readInt(true);\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet timelineType = input.readByte();\n\t\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\t\tswitch (timelineType) {\n\t\t\t\t\tcase SkeletonBinary.BONE_ROTATE: {\n\t\t\t\t\t\tlet timeline = new RotateTimeline(frameCount);\n\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * RotateTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SkeletonBinary.BONE_TRANSLATE:\n\t\t\t\t\tcase SkeletonBinary.BONE_SCALE:\n\t\t\t\t\tcase SkeletonBinary.BONE_SHEAR: {\n\t\t\t\t\t\tlet timeline;\n\t\t\t\t\t\tlet timelineScale = 1;\n\t\t\t\t\t\tif (timelineType == SkeletonBinary.BONE_SCALE)\n\t\t\t\t\t\t\ttimeline = new ScaleTimeline(frameCount);\n\t\t\t\t\t\telse if (timelineType == SkeletonBinary.BONE_SHEAR)\n\t\t\t\t\t\t\ttimeline = new ShearTimeline(frameCount);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttimeline = new TranslateTimeline(frameCount);\n\t\t\t\t\t\t\ttimelineScale = scale;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale,\n\t\t\t\t\t\t\t\tinput.readFloat() * timelineScale);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TranslateTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// IK constraint timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet index = input.readInt(true);\n\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\tlet timeline = new IkConstraintTimeline(frameCount);\n\t\t\t\ttimeline.ikConstraintIndex = index;\n\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(),\n\t\t\t\t\t\tinput.readBoolean());\n\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t}\n\t\t\t\ttimelines.push(timeline);\n\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * IkConstraintTimeline.ENTRIES]);\n\t\t\t}\n\n\t\t\t// Transform constraint timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet index = input.readInt(true);\n\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\tlet timeline = new TransformConstraintTimeline(frameCount);\n\t\t\t\ttimeline.transformConstraintIndex = index;\n\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(),\n\t\t\t\t\t\tinput.readFloat());\n\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t}\n\t\t\t\ttimelines.push(timeline);\n\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * TransformConstraintTimeline.ENTRIES]);\n\t\t\t}\n\n\t\t\t// Path constraint timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet index = input.readInt(true);\n\t\t\t\tlet data = skeletonData.pathConstraints[index];\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet timelineType = input.readByte();\n\t\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\t\tswitch (timelineType) {\n\t\t\t\t\tcase SkeletonBinary.PATH_POSITION:\n\t\t\t\t\tcase SkeletonBinary.PATH_SPACING: {\n\t\t\t\t\t\tlet timeline;\n\t\t\t\t\t\tlet timelineScale = 1;\n\t\t\t\t\t\tif (timelineType == SkeletonBinary.PATH_SPACING) {\n\t\t\t\t\t\t\ttimeline = new PathConstraintSpacingTimeline(frameCount);\n\t\t\t\t\t\t\tif (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttimeline = new PathConstraintPositionTimeline(frameCount);\n\t\t\t\t\t\t\tif (data.positionMode == PositionMode.Fixed) timelineScale = scale;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintPositionTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SkeletonBinary.PATH_MIX: {\n\t\t\t\t\t\tlet timeline = new PathConstraintMixTimeline(frameCount);\n\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(frameCount - 1) * PathConstraintMixTimeline.ENTRIES]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Deform timelines.\n\t\t\tfor (let i = 0, n = input.readInt(true); i < n; i++) {\n\t\t\t\tlet skin = skeletonData.skins[input.readInt(true)];\n\t\t\t\tfor (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n\t\t\t\t\tlet slotIndex = input.readInt(true);\n\t\t\t\t\tfor (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n\t\t\t\t\t\tlet attachment = skin.getAttachment(slotIndex, input.readStringRef()) as VertexAttachment;\n\t\t\t\t\t\tlet weighted = attachment.bones != null;\n\t\t\t\t\t\tlet vertices = attachment.vertices;\n\t\t\t\t\t\tlet deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n\n\t\t\t\t\t\tlet frameCount = input.readInt(true);\n\t\t\t\t\t\tlet timeline = new DeformTimeline(frameCount);\n\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\n\t\t\t\t\t\ttimeline.attachment = attachment;\n\n\t\t\t\t\t\tfor (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n\t\t\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\t\t\tlet deform;\n\t\t\t\t\t\t\tlet end = input.readInt(true);\n\t\t\t\t\t\t\tif (end == 0)\n\t\t\t\t\t\t\t\tdeform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tdeform = Utils.newFloatArray(deformLength);\n\t\t\t\t\t\t\t\tlet start = input.readInt(true);\n\t\t\t\t\t\t\t\tend += start;\n\t\t\t\t\t\t\t\tif (scale == 1) {\n\t\t\t\t\t\t\t\t\tfor (let v = start; v < end; v++)\n\t\t\t\t\t\t\t\t\t\tdeform[v] = input.readFloat();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfor (let v = start; v < end; v++)\n\t\t\t\t\t\t\t\t\t\tdeform[v] = input.readFloat() * scale;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!weighted) {\n\t\t\t\t\t\t\t\t\tfor (let v = 0, vn = deform.length; v < vn; v++)\n\t\t\t\t\t\t\t\t\t\tdeform[v] += vertices[v];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, time, deform);\n\t\t\t\t\t\t\tif (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimelines.push(timeline);\n\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[frameCount - 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Draw order timeline.\n\t\t\tlet drawOrderCount = input.readInt(true);\n\t\t\tif (drawOrderCount > 0) {\n\t\t\t\tlet timeline = new DrawOrderTimeline(drawOrderCount);\n\t\t\t\tlet slotCount = skeletonData.slots.length;\n\t\t\t\tfor (let i = 0; i < drawOrderCount; i++) {\n\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\tlet offsetCount = input.readInt(true);\n\t\t\t\t\tlet drawOrder = Utils.newArray(slotCount, 0);\n\t\t\t\t\tfor (let ii = slotCount - 1; ii >= 0; ii--)\n\t\t\t\t\t\tdrawOrder[ii] = -1;\n\t\t\t\t\tlet unchanged = Utils.newArray(slotCount - offsetCount, 0);\n\t\t\t\t\tlet originalIndex = 0, unchangedIndex = 0;\n\t\t\t\t\tfor (let ii = 0; ii < offsetCount; ii++) {\n\t\t\t\t\t\tlet slotIndex = input.readInt(true);\n\t\t\t\t\t\t// Collect unchanged items.\n\t\t\t\t\t\twhile (originalIndex != slotIndex)\n\t\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\n\t\t\t\t\t\t// Set changed items.\n\t\t\t\t\t\tdrawOrder[originalIndex + input.readInt(true)] = originalIndex++;\n\t\t\t\t\t}\n\t\t\t\t\t// Collect remaining unchanged items.\n\t\t\t\t\twhile (originalIndex < slotCount)\n\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\n\t\t\t\t\t// Fill in unchanged items.\n\t\t\t\t\tfor (let ii = slotCount - 1; ii >= 0; ii--)\n\t\t\t\t\t\tif (drawOrder[ii] == -1) drawOrder[ii] = unchanged[--unchangedIndex];\n\t\t\t\t\ttimeline.setFrame(i, time, drawOrder);\n\t\t\t\t}\n\t\t\t\ttimelines.push(timeline);\n\t\t\t\tduration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\n\t\t\t}\n\n\t\t\t// Event timeline.\n\t\t\tlet eventCount = input.readInt(true);\n\t\t\tif (eventCount > 0) {\n\t\t\t\tlet timeline = new EventTimeline(eventCount);\n\t\t\t\tfor (let i = 0; i < eventCount; i++) {\n\t\t\t\t\tlet time = input.readFloat();\n\t\t\t\t\tlet eventData = skeletonData.events[input.readInt(true)];\n\t\t\t\t\tlet event = new Event(time, eventData);\n\t\t\t\t\tevent.intValue = input.readInt(false);\n\t\t\t\t\tevent.floatValue = input.readFloat();\n\t\t\t\t\tevent.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n\t\t\t\t\tif (event.data.audioPath != null) {\n\t\t\t\t\t\tevent.volume = input.readFloat();\n\t\t\t\t\t\tevent.balance = input.readFloat();\n\t\t\t\t\t}\n\t\t\t\t\ttimeline.setFrame(i, event);\n\t\t\t\t}\n\t\t\t\ttimelines.push(timeline);\n\t\t\t\tduration = Math.max(duration, timeline.frames[eventCount - 1]);\n\t\t\t}\n\n\t\t\treturn new Animation(name, timelines, duration);\n\t\t}\n\n\t\tprivate readCurve (input: BinaryInput, frameIndex: number, timeline: CurveTimeline) {\n\t\t\tswitch (input.readByte()) {\n\t\t\tcase SkeletonBinary.CURVE_STEPPED:\n\t\t\t\ttimeline.setStepped(frameIndex);\n\t\t\t\tbreak;\n\t\t\tcase SkeletonBinary.CURVE_BEZIER:\n\t\t\t\tthis.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tsetCurve (timeline: CurveTimeline, frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) {\n\t\t\ttimeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\n\t\t}\n\t}\n\n\tclass BinaryInput {\n\t\tconstructor(data: Uint8Array, public strings = new Array(), private index: number = 0, private buffer = new DataView(data.buffer)) { \n\n\t\t}\n\n\t\treadByte(): number {\n\t\t\treturn this.buffer.getInt8(this.index++);\n\t\t}\n\n\t\treadShort(): number {\n\t\t\tlet value = this.buffer.getInt16(this.index);\n\t\t\tthis.index += 2;\n\t\t\treturn value;\n\t\t}\n\n\t\treadInt32(): number {\n\t\t\t let value = this.buffer.getInt32(this.index)\n\t\t\t this.index += 4;\n\t\t\t return value;\n\t\t}\n\n\t\treadInt(optimizePositive: boolean) {\n\t\t\tlet b = this.readByte();\n\t\t\tlet result = b & 0x7F;\n\t\t\tif ((b & 0x80) != 0) {\n\t\t\t\tb = this.readByte();\n\t\t\t\tresult |= (b & 0x7F) << 7;\n\t\t\t\tif ((b & 0x80) != 0) {\n\t\t\t\t\tb = this.readByte();\n\t\t\t\t\tresult |= (b & 0x7F) << 14;\n\t\t\t\t\tif ((b & 0x80) != 0) {\n\t\t\t\t\t\tb = this.readByte();\n\t\t\t\t\t\tresult |= (b & 0x7F) << 21;\n\t\t\t\t\t\tif ((b & 0x80) != 0) {\n\t\t\t\t\t\t\tb = this.readByte();\n\t\t\t\t\t\t\tresult |= (b & 0x7F) << 28;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\n\t\t}\n\n\t\treadStringRef (): string {\n\t\t\tlet index = this.readInt(true);\n\t\t\treturn index == 0 ? null : this.strings[index - 1];\n\t\t}\n\n\t\treadString (): string {\n\t\t\tlet byteCount = this.readInt(true);\n\t\t\tswitch (byteCount) {\n\t\t\tcase 0:\n\t\t\t\treturn null;\n\t\t\tcase 1:\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tbyteCount--;\n\t\t\tlet chars = \"\";\n\t\t\tlet charCount = 0;\n\t\t\tfor (let i = 0; i < byteCount;) {\n\t\t\t\tlet b = this.readByte();\n\t\t\t\tswitch (b >> 4) {\n\t\t\t\tcase 12:\n\t\t\t\tcase 13:\n\t\t\t\t\tchars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\n\t\t\t\t\ti += 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 14:\n\t\t\t\t\tchars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\n\t\t\t\t\ti += 3;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tchars += String.fromCharCode(b);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn chars;\n\t\t}\n\n\t\treadFloat (): number {\n\t\t\tlet value = this.buffer.getFloat32(this.index);\n\t\t\tthis.index += 4;\n\t\t\treturn value;\n\t\t}\n\n\t\treadBoolean (): boolean {\n\t\t\treturn this.readByte() != 0;\n\t\t}\n\t}\n\n\tclass LinkedMesh {\n\t\tparent: string; skin: string;\n\t\tslotIndex: number;\n\t\tmesh: MeshAttachment;\n\t\tinheritDeform: boolean;\n\n\t\tconstructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {\n\t\t\tthis.mesh = mesh;\n\t\t\tthis.skin = skin;\n\t\t\tthis.slotIndex = slotIndex;\n\t\t\tthis.parent = parent;\n\t\t\tthis.inheritDeform = inheritDeform;\n\t\t}\n\t}\n\n\tclass Vertices {\n\t\tconstructor(public bones: Array = null, public vertices: Array | Float32Array = null) { }\n\t}\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class SkeletonBounds {\n minX = 0; minY = 0; maxX = 0; maxY = 0;\n boundingBoxes = new Array();\n polygons = new Array>();\n private polygonPool = new Pool>(() => {\n return Utils.newFloatArray(16);\n });\n\n update (skeleton: Skeleton, updateAabb: boolean) {\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n let boundingBoxes = this.boundingBoxes;\n let polygons = this.polygons;\n let polygonPool = this.polygonPool;\n let slots = skeleton.slots;\n let slotCount = slots.length;\n\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n\n for (let i = 0; i < slotCount; i++) {\n let slot = slots[i];\n if (!slot.bone.active) continue;\n let attachment = slot.getAttachment();\n if (attachment instanceof BoundingBoxAttachment) {\n let boundingBox = attachment as BoundingBoxAttachment;\n boundingBoxes.push(boundingBox);\n\n let polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\n }\n polygons.push(polygon);\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\n }\n }\n\n if (updateAabb) {\n this.aabbCompute();\n } else {\n this.minX = Number.POSITIVE_INFINITY;\n this.minY = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.maxY = Number.NEGATIVE_INFINITY;\n }\n }\n\n aabbCompute () {\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++) {\n let polygon = polygons[i];\n let vertices = polygon;\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n let x = vertices[ii];\n let y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n }\n\n /** Returns true if the axis aligned bounding box contains the point. */\n aabbContainsPoint (x: number, y: number) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n }\n\n /** Returns true if the axis aligned bounding box intersects the line segment. */\n aabbIntersectsSegment (x1: number, y1: number, x2: number, y2: number) {\n let minX = this.minX;\n let minY = this.minY;\n let maxX = this.maxX;\n let maxY = this.maxY;\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\n return false;\n let m = (y2 - y1) / (x2 - x1);\n let y = m * (minX - x1) + y1;\n if (y > minY && y < maxY) return true;\n y = m * (maxX - x1) + y1;\n if (y > minY && y < maxY) return true;\n let x = (minY - y1) / m + x1;\n if (x > minX && x < maxX) return true;\n x = (maxY - y1) / m + x1;\n if (x > minX && x < maxX) return true;\n return false;\n }\n\n /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */\n aabbIntersectsSkeleton (bounds: SkeletonBounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n }\n\n /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more\n * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */\n containsPoint (x: number, y: number): BoundingBoxAttachment {\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++)\n if (this.containsPointPolygon(polygons[i], x, y)) return this.boundingBoxes[i];\n return null;\n }\n\n /** Returns true if the polygon contains the point. */\n containsPointPolygon (polygon: ArrayLike, x: number, y: number) {\n let vertices = polygon;\n let nn = polygon.length;\n\n let prevIndex = nn - 2;\n let inside = false;\n for (let ii = 0; ii < nn; ii += 2) {\n let vertexY = vertices[ii + 1];\n let prevY = vertices[prevIndex + 1];\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\n let vertexX = vertices[ii];\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) inside = !inside;\n }\n prevIndex = ii;\n }\n return inside;\n }\n\n /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it\n * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns\n * true. */\n intersectsSegment (x1: number, y1: number, x2: number, y2: number) {\n let polygons = this.polygons;\n for (let i = 0, n = polygons.length; i < n; i++)\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) return this.boundingBoxes[i];\n return null;\n }\n\n /** Returns true if the polygon contains any part of the line segment. */\n intersectsSegmentPolygon (polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number) {\n let vertices = polygon;\n let nn = polygon.length;\n\n let width12 = x1 - x2, height12 = y1 - y2;\n let det1 = x1 * y2 - y1 * x2;\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (let ii = 0; ii < nn; ii += 2) {\n let x4 = vertices[ii], y4 = vertices[ii + 1];\n let det2 = x3 * y4 - y3 * x4;\n let width34 = x3 - x4, height34 = y3 - y4;\n let det3 = width12 * height34 - height12 * width34;\n let x = (det1 * width34 - width12 * det2) / det3;\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\n let y = (det1 * height34 - height12 * det2) / det3;\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) return true;\n }\n x3 = x4;\n y3 = y4;\n }\n return false;\n }\n\n /** Returns the polygon for the specified bounding box, or null. */\n getPolygon (boundingBox: BoundingBoxAttachment) {\n if (boundingBox == null) throw new Error(\"boundingBox cannot be null.\");\n let index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n }\n\n getWidth () {\n return this.maxX - this.minX;\n }\n\n getHeight () {\n return this.maxY - this.minY;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n\texport class SkeletonClipping {\n\t\tprivate triangulator = new Triangulator();\n\t\tprivate clippingPolygon = new Array();\n\t\tprivate clipOutput = new Array();\n\t\tclippedVertices = new Array();\n\t\tclippedTriangles = new Array();\n\t\tprivate scratch = new Array();\n\n\t\tprivate clipAttachment: ClippingAttachment;\n\t\tprivate clippingPolygons: Array>;\n\n\t\tclipStart (slot: Slot, clip: ClippingAttachment): number {\n\t\t\tif (this.clipAttachment != null) return 0;\n\t\t\tthis.clipAttachment = clip;\n\n\t\t\tlet n = clip.worldVerticesLength;\n\t\t\tlet vertices = Utils.setArraySize(this.clippingPolygon, n);\n\t\t\tclip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n\t\t\tlet clippingPolygon = this.clippingPolygon;\n\t\t\tSkeletonClipping.makeClockwise(clippingPolygon);\n\t\t\tlet clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n\t\t\tfor (let i = 0, n = clippingPolygons.length; i < n; i++) {\n\t\t\t\tlet polygon = clippingPolygons[i];\n\t\t\t\tSkeletonClipping.makeClockwise(polygon);\n\t\t\t\tpolygon.push(polygon[0]);\n\t\t\t\tpolygon.push(polygon[1]);\n\t\t\t}\n\n\t\t\treturn clippingPolygons.length;\n\t\t}\n\n\t\tclipEndWithSlot (slot: Slot) {\n\t\t\tif (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data) this.clipEnd();\n\t\t}\n\n\t\tclipEnd () {\n\t\t\tif (this.clipAttachment == null) return;\n\t\t\tthis.clipAttachment = null;\n\t\t\tthis.clippingPolygons = null;\n\t\t\tthis.clippedVertices.length = 0;\n\t\t\tthis.clippedTriangles.length = 0;\n\t\t\tthis.clippingPolygon.length = 0;\n\t\t}\n\n\t\tisClipping (): boolean {\n\t\t\treturn this.clipAttachment != null;\n\t\t}\n\n\t\tclipTriangles (vertices: ArrayLike, verticesLength: number, triangles: ArrayLike, trianglesLength: number, uvs: ArrayLike,\n\t\t\tlight: Color, dark: Color, twoColor: boolean) {\n\n\t\t\tlet clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n\t\t\tlet clippedTriangles = this.clippedTriangles;\n\t\t\tlet polygons = this.clippingPolygons;\n\t\t\tlet polygonsCount = this.clippingPolygons.length;\n\t\t\tlet vertexSize = twoColor ? 12 : 8;\n\n\t\t\tlet index = 0;\n\t\t\tclippedVertices.length = 0;\n\t\t\tclippedTriangles.length = 0;\n\t\t\touter:\n\t\t\tfor (let i = 0; i < trianglesLength; i += 3) {\n\t\t\t\tlet vertexOffset = triangles[i] << 1;\n\t\t\t\tlet x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n\t\t\t\tlet u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n\n\t\t\t\tvertexOffset = triangles[i + 1] << 1;\n\t\t\t\tlet x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n\t\t\t\tlet u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n\n\t\t\t\tvertexOffset = triangles[i + 2] << 1;\n\t\t\t\tlet x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n\t\t\t\tlet u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n\n\t\t\t\tfor (let p = 0; p < polygonsCount; p++) {\n\t\t\t\t\tlet s = clippedVertices.length;\n\t\t\t\t\tif (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n\t\t\t\t\t\tlet clipOutputLength = clipOutput.length;\n\t\t\t\t\t\tif (clipOutputLength == 0) continue;\n\t\t\t\t\t\tlet d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n\t\t\t\t\t\tlet d = 1 / (d0 * d2 + d1 * (y1 - y3));\n\n\t\t\t\t\t\tlet clipOutputCount = clipOutputLength >> 1;\n\t\t\t\t\t\tlet clipOutputItems = this.clipOutput;\n\t\t\t\t\t\tlet clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n\t\t\t\t\t\tfor (let ii = 0; ii < clipOutputLength; ii += 2) {\n\t\t\t\t\t\t\tlet x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\n\t\t\t\t\t\t\tclippedVerticesItems[s] = x;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 1] = y;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\n\t\t\t\t\t\t\tlet c0 = x - x3, c1 = y - y3;\n\t\t\t\t\t\t\tlet a = (d0 * c0 + d1 * c1) * d;\n\t\t\t\t\t\t\tlet b = (d4 * c0 + d2 * c1) * d;\n\t\t\t\t\t\t\tlet c = 1 - a - b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\n\t\t\t\t\t\t\tif (twoColor) {\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ts += vertexSize;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts = clippedTriangles.length;\n\t\t\t\t\t\tlet clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n\t\t\t\t\t\tclipOutputCount--;\n\t\t\t\t\t\tfor (let ii = 1; ii < clipOutputCount; ii++) {\n\t\t\t\t\t\t\tclippedTrianglesItems[s] = index;\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + ii);\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + ii + 1);\n\t\t\t\t\t\t\ts += 3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex += clipOutputCount + 1;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\n\t\t\t\t\t\tclippedVerticesItems[s] = x1;\n\t\t\t\t\t\tclippedVerticesItems[s + 1] = y1;\n\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\n\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\n\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\n\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\n\t\t\t\t\t\tif (!twoColor) {\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\n\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = x2;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = y2;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = light.r;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = light.g;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = light.b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = light.a;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = u2;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = v2;\n\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = x3;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = y3;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = light.r;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = light.g;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = light.b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = light.a;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = u3;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = v3;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\n\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = x2;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = y2;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = light.r;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = light.g;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = light.b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = light.a;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = u2;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = v2;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = dark.r;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = dark.g;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = dark.b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = dark.a;\n\n\t\t\t\t\t\t\tclippedVerticesItems[s + 24] = x3;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 25] = y3;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 26] = light.r;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 27] = light.g;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 28] = light.b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 29] = light.a;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 30] = u3;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 31] = v3;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 32] = dark.r;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 33] = dark.g;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 34] = dark.b;\n\t\t\t\t\t\t\tclippedVerticesItems[s + 35] = dark.a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts = clippedTriangles.length;\n\t\t\t\t\t\tlet clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);\n\t\t\t\t\t\tclippedTrianglesItems[s] = index;\n\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + 1);\n\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + 2);\n\t\t\t\t\t\tindex += 3;\n\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping\n\t\t * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */\n\t\tclip (x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array, output: Array) {\n\t\t\tlet originalOutput = output;\n\t\t\tlet clipped = false;\n\n\t\t\t// Avoid copy at the end.\n\t\t\tlet input: Array = null;\n\t\t\tif (clippingArea.length % 4 >= 2) {\n\t\t\t\tinput = output;\n\t\t\t\toutput = this.scratch;\n\t\t\t} else\n\t\t\t\tinput = this.scratch;\n\n\t\t\tinput.length = 0;\n\t\t\tinput.push(x1);\n\t\t\tinput.push(y1);\n\t\t\tinput.push(x2);\n\t\t\tinput.push(y2);\n\t\t\tinput.push(x3);\n\t\t\tinput.push(y3);\n\t\t\tinput.push(x1);\n\t\t\tinput.push(y1);\n\t\t\toutput.length = 0;\n\n\t\t\tlet clippingVertices = clippingArea;\n\t\t\tlet clippingVerticesLast = clippingArea.length - 4;\n\t\t\tfor (let i = 0;; i += 2) {\n\t\t\t\tlet edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n\t\t\t\tlet edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n\t\t\t\tlet deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n\n\t\t\t\tlet inputVertices = input;\n\t\t\t\tlet inputVerticesLength = input.length - 2, outputStart = output.length;\n\t\t\t\tfor (let ii = 0; ii < inputVerticesLength; ii += 2) {\n\t\t\t\t\tlet inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n\t\t\t\t\tlet inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n\t\t\t\t\tlet side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\n\t\t\t\t\tif (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\n\t\t\t\t\t\tif (side2) { // v1 inside, v2 inside\n\t\t\t\t\t\t\toutput.push(inputX2);\n\t\t\t\t\t\t\toutput.push(inputY2);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// v1 inside, v2 outside\n\t\t\t\t\t\tlet c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n\t\t\t\t\t\tlet ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\n\t\t\t\t\t} else if (side2) { // v1 outside, v2 inside\n\t\t\t\t\t\tlet c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n\t\t\t\t\t\tlet ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\n\t\t\t\t\t\toutput.push(inputX2);\n\t\t\t\t\t\toutput.push(inputY2);\n\t\t\t\t\t}\n\t\t\t\t\tclipped = true;\n\t\t\t\t}\n\n\t\t\t\tif (outputStart == output.length) { // All edges outside.\n\t\t\t\t\toriginalOutput.length = 0;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\toutput.push(output[0]);\n\t\t\t\toutput.push(output[1]);\n\n\t\t\t\tif (i == clippingVerticesLast) break;\n\t\t\t\tlet temp = output;\n\t\t\t\toutput = input;\n\t\t\t\toutput.length = 0;\n\t\t\t\tinput = temp;\n\t\t\t}\n\n\t\t\tif (originalOutput != output) {\n\t\t\t\toriginalOutput.length = 0;\n\t\t\t\tfor (let i = 0, n = output.length - 2; i < n; i++)\n\t\t\t\t\toriginalOutput[i] = output[i];\n\t\t\t} else\n\t\t\t\toriginalOutput.length = originalOutput.length - 2;\n\n\t\t\treturn clipped;\n\t\t}\n\n\t\tpublic static makeClockwise (polygon: ArrayLike) {\n\t\t\tlet vertices = polygon;\n\t\t\tlet verticeslength = polygon.length;\n\n\t\t\tlet area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n\t\t\tfor (let i = 0, n = verticeslength - 3; i < n; i += 2) {\n\t\t\t\tp1x = vertices[i];\n\t\t\t\tp1y = vertices[i + 1];\n\t\t\t\tp2x = vertices[i + 2];\n\t\t\t\tp2y = vertices[i + 3];\n\t\t\t\tarea += p1x * p2y - p2x * p1y;\n\t\t\t}\n\t\t\tif (area < 0) return;\n\n\t\t\tfor (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n\t\t\t\tlet x = vertices[i], y = vertices[i + 1];\n\t\t\t\tlet other = lastX - i;\n\t\t\t\tvertices[i] = vertices[other];\n\t\t\t\tvertices[i + 1] = vertices[other + 1];\n\t\t\t\tvertices[other] = x;\n\t\t\t\tvertices[other + 1] = y;\n\t\t\t}\n\t\t}\n\t}\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class SkeletonData {\n name: string;\n bones = new Array(); // Ordered parents first.\n slots = new Array(); // Setup pose draw order.\n skins = new Array();\n defaultSkin: Skin;\n events = new Array();\n animations = new Array();\n ikConstraints = new Array();\n transformConstraints = new Array();\n pathConstraints = new Array();\n x: number; y: number; width: number; height: number;\n version: string; hash: string;\n\n // Nonessential\n fps = 0;\n imagesPath: string;\n audioPath: string;\n\n findBone (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (bone.name == boneName) return bone;\n }\n return null;\n }\n\n findBoneIndex (boneName: string) {\n if (boneName == null) throw new Error(\"boneName cannot be null.\");\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName) return i;\n return -1;\n }\n\n findSlot (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n if (slot.name == slotName) return slot;\n }\n return null;\n }\n\n findSlotIndex (slotName: string) {\n if (slotName == null) throw new Error(\"slotName cannot be null.\");\n let slots = this.slots;\n for (let i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName) return i;\n return -1;\n }\n\n findSkin (skinName: string) {\n if (skinName == null) throw new Error(\"skinName cannot be null.\");\n let skins = this.skins;\n for (let i = 0, n = skins.length; i < n; i++) {\n let skin = skins[i];\n if (skin.name == skinName) return skin;\n }\n return null;\n }\n\n findEvent (eventDataName: string) {\n if (eventDataName == null) throw new Error(\"eventDataName cannot be null.\");\n let events = this.events;\n for (let i = 0, n = events.length; i < n; i++) {\n let event = events[i];\n if (event.name == eventDataName) return event;\n }\n return null;\n }\n\n findAnimation (animationName: string) {\n if (animationName == null) throw new Error(\"animationName cannot be null.\");\n let animations = this.animations;\n for (let i = 0, n = animations.length; i < n; i++) {\n let animation = animations[i];\n if (animation.name == animationName) return animation;\n }\n return null;\n }\n\n findIkConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let ikConstraints = this.ikConstraints;\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\n let constraint = ikConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findTransformConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let transformConstraints = this.transformConstraints;\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\n let constraint = transformConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findPathConstraint (constraintName: string) {\n if (constraintName == null) throw new Error(\"constraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\n let constraint = pathConstraints[i];\n if (constraint.name == constraintName) return constraint;\n }\n return null;\n }\n\n findPathConstraintIndex (pathConstraintName: string) {\n if (pathConstraintName == null) throw new Error(\"pathConstraintName cannot be null.\");\n let pathConstraints = this.pathConstraints;\n for (let i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName) return i;\n return -1;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class SkeletonJson {\n attachmentLoader: AttachmentLoader;\n scale = 1;\n private linkedMeshes = new Array();\n\n constructor (attachmentLoader: AttachmentLoader) {\n this.attachmentLoader = attachmentLoader;\n }\n\n readSkeletonData (json: string | any): SkeletonData {\n let scale = this.scale;\n let skeletonData = new SkeletonData();\n let root = typeof(json) === \"string\" ? JSON.parse(json) : json;\n\n // Skeleton\n let skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n skeletonData.x = skeletonMap.x;\n skeletonData.y = skeletonMap.y;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n\n // Bones\n if (root.bones) {\n for (let i = 0; i < root.bones.length; i++) {\n let boneMap = root.bones[i];\n\n let parent: BoneData = null;\n let parentName: string = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent = skeletonData.findBone(parentName);\n if (parent == null) throw new Error(\"Parent bone not found: \" + parentName);\n }\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\n\n skeletonData.bones.push(data);\n }\n }\n\n // Slots.\n if (root.slots) {\n for (let i = 0; i < root.slots.length; i++) {\n let slotMap = root.slots[i];\n let slotName: string = slotMap.name;\n let boneName: string = slotMap.bone;\n let boneData = skeletonData.findBone(boneName);\n if (boneData == null) throw new Error(\"Slot bone not found: \" + boneName);\n let data = new SlotData(skeletonData.slots.length, slotName, boneData);\n\n let color: string = this.getValue(slotMap, \"color\", null);\n if (color != null) data.color.setFromString(color);\n\n let dark: string = this.getValue(slotMap, \"dark\", null);\n if (dark != null) {\n data.darkColor = new Color(1, 1, 1, 1);\n data.darkColor.setFromString(dark);\n }\n\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n\n // IK constraints\n if (root.ik) {\n for (let i = 0; i < root.ik.length; i++) {\n let constraintMap = root.ik[i];\n let data = new IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"IK target bone not found: \" + targetName);\n\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = this.getValue(constraintMap, \"compress\", false);\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\n\n skeletonData.ikConstraints.push(data);\n }\n }\n\n // Transform constraints.\n if (root.transform) {\n for (let i = 0; i < root.transform.length; i++) {\n let constraintMap = root.transform[i];\n let data = new TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null) throw new Error(\"Transform constraint target bone not found: \" + targetName);\n\n data.local = this.getValue(constraintMap, \"local\", false);\n data.relative = this.getValue(constraintMap, \"relative\", false);\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n\n skeletonData.transformConstraints.push(data);\n }\n }\n\n // Path constraints.\n if (root.path) {\n for (let i = 0; i < root.path.length; i++) {\n let constraintMap = root.path[i];\n let data = new PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n\n for (let j = 0; j < constraintMap.bones.length; j++) {\n let boneName = constraintMap.bones[j];\n let bone = skeletonData.findBone(boneName);\n if (bone == null) throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n\n let targetName: string = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null) throw new Error(\"Path target slot not found: \" + targetName);\n\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == PositionMode.Fixed) data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n\n skeletonData.pathConstraints.push(data);\n }\n }\n\n // Skins.\n if (root.skins) {\n for (let i = 0; i < root.skins.length; i++) {\n let skinMap = root.skins[i]\n let skin = new Skin(skinMap.name);\n\n if (skinMap.bones) {\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\n let bone = skeletonData.findBone(skinMap.bones[ii]);\n if (bone == null) throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\n skin.bones.push(bone);\n }\n }\n\n if (skinMap.ik) {\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\n let constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\n if (constraint == null) throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\n skin.constraints.push(constraint);\n }\n }\n\n if (skinMap.transform) {\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\n let constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\n if (constraint == null) throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\n skin.constraints.push(constraint);\n }\n }\n\n if (skinMap.path) {\n for (let ii = 0; ii < skinMap.path.length; ii++) {\n let constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\n if (constraint == null) throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\n skin.constraints.push(constraint);\n }\n }\n\n for (let slotName in skinMap.attachments) {\n let slot = skeletonData.findSlot(slotName);\n if (slot == null) throw new Error(\"Slot not found: \" + slotName);\n let slotMap = skinMap.attachments[slotName];\n for (let entryName in slotMap) {\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment != null) skin.setAttachment(slot.index, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\") skeletonData.defaultSkin = skin;\n }\n }\n\n // Linked meshes.\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\n let linkedMesh = this.linkedMeshes[i];\n let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null) throw new Error(\"Skin not found: \" + linkedMesh.skin);\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent == null) throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh( parent);\n // linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n\n // Events.\n if (root.events) {\n for (let eventName in root.events) {\n let eventMap = root.events[eventName];\n let data = new EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\n data.audioPath = this.getValue(eventMap, \"audio\", null);\n if (data.audioPath != null) {\n data.volume = this.getValue(eventMap, \"volume\", 1);\n data.balance = this.getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n\n // Animations.\n if (root.animations) {\n for (let animationName in root.animations) {\n let animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n\n return skeletonData;\n }\n\n readAttachment (map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment {\n let scale = this.scale;\n name = this.getValue(map, \"name\", name);\n\n let type = this.getValue(map, \"type\", \"region\");\n\n switch (type) {\n case \"region\": {\n let path = this.getValue(map, \"path\", name);\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null) return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) region.color.setFromString(color);\n\n // region.updateOffset();\n return region;\n }\n case \"boundingbox\": {\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null) return null;\n this.readVertices(map, box, map.vertexCount << 1);\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n let path = this.getValue(map, \"path\", name);\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null) return null;\n mesh.path = path;\n\n let color = this.getValue(map, \"color\", null);\n if (color != null) mesh.color.setFromString(color);\n\n mesh.width = this.getValue(map, \"width\", 0) * scale;\n mesh.height = this.getValue(map, \"height\", 0) * scale;\n\n let parent: string = this.getValue(map, \"parent\", null);\n if (parent != null) {\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent, this.getValue(map, \"deform\", true)));\n return mesh;\n }\n\n let uvs: Array = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = new Float32Array(uvs);\n // mesh.updateUVs();\n\n mesh.edges = this.getValue(map, \"edges\", null);\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n let path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null) return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n\n let vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n\n let lengths: Array = Utils.newArray(vertexCount / 3, 0);\n for (let i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n let point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null) return null;\n point.x = this.getValue(map, \"x\", 0) * scale;\n point.y = this.getValue(map, \"y\", 0) * scale;\n point.rotation = this.getValue(map, \"rotation\", 0);\n\n let color = this.getValue(map, \"color\", null);\n if (color != null) point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null) return null;\n\n let end = this.getValue(map, \"end\", null);\n if (end != null) {\n let slot = skeletonData.findSlot(end);\n if (slot == null) throw new Error(\"Clipping end slot not found: \" + end);\n clip.endSlot = slot;\n }\n\n let vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n\n let color: string = this.getValue(map, \"color\", null);\n if (color != null) clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n }\n\n readVertices (map: any, attachment: VertexAttachment, verticesLength: number) {\n let scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n let vertices: Array = map.vertices;\n if (verticesLength == vertices.length) {\n let scaledVertices = Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (let i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n let weights = new Array();\n let bones = new Array();\n for (let i = 0, n = vertices.length; i < n;) {\n let boneCount = vertices[i++];\n bones.push(boneCount);\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = Utils.toFloatArray(weights);\n }\n\n readAnimation (map: any, name: string, skeletonData: SkeletonData) {\n let scale = this.scale;\n let timelines = new Array();\n let duration = 0;\n\n // Slot timelines.\n if (map.slots) {\n for (let slotName in map.slots) {\n let slotMap = map.slots[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotName);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n if (timelineName == \"attachment\") {\n let timeline = new AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n } else if (timelineName == \"color\") {\n let timeline = new ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let color = new Color();\n color.setFromString(valueMap.color || \"ffffffff\");\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);\n\n } else if (timelineName == \"twoColor\") {\n let timeline = new TwoColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let light = new Color();\n let dark = new Color();\n light.setFromString(valueMap.light);\n dark.setFromString(valueMap.dark);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TwoColorTimeline.ENTRIES]);\n\n } else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n\n // Bone timelines.\n if (map.bones) {\n for (let boneName in map.bones) {\n let boneMap = map.bones[boneName];\n let boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1) throw new Error(\"Bone not found: \" + boneName);\n for (let timelineName in boneMap) {\n let timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n let timeline = new RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);\n\n } else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n let timeline: TranslateTimeline = null;\n let timelineScale = 1, defaultValue = 0;\n if (timelineName === \"scale\") {\n timeline = new ScaleTimeline(timelineMap.length);\n defaultValue = 1;\n } else if (timelineName === \"shear\")\n timeline = new ShearTimeline(timelineMap.length);\n else {\n timeline = new TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n let x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);\n\n } else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n\n // IK constraint timelines.\n if (map.ik) {\n for (let constraintName in map.ik) {\n let constraintMap = map.ik[constraintName];\n let constraint = skeletonData.findIkConstraint(constraintName);\n let timeline = new IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale,\n this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline.ENTRIES]);\n }\n }\n\n // Transform constraint timelines.\n if (map.transform) {\n for (let constraintName in map.transform) {\n let constraintMap = map.transform[constraintName];\n let constraint = skeletonData.findTransformConstraint(constraintName);\n let timeline = new TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n let frameIndex = 0;\n for (let i = 0; i < constraintMap.length; i++) {\n let valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * TransformConstraintTimeline.ENTRIES]);\n }\n }\n\n // Path constraint timelines.\n if (map.path) {\n for (let constraintName in map.path) {\n let constraintMap = map.path[constraintName];\n let index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1) throw new Error(\"Path constraint not found: \" + constraintName);\n let data = skeletonData.pathConstraints[index];\n for (let timelineName in constraintMap) {\n let timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n let timeline: PathConstraintPositionTimeline = null;\n let timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;\n } else {\n timeline = new PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == PositionMode.Fixed) timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);\n } else if (timelineName === \"mix\") {\n let timeline = new PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n let frameIndex = 0;\n for (let i = 0; i < timelineMap.length; i++) {\n let valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1),\n this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration,\n timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n\n // Deform timelines.\n if (map.deform) {\n for (let deformName in map.deform) {\n let deformMap = map.deform[deformName];\n let skin = skeletonData.findSkin(deformName);\n if (skin == null) throw new Error(\"Skin not found: \" + deformName);\n for (let slotName in deformMap) {\n let slotMap = deformMap[slotName];\n let slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + slotMap.name);\n for (let timelineName in slotMap) {\n let timelineMap = slotMap[timelineName];\n let attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null) throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n let weighted = attachment.bones != null;\n let vertices = attachment.vertices;\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n\n let timeline = new DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n\n let frameIndex = 0;\n for (let j = 0; j < timelineMap.length; j++) {\n let valueMap = timelineMap[j];\n let deform: ArrayLike;\n let verticesValue: Array = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = Utils.newFloatArray(deformLength);\n let start = this.getValue(valueMap, \"offset\", 0);\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (let i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (let i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n\n // Draw order timeline.\n let drawOrderNode = map.drawOrder;\n if (drawOrderNode == null) drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n let timeline = new DrawOrderTimeline(drawOrderNode.length);\n let slotCount = skeletonData.slots.length;\n let frameIndex = 0;\n for (let j = 0; j < drawOrderNode.length; j++) {\n let drawOrderMap = drawOrderNode[j];\n let drawOrder: Array = null;\n let offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = Utils.newArray(slotCount, -1);\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\n let originalIndex = 0, unchangedIndex = 0;\n for (let i = 0; i < offsets.length; i++) {\n let offsetMap = offsets[i];\n let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1) throw new Error(\"Slot not found: \" + offsetMap.slot);\n // Collect unchanged items.\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n // Set changed items.\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n // Collect remaining unchanged items.\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n // Fill in unchanged items.\n for (let i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1) drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n // Event timeline.\n if (map.events) {\n let timeline = new EventTimeline(map.events.length);\n let frameIndex = 0;\n for (let i = 0; i < map.events.length; i++) {\n let eventMap = map.events[i];\n let eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null) throw new Error(\"Event not found: \" + eventMap.name);\n let event = new Event(Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\n event.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n if (event.data.audioPath != null) {\n event.volume = this.getValue(eventMap, \"volume\", 1);\n event.balance = this.getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frameIndex++, event);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n\n skeletonData.animations.push(new Animation(name, timelines, duration));\n }\n\n readCurve (map: any, timeline: CurveTimeline, frameIndex: number) {\n if (!map.curve) return;\n if (map.curve === \"stepped\")\n timeline.setStepped(frameIndex);\n else {\n let curve: number = map.curve;\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\n }\n }\n\n getValue (map: any, prop: string, defaultValue: any) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n }\n\n static blendModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"normal\") return BlendMode.Normal;\n if (str == \"additive\") return BlendMode.Additive;\n if (str == \"multiply\") return BlendMode.Multiply;\n if (str == \"screen\") return BlendMode.Screen;\n throw new Error(`Unknown blend mode: ${str}`);\n }\n\n static positionModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"fixed\") return PositionMode.Fixed;\n if (str == \"percent\") return PositionMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static spacingModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"length\") return SpacingMode.Length;\n if (str == \"fixed\") return SpacingMode.Fixed;\n if (str == \"percent\") return SpacingMode.Percent;\n throw new Error(`Unknown position mode: ${str}`);\n }\n\n static rotateModeFromString (str: string) {\n str = str.toLowerCase();\n if (str == \"tangent\") return RotateMode.Tangent;\n if (str == \"chain\") return RotateMode.Chain;\n if (str == \"chainscale\") return RotateMode.ChainScale;\n throw new Error(`Unknown rotate mode: ${str}`);\n }\n\n static transformModeFromString(str: string) {\n str = str.toLowerCase();\n if (str == \"normal\") return TransformMode.Normal;\n if (str == \"onlytranslation\") return TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\") return TransformMode.NoRotationOrReflection;\n if (str == \"noscale\") return TransformMode.NoScale;\n if (str == \"noscaleorreflection\") return TransformMode.NoScaleOrReflection;\n throw new Error(`Unknown transform mode: ${str}`);\n }\n }\n\n class LinkedMesh {\n parent: string; skin: string;\n slotIndex: number;\n mesh: MeshAttachment;\n inheritDeform: boolean;\n\n constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class SkinEntry {\n constructor(public slotIndex: number, public name: string, public attachment: Attachment) { }\n }\n\n export class Skin {\n name: string;\n attachments = new Array>();\n bones = Array();\n constraints = new Array();\n\n constructor (name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n\n setAttachment (slotIndex: number, name: string, attachment: Attachment) {\n if (attachment == null) throw new Error(\"attachment cannot be null.\");\n let attachments = this.attachments;\n if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;\n if (!attachments[slotIndex]) attachments[slotIndex] = { };\n attachments[slotIndex][name] = attachment;\n }\n\n addSkin (skin: Skin) {\n for(let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained) this.bones.push(bone);\n }\n\n for(let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained) this.constraints.push(constraint);\n }\n\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n\n copySkin (skin: Skin) {\n for(let i = 0; i < skin.bones.length; i++) {\n let bone = skin.bones[i];\n let contained = false;\n for (let j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained) this.bones.push(bone);\n }\n\n for(let i = 0; i < skin.constraints.length; i++) {\n let constraint = skin.constraints[i];\n let contained = false;\n for (let j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained) this.constraints.push(constraint);\n }\n\n let attachments = skin.getAttachments();\n for (let i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (attachment.attachment == null) continue;\n if (attachment.attachment instanceof MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n } else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n }\n\n /** @return May be null. */\n getAttachment (slotIndex: number, name: string): Attachment {\n let dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n }\n\n removeAttachment (slotIndex: number, name: string) {\n let dictionary = this.attachments[slotIndex];\n if (dictionary) dictionary[name] = null;\n }\n\n getAttachments (): Array {\n let entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n let slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment) entries.push(new SkinEntry(i, name, attachment));\n }\n }\n }\n return entries;\n }\n\n getAttachmentsForSlot (slotIndex: number, attachments: Array) {\n let slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (let name in slotAttachments) {\n let attachment = slotAttachments[name];\n if (attachment) attachments.push(new SkinEntry(slotIndex, name, attachment));\n }\n }\n }\n\n clear () {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n }\n\n /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */\n attachAll (skeleton: Skeleton, oldSkin: Skin) {\n let slotIndex = 0;\n for (let i = 0; i < skeleton.slots.length; i++) {\n let slot = skeleton.slots[i];\n let slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n let dictionary = oldSkin.attachments[slotIndex];\n for (let key in dictionary) {\n let skinAttachment:Attachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n let attachment = this.getAttachment(slotIndex, key);\n if (attachment != null) slot.setAttachment(attachment);\n break;\n }\n }\n } else {\n let attachmentName = slot.data.attachmentName;\n \n if (attachmentName != null) {\n let attachment = this.getAttachment(slotIndex, attachmentName);\n if (attachment != null)\n slot.setAttachment(attachment);\n } \n }\n slotIndex++;\n }\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class Slot {\n //this is for PIXI\n currentMesh: any;\n currentSprite: any;\n currentGraphics: any;\n clippingContainer: any;\n\n meshes: any;\n currentMeshName: string;\n sprites: any;\n currentSpriteName: string;\n\n blendMode: number;\n //assign hack region a bit later\n tempRegion: TextureRegion;\n tempAttachment: Attachment;\n\n //this is canon\n data: SlotData;\n bone: Bone;\n color: Color;\n darkColor: Color;\n private attachment: Attachment;\n private attachmentTime: number;\n deform = new Array();\n\n constructor (data: SlotData, bone: Bone) {\n if (data == null) throw new Error(\"data cannot be null.\");\n if (bone == null) throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new Color();\n this.darkColor = data.darkColor == null ? null : new Color();\n this.setToSetupPose();\n\n this.blendMode = this.data.blendMode;\n }\n\n /** @return May be null. */\n getAttachment (): Attachment {\n return this.attachment;\n }\n\n /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}.\n * @param attachment May be null. */\n setAttachment (attachment: Attachment) {\n if (this.attachment == attachment) return;\n this.attachment = attachment;\n this.attachmentTime = this.bone.skeleton.time;\n this.deform.length = 0;\n }\n\n setAttachmentTime (time: number) {\n this.attachmentTime = this.bone.skeleton.time - time;\n }\n\n /** Returns the time since the attachment was set. */\n getAttachmentTime (): number {\n return this.bone.skeleton.time - this.attachmentTime;\n }\n\n setToSetupPose () {\n this.color.setFromColor(this.data.color);\n if (this.darkColor != null) this.darkColor.setFromColor(this.data.darkColor);\n if (this.data.attachmentName == null)\n this.attachment = null;\n else {\n this.attachment = null;\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\n }\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class SlotData {\n index: number;\n name: string;\n boneData: BoneData;\n color = new Color(1, 1, 1, 1);\n darkColor: Color;\n attachmentName: string;\n blendMode: BlendMode;\n\n constructor (index: number, name: string, boneData: BoneData) {\n if (index < 0) throw new Error(\"index must be >= 0.\");\n if (name == null) throw new Error(\"name cannot be null.\");\n if (boneData == null) throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export abstract class Texture {\n protected _image: HTMLImageElement;\n\n constructor (image: HTMLImageElement) {\n this._image = image;\n }\n\n getImage (): HTMLImageElement {\n return this._image;\n }\n\n abstract setFilters (minFilter: TextureFilter, magFilter: TextureFilter): void;\n abstract setWraps (uWrap: TextureWrap, vWrap: TextureWrap): void;\n abstract dispose (): void;\n\n\n public static filterFromString (text: string): TextureFilter {\n switch (text.toLowerCase()) {\n case \"nearest\": return TextureFilter.Nearest;\n case \"linear\": return TextureFilter.Linear;\n case \"mipmap\": return TextureFilter.MipMap;\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\n default: throw new Error(`Unknown texture filter ${text}`);\n }\n }\n\n public static wrapFromString (text: string): TextureWrap {\n switch (text.toLowerCase()) {\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\n case \"repeat\": return TextureWrap.Repeat;\n default: throw new Error(`Unknown texture wrap ${text}`);\n }\n }\n }\n\n export enum TextureFilter {\n Nearest = 9728, // WebGLRenderingContext.NEAREST\n Linear = 9729, // WebGLRenderingContext.LINEAR\n MipMap = 9987, // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\n MipMapNearestNearest = 9984, // WebGLRenderingContext.NEAREST_MIPMAP_NEAREST\n MipMapLinearNearest = 9985, // WebGLRenderingContext.LINEAR_MIPMAP_NEAREST\n MipMapNearestLinear = 9986, // WebGLRenderingContext.NEAREST_MIPMAP_LINEAR\n MipMapLinearLinear = 9987 // WebGLRenderingContext.LINEAR_MIPMAP_LINEAR\n }\n\n export enum TextureWrap {\n MirroredRepeat = 33648, // WebGLRenderingContext.MIRRORED_REPEAT\n ClampToEdge = 33071, // WebGLRenderingContext.CLAMP_TO_EDGE\n Repeat = 10497 // WebGLRenderingContext.REPEAT\n }\n\n export class TextureRegion {\n texture: PIXI.Texture;\n\n //thats for overrides\n size: PIXI.Rectangle = null;\n\n get width(): number {\n const tex = this.texture;\n if (PIXI.VERSION[0] == '3') {\n return (tex as any).crop.width;\n }\n if (tex.trim) {\n return tex.trim.width;\n }\n return tex.orig.width;\n }\n\n get height(): number {\n const tex = this.texture;\n if (PIXI.VERSION[0] == '3') {\n return (tex as any).crop.height;\n }\n if (tex.trim) {\n return tex.trim.height;\n }\n return tex.orig.height;\n }\n\n get u(): number {\n return (this.texture as any)._uvs.x0;\n }\n\n get v(): number {\n return (this.texture as any)._uvs.y0;\n }\n\n get u2(): number {\n return (this.texture as any)._uvs.x2;\n }\n\n get v2(): number {\n return (this.texture as any)._uvs.y2;\n }\n\n get offsetX(): number {\n const tex = this.texture;\n return tex.trim ? tex.trim.x : 0;\n }\n\n get offsetY(): number {\n console.warn(\"Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on.\");\n return this.spineOffsetY;\n }\n\n get pixiOffsetY(): number {\n const tex = this.texture;\n return tex.trim ? tex.trim.y : 0;\n }\n\n get spineOffsetY(): number {\n let tex = this.texture;\n return this.originalHeight - this.height - (tex.trim ? tex.trim.y : 0);\n }\n\n get originalWidth(): number {\n let tex = this.texture;\n if (PIXI.VERSION[0] == '3') {\n if (tex.trim) {\n return tex.trim.width;\n }\n return (tex as any).crop.width;\n }\n return tex.orig.width;\n }\n\n get originalHeight(): number {\n const tex = this.texture;\n if (PIXI.VERSION[0] == '3') {\n if (tex.trim) {\n return tex.trim.height;\n }\n return (tex as any).crop.height;\n }\n return tex.orig.height;\n }\n\n get x(): number {\n return this.texture.frame.x;\n }\n\n get y(): number {\n return this.texture.frame.y;\n }\n\n get rotate(): boolean {\n return this.texture.rotate !== 0;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class TextureAtlas implements Disposable {\n pages = new Array();\n regions = new Array();\n\n constructor(atlasText?: string, textureLoader?: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback?: (obj: TextureAtlas) => any) {\n if (atlasText) {\n this.addSpineAtlas(atlasText, textureLoader, callback);\n }\n }\n\n addTexture(name: string, texture: PIXI.Texture) {\n let pages = this.pages;\n let page: TextureAtlasPage = null;\n for (let i = 0; i < pages.length; i++) {\n if (pages[i].baseTexture === texture.baseTexture) {\n page = pages[i];\n break;\n }\n }\n if (page === null) {\n page = new TextureAtlasPage();\n page.name = 'texturePage';\n let baseTexture = texture.baseTexture;\n page.width = baseTexture.realWidth;\n page.height = baseTexture.realHeight;\n page.baseTexture = baseTexture;\n //those fields are not relevant in Pixi\n page.minFilter = page.magFilter = TextureFilter.Nearest;\n page.uWrap = TextureWrap.ClampToEdge;\n page.vWrap = TextureWrap.ClampToEdge;\n pages.push(page);\n }\n let region = new TextureAtlasRegion();\n region.name = name;\n region.page = page;\n region.texture = texture;\n region.index = -1;\n this.regions.push(region);\n return region;\n }\n\n addTextureHash(textures: Map, stripExtension: boolean) {\n for (let key in textures) {\n if (textures.hasOwnProperty(key)) {\n this.addTexture(stripExtension && key.indexOf('.') !== -1 ? key.substr(0, key.lastIndexOf('.')) : key, textures[key]);\n }\n }\n }\n\n public addSpineAtlas(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {\n return this.load(atlasText, textureLoader, callback);\n }\n\n private load(atlasText: string, textureLoader: (path: string, loaderFunction: (tex: PIXI.BaseTexture) => any) => any, callback: (obj: TextureAtlas) => any) {\n if (textureLoader == null)\n throw new Error(\"textureLoader cannot be null.\");\n\n let reader = new TextureAtlasReader(atlasText);\n let tuple = new Array(4);\n let page: TextureAtlasPage = null;\n\n let iterateParser = () => {\n while (true) {\n let line = reader.readLine();\n if (line == null) {\n return callback && callback(this);\n }\n line = line.trim();\n if (line.length == 0)\n page = null;\n else if (!page) {\n page = new TextureAtlasPage();\n page.name = line;\n\n if (reader.readTuple(tuple) == 2) { // size is only optional for an atlas packed with an old TexturePacker.\n page.width = parseInt(tuple[0]);\n page.height = parseInt(tuple[1]);\n reader.readTuple(tuple);\n }\n // page.format = Format[tuple[0]]; we don't need format in WebGL\n\n reader.readTuple(tuple);\n page.minFilter = Texture.filterFromString(tuple[0]);\n page.magFilter = Texture.filterFromString(tuple[1]);\n\n let direction = reader.readValue();\n page.uWrap = TextureWrap.ClampToEdge;\n page.vWrap = TextureWrap.ClampToEdge;\n if (direction == \"x\")\n page.uWrap = TextureWrap.Repeat;\n else if (direction == \"y\")\n page.vWrap = TextureWrap.Repeat;\n else if (direction == \"xy\")\n page.uWrap = page.vWrap = TextureWrap.Repeat;\n\n textureLoader(line, (texture: PIXI.BaseTexture) => {\n if (texture === null) {\n this.pages.splice(this.pages.indexOf(page), 1);\n return callback && callback(null);\n }\n page.baseTexture = texture;\n if (!texture.hasLoaded) {\n texture.width = page.width;\n texture.height = page.height;\n }\n this.pages.push(page);\n page.setFilters();\n\n if (!page.width || !page.height) {\n page.width = texture.realWidth;\n page.height = texture.realHeight;\n if (!page.width || !page.height) {\n console.log(\"ERROR spine atlas page \" + page.name + \": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)\");\n }\n }\n iterateParser();\n });\n this.pages.push(page);\n break;\n } else {\n let region: TextureAtlasRegion = new TextureAtlasRegion();\n region.name = line;\n region.page = page;\n\n let rotateValue = reader.readValue();\n let rotate = 0;\n if (rotateValue.toLocaleLowerCase() == \"true\") {\n rotate = 6;\n } else if (rotateValue.toLocaleLowerCase() == \"false\") {\n rotate = 0;\n } else {\n rotate = ((720 - parseFloat(rotateValue))% 360) / 45;\n }\n\n reader.readTuple(tuple);\n let x = parseInt(tuple[0]);\n let y = parseInt(tuple[1]);\n\n reader.readTuple(tuple);\n let width = parseInt(tuple[0]);\n let height = parseInt(tuple[1]);\n\n let resolution = page.baseTexture.resolution;\n x /= resolution;\n y /= resolution;\n width /= resolution;\n height /= resolution;\n\n let frame = new PIXI.Rectangle(x, y, rotate ? height : width, rotate ? width : height);\n\n if (reader.readTuple(tuple) == 4) { // split is optional\n // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3]));\n\n if (reader.readTuple(tuple) == 4) { // pad is optional, but only present with splits\n //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3]));\n\n reader.readTuple(tuple);\n }\n }\n\n let originalWidth = parseInt(tuple[0]) / resolution;\n let originalHeight = parseInt(tuple[1]) / resolution;\n reader.readTuple(tuple);\n let offsetX = parseInt(tuple[0]) / resolution;\n let offsetY = parseInt(tuple[1]) / resolution;\n\n let orig = new PIXI.Rectangle(0, 0, originalWidth, originalHeight);\n let trim = new PIXI.Rectangle(offsetX, originalHeight - height - offsetY, width, height);\n\n //TODO: pixiv3 uses different frame/crop/trim\n\n if (PIXI.VERSION[0] != '3') {\n // pixi v4 or v5\n region.texture = new PIXI.Texture(region.page.baseTexture, frame, orig, trim, rotate);\n } else {\n // pixi v3.0.11\n let frame2 = new PIXI.Rectangle(x, y, width, height);\n let crop = frame2.clone();\n trim.width = originalWidth;\n trim.height = originalHeight;\n region.texture = new PIXI.Texture(region.page.baseTexture, frame2, crop, trim, rotate);\n }\n\n region.index = parseInt(reader.readValue());\n (region.texture as any)._updateUvs();\n\n this.regions.push(region);\n }\n }\n }\n\n iterateParser();\n }\n\n findRegion(name: string): TextureAtlasRegion {\n for (let i = 0; i < this.regions.length; i++) {\n if (this.regions[i].name == name) {\n return this.regions[i];\n }\n }\n return null;\n }\n\n dispose() {\n for (let i = 0; i < this.pages.length; i++) {\n this.pages[i].baseTexture.dispose();\n }\n }\n }\n\n class TextureAtlasReader {\n lines: Array;\n index: number = 0;\n\n constructor(text: string) {\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n\n readLine(): string {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n }\n\n readValue(): string {\n let line = this.readLine();\n let colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n return line.substring(colon + 1).trim();\n }\n\n readTuple(tuple: Array): number {\n let line = this.readLine();\n let colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n let i = 0, lastMatch = colon + 1;\n for (; i < 3; i++) {\n let comma = line.indexOf(\",\", lastMatch);\n if (comma == -1) break;\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n }\n tuple[i] = line.substring(lastMatch).trim();\n return i + 1;\n }\n }\n\n export class TextureAtlasPage {\n name: string;\n minFilter: TextureFilter;\n magFilter: TextureFilter;\n uWrap: TextureWrap;\n vWrap: TextureWrap;\n baseTexture: PIXI.BaseTexture;\n width: number;\n height: number;\n\n public setFilters() {\n let tex = this.baseTexture;\n let filter = this.minFilter;\n if (filter == TextureFilter.Linear) {\n tex.scaleMode = PIXI.SCALE_MODES.LINEAR;\n } else if (this.minFilter == TextureFilter.Nearest) {\n tex.scaleMode = PIXI.SCALE_MODES.NEAREST;\n } else {\n tex.mipmap = true;\n if (filter == TextureFilter.MipMapNearestNearest) {\n tex.scaleMode = PIXI.SCALE_MODES.NEAREST;\n } else {\n tex.scaleMode = PIXI.SCALE_MODES.LINEAR;\n }\n }\n }\n }\n\n export class TextureAtlasRegion extends TextureRegion {\n page: TextureAtlasPage;\n name: string;\n index: number;\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class TransformConstraint implements Updatable {\n data: TransformConstraintData;\n bones: Array;\n target: Bone;\n rotateMix = 0;\n translateMix = 0;\n scaleMix = 0;\n shearMix = 0;\n temp = new Vector2();\n active = false;\n\n constructor(data: TransformConstraintData, skeleton: Skeleton) {\n if (data == null) throw new Error(\"data cannot be null.\");\n if (skeleton == null) throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (let i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n\n isActive () {\n return this.active;\n }\n\n apply() {\n this.update();\n }\n\n update() {\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n\n } else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n }\n\n applyAbsoluteWorld() {\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\n shearMix = this.shearMix;\n let target = this.target;\n let targetMat = target.matrix;\n let ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect;\n let offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let modified = false;\n let mat = bone.matrix;\n\n if (rotateMix != 0) {\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r *= rotateMix;\n let cos = Math.cos(r), sin = Math.sin(r);\n mat.a = cos * a - sin * c;\n mat.c = cos * b - sin * d;\n mat.b = sin * a + cos * c;\n mat.d = sin * b + cos * d;\n modified = true;\n }\n\n if (translateMix != 0) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n mat.tx += (temp.x - mat.tx) * translateMix;\n mat.ty += (temp.y - mat.ty) * translateMix;\n modified = true;\n }\n\n if (scaleMix > 0) {\n let s = Math.sqrt(mat.a * mat.a + mat.b * mat.b);\n let ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n mat.a *= s;\n mat.b *= s;\n s = Math.sqrt(mat.c * mat.c + mat.d * mat.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001) s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n mat.c *= s;\n mat.d *= s;\n modified = true;\n }\n\n if (shearMix > 0) {\n let b = mat.c, d = mat.d;\n let by = Math.atan2(d, b);\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(mat.b, mat.a));\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI)\n r += MathUtils.PI2;\n r = by + (r + offsetShearY) * shearMix;\n let s = Math.sqrt(b * b + d * d);\n mat.c = Math.cos(r) * s;\n mat.d = Math.sin(r) * s;\n modified = true;\n }\n\n if (modified) bone.appliedValid = false;\n }\n }\n\n applyRelativeWorld() {\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\n shearMix = this.shearMix;\n let target = this.target;\n let targetMat = target.matrix;\n let ta = targetMat.a, tb = targetMat.c, tc = targetMat.b, td = targetMat.d;\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\n let offsetRotation = this.data.offsetRotation * degRadReflect,\n offsetShearY = this.data.offsetShearY * degRadReflect;\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let modified = false;\n let mat = bone.matrix;\n\n if (rotateMix != 0) {\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\n let r = Math.atan2(tc, ta) + offsetRotation;\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI) r += MathUtils.PI2;\n r *= rotateMix;\n let cos = Math.cos(r), sin = Math.sin(r);\n mat.a = cos * a - sin * c;\n mat.c = cos * b - sin * d;\n mat.b = sin * a + cos * c;\n mat.d = sin * b + cos * d;\n modified = true;\n }\n\n if (translateMix != 0) {\n let temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n mat.tx += temp.x * translateMix;\n mat.ty += temp.y * translateMix;\n modified = true;\n }\n\n if (scaleMix > 0) {\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\n mat.a *= s;\n mat.b *= s;\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\n mat.c *= s;\n mat.d *= s;\n modified = true;\n }\n\n if (shearMix > 0) {\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > MathUtils.PI)\n r -= MathUtils.PI2;\n else if (r < -MathUtils.PI) r += MathUtils.PI2;\n let b = mat.c, d = mat.d;\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * shearMix;\n let s = Math.sqrt(b * b + d * d);\n mat.c = Math.cos(r) * s;\n mat.d = Math.sin(r) * s;\n modified = true;\n }\n\n if (modified) bone.appliedValid = false;\n }\n }\n\n applyAbsoluteLocal() {\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\n shearMix = this.shearMix;\n let target = this.target;\n if (!target.appliedValid) target.updateAppliedTransform();\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (!bone.appliedValid) bone.updateAppliedTransform();\n\n let rotation = bone.arotation;\n if (rotateMix != 0) {\n let r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n rotation += r * rotateMix;\n }\n\n let x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax - x + this.data.offsetX) * translateMix;\n y += (target.ay - y + this.data.offsetY) * translateMix;\n }\n\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix > 0) {\n if (scaleX > 0.00001) scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\n if (scaleY > 0.00001) scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\n }\n\n let shearY = bone.ashearY;\n if (shearMix > 0) {\n let r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n bone.shearY += r * shearMix;\n }\n\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n\n applyRelativeLocal() {\n let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix,\n shearMix = this.shearMix;\n let target = this.target;\n if (!target.appliedValid) target.updateAppliedTransform();\n let bones = this.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n if (!bone.appliedValid) bone.updateAppliedTransform();\n\n let rotation = bone.arotation;\n if (rotateMix != 0) rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\n\n let x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax + this.data.offsetX) * translateMix;\n y += (target.ay + this.data.offsetY) * translateMix;\n }\n\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix > 0) {\n if (scaleX > 0.00001) scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\n if (scaleY > 0.00001) scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\n }\n\n let shearY = bone.ashearY;\n if (shearMix > 0) shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\n\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n }\n }\n\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class TransformConstraintData extends ConstraintData {\n bones = new Array();\n target: BoneData;\n rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0;\n offsetRotation = 0; offsetX = 0; offsetY = 0; offsetScaleX = 0; offsetScaleY = 0; offsetShearY = 0;\n relative = false;\n local = false;\n\n constructor (name: string) {\n super(name, 0, false);\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n\texport class Triangulator {\n\t\tprivate convexPolygons = new Array>();\n\t\tprivate convexPolygonsIndices = new Array>();\n\n\t\tprivate indicesArray = new Array();\n\t\tprivate isConcaveArray = new Array();\n\t\tprivate triangles = new Array();\n\n\t\tprivate polygonPool = new Pool>(() => {\n\t\t\treturn new Array();\n\t\t});\n\n\t\tprivate polygonIndicesPool = new Pool>(() => {\n\t\t\treturn new Array();\n\t\t});\n\n\t\tpublic triangulate (verticesArray: ArrayLike): Array {\n\t\t\tlet vertices = verticesArray;\n\t\t\tlet vertexCount = verticesArray.length >> 1;\n\n\t\t\tlet indices = this.indicesArray;\n\t\t\tindices.length = 0;\n\t\t\tfor (let i = 0; i < vertexCount; i++)\n\t\t\t\tindices[i] = i;\n\n\t\t\tlet isConcave = this.isConcaveArray;\n\t\t\tisConcave.length = 0;\n\t\t\tfor (let i = 0, n = vertexCount; i < n; ++i)\n\t\t\t\tisConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n\n\t\t\tlet triangles = this.triangles;\n\t\t\ttriangles.length = 0;\n\n\t\t\twhile (vertexCount > 3) {\n\t\t\t\t// Find ear tip.\n\t\t\t\tlet previous = vertexCount - 1, i = 0, next = 1;\n\t\t\t\twhile (true) {\n\t\t\t\t\touter:\n\t\t\t\t\tif (!isConcave[i]) {\n\t\t\t\t\t\tlet p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n\t\t\t\t\t\tlet p1x = vertices[p1], p1y = vertices[p1 + 1];\n\t\t\t\t\t\tlet p2x = vertices[p2], p2y = vertices[p2 + 1];\n\t\t\t\t\t\tlet p3x = vertices[p3], p3y = vertices[p3 + 1];\n\t\t\t\t\t\tfor (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n\t\t\t\t\t\t\tif (!isConcave[ii]) continue;\n\t\t\t\t\t\t\tlet v = indices[ii] << 1;\n\t\t\t\t\t\t\tlet vx = vertices[v], vy = vertices[v + 1];\n\t\t\t\t\t\t\tif (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\n\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\n\t\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy)) break outer;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (next == 0) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif (!isConcave[i]) break;\n\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t} while (i > 0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tprevious = i;\n\t\t\t\t\ti = next;\n\t\t\t\t\tnext = (next + 1) % vertexCount;\n\t\t\t\t}\n\n\t\t\t\t// Cut ear tip.\n\t\t\t\ttriangles.push(indices[(vertexCount + i - 1) % vertexCount]);\n\t\t\t\ttriangles.push(indices[i]);\n\t\t\t\ttriangles.push(indices[(i + 1) % vertexCount]);\n\t\t\t\tindices.splice(i, 1);\n\t\t\t\tisConcave.splice(i, 1);\n\t\t\t\tvertexCount--;\n\n\t\t\t\tlet previousIndex = (vertexCount + i - 1) % vertexCount;\n\t\t\t\tlet nextIndex = i == vertexCount ? 0 : i;\n\t\t\t\tisConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\n\t\t\t\tisConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\n\t\t\t}\n\n\t\t\tif (vertexCount == 3) {\n\t\t\t\ttriangles.push(indices[2]);\n\t\t\t\ttriangles.push(indices[0]);\n\t\t\t\ttriangles.push(indices[1]);\n\t\t\t}\n\n\t\t\treturn triangles;\n\t\t}\n\n\t\tdecompose (verticesArray: Array, triangles: Array) : Array> {\n\t\t\tlet vertices = verticesArray;\n\t\t\tlet convexPolygons = this.convexPolygons;\n\t\t\tthis.polygonPool.freeAll(convexPolygons);\n\t\t\tconvexPolygons.length = 0;\n\n\t\t\tlet convexPolygonsIndices = this.convexPolygonsIndices;\n\t\t\tthis.polygonIndicesPool.freeAll(convexPolygonsIndices);\n\t\t\tconvexPolygonsIndices.length = 0;\n\n\t\t\tlet polygonIndices = this.polygonIndicesPool.obtain();\n\t\t\tpolygonIndices.length = 0;\n\n\t\t\tlet polygon = this.polygonPool.obtain();\n\t\t\tpolygon.length = 0;\n\n\t\t\t// Merge subsequent triangles if they form a triangle fan.\n\t\t\tlet fanBaseIndex = -1, lastWinding = 0;\n\t\t\tfor (let i = 0, n = triangles.length; i < n; i += 3) {\n\t\t\t\tlet t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n\t\t\t\tlet x1 = vertices[t1], y1 = vertices[t1 + 1];\n\t\t\t\tlet x2 = vertices[t2], y2 = vertices[t2 + 1];\n\t\t\t\tlet x3 = vertices[t3], y3 = vertices[t3 + 1];\n\n\t\t\t\t// If the base of the last triangle is the same as this triangle, check if they form a convex polygon (triangle fan).\n\t\t\t\tlet merged = false;\n\t\t\t\tif (fanBaseIndex == t1) {\n\t\t\t\t\tlet o = polygon.length - 4;\n\t\t\t\t\tlet winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n\t\t\t\t\tlet winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\n\t\t\t\t\tif (winding1 == lastWinding && winding2 == lastWinding) {\n\t\t\t\t\t\tpolygon.push(x3);\n\t\t\t\t\t\tpolygon.push(y3);\n\t\t\t\t\t\tpolygonIndices.push(t3);\n\t\t\t\t\t\tmerged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Otherwise make this triangle the new base.\n\t\t\t\tif (!merged) {\n\t\t\t\t\tif (polygon.length > 0) {\n\t\t\t\t\t\tconvexPolygons.push(polygon);\n\t\t\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.polygonPool.free(polygon)\n\t\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\n\t\t\t\t\t}\n\t\t\t\t\tpolygon = this.polygonPool.obtain();\n\t\t\t\t\tpolygon.length = 0;\n\t\t\t\t\tpolygon.push(x1);\n\t\t\t\t\tpolygon.push(y1);\n\t\t\t\t\tpolygon.push(x2);\n\t\t\t\t\tpolygon.push(y2);\n\t\t\t\t\tpolygon.push(x3);\n\t\t\t\t\tpolygon.push(y3);\n\t\t\t\t\tpolygonIndices = this.polygonIndicesPool.obtain();\n\t\t\t\t\tpolygonIndices.length = 0;\n\t\t\t\t\tpolygonIndices.push(t1);\n\t\t\t\t\tpolygonIndices.push(t2);\n\t\t\t\t\tpolygonIndices.push(t3);\n\t\t\t\t\tlastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\n\t\t\t\t\tfanBaseIndex = t1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (polygon.length > 0) {\n\t\t\t\tconvexPolygons.push(polygon);\n\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\n\t\t\t}\n\n\t\t\t// Go through the list of polygons and try to merge the remaining triangles with the found triangle fans.\n\t\t\tfor (let i = 0, n = convexPolygons.length; i < n; i++) {\n\t\t\t\tpolygonIndices = convexPolygonsIndices[i];\n\t\t\t\tif (polygonIndices.length == 0) continue;\n\t\t\t\tlet firstIndex = polygonIndices[0];\n\t\t\t\tlet lastIndex = polygonIndices[polygonIndices.length - 1];\n\n\t\t\t\tpolygon = convexPolygons[i];\n\t\t\t\tlet o = polygon.length - 4;\n\t\t\t\tlet prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n\t\t\t\tlet prevX = polygon[o + 2], prevY = polygon[o + 3];\n\t\t\t\tlet firstX = polygon[0], firstY = polygon[1];\n\t\t\t\tlet secondX = polygon[2], secondY = polygon[3];\n\t\t\t\tlet winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n\n\t\t\t\tfor (let ii = 0; ii < n; ii++) {\n\t\t\t\t\tif (ii == i) continue;\n\t\t\t\t\tlet otherIndices = convexPolygonsIndices[ii];\n\t\t\t\t\tif (otherIndices.length != 3) continue;\n\t\t\t\t\tlet otherFirstIndex = otherIndices[0];\n\t\t\t\t\tlet otherSecondIndex = otherIndices[1];\n\t\t\t\t\tlet otherLastIndex = otherIndices[2];\n\n\t\t\t\t\tlet otherPoly = convexPolygons[ii];\n\t\t\t\t\tlet x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n\n\t\t\t\t\tif (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) continue;\n\t\t\t\t\tlet winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n\t\t\t\t\tlet winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\n\t\t\t\t\tif (winding1 == winding && winding2 == winding) {\n\t\t\t\t\t\totherPoly.length = 0;\n\t\t\t\t\t\totherIndices.length = 0;\n\t\t\t\t\t\tpolygon.push(x3);\n\t\t\t\t\t\tpolygon.push(y3);\n\t\t\t\t\t\tpolygonIndices.push(otherLastIndex);\n\t\t\t\t\t\tprevPrevX = prevX;\n\t\t\t\t\t\tprevPrevY = prevY;\n\t\t\t\t\t\tprevX = x3;\n\t\t\t\t\t\tprevY = y3;\n\t\t\t\t\t\tii = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove empty polygons that resulted from the merge step above.\n\t\t\tfor (let i = convexPolygons.length - 1; i >= 0; i--) {\n\t\t\t\tpolygon = convexPolygons[i];\n\t\t\t\tif (polygon.length == 0) {\n\t\t\t\t\tconvexPolygons.splice(i, 1);\n\t\t\t\t\tthis.polygonPool.free(polygon);\n\t\t\t\t\tpolygonIndices = convexPolygonsIndices[i]\n\t\t\t\t\tconvexPolygonsIndices.splice(i, 1)\n\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn convexPolygons;\n\t\t}\n\n\t\tprivate static isConcave (index: number, vertexCount: number, vertices: ArrayLike, indices: ArrayLike): boolean {\n\t\t\tlet previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n\t\t\tlet current = indices[index] << 1;\n\t\t\tlet next = indices[(index + 1) % vertexCount] << 1;\n\t\t\treturn !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next],\n\t\t\t\tvertices[next + 1]);\n\t\t}\n\n\t\tprivate static positiveArea (p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): boolean {\n\t\t\treturn p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n\t\t}\n\n\t\tprivate static winding (p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): number {\n\t\t\tlet px = p2x - p1x, py = p2y - p1y;\n\t\t\treturn p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n\t\t}\n\t}\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export interface Updatable {\n update(): void;\n\n isActive(): boolean;\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export interface Map {\n [key: string]: T;\n }\n\n export class IntSet {\n array = new Array();\n\n add (value: number): boolean {\n let contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n }\n\n contains (value: number) {\n return this.array[value | 0] != undefined;\n }\n\n remove (value: number) {\n this.array[value | 0] = undefined;\n }\n\n clear () {\n this.array.length = 0;\n }\n }\n\n export interface Disposable {\n dispose (): void;\n }\n\n export interface Restorable {\n restore (): void;\n }\n\n export class Color {\n public static WHITE = new Color(1, 1, 1, 1);\n public static RED = new Color(1, 0, 0, 1);\n public static GREEN = new Color(0, 1, 0, 1);\n public static BLUE = new Color(0, 0, 1, 1);\n public static MAGENTA = new Color(1, 0, 1, 1);\n\n constructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) {\n }\n\n set (r: number, g: number, b: number, a: number) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n }\n\n setFromColor (c: Color) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n }\n\n setFromString (hex: string) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n }\n\n add (r: number, g: number, b: number, a: number) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n }\n\n clamp () {\n if (this.r < 0) this.r = 0;\n else if (this.r > 1) this.r = 1;\n\n if (this.g < 0) this.g = 0;\n else if (this.g > 1) this.g = 1;\n\n if (this.b < 0) this.b = 0;\n else if (this.b > 1) this.b = 1;\n\n if (this.a < 0) this.a = 0;\n else if (this.a > 1) this.a = 1;\n return this;\n }\n\n static rgba8888ToColor(color: Color, value: number) {\n color.r = ((value & 0xff000000) >>> 24) / 255;\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\n color.a = ((value & 0x000000ff)) / 255;\n }\n\n static rgb888ToColor (color: Color, value: number) {\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\n color.b = ((value & 0x000000ff)) / 255;\n }\n }\n\n export class MathUtils {\n static PI = 3.1415927;\n static PI2 = MathUtils.PI * 2;\n static radiansToDegrees = 180 / MathUtils.PI;\n static radDeg = MathUtils.radiansToDegrees;\n static degreesToRadians = MathUtils.PI / 180;\n static degRad = MathUtils.degreesToRadians;\n\n static clamp (value: number, min: number, max: number) {\n if (value < min) return min;\n if (value > max) return max;\n return value;\n }\n\n static cosDeg (degrees: number) {\n return Math.cos(degrees * MathUtils.degRad);\n }\n\n static sinDeg (degrees: number) {\n return Math.sin(degrees * MathUtils.degRad);\n }\n\n static signum (value: number): number {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n }\n\n static toInt (x: number) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n }\n\n static cbrt (x: number) {\n let y = Math.pow(Math.abs(x), 1/3);\n return x < 0 ? -y : y;\n }\n\n static randomTriangular (min: number, max: number): number {\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n }\n\n static randomTriangularWith (min: number, max: number, mode: number): number {\n let u = Math.random();\n let d = max - min;\n if (u <= (mode - min) / d) return min + Math.sqrt(u * d * (mode - min));\n return max - Math.sqrt((1 - u) * d * (max - mode));\n }\n }\n\n export abstract class Interpolation {\n protected abstract applyInternal (a: number): number;\n apply(start: number, end: number, a: number): number {\n return start + (end - start) * this.applyInternal(a);\n }\n }\n\n export class Pow extends Interpolation {\n protected power = 2;\n\n constructor (power: number) {\n super();\n this.power = power;\n }\n\n applyInternal (a: number): number {\n if (a <= 0.5) return Math.pow(a * 2, this.power) / 2;\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\n }\n }\n\n export class PowOut extends Pow {\n constructor (power: number) {\n super(power);\n }\n\n applyInternal (a: number) : number {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n }\n }\n\n export class Utils {\n static SUPPORTS_TYPED_ARRAYS = typeof(Float32Array) !== \"undefined\";\n\n static arrayCopy (source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number) {\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n }\n\n static setArraySize (array: Array, size: number, value: any = 0): Array {\n let oldSize = array.length;\n if (oldSize == size) return array;\n array.length = size;\n if (oldSize < size) {\n for (let i = oldSize; i < size; i++) array[i] = value;\n }\n return array;\n }\n\n static ensureArrayCapacity (array: Array, size: number, value: any = 0): Array {\n if (array.length >= size) return array;\n return Utils.setArraySize(array, size, value);\n }\n\n static newArray (size: number, defaultValue: T): Array {\n let array = new Array(size);\n for (let i = 0; i < size; i++) array[i] = defaultValue;\n return array;\n }\n\n static newFloatArray (size: number): ArrayLike {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size)\n } else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++) array[i] = 0;\n return array;\n }\n }\n\n static newShortArray (size: number): ArrayLike {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Int16Array(size)\n } else {\n let array = new Array(size);\n for (let i = 0; i < array.length; i++) array[i] = 0;\n return array;\n }\n }\n\n static toFloatArray (array: Array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n }\n\n static toSinglePrecision (value: number) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n }\n\n // This function is used to fix WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109\n static webkit602BugfixHelper (alpha: number, blend: MixBlend) {\n\n }\n\n static contains (array: Array, element: T, identity = true) {\n for (let i = 0; i < array.length; i++) {\n if (array[i] == element) return true;\n }\n return false;\n }\n }\n\n export class DebugUtils {\n static logBones(skeleton: Skeleton) {\n for (let i = 0; i < skeleton.bones.length; i++) {\n let bone = skeleton.bones[i];\n let mat = bone.matrix;\n console.log(bone.data.name + \", \" + mat.a + \", \" + mat.b + \", \" + mat.c + \", \" + mat.d + \", \" + mat.tx + \", \" + mat.ty);\n }\n }\n }\n\n export class Pool {\n private items = new Array();\n private instantiator: () => T;\n\n constructor (instantiator: () => T) {\n this.instantiator = instantiator;\n }\n\n obtain () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n }\n\n free (item: T) {\n if ((item as any).reset) (item as any).reset();\n this.items.push(item);\n }\n\n freeAll (items: ArrayLike) {\n for (let i = 0; i < items.length; i++) {\n if ((items[i] as any).reset) (items[i] as any).reset();\n this.items[i] = items[i];\n }\n }\n\n clear () {\n this.items.length = 0;\n }\n }\n\n export class Vector2 {\n constructor (public x = 0, public y = 0) {\n }\n\n set (x: number, y: number): Vector2 {\n this.x = x;\n this.y = y;\n return this;\n }\n\n length () {\n let x = this.x;\n let y = this.y;\n return Math.sqrt(x * x + y * y);\n }\n\n normalize () {\n let len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n }\n }\n\n export class TimeKeeper {\n maxDelta = 0.064;\n framesPerSecond = 0;\n delta = 0;\n totalTime = 0;\n\n private lastTime = Date.now() / 1000;\n private frameCount = 0;\n private frameTime = 0;\n\n update () {\n let now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta) this.delta = this.maxDelta;\n this.lastTime = now;\n\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n }\n }\n\n export interface ArrayLike {\n length: number;\n [n: number]: T;\n }\n\n export class WindowedMean {\n values: Array;\n addedValues = 0;\n lastValue = 0;\n mean = 0;\n dirty = true;\n\n constructor (windowSize: number = 32) {\n this.values = new Array(windowSize);\n }\n\n hasEnoughData () {\n return this.addedValues >= this.values.length;\n }\n\n addValue (value: number) {\n if (this.addedValues < this.values.length)\n this.addedValues++;\n this.values[this.lastValue++] = value;\n if (this.lastValue > this.values.length - 1) this.lastValue = 0;\n this.dirty = true;\n }\n\n getMean () {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n let mean = 0;\n for (let i = 0; i < this.values.length; i++) {\n mean += this.values[i];\n }\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n } else {\n return 0;\n }\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n\texport interface VertexEffect {\n\t\tbegin(skeleton: Skeleton): void;\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void;\n\t\tend(): void;\n\t}\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export abstract class Attachment {\n name: string;\n\n constructor(name: string) {\n if (name == null) throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n\n abstract copy (): Attachment;\n }\n\n export abstract class VertexAttachment extends Attachment {\n private static nextID = 0;\n\n id = (VertexAttachment.nextID++ & 65535) << 11;\n bones: Array;\n vertices: ArrayLike;\n worldVerticesLength = 0;\n deformAttachment: VertexAttachment = this;\n\n constructor(name: string) {\n super(name);\n }\n\n computeWorldVerticesOld(slot: Slot, worldVertices: ArrayLike) {\n this.computeWorldVertices(slot, 0, this.worldVerticesLength, worldVertices, 0, 2);\n }\n\n /** Transforms local vertices to world coordinates.\n * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y.\n * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start.\n * @param worldVertices The output world vertices. Must have a length >= offset + count.\n * @param offset The worldVertices index to begin writing values. */\n computeWorldVertices (slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number, stride: number) {\n count = offset + (count >> 1) * stride;\n let skeleton = slot.bone.skeleton;\n let deformArray = slot.deform;\n let vertices = this.vertices;\n let bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0) vertices = deformArray;\n let mat = slot.bone.matrix;\n let x = mat.tx;\n let y = mat.ty;\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\n for (let v = start, w = offset; w < count; v += 2, w += stride) {\n let vx = vertices[v], vy = vertices[v + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n let v = 0, skip = 0;\n for (let i = 0; i < start; i += 2) {\n let n = bones[v];\n v += n + 1;\n skip += n;\n }\n let skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (let w = offset, b = skip * 3; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n let mat = skeletonBones[bones[v]].matrix;\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\n wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n } else {\n let deform = deformArray;\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n let wx = 0, wy = 0;\n let n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n let mat = skeletonBones[bones[v]].matrix;\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * mat.a + vy * mat.c + mat.tx) * weight;\n wy += (vx * mat.b + vy * mat.d + mat.ty) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n }\n\n copyTo (attachment: VertexAttachment) {\n if (this.bones != null) {\n attachment.bones = new Array(this.bones.length);\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n } else\n attachment.bones = null;\n\n if (this.vertices != null) {\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n } else\n attachment.vertices = null;\n\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.deformAttachment = this.deformAttachment;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export interface AttachmentLoader {\n /** @return May be null to not load an attachment. */\n newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment;\n\n /** @return May be null to not load an attachment. */\n newMeshAttachment (skin: Skin, name: string, path: string): MeshAttachment;\n\n /** @return May be null to not load an attachment. */\n newBoundingBoxAttachment (skin: Skin, name: string): BoundingBoxAttachment;\n\n /** @return May be null to not load an attachment */\n newPathAttachment(skin: Skin, name: string): PathAttachment;\n\n /** @return May be null to not load an attachment */\n newPointAttachment(skin: Skin, name: string): PointAttachment;\n\n /** @return May be null to not load an attachment */\n newClippingAttachment(skin: Skin, name: string): ClippingAttachment;\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export enum AttachmentType {\n Region, BoundingBox, Mesh, LinkedMesh, Path, Point, Clipping\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class BoundingBoxAttachment extends VertexAttachment {\n color = new Color(1, 1, 1, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new BoundingBoxAttachment(name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class ClippingAttachment extends VertexAttachment {\n endSlot: SlotData;\n\n // Nonessential.\n color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new ClippingAttachment(name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class MeshAttachment extends VertexAttachment {\n region: TextureRegion;\n path: string;\n regionUVs: Float32Array; uvs: ArrayLike;\n triangles: Array;\n color = new Color(1, 1, 1, 1);\n width: number;\n height: number;\n hullLength: number;\n edges: Array;\n private parentMesh: MeshAttachment;\n tempColor = new Color(0, 0, 0, 0);\n\n constructor (name: string) {\n super(name);\n }\n\n updateUVs(region: TextureRegion, uvs: ArrayLike): ArrayLike {\n let regionUVs = this.regionUVs;\n let n = regionUVs.length;\n if (!uvs || uvs.length != n) {\n uvs = Utils.newFloatArray(n);\n }\n\n if (region == null) {\n return;\n }\n\n let texture = region.texture;\n let r = (texture as any)._uvs;\n let w1 = region.width, h1 = region.height, w2 = region.originalWidth, h2 = region.originalHeight;\n let x = region.offsetX, y = region.pixiOffsetY;\n\n for (let i = 0; i < n; i += 2) {\n let u = this.regionUVs[i], v = this.regionUVs[i + 1];\n u = (u * w2 - x) / w1;\n v = (v * h2 - y) / h1;\n uvs[i] = (r.x0 * (1 - u) + r.x1 * u) * (1 - v) + (r.x3 * (1 - u) + r.x2 * u) * v;\n uvs[i + 1] = (r.y0 * (1 - u) + r.y1 * u) * (1 - v) + (r.y3 * (1 - u) + r.y2 * u) * v;\n }\n\n return uvs;\n }\n\n getParentMesh () {\n return this.parentMesh;\n }\n\n /** @param parentMesh May be null. */\n setParentMesh (parentMesh: MeshAttachment) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n this.worldVerticesLength = parentMesh.worldVerticesLength\n }\n }\n\n copy (): Attachment {\n if (this.parentMesh != null) return this.newLinkedMesh();\n\n let copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n\n this.copyTo(copy);\n copy.regionUVs = new Float32Array(this.regionUVs.length);\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n\n // Nonessential.\n if (this.edges != null) {\n copy.edges = new Array(this.edges.length);\n Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\n }\n copy.width = this.width;\n copy.height = this.height;\n\n return copy;\n }\n\n newLinkedMesh (): MeshAttachment {\n let copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n copy.deformAttachment = this.deformAttachment;\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\n // copy.updateUVs();\n return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class PathAttachment extends VertexAttachment {\n lengths: Array;\n closed = false; constantSpeed = false;\n color = new Color(1, 1, 1, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n copy (): Attachment {\n let copy = new PathAttachment(name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\n copy.closed = closed;\n copy.constantSpeed = this.constantSpeed;\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class PointAttachment extends VertexAttachment {\n x: number; y: number; rotation: number;\n color = new Color(0.38, 0.94, 0, 1);\n\n constructor (name: string) {\n super(name);\n }\n\n computeWorldPosition(bone: Bone, point: Vector2) {\n const mat = bone.matrix;\n point.x = this.x * mat.a + this.y * mat.c + bone.worldX;\n point.y = this.x * mat.b + this.y * mat.d + bone.worldY;\n return point;\n }\n\n computeWorldRotation(bone: Bone) {\n const mat = bone.matrix;\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\n let x = cos * mat.a + sin * mat.c;\n let y = cos * mat.b + sin * mat.d;\n return Math.atan2(y, x) * MathUtils.radDeg;\n }\n\n copy (): Attachment {\n let copy = new PointAttachment(name);\n copy.x = this.x;\n copy.y = this.y;\n copy.rotation = this.rotation;\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License\n * Version 2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n export class RegionAttachment extends Attachment {\n static OX1 = 0;\n static OY1 = 1;\n static OX2 = 2;\n static OY2 = 3;\n static OX3 = 4;\n static OY3 = 5;\n static OX4 = 6;\n static OY4 = 7;\n\n static X1 = 0;\n static Y1 = 1;\n static C1R = 2;\n static C1G = 3;\n static C1B = 4;\n static C1A = 5;\n static U1 = 6;\n static V1 = 7;\n\n static X2 = 8;\n static Y2 = 9;\n static C2R = 10;\n static C2G = 11;\n static C2B = 12;\n static C2A = 13;\n static U2 = 14;\n static V2 = 15;\n\n static X3 = 16;\n static Y3 = 17;\n static C3R = 18;\n static C3G = 19;\n static C3B = 20;\n static C3A = 21;\n static U3 = 22;\n static V3 = 23;\n\n static X4 = 24;\n static Y4 = 25;\n static C4R = 26;\n static C4G = 27;\n static C4B = 28;\n static C4A = 29;\n static U4 = 30;\n static V4 = 31;\n\n x = 0;\n y = 0;\n scaleX = 1;\n scaleY = 1;\n rotation = 0;\n width = 0;\n height = 0;\n color = new Color(1, 1, 1, 1);\n\n path: string;\n rendererObject: any;\n region: TextureRegion;\n\n offset = Utils.newFloatArray(8);\n uvs = Utils.newFloatArray(8);\n\n tempColor = new Color(1, 1, 1, 1);\n\n constructor(name: string) {\n super(name);\n }\n\n updateOffset(): void {\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n let localX2 = localX + this.region.width * regionScaleX;\n let localY2 = localY + this.region.height * regionScaleY;\n let radians = this.rotation * Math.PI / 180;\n let cos = Math.cos(radians);\n let sin = Math.sin(radians);\n let localXCos = localX * cos + this.x;\n let localXSin = localX * sin;\n let localYCos = localY * cos + this.y;\n let localYSin = localY * sin;\n let localX2Cos = localX2 * cos + this.x;\n let localX2Sin = localX2 * sin;\n let localY2Cos = localY2 * cos + this.y;\n let localY2Sin = localY2 * sin;\n let offset = this.offset;\n offset[RegionAttachment.OX1] = localXCos - localYSin;\n offset[RegionAttachment.OY1] = localYCos + localXSin;\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\n }\n\n setRegion(region: TextureRegion): void {\n this.region = region;\n let uvs = this.uvs;\n if (region.rotate) {\n uvs[2] = region.u;\n uvs[3] = region.v2;\n uvs[4] = region.u;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v;\n uvs[0] = region.u2;\n uvs[1] = region.v2;\n } else {\n uvs[0] = region.u;\n uvs[1] = region.v2;\n uvs[2] = region.u;\n uvs[3] = region.v;\n uvs[4] = region.u2;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v2;\n }\n }\n\n computeWorldVertices(bone: Bone, worldVertices: ArrayLike, offset: number, stride: number) {\n let vertexOffset = this.offset;\n let mat = bone.matrix;\n let x = mat.tx, y = mat.ty;\n let a = mat.a, b = mat.c, c = mat.b, d = mat.d;\n let offsetX = 0, offsetY = 0;\n\n offsetX = vertexOffset[RegionAttachment.OX1];\n offsetY = vertexOffset[RegionAttachment.OY1];\n worldVertices[offset] = offsetX * a + offsetY * b + x; // br\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n\n offsetX = vertexOffset[RegionAttachment.OX2];\n offsetY = vertexOffset[RegionAttachment.OY2];\n worldVertices[offset] = offsetX * a + offsetY * b + x; // bl\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n\n offsetX = vertexOffset[RegionAttachment.OX3];\n offsetY = vertexOffset[RegionAttachment.OY3];\n worldVertices[offset] = offsetX * a + offsetY * b + x; // ul\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n\n offsetX = vertexOffset[RegionAttachment.OX4];\n offsetY = vertexOffset[RegionAttachment.OY4];\n worldVertices[offset] = offsetX * a + offsetY * b + x; // ur\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n }\n\n copy (): Attachment {\n let copy = new RegionAttachment(name);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\n copy.path = this.path;\n copy.x = this.x;\n copy.y = this.y;\n copy.scaleX = this.scaleX;\n copy.scaleY = this.scaleY;\n copy.rotation = this.rotation;\n copy.width = this.width;\n copy.height = this.height;\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n return copy;\n }\n }\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n\texport class JitterEffect implements VertexEffect {\n\t\tjitterX = 0;\n\t\tjitterY = 0;\n\n\t\tconstructor (jitterX: number, jitterY: number) {\n\t\t\tthis.jitterX = jitterX;\n\t\t\tthis.jitterY = jitterY;\n\t\t}\n\n\t\tbegin(skeleton: Skeleton): void {\n\t\t}\n\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void {\n\t\t\tposition.x += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n\t\t\tposition.y += MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n\t\t}\n\n\t\tend(): void {\n\t\t}\n\t}\n}\n","/******************************************************************************\n * Spine Runtimes Software License v2.5\n *\n * Copyright (c) 2013-2016, Esoteric Software\n * All rights reserved.\n *\n * You are granted a perpetual, non-exclusive, non-sublicensable, and\n * non-transferable license to use, install, execute, and perform the Spine\n * Runtimes software and derivative works solely for personal or internal\n * use. Without the written permission of Esoteric Software (see Section 2 of\n * the Spine Software License Agreement), you may not (a) modify, translate,\n * adapt, or develop new applications using the Spine Runtimes or otherwise\n * create derivative works or improvements of the Spine Runtimes or (b) remove,\n * delete, alter, or obscure any trademarks or any copyright, trademark, patent,\n * or other intellectual property or proprietary rights notices on or in the\n * Software, including any copy thereof. Redistributions in binary or source\n * form must include this license and terms.\n *\n * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF\n * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\nnamespace pixi_spine.core {\n\texport class SwirlEffect implements VertexEffect {\n\t\tstatic interpolation = new PowOut(2);\n\t\tcenterX = 0;\n\t\tcenterY = 0;\n\t\tradius = 0;\n\t\tangle = 0;\n\t\tprivate worldX = 0;\n\t\tprivate worldY = 0;\n\n\t\tconstructor (radius: number) {\n\t\t\tthis.radius = radius;\n\t\t}\n\n\t\tbegin(skeleton: Skeleton): void {\n\t\t\tthis.worldX = skeleton.x + this.centerX;\n\t\t\tthis.worldY = skeleton.y + this.centerY;\n\t\t}\n\n\t\ttransform(position: Vector2, uv: Vector2, light: Color, dark: Color): void {\n\t\t\tlet radAngle = this.angle * MathUtils.degreesToRadians;\n\t\t\tlet x = position.x - this.worldX;\n\t\t\tlet y = position.y - this.worldY;\n\t\t\tlet dist = Math.sqrt(x * x + y * y);\n\t\t\tif (dist < this.radius) {\n\t\t\t\tlet theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\n\t\t\t\tlet cos = Math.cos(theta);\n\t\t\t\tlet sin = Math.sin(theta);\n\t\t\t\tposition.x = cos * x - sin * y + this.worldX;\n\t\t\t\tposition.y = sin * x + cos * y + this.worldY;\n\t\t\t}\n\t\t}\n\n\t\tend(): void {\n\t\t}\n\t}\n}\n","interface Math {\n fround(n: number): number;\n}\n\n(() => {\n if (!Math.fround) {\n Math.fround = Math.fround = (function(array) {\n return function(x: number) {\n return array[0] = x, array[0];\n };\n })(new Float32Array(1));\n }\n})();\n","/// \n/// \n/// \nnamespace pixi_spine {\n /* Esoteric Software SPINE wrapper for pixi.js */\n core.Bone.yDown = true;\n\n let tempRgb = [0, 0, 0];\n\n export class SpineSprite extends PIXI.Sprite {\n region: core.TextureRegion = null;\n }\n\n export class SpineMesh extends PIXI.mesh.Mesh {\n region: core.TextureRegion;\n\n constructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number) {\n super(texture, vertices, uvs, indices, drawMode);\n }\n }\n\n /**\n * A class that enables the you to import and run your spine animations in pixi.\n * The Spine animation data needs to be loaded using either the Loader or a SpineLoader before it can be used by this class\n * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source\n *\n * ```js\n * let spineAnimation = new spine(spineData);\n * ```\n *\n * @class\n * @extends Container\n * @memberof spine\n * @param spineData {object} The spine data loaded from a spine atlas.\n */\n export class Spine extends PIXI.Container {\n static globalAutoUpdate: boolean = true;\n static globalDelayLimit: number = 0;\n\n tintRgb: ArrayLike;\n spineData: core.SkeletonData;\n skeleton: core.Skeleton;\n stateData: core.AnimationStateData;\n state: core.AnimationState;\n slotContainers: Array;\n tempClipContainers: Array;\n localDelayLimit: number;\n\n constructor(spineData: core.SkeletonData) {\n super();\n\n if (!spineData) {\n throw new Error('The spineData param is required.');\n }\n\n if ((typeof spineData) === \"string\") {\n throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas(\"YOUR_RESOURCE_NAME\") from now on.');\n }\n\n /**\n * The spineData object\n *\n * @member {object}\n */\n this.spineData = spineData;\n\n /**\n * A spine Skeleton object\n *\n * @member {object}\n */\n this.skeleton = new core.Skeleton(spineData);\n this.skeleton.updateWorldTransform();\n\n /**\n * A spine AnimationStateData object created from the spine data passed in the constructor\n *\n * @member {object}\n */\n this.stateData = new core.AnimationStateData(spineData);\n\n /**\n * A spine AnimationState object created from the spine AnimationStateData object\n *\n * @member {object}\n */\n this.state = new core.AnimationState(this.stateData);\n\n /**\n * An array of containers\n *\n * @member {Container[]}\n */\n this.slotContainers = [];\n\n this.tempClipContainers = [];\n\n for (let i = 0, n = this.skeleton.slots.length; i < n; i++) {\n let slot = this.skeleton.slots[i];\n let attachment: any = slot.getAttachment();\n let slotContainer = this.newContainer();\n this.slotContainers.push(slotContainer);\n this.addChild(slotContainer);\n this.tempClipContainers.push(null);\n\n if (attachment instanceof core.RegionAttachment) {\n let spriteName = (attachment.region as core.TextureAtlasRegion).name;\n let sprite = this.createSprite(slot, attachment, spriteName);\n slot.currentSprite = sprite;\n slot.currentSpriteName = spriteName;\n slotContainer.addChild(sprite);\n }\n else if (attachment instanceof core.MeshAttachment) {\n let mesh = this.createMesh(slot, attachment);\n slot.currentMesh = mesh;\n slot.currentMeshName = attachment.name;\n slotContainer.addChild(mesh);\n }\n else if (attachment instanceof core.ClippingAttachment) {\n this.createGraphics(slot, attachment);\n slotContainer.addChild(slot.clippingContainer);\n slotContainer.addChild(slot.currentGraphics);\n }\n else {\n continue;\n }\n\n }\n\n /**\n * Should the Spine object update its transforms\n *\n * @member {boolean}\n */\n this.autoUpdate = true;\n\n /**\n * The tint applied to all spine slots. This is a [r,g,b] value. A value of [1,1,1] will remove any tint effect.\n *\n * @member {number}\n * @memberof spine.Spine#\n */\n this.tintRgb = new Float32Array([1, 1, 1]);\n }\n\n /**\n * If this flag is set to true, the spine animation will be autoupdated every time\n * the object id drawn. The down side of this approach is that the delta time is\n * automatically calculated and you could miss out on cool effects like slow motion,\n * pause, skip ahead and the sorts. Most of these effects can be achieved even with\n * autoupdate enabled but are harder to achieve.\n *\n * @member {boolean}\n * @memberof spine.Spine#\n * @default true\n */\n get autoUpdate(): boolean {\n return (this.updateTransform === Spine.prototype.autoUpdateTransform);\n }\n\n set autoUpdate(value: boolean) {\n this.updateTransform = value ? Spine.prototype.autoUpdateTransform : PIXI.Container.prototype.updateTransform;\n }\n\n /**\n * The tint applied to the spine object. This is a hex value. A value of 0xFFFFFF will remove any tint effect.\n *\n * @member {number}\n * @memberof spine.Spine#\n * @default 0xFFFFFF\n */\n get tint(): number {\n return PIXI.utils.rgb2hex(this.tintRgb as any);\n }\n\n set tint(value: number) {\n this.tintRgb = PIXI.utils.hex2rgb(value, this.tintRgb as any);\n }\n\n /**\n * Limit value for the update dt with Spine.globalDelayLimit\n * that can be overridden with localDelayLimit\n * @return {number} - Maximum processed dt value for the update\n */\n get delayLimit() : number {\n let limit = typeof this.localDelayLimit !== \"undefined\"?\n this.localDelayLimit: Spine.globalDelayLimit;\n\n // If limit is 0, this means there is no limit for the delay\n return limit || Number.MAX_VALUE\n }\n\n /**\n * Update the spine skeleton and its animations by delta time (dt)\n *\n * @param dt {number} Delta time. Time by which the animation should be updated\n */\n update(dt: number) {\n // Limit delta value to avoid animation jumps\n let delayLimit = this.delayLimit;\n if (dt > delayLimit) dt = delayLimit;\n\n this.state.update(dt);\n this.state.apply(this.skeleton);\n\n //check we haven't been destroyed via a spine event callback in state update\n if(!this.skeleton)\n return;\n\n this.skeleton.updateWorldTransform();\n\n let slots = this.skeleton.slots;\n\n\n // in case pixi has double tint\n let globalClr = (this as any).color;\n let light: ArrayLike = null, dark: ArrayLike = null;\n if (globalClr) {\n light = globalClr.light;\n dark = globalClr.dark;\n } else {\n light = this.tintRgb;\n }\n\n let thack = PIXI.TransformBase && (this.transformHack() == 1);\n\n for (let i = 0, n = slots.length; i < n; i++) {\n let slot = slots[i];\n let attachment = slot.getAttachment();\n let slotContainer = this.slotContainers[i];\n\n if (!attachment) {\n slotContainer.visible = false;\n continue;\n }\n\n let spriteColor: any = null;\n\n let attColor = (attachment as any).color;\n if (attachment instanceof core.RegionAttachment) {\n let region = (attachment as core.RegionAttachment).region;\n if (region) {\n if (slot.currentMesh) {\n slot.currentMesh.visible = false;\n slot.currentMesh = null;\n slot.currentMeshName = undefined;\n }\n let ar = region as core.TextureAtlasRegion;\n if (!slot.currentSpriteName || slot.currentSpriteName !== ar.name) {\n let spriteName = ar.name;\n if (slot.currentSprite) {\n slot.currentSprite.visible = false;\n }\n slot.sprites = slot.sprites || {};\n if (slot.sprites[spriteName] !== undefined) {\n slot.sprites[spriteName].visible = true;\n }\n else {\n let sprite = this.createSprite(slot, attachment, spriteName);\n slotContainer.addChild(sprite);\n }\n slot.currentSprite = slot.sprites[spriteName];\n slot.currentSpriteName = spriteName;\n }\n }\n\n if (slotContainer.transform) {\n //TODO: refactor this thing, switch it on and off for container\n let transform = slotContainer.transform;\n let transAny: any = transform;\n let lt: PIXI.Matrix = null;\n if (transAny.matrix2d) {\n //gameofbombs pixi fork, sorry for that, we really use it :)\n lt = transAny.matrix2d;\n transAny._dirtyVersion++;\n transAny.version = transAny._dirtyVersion;\n transAny.isStatic = true;\n transAny.operMode = 0;\n } else {\n if (thack) {\n if (transAny.position) {\n //TODO: refactor this shit\n transform = new PIXI.TransformBase();\n (transform as any)._parentID = -1;\n (transform as any)._worldID = (slotContainer.transform as any)._worldID;\n slotContainer.transform = transform;\n }\n lt = transform.localTransform;\n } else {\n // if (transAny.autoUpdateLocal) {\n // transAny.autoUpdateLocal = false;\n // }\n transAny.setFromMatrix(slot.bone.matrix);\n }\n }\n if (lt) {\n slot.bone.matrix.copy(lt);\n }\n } else {\n //PIXI v3\n let lt = slotContainer.localTransform || new PIXI.Matrix();\n slot.bone.matrix.copy(lt);\n slotContainer.localTransform = lt;\n (slotContainer as any).displayObjectUpdateTransform = SlotContainerUpdateTransformV3;\n }\n if (slot.currentSprite.color) {\n //YAY! double - tint!\n spriteColor = slot.currentSprite.color;\n } else {\n tempRgb[0] = light[0] * slot.color.r * attColor.r;\n tempRgb[1] = light[1] * slot.color.g * attColor.g;\n tempRgb[2] = light[2] * slot.color.b * attColor.b;\n slot.currentSprite.tint = PIXI.utils.rgb2hex(tempRgb);\n }\n slot.currentSprite.blendMode = slot.blendMode;\n }\n else if (attachment instanceof core.MeshAttachment) {\n if (slot.currentSprite) {\n //TODO: refactor this thing, switch it on and off for container\n slot.currentSprite.visible = false;\n slot.currentSprite = null;\n slot.currentSpriteName = undefined;\n\n if (slotContainer.transform) {\n //TODO: refactor this shit\n const transform = new PIXI.TransformStatic();\n (transform as any)._parentID = -1;\n (transform as any)._worldID = (slotContainer.transform as any)._worldID;\n slotContainer.transform = transform;\n }\n else {\n slotContainer.localTransform = new PIXI.Matrix();\n (slotContainer as any).displayObjectUpdateTransform = PIXI.DisplayObject.prototype.updateTransform;\n }\n }\n if (!slot.currentMeshName || slot.currentMeshName !== attachment.name) {\n let meshName = attachment.name;\n if (slot.currentMesh) {\n slot.currentMesh.visible = false;\n }\n\n slot.meshes = slot.meshes || {};\n\n if (slot.meshes[meshName] !== undefined) {\n slot.meshes[meshName].visible = true;\n }\n else {\n let mesh = this.createMesh(slot, attachment);\n slotContainer.addChild(mesh);\n }\n\n slot.currentMesh = slot.meshes[meshName];\n slot.currentMeshName = meshName;\n }\n (attachment as core.VertexAttachment).computeWorldVerticesOld(slot, slot.currentMesh.vertices);\n if (slot.currentMesh.color) {\n spriteColor = slot.currentMesh.color;\n } else if (PIXI.VERSION[0] !== '3') {\n // PIXI version 4\n // slot.currentMesh.dirty++;\n //only for PIXI v4\n let tintRgb = slot.currentMesh.tintRgb;\n tintRgb[0] = light[0] * slot.color.r * attColor.r;\n tintRgb[1] = light[1] * slot.color.g * attColor.g;\n tintRgb[2] = light[2] * slot.color.b * attColor.b;\n }\n slot.currentMesh.blendMode = slot.blendMode;\n }\n else if (attachment instanceof core.ClippingAttachment) {\n if (!slot.currentGraphics) {\n this.createGraphics(slot, attachment);\n slotContainer.addChild(slot.clippingContainer);\n slotContainer.addChild(slot.currentGraphics);\n }\n this.updateGraphics(slot, attachment);\n }\n else {\n slotContainer.visible = false;\n continue;\n }\n slotContainer.visible = true;\n\n // pixi has double tint\n if (spriteColor) {\n let r0 = slot.color.r * attColor.r;\n let g0 = slot.color.g * attColor.g;\n let b0 = slot.color.b * attColor.b;\n\n //YAY! double-tint!\n spriteColor.setLight(\n light[0] * r0 + dark[0] * (1.0 - r0),\n light[1] * g0 + dark[1] * (1.0 - g0),\n light[2] * b0 + dark[2] * (1.0 - b0),\n );\n if (slot.darkColor) {\n r0 = slot.darkColor.r;\n g0 = slot.darkColor.g;\n b0 = slot.darkColor.b;\n } else {\n r0 = 0.0;\n g0 = 0.0;\n b0 = 0.0;\n }\n spriteColor.setDark(\n light[0] * r0 + dark[0] * (1 - r0),\n light[1] * g0 + dark[1] * (1 - g0),\n light[2] * b0 + dark[2] * (1 - b0),\n );\n }\n\n slotContainer.alpha = slot.color.a;\n }\n\n //== this is clipping implementation ===\n //TODO: remove parent hacks when pixi masks allow it\n let drawOrder = this.skeleton.drawOrder;\n let clippingAttachment: core.ClippingAttachment = null;\n let clippingContainer: PIXI.Container = null;\n\n for (let i = 0, n = drawOrder.length; i < n; i++) {\n let slot = slots[drawOrder[i].data.index];\n let slotContainer = this.slotContainers[drawOrder[i].data.index];\n\n if (!clippingContainer) {\n\t\t\t\t\t//Adding null check as it is possible for slotContainer.parent to be null in the event of a spine being disposed off in its loop callback\n if (slotContainer.parent !== null && slotContainer.parent !== this) {\n slotContainer.parent.removeChild(slotContainer);\n //silend add hack\n slotContainer.parent = this;\n }\n }\n if (slot.currentGraphics && slot.getAttachment()) {\n clippingContainer = slot.clippingContainer;\n clippingAttachment = slot.getAttachment() as core.ClippingAttachment;\n clippingContainer.children.length = 0;\n this.children[i] = slotContainer;\n\n if (clippingAttachment.endSlot == slot.data) {\n clippingAttachment.endSlot = null;\n }\n\n } else {\n if (clippingContainer) {\n let c = this.tempClipContainers[i];\n if (!c) {\n c = this.tempClipContainers[i] = this.newContainer();\n c.visible = false;\n }\n this.children[i] = c;\n\n //silent remove hack\n slotContainer.parent = null;\n clippingContainer.addChild(slotContainer);\n if (clippingAttachment.endSlot == slot.data) {\n clippingContainer.renderable = true;\n clippingContainer = null;\n clippingAttachment = null;\n }\n } else {\n this.children[i] = slotContainer;\n }\n }\n }\n };\n\n private setSpriteRegion(attachment: core.RegionAttachment, sprite: SpineSprite, region: core.TextureRegion) {\n sprite.region = region;\n sprite.texture = region.texture;\n if (!region.size) {\n sprite.scale.x = attachment.scaleX * attachment.width / region.originalWidth;\n sprite.scale.y = -attachment.scaleY * attachment.height / region.originalHeight;\n } else {\n //hacked!\n sprite.scale.x = region.size.width / region.originalWidth;\n sprite.scale.y = -region.size.height / region.originalHeight;\n }\n }\n\n private setMeshRegion(attachment: core.MeshAttachment, mesh: SpineMesh, region: core.TextureRegion) {\n mesh.region = region;\n mesh.texture = region.texture;\n (region.texture as any)._updateUvs();\n attachment.updateUVs(region, mesh.uvs);\n // if (PIXI.VERSION[0] !== '3') {\n // PIXI version 4\n // mesh.indexDirty++;\n // } else {\n // PIXI version 3\n mesh.dirty++;\n // }\n }\n\n protected lastTime: number;\n\n /**\n * When autoupdate is set to yes this function is used as pixi's updateTransform function\n *\n * @private\n */\n autoUpdateTransform() {\n if (Spine.globalAutoUpdate) {\n this.lastTime = this.lastTime || Date.now();\n let timeDelta = (Date.now() - this.lastTime) * 0.001;\n this.lastTime = Date.now();\n this.update(timeDelta);\n } else {\n this.lastTime = 0;\n }\n\n PIXI.Container.prototype.updateTransform.call(this);\n };\n\n /**\n * Create a new sprite to be used with core.RegionAttachment\n *\n * @param slot {spine.Slot} The slot to which the attachment is parented\n * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\n * @private\n */\n createSprite(slot: core.Slot, attachment: core.RegionAttachment, defName: string) {\n let region = attachment.region;\n if (slot.tempAttachment === attachment) {\n region = slot.tempRegion;\n slot.tempAttachment = null;\n slot.tempRegion = null;\n }\n let texture = region.texture;\n let sprite = this.newSprite(texture);\n sprite.rotation = attachment.rotation * core.MathUtils.degRad;\n sprite.anchor.x = 0.5;\n sprite.anchor.y = 0.5;\n sprite.position.x = attachment.x;\n sprite.position.y = attachment.y;\n sprite.alpha = attachment.color.a;\n\n sprite.region = attachment.region;\n this.setSpriteRegion(attachment, sprite, attachment.region);\n\n slot.sprites = slot.sprites || {};\n slot.sprites[defName] = sprite;\n return sprite;\n };\n\n /**\n * Creates a Strip from the spine data\n * @param slot {spine.Slot} The slot to which the attachment is parented\n * @param attachment {spine.RegionAttachment} The attachment that the sprite will represent\n * @private\n */\n createMesh(slot: core.Slot, attachment: core.MeshAttachment) {\n let region = attachment.region;\n if (slot.tempAttachment === attachment) {\n region = slot.tempRegion;\n slot.tempAttachment = null;\n slot.tempRegion = null;\n }\n let strip = this.newMesh(\n region.texture,\n new Float32Array(attachment.regionUVs.length),\n new Float32Array(attachment.regionUVs.length),\n new Uint16Array(attachment.triangles),\n PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);\n\n strip.canvasPadding = 1.5;\n\n strip.alpha = attachment.color.a;\n\n strip.region = attachment.region;\n this.setMeshRegion(attachment, strip, region);\n\n slot.meshes = slot.meshes || {};\n slot.meshes[attachment.name] = strip;\n return strip;\n };\n\n static clippingPolygon: Array = [];\n\n createGraphics(slot: core.Slot, clip: core.ClippingAttachment) {\n let graphics = this.newGraphics();\n let poly = new PIXI.Polygon([]);\n graphics.clear();\n graphics.beginFill(0xffffff, 1);\n graphics.drawPolygon(poly as any);\n graphics.renderable = false;\n slot.currentGraphics = graphics;\n slot.clippingContainer = this.newContainer();\n slot.clippingContainer.mask = slot.currentGraphics;\n\n return graphics;\n }\n\n updateGraphics(slot: core.Slot, clip: core.ClippingAttachment) {\n let vertices = (slot.currentGraphics.graphicsData[0].shape as PIXI.Polygon).points;\n let n = clip.worldVerticesLength;\n vertices.length = n;\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n slot.currentGraphics.dirty++;\n slot.currentGraphics.clearDirty++;\n }\n\n /**\n * Changes texture in attachment in specific slot.\n *\n * PIXI runtime feature, it was made to satisfy our users.\n *\n * @param slotIndex {number}\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\n * @returns {boolean} Success flag\n */\n hackTextureBySlotIndex(slotIndex: number, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\n let slot = this.skeleton.slots[slotIndex];\n if (!slot) {\n return false;\n }\n let attachment: any = slot.getAttachment();\n let region: core.TextureRegion = attachment.region;\n if (texture) {\n region = new core.TextureRegion();\n region.texture = texture;\n region.size = size;\n }\n if (slot.currentSprite && slot.currentSprite.region != region) {\n this.setSpriteRegion(attachment, slot.currentSprite, region);\n slot.currentSprite.region = region;\n } else if (slot.currentMesh && slot.currentMesh.region != region) {\n this.setMeshRegion(attachment, slot.currentMesh, region);\n } else {\n slot.tempRegion = region;\n slot.tempAttachment = attachment;\n }\n return true;\n }\n\n /**\n * Changes texture in attachment in specific slot.\n *\n * PIXI runtime feature, it was made to satisfy our users.\n *\n * @param slotName {string}\n * @param [texture = null] {PIXI.Texture} If null, take default (original) texture\n * @param [size = null] {PIXI.Point} sometimes we need new size for region attachment, you can pass 'texture.orig' there\n * @returns {boolean} Success flag\n */\n hackTextureBySlotName(slotName: string, texture: PIXI.Texture = null, size: PIXI.Rectangle = null) {\n let index = this.skeleton.findSlotIndex(slotName);\n if (index == -1) {\n return false;\n }\n return this.hackTextureBySlotIndex(index, texture, size);\n }\n\n //those methods can be overriden to spawn different classes\n newContainer() {\n return new PIXI.Container();\n }\n\n newSprite(tex: PIXI.Texture) {\n return new SpineSprite(tex);\n }\n\n newGraphics() {\n return new PIXI.Graphics();\n }\n\n newMesh(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number) {\n return new SpineMesh(texture, vertices, uvs, indices, drawMode);\n }\n\n transformHack() {\n return 1;\n }\n\n /**\n * Hack for pixi-display and pixi-lights. Every attachment name ending with a suffix will be added to different layer\n * @param nameSuffix\n * @param group\n * @param outGroup\n */\n hackAttachmentGroups(nameSuffix: string, group: any, outGroup: any) {\n if (!nameSuffix) {\n return;\n }\n const list_d = [], list_n = [];\n for (let i = 0, len = this.skeleton.slots.length; i < len; i++) {\n const slot = this.skeleton.slots[i];\n const name = slot.currentSpriteName || slot.currentMeshName || \"\";\n const target = slot.currentSprite || slot.currentMesh;\n if(name.endsWith(nameSuffix)){\n target.parentGroup = group;\n list_n.push(target);\n }else if(outGroup && target){\n target.parentGroup = outGroup;\n list_d.push(target);\n }\n }\n return [list_d,list_n];\n };\n\n destroy(options?: PIXI.DestroyOptions | boolean): void {\n for (let i = 0, n = this.skeleton.slots.length; i < n; i++) {\n let slot = this.skeleton.slots[i];\n for (let name in slot.meshes) {\n slot.meshes[name].destroy(options);\n }\n slot.meshes = null;\n\n for (let name in slot.sprites) {\n slot.sprites[name].destroy(options);\n }\n slot.sprites = null;\n }\n\n for (let i = 0, n = this.slotContainers.length; i < n; i++) {\n this.slotContainers[i].destroy(options);\n }\n this.spineData = null;\n this.skeleton = null;\n this.slotContainers = null;\n this.stateData = null;\n this.state = null;\n this.tempClipContainers = null;\n\n super.destroy(options);\n }\n }\n\n function SlotContainerUpdateTransformV3() {\n let pt = this.parent.worldTransform;\n let wt = this.worldTransform;\n let lt = this.localTransform;\n wt.a = lt.a * pt.a + lt.b * pt.c;\n wt.b = lt.a * pt.b + lt.b * pt.d;\n wt.c = lt.c * pt.a + lt.d * pt.c;\n wt.d = lt.c * pt.b + lt.d * pt.d;\n wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx;\n wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty;\n this.worldAlpha = this.alpha * this.parent.worldAlpha;\n this._currentBounds = null;\n }\n}\n","namespace pixi_spine {\n (PIXI as any).spine = pixi_spine;\n\n // texture patch for v5\n\n const TextureProto = PIXI.Texture.prototype as any;\n\n if (!TextureProto._updateUvs) {\n TextureProto._updateUvs = TextureProto.updateUvs;\n }\n}\n","declare namespace PIXI.loaders {\n export interface IMetadata {\n spineSkeletonScale?: number;\n spineAtlas?: any;\n spineAtlasSuffix?: string;\n spineAtlasFile?: string;\n spineMetadata?: any;\n imageNamePrefix?: string;\n atlasRawData?: string;\n imageLoader?: any;\n images?: any;\n imageMetadata?: any;\n image?: any;\n }\n}\n\nnamespace pixi_spine {\n const Resource = PIXI.loaders.Resource;\n\n function isJson(resource: any) {\n return resource.type == Resource.TYPE.JSON;\n }\n\n function isBuffer(resource: any) {\n return resource.xhrType == Resource.XHR_RESPONSE_TYPE.BUFFER;\n }\n\n Resource.setExtensionXhrType('skel', Resource.XHR_RESPONSE_TYPE.BUFFER);\n\n export function atlasParser() {\n return function atlasParser(resource: PIXI.loaders.Resource, next: () => any) {\n // skip if no data, its not json, or it isn't atlas data\n if (!resource.data) {\n return next();\n }\n\n const isJsonSpineModel = isJson(resource) && resource.data.bones;\n const isBinarySpineModel = isBuffer(resource) && (resource.extension === 'skel' || resource.metadata.spineMetadata);\n\n if (!isJsonSpineModel && !isBinarySpineModel) {\n return next();\n }\n\n let parser: any = null;\n let dataToParse = resource.data;\n\n if (isJsonSpineModel) {\n parser = new core.SkeletonJson(null);\n } else {\n parser = new core.SkeletonBinary(null);\n if (resource.data instanceof ArrayBuffer) {\n dataToParse = new Uint8Array(resource.data);\n }\n }\n\n const metadata = resource.metadata || {};\n const metadataSkeletonScale = metadata ? resource.metadata.spineSkeletonScale : null;\n\n if (metadataSkeletonScale) {\n parser.scale = metadataSkeletonScale;\n }\n\n const metadataAtlas = metadata ? resource.metadata.spineAtlas : null;\n if (metadataAtlas === false) {\n return next();\n }\n if (metadataAtlas && metadataAtlas.pages) {\n //its an atlas!\n parser.attachmentLoader = new core.AtlasAttachmentLoader(metadataAtlas);\n resource.spineData = parser.readSkeletonData(dataToParse);\n resource.spineAtlas = metadataAtlas;\n\n return next();\n }\n\n const metadataAtlasSuffix = metadata.spineAtlasSuffix || '.atlas';\n\n /**\n * use a bit of hackery to load the atlas file, here we assume that the .json, .atlas and .png files\n * that correspond to the spine file are in the same base URL and that the .json and .atlas files\n * have the same name\n */\n let atlasPath = resource.url;\n let queryStringPos = atlasPath.indexOf('?');\n if (queryStringPos > 0) {\n //remove querystring\n atlasPath = atlasPath.substr(0, queryStringPos)\n }\n atlasPath = atlasPath.substr(0, atlasPath.lastIndexOf('.')) + metadataAtlasSuffix;\n // use atlas path as a params. (no need to use same atlas file name with json file name)\n if (resource.metadata && resource.metadata.spineAtlasFile) {\n atlasPath = resource.metadata.spineAtlasFile;\n }\n\n //remove the baseUrl\n atlasPath = atlasPath.replace(this.baseUrl, '');\n\n const atlasOptions = {\n crossOrigin: resource.crossOrigin,\n xhrType: Resource.XHR_RESPONSE_TYPE.TEXT,\n metadata: metadata.spineMetadata || null,\n parentResource: resource\n };\n const imageOptions = {\n crossOrigin: resource.crossOrigin,\n metadata: metadata.imageMetadata || null,\n parentResource: resource\n };\n let baseUrl = resource.url.substr(0, resource.url.lastIndexOf('/') + 1);\n //remove the baseUrl\n baseUrl = baseUrl.replace(this.baseUrl, '');\n\n const namePrefix = metadata.imageNamePrefix || (resource.name + '_atlas_page_');\n\n const adapter = metadata.images ? staticImageLoader(metadata.images)\n : metadata.image ? staticImageLoader({ 'default': metadata.image })\n : metadata.imageLoader ? metadata.imageLoader(this, namePrefix, baseUrl, imageOptions)\n : imageLoaderAdapter(this, namePrefix, baseUrl, imageOptions);\n\n const createSkeletonWithRawAtlas = function (rawData: string) {\n new core.TextureAtlas(rawData, adapter, function (spineAtlas) {\n if (spineAtlas) {\n parser.attachmentLoader = new core.AtlasAttachmentLoader(spineAtlas);\n resource.spineData = parser.readSkeletonData(dataToParse);\n resource.spineAtlas = spineAtlas;\n }\n next();\n });\n };\n\n if (resource.metadata && resource.metadata.atlasRawData) {\n createSkeletonWithRawAtlas(resource.metadata.atlasRawData)\n } else {\n this.add(resource.name + '_atlas', atlasPath, atlasOptions, function (atlasResource: any) {\n if (!atlasResource.error) {\n createSkeletonWithRawAtlas(atlasResource.data);\n } else {\n next();\n }\n });\n }\n }\n }\n\n export function imageLoaderAdapter(loader: any, namePrefix: any, baseUrl: any, imageOptions: any) {\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\n baseUrl += '/';\n }\n return function (line: string, callback: (baseTexture: PIXI.BaseTexture) => any) {\n const name = namePrefix + line;\n const url = baseUrl + line;\n\n const cachedResource = loader.resources[name];\n if (cachedResource) {\n function done() {\n callback(cachedResource.texture.baseTexture)\n }\n\n if (cachedResource.texture) {\n done();\n }\n else {\n cachedResource.onAfterMiddleware.add(done);\n }\n } else {\n loader.add(name, url, imageOptions, (resource: PIXI.loaders.Resource) => {\n if (!resource.error) {\n callback(resource.texture.baseTexture);\n } else {\n callback(null);\n }\n });\n }\n }\n }\n\n export function syncImageLoaderAdapter(baseUrl: any, crossOrigin: any) {\n if (baseUrl && baseUrl.lastIndexOf('/') !== (baseUrl.length - 1)) {\n baseUrl += '/';\n }\n return function (line: any, callback: any) {\n callback(PIXI.BaseTexture.fromImage(line, crossOrigin));\n }\n }\n\n export function staticImageLoader(pages: { [key: string]: (PIXI.BaseTexture | PIXI.Texture) }) {\n return function (line: any, callback: any) {\n let page = pages[line] || pages['default'] as any;\n if (page && page.baseTexture)\n callback(page.baseTexture);\n else\n callback(page);\n }\n }\n\n if (PIXI.loaders.Loader) {\n PIXI.loaders.Loader.addPixiMiddleware(atlasParser);\n PIXI.loader.use(atlasParser());\n }\n}\n"]} \ No newline at end of file diff --git a/src/core/Skin.ts b/src/core/Skin.ts index 04096766..a6305c7e 100644 --- a/src/core/Skin.ts +++ b/src/core/Skin.ts @@ -181,6 +181,14 @@ namespace pixi_spine.core { break; } } + } else { + let attachmentName = slot.data.attachmentName; + + if (attachmentName != null) { + let attachment = this.getAttachment(slotIndex, attachmentName); + if (attachment != null) + slot.setAttachment(attachment); + } } slotIndex++; }