diff --git a/LICENSE b/LICENSE index e14aae4a0..1acf35e29 100644 --- a/LICENSE +++ b/LICENSE @@ -1,17 +1,17 @@ Spine Runtimes Software License -Version 2.4 +Version 2.5 Copyright (c) 2013-2016, Esoteric Software All rights reserved. -You are granted a perpetual, non-exclusive, non-sublicensable and -non-transferable license to use, install, execute and perform the Spine -Runtimes Software (the "Software") and derivative works solely for personal -or internal use. Without the written permission of Esoteric Software (see -Section 2 of the Spine Software License Agreement), you may not (a) modify, -translate, adapt or otherwise create derivative works, improvements of -the Software or develop new applications using the Software or (b) remove, -delete, alter or obscure any trademarks or any copyright, trademark, patent +You are granted a perpetual, non-exclusive, non-sublicensable, and +non-transferable license to use, install, execute, and perform the Spine +Runtimes software and derivative works solely for personal or internal +use. Without the written permission of Esoteric Software (see Section 2 of +the Spine Software License Agreement), you may not (a) modify, translate, +adapt, or develop new applications using the Spine Runtimes or otherwise +create derivative works or improvements of the Spine Runtimes or (b) remove, +delete, alter, or obscure any trademarks or any copyright, trademark, patent, or other intellectual property or proprietary rights notices on or in the Software, including any copy thereof. Redistributions in binary or source form must include this license and terms. @@ -21,8 +21,8 @@ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF +USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/spine-starling/spine-starling-example/.settings/com.powerflasher.fdt.classpath b/spine-starling/spine-starling-example/.settings/com.powerflasher.fdt.classpath index c35f9e0ac..44fa916d4 100644 --- a/spine-starling/spine-starling-example/.settings/com.powerflasher.fdt.classpath +++ b/spine-starling/spine-starling-example/.settings/com.powerflasher.fdt.classpath @@ -3,7 +3,7 @@ lib frameworks/libs/player/{playerVersion}/playerglobal.swc src - lib/starling-2.0.1.swc lib/spine-as3.swc lib/spine-starling.swc + lib/starling-2.0.1.swc diff --git a/spine-ts/README.md b/spine-ts/README.md new file mode 100644 index 000000000..35c05319f --- /dev/null +++ b/spine-ts/README.md @@ -0,0 +1,69 @@ +# spine-ts + +The spine-ts runtime provides functionality to load and manipulate [Spine](http://esotericsoftware.com) skeletal animation data using TypeScript and JavaScript. spine-ts is split +up into multiple modules: + +1. **Core**: `core/`, the core classes to load and process Spine models +1. **WebGL**: `webgl/`, a self-contained WebGL backend, build on the core classes +1. **Widget**: `widget/`, a self-contained widget to easily display Spine animations on your website, build on core classes & WebGL backend. + +While the source code for the core library and backends is written in TypeScript, all code is compiled to easily consumable JavaScript. + +## Licensing +This Spine Runtime may only be used for personal or internal use, typically to evaluate Spine before purchasing. If you would like to incorporate a Spine Runtime into your applications, distribute software containing a Spine Runtime, or modify a Spine Runtime, then you will need a valid [Spine license](https://esotericsoftware.com/spine-purchase). Please see the [Spine Runtimes Software License](https://github.com/EsotericSoftware/spine-runtimes/blob/master/LICENSE) for detailed information. + +The Spine Runtimes are developed with the intent to be used with data exported from Spine. By purchasing Spine, `Section 2` of the [Spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the Spine Runtimes. + +## Spine version + +spine-ts works with data exported from the latest Spine version. + +spine-ts supports all Spine features. + +spine-ts does not yet support loading the binary format. + +## Usage +1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it [as a zip](https://github.com/EsotericSoftware/spine-runtimes/archive/master.zip). +2. To use only the core library without rendering support, include the `build/spine-core.js` file in your project. +3. To use the WebGL backend, include the `spine-webgl.js` file in your project. +4. To use the Widget, include `spine-widget.js` file in your project. + +All `*.js` files are self-contained and include both the core and respective backend classes. + +If you write your app with TypeScript, additionally copy the corresponding `build/spine-*.d.ts` file to your project. + +## Example +To run the examples, spawn a light-weight web server in the root of spine-ts, then navigate to the respective +`index.html` file. E.g.: + +``` +cd spine-ts +python -m SimpleHTTPServer +```` + +Then open `http://localhost:8000/webgl/example` or `http://localhost:8000/widget/example` in your browser. + +## Development Setup +The spine-ts runtime and the various backends are implemented in TypeScript for greater maintainability and better tooling support. To +setup a development environment, follow these steps. + +1. Install [NPM](https://nodejs.org/en/download/) and make sure it's available on the command line +2. On the command line, Install the TypeScript compiler via `npm install -g typescript` +3. Install [Visual Studio Code](https://code.visualstudio.com/) +4. On the command line, change into the `spine-ts` directory +5. Start the TypeScript compiler in watcher mode for the backend you want to work on: + 1. **Core**: `tsc -w -p tsconfig.core.json`, builds `core/src`, outputs `build/spine-core.js|d.ts|js.map` + 2. **WebGL**: `tsc -w -p tsconfig.webgl.json`, builds `core/src` and `webgl/src`, outputs `build/spine-webgl.js|d.ts|js.map` + 3. **Widget**: `tsc -w -p tsconfig.widget.json`, builds `core/src` and `widget/src`, outputs `build/spine-widget.js|d.ts|js.map` +6. Open the `spine-ts` folder in Visual Studio Code. VS Code will use the `tsconfig.json` file all source files from core and all +backends for your development pleasure. The actual JavaScript output is still created by the command line TypeScript compiler process from the previous step. + +Each backend contains an `example/` folder with an `index.html` file that demonstrates the respective backend. For development, we +suggest to run a HTTP server in the root of `spine-ts`, e.g. + +``` +cd spine-ts +python -m SimpleHTTPServer +``` + +Then navigate to `http://localhost:8000/webgl/example` or `http://localhost:8000/widget/example` \ No newline at end of file diff --git a/spine-ts/build/spine-all.d.ts b/spine-ts/build/spine-all.d.ts new file mode 100644 index 000000000..bab571348 --- /dev/null +++ b/spine-ts/build/spine-all.d.ts @@ -0,0 +1,2502 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + 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): void; + mix(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number): 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): void; + } + abstract class CurveTimeline implements Timeline { + static LINEAR: number; + static STEPPED: number; + static BEZIER: number; + static BEZIER_SIZE: number; + private curves; + constructor(frameCount: number); + getFrameCount(): number; + setLinear(frameIndex: number): void; + setStepped(frameIndex: number): void; + getCurveType(frameIndex: number): number; + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + 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): 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); + /** Sets the time and angle of the specified keyframe. */ + setFrame(frameIndex: number, time: number, degrees: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): 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); + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, x: number, y: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class ScaleTimeline extends TranslateTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class ShearTimeline extends TranslateTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): 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); + /** Sets the time and value of the specified keyframe. */ + 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): void; + } + class AttachmentTimeline implements Timeline { + slotIndex: number; + frames: ArrayLike; + attachmentNames: Array; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, attachmentName: string): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class EventTimeline implements Timeline { + frames: ArrayLike; + events: Array; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time of the specified keyframe. */ + setFrame(frameIndex: number, event: Event): void; + /** Fires events for frames > lastTime and <= time. */ + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class DrawOrderTimeline implements Timeline { + frames: ArrayLike; + drawOrders: Array>; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + setFrame(frameIndex: number, time: number, drawOrder: Array): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class DeformTimeline extends CurveTimeline { + frames: ArrayLike; + frameVertices: Array>; + slotIndex: number; + attachment: VertexAttachment; + constructor(frameCount: number); + /** Sets the time of the specified keyframe. */ + setFrame(frameIndex: number, time: number, vertices: ArrayLike): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class IkConstraintTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_MIX: number; + static PREV_BEND_DIRECTION: number; + static MIX: number; + static BEND_DIRECTION: number; + ikConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + /** Sets the time, mix and bend direction of the specified keyframe. */ + setFrame(frameIndex: number, time: number, mix: number, bendDirection: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): 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); + /** Sets the time and mixes of the specified keyframe. */ + 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): 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); + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, value: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): 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); + /** Sets the time and mixes of the specified keyframe. */ + setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class AnimationState { + data: AnimationStateData; + tracks: TrackEntry[]; + events: Event[]; + listeners: AnimationStateListener[]; + timeScale: number; + constructor(data?: AnimationStateData); + update(delta: number): void; + apply(skeleton: Skeleton): void; + clearTracks(): void; + clearTrack(trackIndex: number): void; + freeAll(entry: TrackEntry): void; + expandToIndex(index: number): TrackEntry; + setCurrent(index: number, entry: TrackEntry): void; + /** @see #setAnimation(int, Animation, boolean) */ + setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry; + /** Set the current animation. Any queued animations are cleared. */ + setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry; + /** {@link #addAnimation(int, Animation, boolean, float)} */ + addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): TrackEntry; + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + addAnimationWith(trackIndex: number, animation: Animation, loop: boolean, delay: number): TrackEntry; + /** @return May be null. */ + getCurrent(trackIndex: number): TrackEntry; + /** Adds a listener to receive events for all animations. */ + addListener(listener: AnimationStateListener): void; + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + removeListener(listener: AnimationStateListener): void; + clearListeners(): void; + } + class TrackEntry { + next: TrackEntry; + previous: TrackEntry; + animation: Animation; + loop: boolean; + delay: number; + time: number; + lastTime: number; + endTime: number; + timeScale: number; + mixTime: number; + mixDuration: number; + listener: AnimationStateListener; + mix: number; + reset(): void; + /** Returns true if the current time is greater than the end time, regardless of looping. */ + isComplete(): boolean; + } + abstract class AnimationStateAdapter implements AnimationStateListener { + event(trackIndex: number, event: Event): void; + complete(trackIndex: number, loopCount: number): void; + start(trackIndex: number): void; + end(trackIndex: number): void; + } + interface AnimationStateListener { + /** Invoked when the current animation triggers an event. */ + event(trackIndex: number, event: Event): void; + /** Invoked when the current animation has completed. + * @param loopCount The number of times the animation reached the end. */ + complete(trackIndex: number, loopCount: number): void; + /** Invoked just after the current animation is set. */ + start(trackIndex: number): void; + /** Invoked just before the current animation is replaced. */ + end(trackIndex: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class AnimationStateData { + skeletonData: SkeletonData; + animationToMixTime: Map; + defaultMix: number; + constructor(skeletonData: SkeletonData); + setMix(fromName: string, toName: string, duration: number): void; + setMixWith(from: Animation, to: Animation, duration: number): void; + getMix(from: Animation, to: Animation): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + enum BlendMode { + Normal = 0, + Additive = 1, + Multiply = 2, + Screen = 3, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Bone implements Updatable { + data: BoneData; + skeleton: Skeleton; + parent: Bone; + children: Bone[]; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + appliedRotation: number; + a: number; + b: number; + worldX: number; + c: number; + d: number; + worldY: number; + worldSignX: number; + worldSignY: number; + sorted: boolean; + /** @param parent May be null. */ + constructor(data: BoneData, skeleton: Skeleton, parent: Bone); + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + update(): void; + /** Computes the world transform using the parent bone and this bone's local transform. */ + updateWorldTransform(): void; + /** Computes the world transform using the parent bone and the specified local transform. */ + 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; + worldToLocalRotationX(): number; + worldToLocalRotationY(): number; + rotateWorld(degrees: number): void; + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + updateLocalTransform(): void; + worldToLocal(world: Vector2): Vector2; + localToWorld(local: Vector2): Vector2; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class BoneData { + index: number; + name: string; + parent: BoneData; + length: number; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + inheritRotation: boolean; + inheritScale: boolean; + constructor(index: number, name: string, parent: BoneData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Event { + data: EventData; + intValue: number; + floatValue: number; + stringValue: string; + time: number; + constructor(time: number, data: EventData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class EventData { + name: string; + intValue: number; + floatValue: number; + stringValue: string; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class IkConstraint implements Updatable { + data: IkConstraintData; + bones: Array; + target: Bone; + mix: number; + bendDirection: number; + level: number; + constructor(data: IkConstraintData, skeleton: Skeleton); + apply(): void; + update(): void; + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + apply1(bone: Bone, targetX: number, targetY: number, alpha: number): void; + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class IkConstraintData { + name: string; + bones: BoneData[]; + target: BoneData; + bendDirection: number; + mix: number; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathConstraint implements Updatable { + static NONE: number; + static BEFORE: number; + static AFTER: 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[]; + constructor(data: PathConstraintData, skeleton: Skeleton); + 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathConstraintData { + name: string; + 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, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Skeleton { + data: SkeletonData; + bones: Array; + slots: Array; + drawOrder: Array; + ikConstraints: Array; + ikConstraintsSorted: Array; + transformConstraints: Array; + pathConstraints: Array; + _updateCache: Updatable[]; + skin: Skin; + color: Color; + time: number; + flipX: boolean; + flipY: boolean; + x: number; + y: number; + constructor(data: SkeletonData); + updateCache(): void; + sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void; + sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void; + sortBone(bone: Bone): void; + sortReset(bones: Array): void; + /** Updates the world transform for each bone and applies constraints. */ + updateWorldTransform(): void; + /** Sets the bones, constraints, and slots to their setup pose values. */ + setToSetupPose(): void; + /** Sets the bones and constraints to their setup pose values. */ + setBonesToSetupPose(): void; + setSlotsToSetupPose(): void; + /** @return May return null. */ + getRootBone(): Bone; + /** @return May be null. */ + findBone(boneName: string): Bone; + /** @return -1 if the bone was not found. */ + findBoneIndex(boneName: string): number; + /** @return May be null. */ + findSlot(slotName: string): Slot; + /** @return -1 if the bone was not found. */ + findSlotIndex(slotName: string): number; + /** Sets a skin by name. + * @see #setSkin(Skin) */ + setSkinByName(skinName: string): void; + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + setSkin(newSkin: Skin): void; + /** @return May be null. */ + getAttachmentByName(slotName: string, attachmentName: string): Attachment; + /** @return May be null. */ + getAttachment(slotIndex: number, attachmentName: string): Attachment; + /** @param attachmentName May be null. */ + setAttachment(slotName: string, attachmentName: string): void; + /** @return May be null. */ + findIkConstraint(constraintName: string): IkConstraint; + /** @return May be null. */ + findTransformConstraint(constraintName: string): TransformConstraint; + /** @return May be null. */ + findPathConstraint(constraintName: string): PathConstraint; + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + getBounds(offset: Vector2, size: Vector2): void; + update(delta: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonBounds { + minX: number; + minY: number; + maxX: number; + maxY: number; + boundingBoxes: BoundingBoxAttachment[]; + polygons: ArrayLike[]; + private _polygonPool; + update(skeleton: Skeleton, updateAabb: boolean): void; + aabbCompute(): void; + /** Returns true if the axis aligned bounding box contains the point. */ + aabbContainsPoint(x: number, y: number): boolean; + /** Returns true if the axis aligned bounding box intersects the line segment. */ + aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean; + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean; + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + containsPoint(x: number, y: number): BoundingBoxAttachment; + /** Returns true if the polygon contains the point. */ + containsPointPolygon(polygon: ArrayLike, x: number, y: number): boolean; + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment; + /** Returns true if the polygon contains any part of the line segment. */ + intersectsSegmentPolygon(polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number): boolean; + /** Returns the polygon for the specified bounding box, or null. */ + getPolygon(boundingBox: BoundingBoxAttachment): ArrayLike; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonData { + name: string; + bones: BoneData[]; + slots: SlotData[]; + skins: Skin[]; + defaultSkin: Skin; + events: EventData[]; + animations: Animation[]; + ikConstraints: IkConstraintData[]; + transformConstraints: TransformConstraintData[]; + pathConstraints: PathConstraintData[]; + width: number; + height: number; + version: string; + hash: string; + imagesPath: 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonJson { + attachmentLoader: AttachmentLoader; + scale: number; + private linkedMeshes; + constructor(attachmentLoader: AttachmentLoader); + readSkeletonData(json: string): SkeletonData; + readAttachment(map: any, skin: Skin, slotIndex: number, name: string): 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Skin { + name: string; + attachments: Map[]; + constructor(name: string); + addAttachment(slotIndex: number, name: string, attachment: Attachment): void; + /** @return May be null. */ + getAttachment(slotIndex: number, name: string): Attachment; + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + attachAll(skeleton: Skeleton, oldSkin: Skin): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Slot { + data: SlotData; + bone: Bone; + color: Color; + private attachment; + private attachmentTime; + attachmentVertices: number[]; + constructor(data: SlotData, bone: Bone); + /** @return May be null. */ + getAttachment(): Attachment; + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + setAttachment(attachment: Attachment): void; + setAttachmentTime(time: number): void; + /** Returns the time since the attachment was set. */ + getAttachmentTime(): number; + setToSetupPose(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SlotData { + index: number; + name: string; + boneData: BoneData; + color: Color; + attachmentName: string; + blendMode: BlendMode; + constructor(index: number, name: string, boneData: BoneData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TransformConstraint implements Updatable { + data: TransformConstraintData; + bones: Array; + target: Bone; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + temp: Vector2; + constructor(data: TransformConstraintData, skeleton: Skeleton); + apply(): void; + update(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TransformConstraintData { + name: string; + bones: BoneData[]; + target: BoneData; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + offsetRotation: number; + offsetX: number; + offsetY: number; + offsetScaleX: number; + offsetScaleY: number; + offsetShearY: number; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface Updatable { + update(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface Map { + [key: string]: T; + } + interface Disposable { + dispose(): void; + } + class Color { + r: number; + g: number; + b: number; + a: number; + constructor(r?: number, g?: number, b?: number, a?: number); + set(r: number, g: number, b: number, a: number): void; + setFromColor(c: Color): void; + setFromString(hex: string): void; + add(r: number, g: number, b: number, a: number): void; + clamp(): this; + } + 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; + } + 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 newArray(size: number, defaultValue: T): Array; + static newFloatArray(size: number): ArrayLike; + static toFloatArray(array: Array): Float32Array | number[]; + } + 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + abstract class Attachment { + name: string; + constructor(name: string); + } + abstract class VertexAttachment extends Attachment { + bones: Array; + vertices: ArrayLike; + worldVerticesLength: number; + constructor(name: string); + computeWorldVertices(slot: Slot, worldVertices: ArrayLike): void; + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + computeWorldVerticesWith(slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number): void; + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + applyDeform(sourceAttachment: VertexAttachment): boolean; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface AttachmentLoader { + /** @return May be null to not load an attachment. */ + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + /** @return May be null to not load an attachment. */ + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + enum AttachmentType { + Region = 0, + BoundingBox = 1, + Mesh = 2, + LinkedMesh = 3, + Path = 4, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class BoundingBoxAttachment extends VertexAttachment { + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class MeshAttachment extends VertexAttachment { + region: TextureRegion; + path: string; + regionUVs: ArrayLike; + worldVertices: ArrayLike; + triangles: Array; + color: Color; + hullLength: number; + private _parentMesh; + inheritDeform: boolean; + tempColor: Color; + constructor(name: string); + updateUVs(): void; + /** @return The updated world vertices. */ + updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike; + applyDeform(sourceAttachment: VertexAttachment): boolean; + getParentMesh(): MeshAttachment; + /** @param parentMesh May be null. */ + setParentMesh(parentMesh: MeshAttachment): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathAttachment extends VertexAttachment { + lengths: Array; + closed: boolean; + constantSpeed: boolean; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + 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; + vertices: ArrayLike; + tempColor: Color; + constructor(name: string); + setRegion(region: TextureRegion): void; + updateOffset(): void; + updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TextureRegion { + renderObject: any; + u: number; + v: number; + u2: number; + v2: number; + width: number; + height: number; + rotate: boolean; + offsetX: number; + offsetY: number; + originalWidth: number; + originalHeight: number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class AssetManager implements Disposable { + private _gl; + private _assets; + private _errors; + private _toLoad; + private _loaded; + constructor(gl: WebGLRenderingContext); + loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; + loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; + get(path: string): string | Texture; + remove(path: string): void; + removeAll(): void; + isLoadingComplete(): boolean; + toLoad(): number; + loaded(): number; + dispose(): void; + hasErrors(): boolean; + errors(): Map; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + const M00: number; + const M01: number; + const M02: number; + const M03: number; + const M10: number; + const M11: number; + const M12: number; + const M13: number; + const M20: number; + const M21: number; + const M22: number; + const M23: number; + const M30: number; + const M31: number; + const M32: number; + const M33: number; + class Matrix4 { + temp: Float32Array; + values: Float32Array; + constructor(); + set(values: ArrayLike): Matrix4; + transpose(): Matrix4; + identity(): Matrix4; + invert(): Matrix4; + determinant(): number; + translate(x: number, y: number, z: number): Matrix4; + copy(): Matrix4; + projection(near: number, far: number, fovy: number, aspectRatio: number): Matrix4; + ortho2d(x: number, y: number, width: number, height: number): Matrix4; + ortho(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4; + multiply(matrix: Matrix4): Matrix4; + multiplyLeft(matrix: Matrix4): Matrix4; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Mesh implements Disposable { + private _attributes; + private _gl; + private _vertices; + private _verticesBuffer; + private _verticesLength; + private _dirtyVertices; + private _indices; + private _indicesBuffer; + private _indicesLength; + private _dirtyIndices; + private _elementsPerVertex; + attributes(): VertexAttribute[]; + maxVertices(): number; + numVertices(): number; + setVerticesLength(length: number): void; + vertices(): Float32Array; + maxIndices(): number; + numIndices(): number; + setIndicesLength(length: number): void; + indices(): Uint16Array; + constructor(gl: WebGLRenderingContext, _attributes: VertexAttribute[], maxVertices: number, maxIndices: number); + setVertices(vertices: Array): void; + setIndices(indices: Array): void; + draw(shader: Shader, primitiveType: number): void; + drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void; + bind(shader: Shader): void; + unbind(shader: Shader): void; + private update(); + dispose(): void; + } + class VertexAttribute { + name: string; + type: VertexAttributeType; + numElements: number; + constructor(name: string, type: VertexAttributeType, numElements: number); + } + class Position2Attribute extends VertexAttribute { + constructor(); + } + class Position3Attribute extends VertexAttribute { + constructor(); + } + class TexCoordAttribute extends VertexAttribute { + constructor(unit?: number); + } + class ColorAttribute extends VertexAttribute { + constructor(); + } + enum VertexAttributeType { + Float = 0, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class PolygonBatcher { + private _gl; + private _drawCalls; + private _drawing; + private _mesh; + private _shader; + private _lastTexture; + private _verticesLength; + private _indicesLength; + private _srcBlend; + private _dstBlend; + constructor(gl: WebGLRenderingContext, maxVertices?: number); + begin(shader: Shader): void; + setBlendMode(srcBlend: number, dstBlend: number): void; + draw(texture: Texture, vertices: ArrayLike, indices: Array): void; + private flush(); + end(): void; + drawCalls(): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Shader implements Disposable { + private _vertexShader; + private _fragmentShader; + static MVP_MATRIX: string; + static POSITION: string; + static COLOR: string; + static TEXCOORDS: string; + static SAMPLER: string; + private _gl; + private _vs; + private _fs; + private _program; + private _tmp2x2; + private _tmp3x3; + private _tmp4x4; + program(): WebGLProgram; + vertexShader(): string; + fragmentShader(): string; + constructor(gl: WebGLRenderingContext, _vertexShader: string, _fragmentShader: string); + private compile(); + private compileShader(type, source); + private compileProgram(vs, fs); + bind(): void; + unbind(): void; + setUniformi(uniform: string, value: number): void; + setUniformf(uniform: string, value: number): void; + setUniform2f(uniform: string, value: number, value2: number): void; + setUniform3f(uniform: string, value: number, value2: number, value3: number): void; + setUniform4f(uniform: string, value: number, value2: number, value3: number, value4: number): void; + setUniform2x2f(uniform: string, value: ArrayLike): void; + setUniform3x3f(uniform: string, value: ArrayLike): void; + setUniform4x4f(uniform: string, value: ArrayLike): void; + getUniformLocation(uniform: string): WebGLUniformLocation; + getAttributeLocation(attribute: string): number; + dispose(): void; + static newColoredTextured(gl: WebGLRenderingContext): Shader; + static newColored(gl: WebGLRenderingContext): Shader; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class SkeletonRenderer { + static QUAD_TRIANGLES: number[]; + premultipliedAlpha: boolean; + private _gl; + constructor(gl: WebGLRenderingContext); + draw(batcher: PolygonBatcher, skeleton: Skeleton): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Texture implements Disposable { + private _gl; + private _texture; + private _image; + private _boundUnit; + constructor(gl: WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean); + getImage(): HTMLImageElement; + setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; + setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; + update(useMipMaps: boolean): void; + bind(unit?: number): void; + unbind(): void; + dispose(): void; + static filterFromString(text: string): TextureFilter; + static wrapFromString(text: string): TextureWrap; + } + enum TextureFilter { + Nearest, + Linear, + MipMap, + MipMapNearestNearest, + MipMapLinearNearest, + MipMapNearestLinear, + MipMapLinearLinear, + } + enum TextureWrap { + MirroredRepeat, + ClampToEdge, + Repeat, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class TextureAtlas implements Disposable { + pages: TextureAtlasPage[]; + regions: TextureAtlasRegion[]; + constructor(atlasText: string, textureLoader: (path: string) => Texture); + private load(atlasText, textureLoader); + findRegion(name: string): TextureAtlasRegion; + dispose(): void; + } + class TextureAtlasPage { + name: string; + minFilter: TextureFilter; + magFilter: TextureFilter; + uWrap: TextureWrap; + vWrap: TextureWrap; + texture: Texture; + width: number; + height: number; + } + class TextureAtlasRegion extends TextureRegion { + page: TextureAtlasPage; + name: string; + x: number; + y: number; + index: number; + rotate: boolean; + texture: Texture; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class TextureAtlasAttachmentLoader implements AttachmentLoader { + atlas: TextureAtlas; + constructor(atlas: TextureAtlas); + /** @return May be null to not load an attachment. */ + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + /** @return May be null to not load an attachment. */ + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Vector3 { + x: number; + y: number; + z: number; + set(x: number, y: number, z: number): Vector3; + add(v: Vector3): Vector3; + sub(v: Vector3): Vector3; + scale(s: number): Vector3; + normalize(): Vector3; + cross(v: Vector3): Vector3; + multiply(matrix: Matrix4): Vector3; + project(matrix: Matrix4): Vector3; + dot(v: Vector3): number; + length(): number; + distance(v: Vector3): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + function getSourceGLBlendMode(gl: WebGLRenderingContext, blendMode: BlendMode, premultipliedAlpha?: boolean): number; + function getDestGLBlendMode(gl: WebGLRenderingContext, blendMode: BlendMode): number; +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SpineWidget { + skeleton: Skeleton; + state: AnimationState; + gl: WebGLRenderingContext; + canvas: HTMLCanvasElement; + private _config; + private _assetManager; + private _shader; + private _batcher; + private _mvp; + private _skeletonRenderer; + private _paused; + private _lastFrameTime; + private _backgroundColor; + private _loaded; + constructor(element: Element | string, config: SpineWidgetConfig); + private validateConfig(config); + private load(); + private render(); + pause(): void; + play(): void; + isPlaying(): boolean; + setAnimation(animationName: string): void; + static loadWidgets(): void; + static loadWidget(widget: Element): void; + static pageLoaded: boolean; + private static ready(); + static setupDOMListener(): void; + } + class SpineWidgetConfig { + json: string; + atlas: string; + animation: string; + imagesPath: string; + skin: string; + loop: boolean; + scale: number; + x: number; + y: number; + width: number; + height: number; + backgroundColor: string; + premultipliedAlpha: boolean; + success: (widget: SpineWidget) => void; + error: (widget: SpineWidget, msg: string) => void; + } +} diff --git a/spine-ts/build/spine-all.js b/spine-ts/build/spine-all.js new file mode 100644 index 000000000..5ccb40c8d --- /dev/null +++ b/spine-ts/build/spine-all.js @@ -0,0 +1,6877 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var spine; +(function (spine) { + 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) { + 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, 1); + }; + Animation.prototype.mix = function (skeleton, lastTime, time, loop, events, alpha) { + 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); + }; + 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; + }()); + spine.Animation = Animation; + var CurveTimeline = (function () { + function CurveTimeline(frameCount) { + if (frameCount <= 0) + throw new Error("frameCount must be > 0: " + frameCount); + this.curves = spine.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; + }; + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + 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 = spine.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); // Last point is 1,1. + }; + CurveTimeline.LINEAR = 0; + CurveTimeline.STEPPED = 1; + CurveTimeline.BEZIER = 2; + CurveTimeline.BEZIER_SIZE = 10 * 2 - 1; + return CurveTimeline; + }()); + spine.CurveTimeline = CurveTimeline; + var RotateTimeline = (function (_super) { + __extends(RotateTimeline, _super); + function RotateTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount << 1); + } + /** Sets the time and angle of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { + var amount_1 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation; + while (amount_1 > 180) + amount_1 -= 360; + while (amount_1 < -180) + amount_1 += 360; + bone.rotation += amount_1 * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + 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 amount = frames[frame + RotateTimeline.ROTATION] - prevRotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + amount = bone.data.rotation + (prevRotation + amount * percent) - bone.rotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + bone.rotation += amount * alpha; + }; + RotateTimeline.ENTRIES = 2; + RotateTimeline.PREV_TIME = -2; + RotateTimeline.PREV_ROTATION = -1; + RotateTimeline.ROTATION = 1; + return RotateTimeline; + }(CurveTimeline)); + spine.RotateTimeline = RotateTimeline; + var TranslateTimeline = (function (_super) { + __extends(TranslateTimeline, _super); + function TranslateTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { + bone.x += (bone.data.x + frames[frames.length + TranslateTimeline.PREV_X] - bone.x) * alpha; + bone.y += (bone.data.y + frames[frames.length + TranslateTimeline.PREV_Y] - bone.y) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES); + var prevX = frames[frame + TranslateTimeline.PREV_X]; + var prevY = 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)); + bone.x += (bone.data.x + prevX + (frames[frame + TranslateTimeline.X] - prevX) * percent - bone.x) * alpha; + bone.y += (bone.data.y + prevY + (frames[frame + TranslateTimeline.Y] - prevY) * percent - bone.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)); + spine.TranslateTimeline = TranslateTimeline; + var ScaleTimeline = (function (_super) { + __extends(ScaleTimeline, _super); + function ScaleTimeline(frameCount) { + _super.call(this, frameCount); + } + ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { + bone.scaleX += (bone.data.scaleX * frames[frames.length + ScaleTimeline.PREV_X] - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * frames[frames.length + ScaleTimeline.PREV_Y] - bone.scaleY) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES); + var prevX = frames[frame + ScaleTimeline.PREV_X]; + var prevY = 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)); + bone.scaleX += (bone.data.scaleX * (prevX + (frames[frame + ScaleTimeline.X] - prevX) * percent) - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * (prevY + (frames[frame + ScaleTimeline.Y] - prevY) * percent) - bone.scaleY) * alpha; + }; + return ScaleTimeline; + }(TranslateTimeline)); + spine.ScaleTimeline = ScaleTimeline; + var ShearTimeline = (function (_super) { + __extends(ShearTimeline, _super); + function ShearTimeline(frameCount) { + _super.call(this, frameCount); + } + ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { + bone.shearX += (bone.data.shearX + frames[frames.length + ShearTimeline.PREV_X] - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + frames[frames.length + ShearTimeline.PREV_Y] - bone.shearY) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES); + var prevX = frames[frame + ShearTimeline.PREV_X]; + var prevY = 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)); + bone.shearX += (bone.data.shearX + (prevX + (frames[frame + ShearTimeline.X] - prevX) * percent) - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + (prevY + (frames[frame + ShearTimeline.Y] - prevY) * percent) - bone.shearY) * alpha; + }; + return ShearTimeline; + }(TranslateTimeline)); + spine.ShearTimeline = ShearTimeline; + var ColorTimeline = (function (_super) { + __extends(ColorTimeline, _super); + function ColorTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + 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 { + // Interpolate between the previous frame and the current frame. + 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; + } + var color = skeleton.slots[this.slotIndex].color; + if (alpha < 1) + color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha); + else + color.set(r, g, b, a); + }; + 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)); + spine.ColorTimeline = ColorTimeline; + var AttachmentTimeline = (function () { + function AttachmentTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.attachmentNames = new Array(frameCount); + } + AttachmentTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time and value of the specified keyframe. */ + AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) { + this.frames[frameIndex] = time; + this.attachmentNames[frameIndex] = attachmentName; + }; + AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + 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; + }()); + spine.AttachmentTimeline = AttachmentTimeline; + var EventTimeline = (function () { + function EventTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.events = new Array(frameCount); + } + EventTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time of the specified keyframe. */ + EventTimeline.prototype.setFrame = function (frameIndex, event) { + this.frames[frameIndex] = event.time; + this.events[frameIndex] = event; + }; + /** Fires events for frames > lastTime and <= time. */ + EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + 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); + lastTime = -1; + } + else if (lastTime >= frames[frameCount - 1]) + return; + if (time < frames[0]) + return; // Time is before first frame. + 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; + }()); + spine.EventTimeline = EventTimeline; + var DrawOrderTimeline = (function () { + function DrawOrderTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.drawOrders = new Array(frameCount); + } + DrawOrderTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) { + this.frames[frameIndex] = time; + this.drawOrders[frameIndex] = drawOrder; + }; + DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var frame = 0; + if (time >= frames[frames.length - 1]) + frame = frames.length - 1; + else + frame = Animation.binarySearch(frames, time) - 1; + var drawOrder = skeleton.drawOrder; + var slots = skeleton.slots; + var drawOrderToSetupIndex = this.drawOrders[frame]; + if (drawOrderToSetupIndex == null) + spine.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; + }()); + spine.DrawOrderTimeline = DrawOrderTimeline; + var DeformTimeline = (function (_super) { + __extends(DeformTimeline, _super); + function DeformTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount); + this.frameVertices = new Array(frameCount); + } + /** Sets the time of the specified keyframe. */ + DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) { + this.frames[frameIndex] = time; + this.frameVertices[frameIndex] = vertices; + }; + DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var slot = skeleton.slots[this.slotIndex]; + var slotAttachment = slot.getAttachment(); + if (!(slotAttachment instanceof spine.VertexAttachment) || !slotAttachment.applyDeform(this.attachment)) + return; + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var frameVertices = this.frameVertices; + var vertexCount = frameVertices[0].length; + var verticesArray = slot.attachmentVertices; + if (verticesArray.length != vertexCount) + alpha = 1; // Don't mix from uninitialized slot vertices. + var vertices = spine.Utils.setArraySize(verticesArray, vertexCount); + if (time >= frames[frames.length - 1]) { + var lastVertices = frameVertices[frames.length - 1]; + if (alpha < 1) { + for (var i = 0; i < vertexCount; i++) + vertices[i] += (lastVertices[i] - vertices[i]) * alpha; + } + else + spine.Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount); + return; + } + // Interpolate between the previous frame and the current frame. + 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) { + for (var i = 0; i < vertexCount; i++) { + var prev = prevVertices[i]; + vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha; + } + } + else { + for (var i = 0; i < vertexCount; i++) { + var prev = prevVertices[i]; + vertices[i] = prev + (nextVertices[i] - prev) * percent; + } + } + }; + return DeformTimeline; + }(CurveTimeline)); + spine.DeformTimeline = DeformTimeline; + var IkConstraintTimeline = (function (_super) { + __extends(IkConstraintTimeline, _super); + function IkConstraintTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES); + } + /** Sets the time, mix and bend direction of the specified keyframe. */ + IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, bendDirection) { + frameIndex *= IkConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + IkConstraintTimeline.MIX] = mix; + this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection; + }; + IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.ikConstraints[this.ikConstraintIndex]; + if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { + constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]); + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES); + var mix = frames[frame + IkConstraintTimeline.PREV_MIX]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime)); + constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]); + }; + IkConstraintTimeline.ENTRIES = 3; + IkConstraintTimeline.PREV_TIME = -3; + IkConstraintTimeline.PREV_MIX = -2; + IkConstraintTimeline.PREV_BEND_DIRECTION = -1; + IkConstraintTimeline.MIX = 1; + IkConstraintTimeline.BEND_DIRECTION = 2; + return IkConstraintTimeline; + }(CurveTimeline)); + spine.IkConstraintTimeline = IkConstraintTimeline; + var TransformConstraintTimeline = (function (_super) { + __extends(TransformConstraintTimeline, _super); + function TransformConstraintTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES); + } + /** Sets the time and mixes of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.transformConstraints[this.transformConstraintIndex]; + if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { + var i = frames.length; + constraint.rotateMix += (frames[i + TransformConstraintTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + TransformConstraintTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + constraint.scaleMix += (frames[i + TransformConstraintTimeline.PREV_SCALE] - constraint.scaleMix) * alpha; + constraint.shearMix += (frames[i + TransformConstraintTimeline.PREV_SHEAR] - constraint.shearMix) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES); + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime)); + var rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE]; + var translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE]; + var scale = frames[frame + TransformConstraintTimeline.PREV_SCALE]; + var shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR]; + constraint.rotateMix += (rotate + (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent - constraint.translateMix) + * alpha; + constraint.scaleMix += (scale + (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent - constraint.scaleMix) * alpha; + constraint.shearMix += (shear + (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent - 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)); + spine.TransformConstraintTimeline = TransformConstraintTimeline; + var PathConstraintPositionTimeline = (function (_super) { + __extends(PathConstraintPositionTimeline, _super); + function PathConstraintPositionTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) { + var i = frames.length; + constraint.position += (frames[i + PathConstraintPositionTimeline.PREV_VALUE] - constraint.position) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES); + var 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)); + constraint.position += (position + (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent - constraint.position) * alpha; + }; + PathConstraintPositionTimeline.ENTRIES = 2; + PathConstraintPositionTimeline.PREV_TIME = -2; + PathConstraintPositionTimeline.PREV_VALUE = -1; + PathConstraintPositionTimeline.VALUE = 1; + return PathConstraintPositionTimeline; + }(CurveTimeline)); + spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline; + var PathConstraintSpacingTimeline = (function (_super) { + __extends(PathConstraintSpacingTimeline, _super); + function PathConstraintSpacingTimeline(frameCount) { + _super.call(this, frameCount); + } + PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) { + var i = frames.length; + constraint.spacing += (frames[i + PathConstraintSpacingTimeline.PREV_VALUE] - constraint.spacing) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES); + var 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)); + constraint.spacing += (spacing + (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent - constraint.spacing) * alpha; + }; + return PathConstraintSpacingTimeline; + }(PathConstraintPositionTimeline)); + spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline; + var PathConstraintMixTimeline = (function (_super) { + __extends(PathConstraintMixTimeline, _super); + function PathConstraintMixTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES); + } + /** Sets the time and mixes of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { + var i = frames.length; + constraint.rotateMix += (frames[i + PathConstraintMixTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + PathConstraintMixTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES); + var rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE]; + var 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)); + constraint.rotateMix += (rotate + (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent - 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)); + spine.PathConstraintMixTimeline = PathConstraintMixTimeline; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var AnimationState = (function () { + function AnimationState(data) { + if (data === void 0) { data = null; } + this.tracks = new Array(); + this.events = new Array(); + this.listeners = new Array(); + this.timeScale = 1; + if (data == null) + throw new Error("data cannot be null."); + this.data = data; + } + AnimationState.prototype.update = function (delta) { + delta *= this.timeScale; + for (var i = 0; i < this.tracks.length; i++) { + var current = this.tracks[i]; + if (current == null) + continue; + var next = current.next; + if (next != null) { + var nextTime = current.lastTime - next.delay; + if (nextTime >= 0) { + var nextDelta = delta * next.timeScale; + next.time = nextTime + nextDelta; // For start event to see correct time. + current.time += delta * current.timeScale; // For end event to see correct time. + this.setCurrent(i, next); + next.time -= nextDelta; // Prevent increasing time twice, below. + current = next; + } + } + else if (!current.loop && current.lastTime >= current.endTime) { + // End non-looping animation when it reaches its end time and there is no next entry. + this.clearTrack(i); + continue; + } + current.time += delta * current.timeScale; + if (current.previous != null) { + var previousDelta = delta * current.previous.timeScale; + current.previous.time += previousDelta; + current.mixTime += previousDelta; + } + } + }; + AnimationState.prototype.apply = function (skeleton) { + var events = this.events; + var listenerCount = this.listeners.length; + for (var i = 0; i < this.tracks.length; i++) { + var current = this.tracks[i]; + if (current == null) + continue; + events.length = 0; + var time = current.time; + var lastTime = current.lastTime; + var endTime = current.endTime; + var loop = current.loop; + if (!loop && time > endTime) + time = endTime; + var previous = current.previous; + if (previous == null) + current.animation.mix(skeleton, lastTime, time, loop, events, current.mix); + else { + var previousTime = previous.time; + if (!previous.loop && previousTime > previous.endTime) + previousTime = previous.endTime; + previous.animation.apply(skeleton, previousTime, previousTime, previous.loop, null); + var alpha = current.mixTime / current.mixDuration * current.mix; + if (alpha >= 1) { + alpha = 1; + current.previous = null; + } + current.animation.mix(skeleton, lastTime, time, loop, events, alpha); + } + for (var ii = 0, nn = events.length; ii < nn; ii++) { + var event_1 = events[ii]; + if (current.listener != null) + current.listener.event(i, event_1); + for (var iii = 0; iii < listenerCount; iii++) + this.listeners[iii].event(i, event_1); + } + // Check if completed the animation or a loop iteration. + if (loop ? (lastTime % endTime > time % endTime) : (lastTime < endTime && time >= endTime)) { + var count = spine.MathUtils.toInt(time / endTime); + if (current.listener != null) + current.listener.complete(i, count); + for (var ii = 0, nn = this.listeners.length; ii < nn; ii++) + this.listeners[ii].complete(i, count); + } + current.lastTime = current.time; + } + }; + AnimationState.prototype.clearTracks = function () { + for (var i = 0, n = this.tracks.length; i < n; i++) + this.clearTrack(i); + this.tracks.length = 0; + }; + AnimationState.prototype.clearTrack = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return; + var current = this.tracks[trackIndex]; + if (current == null) + return; + if (current.listener != null) + current.listener.end(trackIndex); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(trackIndex); + this.tracks[trackIndex] = null; + this.freeAll(current); + }; + AnimationState.prototype.freeAll = function (entry) { + while (entry != null) { + var next = entry.next; + entry = next; + } + }; + AnimationState.prototype.expandToIndex = function (index) { + if (index < this.tracks.length) + return this.tracks[index]; + spine.Utils.setArraySize(this.tracks, index - this.tracks.length + 1, null); + this.tracks.length = index + 1; + return null; + }; + AnimationState.prototype.setCurrent = function (index, entry) { + var current = this.expandToIndex(index); + if (current != null) { + var previous = current.previous; + current.previous = null; + if (current.listener != null) + current.listener.end(index); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(index); + entry.mixDuration = this.data.getMix(current.animation, entry.animation); + if (entry.mixDuration > 0) { + entry.mixTime = 0; + // If a mix is in progress, mix from the closest animation. + if (previous != null && current.mixTime / current.mixDuration < 0.5) { + entry.previous = previous; + previous = current; + } + else + entry.previous = current; + } + } + this.tracks[index] = entry; + if (entry.listener != null) + entry.listener.start(index); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].start(index); + }; + /** @see #setAnimation(int, Animation, boolean) */ + 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); + }; + /** Set the current animation. Any queued animations are cleared. */ + AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) { + var current = this.expandToIndex(trackIndex); + if (current != null) + this.freeAll(current.next); + var entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + this.setCurrent(trackIndex, entry); + return entry; + }; + /** {@link #addAnimation(int, Animation, boolean, float)} */ + 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); + }; + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) { + var entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + var last = this.expandToIndex(trackIndex); + if (last != null) { + while (last.next != null) + last = last.next; + last.next = entry; + } + else + this.tracks[trackIndex] = entry; + if (delay <= 0) { + if (last != null) + delay += last.endTime - this.data.getMix(last.animation, animation); + else + delay = 0; + } + entry.delay = delay; + return entry; + }; + /** @return May be null. */ + AnimationState.prototype.getCurrent = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return null; + return this.tracks[trackIndex]; + }; + /** Adds a listener to receive events for all animations. */ + AnimationState.prototype.addListener = function (listener) { + if (listener == null) + throw new Error("listener cannot be null."); + this.listeners.push(listener); + }; + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + 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; + }; + return AnimationState; + }()); + spine.AnimationState = AnimationState; + var TrackEntry = (function () { + function TrackEntry() { + this.loop = false; + this.delay = 0; + this.time = 0; + this.lastTime = -1; + this.endTime = 0; + this.timeScale = 1; + this.mixTime = 0; + this.mixDuration = 0; + this.mix = 1; + } + TrackEntry.prototype.reset = function () { + this.next = null; + this.previous = null; + this.animation = null; + this.listener = null; + this.timeScale = 1; + this.lastTime = -1; // Trigger events on frame zero. + this.time = 0; + }; + /** Returns true if the current time is greater than the end time, regardless of looping. */ + TrackEntry.prototype.isComplete = function () { + return this.time >= this.endTime; + }; + return TrackEntry; + }()); + spine.TrackEntry = TrackEntry; + var AnimationStateAdapter = (function () { + function AnimationStateAdapter() { + } + AnimationStateAdapter.prototype.event = function (trackIndex, event) { + }; + AnimationStateAdapter.prototype.complete = function (trackIndex, loopCount) { + }; + AnimationStateAdapter.prototype.start = function (trackIndex) { + }; + AnimationStateAdapter.prototype.end = function (trackIndex) { + }; + return AnimationStateAdapter; + }()); + spine.AnimationStateAdapter = AnimationStateAdapter; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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.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; + }; + return AnimationStateData; + }()); + spine.AnimationStateData = AnimationStateData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + (function (BlendMode) { + BlendMode[BlendMode["Normal"] = 0] = "Normal"; + BlendMode[BlendMode["Additive"] = 1] = "Additive"; + BlendMode[BlendMode["Multiply"] = 2] = "Multiply"; + BlendMode[BlendMode["Screen"] = 3] = "Screen"; + })(spine.BlendMode || (spine.BlendMode = {})); + var BlendMode = spine.BlendMode; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Bone = (function () { + /** @param parent May be null. */ + function Bone(data, skeleton, parent) { + 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.appliedRotation = 0; + this.a = 0; + this.b = 0; + this.worldX = 0; + this.c = 0; + this.d = 0; + this.worldY = 0; + this.worldSignX = 0; + this.worldSignY = 0; + this.sorted = 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(); + } + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + Bone.prototype.update = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + /** Computes the world transform using the parent bone and this bone's local transform. */ + Bone.prototype.updateWorldTransform = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + /** Computes the world transform using the parent bone and the specified local transform. */ + Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) { + this.appliedRotation = rotation; + var rotationY = rotation + 90 + shearY; + var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX, lb = spine.MathUtils.cosDeg(rotationY) * scaleY; + var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX, ld = spine.MathUtils.sinDeg(rotationY) * scaleY; + var parent = this.parent; + if (parent == null) { + var skeleton = this.skeleton; + if (skeleton.flipX) { + x = -x; + la = -la; + lb = -lb; + } + if (skeleton.flipY) { + y = -y; + lc = -lc; + ld = -ld; + } + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + this.worldX = x; + this.worldY = y; + this.worldSignX = spine.MathUtils.signum(scaleX); + this.worldSignY = spine.MathUtils.signum(scaleY); + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + this.worldX = pa * x + pb * y + parent.worldX; + this.worldY = pc * x + pd * y + parent.worldY; + this.worldSignX = parent.worldSignX * spine.MathUtils.signum(scaleX); + this.worldSignY = parent.worldSignY * spine.MathUtils.signum(scaleY); + if (this.data.inheritRotation && this.data.inheritScale) { + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else { + if (this.data.inheritRotation) { + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + var cos = spine.MathUtils.cosDeg(parent.appliedRotation), sin = spine.MathUtils.sinDeg(parent.appliedRotation); + var temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + if (!parent.data.inheritRotation) + break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else if (this.data.inheritScale) { + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + var cos = spine.MathUtils.cosDeg(parent.appliedRotation), sin = spine.MathUtils.sinDeg(parent.appliedRotation); + var psx = parent.scaleX, psy = parent.scaleY; + var za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy; + var temp = pa * za + pb * zc; + pb = pb * zd - pa * zb; + pa = temp; + temp = pc * za + pd * zc; + pd = pd * zd - pc * zb; + pc = temp; + if (psx >= 0) + sin = -sin; + temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + if (!parent.data.inheritScale) + break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else { + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + } + if (this.skeleton.flipX) { + this.a = -this.a; + this.b = -this.b; + } + if (this.skeleton.flipY) { + this.c = -this.c; + this.d = -this.d; + } + } + }; + 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.c, this.a) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldRotationY = function () { + return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldScaleX = function () { + return Math.sqrt(this.a * this.a + this.b * this.b) * this.worldSignX; + }; + Bone.prototype.getWorldScaleY = function () { + return Math.sqrt(this.c * this.c + this.d * this.d) * this.worldSignY; + }; + Bone.prototype.worldToLocalRotationX = function () { + var parent = this.parent; + if (parent == null) + return this.rotation; + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, a = this.a, c = this.c; + return Math.atan2(pa * c - pc * a, pd * a - pb * c) * spine.MathUtils.radDeg; + }; + Bone.prototype.worldToLocalRotationY = function () { + var parent = this.parent; + if (parent == null) + return this.rotation; + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, b = this.b, d = this.d; + return Math.atan2(pa * d - pc * b, pd * b - pb * d) * spine.MathUtils.radDeg; + }; + Bone.prototype.rotateWorld = function (degrees) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees); + this.a = cos * a - sin * c; + this.b = cos * b - sin * d; + this.c = sin * a + cos * c; + this.d = sin * b + cos * d; + }; + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + Bone.prototype.updateLocalTransform = function () { + var parent = this.parent; + if (parent == null) { + this.x = this.worldX; + this.y = this.worldY; + this.rotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg; + this.scaleX = Math.sqrt(this.a * this.a + this.c * this.c); + this.scaleY = Math.sqrt(this.b * this.b + this.d * this.d); + var det = this.a * this.d - this.b * this.c; + this.shearX = 0; + this.shearY = Math.atan2(this.a * this.b + this.c * this.d, det) * spine.MathUtils.radDeg; + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + var pid = 1 / (pa * pd - pb * pc); + var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY; + this.x = (dx * pd * pid - dy * pb * pid); + this.y = (dy * pa * pid - dx * pc * pid); + var ia = pid * pd; + var id = pid * pa; + var ib = pid * pb; + var ic = pid * pc; + var ra = ia * this.a - ib * this.c; + var rb = ia * this.b - ib * this.d; + var rc = id * this.c - ic * this.a; + var rd = id * this.d - ic * this.b; + this.shearX = 0; + this.scaleX = Math.sqrt(ra * ra + rc * rc); + if (this.scaleX > 0.0001) { + var det = ra * rd - rb * rc; + this.scaleY = det / this.scaleX; + this.shearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg; + this.rotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg; + } + else { + this.scaleX = 0; + this.scaleY = Math.sqrt(rb * rb + rd * rd); + this.shearY = 0; + this.rotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg; + } + this.appliedRotation = this.rotation; + }; + Bone.prototype.worldToLocal = function (world) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var invDet = 1 / (a * d - b * c); + var x = world.x - this.worldX, y = world.y - this.worldY; + world.x = (x * d * invDet - y * b * invDet); + world.y = (y * a * invDet - x * c * invDet); + return world; + }; + Bone.prototype.localToWorld = function (local) { + var x = local.x, y = local.y; + local.x = x * this.a + y * this.b + this.worldX; + local.y = x * this.c + y * this.d + this.worldY; + return local; + }; + return Bone; + }()); + spine.Bone = Bone; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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.inheritRotation = true; + this.inheritScale = true; + 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; + }()); + spine.BoneData = BoneData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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; + }()); + spine.Event = Event; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var EventData = (function () { + function EventData(name) { + this.name = name; + } + return EventData; + }()); + spine.EventData = EventData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var IkConstraint = (function () { + function IkConstraint(data, skeleton) { + this.mix = 1; + this.bendDirection = 0; + this.level = 0; + 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.bendDirection = data.bendDirection; + 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.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.mix); + break; + case 2: + this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix); + break; + } + }; + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) { + var pp = bone.parent; + var id = 1 / (pp.a * pp.d - pp.b * pp.c); + var x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * pp.d - y * pp.b) * id - bone.x, ty = (y * pp.a - x * pp.c) * id - bone.y; + var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.shearX - bone.rotation; + if (bone.scaleX < 0) + rotationIK += 180; + if (rotationIK > 180) + rotationIK -= 360; + else if (rotationIK < -180) + rotationIK += 360; + bone.updateWorldTransformWith(bone.x, bone.y, bone.rotation + rotationIK * alpha, bone.scaleX, bone.scaleY, bone.shearX, bone.shearY); + }; + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, alpha) { + if (alpha == 0) { + child.updateWorldTransform(); + return; + } + var px = parent.x, py = parent.y, psx = parent.scaleX, psy = parent.scaleY, csx = child.scaleX; + 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.x, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d; + var u = Math.abs(psx - psy) <= 0.0001; + if (!u) { + cy = 0; + cwx = a * cx + parent.worldX; + cwy = c * cx + parent.worldY; + } + else { + cy = child.y; + cwx = a * cx + b * cy + parent.worldX; + cwy = c * cx + d * cy + parent.worldY; + } + var pp = parent.parent; + a = pp.a; + b = pp.b; + c = pp.c; + d = pp.d; + var id = 1 / (a * d - b * c), x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py; + x = cwx - pp.worldX; + y = cwy - pp.worldY; + 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 = 0, a2 = 0; + outer: if (u) { + l2 *= psx; + var cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2); + if (cos < -1) + cos = -1; + else if (cos > 1) + cos = 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, dd = tx * tx + ty * ty, 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 = 0, minDist = Number.MAX_VALUE, minX = 0, minY = 0; + var maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0; + x = l1 + a; + d = x * x; + if (d > maxDist) { + maxAngle = 0; + maxDist = d; + maxX = x; + } + x = l1 - a; + d = x * x; + if (d < minDist) { + minAngle = spine.MathUtils.PI; + minDist = d; + minX = x; + } + var angle = Math.acos(-a * l1 / (aa - bb)); + x = a * Math.cos(angle) + l1; + y = b * Math.sin(angle); + d = x * x + y * y; + if (d < minDist) { + minAngle = angle; + minDist = d; + minX = x; + minY = y; + } + if (d > maxDist) { + maxAngle = angle; + 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.rotation; + a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation; + if (a1 > 180) + a1 -= 360; + else if (a1 < -180) + a1 += 360; + parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.scaleX, parent.scaleY, 0, 0); + rotation = child.rotation; + a2 = ((a2 + os) * spine.MathUtils.radDeg - child.shearX) * s2 + os2 - rotation; + if (a2 > 180) + a2 -= 360; + else if (a2 < -180) + a2 += 360; + child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.scaleX, child.scaleY, child.shearX, child.shearY); + }; + return IkConstraint; + }()); + spine.IkConstraint = IkConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var IkConstraintData = (function () { + function IkConstraintData(name) { + this.bones = new Array(); + this.bendDirection = 1; + this.mix = 1; + this.name = name; + } + return IkConstraintData; + }()); + spine.IkConstraintData = IkConstraintData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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(); + 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.apply = function () { + this.update(); + }; + PathConstraint.prototype.update = function () { + var attachment = this.target.getAttachment(); + if (!(attachment instanceof spine.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 == spine.SpacingMode.Length; + var rotateMode = data.rotateMode; + var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale; + var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1; + var bones = this.bones; + var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null; + var spacing = this.spacing; + if (scale || lengthSpacing) { + if (scale) + lengths = spine.Utils.setArraySize(this.lengths, boneCount); + for (var i = 0, n = spacesCount - 1; i < n;) { + var bone = bones[i]; + var length_1 = bone.data.length, x = length_1 * bone.a, y = length_1 * bone.c; + length_1 = Math.sqrt(x * x + y * y); + if (scale) + lengths[i] = length_1; + spaces[++i] = lengthSpacing ? Math.max(0, length_1 + spacing) : spacing; + } + } + else { + for (var i = 1; i < spacesCount; i++) + spaces[i] = spacing; + } + var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, spacingMode == spine.SpacingMode.Percent); + var skeleton = this.target.bone.skeleton; + var skeletonX = skeleton.x, skeletonY = skeleton.y; + var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; + var tip = rotateMode == spine.RotateMode.Chain && offsetRotation == 0; + for (var i = 0, p = 3; i < boneCount; i++, p += 3) { + var bone = bones[i]; + bone.worldX += (boneX - skeletonX - bone.worldX) * translateMix; + bone.worldY += (boneY - skeletonY - bone.worldY) * 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; + bone.a *= s; + bone.c *= s; + } + } + boneX = x; + boneY = y; + if (rotate) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.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) - offsetRotation * spine.MathUtils.degRad; + 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; + } + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + cos = Math.cos(r); + sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + } + }; + PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) { + var target = this.target; + var position = this.position; + var spaces = this.spaces, out = spine.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 = spine.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.computeWorldVerticesWith(target, 2, 4, world, 0); + } + this.addBeforePosition(p, world, 0, out, o); + continue; + } + else if (p > pathLength_1) { + if (prevCurve != PathConstraint.AFTER) { + prevCurve = PathConstraint.AFTER; + path.computeWorldVerticesWith(target, verticesLength - 6, 4, world, 0); + } + this.addAfterPosition(p - pathLength_1, world, 0, out, o); + continue; + } + // Determine curve containing position. + 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.computeWorldVerticesWith(target, verticesLength - 4, 4, world, 0); + path.computeWorldVerticesWith(target, 0, 4, world, 4); + } + else + path.computeWorldVerticesWith(target, curve * 6 + 2, 8, world, 0); + } + 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; + } + // World vertices. + if (closed) { + verticesLength += 2; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength - 4, world, 0); + path.computeWorldVerticesWith(target, 0, 2, world, verticesLength - 4); + world[verticesLength - 2] = world[0]; + world[verticesLength - 1] = world[1]; + } + else { + curveCount--; + verticesLength -= 4; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength, world, 0); + } + // Curve lengths. + var curves = spine.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; + } + // Determine curve containing position. + 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; + } + // Curve segment lengths. + 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; + } + // Weight by segment length. + 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) + 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; + return PathConstraint; + }()); + spine.PathConstraint = PathConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var PathConstraintData = (function () { + function PathConstraintData(name) { + this.bones = new Array(); + this.name = name; + } + return PathConstraintData; + }()); + spine.PathConstraintData = PathConstraintData; + (function (PositionMode) { + PositionMode[PositionMode["Fixed"] = 0] = "Fixed"; + PositionMode[PositionMode["Percent"] = 1] = "Percent"; + })(spine.PositionMode || (spine.PositionMode = {})); + var PositionMode = spine.PositionMode; + (function (SpacingMode) { + SpacingMode[SpacingMode["Length"] = 0] = "Length"; + SpacingMode[SpacingMode["Fixed"] = 1] = "Fixed"; + SpacingMode[SpacingMode["Percent"] = 2] = "Percent"; + })(spine.SpacingMode || (spine.SpacingMode = {})); + var SpacingMode = spine.SpacingMode; + (function (RotateMode) { + RotateMode[RotateMode["Tangent"] = 0] = "Tangent"; + RotateMode[RotateMode["Chain"] = 1] = "Chain"; + RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale"; + })(spine.RotateMode || (spine.RotateMode = {})); + var RotateMode = spine.RotateMode; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Skeleton = (function () { + function Skeleton(data) { + this._updateCache = new Array(); + this.time = 0; + this.flipX = false; + this.flipY = false; + 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 spine.Bone(boneData, this, null); + else { + var parent_1 = this.bones[boneData.parent.index]; + bone = new spine.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 spine.Slot(slotData, bone); + this.slots.push(slot); + this.drawOrder.push(slot); + } + this.ikConstraints = new Array(); + this.ikConstraintsSorted = new Array(); + for (var i = 0; i < data.ikConstraints.length; i++) { + var ikConstraintData = data.ikConstraints[i]; + this.ikConstraints.push(new spine.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 spine.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 spine.PathConstraint(pathConstraintData, this)); + } + this.color = new spine.Color(1, 1, 1, 1); + this.updateCache(); + } + Skeleton.prototype.updateCache = function () { + var updateCache = this._updateCache; + updateCache.length = 0; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + bones[i].sorted = false; + // IK first, lowest hierarchy depth first. + var ikConstraints = this.ikConstraintsSorted; + ikConstraints.length = 0; + for (var i = 0; i < this.ikConstraints.length; i++) + ikConstraints.push(this.ikConstraints[i]); + var ikCount = ikConstraints.length; + for (var i = 0, level = 0, n = ikCount; i < n; i++) { + var ik = ikConstraints[i]; + var bone = ik.bones[0].parent; + for (level = 0; bone != null; level++) + bone = bone.parent; + ik.level = level; + } + for (var i = 1, ii = 0; i < ikCount; i++) { + var ik = ikConstraints[i]; + var level = ik.level; + for (ii = i - 1; ii >= 0; ii--) { + var other = ikConstraints[ii]; + if (other.level < level) + break; + ikConstraints[ii + 1] = other; + } + ikConstraints[ii + 1] = ik; + } + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var constraint = ikConstraints[i]; + var target = constraint.target; + this.sortBone(target); + var constrained = constraint.bones; + var parent_2 = constrained[0]; + this.sortBone(parent_2); + updateCache.push(constraint); + this.sortReset(parent_2.children); + constrained[constrained.length - 1].sorted = true; + } + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + 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 ii = 0, nn = this.data.skins.length; ii < nn; ii++) + this.sortPathConstraintAttachment(this.data.skins[ii], slotIndex, slotBone); + var attachment = slot.getAttachment(); + if (attachment instanceof spine.PathAttachment) + this.sortPathConstraintAttachmentWith(attachment, slotBone); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + 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; + } + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + this.sortBone(constraint.target); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + 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; + } + for (var i = 0, n = bones.length; i < n; i++) + this.sortBone(bones[i]); + }; + 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 spine.PathAttachment)) + return; + var pathBones = attachment.bones; + if (pathBones == null) + this.sortBone(slotBone); + else { + var bones = this.bones; + for (var i = 0; i < pathBones.length; 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.sorted) + this.sortReset(bone.children); + bone.sorted = false; + } + }; + /** Updates the world transform for each bone and applies constraints. */ + Skeleton.prototype.updateWorldTransform = function () { + var updateCache = this._updateCache; + for (var i = 0, n = updateCache.length; i < n; i++) + updateCache[i].update(); + }; + /** Sets the bones, constraints, and slots to their setup pose values. */ + Skeleton.prototype.setToSetupPose = function () { + this.setBonesToSetupPose(); + this.setSlotsToSetupPose(); + }; + /** Sets the bones and constraints to their setup pose values. */ + 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.bendDirection = constraint.data.bendDirection; + constraint.mix = constraint.data.mix; + } + 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; + spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length); + for (var i = 0, n = slots.length; i < n; i++) + slots[i].setToSetupPose(); + }; + /** @return May return null. */ + Skeleton.prototype.getRootBone = function () { + if (this.bones.length == 0) + return null; + return this.bones[0]; + }; + /** @return May be null. */ + 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; + }; + /** @return -1 if the bone was not found. */ + 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; + }; + /** @return May be null. */ + 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; + }; + /** @return -1 if the bone was not found. */ + 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; + }; + /** Sets a skin by name. + * @see #setSkin(Skin) */ + Skeleton.prototype.setSkinByName = function (skinName) { + var skin = this.data.findSkin(skinName); + if (skin == null) + throw new Error("Skin not found: " + skinName); + this.setSkin(skin); + }; + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + Skeleton.prototype.setSkin = function (newSkin) { + 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; + }; + /** @return May be null. */ + Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) { + return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName); + }; + /** @return May be null. */ + 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; + }; + /** @param attachmentName May be 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); + }; + /** @return May be null. */ + 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; + }; + /** @return May be 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; + }; + /** @return May be 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; + }; + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + Skeleton.prototype.getBounds = function (offset, size) { + 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]; + var vertices = null; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.RegionAttachment) + vertices = attachment.updateWorldVertices(slot, false); + else if (attachment instanceof spine.MeshAttachment) + vertices = attachment.updateWorldVertices(slot, true); + if (vertices != null) { + for (var ii = 0, nn = vertices.length; ii < nn; ii += 5) { + 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; + }; + return Skeleton; + }()); + spine.Skeleton = Skeleton; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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 spine.Pool(function () { + return spine.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]; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.BoundingBoxAttachment) { + var boundingBox = attachment; + boundingBoxes.push(boundingBox); + var polygon = polygonPool.obtain(); + if (polygon.length != boundingBox.worldVerticesLength) { + polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength); + } + polygons.push(polygon); + boundingBox.computeWorldVertices(slot, polygon); + } + } + if (updateAabb) + this.aabbCompute(); + }; + 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; + }; + /** Returns true if the axis aligned bounding box contains the point. */ + SkeletonBounds.prototype.aabbContainsPoint = function (x, y) { + return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY; + }; + /** Returns true if the axis aligned bounding box intersects the line segment. */ + 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; + }; + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) { + return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY; + }; + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + 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; + }; + /** Returns true if the polygon contains the point. */ + 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; + }; + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + 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; + }; + /** Returns true if the polygon contains any part of the line segment. */ + 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; + }; + /** Returns the polygon for the specified bounding box, or null. */ + 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]; + }; + return SkeletonBounds; + }()); + spine.SkeletonBounds = SkeletonBounds; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SkeletonData = (function () { + function SkeletonData() { + this.bones = new Array(); // Ordered parents first. + this.slots = new Array(); // Setup pose draw order. + this.skins = new Array(); + this.events = new Array(); + this.animations = new Array(); + this.ikConstraints = new Array(); + this.transformConstraints = new Array(); + this.pathConstraints = new Array(); + } + 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_2 = events[i]; + if (event_2.name == eventDataName) + return event_2; + } + 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; + }()); + spine.SkeletonData = SkeletonData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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 spine.SkeletonData(); + var root = JSON.parse(json); + // Skeleton + var skeletonMap = root.skeleton; + if (skeletonMap != null) { + skeletonData.hash = skeletonMap.hash; + skeletonData.version = skeletonMap.spine; + skeletonData.width = skeletonMap.width; + skeletonData.height = skeletonMap.height; + skeletonData.imagesPath = skeletonMap.images; + } + // Bones + if (root.bones) { + for (var i = 0; i < root.bones.length; i++) { + var boneMap = root.bones[i]; + var parent_3 = null; + var parentName = this.getValue(boneMap, "parent", null); + if (parentName != null) { + parent_3 = skeletonData.findBone(parentName); + if (parent_3 == null) + throw new Error("Parent bone not found: " + parentName); + } + var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_3); + 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.inheritRotation = this.getValue(boneMap, "inheritRotation", true); + data.inheritScale = this.getValue(boneMap, "inheritScale", true); + skeletonData.bones.push(data); + } + } + // Slots. + 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 spine.SlotData(skeletonData.slots.length, slotName, boneData); + var color = slotMap.color ? slotMap.color : null; + if (color != null) + data.color.setFromString(color); + data.attachmentName = this.getValue(slotMap, "attachment", null); + data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal")); + skeletonData.slots.push(data); + } + } + // IK constraints + if (root.ik) { + for (var i = 0; i < root.ik.length; i++) { + var constraintMap = root.ik[i]; + var data = new spine.IkConstraintData(constraintMap.name); + 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.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1; + data.mix = constraintMap.mix ? constraintMap.mix : 1; + skeletonData.ikConstraints.push(data); + } + } + // Transform constraints. + if (root.transform) { + for (var i = 0; i < root.transform.length; i++) { + var constraintMap = root.transform[i]; + var data = new spine.TransformConstraintData(constraintMap.name); + 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.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); + } + } + // Path constraints. + if (root.path) { + for (var i = 0; i < root.path.length; i++) { + var constraintMap = root.path[i]; + var data = new spine.PathConstraintData(constraintMap.name); + 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 == spine.PositionMode.Fixed) + data.position *= scale; + data.spacing = this.getValue(constraintMap, "spacing", 0); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + data.spacing *= scale; + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + skeletonData.pathConstraints.push(data); + } + } + // Skins. + if (root.skins) { + for (var skinName in root.skins) { + var skinMap = root.skins[skinName]; + var skin = new spine.Skin(skinName); + for (var slotName in skinMap) { + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotName); + var slotMap = skinMap[slotName]; + for (var entryName in slotMap) { + var attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName); + if (attachment != null) + skin.addAttachment(slotIndex, entryName, attachment); + } + } + skeletonData.skins.push(skin); + if (skin.name == "default") + skeletonData.defaultSkin = skin; + } + } + // Linked meshes. + 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_4 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); + if (parent_4 == null) + throw new Error("Parent mesh not found: " + linkedMesh.parent); + linkedMesh.mesh.setParentMesh(parent_4); + linkedMesh.mesh.updateUVs(); + } + this.linkedMeshes.length = 0; + // Events. + if (root.events) { + for (var eventName in root.events) { + var eventMap = root.events[eventName]; + var data = new spine.EventData(eventName); + data.intValue = this.getValue(eventMap, "int", 0); + data.floatValue = this.getValue(eventMap, "float", 0); + data.stringValue = this.getValue(eventMap, "string", null); + skeletonData.events.push(data); + } + } + // Animations. + 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) { + 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); + region.updateOffset(); + return region; + } + case "boundingbox": { + var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); + if (box == null) + return null; + this.readVertices(map, box, map.vertexCount << 1); + 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); + var parent_5 = this.getValue(map, "parent", null); + if (parent_5 != null) { + mesh.inheritDeform = this.getValue(map, "deform", true); + this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent_5)); + return mesh; + } + var uvs = map.uvs; + this.readVertices(map, mesh, uvs.length); + mesh.triangles = map.triangles; + mesh.regionUVs = uvs; + mesh.updateUVs(); + 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 = spine.Utils.newArray(vertexCount / 3, 0); + for (var i = 0; i < map.lengths.length; i++) + lengths[i++] = map.lengths[i] * scale; + path.lengths = lengths; + return path; + } + } + return null; + }; + SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) { + var scale = this.scale; + attachment.worldVerticesLength = verticesLength; + var vertices = map.vertices; + if (verticesLength == vertices.length) { + if (scale != 1) { + for (var i = 0, n = vertices.length; i < n; i++) + vertices[i] *= scale; + } + attachment.vertices = spine.Utils.toFloatArray(vertices); + 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 = spine.Utils.toFloatArray(weights); + }; + SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) { + var scale = this.scale; + var timelines = new Array(); + var duration = 0; + // Slot timelines. + 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 == "color") { + var timeline = new spine.ColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var color = new spine.Color(); + color.setFromString(valueMap.color); + timeline.setFrame(frameIndex, valueMap.time, 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) * spine.ColorTimeline.ENTRIES]); + } + else if (timelineName = "attachment") { + var timeline = new spine.AttachmentTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex++, valueMap.time, valueMap.name); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + else + throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); + } + } + } + // Bone timelines. + 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 spine.RotateTimeline(timelineMap.length); + timeline.boneIndex = boneIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, valueMap.angle); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]); + } + else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") { + var timeline = null; + var timelineScale = 1; + if (timelineName === "scale") + timeline = new spine.ScaleTimeline(timelineMap.length); + else if (timelineName === "shear") + timeline = new spine.ShearTimeline(timelineMap.length); + else { + timeline = new spine.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", 0), y = this.getValue(valueMap, "y", 0); + timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]); + } + else + throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); + } + } + } + // IK constraint timelines. + if (map.ik) { + for (var constraintName in map.ik) { + var constraintMap = map.ik[constraintName]; + var constraint = skeletonData.findIkConstraint(constraintName); + var timeline = new spine.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, valueMap.time, this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "bendPositive", true) ? 1 : -1); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]); + } + } + // Transform constraint timelines. + if (map.transform) { + for (var constraintName in map.transform) { + var constraintMap = map.transform[constraintName]; + var constraint = skeletonData.findTransformConstraint(constraintName); + var timeline = new spine.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, valueMap.time, 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) * spine.TransformConstraintTimeline.ENTRIES]); + } + } + // Path constraint timelines. + if (map.paths) { + for (var constraintName in map.paths) { + var constraintMap = map.paths[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 spine.PathConstraintSpacingTimeline(timelineMap.length); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + timelineScale = scale; + } + else { + timeline = new spine.PathConstraintPositionTimeline(timelineMap.length); + if (data.positionMode == spine.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, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]); + } + else if (timelineName === "mix") { + var timeline = new spine.PathConstraintMixTimeline(timelineMap.length); + timeline.pathConstraintIndex = index; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, 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) * spine.PathConstraintMixTimeline.ENTRIES]); + } + } + } + } + // Deform timelines. + 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 spine.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 ? spine.Utils.newFloatArray(deformLength) : vertices; + else { + deform = spine.Utils.newFloatArray(deformLength); + var start = this.getValue(valueMap, "offset", 0); + spine.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, valueMap.time, deform); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + } + } + } + // Draw order timeline. + var drawOrderNode = map.drawOrder; + if (drawOrderNode == null) + drawOrderNode = map.draworder; + if (drawOrderNode != null) { + var timeline = new spine.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 = spine.Utils.newArray(slotCount, -1); + var unchanged = spine.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); + // Collect unchanged items. + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + // Set changed items. + drawOrder[originalIndex + offsetMap.offset] = originalIndex++; + } + // Collect remaining unchanged items. + while (originalIndex < slotCount) + unchanged[unchangedIndex++] = originalIndex++; + // Fill in unchanged items. + for (var i = slotCount - 1; i >= 0; i--) + if (drawOrder[i] == -1) + drawOrder[i] = unchanged[--unchangedIndex]; + } + timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + // Event timeline. + if (map.events) { + var timeline = new spine.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_3 = new spine.Event(eventMap.time, eventData); + event_3.intValue = this.getValue(eventMap, "int", eventData.intValue); + event_3.floatValue = this.getValue(eventMap, "float", eventData.floatValue); + event_3.stringValue = this.getValue(eventMap, "string", eventData.stringValue); + timeline.setFrame(frameIndex++, event_3); + } + 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 spine.Animation(name, timelines, duration)); + }; + SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { + if (!map.curve) + return; + if (map.curve === "stepped") + timeline.setStepped(frameIndex); + else if (Object.prototype.toString.call(map.curve) === '[object Array]') { + var curve = map.curve; + timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]); + } + }; + 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 spine.BlendMode.Normal; + if (str == "additive") + return spine.BlendMode.Additive; + if (str == "multiply") + return spine.BlendMode.Multiply; + if (str == "screen") + return spine.BlendMode.Screen; + throw new Error("Unknown blend mode: " + str); + }; + SkeletonJson.positionModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "fixed") + return spine.PositionMode.Fixed; + if (str == "percent") + return spine.PositionMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.spacingModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "length") + return spine.SpacingMode.Length; + if (str == "fixed") + return spine.SpacingMode.Fixed; + if (str == "percent") + return spine.SpacingMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.rotateModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "tangent") + return spine.RotateMode.Tangent; + if (str == "chain") + return spine.RotateMode.Chain; + if (str == "chainscale") + return spine.RotateMode.ChainScale; + throw new Error("Unknown rotate mode: " + str); + }; + return SkeletonJson; + }()); + spine.SkeletonJson = SkeletonJson; + var LinkedMesh = (function () { + function LinkedMesh(mesh, skin, slotIndex, parent) { + this.mesh = mesh; + this.skin = skin; + this.slotIndex = slotIndex; + this.parent = parent; + } + return LinkedMesh; + }()); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Skin = (function () { + function Skin(name) { + this.attachments = new Array(); + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + Skin.prototype.addAttachment = 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; + }; + /** @return May be null. */ + Skin.prototype.getAttachment = function (slotIndex, name) { + var dictionary = this.attachments[slotIndex]; + return dictionary ? dictionary[name] : null; + }; + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + 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, name); + if (attachment != null) + slot.setAttachment(attachment); + break; + } + } + } + slotIndex++; + } + }; + return Skin; + }()); + spine.Skin = Skin; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Slot = (function () { + function Slot(data, bone) { + this.attachmentVertices = 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 spine.Color(); + this.setToSetupPose(); + } + /** @return May be null. */ + Slot.prototype.getAttachment = function () { + return this.attachment; + }; + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + Slot.prototype.setAttachment = function (attachment) { + if (this.attachment == attachment) + return; + this.attachment = attachment; + this.attachmentTime = this.bone.skeleton.time; + this.attachmentVertices.length = 0; + }; + Slot.prototype.setAttachmentTime = function (time) { + this.attachmentTime = this.bone.skeleton.time - time; + }; + /** Returns the time since the attachment was set. */ + Slot.prototype.getAttachmentTime = function () { + return this.bone.skeleton.time - this.attachmentTime; + }; + Slot.prototype.setToSetupPose = function () { + this.color.setFromColor(this.data.color); + 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; + }()); + spine.Slot = Slot; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SlotData = (function () { + function SlotData(index, name, boneData) { + this.color = new spine.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; + }()); + spine.SlotData = SlotData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TransformConstraint = (function () { + function TransformConstraint(data, skeleton) { + this.rotateMix = 0; + this.translateMix = 0; + this.scaleMix = 0; + this.shearMix = 0; + this.temp = new spine.Vector2(); + 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.apply = function () { + this.update(); + }; + TransformConstraint.prototype.update = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + var ta = target.a, tb = target.b, tc = target.c, td = target.d; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (rotateMix > 0) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var r = Math.atan2(tc, ta) - Math.atan2(c, a) + this.data.offsetRotation * spine.MathUtils.degRad; + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + var cos = Math.cos(r), sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + if (translateMix > 0) { + var temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + bone.worldX += (temp.x - bone.worldX) * translateMix; + bone.worldY += (temp.y - bone.worldY) * translateMix; + } + if (scaleMix > 0) { + var bs = Math.sqrt(bone.a * bone.a + bone.c * bone.c); + var ts = Math.sqrt(ta * ta + tc * tc); + var s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleX) * scaleMix) / bs : 0; + bone.a *= s; + bone.c *= s; + bs = Math.sqrt(bone.b * bone.b + bone.d * bone.d); + ts = Math.sqrt(tb * tb + td * td); + s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleY) * scaleMix) / bs : 0; + bone.b *= s; + bone.d *= s; + } + if (shearMix > 0) { + var b = bone.b, d = bone.d; + var by = Math.atan2(d, b); + var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a)); + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r = by + (r + this.data.offsetShearY * spine.MathUtils.degRad) * shearMix; + var s = Math.sqrt(b * b + d * d); + bone.b = Math.cos(r) * s; + bone.d = Math.sin(r) * s; + } + } + }; + return TransformConstraint; + }()); + spine.TransformConstraint = TransformConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TransformConstraintData = (function () { + function TransformConstraintData(name) { + 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; + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return TransformConstraintData; + }()); + spine.TransformConstraintData = TransformConstraintData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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(); + }; + Color.prototype.setFromColor = function (c) { + this.r = c.r; + this.g = c.g; + this.b = c.b; + this.a = c.a; + }; + 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; + }; + Color.prototype.add = function (r, g, b, a) { + this.r += r; + this.g += g; + this.b += b; + this.a += a; + this.clamp(); + }; + 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; + }; + return Color; + }()); + spine.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 : -1; + }; + MathUtils.toInt = function (x) { + return x > 0 ? Math.floor(x) : Math.ceil(x); + }; + 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; + }()); + spine.MathUtils = MathUtils; + 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.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.toFloatArray = function (array) { + return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array; + }; + Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined"; + return Utils; + }()); + spine.Utils = Utils; + var Pool = (function () { + function Pool(instantiator) { + this._items = new Array(16); + this._instantiator = instantiator; + } + Pool.prototype.obtain = function () { + return this._items.length > 0 ? this._items.pop() : this._instantiator(); + }; + Pool.prototype.free = function (item) { + this._items.push(item); + }; + Pool.prototype.freeAll = function (items) { + for (var i = 0; i < items.length; i++) + this._items[i] = items[i]; + }; + Pool.prototype.clear = function () { + this._items.length = 0; + }; + return Pool; + }()); + spine.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; + }; + return Vector2; + }()); + spine.Vector2 = Vector2; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Attachment = (function () { + function Attachment(name) { + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return Attachment; + }()); + spine.Attachment = Attachment; + var VertexAttachment = (function (_super) { + __extends(VertexAttachment, _super); + function VertexAttachment(name) { + _super.call(this, name); + this.worldVerticesLength = 0; + } + VertexAttachment.prototype.computeWorldVertices = function (slot, worldVertices) { + this.computeWorldVerticesWith(slot, 0, this.worldVerticesLength, worldVertices, 0); + }; + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + VertexAttachment.prototype.computeWorldVerticesWith = function (slot, start, count, worldVertices, offset) { + count += offset; + var skeleton = slot.bone.skeleton; + var x = skeleton.x, y = skeleton.y; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices; + var bones = this.bones; + if (bones == null) { + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v_1 = start, w = offset; w < count; v_1 += 2, w += 2) { + 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 += 2) { + var wx = x, wy = y; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * 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 += 2) { + var wx = x, wy = y; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + }; + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + VertexAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment; + }; + return VertexAttachment; + }(Attachment)); + spine.VertexAttachment = VertexAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + (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"; + })(spine.AttachmentType || (spine.AttachmentType = {})); + var AttachmentType = spine.AttachmentType; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var BoundingBoxAttachment = (function (_super) { + __extends(BoundingBoxAttachment, _super); + function BoundingBoxAttachment(name) { + _super.call(this, name); + } + return BoundingBoxAttachment; + }(spine.VertexAttachment)); + spine.BoundingBoxAttachment = BoundingBoxAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var MeshAttachment = (function (_super) { + __extends(MeshAttachment, _super); + function MeshAttachment(name) { + _super.call(this, name); + this.color = new spine.Color(1, 1, 1, 1); + this.inheritDeform = false; + this.tempColor = new spine.Color(0, 0, 0, 0); + } + MeshAttachment.prototype.updateUVs = function () { + var regionUVs = this.regionUVs; + var verticesLength = regionUVs.length; + var worldVerticesLength = (verticesLength >> 1) * 8; + if (this.worldVertices == null || this.worldVertices.length != worldVerticesLength) + this.worldVertices = spine.Utils.newFloatArray(worldVerticesLength); + var u = 0, v = 0, width = 0, height = 0; + if (this.region == null) { + u = v = 0; + width = height = 1; + } + else { + u = this.region.u; + v = this.region.v; + width = this.region.u2 - u; + height = this.region.v2 - v; + } + if (this.region.rotate) { + for (var i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i + 1] * width; + this.worldVertices[w + 1] = v + height - regionUVs[i] * height; + } + } + else { + for (var i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i] * width; + this.worldVertices[w + 1] = v + regionUVs[i + 1] * height; + } + } + }; + /** @return The updated world vertices. */ + MeshAttachment.prototype.updateWorldVertices = function (slot, premultipliedAlpha) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color, slotColor = slot.color, meshColor = this.color; + var alpha = skeletonColor.a * slotColor.a * meshColor.a; + var multiplier = premultipliedAlpha ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * meshColor.r * multiplier, skeletonColor.g * slotColor.g * meshColor.g * multiplier, skeletonColor.b * slotColor.b * meshColor.b * multiplier, alpha); + var x = skeleton.x, y = skeleton.y; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices, worldVertices = this.worldVertices; + var bones = this.bones; + if (bones == null) { + var verticesLength = vertices.length; + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v = 0, w = 0; v < verticesLength; v += 2, w += 8) { + var vx = vertices[v], vy = vertices[v + 1]; + worldVertices[w] = vx * a + vy * b + x; + worldVertices[w + 1] = vx * c + vy * d + y; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + return worldVertices; + } + var skeletonBones = skeleton.bones; + if (deformArray.length == 0) { + for (var w = 0, v = 0, b = 0, n = bones.length; v < n; w += 8) { + var wx = x, wy = y; + var nn = bones[v++] + v; + for (; v < nn; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + else { + var deform = deformArray; + for (var w = 0, v = 0, b = 0, f = 0, n = bones.length; v < n; w += 8) { + var wx = x, wy = y; + var nn = bones[v++] + v; + for (; v < nn; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + return worldVertices; + }; + MeshAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment || (this.inheritDeform && this._parentMesh == sourceAttachment); + }; + MeshAttachment.prototype.getParentMesh = function () { + return this._parentMesh; + }; + /** @param parentMesh May be null. */ + MeshAttachment.prototype.setParentMesh = function (parentMesh) { + this._parentMesh = parentMesh; + if (parentMesh != null) { + this.bones = parentMesh.bones; + this.vertices = parentMesh.vertices; + this.regionUVs = parentMesh.regionUVs; + this.triangles = parentMesh.triangles; + this.hullLength = parentMesh.hullLength; + } + }; + return MeshAttachment; + }(spine.VertexAttachment)); + spine.MeshAttachment = MeshAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var PathAttachment = (function (_super) { + __extends(PathAttachment, _super); + function PathAttachment(name) { + _super.call(this, name); + this.closed = false; + this.constantSpeed = false; + } + return PathAttachment; + }(spine.VertexAttachment)); + spine.PathAttachment = PathAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var RegionAttachment = (function (_super) { + __extends(RegionAttachment, _super); + function RegionAttachment(name) { + _super.call(this, name); + this.x = 0; + this.y = 0; + this.scaleX = 1; + this.scaleY = 1; + this.rotation = 0; + this.width = 0; + this.height = 0; + this.color = new spine.Color(1, 1, 1, 1); + this.offset = spine.Utils.newFloatArray(8); + this.vertices = spine.Utils.newFloatArray(8 * 4); + this.tempColor = new spine.Color(1, 1, 1, 1); + } + RegionAttachment.prototype.setRegion = function (region) { + var vertices = this.vertices; + if (region.rotate) { + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v2; + vertices[RegionAttachment.U3] = region.u; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v; + vertices[RegionAttachment.U1] = region.u2; + vertices[RegionAttachment.V1] = region.v2; + } + else { + vertices[RegionAttachment.U1] = region.u; + vertices[RegionAttachment.V1] = region.v2; + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v; + vertices[RegionAttachment.U3] = region.u2; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v2; + } + }; + 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.updateWorldVertices = function (slot, premultipliedAlpha) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color; + var slotColor = slot.color; + var regionColor = this.color; + var alpha = skeletonColor.a * slotColor.a * regionColor.a; + var multiplier = premultipliedAlpha ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha); + var vertices = this.vertices; + var offset = this.offset; + var bone = slot.bone; + var x = skeleton.x + bone.worldX, y = skeleton.y + bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var offsetX = 0, offsetY = 0; + offsetX = offset[RegionAttachment.OX1]; + offsetY = offset[RegionAttachment.OY1]; + vertices[RegionAttachment.X1] = offsetX * a + offsetY * b + x; // br + vertices[RegionAttachment.Y1] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C1R] = color.r; + vertices[RegionAttachment.C1G] = color.g; + vertices[RegionAttachment.C1B] = color.b; + vertices[RegionAttachment.C1A] = color.a; + offsetX = offset[RegionAttachment.OX2]; + offsetY = offset[RegionAttachment.OY2]; + vertices[RegionAttachment.X2] = offsetX * a + offsetY * b + x; // bl + vertices[RegionAttachment.Y2] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C2R] = color.r; + vertices[RegionAttachment.C2G] = color.g; + vertices[RegionAttachment.C2B] = color.b; + vertices[RegionAttachment.C2A] = color.a; + offsetX = offset[RegionAttachment.OX3]; + offsetY = offset[RegionAttachment.OY3]; + vertices[RegionAttachment.X3] = offsetX * a + offsetY * b + x; // ul + vertices[RegionAttachment.Y3] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C3R] = color.r; + vertices[RegionAttachment.C3G] = color.g; + vertices[RegionAttachment.C3B] = color.b; + vertices[RegionAttachment.C3A] = color.a; + offsetX = offset[RegionAttachment.OX4]; + offsetY = offset[RegionAttachment.OY4]; + vertices[RegionAttachment.X4] = offsetX * a + offsetY * b + x; // ur + vertices[RegionAttachment.Y4] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C4R] = color.r; + vertices[RegionAttachment.C4G] = color.g; + vertices[RegionAttachment.C4B] = color.b; + vertices[RegionAttachment.C4A] = color.a; + return vertices; + }; + 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; + }(spine.Attachment)); + spine.RegionAttachment = RegionAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TextureRegion = (function () { + function TextureRegion() { + this.u = 0; + this.v = 0; + this.u2 = 0; + this.v2 = 0; + this.width = 0; + this.height = 0; + this.rotate = false; + this.offsetX = 0; + this.offsetY = 0; + this.originalWidth = 0; + this.originalHeight = 0; + } + return TextureRegion; + }()); + spine.TextureRegion = TextureRegion; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var AssetManager = (function () { + function AssetManager(gl) { + this._assets = {}; + this._errors = {}; + this._toLoad = 0; + this._loaded = 0; + this._gl = gl; + } + AssetManager.prototype.loadText = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + this._toLoad++; + var request = new XMLHttpRequest(); + request.onreadystatechange = function () { + if (request.readyState == XMLHttpRequest.DONE) { + if (request.status >= 200 && request.status < 300) { + if (success) + success(path, request.responseText); + _this._assets[path] = request.responseText; + } + else { + if (error) + error(path, "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText); + _this._errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + } + _this._toLoad--; + _this._loaded++; + } + }; + request.open("GET", path, true); + request.send(); + }; + AssetManager.prototype.loadTexture = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + this._toLoad++; + var img = new Image(); + img.src = path; + img.onload = function (ev) { + if (success) + success(path, img); + var texture = new webgl.Texture(_this._gl, img); + _this._assets[path] = texture; + _this._toLoad--; + _this._loaded++; + }; + img.onerror = function (ev) { + if (error) + error(path, "Couldn't load image " + path); + _this._errors[path] = "Couldn't load image " + path; + _this._toLoad--; + _this._loaded++; + }; + }; + AssetManager.prototype.get = function (path) { + return this._assets[path]; + }; + AssetManager.prototype.remove = function (path) { + var asset = this._assets[path]; + if (asset instanceof webgl.Texture) { + asset.dispose(); + } + this._assets[path] = null; + }; + AssetManager.prototype.removeAll = function () { + for (var key in this._assets) { + var asset = this._assets[key]; + if (asset instanceof webgl.Texture) + asset.dispose(); + } + this._assets = {}; + }; + AssetManager.prototype.isLoadingComplete = function () { + return this._toLoad == 0; + }; + AssetManager.prototype.toLoad = function () { + return this._toLoad; + }; + AssetManager.prototype.loaded = function () { + return this._loaded; + }; + AssetManager.prototype.dispose = function () { + this.removeAll(); + }; + AssetManager.prototype.hasErrors = function () { + return Object.keys(this._errors).length > 0; + }; + AssetManager.prototype.errors = function () { + return this._errors; + }; + return AssetManager; + }()); + webgl.AssetManager = AssetManager; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + webgl.M00 = 0; + webgl.M01 = 4; + webgl.M02 = 8; + webgl.M03 = 12; + webgl.M10 = 1; + webgl.M11 = 5; + webgl.M12 = 9; + webgl.M13 = 13; + webgl.M20 = 2; + webgl.M21 = 6; + webgl.M22 = 10; + webgl.M23 = 14; + webgl.M30 = 3; + webgl.M31 = 7; + webgl.M32 = 11; + webgl.M33 = 15; + var Matrix4 = (function () { + function Matrix4() { + this.temp = new Float32Array(16); + this.values = new Float32Array(16); + var v = this.values; + v[webgl.M00] = 1; + v[webgl.M11] = 1; + v[webgl.M22] = 1; + v[webgl.M33] = 1; + } + Matrix4.prototype.set = function (values) { + this.values.set(values); + return this; + }; + Matrix4.prototype.transpose = function () { + var t = this.temp; + var v = this.values; + t[webgl.M00] = v[webgl.M00]; + t[webgl.M01] = v[webgl.M10]; + t[webgl.M02] = v[webgl.M20]; + t[webgl.M03] = v[webgl.M30]; + t[webgl.M10] = v[webgl.M01]; + t[webgl.M11] = v[webgl.M11]; + t[webgl.M12] = v[webgl.M21]; + t[webgl.M13] = v[webgl.M31]; + t[webgl.M20] = v[webgl.M02]; + t[webgl.M21] = v[webgl.M12]; + t[webgl.M22] = v[webgl.M22]; + t[webgl.M23] = v[webgl.M32]; + t[webgl.M30] = v[webgl.M03]; + t[webgl.M31] = v[webgl.M13]; + t[webgl.M32] = v[webgl.M23]; + t[webgl.M33] = v[webgl.M33]; + return this.set(t); + }; + Matrix4.prototype.identity = function () { + var v = this.values; + v[webgl.M00] = 1; + v[webgl.M01] = 0; + v[webgl.M02] = 0; + v[webgl.M03] = 0; + v[webgl.M10] = 0; + v[webgl.M11] = 1; + v[webgl.M12] = 0; + v[webgl.M13] = 0; + v[webgl.M20] = 0; + v[webgl.M21] = 0; + v[webgl.M22] = 1; + v[webgl.M23] = 0; + v[webgl.M30] = 0; + v[webgl.M31] = 0; + v[webgl.M32] = 0; + v[webgl.M33] = 1; + return this; + }; + Matrix4.prototype.invert = function () { + var v = this.values; + var t = this.temp; + var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03] + + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03] + - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13] + - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13] + + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23] + + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23] + - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33] + - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + if (l_det == 0) + throw new Error("non-invertible matrix"); + var inv_det = 1.0 / l_det; + t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32] + - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32] + + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32] + - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33]; + t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22] + + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23]; + t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32] + + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32] + - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32] + + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33]; + t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22] + - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23]; + t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31] + - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33]; + t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31] + + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33]; + t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31] + - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33]; + t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21] + + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23]; + t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31] + + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32]; + t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31] + - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32]; + t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31] + + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32]; + t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21] + - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22]; + v[webgl.M00] = t[webgl.M00] * inv_det; + v[webgl.M01] = t[webgl.M01] * inv_det; + v[webgl.M02] = t[webgl.M02] * inv_det; + v[webgl.M03] = t[webgl.M03] * inv_det; + v[webgl.M10] = t[webgl.M10] * inv_det; + v[webgl.M11] = t[webgl.M11] * inv_det; + v[webgl.M12] = t[webgl.M12] * inv_det; + v[webgl.M13] = t[webgl.M13] * inv_det; + v[webgl.M20] = t[webgl.M20] * inv_det; + v[webgl.M21] = t[webgl.M21] * inv_det; + v[webgl.M22] = t[webgl.M22] * inv_det; + v[webgl.M23] = t[webgl.M23] * inv_det; + v[webgl.M30] = t[webgl.M30] * inv_det; + v[webgl.M31] = t[webgl.M31] * inv_det; + v[webgl.M32] = t[webgl.M32] * inv_det; + v[webgl.M33] = t[webgl.M33] * inv_det; + return this; + }; + Matrix4.prototype.determinant = function () { + var v = this.values; + return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03] + + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03] + - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13] + - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13] + + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23] + + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23] + - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33] + - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + }; + Matrix4.prototype.translate = function (x, y, z) { + var v = this.values; + v[webgl.M03] += x; + v[webgl.M13] += y; + v[webgl.M23] += z; + return this; + }; + Matrix4.prototype.copy = function () { + return new Matrix4().set(this.values); + }; + Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) { + this.identity(); + var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0)); + var l_a1 = (far + near) / (near - far); + var l_a2 = (2 * far * near) / (near - far); + var v = this.values; + v[webgl.M00] = l_fd / aspectRatio; + v[webgl.M10] = 0; + v[webgl.M20] = 0; + v[webgl.M30] = 0; + v[webgl.M01] = 0; + v[webgl.M11] = l_fd; + v[webgl.M21] = 0; + v[webgl.M31] = 0; + v[webgl.M02] = 0; + v[webgl.M12] = 0; + v[webgl.M22] = l_a1; + v[webgl.M32] = -1; + v[webgl.M03] = 0; + v[webgl.M13] = 0; + v[webgl.M23] = l_a2; + v[webgl.M33] = 0; + return this; + }; + Matrix4.prototype.ortho2d = function (x, y, width, height) { + return this.ortho(x, x + width, y, y + height, 0, 1); + }; + Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) { + this.identity(); + var x_orth = 2 / (right - left); + var y_orth = 2 / (top - bottom); + var z_orth = -2 / (far - near); + var tx = -(right + left) / (right - left); + var ty = -(top + bottom) / (top - bottom); + var tz = -(far + near) / (far - near); + var v = this.values; + v[webgl.M00] = x_orth; + v[webgl.M10] = 0; + v[webgl.M20] = 0; + v[webgl.M30] = 0; + v[webgl.M01] = 0; + v[webgl.M11] = y_orth; + v[webgl.M21] = 0; + v[webgl.M31] = 0; + v[webgl.M02] = 0; + v[webgl.M12] = 0; + v[webgl.M22] = z_orth; + v[webgl.M32] = 0; + v[webgl.M03] = tx; + v[webgl.M13] = ty; + v[webgl.M23] = tz; + v[webgl.M33] = 1; + return this; + }; + Matrix4.prototype.multiply = function (matrix) { + var t = this.temp; + var v = this.values; + var m = matrix.values; + t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30]; + t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31]; + t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32]; + t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33]; + t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30]; + t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31]; + t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32]; + t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33]; + t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30]; + t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31]; + t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32]; + t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33]; + t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30]; + t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31]; + t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32]; + t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33]; + return this.set(this.temp); + }; + Matrix4.prototype.multiplyLeft = function (matrix) { + var t = this.temp; + var v = this.values; + var m = matrix.values; + t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30]; + t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31]; + t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32]; + t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33]; + t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30]; + t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31]; + t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32]; + t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33]; + t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30]; + t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31]; + t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32]; + t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33]; + t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30]; + t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31]; + t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32]; + t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33]; + return this.set(this.temp); + }; + return Matrix4; + }()); + webgl.Matrix4 = Matrix4; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Mesh = (function () { + function Mesh(gl, _attributes, maxVertices, maxIndices) { + this._attributes = _attributes; + this._verticesLength = 0; + this._dirtyVertices = false; + this._indicesLength = 0; + this._dirtyIndices = false; + this._elementsPerVertex = 0; + this._gl = gl; + this._elementsPerVertex = 0; + for (var i = 0; i < _attributes.length; i++) { + this._elementsPerVertex += _attributes[i].numElements; + } + this._vertices = new Float32Array(maxVertices * this._elementsPerVertex); + this._indices = new Uint16Array(maxIndices); + } + Mesh.prototype.attributes = function () { return this._attributes; }; + Mesh.prototype.maxVertices = function () { return this._vertices.length / this._elementsPerVertex; }; + Mesh.prototype.numVertices = function () { return this._verticesLength / this._elementsPerVertex; }; + Mesh.prototype.setVerticesLength = function (length) { + this._dirtyVertices = true; + this._verticesLength = length; + }; + Mesh.prototype.vertices = function () { return this._vertices; }; + Mesh.prototype.maxIndices = function () { return this._indices.length; }; + Mesh.prototype.numIndices = function () { return this._indicesLength; }; + Mesh.prototype.setIndicesLength = function (length) { + this._dirtyIndices = true; + this._indicesLength = length; + }; + Mesh.prototype.indices = function () { return this._indices; }; + ; + Mesh.prototype.setVertices = function (vertices) { + this._dirtyVertices = true; + if (vertices.length > this._vertices.length) + throw Error("Mesh can't store more than " + this.maxVertices() + " vertices"); + this._vertices.set(vertices, 0); + this._verticesLength = vertices.length; + }; + Mesh.prototype.setIndices = function (indices) { + this._dirtyIndices = true; + if (indices.length > this._indices.length) + throw Error("Mesh can't store more than " + this.maxIndices() + " indices"); + this._indices.set(indices, 0); + this._indicesLength = indices.length; + }; + Mesh.prototype.draw = function (shader, primitiveType) { + this.drawWithOffset(shader, primitiveType, 0, this._indicesLength > 0 ? this._indicesLength : this._verticesLength); + }; + Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) { + var gl = this._gl; + if (this._dirtyVertices || this._dirtyIndices) + this.update(); + this.bind(shader); + if (this._indicesLength > 0) + gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2); + else + gl.drawArrays(primitiveType, offset, count); + this.unbind(shader); + }; + Mesh.prototype.bind = function (shader) { + var gl = this._gl; + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + var offset = 0; + for (var i = 0; i < this._attributes.length; i++) { + var attrib = this._attributes[i]; + var location_1 = shader.getAttributeLocation(attrib.name); + gl.enableVertexAttribArray(location_1); + gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this._elementsPerVertex * 4, offset * 4); + offset += attrib.numElements; + } + if (this._indicesLength > 0) + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + }; + Mesh.prototype.unbind = function (shader) { + var gl = this._gl; + for (var i = 0; i < this._attributes.length; i++) { + var attrib = this._attributes[i]; + var location_2 = shader.getAttributeLocation(attrib.name); + gl.disableVertexAttribArray(location_2); + } + gl.bindBuffer(gl.ARRAY_BUFFER, null); + if (this._indicesLength > 0) + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null); + }; + Mesh.prototype.update = function () { + var gl = this._gl; + if (this._dirtyVertices) { + if (!this._verticesBuffer) { + this._verticesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + gl.bufferData(gl.ARRAY_BUFFER, this._vertices.subarray(0, this._verticesLength), gl.STATIC_DRAW); + this._dirtyVertices = false; + } + if (this._dirtyIndices) { + if (!this._indicesBuffer) { + this._indicesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this._indices.subarray(0, this._indicesLength), gl.STATIC_DRAW); + this._dirtyIndices = false; + } + }; + Mesh.prototype.dispose = function () { + var gl = this._gl; + gl.deleteBuffer(this._verticesBuffer); + gl.deleteBuffer(this._indicesBuffer); + }; + return Mesh; + }()); + webgl.Mesh = Mesh; + var VertexAttribute = (function () { + function VertexAttribute(name, type, numElements) { + this.name = name; + this.type = type; + this.numElements = numElements; + } + return VertexAttribute; + }()); + webgl.VertexAttribute = VertexAttribute; + var Position2Attribute = (function (_super) { + __extends(Position2Attribute, _super); + function Position2Attribute() { + _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2); + } + return Position2Attribute; + }(VertexAttribute)); + webgl.Position2Attribute = Position2Attribute; + var Position3Attribute = (function (_super) { + __extends(Position3Attribute, _super); + function Position3Attribute() { + _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3); + } + return Position3Attribute; + }(VertexAttribute)); + webgl.Position3Attribute = Position3Attribute; + var TexCoordAttribute = (function (_super) { + __extends(TexCoordAttribute, _super); + function TexCoordAttribute(unit) { + if (unit === void 0) { unit = 0; } + _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? "" : unit), VertexAttributeType.Float, 2); + } + return TexCoordAttribute; + }(VertexAttribute)); + webgl.TexCoordAttribute = TexCoordAttribute; + var ColorAttribute = (function (_super) { + __extends(ColorAttribute, _super); + function ColorAttribute() { + _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4); + } + return ColorAttribute; + }(VertexAttribute)); + webgl.ColorAttribute = ColorAttribute; + (function (VertexAttributeType) { + VertexAttributeType[VertexAttributeType["Float"] = 0] = "Float"; + })(webgl.VertexAttributeType || (webgl.VertexAttributeType = {})); + var VertexAttributeType = webgl.VertexAttributeType; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var PolygonBatcher = (function () { + function PolygonBatcher(gl, maxVertices) { + if (maxVertices === void 0) { maxVertices = 10920; } + this._drawing = false; + this._shader = null; + this._lastTexture = null; + this._verticesLength = 0; + this._indicesLength = 0; + this._srcBlend = WebGLRenderingContext.SRC_ALPHA; + this._dstBlend = WebGLRenderingContext.ONE_MINUS_SRC_ALPHA; + if (maxVertices > 10920) + throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices); + this._gl = gl; + this._mesh = new webgl.Mesh(gl, [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()], maxVertices, maxVertices * 3); + } + PolygonBatcher.prototype.begin = function (shader) { + var gl = this._gl; + if (this._drawing) + throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()"); + this._drawCalls = 0; + this._shader = shader; + this._lastTexture = null; + this._drawing = true; + gl.enable(gl.BLEND); + gl.blendFunc(this._srcBlend, this._dstBlend); + }; + PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) { + var gl = this._gl; + this._srcBlend = srcBlend; + this._dstBlend = dstBlend; + if (this._drawing) { + this.flush(); + gl.blendFunc(this._srcBlend, this._dstBlend); + } + }; + PolygonBatcher.prototype.draw = function (texture, vertices, indices) { + if (texture != this._lastTexture) { + this.flush(); + this._lastTexture = texture; + texture.bind(); + } + else if (this._verticesLength + vertices.length > this._mesh.vertices().length || + this._indicesLength + indices.length > this._mesh.indices().length) { + this.flush(); + } + var indexStart = this._mesh.numVertices(); + this._mesh.vertices().set(vertices, this._verticesLength); + this._verticesLength += vertices.length; + this._mesh.setVerticesLength(this._verticesLength); + var indicesArray = this._mesh.indices(); + for (var i = this._indicesLength, j = 0; j < indices.length; i++, j++) + indicesArray[i] = indices[j] + indexStart; + this._indicesLength += indices.length; + this._mesh.setIndicesLength(this._indicesLength); + }; + PolygonBatcher.prototype.flush = function () { + var gl = this._gl; + if (this._verticesLength == 0) + return; + this._mesh.draw(this._shader, gl.TRIANGLES); + this._verticesLength = 0; + this._indicesLength = 0; + this._mesh.setVerticesLength(0); + this._mesh.setIndicesLength(0); + this._drawCalls++; + }; + PolygonBatcher.prototype.end = function () { + var gl = this._gl; + if (!this._drawing) + throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()"); + if (this._verticesLength > 0 || this._indicesLength > 0) + this.flush(); + this._shader = null; + this._lastTexture = null; + this._drawing = false; + gl.disable(gl.BLEND); + }; + PolygonBatcher.prototype.drawCalls = function () { return this._drawCalls; }; + return PolygonBatcher; + }()); + webgl.PolygonBatcher = PolygonBatcher; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Shader = (function () { + function Shader(gl, _vertexShader, _fragmentShader) { + this._vertexShader = _vertexShader; + this._fragmentShader = _fragmentShader; + this._vs = null; + this._fs = null; + this._program = null; + this._tmp2x2 = new Float32Array(2 * 2); + this._tmp3x3 = new Float32Array(3 * 3); + this._tmp4x4 = new Float32Array(4 * 4); + this._gl = gl; + this.compile(); + } + Shader.prototype.program = function () { return this._program; }; + Shader.prototype.vertexShader = function () { return this._vertexShader; }; + Shader.prototype.fragmentShader = function () { return this._fragmentShader; }; + Shader.prototype.compile = function () { + var gl = this._gl; + try { + this._vs = this.compileShader(gl.VERTEX_SHADER, this._vertexShader); + this._fs = this.compileShader(gl.FRAGMENT_SHADER, this._fragmentShader); + this._program = this.compileProgram(this._vs, this._fs); + } + catch (e) { + this.dispose(); + throw e; + } + }; + Shader.prototype.compileShader = function (type, source) { + var gl = this._gl; + var shader = gl.createShader(type); + gl.shaderSource(shader, source); + gl.compileShader(shader); + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + var error = "Couldn't compile shader: " + gl.getShaderInfoLog(shader); + gl.deleteShader(shader); + throw new Error(error); + } + return shader; + }; + Shader.prototype.compileProgram = function (vs, fs) { + var gl = this._gl; + var program = gl.createProgram(); + gl.attachShader(program, vs); + gl.attachShader(program, fs); + gl.linkProgram(program); + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + var error = "Couldn't compile shader program: " + gl.getProgramInfoLog(program); + gl.deleteProgram(program); + throw new Error(error); + } + return program; + }; + Shader.prototype.bind = function () { + this._gl.useProgram(this._program); + }; + Shader.prototype.unbind = function () { + this._gl.useProgram(null); + }; + Shader.prototype.setUniformi = function (uniform, value) { + this._gl.uniform1i(this.getUniformLocation(uniform), value); + }; + Shader.prototype.setUniformf = function (uniform, value) { + this._gl.uniform1f(this.getUniformLocation(uniform), value); + }; + Shader.prototype.setUniform2f = function (uniform, value, value2) { + this._gl.uniform2f(this.getUniformLocation(uniform), value, value2); + }; + Shader.prototype.setUniform3f = function (uniform, value, value2, value3) { + this._gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3); + }; + Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) { + this._gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4); + }; + Shader.prototype.setUniform2x2f = function (uniform, value) { + var gl = this._gl; + this._tmp2x2.set(value); + gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this._tmp2x2); + }; + Shader.prototype.setUniform3x3f = function (uniform, value) { + var gl = this._gl; + this._tmp3x3.set(value); + gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this._tmp3x3); + }; + Shader.prototype.setUniform4x4f = function (uniform, value) { + var gl = this._gl; + this._tmp4x4.set(value); + gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this._tmp4x4); + }; + Shader.prototype.getUniformLocation = function (uniform) { + var gl = this._gl; + var location = gl.getUniformLocation(this._program, uniform); + if (!location) + throw new Error("Couldn't find location for uniform " + uniform); + return location; + }; + Shader.prototype.getAttributeLocation = function (attribute) { + var gl = this._gl; + var location = gl.getAttribLocation(this._program, attribute); + if (location == -1) + throw new Error("Couldn't find location for attribute " + attribute); + return location; + }; + Shader.prototype.dispose = function () { + var gl = this._gl; + if (this._vs) { + gl.deleteShader(this._vs); + this._vs = null; + } + if (this._fs) { + gl.deleteShader(this._fs); + this._fs = null; + } + if (this._program) { + gl.deleteProgram(this._program); + this._program = null; + } + }; + Shader.newColoredTextured = function (gl) { + var vs = "\n\t\t\t\tattribute vec4 " + Shader.POSITION + ";\n\t\t\t\tattribute vec4 " + Shader.COLOR + ";\n\t\t\t\tattribute vec2 " + Shader.TEXCOORDS + ";\n\t\t\t\tuniform mat4 " + Shader.MVP_MATRIX + ";\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = " + Shader.COLOR + ";\n\t\t\t\t\tv_texCoords = " + Shader.TEXCOORDS + ";\n\t\t\t\t\tgl_Position = " + Shader.MVP_MATRIX + " * " + Shader.POSITION + ";\n\t\t\t\t}\n\t\t\t"; + var fs = "\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t"; + return new Shader(gl, vs, fs); + }; + Shader.newColored = function (gl) { + var vs = "\n\t\t\t\tattribute vec4 " + Shader.POSITION + ";\n\t\t\t\tattribute vec4 " + Shader.COLOR + ";\n\t\t\t\tuniform mat4 " + Shader.MVP_MATRIX + ";\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = " + Shader.COLOR + ";\n\t\t\t\t\tgl_Position = " + Shader.MVP_MATRIX + " * " + Shader.POSITION + ";\n\t\t\t\t}\n\t\t\t"; + var fs = "\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t"; + return new Shader(gl, vs, fs); + }; + Shader.MVP_MATRIX = "u_projTrans"; + Shader.POSITION = "a_position"; + Shader.COLOR = "a_color"; + Shader.TEXCOORDS = "a_texCoords"; + Shader.SAMPLER = "u_texture"; + return Shader; + }()); + webgl.Shader = Shader; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var SkeletonRenderer = (function () { + function SkeletonRenderer(gl) { + this.premultipliedAlpha = false; + this._gl = gl; + } + SkeletonRenderer.prototype.draw = function (batcher, skeleton) { + var premultipliedAlpha = this.premultipliedAlpha; + var blendMode = null; + var vertices = null; + var triangles = null; + var drawOrder = skeleton.drawOrder; + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = drawOrder[i]; + var attachment = slot.getAttachment(); + var texture = null; + if (attachment instanceof spine.RegionAttachment) { + var region = attachment; + vertices = region.updateWorldVertices(slot, premultipliedAlpha); + triangles = SkeletonRenderer.QUAD_TRIANGLES; + texture = region.region.renderObject.texture; + } + else if (attachment instanceof spine.MeshAttachment) { + var mesh = attachment; + vertices = mesh.updateWorldVertices(slot, premultipliedAlpha); + triangles = mesh.triangles; + texture = mesh.region.renderObject.texture; + } + if (texture != null) { + var slotBlendMode = slot.data.blendMode; + if (slotBlendMode != blendMode) { + blendMode = slotBlendMode; + batcher.setBlendMode(webgl.getSourceGLBlendMode(this._gl, blendMode, premultipliedAlpha), webgl.getDestGLBlendMode(this._gl, blendMode)); + } + batcher.draw(texture, vertices, triangles); + } + } + }; + SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0]; + return SkeletonRenderer; + }()); + webgl.SkeletonRenderer = SkeletonRenderer; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Texture = (function () { + function Texture(gl, image, useMipMaps) { + if (useMipMaps === void 0) { useMipMaps = false; } + this._boundUnit = 0; + this._gl = gl; + this._texture = gl.createTexture(); + this._image = image; + this.update(useMipMaps); + } + Texture.prototype.getImage = function () { + return this._image; + }; + Texture.prototype.setFilters = function (minFilter, magFilter) { + var gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter); + }; + Texture.prototype.setWraps = function (uWrap, vWrap) { + var gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap); + }; + Texture.prototype.update = function (useMipMaps) { + var gl = this._gl; + this.bind(); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + if (useMipMaps) + gl.generateMipmap(gl.TEXTURE_2D); + }; + Texture.prototype.bind = function (unit) { + if (unit === void 0) { unit = 0; } + var gl = this._gl; + this._boundUnit = unit; + gl.activeTexture(gl.TEXTURE0 + unit); + gl.bindTexture(gl.TEXTURE_2D, this._texture); + }; + Texture.prototype.unbind = function () { + var gl = this._gl; + gl.activeTexture(gl.TEXTURE0 + this._boundUnit); + gl.bindTexture(gl.TEXTURE_2D, null); + }; + Texture.prototype.dispose = function () { + var gl = this._gl; + gl.deleteTexture(this._texture); + }; + 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; + }()); + webgl.Texture = Texture; + (function (TextureFilter) { + TextureFilter[TextureFilter["Nearest"] = WebGLRenderingContext.NEAREST] = "Nearest"; + TextureFilter[TextureFilter["Linear"] = WebGLRenderingContext.LINEAR] = "Linear"; + TextureFilter[TextureFilter["MipMap"] = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR] = "MipMap"; + TextureFilter[TextureFilter["MipMapNearestNearest"] = WebGLRenderingContext.NEAREST_MIPMAP_NEAREST] = "MipMapNearestNearest"; + TextureFilter[TextureFilter["MipMapLinearNearest"] = WebGLRenderingContext.LINEAR_MIPMAP_NEAREST] = "MipMapLinearNearest"; + TextureFilter[TextureFilter["MipMapNearestLinear"] = WebGLRenderingContext.NEAREST_MIPMAP_LINEAR] = "MipMapNearestLinear"; + TextureFilter[TextureFilter["MipMapLinearLinear"] = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR] = "MipMapLinearLinear"; + })(webgl.TextureFilter || (webgl.TextureFilter = {})); + var TextureFilter = webgl.TextureFilter; + (function (TextureWrap) { + TextureWrap[TextureWrap["MirroredRepeat"] = WebGLRenderingContext.MIRRORED_REPEAT] = "MirroredRepeat"; + TextureWrap[TextureWrap["ClampToEdge"] = WebGLRenderingContext.CLAMP_TO_EDGE] = "ClampToEdge"; + TextureWrap[TextureWrap["Repeat"] = WebGLRenderingContext.REPEAT] = "Repeat"; + })(webgl.TextureWrap || (webgl.TextureWrap = {})); + var TextureWrap = webgl.TextureWrap; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var TextureAtlas = (function () { + function TextureAtlas(atlasText, textureLoader) { + this.pages = new Array(); + this.regions = new Array(); + this.load(atlasText, textureLoader); + } + TextureAtlas.prototype.load = function (atlasText, textureLoader) { + if (textureLoader == null) + throw new Error("textureLoader cannot be null."); + var reader = new TextureAtlasReader(atlasText); + var tuple = new Array(4); + var page = null; + while (true) { + var line = reader.readLine(); + if (line == null) + break; + 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); + } + // page.format = Format[tuple[0]]; we don't need format in WebGL + reader.readTuple(tuple); + page.minFilter = webgl.Texture.filterFromString(tuple[0]); + page.magFilter = webgl.Texture.filterFromString(tuple[1]); + var direction = reader.readValue(); + page.uWrap = webgl.TextureWrap.ClampToEdge; + page.vWrap = webgl.TextureWrap.ClampToEdge; + if (direction == "x") + page.uWrap = webgl.TextureWrap.Repeat; + else if (direction == "y") + page.vWrap = webgl.TextureWrap.Repeat; + else if (direction == "xy") + page.uWrap = page.vWrap = webgl.TextureWrap.Repeat; + page.texture = textureLoader(line); + page.texture.setFilters(page.minFilter, page.magFilter); + page.texture.setWraps(page.uWrap, page.vWrap); + page.width = page.texture.getImage().width; + page.height = page.texture.getImage().height; + this.pages.push(page); + } + else { + var region = new TextureAtlasRegion(); + region.name = line; + region.page = page; + region.rotate = reader.readValue() == "true"; + 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]); + region.u = x / page.width; + region.v = y / page.height; + if (region.rotate) { + region.u2 = (x + height) / page.width; + region.v2 = (y + width) / page.height; + } + else { + region.u2 = (x + width) / page.width; + region.v2 = (y + height) / page.height; + } + region.x = x; + region.y = y; + region.width = Math.abs(width); + region.height = Math.abs(height); + if (reader.readTuple(tuple) == 4) { + // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + if (reader.readTuple(tuple) == 4) { + //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + reader.readTuple(tuple); + } + } + region.originalWidth = parseInt(tuple[0]); + region.originalHeight = parseInt(tuple[1]); + reader.readTuple(tuple); + region.offsetX = parseInt(tuple[0]); + region.offsetY = parseInt(tuple[1]); + region.index = parseInt(reader.readValue()); + region.texture = page.texture; + this.regions.push(region); + } + } + }; + 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].texture.dispose(); + } + }; + return TextureAtlas; + }()); + webgl.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() { + } + return TextureAtlasPage; + }()); + webgl.TextureAtlasPage = TextureAtlasPage; + var TextureAtlasRegion = (function (_super) { + __extends(TextureAtlasRegion, _super); + function TextureAtlasRegion() { + _super.apply(this, arguments); + } + return TextureAtlasRegion; + }(spine.TextureRegion)); + webgl.TextureAtlasRegion = TextureAtlasRegion; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var TextureAtlasAttachmentLoader = (function () { + function TextureAtlasAttachmentLoader(atlas) { + this.atlas = atlas; + } + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) + throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")"); + var attachment = new spine.RegionAttachment(name); + attachment.setRegion(region); + attachment.region = region; + return attachment; + }; + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) + throw new Error("Region not found in atlas: " + path + " (mesh attachment: " + name + ")"); + var attachment = new spine.MeshAttachment(name); + attachment.region = region; + return attachment; + }; + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) { + return new spine.BoundingBoxAttachment(name); + }; + /** @return May be null to not load an attachment */ + TextureAtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) { + return new spine.PathAttachment(name); + }; + return TextureAtlasAttachmentLoader; + }()); + webgl.TextureAtlasAttachmentLoader = TextureAtlasAttachmentLoader; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Vector3 = (function () { + function Vector3() { + this.x = 0; + this.y = 0; + this.z = 0; + } + Vector3.prototype.set = function (x, y, z) { + this.x = x; + this.y = y; + this.z = z; + return this; + }; + Vector3.prototype.add = function (v) { + this.x += v.x; + this.y += v.y; + this.z += v.z; + return this; + }; + Vector3.prototype.sub = function (v) { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + return this; + }; + Vector3.prototype.scale = function (s) { + this.x *= s; + this.y *= s; + this.z *= s; + return this; + }; + Vector3.prototype.normalize = function () { + var len = this.length(); + if (len == 0) + return this; + len = 1 / len; + this.x *= len; + this.y *= len; + this.z *= len; + return this; + }; + Vector3.prototype.cross = function (v) { + return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x); + }; + Vector3.prototype.multiply = function (matrix) { + var l_mat = matrix.values; + return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]); + }; + Vector3.prototype.project = function (matrix) { + var l_mat = matrix.values; + var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]); + return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w); + }; + Vector3.prototype.dot = function (v) { + return this.x * v.x + this.y * v.y + this.z * v.z; + }; + Vector3.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + }; + Vector3.prototype.distance = function (v) { + var a = v.x - this.x; + var b = v.y - this.y; + var c = v.z - this.z; + return Math.sqrt(a * a + b * b + c * c); + }; + return Vector3; + }()); + webgl.Vector3 = Vector3; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + function getSourceGLBlendMode(gl, blendMode, premultipliedAlpha) { + if (premultipliedAlpha === void 0) { premultipliedAlpha = false; } + switch (blendMode) { + case spine.BlendMode.Normal: return premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA; + case spine.BlendMode.Additive: return premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA; + case spine.BlendMode.Multiply: return gl.DST_COLOR; + case spine.BlendMode.Screen: return gl.ONE; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + webgl.getSourceGLBlendMode = getSourceGLBlendMode; + function getDestGLBlendMode(gl, blendMode) { + switch (blendMode) { + case spine.BlendMode.Normal: return gl.ONE_MINUS_SRC_ALPHA; + case spine.BlendMode.Additive: return gl.ONE; + case spine.BlendMode.Multiply: return gl.ONE_MINUS_SRC_ALPHA; + case spine.BlendMode.Screen: return gl.ONE_MINUS_SRC_ALPHA; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + webgl.getDestGLBlendMode = getDestGLBlendMode; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SpineWidget = (function () { + function SpineWidget(element, config) { + var _this = this; + this._mvp = new spine.webgl.Matrix4(); + this._paused = false; + this._lastFrameTime = Date.now() / 1000.0; + this._backgroundColor = new spine.Color(); + this._loaded = false; + if (!element) + throw new Error("Please provide a DOM element, e.g. document.getElementById('myelement')"); + if (!config) + throw new Error("Please provide a configuration, specifying at least the json file, atlas file and animation name"); + var elementId = element; + if (typeof (element) === "string") + element = document.getElementById(element); + if (element == null) + throw new Error("Element " + elementId + " does not exist"); + this.validateConfig(config); + var canvas = this.canvas = document.createElement("canvas"); + element.appendChild(canvas); + canvas.width = config.width; + canvas.height = config.height; + var webglConfig = { alpha: false }; + var gl = this.gl = (canvas.getContext("webgl", webglConfig) || canvas.getContext("experimental-webgl", webglConfig)); + this._shader = spine.webgl.Shader.newColoredTextured(gl); + this._batcher = new spine.webgl.PolygonBatcher(gl); + this._mvp.ortho2d(0, 0, 639, 479); + this._skeletonRenderer = new spine.webgl.SkeletonRenderer(gl); + var assets = this._assetManager = new spine.webgl.AssetManager(gl); + assets.loadText(config.atlas); + assets.loadText(config.json); + assets.loadTexture(config.atlas.replace(".atlas", ".png")); + requestAnimationFrame(function () { _this.load(); }); + } + SpineWidget.prototype.validateConfig = function (config) { + if (!config.atlas) + throw new Error("Please specify config.atlas"); + if (!config.json) + throw new Error("Please specify config.json"); + if (!config.animation) + throw new Error("Please specify config.animationName"); + if (!config.scale) + config.scale = 1.0; + if (!config.skin) + config.skin = "default"; + if (config.loop === undefined) + config.loop = true; + if (!config.y) + config.y = 20; + if (!config.width) + config.width = 640; + if (!config.height) + config.height = 480; + if (!config.x) + config.x = config.width / 2; + if (!config.backgroundColor) + config.backgroundColor = "#555555"; + if (!config.imagesPath) { + var index = config.atlas.lastIndexOf("/"); + if (index != -1) { + config.imagesPath = config.atlas.substr(0, index) + "/"; + } + else { + config.imagesPath = ""; + } + } + if (!config.premultipliedAlpha === undefined) + config.premultipliedAlpha = false; + this._backgroundColor.setFromString(config.backgroundColor); + this._config = config; + }; + SpineWidget.prototype.load = function () { + var _this = this; + var assetManager = this._assetManager; + var imagesPath = this._config.imagesPath; + var config = this._config; + if (assetManager.isLoadingComplete()) { + if (assetManager.hasErrors()) { + if (config.error) + config.error(this, "Failed to load assets: " + JSON.stringify(assetManager.errors)); + else + throw new Error("Failed to load assets: " + JSON.stringify(assetManager.errors)); + } + var atlas = new spine.webgl.TextureAtlas(this._assetManager.get(this._config.atlas), function (path) { + return assetManager.get(imagesPath + path); + }); + var atlasLoader = new spine.webgl.TextureAtlasAttachmentLoader(atlas); + var skeletonJson = new spine.SkeletonJson(atlasLoader); + // Set the scale to apply during parsing, parse the file, and create a new skeleton. + skeletonJson.scale = config.scale; + var skeletonData = skeletonJson.readSkeletonData(assetManager.get(config.json)); + var skeleton = this.skeleton = new spine.Skeleton(skeletonData); + skeleton.x = config.x; + skeleton.y = config.y; + skeleton.setSkinByName(config.skin); + var animationState = this.state = new spine.AnimationState(new spine.AnimationStateData(skeleton.data)); + animationState.setAnimation(0, config.animation, true); + if (config.success) + config.success(this); + this._loaded = true; + requestAnimationFrame(function () { _this.render(); }); + } + else + requestAnimationFrame(function () { _this.load(); }); + }; + SpineWidget.prototype.render = function () { + var _this = this; + var now = Date.now() / 1000; + var delta = now - this._lastFrameTime; + if (delta > 0.1) + delta = 0; + this._lastFrameTime = now; + var gl = this.gl; + var color = this._backgroundColor; + gl.clearColor(color.r, color.g, color.b, color.a); + gl.clear(gl.COLOR_BUFFER_BIT); + // Apply the animation state based on the delta time. + var state = this.state; + var skeleton = this.skeleton; + var premultipliedAlpha = this._config.premultipliedAlpha; + state.update(delta); + state.apply(skeleton); + skeleton.updateWorldTransform(); + // Bind the shader and set the texture and model-view-projection matrix. + var shader = this._shader; + shader.bind(); + shader.setUniformi(spine.webgl.Shader.SAMPLER, 0); + shader.setUniform4x4f(spine.webgl.Shader.MVP_MATRIX, this._mvp.values); + // Start the batch and tell the SkeletonRenderer to render the active skeleton. + var batcher = this._batcher; + var skeletonRenderer = this._skeletonRenderer; + batcher.begin(shader); + skeletonRenderer.premultipliedAlpha = premultipliedAlpha; + skeletonRenderer.draw(batcher, skeleton); + batcher.end(); + shader.unbind(); + if (!this._paused) + requestAnimationFrame(function () { _this.render(); }); + }; + SpineWidget.prototype.pause = function () { + this._paused = true; + }; + SpineWidget.prototype.play = function () { + var _this = this; + this._paused = false; + requestAnimationFrame(function () { _this.render(); }); + }; + SpineWidget.prototype.isPlaying = function () { + return !this._paused; + }; + SpineWidget.prototype.setAnimation = function (animationName) { + if (!this._loaded) + throw new Error("Widget isn't loaded yet"); + this.skeleton.setToSetupPose(); + this.state.setAnimation(0, animationName, this._config.loop); + }; + SpineWidget.loadWidgets = function () { + var widgets = document.getElementsByClassName("spine-widget"); + for (var i = 0; i < widgets.length; i++) { + SpineWidget.loadWidget(widgets[i]); + } + }; + SpineWidget.loadWidget = function (widget) { + var config = new SpineWidgetConfig(); + config.atlas = widget.getAttribute("data-atlas"); + config.json = widget.getAttribute("data-json"); + config.animation = widget.getAttribute("data-animation"); + if (widget.getAttribute("data-images-path")) + config.imagesPath = widget.getAttribute("data-images-path"); + if (widget.getAttribute("data-skin")) + config.skin = widget.getAttribute("data-skin"); + if (widget.getAttribute("data-loop")) + config.loop = widget.getAttribute("data-loop") === "true"; + if (widget.getAttribute("data-scale")) + config.scale = parseFloat(widget.getAttribute("data-scale")); + if (widget.getAttribute("data-x")) + config.x = parseFloat(widget.getAttribute("data-x")); + if (widget.getAttribute("data-y")) + config.x = parseFloat(widget.getAttribute("data-y")); + if (widget.getAttribute("data-width")) + config.width = parseInt(widget.getAttribute("data-width")); + if (widget.getAttribute("data-height")) + config.height = parseInt(widget.getAttribute("data-height")); + if (widget.getAttribute("data-background-color")) + config.backgroundColor = widget.getAttribute("data-background-color"); + if (widget.getAttribute("data-premultiplied-alpha")) + config.premultipliedAlpha = widget.getAttribute("data-premultiplied-alpha") === "true"; + new spine.SpineWidget(widget, config); + }; + SpineWidget.ready = function () { + if (SpineWidget.pageLoaded) + return; + SpineWidget.pageLoaded = true; + SpineWidget.loadWidgets(); + }; + SpineWidget.setupDOMListener = function () { + if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", SpineWidget.ready, false); + window.addEventListener("load", SpineWidget.ready, false); + } + else { + document.attachEvent("onreadystatechange", function readyStateChange() { + if (document.readyState === "complete") + SpineWidget.ready(); + }); + window.attachEvent("onload", SpineWidget.ready); + } + }; + SpineWidget.pageLoaded = false; + return SpineWidget; + }()); + spine.SpineWidget = SpineWidget; + var SpineWidgetConfig = (function () { + function SpineWidgetConfig() { + this.skin = "default"; + this.loop = true; + this.scale = 1.0; + this.x = 0; + this.y = 0; + this.width = 640; + this.height = 480; + this.backgroundColor = "#555555"; + this.premultipliedAlpha = false; + } + return SpineWidgetConfig; + }()); + spine.SpineWidgetConfig = SpineWidgetConfig; +})(spine || (spine = {})); +spine.SpineWidget.setupDOMListener(); +//# sourceMappingURL=spine-all.js.map \ No newline at end of file diff --git a/spine-ts/build/spine-all.js.map b/spine-ts/build/spine-all.js.map new file mode 100644 index 000000000..accee76b1 --- /dev/null +++ b/spine-ts/build/spine-all.js.map @@ -0,0 +1 @@ +{"version":3,"file":"spine-all.js","sourceRoot":"","sources":["../core/src/Animation.ts","../core/src/AnimationState.ts","../core/src/AnimationStateData.ts","../core/src/BlendMode.ts","../core/src/Bone.ts","../core/src/BoneData.ts","../core/src/Event.ts","../core/src/EventData.ts","../core/src/IkConstraint.ts","../core/src/IkConstraintData.ts","../core/src/PathConstraint.ts","../core/src/PathConstraintData.ts","../core/src/Skeleton.ts","../core/src/SkeletonBounds.ts","../core/src/SkeletonData.ts","../core/src/SkeletonJson.ts","../core/src/Skin.ts","../core/src/Slot.ts","../core/src/SlotData.ts","../core/src/TransformConstraint.ts","../core/src/TransformConstraintData.ts","../core/src/Updatable.ts","../core/src/Utils.ts","../core/src/attachments/Attachment.ts","../core/src/attachments/AttachmentLoader.ts","../core/src/attachments/AttachmentType.ts","../core/src/attachments/BoundingBoxAttachment.ts","../core/src/attachments/MeshAttachment.ts","../core/src/attachments/PathAttachment.ts","../core/src/attachments/RegionAttachment.ts","../core/src/attachments/TextureRegion.ts","../webgl/src/AssetManager.ts","../webgl/src/Matrix4.ts","../webgl/src/Mesh.ts","../webgl/src/PolygonBatcher.ts","../webgl/src/Shader.ts","../webgl/src/SkeletonRenderer.ts","../webgl/src/Texture.ts","../webgl/src/TextureAtlas.ts","../webgl/src/TextureAtlasAttachmentLoader.ts","../webgl/src/Vector3.ts","../webgl/src/WebGL.ts","../widget/src/Widget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EA6B+E;;;;;;AAE/E,IAAO,KAAK,CAgxBX;AAhxBD,WAAO,KAAK,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AAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBACxE,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC3D,CAAC;YAAC,IAAI,CAAC,CAAC;gBACD,QAAS,CAAC,WAAW,CAAC,oBAAoB,EAAE;oBACjD,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,KAAK,UAAW,CAAC;wBAAC,WAAW,CAAC,KAAK,EAAE,CAAC;gBAC9D,CAAC,CAAC,CAAC;gBACG,MAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;YACxD,CAAC;QACF,CAAC;QAjBM,sBAAU,GAAG,KAAK,CAAC;QAkB3B,kBAAC;IAAD,CAAC,AAhND,IAgNC;IAhNY,iBAAW,cAgNvB,CAAA;IAED;QAAA;YAKC,SAAI,GAAG,SAAS,CAAC;YACjB,SAAI,GAAG,IAAI,CAAC;YACZ,UAAK,GAAG,GAAG,CAAC;YACZ,MAAC,GAAG,CAAC,CAAC;YACN,MAAC,GAAG,CAAC,CAAC;YACN,UAAK,GAAG,GAAG,CAAC;YACZ,WAAM,GAAG,GAAG,CAAC;YACb,oBAAe,GAAG,SAAS,CAAC;YAC5B,uBAAkB,GAAG,KAAK,CAAC;QAG5B,CAAC;QAAD,wBAAC;IAAD,CAAC,AAhBD,IAgBC;IAhBY,uBAAiB,oBAgB7B,CAAA;AACF,CAAC,EApOM,KAAK,KAAL,KAAK,QAoOX;AACD,KAAK,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC"} \ No newline at end of file diff --git a/spine-ts/build/spine-core.d.ts b/spine-ts/build/spine-core.d.ts new file mode 100644 index 000000000..bab571348 --- /dev/null +++ b/spine-ts/build/spine-core.d.ts @@ -0,0 +1,2502 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + 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): void; + mix(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number): 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): void; + } + abstract class CurveTimeline implements Timeline { + static LINEAR: number; + static STEPPED: number; + static BEZIER: number; + static BEZIER_SIZE: number; + private curves; + constructor(frameCount: number); + getFrameCount(): number; + setLinear(frameIndex: number): void; + setStepped(frameIndex: number): void; + getCurveType(frameIndex: number): number; + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + 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): 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); + /** Sets the time and angle of the specified keyframe. */ + setFrame(frameIndex: number, time: number, degrees: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): 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); + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, x: number, y: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class ScaleTimeline extends TranslateTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class ShearTimeline extends TranslateTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): 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); + /** Sets the time and value of the specified keyframe. */ + 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): void; + } + class AttachmentTimeline implements Timeline { + slotIndex: number; + frames: ArrayLike; + attachmentNames: Array; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, attachmentName: string): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class EventTimeline implements Timeline { + frames: ArrayLike; + events: Array; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time of the specified keyframe. */ + setFrame(frameIndex: number, event: Event): void; + /** Fires events for frames > lastTime and <= time. */ + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class DrawOrderTimeline implements Timeline { + frames: ArrayLike; + drawOrders: Array>; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + setFrame(frameIndex: number, time: number, drawOrder: Array): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class DeformTimeline extends CurveTimeline { + frames: ArrayLike; + frameVertices: Array>; + slotIndex: number; + attachment: VertexAttachment; + constructor(frameCount: number); + /** Sets the time of the specified keyframe. */ + setFrame(frameIndex: number, time: number, vertices: ArrayLike): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class IkConstraintTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_MIX: number; + static PREV_BEND_DIRECTION: number; + static MIX: number; + static BEND_DIRECTION: number; + ikConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + /** Sets the time, mix and bend direction of the specified keyframe. */ + setFrame(frameIndex: number, time: number, mix: number, bendDirection: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): 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); + /** Sets the time and mixes of the specified keyframe. */ + 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): 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); + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, value: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): 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); + /** Sets the time and mixes of the specified keyframe. */ + setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class AnimationState { + data: AnimationStateData; + tracks: TrackEntry[]; + events: Event[]; + listeners: AnimationStateListener[]; + timeScale: number; + constructor(data?: AnimationStateData); + update(delta: number): void; + apply(skeleton: Skeleton): void; + clearTracks(): void; + clearTrack(trackIndex: number): void; + freeAll(entry: TrackEntry): void; + expandToIndex(index: number): TrackEntry; + setCurrent(index: number, entry: TrackEntry): void; + /** @see #setAnimation(int, Animation, boolean) */ + setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry; + /** Set the current animation. Any queued animations are cleared. */ + setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry; + /** {@link #addAnimation(int, Animation, boolean, float)} */ + addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): TrackEntry; + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + addAnimationWith(trackIndex: number, animation: Animation, loop: boolean, delay: number): TrackEntry; + /** @return May be null. */ + getCurrent(trackIndex: number): TrackEntry; + /** Adds a listener to receive events for all animations. */ + addListener(listener: AnimationStateListener): void; + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + removeListener(listener: AnimationStateListener): void; + clearListeners(): void; + } + class TrackEntry { + next: TrackEntry; + previous: TrackEntry; + animation: Animation; + loop: boolean; + delay: number; + time: number; + lastTime: number; + endTime: number; + timeScale: number; + mixTime: number; + mixDuration: number; + listener: AnimationStateListener; + mix: number; + reset(): void; + /** Returns true if the current time is greater than the end time, regardless of looping. */ + isComplete(): boolean; + } + abstract class AnimationStateAdapter implements AnimationStateListener { + event(trackIndex: number, event: Event): void; + complete(trackIndex: number, loopCount: number): void; + start(trackIndex: number): void; + end(trackIndex: number): void; + } + interface AnimationStateListener { + /** Invoked when the current animation triggers an event. */ + event(trackIndex: number, event: Event): void; + /** Invoked when the current animation has completed. + * @param loopCount The number of times the animation reached the end. */ + complete(trackIndex: number, loopCount: number): void; + /** Invoked just after the current animation is set. */ + start(trackIndex: number): void; + /** Invoked just before the current animation is replaced. */ + end(trackIndex: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class AnimationStateData { + skeletonData: SkeletonData; + animationToMixTime: Map; + defaultMix: number; + constructor(skeletonData: SkeletonData); + setMix(fromName: string, toName: string, duration: number): void; + setMixWith(from: Animation, to: Animation, duration: number): void; + getMix(from: Animation, to: Animation): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + enum BlendMode { + Normal = 0, + Additive = 1, + Multiply = 2, + Screen = 3, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Bone implements Updatable { + data: BoneData; + skeleton: Skeleton; + parent: Bone; + children: Bone[]; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + appliedRotation: number; + a: number; + b: number; + worldX: number; + c: number; + d: number; + worldY: number; + worldSignX: number; + worldSignY: number; + sorted: boolean; + /** @param parent May be null. */ + constructor(data: BoneData, skeleton: Skeleton, parent: Bone); + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + update(): void; + /** Computes the world transform using the parent bone and this bone's local transform. */ + updateWorldTransform(): void; + /** Computes the world transform using the parent bone and the specified local transform. */ + 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; + worldToLocalRotationX(): number; + worldToLocalRotationY(): number; + rotateWorld(degrees: number): void; + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + updateLocalTransform(): void; + worldToLocal(world: Vector2): Vector2; + localToWorld(local: Vector2): Vector2; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class BoneData { + index: number; + name: string; + parent: BoneData; + length: number; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + inheritRotation: boolean; + inheritScale: boolean; + constructor(index: number, name: string, parent: BoneData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Event { + data: EventData; + intValue: number; + floatValue: number; + stringValue: string; + time: number; + constructor(time: number, data: EventData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class EventData { + name: string; + intValue: number; + floatValue: number; + stringValue: string; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class IkConstraint implements Updatable { + data: IkConstraintData; + bones: Array; + target: Bone; + mix: number; + bendDirection: number; + level: number; + constructor(data: IkConstraintData, skeleton: Skeleton); + apply(): void; + update(): void; + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + apply1(bone: Bone, targetX: number, targetY: number, alpha: number): void; + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class IkConstraintData { + name: string; + bones: BoneData[]; + target: BoneData; + bendDirection: number; + mix: number; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathConstraint implements Updatable { + static NONE: number; + static BEFORE: number; + static AFTER: 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[]; + constructor(data: PathConstraintData, skeleton: Skeleton); + 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathConstraintData { + name: string; + 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, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Skeleton { + data: SkeletonData; + bones: Array; + slots: Array; + drawOrder: Array; + ikConstraints: Array; + ikConstraintsSorted: Array; + transformConstraints: Array; + pathConstraints: Array; + _updateCache: Updatable[]; + skin: Skin; + color: Color; + time: number; + flipX: boolean; + flipY: boolean; + x: number; + y: number; + constructor(data: SkeletonData); + updateCache(): void; + sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void; + sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void; + sortBone(bone: Bone): void; + sortReset(bones: Array): void; + /** Updates the world transform for each bone and applies constraints. */ + updateWorldTransform(): void; + /** Sets the bones, constraints, and slots to their setup pose values. */ + setToSetupPose(): void; + /** Sets the bones and constraints to their setup pose values. */ + setBonesToSetupPose(): void; + setSlotsToSetupPose(): void; + /** @return May return null. */ + getRootBone(): Bone; + /** @return May be null. */ + findBone(boneName: string): Bone; + /** @return -1 if the bone was not found. */ + findBoneIndex(boneName: string): number; + /** @return May be null. */ + findSlot(slotName: string): Slot; + /** @return -1 if the bone was not found. */ + findSlotIndex(slotName: string): number; + /** Sets a skin by name. + * @see #setSkin(Skin) */ + setSkinByName(skinName: string): void; + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + setSkin(newSkin: Skin): void; + /** @return May be null. */ + getAttachmentByName(slotName: string, attachmentName: string): Attachment; + /** @return May be null. */ + getAttachment(slotIndex: number, attachmentName: string): Attachment; + /** @param attachmentName May be null. */ + setAttachment(slotName: string, attachmentName: string): void; + /** @return May be null. */ + findIkConstraint(constraintName: string): IkConstraint; + /** @return May be null. */ + findTransformConstraint(constraintName: string): TransformConstraint; + /** @return May be null. */ + findPathConstraint(constraintName: string): PathConstraint; + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + getBounds(offset: Vector2, size: Vector2): void; + update(delta: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonBounds { + minX: number; + minY: number; + maxX: number; + maxY: number; + boundingBoxes: BoundingBoxAttachment[]; + polygons: ArrayLike[]; + private _polygonPool; + update(skeleton: Skeleton, updateAabb: boolean): void; + aabbCompute(): void; + /** Returns true if the axis aligned bounding box contains the point. */ + aabbContainsPoint(x: number, y: number): boolean; + /** Returns true if the axis aligned bounding box intersects the line segment. */ + aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean; + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean; + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + containsPoint(x: number, y: number): BoundingBoxAttachment; + /** Returns true if the polygon contains the point. */ + containsPointPolygon(polygon: ArrayLike, x: number, y: number): boolean; + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment; + /** Returns true if the polygon contains any part of the line segment. */ + intersectsSegmentPolygon(polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number): boolean; + /** Returns the polygon for the specified bounding box, or null. */ + getPolygon(boundingBox: BoundingBoxAttachment): ArrayLike; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonData { + name: string; + bones: BoneData[]; + slots: SlotData[]; + skins: Skin[]; + defaultSkin: Skin; + events: EventData[]; + animations: Animation[]; + ikConstraints: IkConstraintData[]; + transformConstraints: TransformConstraintData[]; + pathConstraints: PathConstraintData[]; + width: number; + height: number; + version: string; + hash: string; + imagesPath: 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonJson { + attachmentLoader: AttachmentLoader; + scale: number; + private linkedMeshes; + constructor(attachmentLoader: AttachmentLoader); + readSkeletonData(json: string): SkeletonData; + readAttachment(map: any, skin: Skin, slotIndex: number, name: string): 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Skin { + name: string; + attachments: Map[]; + constructor(name: string); + addAttachment(slotIndex: number, name: string, attachment: Attachment): void; + /** @return May be null. */ + getAttachment(slotIndex: number, name: string): Attachment; + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + attachAll(skeleton: Skeleton, oldSkin: Skin): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Slot { + data: SlotData; + bone: Bone; + color: Color; + private attachment; + private attachmentTime; + attachmentVertices: number[]; + constructor(data: SlotData, bone: Bone); + /** @return May be null. */ + getAttachment(): Attachment; + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + setAttachment(attachment: Attachment): void; + setAttachmentTime(time: number): void; + /** Returns the time since the attachment was set. */ + getAttachmentTime(): number; + setToSetupPose(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SlotData { + index: number; + name: string; + boneData: BoneData; + color: Color; + attachmentName: string; + blendMode: BlendMode; + constructor(index: number, name: string, boneData: BoneData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TransformConstraint implements Updatable { + data: TransformConstraintData; + bones: Array; + target: Bone; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + temp: Vector2; + constructor(data: TransformConstraintData, skeleton: Skeleton); + apply(): void; + update(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TransformConstraintData { + name: string; + bones: BoneData[]; + target: BoneData; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + offsetRotation: number; + offsetX: number; + offsetY: number; + offsetScaleX: number; + offsetScaleY: number; + offsetShearY: number; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface Updatable { + update(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface Map { + [key: string]: T; + } + interface Disposable { + dispose(): void; + } + class Color { + r: number; + g: number; + b: number; + a: number; + constructor(r?: number, g?: number, b?: number, a?: number); + set(r: number, g: number, b: number, a: number): void; + setFromColor(c: Color): void; + setFromString(hex: string): void; + add(r: number, g: number, b: number, a: number): void; + clamp(): this; + } + 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; + } + 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 newArray(size: number, defaultValue: T): Array; + static newFloatArray(size: number): ArrayLike; + static toFloatArray(array: Array): Float32Array | number[]; + } + 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + abstract class Attachment { + name: string; + constructor(name: string); + } + abstract class VertexAttachment extends Attachment { + bones: Array; + vertices: ArrayLike; + worldVerticesLength: number; + constructor(name: string); + computeWorldVertices(slot: Slot, worldVertices: ArrayLike): void; + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + computeWorldVerticesWith(slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number): void; + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + applyDeform(sourceAttachment: VertexAttachment): boolean; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface AttachmentLoader { + /** @return May be null to not load an attachment. */ + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + /** @return May be null to not load an attachment. */ + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + enum AttachmentType { + Region = 0, + BoundingBox = 1, + Mesh = 2, + LinkedMesh = 3, + Path = 4, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class BoundingBoxAttachment extends VertexAttachment { + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class MeshAttachment extends VertexAttachment { + region: TextureRegion; + path: string; + regionUVs: ArrayLike; + worldVertices: ArrayLike; + triangles: Array; + color: Color; + hullLength: number; + private _parentMesh; + inheritDeform: boolean; + tempColor: Color; + constructor(name: string); + updateUVs(): void; + /** @return The updated world vertices. */ + updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike; + applyDeform(sourceAttachment: VertexAttachment): boolean; + getParentMesh(): MeshAttachment; + /** @param parentMesh May be null. */ + setParentMesh(parentMesh: MeshAttachment): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathAttachment extends VertexAttachment { + lengths: Array; + closed: boolean; + constantSpeed: boolean; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + 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; + vertices: ArrayLike; + tempColor: Color; + constructor(name: string); + setRegion(region: TextureRegion): void; + updateOffset(): void; + updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TextureRegion { + renderObject: any; + u: number; + v: number; + u2: number; + v2: number; + width: number; + height: number; + rotate: boolean; + offsetX: number; + offsetY: number; + originalWidth: number; + originalHeight: number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class AssetManager implements Disposable { + private _gl; + private _assets; + private _errors; + private _toLoad; + private _loaded; + constructor(gl: WebGLRenderingContext); + loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; + loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; + get(path: string): string | Texture; + remove(path: string): void; + removeAll(): void; + isLoadingComplete(): boolean; + toLoad(): number; + loaded(): number; + dispose(): void; + hasErrors(): boolean; + errors(): Map; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + const M00: number; + const M01: number; + const M02: number; + const M03: number; + const M10: number; + const M11: number; + const M12: number; + const M13: number; + const M20: number; + const M21: number; + const M22: number; + const M23: number; + const M30: number; + const M31: number; + const M32: number; + const M33: number; + class Matrix4 { + temp: Float32Array; + values: Float32Array; + constructor(); + set(values: ArrayLike): Matrix4; + transpose(): Matrix4; + identity(): Matrix4; + invert(): Matrix4; + determinant(): number; + translate(x: number, y: number, z: number): Matrix4; + copy(): Matrix4; + projection(near: number, far: number, fovy: number, aspectRatio: number): Matrix4; + ortho2d(x: number, y: number, width: number, height: number): Matrix4; + ortho(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4; + multiply(matrix: Matrix4): Matrix4; + multiplyLeft(matrix: Matrix4): Matrix4; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Mesh implements Disposable { + private _attributes; + private _gl; + private _vertices; + private _verticesBuffer; + private _verticesLength; + private _dirtyVertices; + private _indices; + private _indicesBuffer; + private _indicesLength; + private _dirtyIndices; + private _elementsPerVertex; + attributes(): VertexAttribute[]; + maxVertices(): number; + numVertices(): number; + setVerticesLength(length: number): void; + vertices(): Float32Array; + maxIndices(): number; + numIndices(): number; + setIndicesLength(length: number): void; + indices(): Uint16Array; + constructor(gl: WebGLRenderingContext, _attributes: VertexAttribute[], maxVertices: number, maxIndices: number); + setVertices(vertices: Array): void; + setIndices(indices: Array): void; + draw(shader: Shader, primitiveType: number): void; + drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void; + bind(shader: Shader): void; + unbind(shader: Shader): void; + private update(); + dispose(): void; + } + class VertexAttribute { + name: string; + type: VertexAttributeType; + numElements: number; + constructor(name: string, type: VertexAttributeType, numElements: number); + } + class Position2Attribute extends VertexAttribute { + constructor(); + } + class Position3Attribute extends VertexAttribute { + constructor(); + } + class TexCoordAttribute extends VertexAttribute { + constructor(unit?: number); + } + class ColorAttribute extends VertexAttribute { + constructor(); + } + enum VertexAttributeType { + Float = 0, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class PolygonBatcher { + private _gl; + private _drawCalls; + private _drawing; + private _mesh; + private _shader; + private _lastTexture; + private _verticesLength; + private _indicesLength; + private _srcBlend; + private _dstBlend; + constructor(gl: WebGLRenderingContext, maxVertices?: number); + begin(shader: Shader): void; + setBlendMode(srcBlend: number, dstBlend: number): void; + draw(texture: Texture, vertices: ArrayLike, indices: Array): void; + private flush(); + end(): void; + drawCalls(): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Shader implements Disposable { + private _vertexShader; + private _fragmentShader; + static MVP_MATRIX: string; + static POSITION: string; + static COLOR: string; + static TEXCOORDS: string; + static SAMPLER: string; + private _gl; + private _vs; + private _fs; + private _program; + private _tmp2x2; + private _tmp3x3; + private _tmp4x4; + program(): WebGLProgram; + vertexShader(): string; + fragmentShader(): string; + constructor(gl: WebGLRenderingContext, _vertexShader: string, _fragmentShader: string); + private compile(); + private compileShader(type, source); + private compileProgram(vs, fs); + bind(): void; + unbind(): void; + setUniformi(uniform: string, value: number): void; + setUniformf(uniform: string, value: number): void; + setUniform2f(uniform: string, value: number, value2: number): void; + setUniform3f(uniform: string, value: number, value2: number, value3: number): void; + setUniform4f(uniform: string, value: number, value2: number, value3: number, value4: number): void; + setUniform2x2f(uniform: string, value: ArrayLike): void; + setUniform3x3f(uniform: string, value: ArrayLike): void; + setUniform4x4f(uniform: string, value: ArrayLike): void; + getUniformLocation(uniform: string): WebGLUniformLocation; + getAttributeLocation(attribute: string): number; + dispose(): void; + static newColoredTextured(gl: WebGLRenderingContext): Shader; + static newColored(gl: WebGLRenderingContext): Shader; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class SkeletonRenderer { + static QUAD_TRIANGLES: number[]; + premultipliedAlpha: boolean; + private _gl; + constructor(gl: WebGLRenderingContext); + draw(batcher: PolygonBatcher, skeleton: Skeleton): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Texture implements Disposable { + private _gl; + private _texture; + private _image; + private _boundUnit; + constructor(gl: WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean); + getImage(): HTMLImageElement; + setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; + setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; + update(useMipMaps: boolean): void; + bind(unit?: number): void; + unbind(): void; + dispose(): void; + static filterFromString(text: string): TextureFilter; + static wrapFromString(text: string): TextureWrap; + } + enum TextureFilter { + Nearest, + Linear, + MipMap, + MipMapNearestNearest, + MipMapLinearNearest, + MipMapNearestLinear, + MipMapLinearLinear, + } + enum TextureWrap { + MirroredRepeat, + ClampToEdge, + Repeat, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class TextureAtlas implements Disposable { + pages: TextureAtlasPage[]; + regions: TextureAtlasRegion[]; + constructor(atlasText: string, textureLoader: (path: string) => Texture); + private load(atlasText, textureLoader); + findRegion(name: string): TextureAtlasRegion; + dispose(): void; + } + class TextureAtlasPage { + name: string; + minFilter: TextureFilter; + magFilter: TextureFilter; + uWrap: TextureWrap; + vWrap: TextureWrap; + texture: Texture; + width: number; + height: number; + } + class TextureAtlasRegion extends TextureRegion { + page: TextureAtlasPage; + name: string; + x: number; + y: number; + index: number; + rotate: boolean; + texture: Texture; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class TextureAtlasAttachmentLoader implements AttachmentLoader { + atlas: TextureAtlas; + constructor(atlas: TextureAtlas); + /** @return May be null to not load an attachment. */ + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + /** @return May be null to not load an attachment. */ + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Vector3 { + x: number; + y: number; + z: number; + set(x: number, y: number, z: number): Vector3; + add(v: Vector3): Vector3; + sub(v: Vector3): Vector3; + scale(s: number): Vector3; + normalize(): Vector3; + cross(v: Vector3): Vector3; + multiply(matrix: Matrix4): Vector3; + project(matrix: Matrix4): Vector3; + dot(v: Vector3): number; + length(): number; + distance(v: Vector3): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + function getSourceGLBlendMode(gl: WebGLRenderingContext, blendMode: BlendMode, premultipliedAlpha?: boolean): number; + function getDestGLBlendMode(gl: WebGLRenderingContext, blendMode: BlendMode): number; +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SpineWidget { + skeleton: Skeleton; + state: AnimationState; + gl: WebGLRenderingContext; + canvas: HTMLCanvasElement; + private _config; + private _assetManager; + private _shader; + private _batcher; + private _mvp; + private _skeletonRenderer; + private _paused; + private _lastFrameTime; + private _backgroundColor; + private _loaded; + constructor(element: Element | string, config: SpineWidgetConfig); + private validateConfig(config); + private load(); + private render(); + pause(): void; + play(): void; + isPlaying(): boolean; + setAnimation(animationName: string): void; + static loadWidgets(): void; + static loadWidget(widget: Element): void; + static pageLoaded: boolean; + private static ready(); + static setupDOMListener(): void; + } + class SpineWidgetConfig { + json: string; + atlas: string; + animation: string; + imagesPath: string; + skin: string; + loop: boolean; + scale: number; + x: number; + y: number; + width: number; + height: number; + backgroundColor: string; + premultipliedAlpha: boolean; + success: (widget: SpineWidget) => void; + error: (widget: SpineWidget, msg: string) => void; + } +} diff --git a/spine-ts/build/spine-core.js b/spine-ts/build/spine-core.js new file mode 100644 index 000000000..68e61875b --- /dev/null +++ b/spine-ts/build/spine-core.js @@ -0,0 +1,6877 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var spine; +(function (spine) { + 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) { + 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, 1); + }; + Animation.prototype.mix = function (skeleton, lastTime, time, loop, events, alpha) { + 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); + }; + 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; + }()); + spine.Animation = Animation; + var CurveTimeline = (function () { + function CurveTimeline(frameCount) { + if (frameCount <= 0) + throw new Error("frameCount must be > 0: " + frameCount); + this.curves = spine.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; + }; + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + 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 = spine.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); // Last point is 1,1. + }; + CurveTimeline.LINEAR = 0; + CurveTimeline.STEPPED = 1; + CurveTimeline.BEZIER = 2; + CurveTimeline.BEZIER_SIZE = 10 * 2 - 1; + return CurveTimeline; + }()); + spine.CurveTimeline = CurveTimeline; + var RotateTimeline = (function (_super) { + __extends(RotateTimeline, _super); + function RotateTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount << 1); + } + /** Sets the time and angle of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { + var amount_1 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation; + while (amount_1 > 180) + amount_1 -= 360; + while (amount_1 < -180) + amount_1 += 360; + bone.rotation += amount_1 * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + 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 amount = frames[frame + RotateTimeline.ROTATION] - prevRotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + amount = bone.data.rotation + (prevRotation + amount * percent) - bone.rotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + bone.rotation += amount * alpha; + }; + RotateTimeline.ENTRIES = 2; + RotateTimeline.PREV_TIME = -2; + RotateTimeline.PREV_ROTATION = -1; + RotateTimeline.ROTATION = 1; + return RotateTimeline; + }(CurveTimeline)); + spine.RotateTimeline = RotateTimeline; + var TranslateTimeline = (function (_super) { + __extends(TranslateTimeline, _super); + function TranslateTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { + bone.x += (bone.data.x + frames[frames.length + TranslateTimeline.PREV_X] - bone.x) * alpha; + bone.y += (bone.data.y + frames[frames.length + TranslateTimeline.PREV_Y] - bone.y) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES); + var prevX = frames[frame + TranslateTimeline.PREV_X]; + var prevY = 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)); + bone.x += (bone.data.x + prevX + (frames[frame + TranslateTimeline.X] - prevX) * percent - bone.x) * alpha; + bone.y += (bone.data.y + prevY + (frames[frame + TranslateTimeline.Y] - prevY) * percent - bone.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)); + spine.TranslateTimeline = TranslateTimeline; + var ScaleTimeline = (function (_super) { + __extends(ScaleTimeline, _super); + function ScaleTimeline(frameCount) { + _super.call(this, frameCount); + } + ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { + bone.scaleX += (bone.data.scaleX * frames[frames.length + ScaleTimeline.PREV_X] - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * frames[frames.length + ScaleTimeline.PREV_Y] - bone.scaleY) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES); + var prevX = frames[frame + ScaleTimeline.PREV_X]; + var prevY = 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)); + bone.scaleX += (bone.data.scaleX * (prevX + (frames[frame + ScaleTimeline.X] - prevX) * percent) - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * (prevY + (frames[frame + ScaleTimeline.Y] - prevY) * percent) - bone.scaleY) * alpha; + }; + return ScaleTimeline; + }(TranslateTimeline)); + spine.ScaleTimeline = ScaleTimeline; + var ShearTimeline = (function (_super) { + __extends(ShearTimeline, _super); + function ShearTimeline(frameCount) { + _super.call(this, frameCount); + } + ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { + bone.shearX += (bone.data.shearX + frames[frames.length + ShearTimeline.PREV_X] - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + frames[frames.length + ShearTimeline.PREV_Y] - bone.shearY) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES); + var prevX = frames[frame + ShearTimeline.PREV_X]; + var prevY = 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)); + bone.shearX += (bone.data.shearX + (prevX + (frames[frame + ShearTimeline.X] - prevX) * percent) - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + (prevY + (frames[frame + ShearTimeline.Y] - prevY) * percent) - bone.shearY) * alpha; + }; + return ShearTimeline; + }(TranslateTimeline)); + spine.ShearTimeline = ShearTimeline; + var ColorTimeline = (function (_super) { + __extends(ColorTimeline, _super); + function ColorTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + 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 { + // Interpolate between the previous frame and the current frame. + 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; + } + var color = skeleton.slots[this.slotIndex].color; + if (alpha < 1) + color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha); + else + color.set(r, g, b, a); + }; + 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)); + spine.ColorTimeline = ColorTimeline; + var AttachmentTimeline = (function () { + function AttachmentTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.attachmentNames = new Array(frameCount); + } + AttachmentTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time and value of the specified keyframe. */ + AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) { + this.frames[frameIndex] = time; + this.attachmentNames[frameIndex] = attachmentName; + }; + AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + 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; + }()); + spine.AttachmentTimeline = AttachmentTimeline; + var EventTimeline = (function () { + function EventTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.events = new Array(frameCount); + } + EventTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time of the specified keyframe. */ + EventTimeline.prototype.setFrame = function (frameIndex, event) { + this.frames[frameIndex] = event.time; + this.events[frameIndex] = event; + }; + /** Fires events for frames > lastTime and <= time. */ + EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + 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); + lastTime = -1; + } + else if (lastTime >= frames[frameCount - 1]) + return; + if (time < frames[0]) + return; // Time is before first frame. + 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; + }()); + spine.EventTimeline = EventTimeline; + var DrawOrderTimeline = (function () { + function DrawOrderTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.drawOrders = new Array(frameCount); + } + DrawOrderTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) { + this.frames[frameIndex] = time; + this.drawOrders[frameIndex] = drawOrder; + }; + DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var frame = 0; + if (time >= frames[frames.length - 1]) + frame = frames.length - 1; + else + frame = Animation.binarySearch(frames, time) - 1; + var drawOrder = skeleton.drawOrder; + var slots = skeleton.slots; + var drawOrderToSetupIndex = this.drawOrders[frame]; + if (drawOrderToSetupIndex == null) + spine.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; + }()); + spine.DrawOrderTimeline = DrawOrderTimeline; + var DeformTimeline = (function (_super) { + __extends(DeformTimeline, _super); + function DeformTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount); + this.frameVertices = new Array(frameCount); + } + /** Sets the time of the specified keyframe. */ + DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) { + this.frames[frameIndex] = time; + this.frameVertices[frameIndex] = vertices; + }; + DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var slot = skeleton.slots[this.slotIndex]; + var slotAttachment = slot.getAttachment(); + if (!(slotAttachment instanceof spine.VertexAttachment) || !slotAttachment.applyDeform(this.attachment)) + return; + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var frameVertices = this.frameVertices; + var vertexCount = frameVertices[0].length; + var verticesArray = slot.attachmentVertices; + if (verticesArray.length != vertexCount) + alpha = 1; // Don't mix from uninitialized slot vertices. + var vertices = spine.Utils.setArraySize(verticesArray, vertexCount); + if (time >= frames[frames.length - 1]) { + var lastVertices = frameVertices[frames.length - 1]; + if (alpha < 1) { + for (var i = 0; i < vertexCount; i++) + vertices[i] += (lastVertices[i] - vertices[i]) * alpha; + } + else + spine.Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount); + return; + } + // Interpolate between the previous frame and the current frame. + 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) { + for (var i = 0; i < vertexCount; i++) { + var prev = prevVertices[i]; + vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha; + } + } + else { + for (var i = 0; i < vertexCount; i++) { + var prev = prevVertices[i]; + vertices[i] = prev + (nextVertices[i] - prev) * percent; + } + } + }; + return DeformTimeline; + }(CurveTimeline)); + spine.DeformTimeline = DeformTimeline; + var IkConstraintTimeline = (function (_super) { + __extends(IkConstraintTimeline, _super); + function IkConstraintTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES); + } + /** Sets the time, mix and bend direction of the specified keyframe. */ + IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, bendDirection) { + frameIndex *= IkConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + IkConstraintTimeline.MIX] = mix; + this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection; + }; + IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.ikConstraints[this.ikConstraintIndex]; + if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { + constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]); + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES); + var mix = frames[frame + IkConstraintTimeline.PREV_MIX]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime)); + constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]); + }; + IkConstraintTimeline.ENTRIES = 3; + IkConstraintTimeline.PREV_TIME = -3; + IkConstraintTimeline.PREV_MIX = -2; + IkConstraintTimeline.PREV_BEND_DIRECTION = -1; + IkConstraintTimeline.MIX = 1; + IkConstraintTimeline.BEND_DIRECTION = 2; + return IkConstraintTimeline; + }(CurveTimeline)); + spine.IkConstraintTimeline = IkConstraintTimeline; + var TransformConstraintTimeline = (function (_super) { + __extends(TransformConstraintTimeline, _super); + function TransformConstraintTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES); + } + /** Sets the time and mixes of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.transformConstraints[this.transformConstraintIndex]; + if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { + var i = frames.length; + constraint.rotateMix += (frames[i + TransformConstraintTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + TransformConstraintTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + constraint.scaleMix += (frames[i + TransformConstraintTimeline.PREV_SCALE] - constraint.scaleMix) * alpha; + constraint.shearMix += (frames[i + TransformConstraintTimeline.PREV_SHEAR] - constraint.shearMix) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES); + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime)); + var rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE]; + var translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE]; + var scale = frames[frame + TransformConstraintTimeline.PREV_SCALE]; + var shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR]; + constraint.rotateMix += (rotate + (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent - constraint.translateMix) + * alpha; + constraint.scaleMix += (scale + (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent - constraint.scaleMix) * alpha; + constraint.shearMix += (shear + (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent - 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)); + spine.TransformConstraintTimeline = TransformConstraintTimeline; + var PathConstraintPositionTimeline = (function (_super) { + __extends(PathConstraintPositionTimeline, _super); + function PathConstraintPositionTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) { + var i = frames.length; + constraint.position += (frames[i + PathConstraintPositionTimeline.PREV_VALUE] - constraint.position) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES); + var 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)); + constraint.position += (position + (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent - constraint.position) * alpha; + }; + PathConstraintPositionTimeline.ENTRIES = 2; + PathConstraintPositionTimeline.PREV_TIME = -2; + PathConstraintPositionTimeline.PREV_VALUE = -1; + PathConstraintPositionTimeline.VALUE = 1; + return PathConstraintPositionTimeline; + }(CurveTimeline)); + spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline; + var PathConstraintSpacingTimeline = (function (_super) { + __extends(PathConstraintSpacingTimeline, _super); + function PathConstraintSpacingTimeline(frameCount) { + _super.call(this, frameCount); + } + PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) { + var i = frames.length; + constraint.spacing += (frames[i + PathConstraintSpacingTimeline.PREV_VALUE] - constraint.spacing) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES); + var 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)); + constraint.spacing += (spacing + (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent - constraint.spacing) * alpha; + }; + return PathConstraintSpacingTimeline; + }(PathConstraintPositionTimeline)); + spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline; + var PathConstraintMixTimeline = (function (_super) { + __extends(PathConstraintMixTimeline, _super); + function PathConstraintMixTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES); + } + /** Sets the time and mixes of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { + var i = frames.length; + constraint.rotateMix += (frames[i + PathConstraintMixTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + PathConstraintMixTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES); + var rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE]; + var 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)); + constraint.rotateMix += (rotate + (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent - 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)); + spine.PathConstraintMixTimeline = PathConstraintMixTimeline; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var AnimationState = (function () { + function AnimationState(data) { + if (data === void 0) { data = null; } + this.tracks = new Array(); + this.events = new Array(); + this.listeners = new Array(); + this.timeScale = 1; + if (data == null) + throw new Error("data cannot be null."); + this.data = data; + } + AnimationState.prototype.update = function (delta) { + delta *= this.timeScale; + for (var i = 0; i < this.tracks.length; i++) { + var current = this.tracks[i]; + if (current == null) + continue; + var next = current.next; + if (next != null) { + var nextTime = current.lastTime - next.delay; + if (nextTime >= 0) { + var nextDelta = delta * next.timeScale; + next.time = nextTime + nextDelta; // For start event to see correct time. + current.time += delta * current.timeScale; // For end event to see correct time. + this.setCurrent(i, next); + next.time -= nextDelta; // Prevent increasing time twice, below. + current = next; + } + } + else if (!current.loop && current.lastTime >= current.endTime) { + // End non-looping animation when it reaches its end time and there is no next entry. + this.clearTrack(i); + continue; + } + current.time += delta * current.timeScale; + if (current.previous != null) { + var previousDelta = delta * current.previous.timeScale; + current.previous.time += previousDelta; + current.mixTime += previousDelta; + } + } + }; + AnimationState.prototype.apply = function (skeleton) { + var events = this.events; + var listenerCount = this.listeners.length; + for (var i = 0; i < this.tracks.length; i++) { + var current = this.tracks[i]; + if (current == null) + continue; + events.length = 0; + var time = current.time; + var lastTime = current.lastTime; + var endTime = current.endTime; + var loop = current.loop; + if (!loop && time > endTime) + time = endTime; + var previous = current.previous; + if (previous == null) + current.animation.mix(skeleton, lastTime, time, loop, events, current.mix); + else { + var previousTime = previous.time; + if (!previous.loop && previousTime > previous.endTime) + previousTime = previous.endTime; + previous.animation.apply(skeleton, previousTime, previousTime, previous.loop, null); + var alpha = current.mixTime / current.mixDuration * current.mix; + if (alpha >= 1) { + alpha = 1; + current.previous = null; + } + current.animation.mix(skeleton, lastTime, time, loop, events, alpha); + } + for (var ii = 0, nn = events.length; ii < nn; ii++) { + var event_1 = events[ii]; + if (current.listener != null) + current.listener.event(i, event_1); + for (var iii = 0; iii < listenerCount; iii++) + this.listeners[iii].event(i, event_1); + } + // Check if completed the animation or a loop iteration. + if (loop ? (lastTime % endTime > time % endTime) : (lastTime < endTime && time >= endTime)) { + var count = spine.MathUtils.toInt(time / endTime); + if (current.listener != null) + current.listener.complete(i, count); + for (var ii = 0, nn = this.listeners.length; ii < nn; ii++) + this.listeners[ii].complete(i, count); + } + current.lastTime = current.time; + } + }; + AnimationState.prototype.clearTracks = function () { + for (var i = 0, n = this.tracks.length; i < n; i++) + this.clearTrack(i); + this.tracks.length = 0; + }; + AnimationState.prototype.clearTrack = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return; + var current = this.tracks[trackIndex]; + if (current == null) + return; + if (current.listener != null) + current.listener.end(trackIndex); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(trackIndex); + this.tracks[trackIndex] = null; + this.freeAll(current); + }; + AnimationState.prototype.freeAll = function (entry) { + while (entry != null) { + var next = entry.next; + entry = next; + } + }; + AnimationState.prototype.expandToIndex = function (index) { + if (index < this.tracks.length) + return this.tracks[index]; + spine.Utils.setArraySize(this.tracks, index - this.tracks.length + 1, null); + this.tracks.length = index + 1; + return null; + }; + AnimationState.prototype.setCurrent = function (index, entry) { + var current = this.expandToIndex(index); + if (current != null) { + var previous = current.previous; + current.previous = null; + if (current.listener != null) + current.listener.end(index); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(index); + entry.mixDuration = this.data.getMix(current.animation, entry.animation); + if (entry.mixDuration > 0) { + entry.mixTime = 0; + // If a mix is in progress, mix from the closest animation. + if (previous != null && current.mixTime / current.mixDuration < 0.5) { + entry.previous = previous; + previous = current; + } + else + entry.previous = current; + } + } + this.tracks[index] = entry; + if (entry.listener != null) + entry.listener.start(index); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].start(index); + }; + /** @see #setAnimation(int, Animation, boolean) */ + 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); + }; + /** Set the current animation. Any queued animations are cleared. */ + AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) { + var current = this.expandToIndex(trackIndex); + if (current != null) + this.freeAll(current.next); + var entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + this.setCurrent(trackIndex, entry); + return entry; + }; + /** {@link #addAnimation(int, Animation, boolean, float)} */ + 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); + }; + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) { + var entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + var last = this.expandToIndex(trackIndex); + if (last != null) { + while (last.next != null) + last = last.next; + last.next = entry; + } + else + this.tracks[trackIndex] = entry; + if (delay <= 0) { + if (last != null) + delay += last.endTime - this.data.getMix(last.animation, animation); + else + delay = 0; + } + entry.delay = delay; + return entry; + }; + /** @return May be null. */ + AnimationState.prototype.getCurrent = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return null; + return this.tracks[trackIndex]; + }; + /** Adds a listener to receive events for all animations. */ + AnimationState.prototype.addListener = function (listener) { + if (listener == null) + throw new Error("listener cannot be null."); + this.listeners.push(listener); + }; + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + 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; + }; + return AnimationState; + }()); + spine.AnimationState = AnimationState; + var TrackEntry = (function () { + function TrackEntry() { + this.loop = false; + this.delay = 0; + this.time = 0; + this.lastTime = -1; + this.endTime = 0; + this.timeScale = 1; + this.mixTime = 0; + this.mixDuration = 0; + this.mix = 1; + } + TrackEntry.prototype.reset = function () { + this.next = null; + this.previous = null; + this.animation = null; + this.listener = null; + this.timeScale = 1; + this.lastTime = -1; // Trigger events on frame zero. + this.time = 0; + }; + /** Returns true if the current time is greater than the end time, regardless of looping. */ + TrackEntry.prototype.isComplete = function () { + return this.time >= this.endTime; + }; + return TrackEntry; + }()); + spine.TrackEntry = TrackEntry; + var AnimationStateAdapter = (function () { + function AnimationStateAdapter() { + } + AnimationStateAdapter.prototype.event = function (trackIndex, event) { + }; + AnimationStateAdapter.prototype.complete = function (trackIndex, loopCount) { + }; + AnimationStateAdapter.prototype.start = function (trackIndex) { + }; + AnimationStateAdapter.prototype.end = function (trackIndex) { + }; + return AnimationStateAdapter; + }()); + spine.AnimationStateAdapter = AnimationStateAdapter; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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.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; + }; + return AnimationStateData; + }()); + spine.AnimationStateData = AnimationStateData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + (function (BlendMode) { + BlendMode[BlendMode["Normal"] = 0] = "Normal"; + BlendMode[BlendMode["Additive"] = 1] = "Additive"; + BlendMode[BlendMode["Multiply"] = 2] = "Multiply"; + BlendMode[BlendMode["Screen"] = 3] = "Screen"; + })(spine.BlendMode || (spine.BlendMode = {})); + var BlendMode = spine.BlendMode; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Bone = (function () { + /** @param parent May be null. */ + function Bone(data, skeleton, parent) { + 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.appliedRotation = 0; + this.a = 0; + this.b = 0; + this.worldX = 0; + this.c = 0; + this.d = 0; + this.worldY = 0; + this.worldSignX = 0; + this.worldSignY = 0; + this.sorted = 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(); + } + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + Bone.prototype.update = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + /** Computes the world transform using the parent bone and this bone's local transform. */ + Bone.prototype.updateWorldTransform = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + /** Computes the world transform using the parent bone and the specified local transform. */ + Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) { + this.appliedRotation = rotation; + var rotationY = rotation + 90 + shearY; + var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX, lb = spine.MathUtils.cosDeg(rotationY) * scaleY; + var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX, ld = spine.MathUtils.sinDeg(rotationY) * scaleY; + var parent = this.parent; + if (parent == null) { + var skeleton = this.skeleton; + if (skeleton.flipX) { + x = -x; + la = -la; + lb = -lb; + } + if (skeleton.flipY) { + y = -y; + lc = -lc; + ld = -ld; + } + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + this.worldX = x; + this.worldY = y; + this.worldSignX = spine.MathUtils.signum(scaleX); + this.worldSignY = spine.MathUtils.signum(scaleY); + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + this.worldX = pa * x + pb * y + parent.worldX; + this.worldY = pc * x + pd * y + parent.worldY; + this.worldSignX = parent.worldSignX * spine.MathUtils.signum(scaleX); + this.worldSignY = parent.worldSignY * spine.MathUtils.signum(scaleY); + if (this.data.inheritRotation && this.data.inheritScale) { + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else { + if (this.data.inheritRotation) { + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + var cos = spine.MathUtils.cosDeg(parent.appliedRotation), sin = spine.MathUtils.sinDeg(parent.appliedRotation); + var temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + if (!parent.data.inheritRotation) + break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else if (this.data.inheritScale) { + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + var cos = spine.MathUtils.cosDeg(parent.appliedRotation), sin = spine.MathUtils.sinDeg(parent.appliedRotation); + var psx = parent.scaleX, psy = parent.scaleY; + var za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy; + var temp = pa * za + pb * zc; + pb = pb * zd - pa * zb; + pa = temp; + temp = pc * za + pd * zc; + pd = pd * zd - pc * zb; + pc = temp; + if (psx >= 0) + sin = -sin; + temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + if (!parent.data.inheritScale) + break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else { + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + } + if (this.skeleton.flipX) { + this.a = -this.a; + this.b = -this.b; + } + if (this.skeleton.flipY) { + this.c = -this.c; + this.d = -this.d; + } + } + }; + 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.c, this.a) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldRotationY = function () { + return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldScaleX = function () { + return Math.sqrt(this.a * this.a + this.b * this.b) * this.worldSignX; + }; + Bone.prototype.getWorldScaleY = function () { + return Math.sqrt(this.c * this.c + this.d * this.d) * this.worldSignY; + }; + Bone.prototype.worldToLocalRotationX = function () { + var parent = this.parent; + if (parent == null) + return this.rotation; + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, a = this.a, c = this.c; + return Math.atan2(pa * c - pc * a, pd * a - pb * c) * spine.MathUtils.radDeg; + }; + Bone.prototype.worldToLocalRotationY = function () { + var parent = this.parent; + if (parent == null) + return this.rotation; + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, b = this.b, d = this.d; + return Math.atan2(pa * d - pc * b, pd * b - pb * d) * spine.MathUtils.radDeg; + }; + Bone.prototype.rotateWorld = function (degrees) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees); + this.a = cos * a - sin * c; + this.b = cos * b - sin * d; + this.c = sin * a + cos * c; + this.d = sin * b + cos * d; + }; + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + Bone.prototype.updateLocalTransform = function () { + var parent = this.parent; + if (parent == null) { + this.x = this.worldX; + this.y = this.worldY; + this.rotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg; + this.scaleX = Math.sqrt(this.a * this.a + this.c * this.c); + this.scaleY = Math.sqrt(this.b * this.b + this.d * this.d); + var det = this.a * this.d - this.b * this.c; + this.shearX = 0; + this.shearY = Math.atan2(this.a * this.b + this.c * this.d, det) * spine.MathUtils.radDeg; + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + var pid = 1 / (pa * pd - pb * pc); + var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY; + this.x = (dx * pd * pid - dy * pb * pid); + this.y = (dy * pa * pid - dx * pc * pid); + var ia = pid * pd; + var id = pid * pa; + var ib = pid * pb; + var ic = pid * pc; + var ra = ia * this.a - ib * this.c; + var rb = ia * this.b - ib * this.d; + var rc = id * this.c - ic * this.a; + var rd = id * this.d - ic * this.b; + this.shearX = 0; + this.scaleX = Math.sqrt(ra * ra + rc * rc); + if (this.scaleX > 0.0001) { + var det = ra * rd - rb * rc; + this.scaleY = det / this.scaleX; + this.shearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg; + this.rotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg; + } + else { + this.scaleX = 0; + this.scaleY = Math.sqrt(rb * rb + rd * rd); + this.shearY = 0; + this.rotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg; + } + this.appliedRotation = this.rotation; + }; + Bone.prototype.worldToLocal = function (world) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var invDet = 1 / (a * d - b * c); + var x = world.x - this.worldX, y = world.y - this.worldY; + world.x = (x * d * invDet - y * b * invDet); + world.y = (y * a * invDet - x * c * invDet); + return world; + }; + Bone.prototype.localToWorld = function (local) { + var x = local.x, y = local.y; + local.x = x * this.a + y * this.b + this.worldX; + local.y = x * this.c + y * this.d + this.worldY; + return local; + }; + return Bone; + }()); + spine.Bone = Bone; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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.inheritRotation = true; + this.inheritScale = true; + 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; + }()); + spine.BoneData = BoneData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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; + }()); + spine.Event = Event; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var EventData = (function () { + function EventData(name) { + this.name = name; + } + return EventData; + }()); + spine.EventData = EventData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var IkConstraint = (function () { + function IkConstraint(data, skeleton) { + this.mix = 1; + this.bendDirection = 0; + this.level = 0; + 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.bendDirection = data.bendDirection; + 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.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.mix); + break; + case 2: + this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix); + break; + } + }; + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) { + var pp = bone.parent; + var id = 1 / (pp.a * pp.d - pp.b * pp.c); + var x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * pp.d - y * pp.b) * id - bone.x, ty = (y * pp.a - x * pp.c) * id - bone.y; + var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.shearX - bone.rotation; + if (bone.scaleX < 0) + rotationIK += 180; + if (rotationIK > 180) + rotationIK -= 360; + else if (rotationIK < -180) + rotationIK += 360; + bone.updateWorldTransformWith(bone.x, bone.y, bone.rotation + rotationIK * alpha, bone.scaleX, bone.scaleY, bone.shearX, bone.shearY); + }; + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, alpha) { + if (alpha == 0) { + child.updateWorldTransform(); + return; + } + var px = parent.x, py = parent.y, psx = parent.scaleX, psy = parent.scaleY, csx = child.scaleX; + 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.x, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d; + var u = Math.abs(psx - psy) <= 0.0001; + if (!u) { + cy = 0; + cwx = a * cx + parent.worldX; + cwy = c * cx + parent.worldY; + } + else { + cy = child.y; + cwx = a * cx + b * cy + parent.worldX; + cwy = c * cx + d * cy + parent.worldY; + } + var pp = parent.parent; + a = pp.a; + b = pp.b; + c = pp.c; + d = pp.d; + var id = 1 / (a * d - b * c), x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py; + x = cwx - pp.worldX; + y = cwy - pp.worldY; + 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 = 0, a2 = 0; + outer: if (u) { + l2 *= psx; + var cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2); + if (cos < -1) + cos = -1; + else if (cos > 1) + cos = 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, dd = tx * tx + ty * ty, 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 = 0, minDist = Number.MAX_VALUE, minX = 0, minY = 0; + var maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0; + x = l1 + a; + d = x * x; + if (d > maxDist) { + maxAngle = 0; + maxDist = d; + maxX = x; + } + x = l1 - a; + d = x * x; + if (d < minDist) { + minAngle = spine.MathUtils.PI; + minDist = d; + minX = x; + } + var angle = Math.acos(-a * l1 / (aa - bb)); + x = a * Math.cos(angle) + l1; + y = b * Math.sin(angle); + d = x * x + y * y; + if (d < minDist) { + minAngle = angle; + minDist = d; + minX = x; + minY = y; + } + if (d > maxDist) { + maxAngle = angle; + 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.rotation; + a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation; + if (a1 > 180) + a1 -= 360; + else if (a1 < -180) + a1 += 360; + parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.scaleX, parent.scaleY, 0, 0); + rotation = child.rotation; + a2 = ((a2 + os) * spine.MathUtils.radDeg - child.shearX) * s2 + os2 - rotation; + if (a2 > 180) + a2 -= 360; + else if (a2 < -180) + a2 += 360; + child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.scaleX, child.scaleY, child.shearX, child.shearY); + }; + return IkConstraint; + }()); + spine.IkConstraint = IkConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var IkConstraintData = (function () { + function IkConstraintData(name) { + this.bones = new Array(); + this.bendDirection = 1; + this.mix = 1; + this.name = name; + } + return IkConstraintData; + }()); + spine.IkConstraintData = IkConstraintData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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(); + 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.apply = function () { + this.update(); + }; + PathConstraint.prototype.update = function () { + var attachment = this.target.getAttachment(); + if (!(attachment instanceof spine.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 == spine.SpacingMode.Length; + var rotateMode = data.rotateMode; + var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale; + var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1; + var bones = this.bones; + var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null; + var spacing = this.spacing; + if (scale || lengthSpacing) { + if (scale) + lengths = spine.Utils.setArraySize(this.lengths, boneCount); + for (var i = 0, n = spacesCount - 1; i < n;) { + var bone = bones[i]; + var length_1 = bone.data.length, x = length_1 * bone.a, y = length_1 * bone.c; + length_1 = Math.sqrt(x * x + y * y); + if (scale) + lengths[i] = length_1; + spaces[++i] = lengthSpacing ? Math.max(0, length_1 + spacing) : spacing; + } + } + else { + for (var i = 1; i < spacesCount; i++) + spaces[i] = spacing; + } + var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, spacingMode == spine.SpacingMode.Percent); + var skeleton = this.target.bone.skeleton; + var skeletonX = skeleton.x, skeletonY = skeleton.y; + var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; + var tip = rotateMode == spine.RotateMode.Chain && offsetRotation == 0; + for (var i = 0, p = 3; i < boneCount; i++, p += 3) { + var bone = bones[i]; + bone.worldX += (boneX - skeletonX - bone.worldX) * translateMix; + bone.worldY += (boneY - skeletonY - bone.worldY) * 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; + bone.a *= s; + bone.c *= s; + } + } + boneX = x; + boneY = y; + if (rotate) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.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) - offsetRotation * spine.MathUtils.degRad; + 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; + } + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + cos = Math.cos(r); + sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + } + }; + PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) { + var target = this.target; + var position = this.position; + var spaces = this.spaces, out = spine.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 = spine.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.computeWorldVerticesWith(target, 2, 4, world, 0); + } + this.addBeforePosition(p, world, 0, out, o); + continue; + } + else if (p > pathLength_1) { + if (prevCurve != PathConstraint.AFTER) { + prevCurve = PathConstraint.AFTER; + path.computeWorldVerticesWith(target, verticesLength - 6, 4, world, 0); + } + this.addAfterPosition(p - pathLength_1, world, 0, out, o); + continue; + } + // Determine curve containing position. + 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.computeWorldVerticesWith(target, verticesLength - 4, 4, world, 0); + path.computeWorldVerticesWith(target, 0, 4, world, 4); + } + else + path.computeWorldVerticesWith(target, curve * 6 + 2, 8, world, 0); + } + 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; + } + // World vertices. + if (closed) { + verticesLength += 2; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength - 4, world, 0); + path.computeWorldVerticesWith(target, 0, 2, world, verticesLength - 4); + world[verticesLength - 2] = world[0]; + world[verticesLength - 1] = world[1]; + } + else { + curveCount--; + verticesLength -= 4; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength, world, 0); + } + // Curve lengths. + var curves = spine.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; + } + // Determine curve containing position. + 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; + } + // Curve segment lengths. + 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; + } + // Weight by segment length. + 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) + 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; + return PathConstraint; + }()); + spine.PathConstraint = PathConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var PathConstraintData = (function () { + function PathConstraintData(name) { + this.bones = new Array(); + this.name = name; + } + return PathConstraintData; + }()); + spine.PathConstraintData = PathConstraintData; + (function (PositionMode) { + PositionMode[PositionMode["Fixed"] = 0] = "Fixed"; + PositionMode[PositionMode["Percent"] = 1] = "Percent"; + })(spine.PositionMode || (spine.PositionMode = {})); + var PositionMode = spine.PositionMode; + (function (SpacingMode) { + SpacingMode[SpacingMode["Length"] = 0] = "Length"; + SpacingMode[SpacingMode["Fixed"] = 1] = "Fixed"; + SpacingMode[SpacingMode["Percent"] = 2] = "Percent"; + })(spine.SpacingMode || (spine.SpacingMode = {})); + var SpacingMode = spine.SpacingMode; + (function (RotateMode) { + RotateMode[RotateMode["Tangent"] = 0] = "Tangent"; + RotateMode[RotateMode["Chain"] = 1] = "Chain"; + RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale"; + })(spine.RotateMode || (spine.RotateMode = {})); + var RotateMode = spine.RotateMode; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Skeleton = (function () { + function Skeleton(data) { + this._updateCache = new Array(); + this.time = 0; + this.flipX = false; + this.flipY = false; + 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 spine.Bone(boneData, this, null); + else { + var parent_1 = this.bones[boneData.parent.index]; + bone = new spine.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 spine.Slot(slotData, bone); + this.slots.push(slot); + this.drawOrder.push(slot); + } + this.ikConstraints = new Array(); + this.ikConstraintsSorted = new Array(); + for (var i = 0; i < data.ikConstraints.length; i++) { + var ikConstraintData = data.ikConstraints[i]; + this.ikConstraints.push(new spine.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 spine.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 spine.PathConstraint(pathConstraintData, this)); + } + this.color = new spine.Color(1, 1, 1, 1); + this.updateCache(); + } + Skeleton.prototype.updateCache = function () { + var updateCache = this._updateCache; + updateCache.length = 0; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + bones[i].sorted = false; + // IK first, lowest hierarchy depth first. + var ikConstraints = this.ikConstraintsSorted; + ikConstraints.length = 0; + for (var i = 0; i < this.ikConstraints.length; i++) + ikConstraints.push(this.ikConstraints[i]); + var ikCount = ikConstraints.length; + for (var i = 0, level = 0, n = ikCount; i < n; i++) { + var ik = ikConstraints[i]; + var bone = ik.bones[0].parent; + for (level = 0; bone != null; level++) + bone = bone.parent; + ik.level = level; + } + for (var i = 1, ii = 0; i < ikCount; i++) { + var ik = ikConstraints[i]; + var level = ik.level; + for (ii = i - 1; ii >= 0; ii--) { + var other = ikConstraints[ii]; + if (other.level < level) + break; + ikConstraints[ii + 1] = other; + } + ikConstraints[ii + 1] = ik; + } + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var constraint = ikConstraints[i]; + var target = constraint.target; + this.sortBone(target); + var constrained = constraint.bones; + var parent_2 = constrained[0]; + this.sortBone(parent_2); + updateCache.push(constraint); + this.sortReset(parent_2.children); + constrained[constrained.length - 1].sorted = true; + } + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + 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 ii = 0, nn = this.data.skins.length; ii < nn; ii++) + this.sortPathConstraintAttachment(this.data.skins[ii], slotIndex, slotBone); + var attachment = slot.getAttachment(); + if (attachment instanceof spine.PathAttachment) + this.sortPathConstraintAttachmentWith(attachment, slotBone); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + 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; + } + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + this.sortBone(constraint.target); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + 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; + } + for (var i = 0, n = bones.length; i < n; i++) + this.sortBone(bones[i]); + }; + 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 spine.PathAttachment)) + return; + var pathBones = attachment.bones; + if (pathBones == null) + this.sortBone(slotBone); + else { + var bones = this.bones; + for (var i = 0; i < pathBones.length; 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.sorted) + this.sortReset(bone.children); + bone.sorted = false; + } + }; + /** Updates the world transform for each bone and applies constraints. */ + Skeleton.prototype.updateWorldTransform = function () { + var updateCache = this._updateCache; + for (var i = 0, n = updateCache.length; i < n; i++) + updateCache[i].update(); + }; + /** Sets the bones, constraints, and slots to their setup pose values. */ + Skeleton.prototype.setToSetupPose = function () { + this.setBonesToSetupPose(); + this.setSlotsToSetupPose(); + }; + /** Sets the bones and constraints to their setup pose values. */ + 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.bendDirection = constraint.data.bendDirection; + constraint.mix = constraint.data.mix; + } + 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; + spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length); + for (var i = 0, n = slots.length; i < n; i++) + slots[i].setToSetupPose(); + }; + /** @return May return null. */ + Skeleton.prototype.getRootBone = function () { + if (this.bones.length == 0) + return null; + return this.bones[0]; + }; + /** @return May be null. */ + 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; + }; + /** @return -1 if the bone was not found. */ + 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; + }; + /** @return May be null. */ + 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; + }; + /** @return -1 if the bone was not found. */ + 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; + }; + /** Sets a skin by name. + * @see #setSkin(Skin) */ + Skeleton.prototype.setSkinByName = function (skinName) { + var skin = this.data.findSkin(skinName); + if (skin == null) + throw new Error("Skin not found: " + skinName); + this.setSkin(skin); + }; + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + Skeleton.prototype.setSkin = function (newSkin) { + 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; + }; + /** @return May be null. */ + Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) { + return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName); + }; + /** @return May be null. */ + 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; + }; + /** @param attachmentName May be 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); + }; + /** @return May be null. */ + 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; + }; + /** @return May be 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; + }; + /** @return May be 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; + }; + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + Skeleton.prototype.getBounds = function (offset, size) { + 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]; + var vertices = null; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.RegionAttachment) + vertices = attachment.updateWorldVertices(slot, false); + else if (attachment instanceof spine.MeshAttachment) + vertices = attachment.updateWorldVertices(slot, true); + if (vertices != null) { + for (var ii = 0, nn = vertices.length; ii < nn; ii += 5) { + 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; + }; + return Skeleton; + }()); + spine.Skeleton = Skeleton; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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 spine.Pool(function () { + return spine.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]; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.BoundingBoxAttachment) { + var boundingBox = attachment; + boundingBoxes.push(boundingBox); + var polygon = polygonPool.obtain(); + if (polygon.length != boundingBox.worldVerticesLength) { + polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength); + } + polygons.push(polygon); + boundingBox.computeWorldVertices(slot, polygon); + } + } + if (updateAabb) + this.aabbCompute(); + }; + 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; + }; + /** Returns true if the axis aligned bounding box contains the point. */ + SkeletonBounds.prototype.aabbContainsPoint = function (x, y) { + return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY; + }; + /** Returns true if the axis aligned bounding box intersects the line segment. */ + 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; + }; + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) { + return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY; + }; + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + 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; + }; + /** Returns true if the polygon contains the point. */ + 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; + }; + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + 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; + }; + /** Returns true if the polygon contains any part of the line segment. */ + 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; + }; + /** Returns the polygon for the specified bounding box, or null. */ + 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]; + }; + return SkeletonBounds; + }()); + spine.SkeletonBounds = SkeletonBounds; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SkeletonData = (function () { + function SkeletonData() { + this.bones = new Array(); // Ordered parents first. + this.slots = new Array(); // Setup pose draw order. + this.skins = new Array(); + this.events = new Array(); + this.animations = new Array(); + this.ikConstraints = new Array(); + this.transformConstraints = new Array(); + this.pathConstraints = new Array(); + } + 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_2 = events[i]; + if (event_2.name == eventDataName) + return event_2; + } + 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; + }()); + spine.SkeletonData = SkeletonData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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 spine.SkeletonData(); + var root = JSON.parse(json); + // Skeleton + var skeletonMap = root.skeleton; + if (skeletonMap != null) { + skeletonData.hash = skeletonMap.hash; + skeletonData.version = skeletonMap.spine; + skeletonData.width = skeletonMap.width; + skeletonData.height = skeletonMap.height; + skeletonData.imagesPath = skeletonMap.images; + } + // Bones + if (root.bones) { + for (var i = 0; i < root.bones.length; i++) { + var boneMap = root.bones[i]; + var parent_3 = null; + var parentName = this.getValue(boneMap, "parent", null); + if (parentName != null) { + parent_3 = skeletonData.findBone(parentName); + if (parent_3 == null) + throw new Error("Parent bone not found: " + parentName); + } + var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_3); + 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.inheritRotation = this.getValue(boneMap, "inheritRotation", true); + data.inheritScale = this.getValue(boneMap, "inheritScale", true); + skeletonData.bones.push(data); + } + } + // Slots. + 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 spine.SlotData(skeletonData.slots.length, slotName, boneData); + var color = slotMap.color ? slotMap.color : null; + if (color != null) + data.color.setFromString(color); + data.attachmentName = this.getValue(slotMap, "attachment", null); + data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal")); + skeletonData.slots.push(data); + } + } + // IK constraints + if (root.ik) { + for (var i = 0; i < root.ik.length; i++) { + var constraintMap = root.ik[i]; + var data = new spine.IkConstraintData(constraintMap.name); + 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.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1; + data.mix = constraintMap.mix ? constraintMap.mix : 1; + skeletonData.ikConstraints.push(data); + } + } + // Transform constraints. + if (root.transform) { + for (var i = 0; i < root.transform.length; i++) { + var constraintMap = root.transform[i]; + var data = new spine.TransformConstraintData(constraintMap.name); + 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.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); + } + } + // Path constraints. + if (root.path) { + for (var i = 0; i < root.path.length; i++) { + var constraintMap = root.path[i]; + var data = new spine.PathConstraintData(constraintMap.name); + 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 == spine.PositionMode.Fixed) + data.position *= scale; + data.spacing = this.getValue(constraintMap, "spacing", 0); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + data.spacing *= scale; + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + skeletonData.pathConstraints.push(data); + } + } + // Skins. + if (root.skins) { + for (var skinName in root.skins) { + var skinMap = root.skins[skinName]; + var skin = new spine.Skin(skinName); + for (var slotName in skinMap) { + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotName); + var slotMap = skinMap[slotName]; + for (var entryName in slotMap) { + var attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName); + if (attachment != null) + skin.addAttachment(slotIndex, entryName, attachment); + } + } + skeletonData.skins.push(skin); + if (skin.name == "default") + skeletonData.defaultSkin = skin; + } + } + // Linked meshes. + 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_4 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); + if (parent_4 == null) + throw new Error("Parent mesh not found: " + linkedMesh.parent); + linkedMesh.mesh.setParentMesh(parent_4); + linkedMesh.mesh.updateUVs(); + } + this.linkedMeshes.length = 0; + // Events. + if (root.events) { + for (var eventName in root.events) { + var eventMap = root.events[eventName]; + var data = new spine.EventData(eventName); + data.intValue = this.getValue(eventMap, "int", 0); + data.floatValue = this.getValue(eventMap, "float", 0); + data.stringValue = this.getValue(eventMap, "string", null); + skeletonData.events.push(data); + } + } + // Animations. + 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) { + 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); + region.updateOffset(); + return region; + } + case "boundingbox": { + var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); + if (box == null) + return null; + this.readVertices(map, box, map.vertexCount << 1); + 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); + var parent_5 = this.getValue(map, "parent", null); + if (parent_5 != null) { + mesh.inheritDeform = this.getValue(map, "deform", true); + this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent_5)); + return mesh; + } + var uvs = map.uvs; + this.readVertices(map, mesh, uvs.length); + mesh.triangles = map.triangles; + mesh.regionUVs = uvs; + mesh.updateUVs(); + 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 = spine.Utils.newArray(vertexCount / 3, 0); + for (var i = 0; i < map.lengths.length; i++) + lengths[i++] = map.lengths[i] * scale; + path.lengths = lengths; + return path; + } + } + return null; + }; + SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) { + var scale = this.scale; + attachment.worldVerticesLength = verticesLength; + var vertices = map.vertices; + if (verticesLength == vertices.length) { + if (scale != 1) { + for (var i = 0, n = vertices.length; i < n; i++) + vertices[i] *= scale; + } + attachment.vertices = spine.Utils.toFloatArray(vertices); + 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 = spine.Utils.toFloatArray(weights); + }; + SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) { + var scale = this.scale; + var timelines = new Array(); + var duration = 0; + // Slot timelines. + 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 == "color") { + var timeline = new spine.ColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var color = new spine.Color(); + color.setFromString(valueMap.color); + timeline.setFrame(frameIndex, valueMap.time, 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) * spine.ColorTimeline.ENTRIES]); + } + else if (timelineName = "attachment") { + var timeline = new spine.AttachmentTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex++, valueMap.time, valueMap.name); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + else + throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); + } + } + } + // Bone timelines. + 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 spine.RotateTimeline(timelineMap.length); + timeline.boneIndex = boneIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, valueMap.angle); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]); + } + else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") { + var timeline = null; + var timelineScale = 1; + if (timelineName === "scale") + timeline = new spine.ScaleTimeline(timelineMap.length); + else if (timelineName === "shear") + timeline = new spine.ShearTimeline(timelineMap.length); + else { + timeline = new spine.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", 0), y = this.getValue(valueMap, "y", 0); + timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]); + } + else + throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); + } + } + } + // IK constraint timelines. + if (map.ik) { + for (var constraintName in map.ik) { + var constraintMap = map.ik[constraintName]; + var constraint = skeletonData.findIkConstraint(constraintName); + var timeline = new spine.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, valueMap.time, this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "bendPositive", true) ? 1 : -1); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]); + } + } + // Transform constraint timelines. + if (map.transform) { + for (var constraintName in map.transform) { + var constraintMap = map.transform[constraintName]; + var constraint = skeletonData.findTransformConstraint(constraintName); + var timeline = new spine.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, valueMap.time, 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) * spine.TransformConstraintTimeline.ENTRIES]); + } + } + // Path constraint timelines. + if (map.paths) { + for (var constraintName in map.paths) { + var constraintMap = map.paths[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 spine.PathConstraintSpacingTimeline(timelineMap.length); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + timelineScale = scale; + } + else { + timeline = new spine.PathConstraintPositionTimeline(timelineMap.length); + if (data.positionMode == spine.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, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]); + } + else if (timelineName === "mix") { + var timeline = new spine.PathConstraintMixTimeline(timelineMap.length); + timeline.pathConstraintIndex = index; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, 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) * spine.PathConstraintMixTimeline.ENTRIES]); + } + } + } + } + // Deform timelines. + 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 spine.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 ? spine.Utils.newFloatArray(deformLength) : vertices; + else { + deform = spine.Utils.newFloatArray(deformLength); + var start = this.getValue(valueMap, "offset", 0); + spine.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, valueMap.time, deform); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + } + } + } + // Draw order timeline. + var drawOrderNode = map.drawOrder; + if (drawOrderNode == null) + drawOrderNode = map.draworder; + if (drawOrderNode != null) { + var timeline = new spine.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 = spine.Utils.newArray(slotCount, -1); + var unchanged = spine.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); + // Collect unchanged items. + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + // Set changed items. + drawOrder[originalIndex + offsetMap.offset] = originalIndex++; + } + // Collect remaining unchanged items. + while (originalIndex < slotCount) + unchanged[unchangedIndex++] = originalIndex++; + // Fill in unchanged items. + for (var i = slotCount - 1; i >= 0; i--) + if (drawOrder[i] == -1) + drawOrder[i] = unchanged[--unchangedIndex]; + } + timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + // Event timeline. + if (map.events) { + var timeline = new spine.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_3 = new spine.Event(eventMap.time, eventData); + event_3.intValue = this.getValue(eventMap, "int", eventData.intValue); + event_3.floatValue = this.getValue(eventMap, "float", eventData.floatValue); + event_3.stringValue = this.getValue(eventMap, "string", eventData.stringValue); + timeline.setFrame(frameIndex++, event_3); + } + 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 spine.Animation(name, timelines, duration)); + }; + SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { + if (!map.curve) + return; + if (map.curve === "stepped") + timeline.setStepped(frameIndex); + else if (Object.prototype.toString.call(map.curve) === '[object Array]') { + var curve = map.curve; + timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]); + } + }; + 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 spine.BlendMode.Normal; + if (str == "additive") + return spine.BlendMode.Additive; + if (str == "multiply") + return spine.BlendMode.Multiply; + if (str == "screen") + return spine.BlendMode.Screen; + throw new Error("Unknown blend mode: " + str); + }; + SkeletonJson.positionModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "fixed") + return spine.PositionMode.Fixed; + if (str == "percent") + return spine.PositionMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.spacingModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "length") + return spine.SpacingMode.Length; + if (str == "fixed") + return spine.SpacingMode.Fixed; + if (str == "percent") + return spine.SpacingMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.rotateModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "tangent") + return spine.RotateMode.Tangent; + if (str == "chain") + return spine.RotateMode.Chain; + if (str == "chainscale") + return spine.RotateMode.ChainScale; + throw new Error("Unknown rotate mode: " + str); + }; + return SkeletonJson; + }()); + spine.SkeletonJson = SkeletonJson; + var LinkedMesh = (function () { + function LinkedMesh(mesh, skin, slotIndex, parent) { + this.mesh = mesh; + this.skin = skin; + this.slotIndex = slotIndex; + this.parent = parent; + } + return LinkedMesh; + }()); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Skin = (function () { + function Skin(name) { + this.attachments = new Array(); + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + Skin.prototype.addAttachment = 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; + }; + /** @return May be null. */ + Skin.prototype.getAttachment = function (slotIndex, name) { + var dictionary = this.attachments[slotIndex]; + return dictionary ? dictionary[name] : null; + }; + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + 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, name); + if (attachment != null) + slot.setAttachment(attachment); + break; + } + } + } + slotIndex++; + } + }; + return Skin; + }()); + spine.Skin = Skin; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Slot = (function () { + function Slot(data, bone) { + this.attachmentVertices = 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 spine.Color(); + this.setToSetupPose(); + } + /** @return May be null. */ + Slot.prototype.getAttachment = function () { + return this.attachment; + }; + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + Slot.prototype.setAttachment = function (attachment) { + if (this.attachment == attachment) + return; + this.attachment = attachment; + this.attachmentTime = this.bone.skeleton.time; + this.attachmentVertices.length = 0; + }; + Slot.prototype.setAttachmentTime = function (time) { + this.attachmentTime = this.bone.skeleton.time - time; + }; + /** Returns the time since the attachment was set. */ + Slot.prototype.getAttachmentTime = function () { + return this.bone.skeleton.time - this.attachmentTime; + }; + Slot.prototype.setToSetupPose = function () { + this.color.setFromColor(this.data.color); + 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; + }()); + spine.Slot = Slot; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SlotData = (function () { + function SlotData(index, name, boneData) { + this.color = new spine.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; + }()); + spine.SlotData = SlotData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TransformConstraint = (function () { + function TransformConstraint(data, skeleton) { + this.rotateMix = 0; + this.translateMix = 0; + this.scaleMix = 0; + this.shearMix = 0; + this.temp = new spine.Vector2(); + 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.apply = function () { + this.update(); + }; + TransformConstraint.prototype.update = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + var ta = target.a, tb = target.b, tc = target.c, td = target.d; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (rotateMix > 0) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var r = Math.atan2(tc, ta) - Math.atan2(c, a) + this.data.offsetRotation * spine.MathUtils.degRad; + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + var cos = Math.cos(r), sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + if (translateMix > 0) { + var temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + bone.worldX += (temp.x - bone.worldX) * translateMix; + bone.worldY += (temp.y - bone.worldY) * translateMix; + } + if (scaleMix > 0) { + var bs = Math.sqrt(bone.a * bone.a + bone.c * bone.c); + var ts = Math.sqrt(ta * ta + tc * tc); + var s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleX) * scaleMix) / bs : 0; + bone.a *= s; + bone.c *= s; + bs = Math.sqrt(bone.b * bone.b + bone.d * bone.d); + ts = Math.sqrt(tb * tb + td * td); + s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleY) * scaleMix) / bs : 0; + bone.b *= s; + bone.d *= s; + } + if (shearMix > 0) { + var b = bone.b, d = bone.d; + var by = Math.atan2(d, b); + var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a)); + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r = by + (r + this.data.offsetShearY * spine.MathUtils.degRad) * shearMix; + var s = Math.sqrt(b * b + d * d); + bone.b = Math.cos(r) * s; + bone.d = Math.sin(r) * s; + } + } + }; + return TransformConstraint; + }()); + spine.TransformConstraint = TransformConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TransformConstraintData = (function () { + function TransformConstraintData(name) { + 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; + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return TransformConstraintData; + }()); + spine.TransformConstraintData = TransformConstraintData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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(); + }; + Color.prototype.setFromColor = function (c) { + this.r = c.r; + this.g = c.g; + this.b = c.b; + this.a = c.a; + }; + 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; + }; + Color.prototype.add = function (r, g, b, a) { + this.r += r; + this.g += g; + this.b += b; + this.a += a; + this.clamp(); + }; + 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; + }; + return Color; + }()); + spine.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 : -1; + }; + MathUtils.toInt = function (x) { + return x > 0 ? Math.floor(x) : Math.ceil(x); + }; + 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; + }()); + spine.MathUtils = MathUtils; + 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.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.toFloatArray = function (array) { + return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array; + }; + Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined"; + return Utils; + }()); + spine.Utils = Utils; + var Pool = (function () { + function Pool(instantiator) { + this._items = new Array(16); + this._instantiator = instantiator; + } + Pool.prototype.obtain = function () { + return this._items.length > 0 ? this._items.pop() : this._instantiator(); + }; + Pool.prototype.free = function (item) { + this._items.push(item); + }; + Pool.prototype.freeAll = function (items) { + for (var i = 0; i < items.length; i++) + this._items[i] = items[i]; + }; + Pool.prototype.clear = function () { + this._items.length = 0; + }; + return Pool; + }()); + spine.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; + }; + return Vector2; + }()); + spine.Vector2 = Vector2; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Attachment = (function () { + function Attachment(name) { + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return Attachment; + }()); + spine.Attachment = Attachment; + var VertexAttachment = (function (_super) { + __extends(VertexAttachment, _super); + function VertexAttachment(name) { + _super.call(this, name); + this.worldVerticesLength = 0; + } + VertexAttachment.prototype.computeWorldVertices = function (slot, worldVertices) { + this.computeWorldVerticesWith(slot, 0, this.worldVerticesLength, worldVertices, 0); + }; + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + VertexAttachment.prototype.computeWorldVerticesWith = function (slot, start, count, worldVertices, offset) { + count += offset; + var skeleton = slot.bone.skeleton; + var x = skeleton.x, y = skeleton.y; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices; + var bones = this.bones; + if (bones == null) { + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v_1 = start, w = offset; w < count; v_1 += 2, w += 2) { + 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 += 2) { + var wx = x, wy = y; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * 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 += 2) { + var wx = x, wy = y; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + }; + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + VertexAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment; + }; + return VertexAttachment; + }(Attachment)); + spine.VertexAttachment = VertexAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + (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"; + })(spine.AttachmentType || (spine.AttachmentType = {})); + var AttachmentType = spine.AttachmentType; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var BoundingBoxAttachment = (function (_super) { + __extends(BoundingBoxAttachment, _super); + function BoundingBoxAttachment(name) { + _super.call(this, name); + } + return BoundingBoxAttachment; + }(spine.VertexAttachment)); + spine.BoundingBoxAttachment = BoundingBoxAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var MeshAttachment = (function (_super) { + __extends(MeshAttachment, _super); + function MeshAttachment(name) { + _super.call(this, name); + this.color = new spine.Color(1, 1, 1, 1); + this.inheritDeform = false; + this.tempColor = new spine.Color(0, 0, 0, 0); + } + MeshAttachment.prototype.updateUVs = function () { + var regionUVs = this.regionUVs; + var verticesLength = regionUVs.length; + var worldVerticesLength = (verticesLength >> 1) * 8; + if (this.worldVertices == null || this.worldVertices.length != worldVerticesLength) + this.worldVertices = spine.Utils.newFloatArray(worldVerticesLength); + var u = 0, v = 0, width = 0, height = 0; + if (this.region == null) { + u = v = 0; + width = height = 1; + } + else { + u = this.region.u; + v = this.region.v; + width = this.region.u2 - u; + height = this.region.v2 - v; + } + if (this.region.rotate) { + for (var i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i + 1] * width; + this.worldVertices[w + 1] = v + height - regionUVs[i] * height; + } + } + else { + for (var i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i] * width; + this.worldVertices[w + 1] = v + regionUVs[i + 1] * height; + } + } + }; + /** @return The updated world vertices. */ + MeshAttachment.prototype.updateWorldVertices = function (slot, premultipliedAlpha) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color, slotColor = slot.color, meshColor = this.color; + var alpha = skeletonColor.a * slotColor.a * meshColor.a; + var multiplier = premultipliedAlpha ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * meshColor.r * multiplier, skeletonColor.g * slotColor.g * meshColor.g * multiplier, skeletonColor.b * slotColor.b * meshColor.b * multiplier, alpha); + var x = skeleton.x, y = skeleton.y; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices, worldVertices = this.worldVertices; + var bones = this.bones; + if (bones == null) { + var verticesLength = vertices.length; + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v = 0, w = 0; v < verticesLength; v += 2, w += 8) { + var vx = vertices[v], vy = vertices[v + 1]; + worldVertices[w] = vx * a + vy * b + x; + worldVertices[w + 1] = vx * c + vy * d + y; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + return worldVertices; + } + var skeletonBones = skeleton.bones; + if (deformArray.length == 0) { + for (var w = 0, v = 0, b = 0, n = bones.length; v < n; w += 8) { + var wx = x, wy = y; + var nn = bones[v++] + v; + for (; v < nn; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + else { + var deform = deformArray; + for (var w = 0, v = 0, b = 0, f = 0, n = bones.length; v < n; w += 8) { + var wx = x, wy = y; + var nn = bones[v++] + v; + for (; v < nn; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + return worldVertices; + }; + MeshAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment || (this.inheritDeform && this._parentMesh == sourceAttachment); + }; + MeshAttachment.prototype.getParentMesh = function () { + return this._parentMesh; + }; + /** @param parentMesh May be null. */ + MeshAttachment.prototype.setParentMesh = function (parentMesh) { + this._parentMesh = parentMesh; + if (parentMesh != null) { + this.bones = parentMesh.bones; + this.vertices = parentMesh.vertices; + this.regionUVs = parentMesh.regionUVs; + this.triangles = parentMesh.triangles; + this.hullLength = parentMesh.hullLength; + } + }; + return MeshAttachment; + }(spine.VertexAttachment)); + spine.MeshAttachment = MeshAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var PathAttachment = (function (_super) { + __extends(PathAttachment, _super); + function PathAttachment(name) { + _super.call(this, name); + this.closed = false; + this.constantSpeed = false; + } + return PathAttachment; + }(spine.VertexAttachment)); + spine.PathAttachment = PathAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var RegionAttachment = (function (_super) { + __extends(RegionAttachment, _super); + function RegionAttachment(name) { + _super.call(this, name); + this.x = 0; + this.y = 0; + this.scaleX = 1; + this.scaleY = 1; + this.rotation = 0; + this.width = 0; + this.height = 0; + this.color = new spine.Color(1, 1, 1, 1); + this.offset = spine.Utils.newFloatArray(8); + this.vertices = spine.Utils.newFloatArray(8 * 4); + this.tempColor = new spine.Color(1, 1, 1, 1); + } + RegionAttachment.prototype.setRegion = function (region) { + var vertices = this.vertices; + if (region.rotate) { + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v2; + vertices[RegionAttachment.U3] = region.u; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v; + vertices[RegionAttachment.U1] = region.u2; + vertices[RegionAttachment.V1] = region.v2; + } + else { + vertices[RegionAttachment.U1] = region.u; + vertices[RegionAttachment.V1] = region.v2; + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v; + vertices[RegionAttachment.U3] = region.u2; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v2; + } + }; + 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.updateWorldVertices = function (slot, premultipliedAlpha) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color; + var slotColor = slot.color; + var regionColor = this.color; + var alpha = skeletonColor.a * slotColor.a * regionColor.a; + var multiplier = premultipliedAlpha ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha); + var vertices = this.vertices; + var offset = this.offset; + var bone = slot.bone; + var x = skeleton.x + bone.worldX, y = skeleton.y + bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var offsetX = 0, offsetY = 0; + offsetX = offset[RegionAttachment.OX1]; + offsetY = offset[RegionAttachment.OY1]; + vertices[RegionAttachment.X1] = offsetX * a + offsetY * b + x; // br + vertices[RegionAttachment.Y1] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C1R] = color.r; + vertices[RegionAttachment.C1G] = color.g; + vertices[RegionAttachment.C1B] = color.b; + vertices[RegionAttachment.C1A] = color.a; + offsetX = offset[RegionAttachment.OX2]; + offsetY = offset[RegionAttachment.OY2]; + vertices[RegionAttachment.X2] = offsetX * a + offsetY * b + x; // bl + vertices[RegionAttachment.Y2] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C2R] = color.r; + vertices[RegionAttachment.C2G] = color.g; + vertices[RegionAttachment.C2B] = color.b; + vertices[RegionAttachment.C2A] = color.a; + offsetX = offset[RegionAttachment.OX3]; + offsetY = offset[RegionAttachment.OY3]; + vertices[RegionAttachment.X3] = offsetX * a + offsetY * b + x; // ul + vertices[RegionAttachment.Y3] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C3R] = color.r; + vertices[RegionAttachment.C3G] = color.g; + vertices[RegionAttachment.C3B] = color.b; + vertices[RegionAttachment.C3A] = color.a; + offsetX = offset[RegionAttachment.OX4]; + offsetY = offset[RegionAttachment.OY4]; + vertices[RegionAttachment.X4] = offsetX * a + offsetY * b + x; // ur + vertices[RegionAttachment.Y4] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C4R] = color.r; + vertices[RegionAttachment.C4G] = color.g; + vertices[RegionAttachment.C4B] = color.b; + vertices[RegionAttachment.C4A] = color.a; + return vertices; + }; + 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; + }(spine.Attachment)); + spine.RegionAttachment = RegionAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TextureRegion = (function () { + function TextureRegion() { + this.u = 0; + this.v = 0; + this.u2 = 0; + this.v2 = 0; + this.width = 0; + this.height = 0; + this.rotate = false; + this.offsetX = 0; + this.offsetY = 0; + this.originalWidth = 0; + this.originalHeight = 0; + } + return TextureRegion; + }()); + spine.TextureRegion = TextureRegion; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var AssetManager = (function () { + function AssetManager(gl) { + this._assets = {}; + this._errors = {}; + this._toLoad = 0; + this._loaded = 0; + this._gl = gl; + } + AssetManager.prototype.loadText = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + this._toLoad++; + var request = new XMLHttpRequest(); + request.onreadystatechange = function () { + if (request.readyState == XMLHttpRequest.DONE) { + if (request.status >= 200 && request.status < 300) { + if (success) + success(path, request.responseText); + _this._assets[path] = request.responseText; + } + else { + if (error) + error(path, "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText); + _this._errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + } + _this._toLoad--; + _this._loaded++; + } + }; + request.open("GET", path, true); + request.send(); + }; + AssetManager.prototype.loadTexture = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + this._toLoad++; + var img = new Image(); + img.src = path; + img.onload = function (ev) { + if (success) + success(path, img); + var texture = new webgl.Texture(_this._gl, img); + _this._assets[path] = texture; + _this._toLoad--; + _this._loaded++; + }; + img.onerror = function (ev) { + if (error) + error(path, "Couldn't load image " + path); + _this._errors[path] = "Couldn't load image " + path; + _this._toLoad--; + _this._loaded++; + }; + }; + AssetManager.prototype.get = function (path) { + return this._assets[path]; + }; + AssetManager.prototype.remove = function (path) { + var asset = this._assets[path]; + if (asset instanceof webgl.Texture) { + asset.dispose(); + } + this._assets[path] = null; + }; + AssetManager.prototype.removeAll = function () { + for (var key in this._assets) { + var asset = this._assets[key]; + if (asset instanceof webgl.Texture) + asset.dispose(); + } + this._assets = {}; + }; + AssetManager.prototype.isLoadingComplete = function () { + return this._toLoad == 0; + }; + AssetManager.prototype.toLoad = function () { + return this._toLoad; + }; + AssetManager.prototype.loaded = function () { + return this._loaded; + }; + AssetManager.prototype.dispose = function () { + this.removeAll(); + }; + AssetManager.prototype.hasErrors = function () { + return Object.keys(this._errors).length > 0; + }; + AssetManager.prototype.errors = function () { + return this._errors; + }; + return AssetManager; + }()); + webgl.AssetManager = AssetManager; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + webgl.M00 = 0; + webgl.M01 = 4; + webgl.M02 = 8; + webgl.M03 = 12; + webgl.M10 = 1; + webgl.M11 = 5; + webgl.M12 = 9; + webgl.M13 = 13; + webgl.M20 = 2; + webgl.M21 = 6; + webgl.M22 = 10; + webgl.M23 = 14; + webgl.M30 = 3; + webgl.M31 = 7; + webgl.M32 = 11; + webgl.M33 = 15; + var Matrix4 = (function () { + function Matrix4() { + this.temp = new Float32Array(16); + this.values = new Float32Array(16); + var v = this.values; + v[webgl.M00] = 1; + v[webgl.M11] = 1; + v[webgl.M22] = 1; + v[webgl.M33] = 1; + } + Matrix4.prototype.set = function (values) { + this.values.set(values); + return this; + }; + Matrix4.prototype.transpose = function () { + var t = this.temp; + var v = this.values; + t[webgl.M00] = v[webgl.M00]; + t[webgl.M01] = v[webgl.M10]; + t[webgl.M02] = v[webgl.M20]; + t[webgl.M03] = v[webgl.M30]; + t[webgl.M10] = v[webgl.M01]; + t[webgl.M11] = v[webgl.M11]; + t[webgl.M12] = v[webgl.M21]; + t[webgl.M13] = v[webgl.M31]; + t[webgl.M20] = v[webgl.M02]; + t[webgl.M21] = v[webgl.M12]; + t[webgl.M22] = v[webgl.M22]; + t[webgl.M23] = v[webgl.M32]; + t[webgl.M30] = v[webgl.M03]; + t[webgl.M31] = v[webgl.M13]; + t[webgl.M32] = v[webgl.M23]; + t[webgl.M33] = v[webgl.M33]; + return this.set(t); + }; + Matrix4.prototype.identity = function () { + var v = this.values; + v[webgl.M00] = 1; + v[webgl.M01] = 0; + v[webgl.M02] = 0; + v[webgl.M03] = 0; + v[webgl.M10] = 0; + v[webgl.M11] = 1; + v[webgl.M12] = 0; + v[webgl.M13] = 0; + v[webgl.M20] = 0; + v[webgl.M21] = 0; + v[webgl.M22] = 1; + v[webgl.M23] = 0; + v[webgl.M30] = 0; + v[webgl.M31] = 0; + v[webgl.M32] = 0; + v[webgl.M33] = 1; + return this; + }; + Matrix4.prototype.invert = function () { + var v = this.values; + var t = this.temp; + var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03] + + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03] + - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13] + - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13] + + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23] + + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23] + - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33] + - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + if (l_det == 0) + throw new Error("non-invertible matrix"); + var inv_det = 1.0 / l_det; + t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32] + - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32] + + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32] + - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33]; + t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22] + + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23]; + t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32] + + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32] + - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32] + + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33]; + t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22] + - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23]; + t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31] + - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33]; + t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31] + + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33]; + t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31] + - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33]; + t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21] + + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23]; + t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31] + + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32]; + t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31] + - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32]; + t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31] + + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32]; + t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21] + - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22]; + v[webgl.M00] = t[webgl.M00] * inv_det; + v[webgl.M01] = t[webgl.M01] * inv_det; + v[webgl.M02] = t[webgl.M02] * inv_det; + v[webgl.M03] = t[webgl.M03] * inv_det; + v[webgl.M10] = t[webgl.M10] * inv_det; + v[webgl.M11] = t[webgl.M11] * inv_det; + v[webgl.M12] = t[webgl.M12] * inv_det; + v[webgl.M13] = t[webgl.M13] * inv_det; + v[webgl.M20] = t[webgl.M20] * inv_det; + v[webgl.M21] = t[webgl.M21] * inv_det; + v[webgl.M22] = t[webgl.M22] * inv_det; + v[webgl.M23] = t[webgl.M23] * inv_det; + v[webgl.M30] = t[webgl.M30] * inv_det; + v[webgl.M31] = t[webgl.M31] * inv_det; + v[webgl.M32] = t[webgl.M32] * inv_det; + v[webgl.M33] = t[webgl.M33] * inv_det; + return this; + }; + Matrix4.prototype.determinant = function () { + var v = this.values; + return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03] + + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03] + - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13] + - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13] + + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23] + + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23] + - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33] + - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + }; + Matrix4.prototype.translate = function (x, y, z) { + var v = this.values; + v[webgl.M03] += x; + v[webgl.M13] += y; + v[webgl.M23] += z; + return this; + }; + Matrix4.prototype.copy = function () { + return new Matrix4().set(this.values); + }; + Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) { + this.identity(); + var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0)); + var l_a1 = (far + near) / (near - far); + var l_a2 = (2 * far * near) / (near - far); + var v = this.values; + v[webgl.M00] = l_fd / aspectRatio; + v[webgl.M10] = 0; + v[webgl.M20] = 0; + v[webgl.M30] = 0; + v[webgl.M01] = 0; + v[webgl.M11] = l_fd; + v[webgl.M21] = 0; + v[webgl.M31] = 0; + v[webgl.M02] = 0; + v[webgl.M12] = 0; + v[webgl.M22] = l_a1; + v[webgl.M32] = -1; + v[webgl.M03] = 0; + v[webgl.M13] = 0; + v[webgl.M23] = l_a2; + v[webgl.M33] = 0; + return this; + }; + Matrix4.prototype.ortho2d = function (x, y, width, height) { + return this.ortho(x, x + width, y, y + height, 0, 1); + }; + Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) { + this.identity(); + var x_orth = 2 / (right - left); + var y_orth = 2 / (top - bottom); + var z_orth = -2 / (far - near); + var tx = -(right + left) / (right - left); + var ty = -(top + bottom) / (top - bottom); + var tz = -(far + near) / (far - near); + var v = this.values; + v[webgl.M00] = x_orth; + v[webgl.M10] = 0; + v[webgl.M20] = 0; + v[webgl.M30] = 0; + v[webgl.M01] = 0; + v[webgl.M11] = y_orth; + v[webgl.M21] = 0; + v[webgl.M31] = 0; + v[webgl.M02] = 0; + v[webgl.M12] = 0; + v[webgl.M22] = z_orth; + v[webgl.M32] = 0; + v[webgl.M03] = tx; + v[webgl.M13] = ty; + v[webgl.M23] = tz; + v[webgl.M33] = 1; + return this; + }; + Matrix4.prototype.multiply = function (matrix) { + var t = this.temp; + var v = this.values; + var m = matrix.values; + t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30]; + t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31]; + t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32]; + t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33]; + t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30]; + t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31]; + t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32]; + t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33]; + t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30]; + t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31]; + t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32]; + t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33]; + t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30]; + t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31]; + t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32]; + t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33]; + return this.set(this.temp); + }; + Matrix4.prototype.multiplyLeft = function (matrix) { + var t = this.temp; + var v = this.values; + var m = matrix.values; + t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30]; + t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31]; + t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32]; + t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33]; + t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30]; + t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31]; + t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32]; + t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33]; + t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30]; + t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31]; + t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32]; + t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33]; + t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30]; + t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31]; + t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32]; + t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33]; + return this.set(this.temp); + }; + return Matrix4; + }()); + webgl.Matrix4 = Matrix4; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Mesh = (function () { + function Mesh(gl, _attributes, maxVertices, maxIndices) { + this._attributes = _attributes; + this._verticesLength = 0; + this._dirtyVertices = false; + this._indicesLength = 0; + this._dirtyIndices = false; + this._elementsPerVertex = 0; + this._gl = gl; + this._elementsPerVertex = 0; + for (var i = 0; i < _attributes.length; i++) { + this._elementsPerVertex += _attributes[i].numElements; + } + this._vertices = new Float32Array(maxVertices * this._elementsPerVertex); + this._indices = new Uint16Array(maxIndices); + } + Mesh.prototype.attributes = function () { return this._attributes; }; + Mesh.prototype.maxVertices = function () { return this._vertices.length / this._elementsPerVertex; }; + Mesh.prototype.numVertices = function () { return this._verticesLength / this._elementsPerVertex; }; + Mesh.prototype.setVerticesLength = function (length) { + this._dirtyVertices = true; + this._verticesLength = length; + }; + Mesh.prototype.vertices = function () { return this._vertices; }; + Mesh.prototype.maxIndices = function () { return this._indices.length; }; + Mesh.prototype.numIndices = function () { return this._indicesLength; }; + Mesh.prototype.setIndicesLength = function (length) { + this._dirtyIndices = true; + this._indicesLength = length; + }; + Mesh.prototype.indices = function () { return this._indices; }; + ; + Mesh.prototype.setVertices = function (vertices) { + this._dirtyVertices = true; + if (vertices.length > this._vertices.length) + throw Error("Mesh can't store more than " + this.maxVertices() + " vertices"); + this._vertices.set(vertices, 0); + this._verticesLength = vertices.length; + }; + Mesh.prototype.setIndices = function (indices) { + this._dirtyIndices = true; + if (indices.length > this._indices.length) + throw Error("Mesh can't store more than " + this.maxIndices() + " indices"); + this._indices.set(indices, 0); + this._indicesLength = indices.length; + }; + Mesh.prototype.draw = function (shader, primitiveType) { + this.drawWithOffset(shader, primitiveType, 0, this._indicesLength > 0 ? this._indicesLength : this._verticesLength); + }; + Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) { + var gl = this._gl; + if (this._dirtyVertices || this._dirtyIndices) + this.update(); + this.bind(shader); + if (this._indicesLength > 0) + gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2); + else + gl.drawArrays(primitiveType, offset, count); + this.unbind(shader); + }; + Mesh.prototype.bind = function (shader) { + var gl = this._gl; + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + var offset = 0; + for (var i = 0; i < this._attributes.length; i++) { + var attrib = this._attributes[i]; + var location_1 = shader.getAttributeLocation(attrib.name); + gl.enableVertexAttribArray(location_1); + gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this._elementsPerVertex * 4, offset * 4); + offset += attrib.numElements; + } + if (this._indicesLength > 0) + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + }; + Mesh.prototype.unbind = function (shader) { + var gl = this._gl; + for (var i = 0; i < this._attributes.length; i++) { + var attrib = this._attributes[i]; + var location_2 = shader.getAttributeLocation(attrib.name); + gl.disableVertexAttribArray(location_2); + } + gl.bindBuffer(gl.ARRAY_BUFFER, null); + if (this._indicesLength > 0) + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null); + }; + Mesh.prototype.update = function () { + var gl = this._gl; + if (this._dirtyVertices) { + if (!this._verticesBuffer) { + this._verticesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + gl.bufferData(gl.ARRAY_BUFFER, this._vertices.subarray(0, this._verticesLength), gl.STATIC_DRAW); + this._dirtyVertices = false; + } + if (this._dirtyIndices) { + if (!this._indicesBuffer) { + this._indicesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this._indices.subarray(0, this._indicesLength), gl.STATIC_DRAW); + this._dirtyIndices = false; + } + }; + Mesh.prototype.dispose = function () { + var gl = this._gl; + gl.deleteBuffer(this._verticesBuffer); + gl.deleteBuffer(this._indicesBuffer); + }; + return Mesh; + }()); + webgl.Mesh = Mesh; + var VertexAttribute = (function () { + function VertexAttribute(name, type, numElements) { + this.name = name; + this.type = type; + this.numElements = numElements; + } + return VertexAttribute; + }()); + webgl.VertexAttribute = VertexAttribute; + var Position2Attribute = (function (_super) { + __extends(Position2Attribute, _super); + function Position2Attribute() { + _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2); + } + return Position2Attribute; + }(VertexAttribute)); + webgl.Position2Attribute = Position2Attribute; + var Position3Attribute = (function (_super) { + __extends(Position3Attribute, _super); + function Position3Attribute() { + _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3); + } + return Position3Attribute; + }(VertexAttribute)); + webgl.Position3Attribute = Position3Attribute; + var TexCoordAttribute = (function (_super) { + __extends(TexCoordAttribute, _super); + function TexCoordAttribute(unit) { + if (unit === void 0) { unit = 0; } + _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? "" : unit), VertexAttributeType.Float, 2); + } + return TexCoordAttribute; + }(VertexAttribute)); + webgl.TexCoordAttribute = TexCoordAttribute; + var ColorAttribute = (function (_super) { + __extends(ColorAttribute, _super); + function ColorAttribute() { + _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4); + } + return ColorAttribute; + }(VertexAttribute)); + webgl.ColorAttribute = ColorAttribute; + (function (VertexAttributeType) { + VertexAttributeType[VertexAttributeType["Float"] = 0] = "Float"; + })(webgl.VertexAttributeType || (webgl.VertexAttributeType = {})); + var VertexAttributeType = webgl.VertexAttributeType; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var PolygonBatcher = (function () { + function PolygonBatcher(gl, maxVertices) { + if (maxVertices === void 0) { maxVertices = 10920; } + this._drawing = false; + this._shader = null; + this._lastTexture = null; + this._verticesLength = 0; + this._indicesLength = 0; + this._srcBlend = WebGLRenderingContext.SRC_ALPHA; + this._dstBlend = WebGLRenderingContext.ONE_MINUS_SRC_ALPHA; + if (maxVertices > 10920) + throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices); + this._gl = gl; + this._mesh = new webgl.Mesh(gl, [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()], maxVertices, maxVertices * 3); + } + PolygonBatcher.prototype.begin = function (shader) { + var gl = this._gl; + if (this._drawing) + throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()"); + this._drawCalls = 0; + this._shader = shader; + this._lastTexture = null; + this._drawing = true; + gl.enable(gl.BLEND); + gl.blendFunc(this._srcBlend, this._dstBlend); + }; + PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) { + var gl = this._gl; + this._srcBlend = srcBlend; + this._dstBlend = dstBlend; + if (this._drawing) { + this.flush(); + gl.blendFunc(this._srcBlend, this._dstBlend); + } + }; + PolygonBatcher.prototype.draw = function (texture, vertices, indices) { + if (texture != this._lastTexture) { + this.flush(); + this._lastTexture = texture; + texture.bind(); + } + else if (this._verticesLength + vertices.length > this._mesh.vertices().length || + this._indicesLength + indices.length > this._mesh.indices().length) { + this.flush(); + } + var indexStart = this._mesh.numVertices(); + this._mesh.vertices().set(vertices, this._verticesLength); + this._verticesLength += vertices.length; + this._mesh.setVerticesLength(this._verticesLength); + var indicesArray = this._mesh.indices(); + for (var i = this._indicesLength, j = 0; j < indices.length; i++, j++) + indicesArray[i] = indices[j] + indexStart; + this._indicesLength += indices.length; + this._mesh.setIndicesLength(this._indicesLength); + }; + PolygonBatcher.prototype.flush = function () { + var gl = this._gl; + if (this._verticesLength == 0) + return; + this._mesh.draw(this._shader, gl.TRIANGLES); + this._verticesLength = 0; + this._indicesLength = 0; + this._mesh.setVerticesLength(0); + this._mesh.setIndicesLength(0); + this._drawCalls++; + }; + PolygonBatcher.prototype.end = function () { + var gl = this._gl; + if (!this._drawing) + throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()"); + if (this._verticesLength > 0 || this._indicesLength > 0) + this.flush(); + this._shader = null; + this._lastTexture = null; + this._drawing = false; + gl.disable(gl.BLEND); + }; + PolygonBatcher.prototype.drawCalls = function () { return this._drawCalls; }; + return PolygonBatcher; + }()); + webgl.PolygonBatcher = PolygonBatcher; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Shader = (function () { + function Shader(gl, _vertexShader, _fragmentShader) { + this._vertexShader = _vertexShader; + this._fragmentShader = _fragmentShader; + this._vs = null; + this._fs = null; + this._program = null; + this._tmp2x2 = new Float32Array(2 * 2); + this._tmp3x3 = new Float32Array(3 * 3); + this._tmp4x4 = new Float32Array(4 * 4); + this._gl = gl; + this.compile(); + } + Shader.prototype.program = function () { return this._program; }; + Shader.prototype.vertexShader = function () { return this._vertexShader; }; + Shader.prototype.fragmentShader = function () { return this._fragmentShader; }; + Shader.prototype.compile = function () { + var gl = this._gl; + try { + this._vs = this.compileShader(gl.VERTEX_SHADER, this._vertexShader); + this._fs = this.compileShader(gl.FRAGMENT_SHADER, this._fragmentShader); + this._program = this.compileProgram(this._vs, this._fs); + } + catch (e) { + this.dispose(); + throw e; + } + }; + Shader.prototype.compileShader = function (type, source) { + var gl = this._gl; + var shader = gl.createShader(type); + gl.shaderSource(shader, source); + gl.compileShader(shader); + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + var error = "Couldn't compile shader: " + gl.getShaderInfoLog(shader); + gl.deleteShader(shader); + throw new Error(error); + } + return shader; + }; + Shader.prototype.compileProgram = function (vs, fs) { + var gl = this._gl; + var program = gl.createProgram(); + gl.attachShader(program, vs); + gl.attachShader(program, fs); + gl.linkProgram(program); + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + var error = "Couldn't compile shader program: " + gl.getProgramInfoLog(program); + gl.deleteProgram(program); + throw new Error(error); + } + return program; + }; + Shader.prototype.bind = function () { + this._gl.useProgram(this._program); + }; + Shader.prototype.unbind = function () { + this._gl.useProgram(null); + }; + Shader.prototype.setUniformi = function (uniform, value) { + this._gl.uniform1i(this.getUniformLocation(uniform), value); + }; + Shader.prototype.setUniformf = function (uniform, value) { + this._gl.uniform1f(this.getUniformLocation(uniform), value); + }; + Shader.prototype.setUniform2f = function (uniform, value, value2) { + this._gl.uniform2f(this.getUniformLocation(uniform), value, value2); + }; + Shader.prototype.setUniform3f = function (uniform, value, value2, value3) { + this._gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3); + }; + Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) { + this._gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4); + }; + Shader.prototype.setUniform2x2f = function (uniform, value) { + var gl = this._gl; + this._tmp2x2.set(value); + gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this._tmp2x2); + }; + Shader.prototype.setUniform3x3f = function (uniform, value) { + var gl = this._gl; + this._tmp3x3.set(value); + gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this._tmp3x3); + }; + Shader.prototype.setUniform4x4f = function (uniform, value) { + var gl = this._gl; + this._tmp4x4.set(value); + gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this._tmp4x4); + }; + Shader.prototype.getUniformLocation = function (uniform) { + var gl = this._gl; + var location = gl.getUniformLocation(this._program, uniform); + if (!location) + throw new Error("Couldn't find location for uniform " + uniform); + return location; + }; + Shader.prototype.getAttributeLocation = function (attribute) { + var gl = this._gl; + var location = gl.getAttribLocation(this._program, attribute); + if (location == -1) + throw new Error("Couldn't find location for attribute " + attribute); + return location; + }; + Shader.prototype.dispose = function () { + var gl = this._gl; + if (this._vs) { + gl.deleteShader(this._vs); + this._vs = null; + } + if (this._fs) { + gl.deleteShader(this._fs); + this._fs = null; + } + if (this._program) { + gl.deleteProgram(this._program); + this._program = null; + } + }; + Shader.newColoredTextured = function (gl) { + var vs = "\n\t\t\t\tattribute vec4 " + Shader.POSITION + ";\n\t\t\t\tattribute vec4 " + Shader.COLOR + ";\n\t\t\t\tattribute vec2 " + Shader.TEXCOORDS + ";\n\t\t\t\tuniform mat4 " + Shader.MVP_MATRIX + ";\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = " + Shader.COLOR + ";\n\t\t\t\t\tv_texCoords = " + Shader.TEXCOORDS + ";\n\t\t\t\t\tgl_Position = " + Shader.MVP_MATRIX + " * " + Shader.POSITION + ";\n\t\t\t\t}\n\t\t\t"; + var fs = "\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t"; + return new Shader(gl, vs, fs); + }; + Shader.newColored = function (gl) { + var vs = "\n\t\t\t\tattribute vec4 " + Shader.POSITION + ";\n\t\t\t\tattribute vec4 " + Shader.COLOR + ";\n\t\t\t\tuniform mat4 " + Shader.MVP_MATRIX + ";\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = " + Shader.COLOR + ";\n\t\t\t\t\tgl_Position = " + Shader.MVP_MATRIX + " * " + Shader.POSITION + ";\n\t\t\t\t}\n\t\t\t"; + var fs = "\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t"; + return new Shader(gl, vs, fs); + }; + Shader.MVP_MATRIX = "u_projTrans"; + Shader.POSITION = "a_position"; + Shader.COLOR = "a_color"; + Shader.TEXCOORDS = "a_texCoords"; + Shader.SAMPLER = "u_texture"; + return Shader; + }()); + webgl.Shader = Shader; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var SkeletonRenderer = (function () { + function SkeletonRenderer(gl) { + this.premultipliedAlpha = false; + this._gl = gl; + } + SkeletonRenderer.prototype.draw = function (batcher, skeleton) { + var premultipliedAlpha = this.premultipliedAlpha; + var blendMode = null; + var vertices = null; + var triangles = null; + var drawOrder = skeleton.drawOrder; + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = drawOrder[i]; + var attachment = slot.getAttachment(); + var texture = null; + if (attachment instanceof spine.RegionAttachment) { + var region = attachment; + vertices = region.updateWorldVertices(slot, premultipliedAlpha); + triangles = SkeletonRenderer.QUAD_TRIANGLES; + texture = region.region.renderObject.texture; + } + else if (attachment instanceof spine.MeshAttachment) { + var mesh = attachment; + vertices = mesh.updateWorldVertices(slot, premultipliedAlpha); + triangles = mesh.triangles; + texture = mesh.region.renderObject.texture; + } + if (texture != null) { + var slotBlendMode = slot.data.blendMode; + if (slotBlendMode != blendMode) { + blendMode = slotBlendMode; + batcher.setBlendMode(webgl.getSourceGLBlendMode(this._gl, blendMode, premultipliedAlpha), webgl.getDestGLBlendMode(this._gl, blendMode)); + } + batcher.draw(texture, vertices, triangles); + } + } + }; + SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0]; + return SkeletonRenderer; + }()); + webgl.SkeletonRenderer = SkeletonRenderer; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Texture = (function () { + function Texture(gl, image, useMipMaps) { + if (useMipMaps === void 0) { useMipMaps = false; } + this._boundUnit = 0; + this._gl = gl; + this._texture = gl.createTexture(); + this._image = image; + this.update(useMipMaps); + } + Texture.prototype.getImage = function () { + return this._image; + }; + Texture.prototype.setFilters = function (minFilter, magFilter) { + var gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter); + }; + Texture.prototype.setWraps = function (uWrap, vWrap) { + var gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap); + }; + Texture.prototype.update = function (useMipMaps) { + var gl = this._gl; + this.bind(); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + if (useMipMaps) + gl.generateMipmap(gl.TEXTURE_2D); + }; + Texture.prototype.bind = function (unit) { + if (unit === void 0) { unit = 0; } + var gl = this._gl; + this._boundUnit = unit; + gl.activeTexture(gl.TEXTURE0 + unit); + gl.bindTexture(gl.TEXTURE_2D, this._texture); + }; + Texture.prototype.unbind = function () { + var gl = this._gl; + gl.activeTexture(gl.TEXTURE0 + this._boundUnit); + gl.bindTexture(gl.TEXTURE_2D, null); + }; + Texture.prototype.dispose = function () { + var gl = this._gl; + gl.deleteTexture(this._texture); + }; + 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; + }()); + webgl.Texture = Texture; + (function (TextureFilter) { + TextureFilter[TextureFilter["Nearest"] = WebGLRenderingContext.NEAREST] = "Nearest"; + TextureFilter[TextureFilter["Linear"] = WebGLRenderingContext.LINEAR] = "Linear"; + TextureFilter[TextureFilter["MipMap"] = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR] = "MipMap"; + TextureFilter[TextureFilter["MipMapNearestNearest"] = WebGLRenderingContext.NEAREST_MIPMAP_NEAREST] = "MipMapNearestNearest"; + TextureFilter[TextureFilter["MipMapLinearNearest"] = WebGLRenderingContext.LINEAR_MIPMAP_NEAREST] = "MipMapLinearNearest"; + TextureFilter[TextureFilter["MipMapNearestLinear"] = WebGLRenderingContext.NEAREST_MIPMAP_LINEAR] = "MipMapNearestLinear"; + TextureFilter[TextureFilter["MipMapLinearLinear"] = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR] = "MipMapLinearLinear"; + })(webgl.TextureFilter || (webgl.TextureFilter = {})); + var TextureFilter = webgl.TextureFilter; + (function (TextureWrap) { + TextureWrap[TextureWrap["MirroredRepeat"] = WebGLRenderingContext.MIRRORED_REPEAT] = "MirroredRepeat"; + TextureWrap[TextureWrap["ClampToEdge"] = WebGLRenderingContext.CLAMP_TO_EDGE] = "ClampToEdge"; + TextureWrap[TextureWrap["Repeat"] = WebGLRenderingContext.REPEAT] = "Repeat"; + })(webgl.TextureWrap || (webgl.TextureWrap = {})); + var TextureWrap = webgl.TextureWrap; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var TextureAtlas = (function () { + function TextureAtlas(atlasText, textureLoader) { + this.pages = new Array(); + this.regions = new Array(); + this.load(atlasText, textureLoader); + } + TextureAtlas.prototype.load = function (atlasText, textureLoader) { + if (textureLoader == null) + throw new Error("textureLoader cannot be null."); + var reader = new TextureAtlasReader(atlasText); + var tuple = new Array(4); + var page = null; + while (true) { + var line = reader.readLine(); + if (line == null) + break; + 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); + } + // page.format = Format[tuple[0]]; we don't need format in WebGL + reader.readTuple(tuple); + page.minFilter = webgl.Texture.filterFromString(tuple[0]); + page.magFilter = webgl.Texture.filterFromString(tuple[1]); + var direction = reader.readValue(); + page.uWrap = webgl.TextureWrap.ClampToEdge; + page.vWrap = webgl.TextureWrap.ClampToEdge; + if (direction == "x") + page.uWrap = webgl.TextureWrap.Repeat; + else if (direction == "y") + page.vWrap = webgl.TextureWrap.Repeat; + else if (direction == "xy") + page.uWrap = page.vWrap = webgl.TextureWrap.Repeat; + page.texture = textureLoader(line); + page.texture.setFilters(page.minFilter, page.magFilter); + page.texture.setWraps(page.uWrap, page.vWrap); + page.width = page.texture.getImage().width; + page.height = page.texture.getImage().height; + this.pages.push(page); + } + else { + var region = new TextureAtlasRegion(); + region.name = line; + region.page = page; + region.rotate = reader.readValue() == "true"; + 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]); + region.u = x / page.width; + region.v = y / page.height; + if (region.rotate) { + region.u2 = (x + height) / page.width; + region.v2 = (y + width) / page.height; + } + else { + region.u2 = (x + width) / page.width; + region.v2 = (y + height) / page.height; + } + region.x = x; + region.y = y; + region.width = Math.abs(width); + region.height = Math.abs(height); + if (reader.readTuple(tuple) == 4) { + // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + if (reader.readTuple(tuple) == 4) { + //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + reader.readTuple(tuple); + } + } + region.originalWidth = parseInt(tuple[0]); + region.originalHeight = parseInt(tuple[1]); + reader.readTuple(tuple); + region.offsetX = parseInt(tuple[0]); + region.offsetY = parseInt(tuple[1]); + region.index = parseInt(reader.readValue()); + region.texture = page.texture; + this.regions.push(region); + } + } + }; + 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].texture.dispose(); + } + }; + return TextureAtlas; + }()); + webgl.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() { + } + return TextureAtlasPage; + }()); + webgl.TextureAtlasPage = TextureAtlasPage; + var TextureAtlasRegion = (function (_super) { + __extends(TextureAtlasRegion, _super); + function TextureAtlasRegion() { + _super.apply(this, arguments); + } + return TextureAtlasRegion; + }(spine.TextureRegion)); + webgl.TextureAtlasRegion = TextureAtlasRegion; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var TextureAtlasAttachmentLoader = (function () { + function TextureAtlasAttachmentLoader(atlas) { + this.atlas = atlas; + } + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) + throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")"); + var attachment = new spine.RegionAttachment(name); + attachment.setRegion(region); + attachment.region = region; + return attachment; + }; + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) + throw new Error("Region not found in atlas: " + path + " (mesh attachment: " + name + ")"); + var attachment = new spine.MeshAttachment(name); + attachment.region = region; + return attachment; + }; + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) { + return new spine.BoundingBoxAttachment(name); + }; + /** @return May be null to not load an attachment */ + TextureAtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) { + return new spine.PathAttachment(name); + }; + return TextureAtlasAttachmentLoader; + }()); + webgl.TextureAtlasAttachmentLoader = TextureAtlasAttachmentLoader; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Vector3 = (function () { + function Vector3() { + this.x = 0; + this.y = 0; + this.z = 0; + } + Vector3.prototype.set = function (x, y, z) { + this.x = x; + this.y = y; + this.z = z; + return this; + }; + Vector3.prototype.add = function (v) { + this.x += v.x; + this.y += v.y; + this.z += v.z; + return this; + }; + Vector3.prototype.sub = function (v) { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + return this; + }; + Vector3.prototype.scale = function (s) { + this.x *= s; + this.y *= s; + this.z *= s; + return this; + }; + Vector3.prototype.normalize = function () { + var len = this.length(); + if (len == 0) + return this; + len = 1 / len; + this.x *= len; + this.y *= len; + this.z *= len; + return this; + }; + Vector3.prototype.cross = function (v) { + return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x); + }; + Vector3.prototype.multiply = function (matrix) { + var l_mat = matrix.values; + return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]); + }; + Vector3.prototype.project = function (matrix) { + var l_mat = matrix.values; + var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]); + return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w); + }; + Vector3.prototype.dot = function (v) { + return this.x * v.x + this.y * v.y + this.z * v.z; + }; + Vector3.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + }; + Vector3.prototype.distance = function (v) { + var a = v.x - this.x; + var b = v.y - this.y; + var c = v.z - this.z; + return Math.sqrt(a * a + b * b + c * c); + }; + return Vector3; + }()); + webgl.Vector3 = Vector3; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + function getSourceGLBlendMode(gl, blendMode, premultipliedAlpha) { + if (premultipliedAlpha === void 0) { premultipliedAlpha = false; } + switch (blendMode) { + case spine.BlendMode.Normal: return premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA; + case spine.BlendMode.Additive: return premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA; + case spine.BlendMode.Multiply: return gl.DST_COLOR; + case spine.BlendMode.Screen: return gl.ONE; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + webgl.getSourceGLBlendMode = getSourceGLBlendMode; + function getDestGLBlendMode(gl, blendMode) { + switch (blendMode) { + case spine.BlendMode.Normal: return gl.ONE_MINUS_SRC_ALPHA; + case spine.BlendMode.Additive: return gl.ONE; + case spine.BlendMode.Multiply: return gl.ONE_MINUS_SRC_ALPHA; + case spine.BlendMode.Screen: return gl.ONE_MINUS_SRC_ALPHA; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + webgl.getDestGLBlendMode = getDestGLBlendMode; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SpineWidget = (function () { + function SpineWidget(element, config) { + var _this = this; + this._mvp = new spine.webgl.Matrix4(); + this._paused = false; + this._lastFrameTime = Date.now() / 1000.0; + this._backgroundColor = new spine.Color(); + this._loaded = false; + if (!element) + throw new Error("Please provide a DOM element, e.g. document.getElementById('myelement')"); + if (!config) + throw new Error("Please provide a configuration, specifying at least the json file, atlas file and animation name"); + var elementId = element; + if (typeof (element) === "string") + element = document.getElementById(element); + if (element == null) + throw new Error("Element " + elementId + " does not exist"); + this.validateConfig(config); + var canvas = this.canvas = document.createElement("canvas"); + element.appendChild(canvas); + canvas.width = config.width; + canvas.height = config.height; + var webglConfig = { alpha: false }; + var gl = this.gl = (canvas.getContext("webgl", webglConfig) || canvas.getContext("experimental-webgl", webglConfig)); + this._shader = spine.webgl.Shader.newColoredTextured(gl); + this._batcher = new spine.webgl.PolygonBatcher(gl); + this._mvp.ortho2d(0, 0, 639, 479); + this._skeletonRenderer = new spine.webgl.SkeletonRenderer(gl); + var assets = this._assetManager = new spine.webgl.AssetManager(gl); + assets.loadText(config.atlas); + assets.loadText(config.json); + assets.loadTexture(config.atlas.replace(".atlas", ".png")); + requestAnimationFrame(function () { _this.load(); }); + } + SpineWidget.prototype.validateConfig = function (config) { + if (!config.atlas) + throw new Error("Please specify config.atlas"); + if (!config.json) + throw new Error("Please specify config.json"); + if (!config.animation) + throw new Error("Please specify config.animationName"); + if (!config.scale) + config.scale = 1.0; + if (!config.skin) + config.skin = "default"; + if (config.loop === undefined) + config.loop = true; + if (!config.y) + config.y = 20; + if (!config.width) + config.width = 640; + if (!config.height) + config.height = 480; + if (!config.x) + config.x = config.width / 2; + if (!config.backgroundColor) + config.backgroundColor = "#555555"; + if (!config.imagesPath) { + var index = config.atlas.lastIndexOf("/"); + if (index != -1) { + config.imagesPath = config.atlas.substr(0, index) + "/"; + } + else { + config.imagesPath = ""; + } + } + if (!config.premultipliedAlpha === undefined) + config.premultipliedAlpha = false; + this._backgroundColor.setFromString(config.backgroundColor); + this._config = config; + }; + SpineWidget.prototype.load = function () { + var _this = this; + var assetManager = this._assetManager; + var imagesPath = this._config.imagesPath; + var config = this._config; + if (assetManager.isLoadingComplete()) { + if (assetManager.hasErrors()) { + if (config.error) + config.error(this, "Failed to load assets: " + JSON.stringify(assetManager.errors)); + else + throw new Error("Failed to load assets: " + JSON.stringify(assetManager.errors)); + } + var atlas = new spine.webgl.TextureAtlas(this._assetManager.get(this._config.atlas), function (path) { + return assetManager.get(imagesPath + path); + }); + var atlasLoader = new spine.webgl.TextureAtlasAttachmentLoader(atlas); + var skeletonJson = new spine.SkeletonJson(atlasLoader); + // Set the scale to apply during parsing, parse the file, and create a new skeleton. + skeletonJson.scale = config.scale; + var skeletonData = skeletonJson.readSkeletonData(assetManager.get(config.json)); + var skeleton = this.skeleton = new spine.Skeleton(skeletonData); + skeleton.x = config.x; + skeleton.y = config.y; + skeleton.setSkinByName(config.skin); + var animationState = this.state = new spine.AnimationState(new spine.AnimationStateData(skeleton.data)); + animationState.setAnimation(0, config.animation, true); + if (config.success) + config.success(this); + this._loaded = true; + requestAnimationFrame(function () { _this.render(); }); + } + else + requestAnimationFrame(function () { _this.load(); }); + }; + SpineWidget.prototype.render = function () { + var _this = this; + var now = Date.now() / 1000; + var delta = now - this._lastFrameTime; + if (delta > 0.1) + delta = 0; + this._lastFrameTime = now; + var gl = this.gl; + var color = this._backgroundColor; + gl.clearColor(color.r, color.g, color.b, color.a); + gl.clear(gl.COLOR_BUFFER_BIT); + // Apply the animation state based on the delta time. + var state = this.state; + var skeleton = this.skeleton; + var premultipliedAlpha = this._config.premultipliedAlpha; + state.update(delta); + state.apply(skeleton); + skeleton.updateWorldTransform(); + // Bind the shader and set the texture and model-view-projection matrix. + var shader = this._shader; + shader.bind(); + shader.setUniformi(spine.webgl.Shader.SAMPLER, 0); + shader.setUniform4x4f(spine.webgl.Shader.MVP_MATRIX, this._mvp.values); + // Start the batch and tell the SkeletonRenderer to render the active skeleton. + var batcher = this._batcher; + var skeletonRenderer = this._skeletonRenderer; + batcher.begin(shader); + skeletonRenderer.premultipliedAlpha = premultipliedAlpha; + skeletonRenderer.draw(batcher, skeleton); + batcher.end(); + shader.unbind(); + if (!this._paused) + requestAnimationFrame(function () { _this.render(); }); + }; + SpineWidget.prototype.pause = function () { + this._paused = true; + }; + SpineWidget.prototype.play = function () { + var _this = this; + this._paused = false; + requestAnimationFrame(function () { _this.render(); }); + }; + SpineWidget.prototype.isPlaying = function () { + return !this._paused; + }; + SpineWidget.prototype.setAnimation = function (animationName) { + if (!this._loaded) + throw new Error("Widget isn't loaded yet"); + this.skeleton.setToSetupPose(); + this.state.setAnimation(0, animationName, this._config.loop); + }; + SpineWidget.loadWidgets = function () { + var widgets = document.getElementsByClassName("spine-widget"); + for (var i = 0; i < widgets.length; i++) { + SpineWidget.loadWidget(widgets[i]); + } + }; + SpineWidget.loadWidget = function (widget) { + var config = new SpineWidgetConfig(); + config.atlas = widget.getAttribute("data-atlas"); + config.json = widget.getAttribute("data-json"); + config.animation = widget.getAttribute("data-animation"); + if (widget.getAttribute("data-images-path")) + config.imagesPath = widget.getAttribute("data-images-path"); + if (widget.getAttribute("data-skin")) + config.skin = widget.getAttribute("data-skin"); + if (widget.getAttribute("data-loop")) + config.loop = widget.getAttribute("data-loop") === "true"; + if (widget.getAttribute("data-scale")) + config.scale = parseFloat(widget.getAttribute("data-scale")); + if (widget.getAttribute("data-x")) + config.x = parseFloat(widget.getAttribute("data-x")); + if (widget.getAttribute("data-y")) + config.x = parseFloat(widget.getAttribute("data-y")); + if (widget.getAttribute("data-width")) + config.width = parseInt(widget.getAttribute("data-width")); + if (widget.getAttribute("data-height")) + config.height = parseInt(widget.getAttribute("data-height")); + if (widget.getAttribute("data-background-color")) + config.backgroundColor = widget.getAttribute("data-background-color"); + if (widget.getAttribute("data-premultiplied-alpha")) + config.premultipliedAlpha = widget.getAttribute("data-premultiplied-alpha") === "true"; + new spine.SpineWidget(widget, config); + }; + SpineWidget.ready = function () { + if (SpineWidget.pageLoaded) + return; + SpineWidget.pageLoaded = true; + SpineWidget.loadWidgets(); + }; + SpineWidget.setupDOMListener = function () { + if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", SpineWidget.ready, false); + window.addEventListener("load", SpineWidget.ready, false); + } + else { + document.attachEvent("onreadystatechange", function readyStateChange() { + if (document.readyState === "complete") + SpineWidget.ready(); + }); + window.attachEvent("onload", SpineWidget.ready); + } + }; + SpineWidget.pageLoaded = false; + return SpineWidget; + }()); + spine.SpineWidget = SpineWidget; + var SpineWidgetConfig = (function () { + function SpineWidgetConfig() { + this.skin = "default"; + this.loop = true; + this.scale = 1.0; + this.x = 0; + this.y = 0; + this.width = 640; + this.height = 480; + this.backgroundColor = "#555555"; + this.premultipliedAlpha = false; + } + return SpineWidgetConfig; + }()); + spine.SpineWidgetConfig = SpineWidgetConfig; +})(spine || (spine = {})); +spine.SpineWidget.setupDOMListener(); +//# sourceMappingURL=spine-core.js.map \ No newline at end of file diff --git a/spine-ts/build/spine-core.js.map b/spine-ts/build/spine-core.js.map new file mode 100644 index 000000000..ed2079071 --- /dev/null +++ b/spine-ts/build/spine-core.js.map @@ -0,0 +1 @@ +{"version":3,"file":"spine-core.js","sourceRoot":"","sources":["../core/src/Animation.ts","../core/src/AnimationState.ts","../core/src/AnimationStateData.ts","../core/src/BlendMode.ts","../core/src/Bone.ts","../core/src/BoneData.ts","../core/src/Event.ts","../core/src/EventData.ts","../core/src/IkConstraint.ts","../core/src/IkConstraintData.ts","../core/src/PathConstraint.ts","../core/src/PathConstraintData.ts","../core/src/Skeleton.ts","../core/src/SkeletonBounds.ts","../core/src/SkeletonData.ts","../core/src/SkeletonJson.ts","../core/src/Skin.ts","../core/src/Slot.ts","../core/src/SlotData.ts","../core/src/TransformConstraint.ts","../core/src/TransformConstraintData.ts","../core/src/Updatable.ts","../core/src/Utils.ts","../core/src/attachments/Attachment.ts","../core/src/attachments/AttachmentLoader.ts","../core/src/attachments/AttachmentType.ts","../core/src/attachments/BoundingBoxAttachment.ts","../core/src/attachments/MeshAttachment.ts","../core/src/attachments/PathAttachment.ts","../core/src/attachments/RegionAttachment.ts","../core/src/attachments/TextureRegion.ts","../webgl/src/AssetManager.ts","../webgl/src/Matrix4.ts","../webgl/src/Mesh.ts","../webgl/src/PolygonBatcher.ts","../webgl/src/Shader.ts","../webgl/src/SkeletonRenderer.ts","../webgl/src/Texture.ts","../webgl/src/TextureAtlas.ts","../webgl/src/TextureAtlasAttachmentLoader.ts","../webgl/src/Vector3.ts","../webgl/src/WebGL.ts","../widget/src/Widget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EA6B+E;;;;;;AAE/E,IAAO,KAAK,CAgxBX;AAhxBD,WAAO,KAAK,EAAC,CAAC;IACb;QAKC,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;YACtE,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC1D,EAAE,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3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gBAC9D,CAAC,CAAC,CAAC;gBACG,MAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;YACxD,CAAC;QACF,CAAC;QAjBM,sBAAU,GAAG,KAAK,CAAC;QAkB3B,kBAAC;IAAD,CAAC,AAhND,IAgNC;IAhNY,iBAAW,cAgNvB,CAAA;IAED;QAAA;YAKC,SAAI,GAAG,SAAS,CAAC;YACjB,SAAI,GAAG,IAAI,CAAC;YACZ,UAAK,GAAG,GAAG,CAAC;YACZ,MAAC,GAAG,CAAC,CAAC;YACN,MAAC,GAAG,CAAC,CAAC;YACN,UAAK,GAAG,GAAG,CAAC;YACZ,WAAM,GAAG,GAAG,CAAC;YACb,oBAAe,GAAG,SAAS,CAAC;YAC5B,uBAAkB,GAAG,KAAK,CAAC;QAG5B,CAAC;QAAD,wBAAC;IAAD,CAAC,AAhBD,IAgBC;IAhBY,uBAAiB,oBAgB7B,CAAA;AACF,CAAC,EApOM,KAAK,KAAL,KAAK,QAoOX;AACD,KAAK,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC"} \ No newline at end of file diff --git a/spine-ts/build/spine-webgl.d.ts b/spine-ts/build/spine-webgl.d.ts new file mode 100644 index 000000000..bab571348 --- /dev/null +++ b/spine-ts/build/spine-webgl.d.ts @@ -0,0 +1,2502 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + 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): void; + mix(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number): 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): void; + } + abstract class CurveTimeline implements Timeline { + static LINEAR: number; + static STEPPED: number; + static BEZIER: number; + static BEZIER_SIZE: number; + private curves; + constructor(frameCount: number); + getFrameCount(): number; + setLinear(frameIndex: number): void; + setStepped(frameIndex: number): void; + getCurveType(frameIndex: number): number; + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + 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): 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); + /** Sets the time and angle of the specified keyframe. */ + setFrame(frameIndex: number, time: number, degrees: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): 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); + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, x: number, y: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class ScaleTimeline extends TranslateTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class ShearTimeline extends TranslateTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): 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); + /** Sets the time and value of the specified keyframe. */ + 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): void; + } + class AttachmentTimeline implements Timeline { + slotIndex: number; + frames: ArrayLike; + attachmentNames: Array; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, attachmentName: string): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class EventTimeline implements Timeline { + frames: ArrayLike; + events: Array; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time of the specified keyframe. */ + setFrame(frameIndex: number, event: Event): void; + /** Fires events for frames > lastTime and <= time. */ + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class DrawOrderTimeline implements Timeline { + frames: ArrayLike; + drawOrders: Array>; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + setFrame(frameIndex: number, time: number, drawOrder: Array): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class DeformTimeline extends CurveTimeline { + frames: ArrayLike; + frameVertices: Array>; + slotIndex: number; + attachment: VertexAttachment; + constructor(frameCount: number); + /** Sets the time of the specified keyframe. */ + setFrame(frameIndex: number, time: number, vertices: ArrayLike): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class IkConstraintTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_MIX: number; + static PREV_BEND_DIRECTION: number; + static MIX: number; + static BEND_DIRECTION: number; + ikConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + /** Sets the time, mix and bend direction of the specified keyframe. */ + setFrame(frameIndex: number, time: number, mix: number, bendDirection: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): 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); + /** Sets the time and mixes of the specified keyframe. */ + 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): 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); + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, value: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): 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); + /** Sets the time and mixes of the specified keyframe. */ + setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class AnimationState { + data: AnimationStateData; + tracks: TrackEntry[]; + events: Event[]; + listeners: AnimationStateListener[]; + timeScale: number; + constructor(data?: AnimationStateData); + update(delta: number): void; + apply(skeleton: Skeleton): void; + clearTracks(): void; + clearTrack(trackIndex: number): void; + freeAll(entry: TrackEntry): void; + expandToIndex(index: number): TrackEntry; + setCurrent(index: number, entry: TrackEntry): void; + /** @see #setAnimation(int, Animation, boolean) */ + setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry; + /** Set the current animation. Any queued animations are cleared. */ + setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry; + /** {@link #addAnimation(int, Animation, boolean, float)} */ + addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): TrackEntry; + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + addAnimationWith(trackIndex: number, animation: Animation, loop: boolean, delay: number): TrackEntry; + /** @return May be null. */ + getCurrent(trackIndex: number): TrackEntry; + /** Adds a listener to receive events for all animations. */ + addListener(listener: AnimationStateListener): void; + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + removeListener(listener: AnimationStateListener): void; + clearListeners(): void; + } + class TrackEntry { + next: TrackEntry; + previous: TrackEntry; + animation: Animation; + loop: boolean; + delay: number; + time: number; + lastTime: number; + endTime: number; + timeScale: number; + mixTime: number; + mixDuration: number; + listener: AnimationStateListener; + mix: number; + reset(): void; + /** Returns true if the current time is greater than the end time, regardless of looping. */ + isComplete(): boolean; + } + abstract class AnimationStateAdapter implements AnimationStateListener { + event(trackIndex: number, event: Event): void; + complete(trackIndex: number, loopCount: number): void; + start(trackIndex: number): void; + end(trackIndex: number): void; + } + interface AnimationStateListener { + /** Invoked when the current animation triggers an event. */ + event(trackIndex: number, event: Event): void; + /** Invoked when the current animation has completed. + * @param loopCount The number of times the animation reached the end. */ + complete(trackIndex: number, loopCount: number): void; + /** Invoked just after the current animation is set. */ + start(trackIndex: number): void; + /** Invoked just before the current animation is replaced. */ + end(trackIndex: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class AnimationStateData { + skeletonData: SkeletonData; + animationToMixTime: Map; + defaultMix: number; + constructor(skeletonData: SkeletonData); + setMix(fromName: string, toName: string, duration: number): void; + setMixWith(from: Animation, to: Animation, duration: number): void; + getMix(from: Animation, to: Animation): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + enum BlendMode { + Normal = 0, + Additive = 1, + Multiply = 2, + Screen = 3, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Bone implements Updatable { + data: BoneData; + skeleton: Skeleton; + parent: Bone; + children: Bone[]; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + appliedRotation: number; + a: number; + b: number; + worldX: number; + c: number; + d: number; + worldY: number; + worldSignX: number; + worldSignY: number; + sorted: boolean; + /** @param parent May be null. */ + constructor(data: BoneData, skeleton: Skeleton, parent: Bone); + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + update(): void; + /** Computes the world transform using the parent bone and this bone's local transform. */ + updateWorldTransform(): void; + /** Computes the world transform using the parent bone and the specified local transform. */ + 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; + worldToLocalRotationX(): number; + worldToLocalRotationY(): number; + rotateWorld(degrees: number): void; + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + updateLocalTransform(): void; + worldToLocal(world: Vector2): Vector2; + localToWorld(local: Vector2): Vector2; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class BoneData { + index: number; + name: string; + parent: BoneData; + length: number; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + inheritRotation: boolean; + inheritScale: boolean; + constructor(index: number, name: string, parent: BoneData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Event { + data: EventData; + intValue: number; + floatValue: number; + stringValue: string; + time: number; + constructor(time: number, data: EventData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class EventData { + name: string; + intValue: number; + floatValue: number; + stringValue: string; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class IkConstraint implements Updatable { + data: IkConstraintData; + bones: Array; + target: Bone; + mix: number; + bendDirection: number; + level: number; + constructor(data: IkConstraintData, skeleton: Skeleton); + apply(): void; + update(): void; + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + apply1(bone: Bone, targetX: number, targetY: number, alpha: number): void; + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class IkConstraintData { + name: string; + bones: BoneData[]; + target: BoneData; + bendDirection: number; + mix: number; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathConstraint implements Updatable { + static NONE: number; + static BEFORE: number; + static AFTER: 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[]; + constructor(data: PathConstraintData, skeleton: Skeleton); + 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathConstraintData { + name: string; + 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, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Skeleton { + data: SkeletonData; + bones: Array; + slots: Array; + drawOrder: Array; + ikConstraints: Array; + ikConstraintsSorted: Array; + transformConstraints: Array; + pathConstraints: Array; + _updateCache: Updatable[]; + skin: Skin; + color: Color; + time: number; + flipX: boolean; + flipY: boolean; + x: number; + y: number; + constructor(data: SkeletonData); + updateCache(): void; + sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void; + sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void; + sortBone(bone: Bone): void; + sortReset(bones: Array): void; + /** Updates the world transform for each bone and applies constraints. */ + updateWorldTransform(): void; + /** Sets the bones, constraints, and slots to their setup pose values. */ + setToSetupPose(): void; + /** Sets the bones and constraints to their setup pose values. */ + setBonesToSetupPose(): void; + setSlotsToSetupPose(): void; + /** @return May return null. */ + getRootBone(): Bone; + /** @return May be null. */ + findBone(boneName: string): Bone; + /** @return -1 if the bone was not found. */ + findBoneIndex(boneName: string): number; + /** @return May be null. */ + findSlot(slotName: string): Slot; + /** @return -1 if the bone was not found. */ + findSlotIndex(slotName: string): number; + /** Sets a skin by name. + * @see #setSkin(Skin) */ + setSkinByName(skinName: string): void; + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + setSkin(newSkin: Skin): void; + /** @return May be null. */ + getAttachmentByName(slotName: string, attachmentName: string): Attachment; + /** @return May be null. */ + getAttachment(slotIndex: number, attachmentName: string): Attachment; + /** @param attachmentName May be null. */ + setAttachment(slotName: string, attachmentName: string): void; + /** @return May be null. */ + findIkConstraint(constraintName: string): IkConstraint; + /** @return May be null. */ + findTransformConstraint(constraintName: string): TransformConstraint; + /** @return May be null. */ + findPathConstraint(constraintName: string): PathConstraint; + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + getBounds(offset: Vector2, size: Vector2): void; + update(delta: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonBounds { + minX: number; + minY: number; + maxX: number; + maxY: number; + boundingBoxes: BoundingBoxAttachment[]; + polygons: ArrayLike[]; + private _polygonPool; + update(skeleton: Skeleton, updateAabb: boolean): void; + aabbCompute(): void; + /** Returns true if the axis aligned bounding box contains the point. */ + aabbContainsPoint(x: number, y: number): boolean; + /** Returns true if the axis aligned bounding box intersects the line segment. */ + aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean; + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean; + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + containsPoint(x: number, y: number): BoundingBoxAttachment; + /** Returns true if the polygon contains the point. */ + containsPointPolygon(polygon: ArrayLike, x: number, y: number): boolean; + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment; + /** Returns true if the polygon contains any part of the line segment. */ + intersectsSegmentPolygon(polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number): boolean; + /** Returns the polygon for the specified bounding box, or null. */ + getPolygon(boundingBox: BoundingBoxAttachment): ArrayLike; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonData { + name: string; + bones: BoneData[]; + slots: SlotData[]; + skins: Skin[]; + defaultSkin: Skin; + events: EventData[]; + animations: Animation[]; + ikConstraints: IkConstraintData[]; + transformConstraints: TransformConstraintData[]; + pathConstraints: PathConstraintData[]; + width: number; + height: number; + version: string; + hash: string; + imagesPath: 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonJson { + attachmentLoader: AttachmentLoader; + scale: number; + private linkedMeshes; + constructor(attachmentLoader: AttachmentLoader); + readSkeletonData(json: string): SkeletonData; + readAttachment(map: any, skin: Skin, slotIndex: number, name: string): 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Skin { + name: string; + attachments: Map[]; + constructor(name: string); + addAttachment(slotIndex: number, name: string, attachment: Attachment): void; + /** @return May be null. */ + getAttachment(slotIndex: number, name: string): Attachment; + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + attachAll(skeleton: Skeleton, oldSkin: Skin): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Slot { + data: SlotData; + bone: Bone; + color: Color; + private attachment; + private attachmentTime; + attachmentVertices: number[]; + constructor(data: SlotData, bone: Bone); + /** @return May be null. */ + getAttachment(): Attachment; + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + setAttachment(attachment: Attachment): void; + setAttachmentTime(time: number): void; + /** Returns the time since the attachment was set. */ + getAttachmentTime(): number; + setToSetupPose(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SlotData { + index: number; + name: string; + boneData: BoneData; + color: Color; + attachmentName: string; + blendMode: BlendMode; + constructor(index: number, name: string, boneData: BoneData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TransformConstraint implements Updatable { + data: TransformConstraintData; + bones: Array; + target: Bone; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + temp: Vector2; + constructor(data: TransformConstraintData, skeleton: Skeleton); + apply(): void; + update(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TransformConstraintData { + name: string; + bones: BoneData[]; + target: BoneData; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + offsetRotation: number; + offsetX: number; + offsetY: number; + offsetScaleX: number; + offsetScaleY: number; + offsetShearY: number; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface Updatable { + update(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface Map { + [key: string]: T; + } + interface Disposable { + dispose(): void; + } + class Color { + r: number; + g: number; + b: number; + a: number; + constructor(r?: number, g?: number, b?: number, a?: number); + set(r: number, g: number, b: number, a: number): void; + setFromColor(c: Color): void; + setFromString(hex: string): void; + add(r: number, g: number, b: number, a: number): void; + clamp(): this; + } + 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; + } + 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 newArray(size: number, defaultValue: T): Array; + static newFloatArray(size: number): ArrayLike; + static toFloatArray(array: Array): Float32Array | number[]; + } + 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + abstract class Attachment { + name: string; + constructor(name: string); + } + abstract class VertexAttachment extends Attachment { + bones: Array; + vertices: ArrayLike; + worldVerticesLength: number; + constructor(name: string); + computeWorldVertices(slot: Slot, worldVertices: ArrayLike): void; + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + computeWorldVerticesWith(slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number): void; + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + applyDeform(sourceAttachment: VertexAttachment): boolean; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface AttachmentLoader { + /** @return May be null to not load an attachment. */ + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + /** @return May be null to not load an attachment. */ + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + enum AttachmentType { + Region = 0, + BoundingBox = 1, + Mesh = 2, + LinkedMesh = 3, + Path = 4, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class BoundingBoxAttachment extends VertexAttachment { + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class MeshAttachment extends VertexAttachment { + region: TextureRegion; + path: string; + regionUVs: ArrayLike; + worldVertices: ArrayLike; + triangles: Array; + color: Color; + hullLength: number; + private _parentMesh; + inheritDeform: boolean; + tempColor: Color; + constructor(name: string); + updateUVs(): void; + /** @return The updated world vertices. */ + updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike; + applyDeform(sourceAttachment: VertexAttachment): boolean; + getParentMesh(): MeshAttachment; + /** @param parentMesh May be null. */ + setParentMesh(parentMesh: MeshAttachment): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathAttachment extends VertexAttachment { + lengths: Array; + closed: boolean; + constantSpeed: boolean; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + 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; + vertices: ArrayLike; + tempColor: Color; + constructor(name: string); + setRegion(region: TextureRegion): void; + updateOffset(): void; + updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TextureRegion { + renderObject: any; + u: number; + v: number; + u2: number; + v2: number; + width: number; + height: number; + rotate: boolean; + offsetX: number; + offsetY: number; + originalWidth: number; + originalHeight: number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class AssetManager implements Disposable { + private _gl; + private _assets; + private _errors; + private _toLoad; + private _loaded; + constructor(gl: WebGLRenderingContext); + loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; + loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; + get(path: string): string | Texture; + remove(path: string): void; + removeAll(): void; + isLoadingComplete(): boolean; + toLoad(): number; + loaded(): number; + dispose(): void; + hasErrors(): boolean; + errors(): Map; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + const M00: number; + const M01: number; + const M02: number; + const M03: number; + const M10: number; + const M11: number; + const M12: number; + const M13: number; + const M20: number; + const M21: number; + const M22: number; + const M23: number; + const M30: number; + const M31: number; + const M32: number; + const M33: number; + class Matrix4 { + temp: Float32Array; + values: Float32Array; + constructor(); + set(values: ArrayLike): Matrix4; + transpose(): Matrix4; + identity(): Matrix4; + invert(): Matrix4; + determinant(): number; + translate(x: number, y: number, z: number): Matrix4; + copy(): Matrix4; + projection(near: number, far: number, fovy: number, aspectRatio: number): Matrix4; + ortho2d(x: number, y: number, width: number, height: number): Matrix4; + ortho(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4; + multiply(matrix: Matrix4): Matrix4; + multiplyLeft(matrix: Matrix4): Matrix4; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Mesh implements Disposable { + private _attributes; + private _gl; + private _vertices; + private _verticesBuffer; + private _verticesLength; + private _dirtyVertices; + private _indices; + private _indicesBuffer; + private _indicesLength; + private _dirtyIndices; + private _elementsPerVertex; + attributes(): VertexAttribute[]; + maxVertices(): number; + numVertices(): number; + setVerticesLength(length: number): void; + vertices(): Float32Array; + maxIndices(): number; + numIndices(): number; + setIndicesLength(length: number): void; + indices(): Uint16Array; + constructor(gl: WebGLRenderingContext, _attributes: VertexAttribute[], maxVertices: number, maxIndices: number); + setVertices(vertices: Array): void; + setIndices(indices: Array): void; + draw(shader: Shader, primitiveType: number): void; + drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void; + bind(shader: Shader): void; + unbind(shader: Shader): void; + private update(); + dispose(): void; + } + class VertexAttribute { + name: string; + type: VertexAttributeType; + numElements: number; + constructor(name: string, type: VertexAttributeType, numElements: number); + } + class Position2Attribute extends VertexAttribute { + constructor(); + } + class Position3Attribute extends VertexAttribute { + constructor(); + } + class TexCoordAttribute extends VertexAttribute { + constructor(unit?: number); + } + class ColorAttribute extends VertexAttribute { + constructor(); + } + enum VertexAttributeType { + Float = 0, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class PolygonBatcher { + private _gl; + private _drawCalls; + private _drawing; + private _mesh; + private _shader; + private _lastTexture; + private _verticesLength; + private _indicesLength; + private _srcBlend; + private _dstBlend; + constructor(gl: WebGLRenderingContext, maxVertices?: number); + begin(shader: Shader): void; + setBlendMode(srcBlend: number, dstBlend: number): void; + draw(texture: Texture, vertices: ArrayLike, indices: Array): void; + private flush(); + end(): void; + drawCalls(): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Shader implements Disposable { + private _vertexShader; + private _fragmentShader; + static MVP_MATRIX: string; + static POSITION: string; + static COLOR: string; + static TEXCOORDS: string; + static SAMPLER: string; + private _gl; + private _vs; + private _fs; + private _program; + private _tmp2x2; + private _tmp3x3; + private _tmp4x4; + program(): WebGLProgram; + vertexShader(): string; + fragmentShader(): string; + constructor(gl: WebGLRenderingContext, _vertexShader: string, _fragmentShader: string); + private compile(); + private compileShader(type, source); + private compileProgram(vs, fs); + bind(): void; + unbind(): void; + setUniformi(uniform: string, value: number): void; + setUniformf(uniform: string, value: number): void; + setUniform2f(uniform: string, value: number, value2: number): void; + setUniform3f(uniform: string, value: number, value2: number, value3: number): void; + setUniform4f(uniform: string, value: number, value2: number, value3: number, value4: number): void; + setUniform2x2f(uniform: string, value: ArrayLike): void; + setUniform3x3f(uniform: string, value: ArrayLike): void; + setUniform4x4f(uniform: string, value: ArrayLike): void; + getUniformLocation(uniform: string): WebGLUniformLocation; + getAttributeLocation(attribute: string): number; + dispose(): void; + static newColoredTextured(gl: WebGLRenderingContext): Shader; + static newColored(gl: WebGLRenderingContext): Shader; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class SkeletonRenderer { + static QUAD_TRIANGLES: number[]; + premultipliedAlpha: boolean; + private _gl; + constructor(gl: WebGLRenderingContext); + draw(batcher: PolygonBatcher, skeleton: Skeleton): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Texture implements Disposable { + private _gl; + private _texture; + private _image; + private _boundUnit; + constructor(gl: WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean); + getImage(): HTMLImageElement; + setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; + setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; + update(useMipMaps: boolean): void; + bind(unit?: number): void; + unbind(): void; + dispose(): void; + static filterFromString(text: string): TextureFilter; + static wrapFromString(text: string): TextureWrap; + } + enum TextureFilter { + Nearest, + Linear, + MipMap, + MipMapNearestNearest, + MipMapLinearNearest, + MipMapNearestLinear, + MipMapLinearLinear, + } + enum TextureWrap { + MirroredRepeat, + ClampToEdge, + Repeat, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class TextureAtlas implements Disposable { + pages: TextureAtlasPage[]; + regions: TextureAtlasRegion[]; + constructor(atlasText: string, textureLoader: (path: string) => Texture); + private load(atlasText, textureLoader); + findRegion(name: string): TextureAtlasRegion; + dispose(): void; + } + class TextureAtlasPage { + name: string; + minFilter: TextureFilter; + magFilter: TextureFilter; + uWrap: TextureWrap; + vWrap: TextureWrap; + texture: Texture; + width: number; + height: number; + } + class TextureAtlasRegion extends TextureRegion { + page: TextureAtlasPage; + name: string; + x: number; + y: number; + index: number; + rotate: boolean; + texture: Texture; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class TextureAtlasAttachmentLoader implements AttachmentLoader { + atlas: TextureAtlas; + constructor(atlas: TextureAtlas); + /** @return May be null to not load an attachment. */ + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + /** @return May be null to not load an attachment. */ + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Vector3 { + x: number; + y: number; + z: number; + set(x: number, y: number, z: number): Vector3; + add(v: Vector3): Vector3; + sub(v: Vector3): Vector3; + scale(s: number): Vector3; + normalize(): Vector3; + cross(v: Vector3): Vector3; + multiply(matrix: Matrix4): Vector3; + project(matrix: Matrix4): Vector3; + dot(v: Vector3): number; + length(): number; + distance(v: Vector3): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + function getSourceGLBlendMode(gl: WebGLRenderingContext, blendMode: BlendMode, premultipliedAlpha?: boolean): number; + function getDestGLBlendMode(gl: WebGLRenderingContext, blendMode: BlendMode): number; +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SpineWidget { + skeleton: Skeleton; + state: AnimationState; + gl: WebGLRenderingContext; + canvas: HTMLCanvasElement; + private _config; + private _assetManager; + private _shader; + private _batcher; + private _mvp; + private _skeletonRenderer; + private _paused; + private _lastFrameTime; + private _backgroundColor; + private _loaded; + constructor(element: Element | string, config: SpineWidgetConfig); + private validateConfig(config); + private load(); + private render(); + pause(): void; + play(): void; + isPlaying(): boolean; + setAnimation(animationName: string): void; + static loadWidgets(): void; + static loadWidget(widget: Element): void; + static pageLoaded: boolean; + private static ready(); + static setupDOMListener(): void; + } + class SpineWidgetConfig { + json: string; + atlas: string; + animation: string; + imagesPath: string; + skin: string; + loop: boolean; + scale: number; + x: number; + y: number; + width: number; + height: number; + backgroundColor: string; + premultipliedAlpha: boolean; + success: (widget: SpineWidget) => void; + error: (widget: SpineWidget, msg: string) => void; + } +} diff --git a/spine-ts/build/spine-webgl.js b/spine-ts/build/spine-webgl.js new file mode 100644 index 000000000..e81a4184e --- /dev/null +++ b/spine-ts/build/spine-webgl.js @@ -0,0 +1,6877 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var spine; +(function (spine) { + 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) { + 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, 1); + }; + Animation.prototype.mix = function (skeleton, lastTime, time, loop, events, alpha) { + 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); + }; + 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; + }()); + spine.Animation = Animation; + var CurveTimeline = (function () { + function CurveTimeline(frameCount) { + if (frameCount <= 0) + throw new Error("frameCount must be > 0: " + frameCount); + this.curves = spine.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; + }; + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + 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 = spine.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); // Last point is 1,1. + }; + CurveTimeline.LINEAR = 0; + CurveTimeline.STEPPED = 1; + CurveTimeline.BEZIER = 2; + CurveTimeline.BEZIER_SIZE = 10 * 2 - 1; + return CurveTimeline; + }()); + spine.CurveTimeline = CurveTimeline; + var RotateTimeline = (function (_super) { + __extends(RotateTimeline, _super); + function RotateTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount << 1); + } + /** Sets the time and angle of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { + var amount_1 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation; + while (amount_1 > 180) + amount_1 -= 360; + while (amount_1 < -180) + amount_1 += 360; + bone.rotation += amount_1 * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + 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 amount = frames[frame + RotateTimeline.ROTATION] - prevRotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + amount = bone.data.rotation + (prevRotation + amount * percent) - bone.rotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + bone.rotation += amount * alpha; + }; + RotateTimeline.ENTRIES = 2; + RotateTimeline.PREV_TIME = -2; + RotateTimeline.PREV_ROTATION = -1; + RotateTimeline.ROTATION = 1; + return RotateTimeline; + }(CurveTimeline)); + spine.RotateTimeline = RotateTimeline; + var TranslateTimeline = (function (_super) { + __extends(TranslateTimeline, _super); + function TranslateTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { + bone.x += (bone.data.x + frames[frames.length + TranslateTimeline.PREV_X] - bone.x) * alpha; + bone.y += (bone.data.y + frames[frames.length + TranslateTimeline.PREV_Y] - bone.y) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES); + var prevX = frames[frame + TranslateTimeline.PREV_X]; + var prevY = 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)); + bone.x += (bone.data.x + prevX + (frames[frame + TranslateTimeline.X] - prevX) * percent - bone.x) * alpha; + bone.y += (bone.data.y + prevY + (frames[frame + TranslateTimeline.Y] - prevY) * percent - bone.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)); + spine.TranslateTimeline = TranslateTimeline; + var ScaleTimeline = (function (_super) { + __extends(ScaleTimeline, _super); + function ScaleTimeline(frameCount) { + _super.call(this, frameCount); + } + ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { + bone.scaleX += (bone.data.scaleX * frames[frames.length + ScaleTimeline.PREV_X] - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * frames[frames.length + ScaleTimeline.PREV_Y] - bone.scaleY) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES); + var prevX = frames[frame + ScaleTimeline.PREV_X]; + var prevY = 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)); + bone.scaleX += (bone.data.scaleX * (prevX + (frames[frame + ScaleTimeline.X] - prevX) * percent) - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * (prevY + (frames[frame + ScaleTimeline.Y] - prevY) * percent) - bone.scaleY) * alpha; + }; + return ScaleTimeline; + }(TranslateTimeline)); + spine.ScaleTimeline = ScaleTimeline; + var ShearTimeline = (function (_super) { + __extends(ShearTimeline, _super); + function ShearTimeline(frameCount) { + _super.call(this, frameCount); + } + ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { + bone.shearX += (bone.data.shearX + frames[frames.length + ShearTimeline.PREV_X] - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + frames[frames.length + ShearTimeline.PREV_Y] - bone.shearY) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES); + var prevX = frames[frame + ShearTimeline.PREV_X]; + var prevY = 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)); + bone.shearX += (bone.data.shearX + (prevX + (frames[frame + ShearTimeline.X] - prevX) * percent) - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + (prevY + (frames[frame + ShearTimeline.Y] - prevY) * percent) - bone.shearY) * alpha; + }; + return ShearTimeline; + }(TranslateTimeline)); + spine.ShearTimeline = ShearTimeline; + var ColorTimeline = (function (_super) { + __extends(ColorTimeline, _super); + function ColorTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + 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 { + // Interpolate between the previous frame and the current frame. + 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; + } + var color = skeleton.slots[this.slotIndex].color; + if (alpha < 1) + color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha); + else + color.set(r, g, b, a); + }; + 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)); + spine.ColorTimeline = ColorTimeline; + var AttachmentTimeline = (function () { + function AttachmentTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.attachmentNames = new Array(frameCount); + } + AttachmentTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time and value of the specified keyframe. */ + AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) { + this.frames[frameIndex] = time; + this.attachmentNames[frameIndex] = attachmentName; + }; + AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + 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; + }()); + spine.AttachmentTimeline = AttachmentTimeline; + var EventTimeline = (function () { + function EventTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.events = new Array(frameCount); + } + EventTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time of the specified keyframe. */ + EventTimeline.prototype.setFrame = function (frameIndex, event) { + this.frames[frameIndex] = event.time; + this.events[frameIndex] = event; + }; + /** Fires events for frames > lastTime and <= time. */ + EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + 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); + lastTime = -1; + } + else if (lastTime >= frames[frameCount - 1]) + return; + if (time < frames[0]) + return; // Time is before first frame. + 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; + }()); + spine.EventTimeline = EventTimeline; + var DrawOrderTimeline = (function () { + function DrawOrderTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.drawOrders = new Array(frameCount); + } + DrawOrderTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) { + this.frames[frameIndex] = time; + this.drawOrders[frameIndex] = drawOrder; + }; + DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var frame = 0; + if (time >= frames[frames.length - 1]) + frame = frames.length - 1; + else + frame = Animation.binarySearch(frames, time) - 1; + var drawOrder = skeleton.drawOrder; + var slots = skeleton.slots; + var drawOrderToSetupIndex = this.drawOrders[frame]; + if (drawOrderToSetupIndex == null) + spine.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; + }()); + spine.DrawOrderTimeline = DrawOrderTimeline; + var DeformTimeline = (function (_super) { + __extends(DeformTimeline, _super); + function DeformTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount); + this.frameVertices = new Array(frameCount); + } + /** Sets the time of the specified keyframe. */ + DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) { + this.frames[frameIndex] = time; + this.frameVertices[frameIndex] = vertices; + }; + DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var slot = skeleton.slots[this.slotIndex]; + var slotAttachment = slot.getAttachment(); + if (!(slotAttachment instanceof spine.VertexAttachment) || !slotAttachment.applyDeform(this.attachment)) + return; + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var frameVertices = this.frameVertices; + var vertexCount = frameVertices[0].length; + var verticesArray = slot.attachmentVertices; + if (verticesArray.length != vertexCount) + alpha = 1; // Don't mix from uninitialized slot vertices. + var vertices = spine.Utils.setArraySize(verticesArray, vertexCount); + if (time >= frames[frames.length - 1]) { + var lastVertices = frameVertices[frames.length - 1]; + if (alpha < 1) { + for (var i = 0; i < vertexCount; i++) + vertices[i] += (lastVertices[i] - vertices[i]) * alpha; + } + else + spine.Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount); + return; + } + // Interpolate between the previous frame and the current frame. + 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) { + for (var i = 0; i < vertexCount; i++) { + var prev = prevVertices[i]; + vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha; + } + } + else { + for (var i = 0; i < vertexCount; i++) { + var prev = prevVertices[i]; + vertices[i] = prev + (nextVertices[i] - prev) * percent; + } + } + }; + return DeformTimeline; + }(CurveTimeline)); + spine.DeformTimeline = DeformTimeline; + var IkConstraintTimeline = (function (_super) { + __extends(IkConstraintTimeline, _super); + function IkConstraintTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES); + } + /** Sets the time, mix and bend direction of the specified keyframe. */ + IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, bendDirection) { + frameIndex *= IkConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + IkConstraintTimeline.MIX] = mix; + this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection; + }; + IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.ikConstraints[this.ikConstraintIndex]; + if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { + constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]); + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES); + var mix = frames[frame + IkConstraintTimeline.PREV_MIX]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime)); + constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]); + }; + IkConstraintTimeline.ENTRIES = 3; + IkConstraintTimeline.PREV_TIME = -3; + IkConstraintTimeline.PREV_MIX = -2; + IkConstraintTimeline.PREV_BEND_DIRECTION = -1; + IkConstraintTimeline.MIX = 1; + IkConstraintTimeline.BEND_DIRECTION = 2; + return IkConstraintTimeline; + }(CurveTimeline)); + spine.IkConstraintTimeline = IkConstraintTimeline; + var TransformConstraintTimeline = (function (_super) { + __extends(TransformConstraintTimeline, _super); + function TransformConstraintTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES); + } + /** Sets the time and mixes of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.transformConstraints[this.transformConstraintIndex]; + if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { + var i = frames.length; + constraint.rotateMix += (frames[i + TransformConstraintTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + TransformConstraintTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + constraint.scaleMix += (frames[i + TransformConstraintTimeline.PREV_SCALE] - constraint.scaleMix) * alpha; + constraint.shearMix += (frames[i + TransformConstraintTimeline.PREV_SHEAR] - constraint.shearMix) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES); + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime)); + var rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE]; + var translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE]; + var scale = frames[frame + TransformConstraintTimeline.PREV_SCALE]; + var shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR]; + constraint.rotateMix += (rotate + (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent - constraint.translateMix) + * alpha; + constraint.scaleMix += (scale + (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent - constraint.scaleMix) * alpha; + constraint.shearMix += (shear + (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent - 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)); + spine.TransformConstraintTimeline = TransformConstraintTimeline; + var PathConstraintPositionTimeline = (function (_super) { + __extends(PathConstraintPositionTimeline, _super); + function PathConstraintPositionTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) { + var i = frames.length; + constraint.position += (frames[i + PathConstraintPositionTimeline.PREV_VALUE] - constraint.position) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES); + var 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)); + constraint.position += (position + (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent - constraint.position) * alpha; + }; + PathConstraintPositionTimeline.ENTRIES = 2; + PathConstraintPositionTimeline.PREV_TIME = -2; + PathConstraintPositionTimeline.PREV_VALUE = -1; + PathConstraintPositionTimeline.VALUE = 1; + return PathConstraintPositionTimeline; + }(CurveTimeline)); + spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline; + var PathConstraintSpacingTimeline = (function (_super) { + __extends(PathConstraintSpacingTimeline, _super); + function PathConstraintSpacingTimeline(frameCount) { + _super.call(this, frameCount); + } + PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) { + var i = frames.length; + constraint.spacing += (frames[i + PathConstraintSpacingTimeline.PREV_VALUE] - constraint.spacing) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES); + var 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)); + constraint.spacing += (spacing + (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent - constraint.spacing) * alpha; + }; + return PathConstraintSpacingTimeline; + }(PathConstraintPositionTimeline)); + spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline; + var PathConstraintMixTimeline = (function (_super) { + __extends(PathConstraintMixTimeline, _super); + function PathConstraintMixTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES); + } + /** Sets the time and mixes of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { + var i = frames.length; + constraint.rotateMix += (frames[i + PathConstraintMixTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + PathConstraintMixTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES); + var rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE]; + var 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)); + constraint.rotateMix += (rotate + (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent - 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)); + spine.PathConstraintMixTimeline = PathConstraintMixTimeline; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var AnimationState = (function () { + function AnimationState(data) { + if (data === void 0) { data = null; } + this.tracks = new Array(); + this.events = new Array(); + this.listeners = new Array(); + this.timeScale = 1; + if (data == null) + throw new Error("data cannot be null."); + this.data = data; + } + AnimationState.prototype.update = function (delta) { + delta *= this.timeScale; + for (var i = 0; i < this.tracks.length; i++) { + var current = this.tracks[i]; + if (current == null) + continue; + var next = current.next; + if (next != null) { + var nextTime = current.lastTime - next.delay; + if (nextTime >= 0) { + var nextDelta = delta * next.timeScale; + next.time = nextTime + nextDelta; // For start event to see correct time. + current.time += delta * current.timeScale; // For end event to see correct time. + this.setCurrent(i, next); + next.time -= nextDelta; // Prevent increasing time twice, below. + current = next; + } + } + else if (!current.loop && current.lastTime >= current.endTime) { + // End non-looping animation when it reaches its end time and there is no next entry. + this.clearTrack(i); + continue; + } + current.time += delta * current.timeScale; + if (current.previous != null) { + var previousDelta = delta * current.previous.timeScale; + current.previous.time += previousDelta; + current.mixTime += previousDelta; + } + } + }; + AnimationState.prototype.apply = function (skeleton) { + var events = this.events; + var listenerCount = this.listeners.length; + for (var i = 0; i < this.tracks.length; i++) { + var current = this.tracks[i]; + if (current == null) + continue; + events.length = 0; + var time = current.time; + var lastTime = current.lastTime; + var endTime = current.endTime; + var loop = current.loop; + if (!loop && time > endTime) + time = endTime; + var previous = current.previous; + if (previous == null) + current.animation.mix(skeleton, lastTime, time, loop, events, current.mix); + else { + var previousTime = previous.time; + if (!previous.loop && previousTime > previous.endTime) + previousTime = previous.endTime; + previous.animation.apply(skeleton, previousTime, previousTime, previous.loop, null); + var alpha = current.mixTime / current.mixDuration * current.mix; + if (alpha >= 1) { + alpha = 1; + current.previous = null; + } + current.animation.mix(skeleton, lastTime, time, loop, events, alpha); + } + for (var ii = 0, nn = events.length; ii < nn; ii++) { + var event_1 = events[ii]; + if (current.listener != null) + current.listener.event(i, event_1); + for (var iii = 0; iii < listenerCount; iii++) + this.listeners[iii].event(i, event_1); + } + // Check if completed the animation or a loop iteration. + if (loop ? (lastTime % endTime > time % endTime) : (lastTime < endTime && time >= endTime)) { + var count = spine.MathUtils.toInt(time / endTime); + if (current.listener != null) + current.listener.complete(i, count); + for (var ii = 0, nn = this.listeners.length; ii < nn; ii++) + this.listeners[ii].complete(i, count); + } + current.lastTime = current.time; + } + }; + AnimationState.prototype.clearTracks = function () { + for (var i = 0, n = this.tracks.length; i < n; i++) + this.clearTrack(i); + this.tracks.length = 0; + }; + AnimationState.prototype.clearTrack = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return; + var current = this.tracks[trackIndex]; + if (current == null) + return; + if (current.listener != null) + current.listener.end(trackIndex); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(trackIndex); + this.tracks[trackIndex] = null; + this.freeAll(current); + }; + AnimationState.prototype.freeAll = function (entry) { + while (entry != null) { + var next = entry.next; + entry = next; + } + }; + AnimationState.prototype.expandToIndex = function (index) { + if (index < this.tracks.length) + return this.tracks[index]; + spine.Utils.setArraySize(this.tracks, index - this.tracks.length + 1, null); + this.tracks.length = index + 1; + return null; + }; + AnimationState.prototype.setCurrent = function (index, entry) { + var current = this.expandToIndex(index); + if (current != null) { + var previous = current.previous; + current.previous = null; + if (current.listener != null) + current.listener.end(index); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(index); + entry.mixDuration = this.data.getMix(current.animation, entry.animation); + if (entry.mixDuration > 0) { + entry.mixTime = 0; + // If a mix is in progress, mix from the closest animation. + if (previous != null && current.mixTime / current.mixDuration < 0.5) { + entry.previous = previous; + previous = current; + } + else + entry.previous = current; + } + } + this.tracks[index] = entry; + if (entry.listener != null) + entry.listener.start(index); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].start(index); + }; + /** @see #setAnimation(int, Animation, boolean) */ + 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); + }; + /** Set the current animation. Any queued animations are cleared. */ + AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) { + var current = this.expandToIndex(trackIndex); + if (current != null) + this.freeAll(current.next); + var entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + this.setCurrent(trackIndex, entry); + return entry; + }; + /** {@link #addAnimation(int, Animation, boolean, float)} */ + 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); + }; + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) { + var entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + var last = this.expandToIndex(trackIndex); + if (last != null) { + while (last.next != null) + last = last.next; + last.next = entry; + } + else + this.tracks[trackIndex] = entry; + if (delay <= 0) { + if (last != null) + delay += last.endTime - this.data.getMix(last.animation, animation); + else + delay = 0; + } + entry.delay = delay; + return entry; + }; + /** @return May be null. */ + AnimationState.prototype.getCurrent = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return null; + return this.tracks[trackIndex]; + }; + /** Adds a listener to receive events for all animations. */ + AnimationState.prototype.addListener = function (listener) { + if (listener == null) + throw new Error("listener cannot be null."); + this.listeners.push(listener); + }; + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + 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; + }; + return AnimationState; + }()); + spine.AnimationState = AnimationState; + var TrackEntry = (function () { + function TrackEntry() { + this.loop = false; + this.delay = 0; + this.time = 0; + this.lastTime = -1; + this.endTime = 0; + this.timeScale = 1; + this.mixTime = 0; + this.mixDuration = 0; + this.mix = 1; + } + TrackEntry.prototype.reset = function () { + this.next = null; + this.previous = null; + this.animation = null; + this.listener = null; + this.timeScale = 1; + this.lastTime = -1; // Trigger events on frame zero. + this.time = 0; + }; + /** Returns true if the current time is greater than the end time, regardless of looping. */ + TrackEntry.prototype.isComplete = function () { + return this.time >= this.endTime; + }; + return TrackEntry; + }()); + spine.TrackEntry = TrackEntry; + var AnimationStateAdapter = (function () { + function AnimationStateAdapter() { + } + AnimationStateAdapter.prototype.event = function (trackIndex, event) { + }; + AnimationStateAdapter.prototype.complete = function (trackIndex, loopCount) { + }; + AnimationStateAdapter.prototype.start = function (trackIndex) { + }; + AnimationStateAdapter.prototype.end = function (trackIndex) { + }; + return AnimationStateAdapter; + }()); + spine.AnimationStateAdapter = AnimationStateAdapter; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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.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; + }; + return AnimationStateData; + }()); + spine.AnimationStateData = AnimationStateData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + (function (BlendMode) { + BlendMode[BlendMode["Normal"] = 0] = "Normal"; + BlendMode[BlendMode["Additive"] = 1] = "Additive"; + BlendMode[BlendMode["Multiply"] = 2] = "Multiply"; + BlendMode[BlendMode["Screen"] = 3] = "Screen"; + })(spine.BlendMode || (spine.BlendMode = {})); + var BlendMode = spine.BlendMode; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Bone = (function () { + /** @param parent May be null. */ + function Bone(data, skeleton, parent) { + 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.appliedRotation = 0; + this.a = 0; + this.b = 0; + this.worldX = 0; + this.c = 0; + this.d = 0; + this.worldY = 0; + this.worldSignX = 0; + this.worldSignY = 0; + this.sorted = 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(); + } + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + Bone.prototype.update = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + /** Computes the world transform using the parent bone and this bone's local transform. */ + Bone.prototype.updateWorldTransform = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + /** Computes the world transform using the parent bone and the specified local transform. */ + Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) { + this.appliedRotation = rotation; + var rotationY = rotation + 90 + shearY; + var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX, lb = spine.MathUtils.cosDeg(rotationY) * scaleY; + var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX, ld = spine.MathUtils.sinDeg(rotationY) * scaleY; + var parent = this.parent; + if (parent == null) { + var skeleton = this.skeleton; + if (skeleton.flipX) { + x = -x; + la = -la; + lb = -lb; + } + if (skeleton.flipY) { + y = -y; + lc = -lc; + ld = -ld; + } + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + this.worldX = x; + this.worldY = y; + this.worldSignX = spine.MathUtils.signum(scaleX); + this.worldSignY = spine.MathUtils.signum(scaleY); + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + this.worldX = pa * x + pb * y + parent.worldX; + this.worldY = pc * x + pd * y + parent.worldY; + this.worldSignX = parent.worldSignX * spine.MathUtils.signum(scaleX); + this.worldSignY = parent.worldSignY * spine.MathUtils.signum(scaleY); + if (this.data.inheritRotation && this.data.inheritScale) { + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else { + if (this.data.inheritRotation) { + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + var cos = spine.MathUtils.cosDeg(parent.appliedRotation), sin = spine.MathUtils.sinDeg(parent.appliedRotation); + var temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + if (!parent.data.inheritRotation) + break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else if (this.data.inheritScale) { + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + var cos = spine.MathUtils.cosDeg(parent.appliedRotation), sin = spine.MathUtils.sinDeg(parent.appliedRotation); + var psx = parent.scaleX, psy = parent.scaleY; + var za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy; + var temp = pa * za + pb * zc; + pb = pb * zd - pa * zb; + pa = temp; + temp = pc * za + pd * zc; + pd = pd * zd - pc * zb; + pc = temp; + if (psx >= 0) + sin = -sin; + temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + if (!parent.data.inheritScale) + break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else { + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + } + if (this.skeleton.flipX) { + this.a = -this.a; + this.b = -this.b; + } + if (this.skeleton.flipY) { + this.c = -this.c; + this.d = -this.d; + } + } + }; + 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.c, this.a) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldRotationY = function () { + return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldScaleX = function () { + return Math.sqrt(this.a * this.a + this.b * this.b) * this.worldSignX; + }; + Bone.prototype.getWorldScaleY = function () { + return Math.sqrt(this.c * this.c + this.d * this.d) * this.worldSignY; + }; + Bone.prototype.worldToLocalRotationX = function () { + var parent = this.parent; + if (parent == null) + return this.rotation; + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, a = this.a, c = this.c; + return Math.atan2(pa * c - pc * a, pd * a - pb * c) * spine.MathUtils.radDeg; + }; + Bone.prototype.worldToLocalRotationY = function () { + var parent = this.parent; + if (parent == null) + return this.rotation; + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, b = this.b, d = this.d; + return Math.atan2(pa * d - pc * b, pd * b - pb * d) * spine.MathUtils.radDeg; + }; + Bone.prototype.rotateWorld = function (degrees) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees); + this.a = cos * a - sin * c; + this.b = cos * b - sin * d; + this.c = sin * a + cos * c; + this.d = sin * b + cos * d; + }; + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + Bone.prototype.updateLocalTransform = function () { + var parent = this.parent; + if (parent == null) { + this.x = this.worldX; + this.y = this.worldY; + this.rotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg; + this.scaleX = Math.sqrt(this.a * this.a + this.c * this.c); + this.scaleY = Math.sqrt(this.b * this.b + this.d * this.d); + var det = this.a * this.d - this.b * this.c; + this.shearX = 0; + this.shearY = Math.atan2(this.a * this.b + this.c * this.d, det) * spine.MathUtils.radDeg; + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + var pid = 1 / (pa * pd - pb * pc); + var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY; + this.x = (dx * pd * pid - dy * pb * pid); + this.y = (dy * pa * pid - dx * pc * pid); + var ia = pid * pd; + var id = pid * pa; + var ib = pid * pb; + var ic = pid * pc; + var ra = ia * this.a - ib * this.c; + var rb = ia * this.b - ib * this.d; + var rc = id * this.c - ic * this.a; + var rd = id * this.d - ic * this.b; + this.shearX = 0; + this.scaleX = Math.sqrt(ra * ra + rc * rc); + if (this.scaleX > 0.0001) { + var det = ra * rd - rb * rc; + this.scaleY = det / this.scaleX; + this.shearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg; + this.rotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg; + } + else { + this.scaleX = 0; + this.scaleY = Math.sqrt(rb * rb + rd * rd); + this.shearY = 0; + this.rotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg; + } + this.appliedRotation = this.rotation; + }; + Bone.prototype.worldToLocal = function (world) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var invDet = 1 / (a * d - b * c); + var x = world.x - this.worldX, y = world.y - this.worldY; + world.x = (x * d * invDet - y * b * invDet); + world.y = (y * a * invDet - x * c * invDet); + return world; + }; + Bone.prototype.localToWorld = function (local) { + var x = local.x, y = local.y; + local.x = x * this.a + y * this.b + this.worldX; + local.y = x * this.c + y * this.d + this.worldY; + return local; + }; + return Bone; + }()); + spine.Bone = Bone; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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.inheritRotation = true; + this.inheritScale = true; + 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; + }()); + spine.BoneData = BoneData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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; + }()); + spine.Event = Event; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var EventData = (function () { + function EventData(name) { + this.name = name; + } + return EventData; + }()); + spine.EventData = EventData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var IkConstraint = (function () { + function IkConstraint(data, skeleton) { + this.mix = 1; + this.bendDirection = 0; + this.level = 0; + 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.bendDirection = data.bendDirection; + 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.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.mix); + break; + case 2: + this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix); + break; + } + }; + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) { + var pp = bone.parent; + var id = 1 / (pp.a * pp.d - pp.b * pp.c); + var x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * pp.d - y * pp.b) * id - bone.x, ty = (y * pp.a - x * pp.c) * id - bone.y; + var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.shearX - bone.rotation; + if (bone.scaleX < 0) + rotationIK += 180; + if (rotationIK > 180) + rotationIK -= 360; + else if (rotationIK < -180) + rotationIK += 360; + bone.updateWorldTransformWith(bone.x, bone.y, bone.rotation + rotationIK * alpha, bone.scaleX, bone.scaleY, bone.shearX, bone.shearY); + }; + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, alpha) { + if (alpha == 0) { + child.updateWorldTransform(); + return; + } + var px = parent.x, py = parent.y, psx = parent.scaleX, psy = parent.scaleY, csx = child.scaleX; + 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.x, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d; + var u = Math.abs(psx - psy) <= 0.0001; + if (!u) { + cy = 0; + cwx = a * cx + parent.worldX; + cwy = c * cx + parent.worldY; + } + else { + cy = child.y; + cwx = a * cx + b * cy + parent.worldX; + cwy = c * cx + d * cy + parent.worldY; + } + var pp = parent.parent; + a = pp.a; + b = pp.b; + c = pp.c; + d = pp.d; + var id = 1 / (a * d - b * c), x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py; + x = cwx - pp.worldX; + y = cwy - pp.worldY; + 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 = 0, a2 = 0; + outer: if (u) { + l2 *= psx; + var cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2); + if (cos < -1) + cos = -1; + else if (cos > 1) + cos = 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, dd = tx * tx + ty * ty, 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 = 0, minDist = Number.MAX_VALUE, minX = 0, minY = 0; + var maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0; + x = l1 + a; + d = x * x; + if (d > maxDist) { + maxAngle = 0; + maxDist = d; + maxX = x; + } + x = l1 - a; + d = x * x; + if (d < minDist) { + minAngle = spine.MathUtils.PI; + minDist = d; + minX = x; + } + var angle = Math.acos(-a * l1 / (aa - bb)); + x = a * Math.cos(angle) + l1; + y = b * Math.sin(angle); + d = x * x + y * y; + if (d < minDist) { + minAngle = angle; + minDist = d; + minX = x; + minY = y; + } + if (d > maxDist) { + maxAngle = angle; + 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.rotation; + a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation; + if (a1 > 180) + a1 -= 360; + else if (a1 < -180) + a1 += 360; + parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.scaleX, parent.scaleY, 0, 0); + rotation = child.rotation; + a2 = ((a2 + os) * spine.MathUtils.radDeg - child.shearX) * s2 + os2 - rotation; + if (a2 > 180) + a2 -= 360; + else if (a2 < -180) + a2 += 360; + child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.scaleX, child.scaleY, child.shearX, child.shearY); + }; + return IkConstraint; + }()); + spine.IkConstraint = IkConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var IkConstraintData = (function () { + function IkConstraintData(name) { + this.bones = new Array(); + this.bendDirection = 1; + this.mix = 1; + this.name = name; + } + return IkConstraintData; + }()); + spine.IkConstraintData = IkConstraintData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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(); + 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.apply = function () { + this.update(); + }; + PathConstraint.prototype.update = function () { + var attachment = this.target.getAttachment(); + if (!(attachment instanceof spine.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 == spine.SpacingMode.Length; + var rotateMode = data.rotateMode; + var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale; + var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1; + var bones = this.bones; + var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null; + var spacing = this.spacing; + if (scale || lengthSpacing) { + if (scale) + lengths = spine.Utils.setArraySize(this.lengths, boneCount); + for (var i = 0, n = spacesCount - 1; i < n;) { + var bone = bones[i]; + var length_1 = bone.data.length, x = length_1 * bone.a, y = length_1 * bone.c; + length_1 = Math.sqrt(x * x + y * y); + if (scale) + lengths[i] = length_1; + spaces[++i] = lengthSpacing ? Math.max(0, length_1 + spacing) : spacing; + } + } + else { + for (var i = 1; i < spacesCount; i++) + spaces[i] = spacing; + } + var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, spacingMode == spine.SpacingMode.Percent); + var skeleton = this.target.bone.skeleton; + var skeletonX = skeleton.x, skeletonY = skeleton.y; + var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; + var tip = rotateMode == spine.RotateMode.Chain && offsetRotation == 0; + for (var i = 0, p = 3; i < boneCount; i++, p += 3) { + var bone = bones[i]; + bone.worldX += (boneX - skeletonX - bone.worldX) * translateMix; + bone.worldY += (boneY - skeletonY - bone.worldY) * 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; + bone.a *= s; + bone.c *= s; + } + } + boneX = x; + boneY = y; + if (rotate) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.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) - offsetRotation * spine.MathUtils.degRad; + 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; + } + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + cos = Math.cos(r); + sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + } + }; + PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) { + var target = this.target; + var position = this.position; + var spaces = this.spaces, out = spine.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 = spine.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.computeWorldVerticesWith(target, 2, 4, world, 0); + } + this.addBeforePosition(p, world, 0, out, o); + continue; + } + else if (p > pathLength_1) { + if (prevCurve != PathConstraint.AFTER) { + prevCurve = PathConstraint.AFTER; + path.computeWorldVerticesWith(target, verticesLength - 6, 4, world, 0); + } + this.addAfterPosition(p - pathLength_1, world, 0, out, o); + continue; + } + // Determine curve containing position. + 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.computeWorldVerticesWith(target, verticesLength - 4, 4, world, 0); + path.computeWorldVerticesWith(target, 0, 4, world, 4); + } + else + path.computeWorldVerticesWith(target, curve * 6 + 2, 8, world, 0); + } + 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; + } + // World vertices. + if (closed) { + verticesLength += 2; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength - 4, world, 0); + path.computeWorldVerticesWith(target, 0, 2, world, verticesLength - 4); + world[verticesLength - 2] = world[0]; + world[verticesLength - 1] = world[1]; + } + else { + curveCount--; + verticesLength -= 4; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength, world, 0); + } + // Curve lengths. + var curves = spine.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; + } + // Determine curve containing position. + 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; + } + // Curve segment lengths. + 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; + } + // Weight by segment length. + 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) + 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; + return PathConstraint; + }()); + spine.PathConstraint = PathConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var PathConstraintData = (function () { + function PathConstraintData(name) { + this.bones = new Array(); + this.name = name; + } + return PathConstraintData; + }()); + spine.PathConstraintData = PathConstraintData; + (function (PositionMode) { + PositionMode[PositionMode["Fixed"] = 0] = "Fixed"; + PositionMode[PositionMode["Percent"] = 1] = "Percent"; + })(spine.PositionMode || (spine.PositionMode = {})); + var PositionMode = spine.PositionMode; + (function (SpacingMode) { + SpacingMode[SpacingMode["Length"] = 0] = "Length"; + SpacingMode[SpacingMode["Fixed"] = 1] = "Fixed"; + SpacingMode[SpacingMode["Percent"] = 2] = "Percent"; + })(spine.SpacingMode || (spine.SpacingMode = {})); + var SpacingMode = spine.SpacingMode; + (function (RotateMode) { + RotateMode[RotateMode["Tangent"] = 0] = "Tangent"; + RotateMode[RotateMode["Chain"] = 1] = "Chain"; + RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale"; + })(spine.RotateMode || (spine.RotateMode = {})); + var RotateMode = spine.RotateMode; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Skeleton = (function () { + function Skeleton(data) { + this._updateCache = new Array(); + this.time = 0; + this.flipX = false; + this.flipY = false; + 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 spine.Bone(boneData, this, null); + else { + var parent_1 = this.bones[boneData.parent.index]; + bone = new spine.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 spine.Slot(slotData, bone); + this.slots.push(slot); + this.drawOrder.push(slot); + } + this.ikConstraints = new Array(); + this.ikConstraintsSorted = new Array(); + for (var i = 0; i < data.ikConstraints.length; i++) { + var ikConstraintData = data.ikConstraints[i]; + this.ikConstraints.push(new spine.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 spine.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 spine.PathConstraint(pathConstraintData, this)); + } + this.color = new spine.Color(1, 1, 1, 1); + this.updateCache(); + } + Skeleton.prototype.updateCache = function () { + var updateCache = this._updateCache; + updateCache.length = 0; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + bones[i].sorted = false; + // IK first, lowest hierarchy depth first. + var ikConstraints = this.ikConstraintsSorted; + ikConstraints.length = 0; + for (var i = 0; i < this.ikConstraints.length; i++) + ikConstraints.push(this.ikConstraints[i]); + var ikCount = ikConstraints.length; + for (var i = 0, level = 0, n = ikCount; i < n; i++) { + var ik = ikConstraints[i]; + var bone = ik.bones[0].parent; + for (level = 0; bone != null; level++) + bone = bone.parent; + ik.level = level; + } + for (var i = 1, ii = 0; i < ikCount; i++) { + var ik = ikConstraints[i]; + var level = ik.level; + for (ii = i - 1; ii >= 0; ii--) { + var other = ikConstraints[ii]; + if (other.level < level) + break; + ikConstraints[ii + 1] = other; + } + ikConstraints[ii + 1] = ik; + } + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var constraint = ikConstraints[i]; + var target = constraint.target; + this.sortBone(target); + var constrained = constraint.bones; + var parent_2 = constrained[0]; + this.sortBone(parent_2); + updateCache.push(constraint); + this.sortReset(parent_2.children); + constrained[constrained.length - 1].sorted = true; + } + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + 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 ii = 0, nn = this.data.skins.length; ii < nn; ii++) + this.sortPathConstraintAttachment(this.data.skins[ii], slotIndex, slotBone); + var attachment = slot.getAttachment(); + if (attachment instanceof spine.PathAttachment) + this.sortPathConstraintAttachmentWith(attachment, slotBone); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + 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; + } + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + this.sortBone(constraint.target); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + 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; + } + for (var i = 0, n = bones.length; i < n; i++) + this.sortBone(bones[i]); + }; + 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 spine.PathAttachment)) + return; + var pathBones = attachment.bones; + if (pathBones == null) + this.sortBone(slotBone); + else { + var bones = this.bones; + for (var i = 0; i < pathBones.length; 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.sorted) + this.sortReset(bone.children); + bone.sorted = false; + } + }; + /** Updates the world transform for each bone and applies constraints. */ + Skeleton.prototype.updateWorldTransform = function () { + var updateCache = this._updateCache; + for (var i = 0, n = updateCache.length; i < n; i++) + updateCache[i].update(); + }; + /** Sets the bones, constraints, and slots to their setup pose values. */ + Skeleton.prototype.setToSetupPose = function () { + this.setBonesToSetupPose(); + this.setSlotsToSetupPose(); + }; + /** Sets the bones and constraints to their setup pose values. */ + 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.bendDirection = constraint.data.bendDirection; + constraint.mix = constraint.data.mix; + } + 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; + spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length); + for (var i = 0, n = slots.length; i < n; i++) + slots[i].setToSetupPose(); + }; + /** @return May return null. */ + Skeleton.prototype.getRootBone = function () { + if (this.bones.length == 0) + return null; + return this.bones[0]; + }; + /** @return May be null. */ + 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; + }; + /** @return -1 if the bone was not found. */ + 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; + }; + /** @return May be null. */ + 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; + }; + /** @return -1 if the bone was not found. */ + 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; + }; + /** Sets a skin by name. + * @see #setSkin(Skin) */ + Skeleton.prototype.setSkinByName = function (skinName) { + var skin = this.data.findSkin(skinName); + if (skin == null) + throw new Error("Skin not found: " + skinName); + this.setSkin(skin); + }; + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + Skeleton.prototype.setSkin = function (newSkin) { + 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; + }; + /** @return May be null. */ + Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) { + return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName); + }; + /** @return May be null. */ + 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; + }; + /** @param attachmentName May be 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); + }; + /** @return May be null. */ + 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; + }; + /** @return May be 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; + }; + /** @return May be 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; + }; + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + Skeleton.prototype.getBounds = function (offset, size) { + 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]; + var vertices = null; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.RegionAttachment) + vertices = attachment.updateWorldVertices(slot, false); + else if (attachment instanceof spine.MeshAttachment) + vertices = attachment.updateWorldVertices(slot, true); + if (vertices != null) { + for (var ii = 0, nn = vertices.length; ii < nn; ii += 5) { + 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; + }; + return Skeleton; + }()); + spine.Skeleton = Skeleton; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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 spine.Pool(function () { + return spine.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]; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.BoundingBoxAttachment) { + var boundingBox = attachment; + boundingBoxes.push(boundingBox); + var polygon = polygonPool.obtain(); + if (polygon.length != boundingBox.worldVerticesLength) { + polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength); + } + polygons.push(polygon); + boundingBox.computeWorldVertices(slot, polygon); + } + } + if (updateAabb) + this.aabbCompute(); + }; + 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; + }; + /** Returns true if the axis aligned bounding box contains the point. */ + SkeletonBounds.prototype.aabbContainsPoint = function (x, y) { + return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY; + }; + /** Returns true if the axis aligned bounding box intersects the line segment. */ + 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; + }; + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) { + return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY; + }; + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + 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; + }; + /** Returns true if the polygon contains the point. */ + 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; + }; + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + 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; + }; + /** Returns true if the polygon contains any part of the line segment. */ + 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; + }; + /** Returns the polygon for the specified bounding box, or null. */ + 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]; + }; + return SkeletonBounds; + }()); + spine.SkeletonBounds = SkeletonBounds; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SkeletonData = (function () { + function SkeletonData() { + this.bones = new Array(); // Ordered parents first. + this.slots = new Array(); // Setup pose draw order. + this.skins = new Array(); + this.events = new Array(); + this.animations = new Array(); + this.ikConstraints = new Array(); + this.transformConstraints = new Array(); + this.pathConstraints = new Array(); + } + 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_2 = events[i]; + if (event_2.name == eventDataName) + return event_2; + } + 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; + }()); + spine.SkeletonData = SkeletonData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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 spine.SkeletonData(); + var root = JSON.parse(json); + // Skeleton + var skeletonMap = root.skeleton; + if (skeletonMap != null) { + skeletonData.hash = skeletonMap.hash; + skeletonData.version = skeletonMap.spine; + skeletonData.width = skeletonMap.width; + skeletonData.height = skeletonMap.height; + skeletonData.imagesPath = skeletonMap.images; + } + // Bones + if (root.bones) { + for (var i = 0; i < root.bones.length; i++) { + var boneMap = root.bones[i]; + var parent_3 = null; + var parentName = this.getValue(boneMap, "parent", null); + if (parentName != null) { + parent_3 = skeletonData.findBone(parentName); + if (parent_3 == null) + throw new Error("Parent bone not found: " + parentName); + } + var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_3); + 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.inheritRotation = this.getValue(boneMap, "inheritRotation", true); + data.inheritScale = this.getValue(boneMap, "inheritScale", true); + skeletonData.bones.push(data); + } + } + // Slots. + 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 spine.SlotData(skeletonData.slots.length, slotName, boneData); + var color = slotMap.color ? slotMap.color : null; + if (color != null) + data.color.setFromString(color); + data.attachmentName = this.getValue(slotMap, "attachment", null); + data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal")); + skeletonData.slots.push(data); + } + } + // IK constraints + if (root.ik) { + for (var i = 0; i < root.ik.length; i++) { + var constraintMap = root.ik[i]; + var data = new spine.IkConstraintData(constraintMap.name); + 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.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1; + data.mix = constraintMap.mix ? constraintMap.mix : 1; + skeletonData.ikConstraints.push(data); + } + } + // Transform constraints. + if (root.transform) { + for (var i = 0; i < root.transform.length; i++) { + var constraintMap = root.transform[i]; + var data = new spine.TransformConstraintData(constraintMap.name); + 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.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); + } + } + // Path constraints. + if (root.path) { + for (var i = 0; i < root.path.length; i++) { + var constraintMap = root.path[i]; + var data = new spine.PathConstraintData(constraintMap.name); + 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 == spine.PositionMode.Fixed) + data.position *= scale; + data.spacing = this.getValue(constraintMap, "spacing", 0); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + data.spacing *= scale; + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + skeletonData.pathConstraints.push(data); + } + } + // Skins. + if (root.skins) { + for (var skinName in root.skins) { + var skinMap = root.skins[skinName]; + var skin = new spine.Skin(skinName); + for (var slotName in skinMap) { + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotName); + var slotMap = skinMap[slotName]; + for (var entryName in slotMap) { + var attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName); + if (attachment != null) + skin.addAttachment(slotIndex, entryName, attachment); + } + } + skeletonData.skins.push(skin); + if (skin.name == "default") + skeletonData.defaultSkin = skin; + } + } + // Linked meshes. + 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_4 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); + if (parent_4 == null) + throw new Error("Parent mesh not found: " + linkedMesh.parent); + linkedMesh.mesh.setParentMesh(parent_4); + linkedMesh.mesh.updateUVs(); + } + this.linkedMeshes.length = 0; + // Events. + if (root.events) { + for (var eventName in root.events) { + var eventMap = root.events[eventName]; + var data = new spine.EventData(eventName); + data.intValue = this.getValue(eventMap, "int", 0); + data.floatValue = this.getValue(eventMap, "float", 0); + data.stringValue = this.getValue(eventMap, "string", null); + skeletonData.events.push(data); + } + } + // Animations. + 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) { + 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); + region.updateOffset(); + return region; + } + case "boundingbox": { + var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); + if (box == null) + return null; + this.readVertices(map, box, map.vertexCount << 1); + 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); + var parent_5 = this.getValue(map, "parent", null); + if (parent_5 != null) { + mesh.inheritDeform = this.getValue(map, "deform", true); + this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent_5)); + return mesh; + } + var uvs = map.uvs; + this.readVertices(map, mesh, uvs.length); + mesh.triangles = map.triangles; + mesh.regionUVs = uvs; + mesh.updateUVs(); + 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 = spine.Utils.newArray(vertexCount / 3, 0); + for (var i = 0; i < map.lengths.length; i++) + lengths[i++] = map.lengths[i] * scale; + path.lengths = lengths; + return path; + } + } + return null; + }; + SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) { + var scale = this.scale; + attachment.worldVerticesLength = verticesLength; + var vertices = map.vertices; + if (verticesLength == vertices.length) { + if (scale != 1) { + for (var i = 0, n = vertices.length; i < n; i++) + vertices[i] *= scale; + } + attachment.vertices = spine.Utils.toFloatArray(vertices); + 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 = spine.Utils.toFloatArray(weights); + }; + SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) { + var scale = this.scale; + var timelines = new Array(); + var duration = 0; + // Slot timelines. + 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 == "color") { + var timeline = new spine.ColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var color = new spine.Color(); + color.setFromString(valueMap.color); + timeline.setFrame(frameIndex, valueMap.time, 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) * spine.ColorTimeline.ENTRIES]); + } + else if (timelineName = "attachment") { + var timeline = new spine.AttachmentTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex++, valueMap.time, valueMap.name); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + else + throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); + } + } + } + // Bone timelines. + 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 spine.RotateTimeline(timelineMap.length); + timeline.boneIndex = boneIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, valueMap.angle); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]); + } + else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") { + var timeline = null; + var timelineScale = 1; + if (timelineName === "scale") + timeline = new spine.ScaleTimeline(timelineMap.length); + else if (timelineName === "shear") + timeline = new spine.ShearTimeline(timelineMap.length); + else { + timeline = new spine.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", 0), y = this.getValue(valueMap, "y", 0); + timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]); + } + else + throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); + } + } + } + // IK constraint timelines. + if (map.ik) { + for (var constraintName in map.ik) { + var constraintMap = map.ik[constraintName]; + var constraint = skeletonData.findIkConstraint(constraintName); + var timeline = new spine.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, valueMap.time, this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "bendPositive", true) ? 1 : -1); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]); + } + } + // Transform constraint timelines. + if (map.transform) { + for (var constraintName in map.transform) { + var constraintMap = map.transform[constraintName]; + var constraint = skeletonData.findTransformConstraint(constraintName); + var timeline = new spine.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, valueMap.time, 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) * spine.TransformConstraintTimeline.ENTRIES]); + } + } + // Path constraint timelines. + if (map.paths) { + for (var constraintName in map.paths) { + var constraintMap = map.paths[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 spine.PathConstraintSpacingTimeline(timelineMap.length); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + timelineScale = scale; + } + else { + timeline = new spine.PathConstraintPositionTimeline(timelineMap.length); + if (data.positionMode == spine.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, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]); + } + else if (timelineName === "mix") { + var timeline = new spine.PathConstraintMixTimeline(timelineMap.length); + timeline.pathConstraintIndex = index; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, 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) * spine.PathConstraintMixTimeline.ENTRIES]); + } + } + } + } + // Deform timelines. + 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 spine.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 ? spine.Utils.newFloatArray(deformLength) : vertices; + else { + deform = spine.Utils.newFloatArray(deformLength); + var start = this.getValue(valueMap, "offset", 0); + spine.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, valueMap.time, deform); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + } + } + } + // Draw order timeline. + var drawOrderNode = map.drawOrder; + if (drawOrderNode == null) + drawOrderNode = map.draworder; + if (drawOrderNode != null) { + var timeline = new spine.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 = spine.Utils.newArray(slotCount, -1); + var unchanged = spine.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); + // Collect unchanged items. + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + // Set changed items. + drawOrder[originalIndex + offsetMap.offset] = originalIndex++; + } + // Collect remaining unchanged items. + while (originalIndex < slotCount) + unchanged[unchangedIndex++] = originalIndex++; + // Fill in unchanged items. + for (var i = slotCount - 1; i >= 0; i--) + if (drawOrder[i] == -1) + drawOrder[i] = unchanged[--unchangedIndex]; + } + timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + // Event timeline. + if (map.events) { + var timeline = new spine.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_3 = new spine.Event(eventMap.time, eventData); + event_3.intValue = this.getValue(eventMap, "int", eventData.intValue); + event_3.floatValue = this.getValue(eventMap, "float", eventData.floatValue); + event_3.stringValue = this.getValue(eventMap, "string", eventData.stringValue); + timeline.setFrame(frameIndex++, event_3); + } + 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 spine.Animation(name, timelines, duration)); + }; + SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { + if (!map.curve) + return; + if (map.curve === "stepped") + timeline.setStepped(frameIndex); + else if (Object.prototype.toString.call(map.curve) === '[object Array]') { + var curve = map.curve; + timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]); + } + }; + 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 spine.BlendMode.Normal; + if (str == "additive") + return spine.BlendMode.Additive; + if (str == "multiply") + return spine.BlendMode.Multiply; + if (str == "screen") + return spine.BlendMode.Screen; + throw new Error("Unknown blend mode: " + str); + }; + SkeletonJson.positionModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "fixed") + return spine.PositionMode.Fixed; + if (str == "percent") + return spine.PositionMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.spacingModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "length") + return spine.SpacingMode.Length; + if (str == "fixed") + return spine.SpacingMode.Fixed; + if (str == "percent") + return spine.SpacingMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.rotateModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "tangent") + return spine.RotateMode.Tangent; + if (str == "chain") + return spine.RotateMode.Chain; + if (str == "chainscale") + return spine.RotateMode.ChainScale; + throw new Error("Unknown rotate mode: " + str); + }; + return SkeletonJson; + }()); + spine.SkeletonJson = SkeletonJson; + var LinkedMesh = (function () { + function LinkedMesh(mesh, skin, slotIndex, parent) { + this.mesh = mesh; + this.skin = skin; + this.slotIndex = slotIndex; + this.parent = parent; + } + return LinkedMesh; + }()); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Skin = (function () { + function Skin(name) { + this.attachments = new Array(); + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + Skin.prototype.addAttachment = 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; + }; + /** @return May be null. */ + Skin.prototype.getAttachment = function (slotIndex, name) { + var dictionary = this.attachments[slotIndex]; + return dictionary ? dictionary[name] : null; + }; + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + 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, name); + if (attachment != null) + slot.setAttachment(attachment); + break; + } + } + } + slotIndex++; + } + }; + return Skin; + }()); + spine.Skin = Skin; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Slot = (function () { + function Slot(data, bone) { + this.attachmentVertices = 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 spine.Color(); + this.setToSetupPose(); + } + /** @return May be null. */ + Slot.prototype.getAttachment = function () { + return this.attachment; + }; + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + Slot.prototype.setAttachment = function (attachment) { + if (this.attachment == attachment) + return; + this.attachment = attachment; + this.attachmentTime = this.bone.skeleton.time; + this.attachmentVertices.length = 0; + }; + Slot.prototype.setAttachmentTime = function (time) { + this.attachmentTime = this.bone.skeleton.time - time; + }; + /** Returns the time since the attachment was set. */ + Slot.prototype.getAttachmentTime = function () { + return this.bone.skeleton.time - this.attachmentTime; + }; + Slot.prototype.setToSetupPose = function () { + this.color.setFromColor(this.data.color); + 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; + }()); + spine.Slot = Slot; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SlotData = (function () { + function SlotData(index, name, boneData) { + this.color = new spine.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; + }()); + spine.SlotData = SlotData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TransformConstraint = (function () { + function TransformConstraint(data, skeleton) { + this.rotateMix = 0; + this.translateMix = 0; + this.scaleMix = 0; + this.shearMix = 0; + this.temp = new spine.Vector2(); + 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.apply = function () { + this.update(); + }; + TransformConstraint.prototype.update = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + var ta = target.a, tb = target.b, tc = target.c, td = target.d; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (rotateMix > 0) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var r = Math.atan2(tc, ta) - Math.atan2(c, a) + this.data.offsetRotation * spine.MathUtils.degRad; + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + var cos = Math.cos(r), sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + if (translateMix > 0) { + var temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + bone.worldX += (temp.x - bone.worldX) * translateMix; + bone.worldY += (temp.y - bone.worldY) * translateMix; + } + if (scaleMix > 0) { + var bs = Math.sqrt(bone.a * bone.a + bone.c * bone.c); + var ts = Math.sqrt(ta * ta + tc * tc); + var s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleX) * scaleMix) / bs : 0; + bone.a *= s; + bone.c *= s; + bs = Math.sqrt(bone.b * bone.b + bone.d * bone.d); + ts = Math.sqrt(tb * tb + td * td); + s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleY) * scaleMix) / bs : 0; + bone.b *= s; + bone.d *= s; + } + if (shearMix > 0) { + var b = bone.b, d = bone.d; + var by = Math.atan2(d, b); + var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a)); + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r = by + (r + this.data.offsetShearY * spine.MathUtils.degRad) * shearMix; + var s = Math.sqrt(b * b + d * d); + bone.b = Math.cos(r) * s; + bone.d = Math.sin(r) * s; + } + } + }; + return TransformConstraint; + }()); + spine.TransformConstraint = TransformConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TransformConstraintData = (function () { + function TransformConstraintData(name) { + 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; + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return TransformConstraintData; + }()); + spine.TransformConstraintData = TransformConstraintData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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(); + }; + Color.prototype.setFromColor = function (c) { + this.r = c.r; + this.g = c.g; + this.b = c.b; + this.a = c.a; + }; + 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; + }; + Color.prototype.add = function (r, g, b, a) { + this.r += r; + this.g += g; + this.b += b; + this.a += a; + this.clamp(); + }; + 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; + }; + return Color; + }()); + spine.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 : -1; + }; + MathUtils.toInt = function (x) { + return x > 0 ? Math.floor(x) : Math.ceil(x); + }; + 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; + }()); + spine.MathUtils = MathUtils; + 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.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.toFloatArray = function (array) { + return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array; + }; + Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined"; + return Utils; + }()); + spine.Utils = Utils; + var Pool = (function () { + function Pool(instantiator) { + this._items = new Array(16); + this._instantiator = instantiator; + } + Pool.prototype.obtain = function () { + return this._items.length > 0 ? this._items.pop() : this._instantiator(); + }; + Pool.prototype.free = function (item) { + this._items.push(item); + }; + Pool.prototype.freeAll = function (items) { + for (var i = 0; i < items.length; i++) + this._items[i] = items[i]; + }; + Pool.prototype.clear = function () { + this._items.length = 0; + }; + return Pool; + }()); + spine.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; + }; + return Vector2; + }()); + spine.Vector2 = Vector2; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Attachment = (function () { + function Attachment(name) { + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return Attachment; + }()); + spine.Attachment = Attachment; + var VertexAttachment = (function (_super) { + __extends(VertexAttachment, _super); + function VertexAttachment(name) { + _super.call(this, name); + this.worldVerticesLength = 0; + } + VertexAttachment.prototype.computeWorldVertices = function (slot, worldVertices) { + this.computeWorldVerticesWith(slot, 0, this.worldVerticesLength, worldVertices, 0); + }; + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + VertexAttachment.prototype.computeWorldVerticesWith = function (slot, start, count, worldVertices, offset) { + count += offset; + var skeleton = slot.bone.skeleton; + var x = skeleton.x, y = skeleton.y; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices; + var bones = this.bones; + if (bones == null) { + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v_1 = start, w = offset; w < count; v_1 += 2, w += 2) { + 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 += 2) { + var wx = x, wy = y; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * 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 += 2) { + var wx = x, wy = y; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + }; + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + VertexAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment; + }; + return VertexAttachment; + }(Attachment)); + spine.VertexAttachment = VertexAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + (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"; + })(spine.AttachmentType || (spine.AttachmentType = {})); + var AttachmentType = spine.AttachmentType; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var BoundingBoxAttachment = (function (_super) { + __extends(BoundingBoxAttachment, _super); + function BoundingBoxAttachment(name) { + _super.call(this, name); + } + return BoundingBoxAttachment; + }(spine.VertexAttachment)); + spine.BoundingBoxAttachment = BoundingBoxAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var MeshAttachment = (function (_super) { + __extends(MeshAttachment, _super); + function MeshAttachment(name) { + _super.call(this, name); + this.color = new spine.Color(1, 1, 1, 1); + this.inheritDeform = false; + this.tempColor = new spine.Color(0, 0, 0, 0); + } + MeshAttachment.prototype.updateUVs = function () { + var regionUVs = this.regionUVs; + var verticesLength = regionUVs.length; + var worldVerticesLength = (verticesLength >> 1) * 8; + if (this.worldVertices == null || this.worldVertices.length != worldVerticesLength) + this.worldVertices = spine.Utils.newFloatArray(worldVerticesLength); + var u = 0, v = 0, width = 0, height = 0; + if (this.region == null) { + u = v = 0; + width = height = 1; + } + else { + u = this.region.u; + v = this.region.v; + width = this.region.u2 - u; + height = this.region.v2 - v; + } + if (this.region.rotate) { + for (var i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i + 1] * width; + this.worldVertices[w + 1] = v + height - regionUVs[i] * height; + } + } + else { + for (var i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i] * width; + this.worldVertices[w + 1] = v + regionUVs[i + 1] * height; + } + } + }; + /** @return The updated world vertices. */ + MeshAttachment.prototype.updateWorldVertices = function (slot, premultipliedAlpha) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color, slotColor = slot.color, meshColor = this.color; + var alpha = skeletonColor.a * slotColor.a * meshColor.a; + var multiplier = premultipliedAlpha ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * meshColor.r * multiplier, skeletonColor.g * slotColor.g * meshColor.g * multiplier, skeletonColor.b * slotColor.b * meshColor.b * multiplier, alpha); + var x = skeleton.x, y = skeleton.y; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices, worldVertices = this.worldVertices; + var bones = this.bones; + if (bones == null) { + var verticesLength = vertices.length; + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v = 0, w = 0; v < verticesLength; v += 2, w += 8) { + var vx = vertices[v], vy = vertices[v + 1]; + worldVertices[w] = vx * a + vy * b + x; + worldVertices[w + 1] = vx * c + vy * d + y; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + return worldVertices; + } + var skeletonBones = skeleton.bones; + if (deformArray.length == 0) { + for (var w = 0, v = 0, b = 0, n = bones.length; v < n; w += 8) { + var wx = x, wy = y; + var nn = bones[v++] + v; + for (; v < nn; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + else { + var deform = deformArray; + for (var w = 0, v = 0, b = 0, f = 0, n = bones.length; v < n; w += 8) { + var wx = x, wy = y; + var nn = bones[v++] + v; + for (; v < nn; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + return worldVertices; + }; + MeshAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment || (this.inheritDeform && this._parentMesh == sourceAttachment); + }; + MeshAttachment.prototype.getParentMesh = function () { + return this._parentMesh; + }; + /** @param parentMesh May be null. */ + MeshAttachment.prototype.setParentMesh = function (parentMesh) { + this._parentMesh = parentMesh; + if (parentMesh != null) { + this.bones = parentMesh.bones; + this.vertices = parentMesh.vertices; + this.regionUVs = parentMesh.regionUVs; + this.triangles = parentMesh.triangles; + this.hullLength = parentMesh.hullLength; + } + }; + return MeshAttachment; + }(spine.VertexAttachment)); + spine.MeshAttachment = MeshAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var PathAttachment = (function (_super) { + __extends(PathAttachment, _super); + function PathAttachment(name) { + _super.call(this, name); + this.closed = false; + this.constantSpeed = false; + } + return PathAttachment; + }(spine.VertexAttachment)); + spine.PathAttachment = PathAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var RegionAttachment = (function (_super) { + __extends(RegionAttachment, _super); + function RegionAttachment(name) { + _super.call(this, name); + this.x = 0; + this.y = 0; + this.scaleX = 1; + this.scaleY = 1; + this.rotation = 0; + this.width = 0; + this.height = 0; + this.color = new spine.Color(1, 1, 1, 1); + this.offset = spine.Utils.newFloatArray(8); + this.vertices = spine.Utils.newFloatArray(8 * 4); + this.tempColor = new spine.Color(1, 1, 1, 1); + } + RegionAttachment.prototype.setRegion = function (region) { + var vertices = this.vertices; + if (region.rotate) { + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v2; + vertices[RegionAttachment.U3] = region.u; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v; + vertices[RegionAttachment.U1] = region.u2; + vertices[RegionAttachment.V1] = region.v2; + } + else { + vertices[RegionAttachment.U1] = region.u; + vertices[RegionAttachment.V1] = region.v2; + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v; + vertices[RegionAttachment.U3] = region.u2; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v2; + } + }; + 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.updateWorldVertices = function (slot, premultipliedAlpha) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color; + var slotColor = slot.color; + var regionColor = this.color; + var alpha = skeletonColor.a * slotColor.a * regionColor.a; + var multiplier = premultipliedAlpha ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha); + var vertices = this.vertices; + var offset = this.offset; + var bone = slot.bone; + var x = skeleton.x + bone.worldX, y = skeleton.y + bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var offsetX = 0, offsetY = 0; + offsetX = offset[RegionAttachment.OX1]; + offsetY = offset[RegionAttachment.OY1]; + vertices[RegionAttachment.X1] = offsetX * a + offsetY * b + x; // br + vertices[RegionAttachment.Y1] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C1R] = color.r; + vertices[RegionAttachment.C1G] = color.g; + vertices[RegionAttachment.C1B] = color.b; + vertices[RegionAttachment.C1A] = color.a; + offsetX = offset[RegionAttachment.OX2]; + offsetY = offset[RegionAttachment.OY2]; + vertices[RegionAttachment.X2] = offsetX * a + offsetY * b + x; // bl + vertices[RegionAttachment.Y2] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C2R] = color.r; + vertices[RegionAttachment.C2G] = color.g; + vertices[RegionAttachment.C2B] = color.b; + vertices[RegionAttachment.C2A] = color.a; + offsetX = offset[RegionAttachment.OX3]; + offsetY = offset[RegionAttachment.OY3]; + vertices[RegionAttachment.X3] = offsetX * a + offsetY * b + x; // ul + vertices[RegionAttachment.Y3] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C3R] = color.r; + vertices[RegionAttachment.C3G] = color.g; + vertices[RegionAttachment.C3B] = color.b; + vertices[RegionAttachment.C3A] = color.a; + offsetX = offset[RegionAttachment.OX4]; + offsetY = offset[RegionAttachment.OY4]; + vertices[RegionAttachment.X4] = offsetX * a + offsetY * b + x; // ur + vertices[RegionAttachment.Y4] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C4R] = color.r; + vertices[RegionAttachment.C4G] = color.g; + vertices[RegionAttachment.C4B] = color.b; + vertices[RegionAttachment.C4A] = color.a; + return vertices; + }; + 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; + }(spine.Attachment)); + spine.RegionAttachment = RegionAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TextureRegion = (function () { + function TextureRegion() { + this.u = 0; + this.v = 0; + this.u2 = 0; + this.v2 = 0; + this.width = 0; + this.height = 0; + this.rotate = false; + this.offsetX = 0; + this.offsetY = 0; + this.originalWidth = 0; + this.originalHeight = 0; + } + return TextureRegion; + }()); + spine.TextureRegion = TextureRegion; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var AssetManager = (function () { + function AssetManager(gl) { + this._assets = {}; + this._errors = {}; + this._toLoad = 0; + this._loaded = 0; + this._gl = gl; + } + AssetManager.prototype.loadText = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + this._toLoad++; + var request = new XMLHttpRequest(); + request.onreadystatechange = function () { + if (request.readyState == XMLHttpRequest.DONE) { + if (request.status >= 200 && request.status < 300) { + if (success) + success(path, request.responseText); + _this._assets[path] = request.responseText; + } + else { + if (error) + error(path, "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText); + _this._errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + } + _this._toLoad--; + _this._loaded++; + } + }; + request.open("GET", path, true); + request.send(); + }; + AssetManager.prototype.loadTexture = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + this._toLoad++; + var img = new Image(); + img.src = path; + img.onload = function (ev) { + if (success) + success(path, img); + var texture = new webgl.Texture(_this._gl, img); + _this._assets[path] = texture; + _this._toLoad--; + _this._loaded++; + }; + img.onerror = function (ev) { + if (error) + error(path, "Couldn't load image " + path); + _this._errors[path] = "Couldn't load image " + path; + _this._toLoad--; + _this._loaded++; + }; + }; + AssetManager.prototype.get = function (path) { + return this._assets[path]; + }; + AssetManager.prototype.remove = function (path) { + var asset = this._assets[path]; + if (asset instanceof webgl.Texture) { + asset.dispose(); + } + this._assets[path] = null; + }; + AssetManager.prototype.removeAll = function () { + for (var key in this._assets) { + var asset = this._assets[key]; + if (asset instanceof webgl.Texture) + asset.dispose(); + } + this._assets = {}; + }; + AssetManager.prototype.isLoadingComplete = function () { + return this._toLoad == 0; + }; + AssetManager.prototype.toLoad = function () { + return this._toLoad; + }; + AssetManager.prototype.loaded = function () { + return this._loaded; + }; + AssetManager.prototype.dispose = function () { + this.removeAll(); + }; + AssetManager.prototype.hasErrors = function () { + return Object.keys(this._errors).length > 0; + }; + AssetManager.prototype.errors = function () { + return this._errors; + }; + return AssetManager; + }()); + webgl.AssetManager = AssetManager; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + webgl.M00 = 0; + webgl.M01 = 4; + webgl.M02 = 8; + webgl.M03 = 12; + webgl.M10 = 1; + webgl.M11 = 5; + webgl.M12 = 9; + webgl.M13 = 13; + webgl.M20 = 2; + webgl.M21 = 6; + webgl.M22 = 10; + webgl.M23 = 14; + webgl.M30 = 3; + webgl.M31 = 7; + webgl.M32 = 11; + webgl.M33 = 15; + var Matrix4 = (function () { + function Matrix4() { + this.temp = new Float32Array(16); + this.values = new Float32Array(16); + var v = this.values; + v[webgl.M00] = 1; + v[webgl.M11] = 1; + v[webgl.M22] = 1; + v[webgl.M33] = 1; + } + Matrix4.prototype.set = function (values) { + this.values.set(values); + return this; + }; + Matrix4.prototype.transpose = function () { + var t = this.temp; + var v = this.values; + t[webgl.M00] = v[webgl.M00]; + t[webgl.M01] = v[webgl.M10]; + t[webgl.M02] = v[webgl.M20]; + t[webgl.M03] = v[webgl.M30]; + t[webgl.M10] = v[webgl.M01]; + t[webgl.M11] = v[webgl.M11]; + t[webgl.M12] = v[webgl.M21]; + t[webgl.M13] = v[webgl.M31]; + t[webgl.M20] = v[webgl.M02]; + t[webgl.M21] = v[webgl.M12]; + t[webgl.M22] = v[webgl.M22]; + t[webgl.M23] = v[webgl.M32]; + t[webgl.M30] = v[webgl.M03]; + t[webgl.M31] = v[webgl.M13]; + t[webgl.M32] = v[webgl.M23]; + t[webgl.M33] = v[webgl.M33]; + return this.set(t); + }; + Matrix4.prototype.identity = function () { + var v = this.values; + v[webgl.M00] = 1; + v[webgl.M01] = 0; + v[webgl.M02] = 0; + v[webgl.M03] = 0; + v[webgl.M10] = 0; + v[webgl.M11] = 1; + v[webgl.M12] = 0; + v[webgl.M13] = 0; + v[webgl.M20] = 0; + v[webgl.M21] = 0; + v[webgl.M22] = 1; + v[webgl.M23] = 0; + v[webgl.M30] = 0; + v[webgl.M31] = 0; + v[webgl.M32] = 0; + v[webgl.M33] = 1; + return this; + }; + Matrix4.prototype.invert = function () { + var v = this.values; + var t = this.temp; + var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03] + + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03] + - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13] + - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13] + + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23] + + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23] + - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33] + - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + if (l_det == 0) + throw new Error("non-invertible matrix"); + var inv_det = 1.0 / l_det; + t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32] + - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32] + + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32] + - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33]; + t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22] + + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23]; + t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32] + + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32] + - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32] + + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33]; + t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22] + - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23]; + t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31] + - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33]; + t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31] + + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33]; + t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31] + - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33]; + t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21] + + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23]; + t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31] + + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32]; + t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31] + - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32]; + t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31] + + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32]; + t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21] + - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22]; + v[webgl.M00] = t[webgl.M00] * inv_det; + v[webgl.M01] = t[webgl.M01] * inv_det; + v[webgl.M02] = t[webgl.M02] * inv_det; + v[webgl.M03] = t[webgl.M03] * inv_det; + v[webgl.M10] = t[webgl.M10] * inv_det; + v[webgl.M11] = t[webgl.M11] * inv_det; + v[webgl.M12] = t[webgl.M12] * inv_det; + v[webgl.M13] = t[webgl.M13] * inv_det; + v[webgl.M20] = t[webgl.M20] * inv_det; + v[webgl.M21] = t[webgl.M21] * inv_det; + v[webgl.M22] = t[webgl.M22] * inv_det; + v[webgl.M23] = t[webgl.M23] * inv_det; + v[webgl.M30] = t[webgl.M30] * inv_det; + v[webgl.M31] = t[webgl.M31] * inv_det; + v[webgl.M32] = t[webgl.M32] * inv_det; + v[webgl.M33] = t[webgl.M33] * inv_det; + return this; + }; + Matrix4.prototype.determinant = function () { + var v = this.values; + return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03] + + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03] + - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13] + - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13] + + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23] + + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23] + - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33] + - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + }; + Matrix4.prototype.translate = function (x, y, z) { + var v = this.values; + v[webgl.M03] += x; + v[webgl.M13] += y; + v[webgl.M23] += z; + return this; + }; + Matrix4.prototype.copy = function () { + return new Matrix4().set(this.values); + }; + Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) { + this.identity(); + var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0)); + var l_a1 = (far + near) / (near - far); + var l_a2 = (2 * far * near) / (near - far); + var v = this.values; + v[webgl.M00] = l_fd / aspectRatio; + v[webgl.M10] = 0; + v[webgl.M20] = 0; + v[webgl.M30] = 0; + v[webgl.M01] = 0; + v[webgl.M11] = l_fd; + v[webgl.M21] = 0; + v[webgl.M31] = 0; + v[webgl.M02] = 0; + v[webgl.M12] = 0; + v[webgl.M22] = l_a1; + v[webgl.M32] = -1; + v[webgl.M03] = 0; + v[webgl.M13] = 0; + v[webgl.M23] = l_a2; + v[webgl.M33] = 0; + return this; + }; + Matrix4.prototype.ortho2d = function (x, y, width, height) { + return this.ortho(x, x + width, y, y + height, 0, 1); + }; + Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) { + this.identity(); + var x_orth = 2 / (right - left); + var y_orth = 2 / (top - bottom); + var z_orth = -2 / (far - near); + var tx = -(right + left) / (right - left); + var ty = -(top + bottom) / (top - bottom); + var tz = -(far + near) / (far - near); + var v = this.values; + v[webgl.M00] = x_orth; + v[webgl.M10] = 0; + v[webgl.M20] = 0; + v[webgl.M30] = 0; + v[webgl.M01] = 0; + v[webgl.M11] = y_orth; + v[webgl.M21] = 0; + v[webgl.M31] = 0; + v[webgl.M02] = 0; + v[webgl.M12] = 0; + v[webgl.M22] = z_orth; + v[webgl.M32] = 0; + v[webgl.M03] = tx; + v[webgl.M13] = ty; + v[webgl.M23] = tz; + v[webgl.M33] = 1; + return this; + }; + Matrix4.prototype.multiply = function (matrix) { + var t = this.temp; + var v = this.values; + var m = matrix.values; + t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30]; + t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31]; + t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32]; + t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33]; + t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30]; + t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31]; + t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32]; + t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33]; + t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30]; + t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31]; + t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32]; + t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33]; + t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30]; + t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31]; + t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32]; + t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33]; + return this.set(this.temp); + }; + Matrix4.prototype.multiplyLeft = function (matrix) { + var t = this.temp; + var v = this.values; + var m = matrix.values; + t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30]; + t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31]; + t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32]; + t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33]; + t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30]; + t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31]; + t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32]; + t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33]; + t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30]; + t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31]; + t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32]; + t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33]; + t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30]; + t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31]; + t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32]; + t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33]; + return this.set(this.temp); + }; + return Matrix4; + }()); + webgl.Matrix4 = Matrix4; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Mesh = (function () { + function Mesh(gl, _attributes, maxVertices, maxIndices) { + this._attributes = _attributes; + this._verticesLength = 0; + this._dirtyVertices = false; + this._indicesLength = 0; + this._dirtyIndices = false; + this._elementsPerVertex = 0; + this._gl = gl; + this._elementsPerVertex = 0; + for (var i = 0; i < _attributes.length; i++) { + this._elementsPerVertex += _attributes[i].numElements; + } + this._vertices = new Float32Array(maxVertices * this._elementsPerVertex); + this._indices = new Uint16Array(maxIndices); + } + Mesh.prototype.attributes = function () { return this._attributes; }; + Mesh.prototype.maxVertices = function () { return this._vertices.length / this._elementsPerVertex; }; + Mesh.prototype.numVertices = function () { return this._verticesLength / this._elementsPerVertex; }; + Mesh.prototype.setVerticesLength = function (length) { + this._dirtyVertices = true; + this._verticesLength = length; + }; + Mesh.prototype.vertices = function () { return this._vertices; }; + Mesh.prototype.maxIndices = function () { return this._indices.length; }; + Mesh.prototype.numIndices = function () { return this._indicesLength; }; + Mesh.prototype.setIndicesLength = function (length) { + this._dirtyIndices = true; + this._indicesLength = length; + }; + Mesh.prototype.indices = function () { return this._indices; }; + ; + Mesh.prototype.setVertices = function (vertices) { + this._dirtyVertices = true; + if (vertices.length > this._vertices.length) + throw Error("Mesh can't store more than " + this.maxVertices() + " vertices"); + this._vertices.set(vertices, 0); + this._verticesLength = vertices.length; + }; + Mesh.prototype.setIndices = function (indices) { + this._dirtyIndices = true; + if (indices.length > this._indices.length) + throw Error("Mesh can't store more than " + this.maxIndices() + " indices"); + this._indices.set(indices, 0); + this._indicesLength = indices.length; + }; + Mesh.prototype.draw = function (shader, primitiveType) { + this.drawWithOffset(shader, primitiveType, 0, this._indicesLength > 0 ? this._indicesLength : this._verticesLength); + }; + Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) { + var gl = this._gl; + if (this._dirtyVertices || this._dirtyIndices) + this.update(); + this.bind(shader); + if (this._indicesLength > 0) + gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2); + else + gl.drawArrays(primitiveType, offset, count); + this.unbind(shader); + }; + Mesh.prototype.bind = function (shader) { + var gl = this._gl; + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + var offset = 0; + for (var i = 0; i < this._attributes.length; i++) { + var attrib = this._attributes[i]; + var location_1 = shader.getAttributeLocation(attrib.name); + gl.enableVertexAttribArray(location_1); + gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this._elementsPerVertex * 4, offset * 4); + offset += attrib.numElements; + } + if (this._indicesLength > 0) + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + }; + Mesh.prototype.unbind = function (shader) { + var gl = this._gl; + for (var i = 0; i < this._attributes.length; i++) { + var attrib = this._attributes[i]; + var location_2 = shader.getAttributeLocation(attrib.name); + gl.disableVertexAttribArray(location_2); + } + gl.bindBuffer(gl.ARRAY_BUFFER, null); + if (this._indicesLength > 0) + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null); + }; + Mesh.prototype.update = function () { + var gl = this._gl; + if (this._dirtyVertices) { + if (!this._verticesBuffer) { + this._verticesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + gl.bufferData(gl.ARRAY_BUFFER, this._vertices.subarray(0, this._verticesLength), gl.STATIC_DRAW); + this._dirtyVertices = false; + } + if (this._dirtyIndices) { + if (!this._indicesBuffer) { + this._indicesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this._indices.subarray(0, this._indicesLength), gl.STATIC_DRAW); + this._dirtyIndices = false; + } + }; + Mesh.prototype.dispose = function () { + var gl = this._gl; + gl.deleteBuffer(this._verticesBuffer); + gl.deleteBuffer(this._indicesBuffer); + }; + return Mesh; + }()); + webgl.Mesh = Mesh; + var VertexAttribute = (function () { + function VertexAttribute(name, type, numElements) { + this.name = name; + this.type = type; + this.numElements = numElements; + } + return VertexAttribute; + }()); + webgl.VertexAttribute = VertexAttribute; + var Position2Attribute = (function (_super) { + __extends(Position2Attribute, _super); + function Position2Attribute() { + _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2); + } + return Position2Attribute; + }(VertexAttribute)); + webgl.Position2Attribute = Position2Attribute; + var Position3Attribute = (function (_super) { + __extends(Position3Attribute, _super); + function Position3Attribute() { + _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3); + } + return Position3Attribute; + }(VertexAttribute)); + webgl.Position3Attribute = Position3Attribute; + var TexCoordAttribute = (function (_super) { + __extends(TexCoordAttribute, _super); + function TexCoordAttribute(unit) { + if (unit === void 0) { unit = 0; } + _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? "" : unit), VertexAttributeType.Float, 2); + } + return TexCoordAttribute; + }(VertexAttribute)); + webgl.TexCoordAttribute = TexCoordAttribute; + var ColorAttribute = (function (_super) { + __extends(ColorAttribute, _super); + function ColorAttribute() { + _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4); + } + return ColorAttribute; + }(VertexAttribute)); + webgl.ColorAttribute = ColorAttribute; + (function (VertexAttributeType) { + VertexAttributeType[VertexAttributeType["Float"] = 0] = "Float"; + })(webgl.VertexAttributeType || (webgl.VertexAttributeType = {})); + var VertexAttributeType = webgl.VertexAttributeType; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var PolygonBatcher = (function () { + function PolygonBatcher(gl, maxVertices) { + if (maxVertices === void 0) { maxVertices = 10920; } + this._drawing = false; + this._shader = null; + this._lastTexture = null; + this._verticesLength = 0; + this._indicesLength = 0; + this._srcBlend = WebGLRenderingContext.SRC_ALPHA; + this._dstBlend = WebGLRenderingContext.ONE_MINUS_SRC_ALPHA; + if (maxVertices > 10920) + throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices); + this._gl = gl; + this._mesh = new webgl.Mesh(gl, [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()], maxVertices, maxVertices * 3); + } + PolygonBatcher.prototype.begin = function (shader) { + var gl = this._gl; + if (this._drawing) + throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()"); + this._drawCalls = 0; + this._shader = shader; + this._lastTexture = null; + this._drawing = true; + gl.enable(gl.BLEND); + gl.blendFunc(this._srcBlend, this._dstBlend); + }; + PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) { + var gl = this._gl; + this._srcBlend = srcBlend; + this._dstBlend = dstBlend; + if (this._drawing) { + this.flush(); + gl.blendFunc(this._srcBlend, this._dstBlend); + } + }; + PolygonBatcher.prototype.draw = function (texture, vertices, indices) { + if (texture != this._lastTexture) { + this.flush(); + this._lastTexture = texture; + texture.bind(); + } + else if (this._verticesLength + vertices.length > this._mesh.vertices().length || + this._indicesLength + indices.length > this._mesh.indices().length) { + this.flush(); + } + var indexStart = this._mesh.numVertices(); + this._mesh.vertices().set(vertices, this._verticesLength); + this._verticesLength += vertices.length; + this._mesh.setVerticesLength(this._verticesLength); + var indicesArray = this._mesh.indices(); + for (var i = this._indicesLength, j = 0; j < indices.length; i++, j++) + indicesArray[i] = indices[j] + indexStart; + this._indicesLength += indices.length; + this._mesh.setIndicesLength(this._indicesLength); + }; + PolygonBatcher.prototype.flush = function () { + var gl = this._gl; + if (this._verticesLength == 0) + return; + this._mesh.draw(this._shader, gl.TRIANGLES); + this._verticesLength = 0; + this._indicesLength = 0; + this._mesh.setVerticesLength(0); + this._mesh.setIndicesLength(0); + this._drawCalls++; + }; + PolygonBatcher.prototype.end = function () { + var gl = this._gl; + if (!this._drawing) + throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()"); + if (this._verticesLength > 0 || this._indicesLength > 0) + this.flush(); + this._shader = null; + this._lastTexture = null; + this._drawing = false; + gl.disable(gl.BLEND); + }; + PolygonBatcher.prototype.drawCalls = function () { return this._drawCalls; }; + return PolygonBatcher; + }()); + webgl.PolygonBatcher = PolygonBatcher; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Shader = (function () { + function Shader(gl, _vertexShader, _fragmentShader) { + this._vertexShader = _vertexShader; + this._fragmentShader = _fragmentShader; + this._vs = null; + this._fs = null; + this._program = null; + this._tmp2x2 = new Float32Array(2 * 2); + this._tmp3x3 = new Float32Array(3 * 3); + this._tmp4x4 = new Float32Array(4 * 4); + this._gl = gl; + this.compile(); + } + Shader.prototype.program = function () { return this._program; }; + Shader.prototype.vertexShader = function () { return this._vertexShader; }; + Shader.prototype.fragmentShader = function () { return this._fragmentShader; }; + Shader.prototype.compile = function () { + var gl = this._gl; + try { + this._vs = this.compileShader(gl.VERTEX_SHADER, this._vertexShader); + this._fs = this.compileShader(gl.FRAGMENT_SHADER, this._fragmentShader); + this._program = this.compileProgram(this._vs, this._fs); + } + catch (e) { + this.dispose(); + throw e; + } + }; + Shader.prototype.compileShader = function (type, source) { + var gl = this._gl; + var shader = gl.createShader(type); + gl.shaderSource(shader, source); + gl.compileShader(shader); + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + var error = "Couldn't compile shader: " + gl.getShaderInfoLog(shader); + gl.deleteShader(shader); + throw new Error(error); + } + return shader; + }; + Shader.prototype.compileProgram = function (vs, fs) { + var gl = this._gl; + var program = gl.createProgram(); + gl.attachShader(program, vs); + gl.attachShader(program, fs); + gl.linkProgram(program); + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + var error = "Couldn't compile shader program: " + gl.getProgramInfoLog(program); + gl.deleteProgram(program); + throw new Error(error); + } + return program; + }; + Shader.prototype.bind = function () { + this._gl.useProgram(this._program); + }; + Shader.prototype.unbind = function () { + this._gl.useProgram(null); + }; + Shader.prototype.setUniformi = function (uniform, value) { + this._gl.uniform1i(this.getUniformLocation(uniform), value); + }; + Shader.prototype.setUniformf = function (uniform, value) { + this._gl.uniform1f(this.getUniformLocation(uniform), value); + }; + Shader.prototype.setUniform2f = function (uniform, value, value2) { + this._gl.uniform2f(this.getUniformLocation(uniform), value, value2); + }; + Shader.prototype.setUniform3f = function (uniform, value, value2, value3) { + this._gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3); + }; + Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) { + this._gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4); + }; + Shader.prototype.setUniform2x2f = function (uniform, value) { + var gl = this._gl; + this._tmp2x2.set(value); + gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this._tmp2x2); + }; + Shader.prototype.setUniform3x3f = function (uniform, value) { + var gl = this._gl; + this._tmp3x3.set(value); + gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this._tmp3x3); + }; + Shader.prototype.setUniform4x4f = function (uniform, value) { + var gl = this._gl; + this._tmp4x4.set(value); + gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this._tmp4x4); + }; + Shader.prototype.getUniformLocation = function (uniform) { + var gl = this._gl; + var location = gl.getUniformLocation(this._program, uniform); + if (!location) + throw new Error("Couldn't find location for uniform " + uniform); + return location; + }; + Shader.prototype.getAttributeLocation = function (attribute) { + var gl = this._gl; + var location = gl.getAttribLocation(this._program, attribute); + if (location == -1) + throw new Error("Couldn't find location for attribute " + attribute); + return location; + }; + Shader.prototype.dispose = function () { + var gl = this._gl; + if (this._vs) { + gl.deleteShader(this._vs); + this._vs = null; + } + if (this._fs) { + gl.deleteShader(this._fs); + this._fs = null; + } + if (this._program) { + gl.deleteProgram(this._program); + this._program = null; + } + }; + Shader.newColoredTextured = function (gl) { + var vs = "\n\t\t\t\tattribute vec4 " + Shader.POSITION + ";\n\t\t\t\tattribute vec4 " + Shader.COLOR + ";\n\t\t\t\tattribute vec2 " + Shader.TEXCOORDS + ";\n\t\t\t\tuniform mat4 " + Shader.MVP_MATRIX + ";\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = " + Shader.COLOR + ";\n\t\t\t\t\tv_texCoords = " + Shader.TEXCOORDS + ";\n\t\t\t\t\tgl_Position = " + Shader.MVP_MATRIX + " * " + Shader.POSITION + ";\n\t\t\t\t}\n\t\t\t"; + var fs = "\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t"; + return new Shader(gl, vs, fs); + }; + Shader.newColored = function (gl) { + var vs = "\n\t\t\t\tattribute vec4 " + Shader.POSITION + ";\n\t\t\t\tattribute vec4 " + Shader.COLOR + ";\n\t\t\t\tuniform mat4 " + Shader.MVP_MATRIX + ";\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = " + Shader.COLOR + ";\n\t\t\t\t\tgl_Position = " + Shader.MVP_MATRIX + " * " + Shader.POSITION + ";\n\t\t\t\t}\n\t\t\t"; + var fs = "\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t"; + return new Shader(gl, vs, fs); + }; + Shader.MVP_MATRIX = "u_projTrans"; + Shader.POSITION = "a_position"; + Shader.COLOR = "a_color"; + Shader.TEXCOORDS = "a_texCoords"; + Shader.SAMPLER = "u_texture"; + return Shader; + }()); + webgl.Shader = Shader; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var SkeletonRenderer = (function () { + function SkeletonRenderer(gl) { + this.premultipliedAlpha = false; + this._gl = gl; + } + SkeletonRenderer.prototype.draw = function (batcher, skeleton) { + var premultipliedAlpha = this.premultipliedAlpha; + var blendMode = null; + var vertices = null; + var triangles = null; + var drawOrder = skeleton.drawOrder; + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = drawOrder[i]; + var attachment = slot.getAttachment(); + var texture = null; + if (attachment instanceof spine.RegionAttachment) { + var region = attachment; + vertices = region.updateWorldVertices(slot, premultipliedAlpha); + triangles = SkeletonRenderer.QUAD_TRIANGLES; + texture = region.region.renderObject.texture; + } + else if (attachment instanceof spine.MeshAttachment) { + var mesh = attachment; + vertices = mesh.updateWorldVertices(slot, premultipliedAlpha); + triangles = mesh.triangles; + texture = mesh.region.renderObject.texture; + } + if (texture != null) { + var slotBlendMode = slot.data.blendMode; + if (slotBlendMode != blendMode) { + blendMode = slotBlendMode; + batcher.setBlendMode(webgl.getSourceGLBlendMode(this._gl, blendMode, premultipliedAlpha), webgl.getDestGLBlendMode(this._gl, blendMode)); + } + batcher.draw(texture, vertices, triangles); + } + } + }; + SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0]; + return SkeletonRenderer; + }()); + webgl.SkeletonRenderer = SkeletonRenderer; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Texture = (function () { + function Texture(gl, image, useMipMaps) { + if (useMipMaps === void 0) { useMipMaps = false; } + this._boundUnit = 0; + this._gl = gl; + this._texture = gl.createTexture(); + this._image = image; + this.update(useMipMaps); + } + Texture.prototype.getImage = function () { + return this._image; + }; + Texture.prototype.setFilters = function (minFilter, magFilter) { + var gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter); + }; + Texture.prototype.setWraps = function (uWrap, vWrap) { + var gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap); + }; + Texture.prototype.update = function (useMipMaps) { + var gl = this._gl; + this.bind(); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + if (useMipMaps) + gl.generateMipmap(gl.TEXTURE_2D); + }; + Texture.prototype.bind = function (unit) { + if (unit === void 0) { unit = 0; } + var gl = this._gl; + this._boundUnit = unit; + gl.activeTexture(gl.TEXTURE0 + unit); + gl.bindTexture(gl.TEXTURE_2D, this._texture); + }; + Texture.prototype.unbind = function () { + var gl = this._gl; + gl.activeTexture(gl.TEXTURE0 + this._boundUnit); + gl.bindTexture(gl.TEXTURE_2D, null); + }; + Texture.prototype.dispose = function () { + var gl = this._gl; + gl.deleteTexture(this._texture); + }; + 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; + }()); + webgl.Texture = Texture; + (function (TextureFilter) { + TextureFilter[TextureFilter["Nearest"] = WebGLRenderingContext.NEAREST] = "Nearest"; + TextureFilter[TextureFilter["Linear"] = WebGLRenderingContext.LINEAR] = "Linear"; + TextureFilter[TextureFilter["MipMap"] = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR] = "MipMap"; + TextureFilter[TextureFilter["MipMapNearestNearest"] = WebGLRenderingContext.NEAREST_MIPMAP_NEAREST] = "MipMapNearestNearest"; + TextureFilter[TextureFilter["MipMapLinearNearest"] = WebGLRenderingContext.LINEAR_MIPMAP_NEAREST] = "MipMapLinearNearest"; + TextureFilter[TextureFilter["MipMapNearestLinear"] = WebGLRenderingContext.NEAREST_MIPMAP_LINEAR] = "MipMapNearestLinear"; + TextureFilter[TextureFilter["MipMapLinearLinear"] = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR] = "MipMapLinearLinear"; + })(webgl.TextureFilter || (webgl.TextureFilter = {})); + var TextureFilter = webgl.TextureFilter; + (function (TextureWrap) { + TextureWrap[TextureWrap["MirroredRepeat"] = WebGLRenderingContext.MIRRORED_REPEAT] = "MirroredRepeat"; + TextureWrap[TextureWrap["ClampToEdge"] = WebGLRenderingContext.CLAMP_TO_EDGE] = "ClampToEdge"; + TextureWrap[TextureWrap["Repeat"] = WebGLRenderingContext.REPEAT] = "Repeat"; + })(webgl.TextureWrap || (webgl.TextureWrap = {})); + var TextureWrap = webgl.TextureWrap; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var TextureAtlas = (function () { + function TextureAtlas(atlasText, textureLoader) { + this.pages = new Array(); + this.regions = new Array(); + this.load(atlasText, textureLoader); + } + TextureAtlas.prototype.load = function (atlasText, textureLoader) { + if (textureLoader == null) + throw new Error("textureLoader cannot be null."); + var reader = new TextureAtlasReader(atlasText); + var tuple = new Array(4); + var page = null; + while (true) { + var line = reader.readLine(); + if (line == null) + break; + 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); + } + // page.format = Format[tuple[0]]; we don't need format in WebGL + reader.readTuple(tuple); + page.minFilter = webgl.Texture.filterFromString(tuple[0]); + page.magFilter = webgl.Texture.filterFromString(tuple[1]); + var direction = reader.readValue(); + page.uWrap = webgl.TextureWrap.ClampToEdge; + page.vWrap = webgl.TextureWrap.ClampToEdge; + if (direction == "x") + page.uWrap = webgl.TextureWrap.Repeat; + else if (direction == "y") + page.vWrap = webgl.TextureWrap.Repeat; + else if (direction == "xy") + page.uWrap = page.vWrap = webgl.TextureWrap.Repeat; + page.texture = textureLoader(line); + page.texture.setFilters(page.minFilter, page.magFilter); + page.texture.setWraps(page.uWrap, page.vWrap); + page.width = page.texture.getImage().width; + page.height = page.texture.getImage().height; + this.pages.push(page); + } + else { + var region = new TextureAtlasRegion(); + region.name = line; + region.page = page; + region.rotate = reader.readValue() == "true"; + 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]); + region.u = x / page.width; + region.v = y / page.height; + if (region.rotate) { + region.u2 = (x + height) / page.width; + region.v2 = (y + width) / page.height; + } + else { + region.u2 = (x + width) / page.width; + region.v2 = (y + height) / page.height; + } + region.x = x; + region.y = y; + region.width = Math.abs(width); + region.height = Math.abs(height); + if (reader.readTuple(tuple) == 4) { + // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + if (reader.readTuple(tuple) == 4) { + //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + reader.readTuple(tuple); + } + } + region.originalWidth = parseInt(tuple[0]); + region.originalHeight = parseInt(tuple[1]); + reader.readTuple(tuple); + region.offsetX = parseInt(tuple[0]); + region.offsetY = parseInt(tuple[1]); + region.index = parseInt(reader.readValue()); + region.texture = page.texture; + this.regions.push(region); + } + } + }; + 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].texture.dispose(); + } + }; + return TextureAtlas; + }()); + webgl.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() { + } + return TextureAtlasPage; + }()); + webgl.TextureAtlasPage = TextureAtlasPage; + var TextureAtlasRegion = (function (_super) { + __extends(TextureAtlasRegion, _super); + function TextureAtlasRegion() { + _super.apply(this, arguments); + } + return TextureAtlasRegion; + }(spine.TextureRegion)); + webgl.TextureAtlasRegion = TextureAtlasRegion; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var TextureAtlasAttachmentLoader = (function () { + function TextureAtlasAttachmentLoader(atlas) { + this.atlas = atlas; + } + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) + throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")"); + var attachment = new spine.RegionAttachment(name); + attachment.setRegion(region); + attachment.region = region; + return attachment; + }; + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) + throw new Error("Region not found in atlas: " + path + " (mesh attachment: " + name + ")"); + var attachment = new spine.MeshAttachment(name); + attachment.region = region; + return attachment; + }; + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) { + return new spine.BoundingBoxAttachment(name); + }; + /** @return May be null to not load an attachment */ + TextureAtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) { + return new spine.PathAttachment(name); + }; + return TextureAtlasAttachmentLoader; + }()); + webgl.TextureAtlasAttachmentLoader = TextureAtlasAttachmentLoader; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Vector3 = (function () { + function Vector3() { + this.x = 0; + this.y = 0; + this.z = 0; + } + Vector3.prototype.set = function (x, y, z) { + this.x = x; + this.y = y; + this.z = z; + return this; + }; + Vector3.prototype.add = function (v) { + this.x += v.x; + this.y += v.y; + this.z += v.z; + return this; + }; + Vector3.prototype.sub = function (v) { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + return this; + }; + Vector3.prototype.scale = function (s) { + this.x *= s; + this.y *= s; + this.z *= s; + return this; + }; + Vector3.prototype.normalize = function () { + var len = this.length(); + if (len == 0) + return this; + len = 1 / len; + this.x *= len; + this.y *= len; + this.z *= len; + return this; + }; + Vector3.prototype.cross = function (v) { + return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x); + }; + Vector3.prototype.multiply = function (matrix) { + var l_mat = matrix.values; + return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]); + }; + Vector3.prototype.project = function (matrix) { + var l_mat = matrix.values; + var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]); + return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w); + }; + Vector3.prototype.dot = function (v) { + return this.x * v.x + this.y * v.y + this.z * v.z; + }; + Vector3.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + }; + Vector3.prototype.distance = function (v) { + var a = v.x - this.x; + var b = v.y - this.y; + var c = v.z - this.z; + return Math.sqrt(a * a + b * b + c * c); + }; + return Vector3; + }()); + webgl.Vector3 = Vector3; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + function getSourceGLBlendMode(gl, blendMode, premultipliedAlpha) { + if (premultipliedAlpha === void 0) { premultipliedAlpha = false; } + switch (blendMode) { + case spine.BlendMode.Normal: return premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA; + case spine.BlendMode.Additive: return premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA; + case spine.BlendMode.Multiply: return gl.DST_COLOR; + case spine.BlendMode.Screen: return gl.ONE; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + webgl.getSourceGLBlendMode = getSourceGLBlendMode; + function getDestGLBlendMode(gl, blendMode) { + switch (blendMode) { + case spine.BlendMode.Normal: return gl.ONE_MINUS_SRC_ALPHA; + case spine.BlendMode.Additive: return gl.ONE; + case spine.BlendMode.Multiply: return gl.ONE_MINUS_SRC_ALPHA; + case spine.BlendMode.Screen: return gl.ONE_MINUS_SRC_ALPHA; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + webgl.getDestGLBlendMode = getDestGLBlendMode; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SpineWidget = (function () { + function SpineWidget(element, config) { + var _this = this; + this._mvp = new spine.webgl.Matrix4(); + this._paused = false; + this._lastFrameTime = Date.now() / 1000.0; + this._backgroundColor = new spine.Color(); + this._loaded = false; + if (!element) + throw new Error("Please provide a DOM element, e.g. document.getElementById('myelement')"); + if (!config) + throw new Error("Please provide a configuration, specifying at least the json file, atlas file and animation name"); + var elementId = element; + if (typeof (element) === "string") + element = document.getElementById(element); + if (element == null) + throw new Error("Element " + elementId + " does not exist"); + this.validateConfig(config); + var canvas = this.canvas = document.createElement("canvas"); + element.appendChild(canvas); + canvas.width = config.width; + canvas.height = config.height; + var webglConfig = { alpha: false }; + var gl = this.gl = (canvas.getContext("webgl", webglConfig) || canvas.getContext("experimental-webgl", webglConfig)); + this._shader = spine.webgl.Shader.newColoredTextured(gl); + this._batcher = new spine.webgl.PolygonBatcher(gl); + this._mvp.ortho2d(0, 0, 639, 479); + this._skeletonRenderer = new spine.webgl.SkeletonRenderer(gl); + var assets = this._assetManager = new spine.webgl.AssetManager(gl); + assets.loadText(config.atlas); + assets.loadText(config.json); + assets.loadTexture(config.atlas.replace(".atlas", ".png")); + requestAnimationFrame(function () { _this.load(); }); + } + SpineWidget.prototype.validateConfig = function (config) { + if (!config.atlas) + throw new Error("Please specify config.atlas"); + if (!config.json) + throw new Error("Please specify config.json"); + if (!config.animation) + throw new Error("Please specify config.animationName"); + if (!config.scale) + config.scale = 1.0; + if (!config.skin) + config.skin = "default"; + if (config.loop === undefined) + config.loop = true; + if (!config.y) + config.y = 20; + if (!config.width) + config.width = 640; + if (!config.height) + config.height = 480; + if (!config.x) + config.x = config.width / 2; + if (!config.backgroundColor) + config.backgroundColor = "#555555"; + if (!config.imagesPath) { + var index = config.atlas.lastIndexOf("/"); + if (index != -1) { + config.imagesPath = config.atlas.substr(0, index) + "/"; + } + else { + config.imagesPath = ""; + } + } + if (!config.premultipliedAlpha === undefined) + config.premultipliedAlpha = false; + this._backgroundColor.setFromString(config.backgroundColor); + this._config = config; + }; + SpineWidget.prototype.load = function () { + var _this = this; + var assetManager = this._assetManager; + var imagesPath = this._config.imagesPath; + var config = this._config; + if (assetManager.isLoadingComplete()) { + if (assetManager.hasErrors()) { + if (config.error) + config.error(this, "Failed to load assets: " + JSON.stringify(assetManager.errors)); + else + throw new Error("Failed to load assets: " + JSON.stringify(assetManager.errors)); + } + var atlas = new spine.webgl.TextureAtlas(this._assetManager.get(this._config.atlas), function (path) { + return assetManager.get(imagesPath + path); + }); + var atlasLoader = new spine.webgl.TextureAtlasAttachmentLoader(atlas); + var skeletonJson = new spine.SkeletonJson(atlasLoader); + // Set the scale to apply during parsing, parse the file, and create a new skeleton. + skeletonJson.scale = config.scale; + var skeletonData = skeletonJson.readSkeletonData(assetManager.get(config.json)); + var skeleton = this.skeleton = new spine.Skeleton(skeletonData); + skeleton.x = config.x; + skeleton.y = config.y; + skeleton.setSkinByName(config.skin); + var animationState = this.state = new spine.AnimationState(new spine.AnimationStateData(skeleton.data)); + animationState.setAnimation(0, config.animation, true); + if (config.success) + config.success(this); + this._loaded = true; + requestAnimationFrame(function () { _this.render(); }); + } + else + requestAnimationFrame(function () { _this.load(); }); + }; + SpineWidget.prototype.render = function () { + var _this = this; + var now = Date.now() / 1000; + var delta = now - this._lastFrameTime; + if (delta > 0.1) + delta = 0; + this._lastFrameTime = now; + var gl = this.gl; + var color = this._backgroundColor; + gl.clearColor(color.r, color.g, color.b, color.a); + gl.clear(gl.COLOR_BUFFER_BIT); + // Apply the animation state based on the delta time. + var state = this.state; + var skeleton = this.skeleton; + var premultipliedAlpha = this._config.premultipliedAlpha; + state.update(delta); + state.apply(skeleton); + skeleton.updateWorldTransform(); + // Bind the shader and set the texture and model-view-projection matrix. + var shader = this._shader; + shader.bind(); + shader.setUniformi(spine.webgl.Shader.SAMPLER, 0); + shader.setUniform4x4f(spine.webgl.Shader.MVP_MATRIX, this._mvp.values); + // Start the batch and tell the SkeletonRenderer to render the active skeleton. + var batcher = this._batcher; + var skeletonRenderer = this._skeletonRenderer; + batcher.begin(shader); + skeletonRenderer.premultipliedAlpha = premultipliedAlpha; + skeletonRenderer.draw(batcher, skeleton); + batcher.end(); + shader.unbind(); + if (!this._paused) + requestAnimationFrame(function () { _this.render(); }); + }; + SpineWidget.prototype.pause = function () { + this._paused = true; + }; + SpineWidget.prototype.play = function () { + var _this = this; + this._paused = false; + requestAnimationFrame(function () { _this.render(); }); + }; + SpineWidget.prototype.isPlaying = function () { + return !this._paused; + }; + SpineWidget.prototype.setAnimation = function (animationName) { + if (!this._loaded) + throw new Error("Widget isn't loaded yet"); + this.skeleton.setToSetupPose(); + this.state.setAnimation(0, animationName, this._config.loop); + }; + SpineWidget.loadWidgets = function () { + var widgets = document.getElementsByClassName("spine-widget"); + for (var i = 0; i < widgets.length; i++) { + SpineWidget.loadWidget(widgets[i]); + } + }; + SpineWidget.loadWidget = function (widget) { + var config = new SpineWidgetConfig(); + config.atlas = widget.getAttribute("data-atlas"); + config.json = widget.getAttribute("data-json"); + config.animation = widget.getAttribute("data-animation"); + if (widget.getAttribute("data-images-path")) + config.imagesPath = widget.getAttribute("data-images-path"); + if (widget.getAttribute("data-skin")) + config.skin = widget.getAttribute("data-skin"); + if (widget.getAttribute("data-loop")) + config.loop = widget.getAttribute("data-loop") === "true"; + if (widget.getAttribute("data-scale")) + config.scale = parseFloat(widget.getAttribute("data-scale")); + if (widget.getAttribute("data-x")) + config.x = parseFloat(widget.getAttribute("data-x")); + if (widget.getAttribute("data-y")) + config.x = parseFloat(widget.getAttribute("data-y")); + if (widget.getAttribute("data-width")) + config.width = parseInt(widget.getAttribute("data-width")); + if (widget.getAttribute("data-height")) + config.height = parseInt(widget.getAttribute("data-height")); + if (widget.getAttribute("data-background-color")) + config.backgroundColor = widget.getAttribute("data-background-color"); + if (widget.getAttribute("data-premultiplied-alpha")) + config.premultipliedAlpha = widget.getAttribute("data-premultiplied-alpha") === "true"; + new spine.SpineWidget(widget, config); + }; + SpineWidget.ready = function () { + if (SpineWidget.pageLoaded) + return; + SpineWidget.pageLoaded = true; + SpineWidget.loadWidgets(); + }; + SpineWidget.setupDOMListener = function () { + if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", SpineWidget.ready, false); + window.addEventListener("load", SpineWidget.ready, false); + } + else { + document.attachEvent("onreadystatechange", function readyStateChange() { + if (document.readyState === "complete") + SpineWidget.ready(); + }); + window.attachEvent("onload", SpineWidget.ready); + } + }; + SpineWidget.pageLoaded = false; + return SpineWidget; + }()); + spine.SpineWidget = SpineWidget; + var SpineWidgetConfig = (function () { + function SpineWidgetConfig() { + this.skin = "default"; + this.loop = true; + this.scale = 1.0; + this.x = 0; + this.y = 0; + this.width = 640; + this.height = 480; + this.backgroundColor = "#555555"; + this.premultipliedAlpha = false; + } + return SpineWidgetConfig; + }()); + spine.SpineWidgetConfig = SpineWidgetConfig; +})(spine || (spine = {})); +spine.SpineWidget.setupDOMListener(); +//# sourceMappingURL=spine-webgl.js.map \ No newline at end of file diff --git a/spine-ts/build/spine-webgl.js.map b/spine-ts/build/spine-webgl.js.map new file mode 100644 index 000000000..3a8cdca5a --- /dev/null +++ b/spine-ts/build/spine-webgl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"spine-webgl.js","sourceRoot":"","sources":["../core/src/Animation.ts","../core/src/AnimationState.ts","../core/src/AnimationStateData.ts","../core/src/BlendMode.ts","../core/src/Bone.ts","../core/src/BoneData.ts","../core/src/Event.ts","../core/src/EventData.ts","../core/src/IkConstraint.ts","../core/src/IkConstraintData.ts","../core/src/PathConstraint.ts","../core/src/PathConstraintData.ts","../core/src/Skeleton.ts","../core/src/SkeletonBounds.ts","../core/src/SkeletonData.ts","../core/src/SkeletonJson.ts","../core/src/Skin.ts","../core/src/Slot.ts","../core/src/SlotData.ts","../core/src/TransformConstraint.ts","../core/src/TransformConstraintData.ts","../core/src/Updatable.ts","../core/src/Utils.ts","../core/src/attachments/Attachment.ts","../core/src/attachments/AttachmentLoader.ts","../core/src/attachments/AttachmentType.ts","../core/src/attachments/BoundingBoxAttachment.ts","../core/src/attachments/MeshAttachment.ts","../core/src/attachments/PathAttachment.ts","../core/src/attachments/RegionAttachment.ts","../core/src/attachments/TextureRegion.ts","../webgl/src/AssetManager.ts","../webgl/src/Matrix4.ts","../webgl/src/Mesh.ts","../webgl/src/PolygonBatcher.ts","../webgl/src/Shader.ts","../webgl/src/SkeletonRenderer.ts","../webgl/src/Texture.ts","../webgl/src/TextureAtlas.ts","../webgl/src/TextureAtlasAttachmentLoader.ts","../webgl/src/Vector3.ts","../webgl/src/WebGL.ts","../widget/src/Widget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EA6B+E;;;;;;AAE/E,IAAO,KAAK,CAgxBX;AAhxBD,WAAO,KAAK,EAAC,CAAC;IACb;QAKC,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;YACtE,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC1D,EAAE,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC1B,CAAC;QAED,yBAAK,GAAL,UAAO,QAAkB,EAAE,QAAgB,EAAE,IAAY,EAAE,IAAa,EAAE,MAAoB;YAC7F,EAAE,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAElE,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC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AC;YACZ,MAAC,GAAG,CAAC,CAAC;YACN,MAAC,GAAG,CAAC,CAAC;YACN,UAAK,GAAG,GAAG,CAAC;YACZ,WAAM,GAAG,GAAG,CAAC;YACb,oBAAe,GAAG,SAAS,CAAC;YAC5B,uBAAkB,GAAG,KAAK,CAAC;QAG5B,CAAC;QAAD,wBAAC;IAAD,CAAC,AAhBD,IAgBC;IAhBY,uBAAiB,oBAgB7B,CAAA;AACF,CAAC,EApOM,KAAK,KAAL,KAAK,QAoOX;AACD,KAAK,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC"} \ No newline at end of file diff --git a/spine-ts/build/spine-widget.d.ts b/spine-ts/build/spine-widget.d.ts new file mode 100644 index 000000000..bab571348 --- /dev/null +++ b/spine-ts/build/spine-widget.d.ts @@ -0,0 +1,2502 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + 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): void; + mix(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number): 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): void; + } + abstract class CurveTimeline implements Timeline { + static LINEAR: number; + static STEPPED: number; + static BEZIER: number; + static BEZIER_SIZE: number; + private curves; + constructor(frameCount: number); + getFrameCount(): number; + setLinear(frameIndex: number): void; + setStepped(frameIndex: number): void; + getCurveType(frameIndex: number): number; + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + 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): 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); + /** Sets the time and angle of the specified keyframe. */ + setFrame(frameIndex: number, time: number, degrees: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): 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); + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, x: number, y: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class ScaleTimeline extends TranslateTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class ShearTimeline extends TranslateTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): 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); + /** Sets the time and value of the specified keyframe. */ + 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): void; + } + class AttachmentTimeline implements Timeline { + slotIndex: number; + frames: ArrayLike; + attachmentNames: Array; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, attachmentName: string): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + class EventTimeline implements Timeline { + frames: ArrayLike; + events: Array; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time of the specified keyframe. */ + setFrame(frameIndex: number, event: Event): void; + /** Fires events for frames > lastTime and <= time. */ + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class DrawOrderTimeline implements Timeline { + frames: ArrayLike; + drawOrders: Array>; + constructor(frameCount: number); + getFrameCount(): number; + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + setFrame(frameIndex: number, time: number, drawOrder: Array): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class DeformTimeline extends CurveTimeline { + frames: ArrayLike; + frameVertices: Array>; + slotIndex: number; + attachment: VertexAttachment; + constructor(frameCount: number); + /** Sets the time of the specified keyframe. */ + setFrame(frameIndex: number, time: number, vertices: ArrayLike): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class IkConstraintTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_MIX: number; + static PREV_BEND_DIRECTION: number; + static MIX: number; + static BEND_DIRECTION: number; + ikConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + /** Sets the time, mix and bend direction of the specified keyframe. */ + setFrame(frameIndex: number, time: number, mix: number, bendDirection: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): 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); + /** Sets the time and mixes of the specified keyframe. */ + 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): 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); + /** Sets the time and value of the specified keyframe. */ + setFrame(frameIndex: number, time: number, value: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } + class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { + constructor(frameCount: number); + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): 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); + /** Sets the time and mixes of the specified keyframe. */ + setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class AnimationState { + data: AnimationStateData; + tracks: TrackEntry[]; + events: Event[]; + listeners: AnimationStateListener[]; + timeScale: number; + constructor(data?: AnimationStateData); + update(delta: number): void; + apply(skeleton: Skeleton): void; + clearTracks(): void; + clearTrack(trackIndex: number): void; + freeAll(entry: TrackEntry): void; + expandToIndex(index: number): TrackEntry; + setCurrent(index: number, entry: TrackEntry): void; + /** @see #setAnimation(int, Animation, boolean) */ + setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry; + /** Set the current animation. Any queued animations are cleared. */ + setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry; + /** {@link #addAnimation(int, Animation, boolean, float)} */ + addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): TrackEntry; + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + addAnimationWith(trackIndex: number, animation: Animation, loop: boolean, delay: number): TrackEntry; + /** @return May be null. */ + getCurrent(trackIndex: number): TrackEntry; + /** Adds a listener to receive events for all animations. */ + addListener(listener: AnimationStateListener): void; + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + removeListener(listener: AnimationStateListener): void; + clearListeners(): void; + } + class TrackEntry { + next: TrackEntry; + previous: TrackEntry; + animation: Animation; + loop: boolean; + delay: number; + time: number; + lastTime: number; + endTime: number; + timeScale: number; + mixTime: number; + mixDuration: number; + listener: AnimationStateListener; + mix: number; + reset(): void; + /** Returns true if the current time is greater than the end time, regardless of looping. */ + isComplete(): boolean; + } + abstract class AnimationStateAdapter implements AnimationStateListener { + event(trackIndex: number, event: Event): void; + complete(trackIndex: number, loopCount: number): void; + start(trackIndex: number): void; + end(trackIndex: number): void; + } + interface AnimationStateListener { + /** Invoked when the current animation triggers an event. */ + event(trackIndex: number, event: Event): void; + /** Invoked when the current animation has completed. + * @param loopCount The number of times the animation reached the end. */ + complete(trackIndex: number, loopCount: number): void; + /** Invoked just after the current animation is set. */ + start(trackIndex: number): void; + /** Invoked just before the current animation is replaced. */ + end(trackIndex: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class AnimationStateData { + skeletonData: SkeletonData; + animationToMixTime: Map; + defaultMix: number; + constructor(skeletonData: SkeletonData); + setMix(fromName: string, toName: string, duration: number): void; + setMixWith(from: Animation, to: Animation, duration: number): void; + getMix(from: Animation, to: Animation): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + enum BlendMode { + Normal = 0, + Additive = 1, + Multiply = 2, + Screen = 3, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Bone implements Updatable { + data: BoneData; + skeleton: Skeleton; + parent: Bone; + children: Bone[]; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + appliedRotation: number; + a: number; + b: number; + worldX: number; + c: number; + d: number; + worldY: number; + worldSignX: number; + worldSignY: number; + sorted: boolean; + /** @param parent May be null. */ + constructor(data: BoneData, skeleton: Skeleton, parent: Bone); + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + update(): void; + /** Computes the world transform using the parent bone and this bone's local transform. */ + updateWorldTransform(): void; + /** Computes the world transform using the parent bone and the specified local transform. */ + 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; + worldToLocalRotationX(): number; + worldToLocalRotationY(): number; + rotateWorld(degrees: number): void; + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + updateLocalTransform(): void; + worldToLocal(world: Vector2): Vector2; + localToWorld(local: Vector2): Vector2; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class BoneData { + index: number; + name: string; + parent: BoneData; + length: number; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + inheritRotation: boolean; + inheritScale: boolean; + constructor(index: number, name: string, parent: BoneData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Event { + data: EventData; + intValue: number; + floatValue: number; + stringValue: string; + time: number; + constructor(time: number, data: EventData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class EventData { + name: string; + intValue: number; + floatValue: number; + stringValue: string; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class IkConstraint implements Updatable { + data: IkConstraintData; + bones: Array; + target: Bone; + mix: number; + bendDirection: number; + level: number; + constructor(data: IkConstraintData, skeleton: Skeleton); + apply(): void; + update(): void; + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + apply1(bone: Bone, targetX: number, targetY: number, alpha: number): void; + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class IkConstraintData { + name: string; + bones: BoneData[]; + target: BoneData; + bendDirection: number; + mix: number; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathConstraint implements Updatable { + static NONE: number; + static BEFORE: number; + static AFTER: 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[]; + constructor(data: PathConstraintData, skeleton: Skeleton); + 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathConstraintData { + name: string; + 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, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Skeleton { + data: SkeletonData; + bones: Array; + slots: Array; + drawOrder: Array; + ikConstraints: Array; + ikConstraintsSorted: Array; + transformConstraints: Array; + pathConstraints: Array; + _updateCache: Updatable[]; + skin: Skin; + color: Color; + time: number; + flipX: boolean; + flipY: boolean; + x: number; + y: number; + constructor(data: SkeletonData); + updateCache(): void; + sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void; + sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void; + sortBone(bone: Bone): void; + sortReset(bones: Array): void; + /** Updates the world transform for each bone and applies constraints. */ + updateWorldTransform(): void; + /** Sets the bones, constraints, and slots to their setup pose values. */ + setToSetupPose(): void; + /** Sets the bones and constraints to their setup pose values. */ + setBonesToSetupPose(): void; + setSlotsToSetupPose(): void; + /** @return May return null. */ + getRootBone(): Bone; + /** @return May be null. */ + findBone(boneName: string): Bone; + /** @return -1 if the bone was not found. */ + findBoneIndex(boneName: string): number; + /** @return May be null. */ + findSlot(slotName: string): Slot; + /** @return -1 if the bone was not found. */ + findSlotIndex(slotName: string): number; + /** Sets a skin by name. + * @see #setSkin(Skin) */ + setSkinByName(skinName: string): void; + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + setSkin(newSkin: Skin): void; + /** @return May be null. */ + getAttachmentByName(slotName: string, attachmentName: string): Attachment; + /** @return May be null. */ + getAttachment(slotIndex: number, attachmentName: string): Attachment; + /** @param attachmentName May be null. */ + setAttachment(slotName: string, attachmentName: string): void; + /** @return May be null. */ + findIkConstraint(constraintName: string): IkConstraint; + /** @return May be null. */ + findTransformConstraint(constraintName: string): TransformConstraint; + /** @return May be null. */ + findPathConstraint(constraintName: string): PathConstraint; + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + getBounds(offset: Vector2, size: Vector2): void; + update(delta: number): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonBounds { + minX: number; + minY: number; + maxX: number; + maxY: number; + boundingBoxes: BoundingBoxAttachment[]; + polygons: ArrayLike[]; + private _polygonPool; + update(skeleton: Skeleton, updateAabb: boolean): void; + aabbCompute(): void; + /** Returns true if the axis aligned bounding box contains the point. */ + aabbContainsPoint(x: number, y: number): boolean; + /** Returns true if the axis aligned bounding box intersects the line segment. */ + aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean; + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean; + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + containsPoint(x: number, y: number): BoundingBoxAttachment; + /** Returns true if the polygon contains the point. */ + containsPointPolygon(polygon: ArrayLike, x: number, y: number): boolean; + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment; + /** Returns true if the polygon contains any part of the line segment. */ + intersectsSegmentPolygon(polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number): boolean; + /** Returns the polygon for the specified bounding box, or null. */ + getPolygon(boundingBox: BoundingBoxAttachment): ArrayLike; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonData { + name: string; + bones: BoneData[]; + slots: SlotData[]; + skins: Skin[]; + defaultSkin: Skin; + events: EventData[]; + animations: Animation[]; + ikConstraints: IkConstraintData[]; + transformConstraints: TransformConstraintData[]; + pathConstraints: PathConstraintData[]; + width: number; + height: number; + version: string; + hash: string; + imagesPath: 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SkeletonJson { + attachmentLoader: AttachmentLoader; + scale: number; + private linkedMeshes; + constructor(attachmentLoader: AttachmentLoader); + readSkeletonData(json: string): SkeletonData; + readAttachment(map: any, skin: Skin, slotIndex: number, name: string): 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Skin { + name: string; + attachments: Map[]; + constructor(name: string); + addAttachment(slotIndex: number, name: string, attachment: Attachment): void; + /** @return May be null. */ + getAttachment(slotIndex: number, name: string): Attachment; + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + attachAll(skeleton: Skeleton, oldSkin: Skin): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class Slot { + data: SlotData; + bone: Bone; + color: Color; + private attachment; + private attachmentTime; + attachmentVertices: number[]; + constructor(data: SlotData, bone: Bone); + /** @return May be null. */ + getAttachment(): Attachment; + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + setAttachment(attachment: Attachment): void; + setAttachmentTime(time: number): void; + /** Returns the time since the attachment was set. */ + getAttachmentTime(): number; + setToSetupPose(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SlotData { + index: number; + name: string; + boneData: BoneData; + color: Color; + attachmentName: string; + blendMode: BlendMode; + constructor(index: number, name: string, boneData: BoneData); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TransformConstraint implements Updatable { + data: TransformConstraintData; + bones: Array; + target: Bone; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + temp: Vector2; + constructor(data: TransformConstraintData, skeleton: Skeleton); + apply(): void; + update(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TransformConstraintData { + name: string; + bones: BoneData[]; + target: BoneData; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + offsetRotation: number; + offsetX: number; + offsetY: number; + offsetScaleX: number; + offsetScaleY: number; + offsetShearY: number; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface Updatable { + update(): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface Map { + [key: string]: T; + } + interface Disposable { + dispose(): void; + } + class Color { + r: number; + g: number; + b: number; + a: number; + constructor(r?: number, g?: number, b?: number, a?: number); + set(r: number, g: number, b: number, a: number): void; + setFromColor(c: Color): void; + setFromString(hex: string): void; + add(r: number, g: number, b: number, a: number): void; + clamp(): this; + } + 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; + } + 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 newArray(size: number, defaultValue: T): Array; + static newFloatArray(size: number): ArrayLike; + static toFloatArray(array: Array): Float32Array | number[]; + } + 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; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + abstract class Attachment { + name: string; + constructor(name: string); + } + abstract class VertexAttachment extends Attachment { + bones: Array; + vertices: ArrayLike; + worldVerticesLength: number; + constructor(name: string); + computeWorldVertices(slot: Slot, worldVertices: ArrayLike): void; + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + computeWorldVerticesWith(slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number): void; + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + applyDeform(sourceAttachment: VertexAttachment): boolean; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + interface AttachmentLoader { + /** @return May be null to not load an attachment. */ + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + /** @return May be null to not load an attachment. */ + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + enum AttachmentType { + Region = 0, + BoundingBox = 1, + Mesh = 2, + LinkedMesh = 3, + Path = 4, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class BoundingBoxAttachment extends VertexAttachment { + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class MeshAttachment extends VertexAttachment { + region: TextureRegion; + path: string; + regionUVs: ArrayLike; + worldVertices: ArrayLike; + triangles: Array; + color: Color; + hullLength: number; + private _parentMesh; + inheritDeform: boolean; + tempColor: Color; + constructor(name: string); + updateUVs(): void; + /** @return The updated world vertices. */ + updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike; + applyDeform(sourceAttachment: VertexAttachment): boolean; + getParentMesh(): MeshAttachment; + /** @param parentMesh May be null. */ + setParentMesh(parentMesh: MeshAttachment): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class PathAttachment extends VertexAttachment { + lengths: Array; + closed: boolean; + constantSpeed: boolean; + constructor(name: string); + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + 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; + vertices: ArrayLike; + tempColor: Color; + constructor(name: string); + setRegion(region: TextureRegion): void; + updateOffset(): void; + updateWorldVertices(slot: Slot, premultipliedAlpha: boolean): ArrayLike; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class TextureRegion { + renderObject: any; + u: number; + v: number; + u2: number; + v2: number; + width: number; + height: number; + rotate: boolean; + offsetX: number; + offsetY: number; + originalWidth: number; + originalHeight: number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class AssetManager implements Disposable { + private _gl; + private _assets; + private _errors; + private _toLoad; + private _loaded; + constructor(gl: WebGLRenderingContext); + loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; + loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; + get(path: string): string | Texture; + remove(path: string): void; + removeAll(): void; + isLoadingComplete(): boolean; + toLoad(): number; + loaded(): number; + dispose(): void; + hasErrors(): boolean; + errors(): Map; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + const M00: number; + const M01: number; + const M02: number; + const M03: number; + const M10: number; + const M11: number; + const M12: number; + const M13: number; + const M20: number; + const M21: number; + const M22: number; + const M23: number; + const M30: number; + const M31: number; + const M32: number; + const M33: number; + class Matrix4 { + temp: Float32Array; + values: Float32Array; + constructor(); + set(values: ArrayLike): Matrix4; + transpose(): Matrix4; + identity(): Matrix4; + invert(): Matrix4; + determinant(): number; + translate(x: number, y: number, z: number): Matrix4; + copy(): Matrix4; + projection(near: number, far: number, fovy: number, aspectRatio: number): Matrix4; + ortho2d(x: number, y: number, width: number, height: number): Matrix4; + ortho(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4; + multiply(matrix: Matrix4): Matrix4; + multiplyLeft(matrix: Matrix4): Matrix4; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Mesh implements Disposable { + private _attributes; + private _gl; + private _vertices; + private _verticesBuffer; + private _verticesLength; + private _dirtyVertices; + private _indices; + private _indicesBuffer; + private _indicesLength; + private _dirtyIndices; + private _elementsPerVertex; + attributes(): VertexAttribute[]; + maxVertices(): number; + numVertices(): number; + setVerticesLength(length: number): void; + vertices(): Float32Array; + maxIndices(): number; + numIndices(): number; + setIndicesLength(length: number): void; + indices(): Uint16Array; + constructor(gl: WebGLRenderingContext, _attributes: VertexAttribute[], maxVertices: number, maxIndices: number); + setVertices(vertices: Array): void; + setIndices(indices: Array): void; + draw(shader: Shader, primitiveType: number): void; + drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void; + bind(shader: Shader): void; + unbind(shader: Shader): void; + private update(); + dispose(): void; + } + class VertexAttribute { + name: string; + type: VertexAttributeType; + numElements: number; + constructor(name: string, type: VertexAttributeType, numElements: number); + } + class Position2Attribute extends VertexAttribute { + constructor(); + } + class Position3Attribute extends VertexAttribute { + constructor(); + } + class TexCoordAttribute extends VertexAttribute { + constructor(unit?: number); + } + class ColorAttribute extends VertexAttribute { + constructor(); + } + enum VertexAttributeType { + Float = 0, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class PolygonBatcher { + private _gl; + private _drawCalls; + private _drawing; + private _mesh; + private _shader; + private _lastTexture; + private _verticesLength; + private _indicesLength; + private _srcBlend; + private _dstBlend; + constructor(gl: WebGLRenderingContext, maxVertices?: number); + begin(shader: Shader): void; + setBlendMode(srcBlend: number, dstBlend: number): void; + draw(texture: Texture, vertices: ArrayLike, indices: Array): void; + private flush(); + end(): void; + drawCalls(): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Shader implements Disposable { + private _vertexShader; + private _fragmentShader; + static MVP_MATRIX: string; + static POSITION: string; + static COLOR: string; + static TEXCOORDS: string; + static SAMPLER: string; + private _gl; + private _vs; + private _fs; + private _program; + private _tmp2x2; + private _tmp3x3; + private _tmp4x4; + program(): WebGLProgram; + vertexShader(): string; + fragmentShader(): string; + constructor(gl: WebGLRenderingContext, _vertexShader: string, _fragmentShader: string); + private compile(); + private compileShader(type, source); + private compileProgram(vs, fs); + bind(): void; + unbind(): void; + setUniformi(uniform: string, value: number): void; + setUniformf(uniform: string, value: number): void; + setUniform2f(uniform: string, value: number, value2: number): void; + setUniform3f(uniform: string, value: number, value2: number, value3: number): void; + setUniform4f(uniform: string, value: number, value2: number, value3: number, value4: number): void; + setUniform2x2f(uniform: string, value: ArrayLike): void; + setUniform3x3f(uniform: string, value: ArrayLike): void; + setUniform4x4f(uniform: string, value: ArrayLike): void; + getUniformLocation(uniform: string): WebGLUniformLocation; + getAttributeLocation(attribute: string): number; + dispose(): void; + static newColoredTextured(gl: WebGLRenderingContext): Shader; + static newColored(gl: WebGLRenderingContext): Shader; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class SkeletonRenderer { + static QUAD_TRIANGLES: number[]; + premultipliedAlpha: boolean; + private _gl; + constructor(gl: WebGLRenderingContext); + draw(batcher: PolygonBatcher, skeleton: Skeleton): void; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Texture implements Disposable { + private _gl; + private _texture; + private _image; + private _boundUnit; + constructor(gl: WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean); + getImage(): HTMLImageElement; + setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; + setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; + update(useMipMaps: boolean): void; + bind(unit?: number): void; + unbind(): void; + dispose(): void; + static filterFromString(text: string): TextureFilter; + static wrapFromString(text: string): TextureWrap; + } + enum TextureFilter { + Nearest, + Linear, + MipMap, + MipMapNearestNearest, + MipMapLinearNearest, + MipMapNearestLinear, + MipMapLinearLinear, + } + enum TextureWrap { + MirroredRepeat, + ClampToEdge, + Repeat, + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class TextureAtlas implements Disposable { + pages: TextureAtlasPage[]; + regions: TextureAtlasRegion[]; + constructor(atlasText: string, textureLoader: (path: string) => Texture); + private load(atlasText, textureLoader); + findRegion(name: string): TextureAtlasRegion; + dispose(): void; + } + class TextureAtlasPage { + name: string; + minFilter: TextureFilter; + magFilter: TextureFilter; + uWrap: TextureWrap; + vWrap: TextureWrap; + texture: Texture; + width: number; + height: number; + } + class TextureAtlasRegion extends TextureRegion { + page: TextureAtlasPage; + name: string; + x: number; + y: number; + index: number; + rotate: boolean; + texture: Texture; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class TextureAtlasAttachmentLoader implements AttachmentLoader { + atlas: TextureAtlas; + constructor(atlas: TextureAtlas); + /** @return May be null to not load an attachment. */ + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + /** @return May be null to not load an attachment. */ + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + class Vector3 { + x: number; + y: number; + z: number; + set(x: number, y: number, z: number): Vector3; + add(v: Vector3): Vector3; + sub(v: Vector3): Vector3; + scale(s: number): Vector3; + normalize(): Vector3; + cross(v: Vector3): Vector3; + multiply(matrix: Matrix4): Vector3; + project(matrix: Matrix4): Vector3; + dot(v: Vector3): number; + length(): number; + distance(v: Vector3): number; + } +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine.webgl { + function getSourceGLBlendMode(gl: WebGLRenderingContext, blendMode: BlendMode, premultipliedAlpha?: boolean): number; + function getDestGLBlendMode(gl: WebGLRenderingContext, blendMode: BlendMode): number; +} +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +declare module spine { + class SpineWidget { + skeleton: Skeleton; + state: AnimationState; + gl: WebGLRenderingContext; + canvas: HTMLCanvasElement; + private _config; + private _assetManager; + private _shader; + private _batcher; + private _mvp; + private _skeletonRenderer; + private _paused; + private _lastFrameTime; + private _backgroundColor; + private _loaded; + constructor(element: Element | string, config: SpineWidgetConfig); + private validateConfig(config); + private load(); + private render(); + pause(): void; + play(): void; + isPlaying(): boolean; + setAnimation(animationName: string): void; + static loadWidgets(): void; + static loadWidget(widget: Element): void; + static pageLoaded: boolean; + private static ready(); + static setupDOMListener(): void; + } + class SpineWidgetConfig { + json: string; + atlas: string; + animation: string; + imagesPath: string; + skin: string; + loop: boolean; + scale: number; + x: number; + y: number; + width: number; + height: number; + backgroundColor: string; + premultipliedAlpha: boolean; + success: (widget: SpineWidget) => void; + error: (widget: SpineWidget, msg: string) => void; + } +} diff --git a/spine-ts/build/spine-widget.js b/spine-ts/build/spine-widget.js new file mode 100644 index 000000000..f7fc58237 --- /dev/null +++ b/spine-ts/build/spine-widget.js @@ -0,0 +1,6877 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var spine; +(function (spine) { + 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) { + 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, 1); + }; + Animation.prototype.mix = function (skeleton, lastTime, time, loop, events, alpha) { + 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); + }; + 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; + }()); + spine.Animation = Animation; + var CurveTimeline = (function () { + function CurveTimeline(frameCount) { + if (frameCount <= 0) + throw new Error("frameCount must be > 0: " + frameCount); + this.curves = spine.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; + }; + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + 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 = spine.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); // Last point is 1,1. + }; + CurveTimeline.LINEAR = 0; + CurveTimeline.STEPPED = 1; + CurveTimeline.BEZIER = 2; + CurveTimeline.BEZIER_SIZE = 10 * 2 - 1; + return CurveTimeline; + }()); + spine.CurveTimeline = CurveTimeline; + var RotateTimeline = (function (_super) { + __extends(RotateTimeline, _super); + function RotateTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount << 1); + } + /** Sets the time and angle of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { + var amount_1 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation; + while (amount_1 > 180) + amount_1 -= 360; + while (amount_1 < -180) + amount_1 += 360; + bone.rotation += amount_1 * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + 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 amount = frames[frame + RotateTimeline.ROTATION] - prevRotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + amount = bone.data.rotation + (prevRotation + amount * percent) - bone.rotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + bone.rotation += amount * alpha; + }; + RotateTimeline.ENTRIES = 2; + RotateTimeline.PREV_TIME = -2; + RotateTimeline.PREV_ROTATION = -1; + RotateTimeline.ROTATION = 1; + return RotateTimeline; + }(CurveTimeline)); + spine.RotateTimeline = RotateTimeline; + var TranslateTimeline = (function (_super) { + __extends(TranslateTimeline, _super); + function TranslateTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { + bone.x += (bone.data.x + frames[frames.length + TranslateTimeline.PREV_X] - bone.x) * alpha; + bone.y += (bone.data.y + frames[frames.length + TranslateTimeline.PREV_Y] - bone.y) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES); + var prevX = frames[frame + TranslateTimeline.PREV_X]; + var prevY = 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)); + bone.x += (bone.data.x + prevX + (frames[frame + TranslateTimeline.X] - prevX) * percent - bone.x) * alpha; + bone.y += (bone.data.y + prevY + (frames[frame + TranslateTimeline.Y] - prevY) * percent - bone.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)); + spine.TranslateTimeline = TranslateTimeline; + var ScaleTimeline = (function (_super) { + __extends(ScaleTimeline, _super); + function ScaleTimeline(frameCount) { + _super.call(this, frameCount); + } + ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { + bone.scaleX += (bone.data.scaleX * frames[frames.length + ScaleTimeline.PREV_X] - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * frames[frames.length + ScaleTimeline.PREV_Y] - bone.scaleY) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES); + var prevX = frames[frame + ScaleTimeline.PREV_X]; + var prevY = 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)); + bone.scaleX += (bone.data.scaleX * (prevX + (frames[frame + ScaleTimeline.X] - prevX) * percent) - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * (prevY + (frames[frame + ScaleTimeline.Y] - prevY) * percent) - bone.scaleY) * alpha; + }; + return ScaleTimeline; + }(TranslateTimeline)); + spine.ScaleTimeline = ScaleTimeline; + var ShearTimeline = (function (_super) { + __extends(ShearTimeline, _super); + function ShearTimeline(frameCount) { + _super.call(this, frameCount); + } + ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { + bone.shearX += (bone.data.shearX + frames[frames.length + ShearTimeline.PREV_X] - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + frames[frames.length + ShearTimeline.PREV_Y] - bone.shearY) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES); + var prevX = frames[frame + ShearTimeline.PREV_X]; + var prevY = 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)); + bone.shearX += (bone.data.shearX + (prevX + (frames[frame + ShearTimeline.X] - prevX) * percent) - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + (prevY + (frames[frame + ShearTimeline.Y] - prevY) * percent) - bone.shearY) * alpha; + }; + return ShearTimeline; + }(TranslateTimeline)); + spine.ShearTimeline = ShearTimeline; + var ColorTimeline = (function (_super) { + __extends(ColorTimeline, _super); + function ColorTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + 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 { + // Interpolate between the previous frame and the current frame. + 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; + } + var color = skeleton.slots[this.slotIndex].color; + if (alpha < 1) + color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha); + else + color.set(r, g, b, a); + }; + 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)); + spine.ColorTimeline = ColorTimeline; + var AttachmentTimeline = (function () { + function AttachmentTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.attachmentNames = new Array(frameCount); + } + AttachmentTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time and value of the specified keyframe. */ + AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) { + this.frames[frameIndex] = time; + this.attachmentNames[frameIndex] = attachmentName; + }; + AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + 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; + }()); + spine.AttachmentTimeline = AttachmentTimeline; + var EventTimeline = (function () { + function EventTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.events = new Array(frameCount); + } + EventTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time of the specified keyframe. */ + EventTimeline.prototype.setFrame = function (frameIndex, event) { + this.frames[frameIndex] = event.time; + this.events[frameIndex] = event; + }; + /** Fires events for frames > lastTime and <= time. */ + EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + 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); + lastTime = -1; + } + else if (lastTime >= frames[frameCount - 1]) + return; + if (time < frames[0]) + return; // Time is before first frame. + 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; + }()); + spine.EventTimeline = EventTimeline; + var DrawOrderTimeline = (function () { + function DrawOrderTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.drawOrders = new Array(frameCount); + } + DrawOrderTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) { + this.frames[frameIndex] = time; + this.drawOrders[frameIndex] = drawOrder; + }; + DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var frame = 0; + if (time >= frames[frames.length - 1]) + frame = frames.length - 1; + else + frame = Animation.binarySearch(frames, time) - 1; + var drawOrder = skeleton.drawOrder; + var slots = skeleton.slots; + var drawOrderToSetupIndex = this.drawOrders[frame]; + if (drawOrderToSetupIndex == null) + spine.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; + }()); + spine.DrawOrderTimeline = DrawOrderTimeline; + var DeformTimeline = (function (_super) { + __extends(DeformTimeline, _super); + function DeformTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount); + this.frameVertices = new Array(frameCount); + } + /** Sets the time of the specified keyframe. */ + DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) { + this.frames[frameIndex] = time; + this.frameVertices[frameIndex] = vertices; + }; + DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var slot = skeleton.slots[this.slotIndex]; + var slotAttachment = slot.getAttachment(); + if (!(slotAttachment instanceof spine.VertexAttachment) || !slotAttachment.applyDeform(this.attachment)) + return; + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var frameVertices = this.frameVertices; + var vertexCount = frameVertices[0].length; + var verticesArray = slot.attachmentVertices; + if (verticesArray.length != vertexCount) + alpha = 1; // Don't mix from uninitialized slot vertices. + var vertices = spine.Utils.setArraySize(verticesArray, vertexCount); + if (time >= frames[frames.length - 1]) { + var lastVertices = frameVertices[frames.length - 1]; + if (alpha < 1) { + for (var i = 0; i < vertexCount; i++) + vertices[i] += (lastVertices[i] - vertices[i]) * alpha; + } + else + spine.Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount); + return; + } + // Interpolate between the previous frame and the current frame. + 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) { + for (var i = 0; i < vertexCount; i++) { + var prev = prevVertices[i]; + vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha; + } + } + else { + for (var i = 0; i < vertexCount; i++) { + var prev = prevVertices[i]; + vertices[i] = prev + (nextVertices[i] - prev) * percent; + } + } + }; + return DeformTimeline; + }(CurveTimeline)); + spine.DeformTimeline = DeformTimeline; + var IkConstraintTimeline = (function (_super) { + __extends(IkConstraintTimeline, _super); + function IkConstraintTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES); + } + /** Sets the time, mix and bend direction of the specified keyframe. */ + IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, bendDirection) { + frameIndex *= IkConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + IkConstraintTimeline.MIX] = mix; + this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection; + }; + IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.ikConstraints[this.ikConstraintIndex]; + if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { + constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]); + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES); + var mix = frames[frame + IkConstraintTimeline.PREV_MIX]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime)); + constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]); + }; + IkConstraintTimeline.ENTRIES = 3; + IkConstraintTimeline.PREV_TIME = -3; + IkConstraintTimeline.PREV_MIX = -2; + IkConstraintTimeline.PREV_BEND_DIRECTION = -1; + IkConstraintTimeline.MIX = 1; + IkConstraintTimeline.BEND_DIRECTION = 2; + return IkConstraintTimeline; + }(CurveTimeline)); + spine.IkConstraintTimeline = IkConstraintTimeline; + var TransformConstraintTimeline = (function (_super) { + __extends(TransformConstraintTimeline, _super); + function TransformConstraintTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES); + } + /** Sets the time and mixes of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.transformConstraints[this.transformConstraintIndex]; + if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { + var i = frames.length; + constraint.rotateMix += (frames[i + TransformConstraintTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + TransformConstraintTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + constraint.scaleMix += (frames[i + TransformConstraintTimeline.PREV_SCALE] - constraint.scaleMix) * alpha; + constraint.shearMix += (frames[i + TransformConstraintTimeline.PREV_SHEAR] - constraint.shearMix) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES); + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime)); + var rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE]; + var translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE]; + var scale = frames[frame + TransformConstraintTimeline.PREV_SCALE]; + var shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR]; + constraint.rotateMix += (rotate + (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent - constraint.translateMix) + * alpha; + constraint.scaleMix += (scale + (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent - constraint.scaleMix) * alpha; + constraint.shearMix += (shear + (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent - 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)); + spine.TransformConstraintTimeline = TransformConstraintTimeline; + var PathConstraintPositionTimeline = (function (_super) { + __extends(PathConstraintPositionTimeline, _super); + function PathConstraintPositionTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES); + } + /** Sets the time and value of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) { + var i = frames.length; + constraint.position += (frames[i + PathConstraintPositionTimeline.PREV_VALUE] - constraint.position) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES); + var 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)); + constraint.position += (position + (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent - constraint.position) * alpha; + }; + PathConstraintPositionTimeline.ENTRIES = 2; + PathConstraintPositionTimeline.PREV_TIME = -2; + PathConstraintPositionTimeline.PREV_VALUE = -1; + PathConstraintPositionTimeline.VALUE = 1; + return PathConstraintPositionTimeline; + }(CurveTimeline)); + spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline; + var PathConstraintSpacingTimeline = (function (_super) { + __extends(PathConstraintSpacingTimeline, _super); + function PathConstraintSpacingTimeline(frameCount) { + _super.call(this, frameCount); + } + PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) { + var i = frames.length; + constraint.spacing += (frames[i + PathConstraintSpacingTimeline.PREV_VALUE] - constraint.spacing) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES); + var 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)); + constraint.spacing += (spacing + (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent - constraint.spacing) * alpha; + }; + return PathConstraintSpacingTimeline; + }(PathConstraintPositionTimeline)); + spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline; + var PathConstraintMixTimeline = (function (_super) { + __extends(PathConstraintMixTimeline, _super); + function PathConstraintMixTimeline(frameCount) { + _super.call(this, frameCount); + this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES); + } + /** Sets the time and mixes of the specified keyframe. */ + 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) { + var frames = this.frames; + if (time < frames[0]) + return; // Time is before first frame. + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { + var i = frames.length; + constraint.rotateMix += (frames[i + PathConstraintMixTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + PathConstraintMixTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + return; + } + // Interpolate between the previous frame and the current frame. + var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES); + var rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE]; + var 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)); + constraint.rotateMix += (rotate + (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent - 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)); + spine.PathConstraintMixTimeline = PathConstraintMixTimeline; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var AnimationState = (function () { + function AnimationState(data) { + if (data === void 0) { data = null; } + this.tracks = new Array(); + this.events = new Array(); + this.listeners = new Array(); + this.timeScale = 1; + if (data == null) + throw new Error("data cannot be null."); + this.data = data; + } + AnimationState.prototype.update = function (delta) { + delta *= this.timeScale; + for (var i = 0; i < this.tracks.length; i++) { + var current = this.tracks[i]; + if (current == null) + continue; + var next = current.next; + if (next != null) { + var nextTime = current.lastTime - next.delay; + if (nextTime >= 0) { + var nextDelta = delta * next.timeScale; + next.time = nextTime + nextDelta; // For start event to see correct time. + current.time += delta * current.timeScale; // For end event to see correct time. + this.setCurrent(i, next); + next.time -= nextDelta; // Prevent increasing time twice, below. + current = next; + } + } + else if (!current.loop && current.lastTime >= current.endTime) { + // End non-looping animation when it reaches its end time and there is no next entry. + this.clearTrack(i); + continue; + } + current.time += delta * current.timeScale; + if (current.previous != null) { + var previousDelta = delta * current.previous.timeScale; + current.previous.time += previousDelta; + current.mixTime += previousDelta; + } + } + }; + AnimationState.prototype.apply = function (skeleton) { + var events = this.events; + var listenerCount = this.listeners.length; + for (var i = 0; i < this.tracks.length; i++) { + var current = this.tracks[i]; + if (current == null) + continue; + events.length = 0; + var time = current.time; + var lastTime = current.lastTime; + var endTime = current.endTime; + var loop = current.loop; + if (!loop && time > endTime) + time = endTime; + var previous = current.previous; + if (previous == null) + current.animation.mix(skeleton, lastTime, time, loop, events, current.mix); + else { + var previousTime = previous.time; + if (!previous.loop && previousTime > previous.endTime) + previousTime = previous.endTime; + previous.animation.apply(skeleton, previousTime, previousTime, previous.loop, null); + var alpha = current.mixTime / current.mixDuration * current.mix; + if (alpha >= 1) { + alpha = 1; + current.previous = null; + } + current.animation.mix(skeleton, lastTime, time, loop, events, alpha); + } + for (var ii = 0, nn = events.length; ii < nn; ii++) { + var event_1 = events[ii]; + if (current.listener != null) + current.listener.event(i, event_1); + for (var iii = 0; iii < listenerCount; iii++) + this.listeners[iii].event(i, event_1); + } + // Check if completed the animation or a loop iteration. + if (loop ? (lastTime % endTime > time % endTime) : (lastTime < endTime && time >= endTime)) { + var count = spine.MathUtils.toInt(time / endTime); + if (current.listener != null) + current.listener.complete(i, count); + for (var ii = 0, nn = this.listeners.length; ii < nn; ii++) + this.listeners[ii].complete(i, count); + } + current.lastTime = current.time; + } + }; + AnimationState.prototype.clearTracks = function () { + for (var i = 0, n = this.tracks.length; i < n; i++) + this.clearTrack(i); + this.tracks.length = 0; + }; + AnimationState.prototype.clearTrack = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return; + var current = this.tracks[trackIndex]; + if (current == null) + return; + if (current.listener != null) + current.listener.end(trackIndex); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(trackIndex); + this.tracks[trackIndex] = null; + this.freeAll(current); + }; + AnimationState.prototype.freeAll = function (entry) { + while (entry != null) { + var next = entry.next; + entry = next; + } + }; + AnimationState.prototype.expandToIndex = function (index) { + if (index < this.tracks.length) + return this.tracks[index]; + spine.Utils.setArraySize(this.tracks, index - this.tracks.length + 1, null); + this.tracks.length = index + 1; + return null; + }; + AnimationState.prototype.setCurrent = function (index, entry) { + var current = this.expandToIndex(index); + if (current != null) { + var previous = current.previous; + current.previous = null; + if (current.listener != null) + current.listener.end(index); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(index); + entry.mixDuration = this.data.getMix(current.animation, entry.animation); + if (entry.mixDuration > 0) { + entry.mixTime = 0; + // If a mix is in progress, mix from the closest animation. + if (previous != null && current.mixTime / current.mixDuration < 0.5) { + entry.previous = previous; + previous = current; + } + else + entry.previous = current; + } + } + this.tracks[index] = entry; + if (entry.listener != null) + entry.listener.start(index); + for (var i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].start(index); + }; + /** @see #setAnimation(int, Animation, boolean) */ + 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); + }; + /** Set the current animation. Any queued animations are cleared. */ + AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) { + var current = this.expandToIndex(trackIndex); + if (current != null) + this.freeAll(current.next); + var entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + this.setCurrent(trackIndex, entry); + return entry; + }; + /** {@link #addAnimation(int, Animation, boolean, float)} */ + 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); + }; + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) { + var entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + var last = this.expandToIndex(trackIndex); + if (last != null) { + while (last.next != null) + last = last.next; + last.next = entry; + } + else + this.tracks[trackIndex] = entry; + if (delay <= 0) { + if (last != null) + delay += last.endTime - this.data.getMix(last.animation, animation); + else + delay = 0; + } + entry.delay = delay; + return entry; + }; + /** @return May be null. */ + AnimationState.prototype.getCurrent = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return null; + return this.tracks[trackIndex]; + }; + /** Adds a listener to receive events for all animations. */ + AnimationState.prototype.addListener = function (listener) { + if (listener == null) + throw new Error("listener cannot be null."); + this.listeners.push(listener); + }; + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + 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; + }; + return AnimationState; + }()); + spine.AnimationState = AnimationState; + var TrackEntry = (function () { + function TrackEntry() { + this.loop = false; + this.delay = 0; + this.time = 0; + this.lastTime = -1; + this.endTime = 0; + this.timeScale = 1; + this.mixTime = 0; + this.mixDuration = 0; + this.mix = 1; + } + TrackEntry.prototype.reset = function () { + this.next = null; + this.previous = null; + this.animation = null; + this.listener = null; + this.timeScale = 1; + this.lastTime = -1; // Trigger events on frame zero. + this.time = 0; + }; + /** Returns true if the current time is greater than the end time, regardless of looping. */ + TrackEntry.prototype.isComplete = function () { + return this.time >= this.endTime; + }; + return TrackEntry; + }()); + spine.TrackEntry = TrackEntry; + var AnimationStateAdapter = (function () { + function AnimationStateAdapter() { + } + AnimationStateAdapter.prototype.event = function (trackIndex, event) { + }; + AnimationStateAdapter.prototype.complete = function (trackIndex, loopCount) { + }; + AnimationStateAdapter.prototype.start = function (trackIndex) { + }; + AnimationStateAdapter.prototype.end = function (trackIndex) { + }; + return AnimationStateAdapter; + }()); + spine.AnimationStateAdapter = AnimationStateAdapter; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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.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; + }; + return AnimationStateData; + }()); + spine.AnimationStateData = AnimationStateData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + (function (BlendMode) { + BlendMode[BlendMode["Normal"] = 0] = "Normal"; + BlendMode[BlendMode["Additive"] = 1] = "Additive"; + BlendMode[BlendMode["Multiply"] = 2] = "Multiply"; + BlendMode[BlendMode["Screen"] = 3] = "Screen"; + })(spine.BlendMode || (spine.BlendMode = {})); + var BlendMode = spine.BlendMode; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Bone = (function () { + /** @param parent May be null. */ + function Bone(data, skeleton, parent) { + 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.appliedRotation = 0; + this.a = 0; + this.b = 0; + this.worldX = 0; + this.c = 0; + this.d = 0; + this.worldY = 0; + this.worldSignX = 0; + this.worldSignY = 0; + this.sorted = 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(); + } + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + Bone.prototype.update = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + /** Computes the world transform using the parent bone and this bone's local transform. */ + Bone.prototype.updateWorldTransform = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + /** Computes the world transform using the parent bone and the specified local transform. */ + Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) { + this.appliedRotation = rotation; + var rotationY = rotation + 90 + shearY; + var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX, lb = spine.MathUtils.cosDeg(rotationY) * scaleY; + var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX, ld = spine.MathUtils.sinDeg(rotationY) * scaleY; + var parent = this.parent; + if (parent == null) { + var skeleton = this.skeleton; + if (skeleton.flipX) { + x = -x; + la = -la; + lb = -lb; + } + if (skeleton.flipY) { + y = -y; + lc = -lc; + ld = -ld; + } + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + this.worldX = x; + this.worldY = y; + this.worldSignX = spine.MathUtils.signum(scaleX); + this.worldSignY = spine.MathUtils.signum(scaleY); + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + this.worldX = pa * x + pb * y + parent.worldX; + this.worldY = pc * x + pd * y + parent.worldY; + this.worldSignX = parent.worldSignX * spine.MathUtils.signum(scaleX); + this.worldSignY = parent.worldSignY * spine.MathUtils.signum(scaleY); + if (this.data.inheritRotation && this.data.inheritScale) { + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else { + if (this.data.inheritRotation) { + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + var cos = spine.MathUtils.cosDeg(parent.appliedRotation), sin = spine.MathUtils.sinDeg(parent.appliedRotation); + var temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + if (!parent.data.inheritRotation) + break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else if (this.data.inheritScale) { + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + var cos = spine.MathUtils.cosDeg(parent.appliedRotation), sin = spine.MathUtils.sinDeg(parent.appliedRotation); + var psx = parent.scaleX, psy = parent.scaleY; + var za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy; + var temp = pa * za + pb * zc; + pb = pb * zd - pa * zb; + pa = temp; + temp = pc * za + pd * zc; + pd = pd * zd - pc * zb; + pc = temp; + if (psx >= 0) + sin = -sin; + temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + if (!parent.data.inheritScale) + break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } + else { + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + } + if (this.skeleton.flipX) { + this.a = -this.a; + this.b = -this.b; + } + if (this.skeleton.flipY) { + this.c = -this.c; + this.d = -this.d; + } + } + }; + 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.c, this.a) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldRotationY = function () { + return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldScaleX = function () { + return Math.sqrt(this.a * this.a + this.b * this.b) * this.worldSignX; + }; + Bone.prototype.getWorldScaleY = function () { + return Math.sqrt(this.c * this.c + this.d * this.d) * this.worldSignY; + }; + Bone.prototype.worldToLocalRotationX = function () { + var parent = this.parent; + if (parent == null) + return this.rotation; + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, a = this.a, c = this.c; + return Math.atan2(pa * c - pc * a, pd * a - pb * c) * spine.MathUtils.radDeg; + }; + Bone.prototype.worldToLocalRotationY = function () { + var parent = this.parent; + if (parent == null) + return this.rotation; + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, b = this.b, d = this.d; + return Math.atan2(pa * d - pc * b, pd * b - pb * d) * spine.MathUtils.radDeg; + }; + Bone.prototype.rotateWorld = function (degrees) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees); + this.a = cos * a - sin * c; + this.b = cos * b - sin * d; + this.c = sin * a + cos * c; + this.d = sin * b + cos * d; + }; + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + Bone.prototype.updateLocalTransform = function () { + var parent = this.parent; + if (parent == null) { + this.x = this.worldX; + this.y = this.worldY; + this.rotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg; + this.scaleX = Math.sqrt(this.a * this.a + this.c * this.c); + this.scaleY = Math.sqrt(this.b * this.b + this.d * this.d); + var det = this.a * this.d - this.b * this.c; + this.shearX = 0; + this.shearY = Math.atan2(this.a * this.b + this.c * this.d, det) * spine.MathUtils.radDeg; + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + var pid = 1 / (pa * pd - pb * pc); + var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY; + this.x = (dx * pd * pid - dy * pb * pid); + this.y = (dy * pa * pid - dx * pc * pid); + var ia = pid * pd; + var id = pid * pa; + var ib = pid * pb; + var ic = pid * pc; + var ra = ia * this.a - ib * this.c; + var rb = ia * this.b - ib * this.d; + var rc = id * this.c - ic * this.a; + var rd = id * this.d - ic * this.b; + this.shearX = 0; + this.scaleX = Math.sqrt(ra * ra + rc * rc); + if (this.scaleX > 0.0001) { + var det = ra * rd - rb * rc; + this.scaleY = det / this.scaleX; + this.shearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg; + this.rotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg; + } + else { + this.scaleX = 0; + this.scaleY = Math.sqrt(rb * rb + rd * rd); + this.shearY = 0; + this.rotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg; + } + this.appliedRotation = this.rotation; + }; + Bone.prototype.worldToLocal = function (world) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var invDet = 1 / (a * d - b * c); + var x = world.x - this.worldX, y = world.y - this.worldY; + world.x = (x * d * invDet - y * b * invDet); + world.y = (y * a * invDet - x * c * invDet); + return world; + }; + Bone.prototype.localToWorld = function (local) { + var x = local.x, y = local.y; + local.x = x * this.a + y * this.b + this.worldX; + local.y = x * this.c + y * this.d + this.worldY; + return local; + }; + return Bone; + }()); + spine.Bone = Bone; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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.inheritRotation = true; + this.inheritScale = true; + 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; + }()); + spine.BoneData = BoneData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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; + }()); + spine.Event = Event; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var EventData = (function () { + function EventData(name) { + this.name = name; + } + return EventData; + }()); + spine.EventData = EventData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var IkConstraint = (function () { + function IkConstraint(data, skeleton) { + this.mix = 1; + this.bendDirection = 0; + this.level = 0; + 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.bendDirection = data.bendDirection; + 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.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.mix); + break; + case 2: + this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix); + break; + } + }; + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) { + var pp = bone.parent; + var id = 1 / (pp.a * pp.d - pp.b * pp.c); + var x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * pp.d - y * pp.b) * id - bone.x, ty = (y * pp.a - x * pp.c) * id - bone.y; + var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.shearX - bone.rotation; + if (bone.scaleX < 0) + rotationIK += 180; + if (rotationIK > 180) + rotationIK -= 360; + else if (rotationIK < -180) + rotationIK += 360; + bone.updateWorldTransformWith(bone.x, bone.y, bone.rotation + rotationIK * alpha, bone.scaleX, bone.scaleY, bone.shearX, bone.shearY); + }; + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, alpha) { + if (alpha == 0) { + child.updateWorldTransform(); + return; + } + var px = parent.x, py = parent.y, psx = parent.scaleX, psy = parent.scaleY, csx = child.scaleX; + 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.x, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d; + var u = Math.abs(psx - psy) <= 0.0001; + if (!u) { + cy = 0; + cwx = a * cx + parent.worldX; + cwy = c * cx + parent.worldY; + } + else { + cy = child.y; + cwx = a * cx + b * cy + parent.worldX; + cwy = c * cx + d * cy + parent.worldY; + } + var pp = parent.parent; + a = pp.a; + b = pp.b; + c = pp.c; + d = pp.d; + var id = 1 / (a * d - b * c), x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py; + x = cwx - pp.worldX; + y = cwy - pp.worldY; + 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 = 0, a2 = 0; + outer: if (u) { + l2 *= psx; + var cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2); + if (cos < -1) + cos = -1; + else if (cos > 1) + cos = 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, dd = tx * tx + ty * ty, 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 = 0, minDist = Number.MAX_VALUE, minX = 0, minY = 0; + var maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0; + x = l1 + a; + d = x * x; + if (d > maxDist) { + maxAngle = 0; + maxDist = d; + maxX = x; + } + x = l1 - a; + d = x * x; + if (d < minDist) { + minAngle = spine.MathUtils.PI; + minDist = d; + minX = x; + } + var angle = Math.acos(-a * l1 / (aa - bb)); + x = a * Math.cos(angle) + l1; + y = b * Math.sin(angle); + d = x * x + y * y; + if (d < minDist) { + minAngle = angle; + minDist = d; + minX = x; + minY = y; + } + if (d > maxDist) { + maxAngle = angle; + 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.rotation; + a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation; + if (a1 > 180) + a1 -= 360; + else if (a1 < -180) + a1 += 360; + parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.scaleX, parent.scaleY, 0, 0); + rotation = child.rotation; + a2 = ((a2 + os) * spine.MathUtils.radDeg - child.shearX) * s2 + os2 - rotation; + if (a2 > 180) + a2 -= 360; + else if (a2 < -180) + a2 += 360; + child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.scaleX, child.scaleY, child.shearX, child.shearY); + }; + return IkConstraint; + }()); + spine.IkConstraint = IkConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var IkConstraintData = (function () { + function IkConstraintData(name) { + this.bones = new Array(); + this.bendDirection = 1; + this.mix = 1; + this.name = name; + } + return IkConstraintData; + }()); + spine.IkConstraintData = IkConstraintData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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(); + 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.apply = function () { + this.update(); + }; + PathConstraint.prototype.update = function () { + var attachment = this.target.getAttachment(); + if (!(attachment instanceof spine.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 == spine.SpacingMode.Length; + var rotateMode = data.rotateMode; + var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale; + var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1; + var bones = this.bones; + var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null; + var spacing = this.spacing; + if (scale || lengthSpacing) { + if (scale) + lengths = spine.Utils.setArraySize(this.lengths, boneCount); + for (var i = 0, n = spacesCount - 1; i < n;) { + var bone = bones[i]; + var length_1 = bone.data.length, x = length_1 * bone.a, y = length_1 * bone.c; + length_1 = Math.sqrt(x * x + y * y); + if (scale) + lengths[i] = length_1; + spaces[++i] = lengthSpacing ? Math.max(0, length_1 + spacing) : spacing; + } + } + else { + for (var i = 1; i < spacesCount; i++) + spaces[i] = spacing; + } + var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, spacingMode == spine.SpacingMode.Percent); + var skeleton = this.target.bone.skeleton; + var skeletonX = skeleton.x, skeletonY = skeleton.y; + var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; + var tip = rotateMode == spine.RotateMode.Chain && offsetRotation == 0; + for (var i = 0, p = 3; i < boneCount; i++, p += 3) { + var bone = bones[i]; + bone.worldX += (boneX - skeletonX - bone.worldX) * translateMix; + bone.worldY += (boneY - skeletonY - bone.worldY) * 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; + bone.a *= s; + bone.c *= s; + } + } + boneX = x; + boneY = y; + if (rotate) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.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) - offsetRotation * spine.MathUtils.degRad; + 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; + } + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + cos = Math.cos(r); + sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + } + }; + PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) { + var target = this.target; + var position = this.position; + var spaces = this.spaces, out = spine.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 = spine.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.computeWorldVerticesWith(target, 2, 4, world, 0); + } + this.addBeforePosition(p, world, 0, out, o); + continue; + } + else if (p > pathLength_1) { + if (prevCurve != PathConstraint.AFTER) { + prevCurve = PathConstraint.AFTER; + path.computeWorldVerticesWith(target, verticesLength - 6, 4, world, 0); + } + this.addAfterPosition(p - pathLength_1, world, 0, out, o); + continue; + } + // Determine curve containing position. + 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.computeWorldVerticesWith(target, verticesLength - 4, 4, world, 0); + path.computeWorldVerticesWith(target, 0, 4, world, 4); + } + else + path.computeWorldVerticesWith(target, curve * 6 + 2, 8, world, 0); + } + 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; + } + // World vertices. + if (closed) { + verticesLength += 2; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength - 4, world, 0); + path.computeWorldVerticesWith(target, 0, 2, world, verticesLength - 4); + world[verticesLength - 2] = world[0]; + world[verticesLength - 1] = world[1]; + } + else { + curveCount--; + verticesLength -= 4; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength, world, 0); + } + // Curve lengths. + var curves = spine.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; + } + // Determine curve containing position. + 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; + } + // Curve segment lengths. + 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; + } + // Weight by segment length. + 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) + 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; + return PathConstraint; + }()); + spine.PathConstraint = PathConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var PathConstraintData = (function () { + function PathConstraintData(name) { + this.bones = new Array(); + this.name = name; + } + return PathConstraintData; + }()); + spine.PathConstraintData = PathConstraintData; + (function (PositionMode) { + PositionMode[PositionMode["Fixed"] = 0] = "Fixed"; + PositionMode[PositionMode["Percent"] = 1] = "Percent"; + })(spine.PositionMode || (spine.PositionMode = {})); + var PositionMode = spine.PositionMode; + (function (SpacingMode) { + SpacingMode[SpacingMode["Length"] = 0] = "Length"; + SpacingMode[SpacingMode["Fixed"] = 1] = "Fixed"; + SpacingMode[SpacingMode["Percent"] = 2] = "Percent"; + })(spine.SpacingMode || (spine.SpacingMode = {})); + var SpacingMode = spine.SpacingMode; + (function (RotateMode) { + RotateMode[RotateMode["Tangent"] = 0] = "Tangent"; + RotateMode[RotateMode["Chain"] = 1] = "Chain"; + RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale"; + })(spine.RotateMode || (spine.RotateMode = {})); + var RotateMode = spine.RotateMode; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Skeleton = (function () { + function Skeleton(data) { + this._updateCache = new Array(); + this.time = 0; + this.flipX = false; + this.flipY = false; + 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 spine.Bone(boneData, this, null); + else { + var parent_1 = this.bones[boneData.parent.index]; + bone = new spine.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 spine.Slot(slotData, bone); + this.slots.push(slot); + this.drawOrder.push(slot); + } + this.ikConstraints = new Array(); + this.ikConstraintsSorted = new Array(); + for (var i = 0; i < data.ikConstraints.length; i++) { + var ikConstraintData = data.ikConstraints[i]; + this.ikConstraints.push(new spine.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 spine.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 spine.PathConstraint(pathConstraintData, this)); + } + this.color = new spine.Color(1, 1, 1, 1); + this.updateCache(); + } + Skeleton.prototype.updateCache = function () { + var updateCache = this._updateCache; + updateCache.length = 0; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + bones[i].sorted = false; + // IK first, lowest hierarchy depth first. + var ikConstraints = this.ikConstraintsSorted; + ikConstraints.length = 0; + for (var i = 0; i < this.ikConstraints.length; i++) + ikConstraints.push(this.ikConstraints[i]); + var ikCount = ikConstraints.length; + for (var i = 0, level = 0, n = ikCount; i < n; i++) { + var ik = ikConstraints[i]; + var bone = ik.bones[0].parent; + for (level = 0; bone != null; level++) + bone = bone.parent; + ik.level = level; + } + for (var i = 1, ii = 0; i < ikCount; i++) { + var ik = ikConstraints[i]; + var level = ik.level; + for (ii = i - 1; ii >= 0; ii--) { + var other = ikConstraints[ii]; + if (other.level < level) + break; + ikConstraints[ii + 1] = other; + } + ikConstraints[ii + 1] = ik; + } + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var constraint = ikConstraints[i]; + var target = constraint.target; + this.sortBone(target); + var constrained = constraint.bones; + var parent_2 = constrained[0]; + this.sortBone(parent_2); + updateCache.push(constraint); + this.sortReset(parent_2.children); + constrained[constrained.length - 1].sorted = true; + } + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + 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 ii = 0, nn = this.data.skins.length; ii < nn; ii++) + this.sortPathConstraintAttachment(this.data.skins[ii], slotIndex, slotBone); + var attachment = slot.getAttachment(); + if (attachment instanceof spine.PathAttachment) + this.sortPathConstraintAttachmentWith(attachment, slotBone); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + 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; + } + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + this.sortBone(constraint.target); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + 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; + } + for (var i = 0, n = bones.length; i < n; i++) + this.sortBone(bones[i]); + }; + 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 spine.PathAttachment)) + return; + var pathBones = attachment.bones; + if (pathBones == null) + this.sortBone(slotBone); + else { + var bones = this.bones; + for (var i = 0; i < pathBones.length; 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.sorted) + this.sortReset(bone.children); + bone.sorted = false; + } + }; + /** Updates the world transform for each bone and applies constraints. */ + Skeleton.prototype.updateWorldTransform = function () { + var updateCache = this._updateCache; + for (var i = 0, n = updateCache.length; i < n; i++) + updateCache[i].update(); + }; + /** Sets the bones, constraints, and slots to their setup pose values. */ + Skeleton.prototype.setToSetupPose = function () { + this.setBonesToSetupPose(); + this.setSlotsToSetupPose(); + }; + /** Sets the bones and constraints to their setup pose values. */ + 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.bendDirection = constraint.data.bendDirection; + constraint.mix = constraint.data.mix; + } + 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; + spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length); + for (var i = 0, n = slots.length; i < n; i++) + slots[i].setToSetupPose(); + }; + /** @return May return null. */ + Skeleton.prototype.getRootBone = function () { + if (this.bones.length == 0) + return null; + return this.bones[0]; + }; + /** @return May be null. */ + 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; + }; + /** @return -1 if the bone was not found. */ + 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; + }; + /** @return May be null. */ + 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; + }; + /** @return -1 if the bone was not found. */ + 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; + }; + /** Sets a skin by name. + * @see #setSkin(Skin) */ + Skeleton.prototype.setSkinByName = function (skinName) { + var skin = this.data.findSkin(skinName); + if (skin == null) + throw new Error("Skin not found: " + skinName); + this.setSkin(skin); + }; + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + Skeleton.prototype.setSkin = function (newSkin) { + 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; + }; + /** @return May be null. */ + Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) { + return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName); + }; + /** @return May be null. */ + 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; + }; + /** @param attachmentName May be 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); + }; + /** @return May be null. */ + 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; + }; + /** @return May be 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; + }; + /** @return May be 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; + }; + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + Skeleton.prototype.getBounds = function (offset, size) { + 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]; + var vertices = null; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.RegionAttachment) + vertices = attachment.updateWorldVertices(slot, false); + else if (attachment instanceof spine.MeshAttachment) + vertices = attachment.updateWorldVertices(slot, true); + if (vertices != null) { + for (var ii = 0, nn = vertices.length; ii < nn; ii += 5) { + 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; + }; + return Skeleton; + }()); + spine.Skeleton = Skeleton; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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 spine.Pool(function () { + return spine.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]; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.BoundingBoxAttachment) { + var boundingBox = attachment; + boundingBoxes.push(boundingBox); + var polygon = polygonPool.obtain(); + if (polygon.length != boundingBox.worldVerticesLength) { + polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength); + } + polygons.push(polygon); + boundingBox.computeWorldVertices(slot, polygon); + } + } + if (updateAabb) + this.aabbCompute(); + }; + 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; + }; + /** Returns true if the axis aligned bounding box contains the point. */ + SkeletonBounds.prototype.aabbContainsPoint = function (x, y) { + return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY; + }; + /** Returns true if the axis aligned bounding box intersects the line segment. */ + 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; + }; + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) { + return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY; + }; + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + 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; + }; + /** Returns true if the polygon contains the point. */ + 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; + }; + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + 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; + }; + /** Returns true if the polygon contains any part of the line segment. */ + 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; + }; + /** Returns the polygon for the specified bounding box, or null. */ + 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]; + }; + return SkeletonBounds; + }()); + spine.SkeletonBounds = SkeletonBounds; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SkeletonData = (function () { + function SkeletonData() { + this.bones = new Array(); // Ordered parents first. + this.slots = new Array(); // Setup pose draw order. + this.skins = new Array(); + this.events = new Array(); + this.animations = new Array(); + this.ikConstraints = new Array(); + this.transformConstraints = new Array(); + this.pathConstraints = new Array(); + } + 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_2 = events[i]; + if (event_2.name == eventDataName) + return event_2; + } + 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; + }()); + spine.SkeletonData = SkeletonData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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 spine.SkeletonData(); + var root = JSON.parse(json); + // Skeleton + var skeletonMap = root.skeleton; + if (skeletonMap != null) { + skeletonData.hash = skeletonMap.hash; + skeletonData.version = skeletonMap.spine; + skeletonData.width = skeletonMap.width; + skeletonData.height = skeletonMap.height; + skeletonData.imagesPath = skeletonMap.images; + } + // Bones + if (root.bones) { + for (var i = 0; i < root.bones.length; i++) { + var boneMap = root.bones[i]; + var parent_3 = null; + var parentName = this.getValue(boneMap, "parent", null); + if (parentName != null) { + parent_3 = skeletonData.findBone(parentName); + if (parent_3 == null) + throw new Error("Parent bone not found: " + parentName); + } + var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_3); + 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.inheritRotation = this.getValue(boneMap, "inheritRotation", true); + data.inheritScale = this.getValue(boneMap, "inheritScale", true); + skeletonData.bones.push(data); + } + } + // Slots. + 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 spine.SlotData(skeletonData.slots.length, slotName, boneData); + var color = slotMap.color ? slotMap.color : null; + if (color != null) + data.color.setFromString(color); + data.attachmentName = this.getValue(slotMap, "attachment", null); + data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal")); + skeletonData.slots.push(data); + } + } + // IK constraints + if (root.ik) { + for (var i = 0; i < root.ik.length; i++) { + var constraintMap = root.ik[i]; + var data = new spine.IkConstraintData(constraintMap.name); + 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.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1; + data.mix = constraintMap.mix ? constraintMap.mix : 1; + skeletonData.ikConstraints.push(data); + } + } + // Transform constraints. + if (root.transform) { + for (var i = 0; i < root.transform.length; i++) { + var constraintMap = root.transform[i]; + var data = new spine.TransformConstraintData(constraintMap.name); + 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.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); + } + } + // Path constraints. + if (root.path) { + for (var i = 0; i < root.path.length; i++) { + var constraintMap = root.path[i]; + var data = new spine.PathConstraintData(constraintMap.name); + 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 == spine.PositionMode.Fixed) + data.position *= scale; + data.spacing = this.getValue(constraintMap, "spacing", 0); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + data.spacing *= scale; + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + skeletonData.pathConstraints.push(data); + } + } + // Skins. + if (root.skins) { + for (var skinName in root.skins) { + var skinMap = root.skins[skinName]; + var skin = new spine.Skin(skinName); + for (var slotName in skinMap) { + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotName); + var slotMap = skinMap[slotName]; + for (var entryName in slotMap) { + var attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName); + if (attachment != null) + skin.addAttachment(slotIndex, entryName, attachment); + } + } + skeletonData.skins.push(skin); + if (skin.name == "default") + skeletonData.defaultSkin = skin; + } + } + // Linked meshes. + 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_4 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); + if (parent_4 == null) + throw new Error("Parent mesh not found: " + linkedMesh.parent); + linkedMesh.mesh.setParentMesh(parent_4); + linkedMesh.mesh.updateUVs(); + } + this.linkedMeshes.length = 0; + // Events. + if (root.events) { + for (var eventName in root.events) { + var eventMap = root.events[eventName]; + var data = new spine.EventData(eventName); + data.intValue = this.getValue(eventMap, "int", 0); + data.floatValue = this.getValue(eventMap, "float", 0); + data.stringValue = this.getValue(eventMap, "string", null); + skeletonData.events.push(data); + } + } + // Animations. + 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) { + 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); + region.updateOffset(); + return region; + } + case "boundingbox": { + var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); + if (box == null) + return null; + this.readVertices(map, box, map.vertexCount << 1); + 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); + var parent_5 = this.getValue(map, "parent", null); + if (parent_5 != null) { + mesh.inheritDeform = this.getValue(map, "deform", true); + this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent_5)); + return mesh; + } + var uvs = map.uvs; + this.readVertices(map, mesh, uvs.length); + mesh.triangles = map.triangles; + mesh.regionUVs = uvs; + mesh.updateUVs(); + 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 = spine.Utils.newArray(vertexCount / 3, 0); + for (var i = 0; i < map.lengths.length; i++) + lengths[i++] = map.lengths[i] * scale; + path.lengths = lengths; + return path; + } + } + return null; + }; + SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) { + var scale = this.scale; + attachment.worldVerticesLength = verticesLength; + var vertices = map.vertices; + if (verticesLength == vertices.length) { + if (scale != 1) { + for (var i = 0, n = vertices.length; i < n; i++) + vertices[i] *= scale; + } + attachment.vertices = spine.Utils.toFloatArray(vertices); + 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 = spine.Utils.toFloatArray(weights); + }; + SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) { + var scale = this.scale; + var timelines = new Array(); + var duration = 0; + // Slot timelines. + 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 == "color") { + var timeline = new spine.ColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var color = new spine.Color(); + color.setFromString(valueMap.color); + timeline.setFrame(frameIndex, valueMap.time, 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) * spine.ColorTimeline.ENTRIES]); + } + else if (timelineName = "attachment") { + var timeline = new spine.AttachmentTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex++, valueMap.time, valueMap.name); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + else + throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); + } + } + } + // Bone timelines. + 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 spine.RotateTimeline(timelineMap.length); + timeline.boneIndex = boneIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, valueMap.angle); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]); + } + else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") { + var timeline = null; + var timelineScale = 1; + if (timelineName === "scale") + timeline = new spine.ScaleTimeline(timelineMap.length); + else if (timelineName === "shear") + timeline = new spine.ShearTimeline(timelineMap.length); + else { + timeline = new spine.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", 0), y = this.getValue(valueMap, "y", 0); + timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]); + } + else + throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); + } + } + } + // IK constraint timelines. + if (map.ik) { + for (var constraintName in map.ik) { + var constraintMap = map.ik[constraintName]; + var constraint = skeletonData.findIkConstraint(constraintName); + var timeline = new spine.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, valueMap.time, this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "bendPositive", true) ? 1 : -1); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]); + } + } + // Transform constraint timelines. + if (map.transform) { + for (var constraintName in map.transform) { + var constraintMap = map.transform[constraintName]; + var constraint = skeletonData.findTransformConstraint(constraintName); + var timeline = new spine.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, valueMap.time, 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) * spine.TransformConstraintTimeline.ENTRIES]); + } + } + // Path constraint timelines. + if (map.paths) { + for (var constraintName in map.paths) { + var constraintMap = map.paths[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 spine.PathConstraintSpacingTimeline(timelineMap.length); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + timelineScale = scale; + } + else { + timeline = new spine.PathConstraintPositionTimeline(timelineMap.length); + if (data.positionMode == spine.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, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]); + } + else if (timelineName === "mix") { + var timeline = new spine.PathConstraintMixTimeline(timelineMap.length); + timeline.pathConstraintIndex = index; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, 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) * spine.PathConstraintMixTimeline.ENTRIES]); + } + } + } + } + // Deform timelines. + 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 spine.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 ? spine.Utils.newFloatArray(deformLength) : vertices; + else { + deform = spine.Utils.newFloatArray(deformLength); + var start = this.getValue(valueMap, "offset", 0); + spine.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, valueMap.time, deform); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + } + } + } + // Draw order timeline. + var drawOrderNode = map.drawOrder; + if (drawOrderNode == null) + drawOrderNode = map.draworder; + if (drawOrderNode != null) { + var timeline = new spine.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 = spine.Utils.newArray(slotCount, -1); + var unchanged = spine.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); + // Collect unchanged items. + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + // Set changed items. + drawOrder[originalIndex + offsetMap.offset] = originalIndex++; + } + // Collect remaining unchanged items. + while (originalIndex < slotCount) + unchanged[unchangedIndex++] = originalIndex++; + // Fill in unchanged items. + for (var i = slotCount - 1; i >= 0; i--) + if (drawOrder[i] == -1) + drawOrder[i] = unchanged[--unchangedIndex]; + } + timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + // Event timeline. + if (map.events) { + var timeline = new spine.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_3 = new spine.Event(eventMap.time, eventData); + event_3.intValue = this.getValue(eventMap, "int", eventData.intValue); + event_3.floatValue = this.getValue(eventMap, "float", eventData.floatValue); + event_3.stringValue = this.getValue(eventMap, "string", eventData.stringValue); + timeline.setFrame(frameIndex++, event_3); + } + 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 spine.Animation(name, timelines, duration)); + }; + SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { + if (!map.curve) + return; + if (map.curve === "stepped") + timeline.setStepped(frameIndex); + else if (Object.prototype.toString.call(map.curve) === '[object Array]') { + var curve = map.curve; + timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]); + } + }; + 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 spine.BlendMode.Normal; + if (str == "additive") + return spine.BlendMode.Additive; + if (str == "multiply") + return spine.BlendMode.Multiply; + if (str == "screen") + return spine.BlendMode.Screen; + throw new Error("Unknown blend mode: " + str); + }; + SkeletonJson.positionModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "fixed") + return spine.PositionMode.Fixed; + if (str == "percent") + return spine.PositionMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.spacingModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "length") + return spine.SpacingMode.Length; + if (str == "fixed") + return spine.SpacingMode.Fixed; + if (str == "percent") + return spine.SpacingMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.rotateModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "tangent") + return spine.RotateMode.Tangent; + if (str == "chain") + return spine.RotateMode.Chain; + if (str == "chainscale") + return spine.RotateMode.ChainScale; + throw new Error("Unknown rotate mode: " + str); + }; + return SkeletonJson; + }()); + spine.SkeletonJson = SkeletonJson; + var LinkedMesh = (function () { + function LinkedMesh(mesh, skin, slotIndex, parent) { + this.mesh = mesh; + this.skin = skin; + this.slotIndex = slotIndex; + this.parent = parent; + } + return LinkedMesh; + }()); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Skin = (function () { + function Skin(name) { + this.attachments = new Array(); + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + Skin.prototype.addAttachment = 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; + }; + /** @return May be null. */ + Skin.prototype.getAttachment = function (slotIndex, name) { + var dictionary = this.attachments[slotIndex]; + return dictionary ? dictionary[name] : null; + }; + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + 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, name); + if (attachment != null) + slot.setAttachment(attachment); + break; + } + } + } + slotIndex++; + } + }; + return Skin; + }()); + spine.Skin = Skin; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Slot = (function () { + function Slot(data, bone) { + this.attachmentVertices = 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 spine.Color(); + this.setToSetupPose(); + } + /** @return May be null. */ + Slot.prototype.getAttachment = function () { + return this.attachment; + }; + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + Slot.prototype.setAttachment = function (attachment) { + if (this.attachment == attachment) + return; + this.attachment = attachment; + this.attachmentTime = this.bone.skeleton.time; + this.attachmentVertices.length = 0; + }; + Slot.prototype.setAttachmentTime = function (time) { + this.attachmentTime = this.bone.skeleton.time - time; + }; + /** Returns the time since the attachment was set. */ + Slot.prototype.getAttachmentTime = function () { + return this.bone.skeleton.time - this.attachmentTime; + }; + Slot.prototype.setToSetupPose = function () { + this.color.setFromColor(this.data.color); + 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; + }()); + spine.Slot = Slot; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SlotData = (function () { + function SlotData(index, name, boneData) { + this.color = new spine.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; + }()); + spine.SlotData = SlotData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TransformConstraint = (function () { + function TransformConstraint(data, skeleton) { + this.rotateMix = 0; + this.translateMix = 0; + this.scaleMix = 0; + this.shearMix = 0; + this.temp = new spine.Vector2(); + 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.apply = function () { + this.update(); + }; + TransformConstraint.prototype.update = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + var ta = target.a, tb = target.b, tc = target.c, td = target.d; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (rotateMix > 0) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var r = Math.atan2(tc, ta) - Math.atan2(c, a) + this.data.offsetRotation * spine.MathUtils.degRad; + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + var cos = Math.cos(r), sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + if (translateMix > 0) { + var temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + bone.worldX += (temp.x - bone.worldX) * translateMix; + bone.worldY += (temp.y - bone.worldY) * translateMix; + } + if (scaleMix > 0) { + var bs = Math.sqrt(bone.a * bone.a + bone.c * bone.c); + var ts = Math.sqrt(ta * ta + tc * tc); + var s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleX) * scaleMix) / bs : 0; + bone.a *= s; + bone.c *= s; + bs = Math.sqrt(bone.b * bone.b + bone.d * bone.d); + ts = Math.sqrt(tb * tb + td * td); + s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleY) * scaleMix) / bs : 0; + bone.b *= s; + bone.d *= s; + } + if (shearMix > 0) { + var b = bone.b, d = bone.d; + var by = Math.atan2(d, b); + var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a)); + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r = by + (r + this.data.offsetShearY * spine.MathUtils.degRad) * shearMix; + var s = Math.sqrt(b * b + d * d); + bone.b = Math.cos(r) * s; + bone.d = Math.sin(r) * s; + } + } + }; + return TransformConstraint; + }()); + spine.TransformConstraint = TransformConstraint; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TransformConstraintData = (function () { + function TransformConstraintData(name) { + 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; + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return TransformConstraintData; + }()); + spine.TransformConstraintData = TransformConstraintData; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + 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(); + }; + Color.prototype.setFromColor = function (c) { + this.r = c.r; + this.g = c.g; + this.b = c.b; + this.a = c.a; + }; + 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; + }; + Color.prototype.add = function (r, g, b, a) { + this.r += r; + this.g += g; + this.b += b; + this.a += a; + this.clamp(); + }; + 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; + }; + return Color; + }()); + spine.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 : -1; + }; + MathUtils.toInt = function (x) { + return x > 0 ? Math.floor(x) : Math.ceil(x); + }; + 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; + }()); + spine.MathUtils = MathUtils; + 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.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.toFloatArray = function (array) { + return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array; + }; + Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined"; + return Utils; + }()); + spine.Utils = Utils; + var Pool = (function () { + function Pool(instantiator) { + this._items = new Array(16); + this._instantiator = instantiator; + } + Pool.prototype.obtain = function () { + return this._items.length > 0 ? this._items.pop() : this._instantiator(); + }; + Pool.prototype.free = function (item) { + this._items.push(item); + }; + Pool.prototype.freeAll = function (items) { + for (var i = 0; i < items.length; i++) + this._items[i] = items[i]; + }; + Pool.prototype.clear = function () { + this._items.length = 0; + }; + return Pool; + }()); + spine.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; + }; + return Vector2; + }()); + spine.Vector2 = Vector2; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var Attachment = (function () { + function Attachment(name) { + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return Attachment; + }()); + spine.Attachment = Attachment; + var VertexAttachment = (function (_super) { + __extends(VertexAttachment, _super); + function VertexAttachment(name) { + _super.call(this, name); + this.worldVerticesLength = 0; + } + VertexAttachment.prototype.computeWorldVertices = function (slot, worldVertices) { + this.computeWorldVerticesWith(slot, 0, this.worldVerticesLength, worldVertices, 0); + }; + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + VertexAttachment.prototype.computeWorldVerticesWith = function (slot, start, count, worldVertices, offset) { + count += offset; + var skeleton = slot.bone.skeleton; + var x = skeleton.x, y = skeleton.y; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices; + var bones = this.bones; + if (bones == null) { + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v_1 = start, w = offset; w < count; v_1 += 2, w += 2) { + 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 += 2) { + var wx = x, wy = y; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * 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 += 2) { + var wx = x, wy = y; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + }; + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + VertexAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment; + }; + return VertexAttachment; + }(Attachment)); + spine.VertexAttachment = VertexAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + (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"; + })(spine.AttachmentType || (spine.AttachmentType = {})); + var AttachmentType = spine.AttachmentType; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var BoundingBoxAttachment = (function (_super) { + __extends(BoundingBoxAttachment, _super); + function BoundingBoxAttachment(name) { + _super.call(this, name); + } + return BoundingBoxAttachment; + }(spine.VertexAttachment)); + spine.BoundingBoxAttachment = BoundingBoxAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var MeshAttachment = (function (_super) { + __extends(MeshAttachment, _super); + function MeshAttachment(name) { + _super.call(this, name); + this.color = new spine.Color(1, 1, 1, 1); + this.inheritDeform = false; + this.tempColor = new spine.Color(0, 0, 0, 0); + } + MeshAttachment.prototype.updateUVs = function () { + var regionUVs = this.regionUVs; + var verticesLength = regionUVs.length; + var worldVerticesLength = (verticesLength >> 1) * 8; + if (this.worldVertices == null || this.worldVertices.length != worldVerticesLength) + this.worldVertices = spine.Utils.newFloatArray(worldVerticesLength); + var u = 0, v = 0, width = 0, height = 0; + if (this.region == null) { + u = v = 0; + width = height = 1; + } + else { + u = this.region.u; + v = this.region.v; + width = this.region.u2 - u; + height = this.region.v2 - v; + } + if (this.region.rotate) { + for (var i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i + 1] * width; + this.worldVertices[w + 1] = v + height - regionUVs[i] * height; + } + } + else { + for (var i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i] * width; + this.worldVertices[w + 1] = v + regionUVs[i + 1] * height; + } + } + }; + /** @return The updated world vertices. */ + MeshAttachment.prototype.updateWorldVertices = function (slot, premultipliedAlpha) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color, slotColor = slot.color, meshColor = this.color; + var alpha = skeletonColor.a * slotColor.a * meshColor.a; + var multiplier = premultipliedAlpha ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * meshColor.r * multiplier, skeletonColor.g * slotColor.g * meshColor.g * multiplier, skeletonColor.b * slotColor.b * meshColor.b * multiplier, alpha); + var x = skeleton.x, y = skeleton.y; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices, worldVertices = this.worldVertices; + var bones = this.bones; + if (bones == null) { + var verticesLength = vertices.length; + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v = 0, w = 0; v < verticesLength; v += 2, w += 8) { + var vx = vertices[v], vy = vertices[v + 1]; + worldVertices[w] = vx * a + vy * b + x; + worldVertices[w + 1] = vx * c + vy * d + y; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + return worldVertices; + } + var skeletonBones = skeleton.bones; + if (deformArray.length == 0) { + for (var w = 0, v = 0, b = 0, n = bones.length; v < n; w += 8) { + var wx = x, wy = y; + var nn = bones[v++] + v; + for (; v < nn; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + else { + var deform = deformArray; + for (var w = 0, v = 0, b = 0, f = 0, n = bones.length; v < n; w += 8) { + var wx = x, wy = y; + var nn = bones[v++] + v; + for (; v < nn; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + return worldVertices; + }; + MeshAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment || (this.inheritDeform && this._parentMesh == sourceAttachment); + }; + MeshAttachment.prototype.getParentMesh = function () { + return this._parentMesh; + }; + /** @param parentMesh May be null. */ + MeshAttachment.prototype.setParentMesh = function (parentMesh) { + this._parentMesh = parentMesh; + if (parentMesh != null) { + this.bones = parentMesh.bones; + this.vertices = parentMesh.vertices; + this.regionUVs = parentMesh.regionUVs; + this.triangles = parentMesh.triangles; + this.hullLength = parentMesh.hullLength; + } + }; + return MeshAttachment; + }(spine.VertexAttachment)); + spine.MeshAttachment = MeshAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var PathAttachment = (function (_super) { + __extends(PathAttachment, _super); + function PathAttachment(name) { + _super.call(this, name); + this.closed = false; + this.constantSpeed = false; + } + return PathAttachment; + }(spine.VertexAttachment)); + spine.PathAttachment = PathAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var RegionAttachment = (function (_super) { + __extends(RegionAttachment, _super); + function RegionAttachment(name) { + _super.call(this, name); + this.x = 0; + this.y = 0; + this.scaleX = 1; + this.scaleY = 1; + this.rotation = 0; + this.width = 0; + this.height = 0; + this.color = new spine.Color(1, 1, 1, 1); + this.offset = spine.Utils.newFloatArray(8); + this.vertices = spine.Utils.newFloatArray(8 * 4); + this.tempColor = new spine.Color(1, 1, 1, 1); + } + RegionAttachment.prototype.setRegion = function (region) { + var vertices = this.vertices; + if (region.rotate) { + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v2; + vertices[RegionAttachment.U3] = region.u; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v; + vertices[RegionAttachment.U1] = region.u2; + vertices[RegionAttachment.V1] = region.v2; + } + else { + vertices[RegionAttachment.U1] = region.u; + vertices[RegionAttachment.V1] = region.v2; + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v; + vertices[RegionAttachment.U3] = region.u2; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v2; + } + }; + 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.updateWorldVertices = function (slot, premultipliedAlpha) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color; + var slotColor = slot.color; + var regionColor = this.color; + var alpha = skeletonColor.a * slotColor.a * regionColor.a; + var multiplier = premultipliedAlpha ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha); + var vertices = this.vertices; + var offset = this.offset; + var bone = slot.bone; + var x = skeleton.x + bone.worldX, y = skeleton.y + bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var offsetX = 0, offsetY = 0; + offsetX = offset[RegionAttachment.OX1]; + offsetY = offset[RegionAttachment.OY1]; + vertices[RegionAttachment.X1] = offsetX * a + offsetY * b + x; // br + vertices[RegionAttachment.Y1] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C1R] = color.r; + vertices[RegionAttachment.C1G] = color.g; + vertices[RegionAttachment.C1B] = color.b; + vertices[RegionAttachment.C1A] = color.a; + offsetX = offset[RegionAttachment.OX2]; + offsetY = offset[RegionAttachment.OY2]; + vertices[RegionAttachment.X2] = offsetX * a + offsetY * b + x; // bl + vertices[RegionAttachment.Y2] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C2R] = color.r; + vertices[RegionAttachment.C2G] = color.g; + vertices[RegionAttachment.C2B] = color.b; + vertices[RegionAttachment.C2A] = color.a; + offsetX = offset[RegionAttachment.OX3]; + offsetY = offset[RegionAttachment.OY3]; + vertices[RegionAttachment.X3] = offsetX * a + offsetY * b + x; // ul + vertices[RegionAttachment.Y3] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C3R] = color.r; + vertices[RegionAttachment.C3G] = color.g; + vertices[RegionAttachment.C3B] = color.b; + vertices[RegionAttachment.C3A] = color.a; + offsetX = offset[RegionAttachment.OX4]; + offsetY = offset[RegionAttachment.OY4]; + vertices[RegionAttachment.X4] = offsetX * a + offsetY * b + x; // ur + vertices[RegionAttachment.Y4] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C4R] = color.r; + vertices[RegionAttachment.C4G] = color.g; + vertices[RegionAttachment.C4B] = color.b; + vertices[RegionAttachment.C4A] = color.a; + return vertices; + }; + 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; + }(spine.Attachment)); + spine.RegionAttachment = RegionAttachment; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var TextureRegion = (function () { + function TextureRegion() { + this.u = 0; + this.v = 0; + this.u2 = 0; + this.v2 = 0; + this.width = 0; + this.height = 0; + this.rotate = false; + this.offsetX = 0; + this.offsetY = 0; + this.originalWidth = 0; + this.originalHeight = 0; + } + return TextureRegion; + }()); + spine.TextureRegion = TextureRegion; +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var AssetManager = (function () { + function AssetManager(gl) { + this._assets = {}; + this._errors = {}; + this._toLoad = 0; + this._loaded = 0; + this._gl = gl; + } + AssetManager.prototype.loadText = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + this._toLoad++; + var request = new XMLHttpRequest(); + request.onreadystatechange = function () { + if (request.readyState == XMLHttpRequest.DONE) { + if (request.status >= 200 && request.status < 300) { + if (success) + success(path, request.responseText); + _this._assets[path] = request.responseText; + } + else { + if (error) + error(path, "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText); + _this._errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + } + _this._toLoad--; + _this._loaded++; + } + }; + request.open("GET", path, true); + request.send(); + }; + AssetManager.prototype.loadTexture = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + this._toLoad++; + var img = new Image(); + img.src = path; + img.onload = function (ev) { + if (success) + success(path, img); + var texture = new webgl.Texture(_this._gl, img); + _this._assets[path] = texture; + _this._toLoad--; + _this._loaded++; + }; + img.onerror = function (ev) { + if (error) + error(path, "Couldn't load image " + path); + _this._errors[path] = "Couldn't load image " + path; + _this._toLoad--; + _this._loaded++; + }; + }; + AssetManager.prototype.get = function (path) { + return this._assets[path]; + }; + AssetManager.prototype.remove = function (path) { + var asset = this._assets[path]; + if (asset instanceof webgl.Texture) { + asset.dispose(); + } + this._assets[path] = null; + }; + AssetManager.prototype.removeAll = function () { + for (var key in this._assets) { + var asset = this._assets[key]; + if (asset instanceof webgl.Texture) + asset.dispose(); + } + this._assets = {}; + }; + AssetManager.prototype.isLoadingComplete = function () { + return this._toLoad == 0; + }; + AssetManager.prototype.toLoad = function () { + return this._toLoad; + }; + AssetManager.prototype.loaded = function () { + return this._loaded; + }; + AssetManager.prototype.dispose = function () { + this.removeAll(); + }; + AssetManager.prototype.hasErrors = function () { + return Object.keys(this._errors).length > 0; + }; + AssetManager.prototype.errors = function () { + return this._errors; + }; + return AssetManager; + }()); + webgl.AssetManager = AssetManager; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + webgl.M00 = 0; + webgl.M01 = 4; + webgl.M02 = 8; + webgl.M03 = 12; + webgl.M10 = 1; + webgl.M11 = 5; + webgl.M12 = 9; + webgl.M13 = 13; + webgl.M20 = 2; + webgl.M21 = 6; + webgl.M22 = 10; + webgl.M23 = 14; + webgl.M30 = 3; + webgl.M31 = 7; + webgl.M32 = 11; + webgl.M33 = 15; + var Matrix4 = (function () { + function Matrix4() { + this.temp = new Float32Array(16); + this.values = new Float32Array(16); + var v = this.values; + v[webgl.M00] = 1; + v[webgl.M11] = 1; + v[webgl.M22] = 1; + v[webgl.M33] = 1; + } + Matrix4.prototype.set = function (values) { + this.values.set(values); + return this; + }; + Matrix4.prototype.transpose = function () { + var t = this.temp; + var v = this.values; + t[webgl.M00] = v[webgl.M00]; + t[webgl.M01] = v[webgl.M10]; + t[webgl.M02] = v[webgl.M20]; + t[webgl.M03] = v[webgl.M30]; + t[webgl.M10] = v[webgl.M01]; + t[webgl.M11] = v[webgl.M11]; + t[webgl.M12] = v[webgl.M21]; + t[webgl.M13] = v[webgl.M31]; + t[webgl.M20] = v[webgl.M02]; + t[webgl.M21] = v[webgl.M12]; + t[webgl.M22] = v[webgl.M22]; + t[webgl.M23] = v[webgl.M32]; + t[webgl.M30] = v[webgl.M03]; + t[webgl.M31] = v[webgl.M13]; + t[webgl.M32] = v[webgl.M23]; + t[webgl.M33] = v[webgl.M33]; + return this.set(t); + }; + Matrix4.prototype.identity = function () { + var v = this.values; + v[webgl.M00] = 1; + v[webgl.M01] = 0; + v[webgl.M02] = 0; + v[webgl.M03] = 0; + v[webgl.M10] = 0; + v[webgl.M11] = 1; + v[webgl.M12] = 0; + v[webgl.M13] = 0; + v[webgl.M20] = 0; + v[webgl.M21] = 0; + v[webgl.M22] = 1; + v[webgl.M23] = 0; + v[webgl.M30] = 0; + v[webgl.M31] = 0; + v[webgl.M32] = 0; + v[webgl.M33] = 1; + return this; + }; + Matrix4.prototype.invert = function () { + var v = this.values; + var t = this.temp; + var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03] + + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03] + - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13] + - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13] + + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23] + + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23] + - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33] + - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + if (l_det == 0) + throw new Error("non-invertible matrix"); + var inv_det = 1.0 / l_det; + t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32] + - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32] + + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32] + - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33]; + t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22] + + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23]; + t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32] + + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32] + - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33]; + t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32] + + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33]; + t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22] + - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23]; + t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31] + - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33]; + t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31] + + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33]; + t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31] + - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33]; + t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21] + + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23]; + t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31] + + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32]; + t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31] + - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32]; + t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31] + + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32]; + t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21] + - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22]; + v[webgl.M00] = t[webgl.M00] * inv_det; + v[webgl.M01] = t[webgl.M01] * inv_det; + v[webgl.M02] = t[webgl.M02] * inv_det; + v[webgl.M03] = t[webgl.M03] * inv_det; + v[webgl.M10] = t[webgl.M10] * inv_det; + v[webgl.M11] = t[webgl.M11] * inv_det; + v[webgl.M12] = t[webgl.M12] * inv_det; + v[webgl.M13] = t[webgl.M13] * inv_det; + v[webgl.M20] = t[webgl.M20] * inv_det; + v[webgl.M21] = t[webgl.M21] * inv_det; + v[webgl.M22] = t[webgl.M22] * inv_det; + v[webgl.M23] = t[webgl.M23] * inv_det; + v[webgl.M30] = t[webgl.M30] * inv_det; + v[webgl.M31] = t[webgl.M31] * inv_det; + v[webgl.M32] = t[webgl.M32] * inv_det; + v[webgl.M33] = t[webgl.M33] * inv_det; + return this; + }; + Matrix4.prototype.determinant = function () { + var v = this.values; + return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03] + + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03] + - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13] + - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13] + + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23] + + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23] + - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33] + - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33]; + }; + Matrix4.prototype.translate = function (x, y, z) { + var v = this.values; + v[webgl.M03] += x; + v[webgl.M13] += y; + v[webgl.M23] += z; + return this; + }; + Matrix4.prototype.copy = function () { + return new Matrix4().set(this.values); + }; + Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) { + this.identity(); + var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0)); + var l_a1 = (far + near) / (near - far); + var l_a2 = (2 * far * near) / (near - far); + var v = this.values; + v[webgl.M00] = l_fd / aspectRatio; + v[webgl.M10] = 0; + v[webgl.M20] = 0; + v[webgl.M30] = 0; + v[webgl.M01] = 0; + v[webgl.M11] = l_fd; + v[webgl.M21] = 0; + v[webgl.M31] = 0; + v[webgl.M02] = 0; + v[webgl.M12] = 0; + v[webgl.M22] = l_a1; + v[webgl.M32] = -1; + v[webgl.M03] = 0; + v[webgl.M13] = 0; + v[webgl.M23] = l_a2; + v[webgl.M33] = 0; + return this; + }; + Matrix4.prototype.ortho2d = function (x, y, width, height) { + return this.ortho(x, x + width, y, y + height, 0, 1); + }; + Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) { + this.identity(); + var x_orth = 2 / (right - left); + var y_orth = 2 / (top - bottom); + var z_orth = -2 / (far - near); + var tx = -(right + left) / (right - left); + var ty = -(top + bottom) / (top - bottom); + var tz = -(far + near) / (far - near); + var v = this.values; + v[webgl.M00] = x_orth; + v[webgl.M10] = 0; + v[webgl.M20] = 0; + v[webgl.M30] = 0; + v[webgl.M01] = 0; + v[webgl.M11] = y_orth; + v[webgl.M21] = 0; + v[webgl.M31] = 0; + v[webgl.M02] = 0; + v[webgl.M12] = 0; + v[webgl.M22] = z_orth; + v[webgl.M32] = 0; + v[webgl.M03] = tx; + v[webgl.M13] = ty; + v[webgl.M23] = tz; + v[webgl.M33] = 1; + return this; + }; + Matrix4.prototype.multiply = function (matrix) { + var t = this.temp; + var v = this.values; + var m = matrix.values; + t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30]; + t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31]; + t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32]; + t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33]; + t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30]; + t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31]; + t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32]; + t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33]; + t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30]; + t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31]; + t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32]; + t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33]; + t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30]; + t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31]; + t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32]; + t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33]; + return this.set(this.temp); + }; + Matrix4.prototype.multiplyLeft = function (matrix) { + var t = this.temp; + var v = this.values; + var m = matrix.values; + t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30]; + t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31]; + t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32]; + t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33]; + t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30]; + t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31]; + t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32]; + t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33]; + t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30]; + t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31]; + t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32]; + t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33]; + t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30]; + t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31]; + t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32]; + t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33]; + return this.set(this.temp); + }; + return Matrix4; + }()); + webgl.Matrix4 = Matrix4; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Mesh = (function () { + function Mesh(gl, _attributes, maxVertices, maxIndices) { + this._attributes = _attributes; + this._verticesLength = 0; + this._dirtyVertices = false; + this._indicesLength = 0; + this._dirtyIndices = false; + this._elementsPerVertex = 0; + this._gl = gl; + this._elementsPerVertex = 0; + for (var i = 0; i < _attributes.length; i++) { + this._elementsPerVertex += _attributes[i].numElements; + } + this._vertices = new Float32Array(maxVertices * this._elementsPerVertex); + this._indices = new Uint16Array(maxIndices); + } + Mesh.prototype.attributes = function () { return this._attributes; }; + Mesh.prototype.maxVertices = function () { return this._vertices.length / this._elementsPerVertex; }; + Mesh.prototype.numVertices = function () { return this._verticesLength / this._elementsPerVertex; }; + Mesh.prototype.setVerticesLength = function (length) { + this._dirtyVertices = true; + this._verticesLength = length; + }; + Mesh.prototype.vertices = function () { return this._vertices; }; + Mesh.prototype.maxIndices = function () { return this._indices.length; }; + Mesh.prototype.numIndices = function () { return this._indicesLength; }; + Mesh.prototype.setIndicesLength = function (length) { + this._dirtyIndices = true; + this._indicesLength = length; + }; + Mesh.prototype.indices = function () { return this._indices; }; + ; + Mesh.prototype.setVertices = function (vertices) { + this._dirtyVertices = true; + if (vertices.length > this._vertices.length) + throw Error("Mesh can't store more than " + this.maxVertices() + " vertices"); + this._vertices.set(vertices, 0); + this._verticesLength = vertices.length; + }; + Mesh.prototype.setIndices = function (indices) { + this._dirtyIndices = true; + if (indices.length > this._indices.length) + throw Error("Mesh can't store more than " + this.maxIndices() + " indices"); + this._indices.set(indices, 0); + this._indicesLength = indices.length; + }; + Mesh.prototype.draw = function (shader, primitiveType) { + this.drawWithOffset(shader, primitiveType, 0, this._indicesLength > 0 ? this._indicesLength : this._verticesLength); + }; + Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) { + var gl = this._gl; + if (this._dirtyVertices || this._dirtyIndices) + this.update(); + this.bind(shader); + if (this._indicesLength > 0) + gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2); + else + gl.drawArrays(primitiveType, offset, count); + this.unbind(shader); + }; + Mesh.prototype.bind = function (shader) { + var gl = this._gl; + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + var offset = 0; + for (var i = 0; i < this._attributes.length; i++) { + var attrib = this._attributes[i]; + var location_1 = shader.getAttributeLocation(attrib.name); + gl.enableVertexAttribArray(location_1); + gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this._elementsPerVertex * 4, offset * 4); + offset += attrib.numElements; + } + if (this._indicesLength > 0) + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + }; + Mesh.prototype.unbind = function (shader) { + var gl = this._gl; + for (var i = 0; i < this._attributes.length; i++) { + var attrib = this._attributes[i]; + var location_2 = shader.getAttributeLocation(attrib.name); + gl.disableVertexAttribArray(location_2); + } + gl.bindBuffer(gl.ARRAY_BUFFER, null); + if (this._indicesLength > 0) + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null); + }; + Mesh.prototype.update = function () { + var gl = this._gl; + if (this._dirtyVertices) { + if (!this._verticesBuffer) { + this._verticesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + gl.bufferData(gl.ARRAY_BUFFER, this._vertices.subarray(0, this._verticesLength), gl.STATIC_DRAW); + this._dirtyVertices = false; + } + if (this._dirtyIndices) { + if (!this._indicesBuffer) { + this._indicesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this._indices.subarray(0, this._indicesLength), gl.STATIC_DRAW); + this._dirtyIndices = false; + } + }; + Mesh.prototype.dispose = function () { + var gl = this._gl; + gl.deleteBuffer(this._verticesBuffer); + gl.deleteBuffer(this._indicesBuffer); + }; + return Mesh; + }()); + webgl.Mesh = Mesh; + var VertexAttribute = (function () { + function VertexAttribute(name, type, numElements) { + this.name = name; + this.type = type; + this.numElements = numElements; + } + return VertexAttribute; + }()); + webgl.VertexAttribute = VertexAttribute; + var Position2Attribute = (function (_super) { + __extends(Position2Attribute, _super); + function Position2Attribute() { + _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2); + } + return Position2Attribute; + }(VertexAttribute)); + webgl.Position2Attribute = Position2Attribute; + var Position3Attribute = (function (_super) { + __extends(Position3Attribute, _super); + function Position3Attribute() { + _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3); + } + return Position3Attribute; + }(VertexAttribute)); + webgl.Position3Attribute = Position3Attribute; + var TexCoordAttribute = (function (_super) { + __extends(TexCoordAttribute, _super); + function TexCoordAttribute(unit) { + if (unit === void 0) { unit = 0; } + _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? "" : unit), VertexAttributeType.Float, 2); + } + return TexCoordAttribute; + }(VertexAttribute)); + webgl.TexCoordAttribute = TexCoordAttribute; + var ColorAttribute = (function (_super) { + __extends(ColorAttribute, _super); + function ColorAttribute() { + _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4); + } + return ColorAttribute; + }(VertexAttribute)); + webgl.ColorAttribute = ColorAttribute; + (function (VertexAttributeType) { + VertexAttributeType[VertexAttributeType["Float"] = 0] = "Float"; + })(webgl.VertexAttributeType || (webgl.VertexAttributeType = {})); + var VertexAttributeType = webgl.VertexAttributeType; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var PolygonBatcher = (function () { + function PolygonBatcher(gl, maxVertices) { + if (maxVertices === void 0) { maxVertices = 10920; } + this._drawing = false; + this._shader = null; + this._lastTexture = null; + this._verticesLength = 0; + this._indicesLength = 0; + this._srcBlend = WebGLRenderingContext.SRC_ALPHA; + this._dstBlend = WebGLRenderingContext.ONE_MINUS_SRC_ALPHA; + if (maxVertices > 10920) + throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices); + this._gl = gl; + this._mesh = new webgl.Mesh(gl, [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()], maxVertices, maxVertices * 3); + } + PolygonBatcher.prototype.begin = function (shader) { + var gl = this._gl; + if (this._drawing) + throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()"); + this._drawCalls = 0; + this._shader = shader; + this._lastTexture = null; + this._drawing = true; + gl.enable(gl.BLEND); + gl.blendFunc(this._srcBlend, this._dstBlend); + }; + PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) { + var gl = this._gl; + this._srcBlend = srcBlend; + this._dstBlend = dstBlend; + if (this._drawing) { + this.flush(); + gl.blendFunc(this._srcBlend, this._dstBlend); + } + }; + PolygonBatcher.prototype.draw = function (texture, vertices, indices) { + if (texture != this._lastTexture) { + this.flush(); + this._lastTexture = texture; + texture.bind(); + } + else if (this._verticesLength + vertices.length > this._mesh.vertices().length || + this._indicesLength + indices.length > this._mesh.indices().length) { + this.flush(); + } + var indexStart = this._mesh.numVertices(); + this._mesh.vertices().set(vertices, this._verticesLength); + this._verticesLength += vertices.length; + this._mesh.setVerticesLength(this._verticesLength); + var indicesArray = this._mesh.indices(); + for (var i = this._indicesLength, j = 0; j < indices.length; i++, j++) + indicesArray[i] = indices[j] + indexStart; + this._indicesLength += indices.length; + this._mesh.setIndicesLength(this._indicesLength); + }; + PolygonBatcher.prototype.flush = function () { + var gl = this._gl; + if (this._verticesLength == 0) + return; + this._mesh.draw(this._shader, gl.TRIANGLES); + this._verticesLength = 0; + this._indicesLength = 0; + this._mesh.setVerticesLength(0); + this._mesh.setIndicesLength(0); + this._drawCalls++; + }; + PolygonBatcher.prototype.end = function () { + var gl = this._gl; + if (!this._drawing) + throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()"); + if (this._verticesLength > 0 || this._indicesLength > 0) + this.flush(); + this._shader = null; + this._lastTexture = null; + this._drawing = false; + gl.disable(gl.BLEND); + }; + PolygonBatcher.prototype.drawCalls = function () { return this._drawCalls; }; + return PolygonBatcher; + }()); + webgl.PolygonBatcher = PolygonBatcher; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Shader = (function () { + function Shader(gl, _vertexShader, _fragmentShader) { + this._vertexShader = _vertexShader; + this._fragmentShader = _fragmentShader; + this._vs = null; + this._fs = null; + this._program = null; + this._tmp2x2 = new Float32Array(2 * 2); + this._tmp3x3 = new Float32Array(3 * 3); + this._tmp4x4 = new Float32Array(4 * 4); + this._gl = gl; + this.compile(); + } + Shader.prototype.program = function () { return this._program; }; + Shader.prototype.vertexShader = function () { return this._vertexShader; }; + Shader.prototype.fragmentShader = function () { return this._fragmentShader; }; + Shader.prototype.compile = function () { + var gl = this._gl; + try { + this._vs = this.compileShader(gl.VERTEX_SHADER, this._vertexShader); + this._fs = this.compileShader(gl.FRAGMENT_SHADER, this._fragmentShader); + this._program = this.compileProgram(this._vs, this._fs); + } + catch (e) { + this.dispose(); + throw e; + } + }; + Shader.prototype.compileShader = function (type, source) { + var gl = this._gl; + var shader = gl.createShader(type); + gl.shaderSource(shader, source); + gl.compileShader(shader); + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + var error = "Couldn't compile shader: " + gl.getShaderInfoLog(shader); + gl.deleteShader(shader); + throw new Error(error); + } + return shader; + }; + Shader.prototype.compileProgram = function (vs, fs) { + var gl = this._gl; + var program = gl.createProgram(); + gl.attachShader(program, vs); + gl.attachShader(program, fs); + gl.linkProgram(program); + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + var error = "Couldn't compile shader program: " + gl.getProgramInfoLog(program); + gl.deleteProgram(program); + throw new Error(error); + } + return program; + }; + Shader.prototype.bind = function () { + this._gl.useProgram(this._program); + }; + Shader.prototype.unbind = function () { + this._gl.useProgram(null); + }; + Shader.prototype.setUniformi = function (uniform, value) { + this._gl.uniform1i(this.getUniformLocation(uniform), value); + }; + Shader.prototype.setUniformf = function (uniform, value) { + this._gl.uniform1f(this.getUniformLocation(uniform), value); + }; + Shader.prototype.setUniform2f = function (uniform, value, value2) { + this._gl.uniform2f(this.getUniformLocation(uniform), value, value2); + }; + Shader.prototype.setUniform3f = function (uniform, value, value2, value3) { + this._gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3); + }; + Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) { + this._gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4); + }; + Shader.prototype.setUniform2x2f = function (uniform, value) { + var gl = this._gl; + this._tmp2x2.set(value); + gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this._tmp2x2); + }; + Shader.prototype.setUniform3x3f = function (uniform, value) { + var gl = this._gl; + this._tmp3x3.set(value); + gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this._tmp3x3); + }; + Shader.prototype.setUniform4x4f = function (uniform, value) { + var gl = this._gl; + this._tmp4x4.set(value); + gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this._tmp4x4); + }; + Shader.prototype.getUniformLocation = function (uniform) { + var gl = this._gl; + var location = gl.getUniformLocation(this._program, uniform); + if (!location) + throw new Error("Couldn't find location for uniform " + uniform); + return location; + }; + Shader.prototype.getAttributeLocation = function (attribute) { + var gl = this._gl; + var location = gl.getAttribLocation(this._program, attribute); + if (location == -1) + throw new Error("Couldn't find location for attribute " + attribute); + return location; + }; + Shader.prototype.dispose = function () { + var gl = this._gl; + if (this._vs) { + gl.deleteShader(this._vs); + this._vs = null; + } + if (this._fs) { + gl.deleteShader(this._fs); + this._fs = null; + } + if (this._program) { + gl.deleteProgram(this._program); + this._program = null; + } + }; + Shader.newColoredTextured = function (gl) { + var vs = "\n\t\t\t\tattribute vec4 " + Shader.POSITION + ";\n\t\t\t\tattribute vec4 " + Shader.COLOR + ";\n\t\t\t\tattribute vec2 " + Shader.TEXCOORDS + ";\n\t\t\t\tuniform mat4 " + Shader.MVP_MATRIX + ";\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = " + Shader.COLOR + ";\n\t\t\t\t\tv_texCoords = " + Shader.TEXCOORDS + ";\n\t\t\t\t\tgl_Position = " + Shader.MVP_MATRIX + " * " + Shader.POSITION + ";\n\t\t\t\t}\n\t\t\t"; + var fs = "\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t"; + return new Shader(gl, vs, fs); + }; + Shader.newColored = function (gl) { + var vs = "\n\t\t\t\tattribute vec4 " + Shader.POSITION + ";\n\t\t\t\tattribute vec4 " + Shader.COLOR + ";\n\t\t\t\tuniform mat4 " + Shader.MVP_MATRIX + ";\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = " + Shader.COLOR + ";\n\t\t\t\t\tgl_Position = " + Shader.MVP_MATRIX + " * " + Shader.POSITION + ";\n\t\t\t\t}\n\t\t\t"; + var fs = "\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t"; + return new Shader(gl, vs, fs); + }; + Shader.MVP_MATRIX = "u_projTrans"; + Shader.POSITION = "a_position"; + Shader.COLOR = "a_color"; + Shader.TEXCOORDS = "a_texCoords"; + Shader.SAMPLER = "u_texture"; + return Shader; + }()); + webgl.Shader = Shader; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var SkeletonRenderer = (function () { + function SkeletonRenderer(gl) { + this.premultipliedAlpha = false; + this._gl = gl; + } + SkeletonRenderer.prototype.draw = function (batcher, skeleton) { + var premultipliedAlpha = this.premultipliedAlpha; + var blendMode = null; + var vertices = null; + var triangles = null; + var drawOrder = skeleton.drawOrder; + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = drawOrder[i]; + var attachment = slot.getAttachment(); + var texture = null; + if (attachment instanceof spine.RegionAttachment) { + var region = attachment; + vertices = region.updateWorldVertices(slot, premultipliedAlpha); + triangles = SkeletonRenderer.QUAD_TRIANGLES; + texture = region.region.renderObject.texture; + } + else if (attachment instanceof spine.MeshAttachment) { + var mesh = attachment; + vertices = mesh.updateWorldVertices(slot, premultipliedAlpha); + triangles = mesh.triangles; + texture = mesh.region.renderObject.texture; + } + if (texture != null) { + var slotBlendMode = slot.data.blendMode; + if (slotBlendMode != blendMode) { + blendMode = slotBlendMode; + batcher.setBlendMode(webgl.getSourceGLBlendMode(this._gl, blendMode, premultipliedAlpha), webgl.getDestGLBlendMode(this._gl, blendMode)); + } + batcher.draw(texture, vertices, triangles); + } + } + }; + SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0]; + return SkeletonRenderer; + }()); + webgl.SkeletonRenderer = SkeletonRenderer; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Texture = (function () { + function Texture(gl, image, useMipMaps) { + if (useMipMaps === void 0) { useMipMaps = false; } + this._boundUnit = 0; + this._gl = gl; + this._texture = gl.createTexture(); + this._image = image; + this.update(useMipMaps); + } + Texture.prototype.getImage = function () { + return this._image; + }; + Texture.prototype.setFilters = function (minFilter, magFilter) { + var gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter); + }; + Texture.prototype.setWraps = function (uWrap, vWrap) { + var gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap); + }; + Texture.prototype.update = function (useMipMaps) { + var gl = this._gl; + this.bind(); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + if (useMipMaps) + gl.generateMipmap(gl.TEXTURE_2D); + }; + Texture.prototype.bind = function (unit) { + if (unit === void 0) { unit = 0; } + var gl = this._gl; + this._boundUnit = unit; + gl.activeTexture(gl.TEXTURE0 + unit); + gl.bindTexture(gl.TEXTURE_2D, this._texture); + }; + Texture.prototype.unbind = function () { + var gl = this._gl; + gl.activeTexture(gl.TEXTURE0 + this._boundUnit); + gl.bindTexture(gl.TEXTURE_2D, null); + }; + Texture.prototype.dispose = function () { + var gl = this._gl; + gl.deleteTexture(this._texture); + }; + 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; + }()); + webgl.Texture = Texture; + (function (TextureFilter) { + TextureFilter[TextureFilter["Nearest"] = WebGLRenderingContext.NEAREST] = "Nearest"; + TextureFilter[TextureFilter["Linear"] = WebGLRenderingContext.LINEAR] = "Linear"; + TextureFilter[TextureFilter["MipMap"] = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR] = "MipMap"; + TextureFilter[TextureFilter["MipMapNearestNearest"] = WebGLRenderingContext.NEAREST_MIPMAP_NEAREST] = "MipMapNearestNearest"; + TextureFilter[TextureFilter["MipMapLinearNearest"] = WebGLRenderingContext.LINEAR_MIPMAP_NEAREST] = "MipMapLinearNearest"; + TextureFilter[TextureFilter["MipMapNearestLinear"] = WebGLRenderingContext.NEAREST_MIPMAP_LINEAR] = "MipMapNearestLinear"; + TextureFilter[TextureFilter["MipMapLinearLinear"] = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR] = "MipMapLinearLinear"; + })(webgl.TextureFilter || (webgl.TextureFilter = {})); + var TextureFilter = webgl.TextureFilter; + (function (TextureWrap) { + TextureWrap[TextureWrap["MirroredRepeat"] = WebGLRenderingContext.MIRRORED_REPEAT] = "MirroredRepeat"; + TextureWrap[TextureWrap["ClampToEdge"] = WebGLRenderingContext.CLAMP_TO_EDGE] = "ClampToEdge"; + TextureWrap[TextureWrap["Repeat"] = WebGLRenderingContext.REPEAT] = "Repeat"; + })(webgl.TextureWrap || (webgl.TextureWrap = {})); + var TextureWrap = webgl.TextureWrap; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var TextureAtlas = (function () { + function TextureAtlas(atlasText, textureLoader) { + this.pages = new Array(); + this.regions = new Array(); + this.load(atlasText, textureLoader); + } + TextureAtlas.prototype.load = function (atlasText, textureLoader) { + if (textureLoader == null) + throw new Error("textureLoader cannot be null."); + var reader = new TextureAtlasReader(atlasText); + var tuple = new Array(4); + var page = null; + while (true) { + var line = reader.readLine(); + if (line == null) + break; + 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); + } + // page.format = Format[tuple[0]]; we don't need format in WebGL + reader.readTuple(tuple); + page.minFilter = webgl.Texture.filterFromString(tuple[0]); + page.magFilter = webgl.Texture.filterFromString(tuple[1]); + var direction = reader.readValue(); + page.uWrap = webgl.TextureWrap.ClampToEdge; + page.vWrap = webgl.TextureWrap.ClampToEdge; + if (direction == "x") + page.uWrap = webgl.TextureWrap.Repeat; + else if (direction == "y") + page.vWrap = webgl.TextureWrap.Repeat; + else if (direction == "xy") + page.uWrap = page.vWrap = webgl.TextureWrap.Repeat; + page.texture = textureLoader(line); + page.texture.setFilters(page.minFilter, page.magFilter); + page.texture.setWraps(page.uWrap, page.vWrap); + page.width = page.texture.getImage().width; + page.height = page.texture.getImage().height; + this.pages.push(page); + } + else { + var region = new TextureAtlasRegion(); + region.name = line; + region.page = page; + region.rotate = reader.readValue() == "true"; + 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]); + region.u = x / page.width; + region.v = y / page.height; + if (region.rotate) { + region.u2 = (x + height) / page.width; + region.v2 = (y + width) / page.height; + } + else { + region.u2 = (x + width) / page.width; + region.v2 = (y + height) / page.height; + } + region.x = x; + region.y = y; + region.width = Math.abs(width); + region.height = Math.abs(height); + if (reader.readTuple(tuple) == 4) { + // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + if (reader.readTuple(tuple) == 4) { + //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + reader.readTuple(tuple); + } + } + region.originalWidth = parseInt(tuple[0]); + region.originalHeight = parseInt(tuple[1]); + reader.readTuple(tuple); + region.offsetX = parseInt(tuple[0]); + region.offsetY = parseInt(tuple[1]); + region.index = parseInt(reader.readValue()); + region.texture = page.texture; + this.regions.push(region); + } + } + }; + 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].texture.dispose(); + } + }; + return TextureAtlas; + }()); + webgl.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() { + } + return TextureAtlasPage; + }()); + webgl.TextureAtlasPage = TextureAtlasPage; + var TextureAtlasRegion = (function (_super) { + __extends(TextureAtlasRegion, _super); + function TextureAtlasRegion() { + _super.apply(this, arguments); + } + return TextureAtlasRegion; + }(spine.TextureRegion)); + webgl.TextureAtlasRegion = TextureAtlasRegion; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var TextureAtlasAttachmentLoader = (function () { + function TextureAtlasAttachmentLoader(atlas) { + this.atlas = atlas; + } + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) + throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")"); + var attachment = new spine.RegionAttachment(name); + attachment.setRegion(region); + attachment.region = region; + return attachment; + }; + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) + throw new Error("Region not found in atlas: " + path + " (mesh attachment: " + name + ")"); + var attachment = new spine.MeshAttachment(name); + attachment.region = region; + return attachment; + }; + /** @return May be null to not load an attachment. */ + TextureAtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) { + return new spine.BoundingBoxAttachment(name); + }; + /** @return May be null to not load an attachment */ + TextureAtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) { + return new spine.PathAttachment(name); + }; + return TextureAtlasAttachmentLoader; + }()); + webgl.TextureAtlasAttachmentLoader = TextureAtlasAttachmentLoader; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + var Vector3 = (function () { + function Vector3() { + this.x = 0; + this.y = 0; + this.z = 0; + } + Vector3.prototype.set = function (x, y, z) { + this.x = x; + this.y = y; + this.z = z; + return this; + }; + Vector3.prototype.add = function (v) { + this.x += v.x; + this.y += v.y; + this.z += v.z; + return this; + }; + Vector3.prototype.sub = function (v) { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + return this; + }; + Vector3.prototype.scale = function (s) { + this.x *= s; + this.y *= s; + this.z *= s; + return this; + }; + Vector3.prototype.normalize = function () { + var len = this.length(); + if (len == 0) + return this; + len = 1 / len; + this.x *= len; + this.y *= len; + this.z *= len; + return this; + }; + Vector3.prototype.cross = function (v) { + return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x); + }; + Vector3.prototype.multiply = function (matrix) { + var l_mat = matrix.values; + return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]); + }; + Vector3.prototype.project = function (matrix) { + var l_mat = matrix.values; + var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]); + return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w); + }; + Vector3.prototype.dot = function (v) { + return this.x * v.x + this.y * v.y + this.z * v.z; + }; + Vector3.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + }; + Vector3.prototype.distance = function (v) { + var a = v.x - this.x; + var b = v.y - this.y; + var c = v.z - this.z; + return Math.sqrt(a * a + b * b + c * c); + }; + return Vector3; + }()); + webgl.Vector3 = Vector3; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var webgl; + (function (webgl) { + function getSourceGLBlendMode(gl, blendMode, premultipliedAlpha) { + if (premultipliedAlpha === void 0) { premultipliedAlpha = false; } + switch (blendMode) { + case spine.BlendMode.Normal: return premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA; + case spine.BlendMode.Additive: return premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA; + case spine.BlendMode.Multiply: return gl.DST_COLOR; + case spine.BlendMode.Screen: return gl.ONE; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + webgl.getSourceGLBlendMode = getSourceGLBlendMode; + function getDestGLBlendMode(gl, blendMode) { + switch (blendMode) { + case spine.BlendMode.Normal: return gl.ONE_MINUS_SRC_ALPHA; + case spine.BlendMode.Additive: return gl.ONE; + case spine.BlendMode.Multiply: return gl.ONE_MINUS_SRC_ALPHA; + case spine.BlendMode.Screen: return gl.ONE_MINUS_SRC_ALPHA; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + webgl.getDestGLBlendMode = getDestGLBlendMode; + })(webgl = spine.webgl || (spine.webgl = {})); +})(spine || (spine = {})); +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +var spine; +(function (spine) { + var SpineWidget = (function () { + function SpineWidget(element, config) { + var _this = this; + this._mvp = new spine.webgl.Matrix4(); + this._paused = false; + this._lastFrameTime = Date.now() / 1000.0; + this._backgroundColor = new spine.Color(); + this._loaded = false; + if (!element) + throw new Error("Please provide a DOM element, e.g. document.getElementById('myelement')"); + if (!config) + throw new Error("Please provide a configuration, specifying at least the json file, atlas file and animation name"); + var elementId = element; + if (typeof (element) === "string") + element = document.getElementById(element); + if (element == null) + throw new Error("Element " + elementId + " does not exist"); + this.validateConfig(config); + var canvas = this.canvas = document.createElement("canvas"); + element.appendChild(canvas); + canvas.width = config.width; + canvas.height = config.height; + var webglConfig = { alpha: false }; + var gl = this.gl = (canvas.getContext("webgl", webglConfig) || canvas.getContext("experimental-webgl", webglConfig)); + this._shader = spine.webgl.Shader.newColoredTextured(gl); + this._batcher = new spine.webgl.PolygonBatcher(gl); + this._mvp.ortho2d(0, 0, 639, 479); + this._skeletonRenderer = new spine.webgl.SkeletonRenderer(gl); + var assets = this._assetManager = new spine.webgl.AssetManager(gl); + assets.loadText(config.atlas); + assets.loadText(config.json); + assets.loadTexture(config.atlas.replace(".atlas", ".png")); + requestAnimationFrame(function () { _this.load(); }); + } + SpineWidget.prototype.validateConfig = function (config) { + if (!config.atlas) + throw new Error("Please specify config.atlas"); + if (!config.json) + throw new Error("Please specify config.json"); + if (!config.animation) + throw new Error("Please specify config.animationName"); + if (!config.scale) + config.scale = 1.0; + if (!config.skin) + config.skin = "default"; + if (config.loop === undefined) + config.loop = true; + if (!config.y) + config.y = 20; + if (!config.width) + config.width = 640; + if (!config.height) + config.height = 480; + if (!config.x) + config.x = config.width / 2; + if (!config.backgroundColor) + config.backgroundColor = "#555555"; + if (!config.imagesPath) { + var index = config.atlas.lastIndexOf("/"); + if (index != -1) { + config.imagesPath = config.atlas.substr(0, index) + "/"; + } + else { + config.imagesPath = ""; + } + } + if (!config.premultipliedAlpha === undefined) + config.premultipliedAlpha = false; + this._backgroundColor.setFromString(config.backgroundColor); + this._config = config; + }; + SpineWidget.prototype.load = function () { + var _this = this; + var assetManager = this._assetManager; + var imagesPath = this._config.imagesPath; + var config = this._config; + if (assetManager.isLoadingComplete()) { + if (assetManager.hasErrors()) { + if (config.error) + config.error(this, "Failed to load assets: " + JSON.stringify(assetManager.errors)); + else + throw new Error("Failed to load assets: " + JSON.stringify(assetManager.errors)); + } + var atlas = new spine.webgl.TextureAtlas(this._assetManager.get(this._config.atlas), function (path) { + return assetManager.get(imagesPath + path); + }); + var atlasLoader = new spine.webgl.TextureAtlasAttachmentLoader(atlas); + var skeletonJson = new spine.SkeletonJson(atlasLoader); + // Set the scale to apply during parsing, parse the file, and create a new skeleton. + skeletonJson.scale = config.scale; + var skeletonData = skeletonJson.readSkeletonData(assetManager.get(config.json)); + var skeleton = this.skeleton = new spine.Skeleton(skeletonData); + skeleton.x = config.x; + skeleton.y = config.y; + skeleton.setSkinByName(config.skin); + var animationState = this.state = new spine.AnimationState(new spine.AnimationStateData(skeleton.data)); + animationState.setAnimation(0, config.animation, true); + if (config.success) + config.success(this); + this._loaded = true; + requestAnimationFrame(function () { _this.render(); }); + } + else + requestAnimationFrame(function () { _this.load(); }); + }; + SpineWidget.prototype.render = function () { + var _this = this; + var now = Date.now() / 1000; + var delta = now - this._lastFrameTime; + if (delta > 0.1) + delta = 0; + this._lastFrameTime = now; + var gl = this.gl; + var color = this._backgroundColor; + gl.clearColor(color.r, color.g, color.b, color.a); + gl.clear(gl.COLOR_BUFFER_BIT); + // Apply the animation state based on the delta time. + var state = this.state; + var skeleton = this.skeleton; + var premultipliedAlpha = this._config.premultipliedAlpha; + state.update(delta); + state.apply(skeleton); + skeleton.updateWorldTransform(); + // Bind the shader and set the texture and model-view-projection matrix. + var shader = this._shader; + shader.bind(); + shader.setUniformi(spine.webgl.Shader.SAMPLER, 0); + shader.setUniform4x4f(spine.webgl.Shader.MVP_MATRIX, this._mvp.values); + // Start the batch and tell the SkeletonRenderer to render the active skeleton. + var batcher = this._batcher; + var skeletonRenderer = this._skeletonRenderer; + batcher.begin(shader); + skeletonRenderer.premultipliedAlpha = premultipliedAlpha; + skeletonRenderer.draw(batcher, skeleton); + batcher.end(); + shader.unbind(); + if (!this._paused) + requestAnimationFrame(function () { _this.render(); }); + }; + SpineWidget.prototype.pause = function () { + this._paused = true; + }; + SpineWidget.prototype.play = function () { + var _this = this; + this._paused = false; + requestAnimationFrame(function () { _this.render(); }); + }; + SpineWidget.prototype.isPlaying = function () { + return !this._paused; + }; + SpineWidget.prototype.setAnimation = function (animationName) { + if (!this._loaded) + throw new Error("Widget isn't loaded yet"); + this.skeleton.setToSetupPose(); + this.state.setAnimation(0, animationName, this._config.loop); + }; + SpineWidget.loadWidgets = function () { + var widgets = document.getElementsByClassName("spine-widget"); + for (var i = 0; i < widgets.length; i++) { + SpineWidget.loadWidget(widgets[i]); + } + }; + SpineWidget.loadWidget = function (widget) { + var config = new SpineWidgetConfig(); + config.atlas = widget.getAttribute("data-atlas"); + config.json = widget.getAttribute("data-json"); + config.animation = widget.getAttribute("data-animation"); + if (widget.getAttribute("data-images-path")) + config.imagesPath = widget.getAttribute("data-images-path"); + if (widget.getAttribute("data-skin")) + config.skin = widget.getAttribute("data-skin"); + if (widget.getAttribute("data-loop")) + config.loop = widget.getAttribute("data-loop") === "true"; + if (widget.getAttribute("data-scale")) + config.scale = parseFloat(widget.getAttribute("data-scale")); + if (widget.getAttribute("data-x")) + config.x = parseFloat(widget.getAttribute("data-x")); + if (widget.getAttribute("data-y")) + config.x = parseFloat(widget.getAttribute("data-y")); + if (widget.getAttribute("data-width")) + config.width = parseInt(widget.getAttribute("data-width")); + if (widget.getAttribute("data-height")) + config.height = parseInt(widget.getAttribute("data-height")); + if (widget.getAttribute("data-background-color")) + config.backgroundColor = widget.getAttribute("data-background-color"); + if (widget.getAttribute("data-premultiplied-alpha")) + config.premultipliedAlpha = widget.getAttribute("data-premultiplied-alpha") === "true"; + new spine.SpineWidget(widget, config); + }; + SpineWidget.ready = function () { + if (SpineWidget.pageLoaded) + return; + SpineWidget.pageLoaded = true; + SpineWidget.loadWidgets(); + }; + SpineWidget.setupDOMListener = function () { + if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", SpineWidget.ready, false); + window.addEventListener("load", SpineWidget.ready, false); + } + else { + document.attachEvent("onreadystatechange", function readyStateChange() { + if (document.readyState === "complete") + SpineWidget.ready(); + }); + window.attachEvent("onload", SpineWidget.ready); + } + }; + SpineWidget.pageLoaded = false; + return SpineWidget; + }()); + spine.SpineWidget = SpineWidget; + var SpineWidgetConfig = (function () { + function SpineWidgetConfig() { + this.skin = "default"; + this.loop = true; + this.scale = 1.0; + this.x = 0; + this.y = 0; + this.width = 640; + this.height = 480; + this.backgroundColor = "#555555"; + this.premultipliedAlpha = false; + } + return SpineWidgetConfig; + }()); + spine.SpineWidgetConfig = SpineWidgetConfig; +})(spine || (spine = {})); +spine.SpineWidget.setupDOMListener(); +//# sourceMappingURL=spine-widget.js.map \ No newline at end of file diff --git a/spine-ts/build/spine-widget.js.map b/spine-ts/build/spine-widget.js.map new file mode 100644 index 000000000..a8b68ab68 --- /dev/null +++ b/spine-ts/build/spine-widget.js.map @@ -0,0 +1 @@ +{"version":3,"file":"spine-widget.js","sourceRoot":"","sources":["../core/src/Animation.ts","../core/src/AnimationState.ts","../core/src/AnimationStateData.ts","../core/src/BlendMode.ts","../core/src/Bone.ts","../core/src/BoneData.ts","../core/src/Event.ts","../core/src/EventData.ts","../core/src/IkConstraint.ts","../core/src/IkConstraintData.ts","../core/src/PathConstraint.ts","../core/src/PathConstraintData.ts","../core/src/Skeleton.ts","../core/src/SkeletonBounds.ts","../core/src/SkeletonData.ts","../core/src/SkeletonJson.ts","../core/src/Skin.ts","../core/src/Slot.ts","../core/src/SlotData.ts","../core/src/TransformConstraint.ts","../core/src/TransformConstraintData.ts","../core/src/Updatable.ts","../core/src/Utils.ts","../core/src/attachments/Attachment.ts","../core/src/attachments/AttachmentLoader.ts","../core/src/attachments/AttachmentType.ts","../core/src/attachments/BoundingBoxAttachment.ts","../core/src/attachments/MeshAttachment.ts","../core/src/attachments/PathAttachment.ts","../core/src/attachments/RegionAttachment.ts","../core/src/attachments/TextureRegion.ts","../webgl/src/AssetManager.ts","../webgl/src/Matrix4.ts","../webgl/src/Mesh.ts","../webgl/src/PolygonBatcher.ts","../webgl/src/Shader.ts","../webgl/src/SkeletonRenderer.ts","../webgl/src/Texture.ts","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CAAC,gBAAgB,EAAE,CAAC"} \ No newline at end of file diff --git a/spine-ts/core/src/Animation.ts b/spine-ts/core/src/Animation.ts new file mode 100644 index 000000000..8d1c2bfcf --- /dev/null +++ b/spine-ts/core/src/Animation.ts @@ -0,0 +1,816 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class Animation { + name: string; + timelines: Array; + duration: number; + + constructor (name: string, timelines: Array, duration: number) { + 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; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array) { + if (skeleton == null) throw new Error("skeleton cannot be null."); + + if (loop && this.duration != 0) { + time %= this.duration; + if (lastTime > 0) lastTime %= this.duration; + } + + let timelines = this.timelines; + for (let i = 0, n = timelines.length; i < n; i++) + timelines[i].apply(skeleton, lastTime, time, events, 1); + } + + mix (skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number) { + if (skeleton == null) throw new Error("skeleton cannot be null."); + + if (loop && this.duration != 0) { + time %= this.duration; + if (lastTime > 0) lastTime %= this.duration; + } + + let timelines = this.timelines; + for (let i = 0, n = timelines.length; i < n; i++) + timelines[i].apply(skeleton, lastTime, time, events, alpha); + } + + static binarySearch (values: ArrayLike, target: number, step: number = 1) { + let low = 0; + let high = values.length / step - 2; + if (high == 0) return step; + let 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; + } + } + + static linearSearch (values: ArrayLike, target: number, step: number) { + for (let i = 0, last = values.length - step; i <= last; i += step) + if (values[i] > target) return i; + return -1; + } + } + + export interface Timeline { + apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + + export abstract class CurveTimeline implements Timeline { + static LINEAR = 0; static STEPPED = 1; static BEZIER = 2; + static BEZIER_SIZE = 10 * 2 - 1; + + private curves: ArrayLike; // type, x, y, ... + + constructor (frameCount: number) { + if (frameCount <= 0) throw new Error("frameCount must be > 0: " + frameCount); + this.curves = Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE); + } + + getFrameCount () { + return this.curves.length / CurveTimeline.BEZIER_SIZE + 1; + } + + setLinear (frameIndex: number) { + this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR; + } + + setStepped (frameIndex: number) { + this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED; + } + + getCurveType (frameIndex: number): number { + let index = frameIndex * CurveTimeline.BEZIER_SIZE; + if (index == this.curves.length) return CurveTimeline.LINEAR; + let type = this.curves[index]; + if (type == CurveTimeline.LINEAR) return CurveTimeline.LINEAR; + if (type == CurveTimeline.STEPPED) return CurveTimeline.STEPPED; + return CurveTimeline.BEZIER; + } + + /** Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. + * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of + * the difference between the keyframe's values. */ + setCurve (frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number) { + let tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03; + let dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006; + let ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy; + let dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667; + + let i = frameIndex * CurveTimeline.BEZIER_SIZE; + let curves = this.curves; + curves[i++] = CurveTimeline.BEZIER; + + let x = dfx, y = dfy; + for (let 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; + } + } + + getCurvePercent (frameIndex: number, percent: number) { + percent = MathUtils.clamp(percent, 0, 1); + let curves = this.curves; + let i = frameIndex * CurveTimeline.BEZIER_SIZE; + let type = curves[i]; + if (type == CurveTimeline.LINEAR) return percent; + if (type == CurveTimeline.STEPPED) return 0; + i++; + let x = 0; + for (let start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) { + x = curves[i]; + if (x >= percent) { + let prevX: number, prevY: number; + 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); + } + } + let y = curves[i - 1]; + return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1. + } + + abstract apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number): void; + } + + export class RotateTimeline extends CurveTimeline { + static ENTRIES = 2; + static PREV_TIME = -2; static PREV_ROTATION = -1; + static ROTATION = 1; + + boneIndex: number; + frames: ArrayLike; // time, degrees, ... + + constructor (frameCount: number) { + super(frameCount); + this.frames = Utils.newFloatArray(frameCount << 1); + } + + /** Sets the time and angle of the specified keyframe. */ + setFrame (frameIndex: number, time: number, degrees: number) { + frameIndex <<= 1; + this.frames[frameIndex] = time; + this.frames[frameIndex + RotateTimeline.ROTATION] = degrees; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let bone = skeleton.bones[this.boneIndex]; + + if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { // Time is after last frame. + let amount = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + bone.rotation += amount * alpha; + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES); + let prevRotation = frames[frame + RotateTimeline.PREV_ROTATION]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent((frame >> 1) - 1, + 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime)); + + let amount = frames[frame + RotateTimeline.ROTATION] - prevRotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + amount = bone.data.rotation + (prevRotation + amount * percent) - bone.rotation; + while (amount > 180) + amount -= 360; + while (amount < -180) + amount += 360; + bone.rotation += amount * alpha; + } + } + + export class TranslateTimeline extends CurveTimeline { + static ENTRIES = 3; + static PREV_TIME = -3; static PREV_X = -2; static PREV_Y = -1; + static X = 1; static Y = 2; + + boneIndex: number; + frames: ArrayLike; // time, x, y, ... + + constructor (frameCount: number) { + super(frameCount); + this.frames = Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES); + } + + /** Sets the time and value of the specified keyframe. */ + setFrame (frameIndex: number, time: number, x: number, y: number) { + frameIndex *= TranslateTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + TranslateTimeline.X] = x; + this.frames[frameIndex + TranslateTimeline.Y] = y; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let bone = skeleton.bones[this.boneIndex]; + + if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { // Time is after last frame. + bone.x += (bone.data.x + frames[frames.length + TranslateTimeline.PREV_X] - bone.x) * alpha; + bone.y += (bone.data.y + frames[frames.length + TranslateTimeline.PREV_Y] - bone.y) * alpha; + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES); + let prevX = frames[frame + TranslateTimeline.PREV_X]; + let prevY = frames[frame + TranslateTimeline.PREV_Y]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, + 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime)); + + bone.x += (bone.data.x + prevX + (frames[frame + TranslateTimeline.X] - prevX) * percent - bone.x) * alpha; + bone.y += (bone.data.y + prevY + (frames[frame + TranslateTimeline.Y] - prevY) * percent - bone.y) * alpha; + } + } + + export class ScaleTimeline extends TranslateTimeline { + constructor (frameCount: number) { + super(frameCount); + } + + apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { // Time is after last frame. + bone.scaleX += (bone.data.scaleX * frames[frames.length + ScaleTimeline.PREV_X] - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * frames[frames.length + ScaleTimeline.PREV_Y] - bone.scaleY) * alpha; + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES); + let prevX = frames[frame + ScaleTimeline.PREV_X]; + let prevY = frames[frame + ScaleTimeline.PREV_Y]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, + 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime)); + + bone.scaleX += (bone.data.scaleX * (prevX + (frames[frame + ScaleTimeline.X] - prevX) * percent) - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * (prevY + (frames[frame + ScaleTimeline.Y] - prevY) * percent) - bone.scaleY) * alpha; + } + } + + export class ShearTimeline extends TranslateTimeline { + constructor (frameCount: number) { + super(frameCount); + } + + apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let bone = skeleton.bones[this.boneIndex]; + if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { // Time is after last frame. + bone.shearX += (bone.data.shearX + frames[frames.length + ShearTimeline.PREV_X] - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + frames[frames.length + ShearTimeline.PREV_Y] - bone.shearY) * alpha; + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES); + let prevX = frames[frame + ShearTimeline.PREV_X]; + let prevY = frames[frame + ShearTimeline.PREV_Y]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, + 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime)); + + bone.shearX += (bone.data.shearX + (prevX + (frames[frame + ShearTimeline.X] - prevX) * percent) - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + (prevY + (frames[frame + ShearTimeline.Y] - prevY) * percent) - bone.shearY) * alpha; + } + } + + export class ColorTimeline extends CurveTimeline { + static ENTRIES = 5; + static PREV_TIME = -5; static PREV_R = -4; static PREV_G = -3; static PREV_B = -2; static PREV_A = -1; + static R = 1; static G = 2; static B = 3; static A = 4; + + slotIndex: number; + frames: ArrayLike; // time, r, g, b, a, ... + + constructor (frameCount: number) { + super(frameCount); + this.frames = Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES); + } + + /** Sets the time and value of the specified keyframe. */ + setFrame (frameIndex: number, time: number, r: number, g: number, b: number, a: number) { + 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; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let r = 0, g = 0, b = 0, a = 0; + if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { // Time is after last frame. + let 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 { + // Interpolate between the previous frame and the current frame. + let 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]; + let frameTime = frames[frame]; + let 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; + } + let color: Color = skeleton.slots[this.slotIndex].color; + if (alpha < 1) + color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha); + else + color.set(r, g, b, a); + } + } + + export class AttachmentTimeline implements Timeline { + slotIndex: number; + frames: ArrayLike // time, ... + attachmentNames: Array; + + constructor (frameCount: number) { + this.frames = Utils.newFloatArray(frameCount); + this.attachmentNames = new Array(frameCount); + } + + getFrameCount () { + return this.frames.length; + } + + /** Sets the time and value of the specified keyframe. */ + setFrame (frameIndex: number, time: number, attachmentName: string) { + this.frames[frameIndex] = time; + this.attachmentNames[frameIndex] = attachmentName; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let frameIndex = 0; + if (time >= frames[frames.length - 1]) // Time is after last frame. + frameIndex = frames.length - 1; + else + frameIndex = Animation.binarySearch(frames, time, 1) - 1; + + let attachmentName = this.attachmentNames[frameIndex]; + skeleton.slots[this.slotIndex] + .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); + } + } + + export class EventTimeline implements Timeline { + frames: ArrayLike; // time, ... + events: Array; + + constructor (frameCount: number) { + this.frames = Utils.newFloatArray(frameCount); + this.events = new Array(frameCount); + } + + getFrameCount () { + return this.frames.length; + } + + /** Sets the time of the specified keyframe. */ + setFrame (frameIndex: number, event: Event) { + this.frames[frameIndex] = event.time; + this.events[frameIndex] = event; + } + + /** Fires events for frames > lastTime and <= time. */ + apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) { + if (firedEvents == null) return; + let frames = this.frames; + let frameCount = this.frames.length; + + if (lastTime > time) { // Fire events after last time for looped animations. + this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha); + lastTime = -1; + } else if (lastTime >= frames[frameCount - 1]) // Last time is after last frame. + return; + if (time < frames[0]) return; // Time is before first frame. + + let frame = 0; + if (lastTime < frames[0]) + frame = 0; + else { + frame = Animation.binarySearch(frames, lastTime); + let frameTime = frames[frame]; + while (frame > 0) { // Fire multiple events with the same frame. + if (frames[frame - 1] != frameTime) break; + frame--; + } + } + for (; frame < frameCount && time >= frames[frame]; frame++) + firedEvents.push(this.events[frame]); + } + } + + export class DrawOrderTimeline implements Timeline { + frames: ArrayLike; // time, ... + drawOrders: Array>; + + constructor (frameCount: number) { + this.frames = Utils.newFloatArray(frameCount); + this.drawOrders = new Array>(frameCount); + } + + getFrameCount () { + return this.frames.length; + } + + /** Sets the time of the specified keyframe. + * @param drawOrder May be null to use bind pose draw order. */ + setFrame (frameIndex: number, time: number, drawOrder: Array) { + this.frames[frameIndex] = time; + this.drawOrders[frameIndex] = drawOrder; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let frame = 0; + if (time >= frames[frames.length - 1]) // Time is after last frame. + frame = frames.length - 1; + else + frame = Animation.binarySearch(frames, time) - 1; + + let drawOrder: Array = skeleton.drawOrder; + let slots: Array = skeleton.slots; + let drawOrderToSetupIndex = this.drawOrders[frame]; + if (drawOrderToSetupIndex == null) + Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length); + else { + for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++) + drawOrder[i] = slots[drawOrderToSetupIndex[i]]; + } + } + } + + export class DeformTimeline extends CurveTimeline { + frames: ArrayLike; // time, ... + frameVertices: Array>; + slotIndex: number; + attachment: VertexAttachment; + + constructor (frameCount: number) { + super(frameCount); + this.frames = Utils.newFloatArray(frameCount); + this.frameVertices = new Array>(frameCount); + } + + /** Sets the time of the specified keyframe. */ + setFrame (frameIndex: number, time: number, vertices: ArrayLike) { + this.frames[frameIndex] = time; + this.frameVertices[frameIndex] = vertices; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) { + let slot: Slot = skeleton.slots[this.slotIndex]; + let slotAttachment: Attachment = slot.getAttachment(); + if (!(slotAttachment instanceof VertexAttachment) || !(slotAttachment).applyDeform(this.attachment)) return; + + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let frameVertices = this.frameVertices; + let vertexCount = frameVertices[0].length; + + let verticesArray: Array = slot.attachmentVertices; + if (verticesArray.length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices. + let vertices: Array = Utils.setArraySize(verticesArray, vertexCount); + + if (time >= frames[frames.length - 1]) { // Time is after last frame. + let lastVertices = frameVertices[frames.length - 1]; + if (alpha < 1) { + for (let i = 0; i < vertexCount; i++) + vertices[i] += (lastVertices[i] - vertices[i]) * alpha; + } else + Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount); + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time); + let prevVertices = frameVertices[frame - 1]; + let nextVertices = frameVertices[frame]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime)); + + if (alpha < 1) { + for (let i = 0; i < vertexCount; i++) { + let prev = prevVertices[i]; + vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha; + } + } else { + for (let i = 0; i < vertexCount; i++) { + let prev = prevVertices[i]; + vertices[i] = prev + (nextVertices[i] - prev) * percent; + } + } + } + } + + export class IkConstraintTimeline extends CurveTimeline { + static ENTRIES = 3; + static PREV_TIME = -3; static PREV_MIX = -2; static PREV_BEND_DIRECTION = -1; + static MIX = 1; static BEND_DIRECTION = 2; + + ikConstraintIndex: number; + frames: ArrayLike; // time, mix, bendDirection, ... + + constructor (frameCount: number) { + super(frameCount); + this.frames = Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES); + } + + /** Sets the time, mix and bend direction of the specified keyframe. */ + setFrame (frameIndex: number, time: number, mix: number, bendDirection: number) { + frameIndex *= IkConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + IkConstraintTimeline.MIX] = mix; + this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let constraint: IkConstraint = skeleton.ikConstraints[this.ikConstraintIndex]; + + if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { // Time is after last frame. + constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]); + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES); + let mix = frames[frame + IkConstraintTimeline.PREV_MIX]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, + 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime)); + + constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha; + constraint.bendDirection = Math.floor(frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]); + } + } + + export class TransformConstraintTimeline extends CurveTimeline { + static ENTRIES = 5; + static PREV_TIME = -5; static PREV_ROTATE = -4; static PREV_TRANSLATE = -3; static PREV_SCALE = -2; static PREV_SHEAR = -1; + static ROTATE = 1; static TRANSLATE = 2; static SCALE = 3; static SHEAR = 4; + + transformConstraintIndex: number; + frames: ArrayLike; // time, rotate mix, translate mix, scale mix, shear mix, ... + + constructor (frameCount: number) { + super(frameCount); + this.frames = Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES); + } + + /** Sets the time and mixes of the specified keyframe. */ + setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number) { + 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; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let constraint: TransformConstraint = skeleton.transformConstraints[this.transformConstraintIndex]; + + if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { // Time is after last frame. + let i = frames.length; + constraint.rotateMix += (frames[i + TransformConstraintTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + TransformConstraintTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + constraint.scaleMix += (frames[i + TransformConstraintTimeline.PREV_SCALE] - constraint.scaleMix) * alpha; + constraint.shearMix += (frames[i + TransformConstraintTimeline.PREV_SHEAR] - constraint.shearMix) * alpha; + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES); + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, + 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime)); + + let rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE]; + let translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE]; + let scale = frames[frame + TransformConstraintTimeline.PREV_SCALE]; + let shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR]; + constraint.rotateMix += (rotate + (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent - constraint.translateMix) + * alpha; + constraint.scaleMix += (scale + (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent - constraint.scaleMix) * alpha; + constraint.shearMix += (shear + (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent - constraint.shearMix) * alpha; + } + } + + export class PathConstraintPositionTimeline extends CurveTimeline { + static ENTRIES = 2; + static PREV_TIME = -2; static PREV_VALUE = -1; + static VALUE = 1; + + pathConstraintIndex: number; + + frames: ArrayLike; // time, position, ... + + constructor (frameCount: number) { + super(frameCount); + this.frames = Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES); + } + + /** Sets the time and value of the specified keyframe. */ + setFrame (frameIndex: number, time: number, value: number) { + frameIndex *= PathConstraintPositionTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex]; + + if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) { // Time is after last frame. + let i = frames.length; + constraint.position += (frames[i + PathConstraintPositionTimeline.PREV_VALUE] - constraint.position) * alpha; + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES); + let position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, + 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime)); + + constraint.position += (position + (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent - constraint.position) * alpha; + } + } + + export class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { + constructor (frameCount: number) { + super(frameCount); + } + + apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex]; + + if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) { // Time is after last frame. + let i = frames.length; + constraint.spacing += (frames[i + PathConstraintSpacingTimeline.PREV_VALUE] - constraint.spacing) * alpha; + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES); + let spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, + 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime)); + + constraint.spacing += (spacing + (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent - constraint.spacing) * alpha; + } + } + + export class PathConstraintMixTimeline extends CurveTimeline { + static ENTRIES = 3; + static PREV_TIME = -3; static PREV_ROTATE = -2; static PREV_TRANSLATE = -1; + static ROTATE = 1; static TRANSLATE = 2; + + pathConstraintIndex: number; + + frames: ArrayLike; // time, rotate mix, translate mix, ... + + constructor (frameCount: number) { + super(frameCount); + this.frames = Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES); + } + + /** Sets the time and mixes of the specified keyframe. */ + setFrame (frameIndex: number, time: number, rotateMix: number, translateMix: number) { + frameIndex *= PathConstraintMixTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix; + this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix; + } + + apply (skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number) { + let frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + let constraint: PathConstraint = skeleton.pathConstraints[this.pathConstraintIndex]; + + if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { // Time is after last frame. + let i = frames.length; + constraint.rotateMix += (frames[i + PathConstraintMixTimeline.PREV_ROTATE] - constraint.rotateMix) * alpha; + constraint.translateMix += (frames[i + PathConstraintMixTimeline.PREV_TRANSLATE] - constraint.translateMix) * alpha; + return; + } + + // Interpolate between the previous frame and the current frame. + let frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES); + let rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE]; + let translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE]; + let frameTime = frames[frame]; + let percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, + 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime)); + + constraint.rotateMix += (rotate + (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent - constraint.rotateMix) * alpha; + constraint.translateMix += (translate + (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent - constraint.translateMix) + * alpha; + } + } +} diff --git a/spine-ts/core/src/AnimationState.ts b/spine-ts/core/src/AnimationState.ts new file mode 100644 index 000000000..351c80ed9 --- /dev/null +++ b/spine-ts/core/src/AnimationState.ts @@ -0,0 +1,321 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class AnimationState { + data: AnimationStateData; + tracks = new Array(); + events = new Array(); + listeners = new Array(); + timeScale = 1; + + constructor (data: AnimationStateData = null) { + if (data == null) throw new Error("data cannot be null."); + this.data = data; + } + + update (delta: number) { + delta *= this.timeScale; + for (let i = 0; i < this.tracks.length; i++) { + let current = this.tracks[i]; + if (current == null) continue; + + let next = current.next; + if (next != null) { + let nextTime = current.lastTime - next.delay; + if (nextTime >= 0) { + let nextDelta = delta * next.timeScale; + next.time = nextTime + nextDelta; // For start event to see correct time. + current.time += delta * current.timeScale; // For end event to see correct time. + this.setCurrent(i, next); + next.time -= nextDelta; // Prevent increasing time twice, below. + current = next; + } + } else if (!current.loop && current.lastTime >= current.endTime) { + // End non-looping animation when it reaches its end time and there is no next entry. + this.clearTrack(i); + continue; + } + + current.time += delta * current.timeScale; + if (current.previous != null) { + let previousDelta = delta * current.previous.timeScale; + current.previous.time += previousDelta; + current.mixTime += previousDelta; + } + } + } + + apply (skeleton: Skeleton) { + let events = this.events; + let listenerCount = this.listeners.length; + + for (let i = 0; i < this.tracks.length; i++) { + let current = this.tracks[i]; + if (current == null) continue; + + events.length = 0; + + let time = current.time; + let lastTime = current.lastTime; + let endTime = current.endTime; + let loop = current.loop; + if (!loop && time > endTime) time = endTime; + + let previous = current.previous; + if (previous == null) + current.animation.mix(skeleton, lastTime, time, loop, events, current.mix); + else { + let previousTime = previous.time; + if (!previous.loop && previousTime > previous.endTime) previousTime = previous.endTime; + previous.animation.apply(skeleton, previousTime, previousTime, previous.loop, null); + + let alpha = current.mixTime / current.mixDuration * current.mix; + if (alpha >= 1) { + alpha = 1; + current.previous = null; + } + current.animation.mix(skeleton, lastTime, time, loop, events, alpha); + } + + for (let ii = 0, nn = events.length; ii < nn; ii++) { + let event = events[ii]; + if (current.listener != null) current.listener.event(i, event); + for (let iii = 0; iii < listenerCount; iii++) + this.listeners[iii].event(i, event); + } + + // Check if completed the animation or a loop iteration. + if (loop ? (lastTime % endTime > time % endTime) : (lastTime < endTime && time >= endTime)) { + let count = MathUtils.toInt(time / endTime); + if (current.listener != null) current.listener.complete(i, count); + for (let ii = 0, nn = this.listeners.length; ii < nn; ii++) + this.listeners[ii].complete(i, count); + } + + current.lastTime = current.time; + } + } + + clearTracks () { + for (let i = 0, n = this.tracks.length; i < n; i++) + this.clearTrack(i); + this.tracks.length = 0; + } + + clearTrack (trackIndex: number) { + if (trackIndex >= this.tracks.length) return; + let current = this.tracks[trackIndex]; + if (current == null) return; + + if (current.listener != null) current.listener.end(trackIndex); + for (let i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(trackIndex); + + this.tracks[trackIndex] = null; + + this.freeAll(current); + } + + freeAll (entry: TrackEntry) { + while (entry != null) { + let next = entry.next; + entry = next; + } + } + + expandToIndex (index: number) { + if (index < this.tracks.length) return this.tracks[index]; + Utils.setArraySize(this.tracks, index - this.tracks.length + 1, null); + this.tracks.length = index + 1; + return null; + } + + setCurrent (index: number, entry: TrackEntry) { + let current = this.expandToIndex(index); + if (current != null) { + let previous = current.previous; + current.previous = null; + + if (current.listener != null) current.listener.end(index); + for (let i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].end(index); + + entry.mixDuration = this.data.getMix(current.animation, entry.animation); + if (entry.mixDuration > 0) { + entry.mixTime = 0; + // If a mix is in progress, mix from the closest animation. + if (previous != null && current.mixTime / current.mixDuration < 0.5) { + entry.previous = previous; + previous = current; + } else + entry.previous = current; + } + } + + this.tracks[index] = entry; + + if (entry.listener != null) entry.listener.start(index); + for (let i = 0, n = this.listeners.length; i < n; i++) + this.listeners[i].start(index); + } + + /** @see #setAnimation(int, Animation, boolean) */ + setAnimation (trackIndex: number, animationName: string, loop: boolean) { + let animation = this.data.skeletonData.findAnimation(animationName); + if (animation == null) throw new Error("Animation not found: " + animationName); + return this.setAnimationWith(trackIndex, animation, loop); + } + + /** Set the current animation. Any queued animations are cleared. */ + setAnimationWith (trackIndex: number, animation: Animation, loop: boolean) { + let current = this.expandToIndex(trackIndex); + if (current != null) this.freeAll(current.next); + + let entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + this.setCurrent(trackIndex, entry); + return entry; + } + + /** {@link #addAnimation(int, Animation, boolean, float)} */ + addAnimation (trackIndex: number, animationName: string, loop: boolean, delay: number) { + let animation = this.data.skeletonData.findAnimation(animationName); + if (animation == null) throw new Error("Animation not found: " + animationName); + return this.addAnimationWith(trackIndex, animation, loop, delay); + } + + /** Adds an animation to be played delay seconds after the current or last queued animation. + * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ + addAnimationWith (trackIndex: number, animation: Animation, loop: boolean, delay: number) { + let entry = new TrackEntry(); + entry.animation = animation; + entry.loop = loop; + entry.endTime = animation.duration; + + let last = this.expandToIndex(trackIndex); + if (last != null) { + while (last.next != null) + last = last.next; + last.next = entry; + } else + this.tracks[trackIndex] = entry; + + if (delay <= 0) { + if (last != null) + delay += last.endTime - this.data.getMix(last.animation, animation); + else + delay = 0; + } + entry.delay = delay; + + return entry; + } + + /** @return May be null. */ + getCurrent (trackIndex: number) { + if (trackIndex >= this.tracks.length) return null; + return this.tracks[trackIndex]; + } + + /** Adds a listener to receive events for all animations. */ + addListener (listener: AnimationStateListener) { + if (listener == null) throw new Error("listener cannot be null."); + this.listeners.push(listener); + } + + /** Removes the listener added with {@link #addListener(AnimationStateListener)}. */ + removeListener (listener: AnimationStateListener) { + let index = this.listeners.indexOf(listener); + if (index >= 0) this.listeners.splice(index, 1); + } + + clearListeners () { + this.listeners.length = 0; + } + } + + export class TrackEntry { + next: TrackEntry; previous: TrackEntry; + animation: Animation; + loop = false; + delay = 0; time = 0; lastTime = -1; endTime = 0; timeScale = 1; + mixTime = 0; mixDuration = 0; + listener: AnimationStateListener; + mix = 1; + + reset () { + this.next = null; + this.previous = null; + this.animation = null; + this.listener = null; + this.timeScale = 1; + this.lastTime = -1; // Trigger events on frame zero. + this.time = 0; + } + + /** Returns true if the current time is greater than the end time, regardless of looping. */ + isComplete () : boolean { + return this.time >= this.endTime; + } + } + + export abstract class AnimationStateAdapter implements AnimationStateListener { + event (trackIndex: number, event: Event) { + } + + complete (trackIndex: number, loopCount: number) { + } + + start (trackIndex: number) { + } + + end (trackIndex: number) { + } + } + + export interface AnimationStateListener { + /** Invoked when the current animation triggers an event. */ + event (trackIndex: number, event: Event): void; + + /** Invoked when the current animation has completed. + * @param loopCount The number of times the animation reached the end. */ + complete (trackIndex: number, loopCount: number): void; + + /** Invoked just after the current animation is set. */ + start (trackIndex: number): void; + + /** Invoked just before the current animation is replaced. */ + end (trackIndex: number): void; + } +} diff --git a/spine-ts/core/src/AnimationStateData.ts b/spine-ts/core/src/AnimationStateData.ts new file mode 100644 index 000000000..632d59b82 --- /dev/null +++ b/spine-ts/core/src/AnimationStateData.ts @@ -0,0 +1,64 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class AnimationStateData { + skeletonData: SkeletonData; + animationToMixTime: Map = { }; + defaultMix = 0; + + constructor (skeletonData: SkeletonData) { + if (skeletonData == null) throw new Error("skeletonData cannot be null."); + this.skeletonData = skeletonData; + } + + setMix (fromName: string, toName: string, duration: number) { + let from = this.skeletonData.findAnimation(fromName); + if (from == null) throw new Error("Animation not found: " + fromName); + let to = this.skeletonData.findAnimation(toName); + if (to == null) throw new Error("Animation not found: " + toName); + this.setMixWith(from, to, duration); + } + + setMixWith (from: Animation, to: Animation, duration: number) { + if (from == null) throw new Error("from cannot be null."); + if (to == null) throw new Error("to cannot be null."); + let key = from.name + to.name; + this.animationToMixTime[key] = duration; + } + + getMix (from: Animation, to: Animation) { + let key = from.name + to.name; + let value = this.animationToMixTime[key]; + return value === undefined ? this.defaultMix : value; + } + } +} diff --git a/spine-ts/core/src/BlendMode.ts b/spine-ts/core/src/BlendMode.ts new file mode 100644 index 000000000..a1ce7ae92 --- /dev/null +++ b/spine-ts/core/src/BlendMode.ts @@ -0,0 +1,39 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export enum BlendMode { + Normal, + Additive, + Multiply, + Screen + } +} diff --git a/spine-ts/core/src/Bone.ts b/spine-ts/core/src/Bone.ts new file mode 100644 index 000000000..1b935a9b7 --- /dev/null +++ b/spine-ts/core/src/Bone.ts @@ -0,0 +1,293 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class Bone implements Updatable { + data: BoneData; + skeleton: Skeleton; + parent: Bone; + children = new Array(); + x = 0; y = 0; rotation = 0; scaleX = 0; scaleY = 0; shearX = 0; shearY = 0; + appliedRotation = 0; + + a = 0; b = 0; worldX = 0; + c = 0; d = 0; worldY = 0; + worldSignX = 0; worldSignY = 0; + + sorted = false; + + /** @param parent May be null. */ + constructor (data: BoneData, skeleton: Skeleton, parent: Bone) { + 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(); + } + + /** Same as {@link #updateWorldTransform()}. This method exists for Bone to implement {@link Updatable}. */ + update () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + } + + /** Computes the world transform using the parent bone and this bone's local transform. */ + updateWorldTransform () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + } + + /** Computes the world transform using the parent bone and the specified local transform. */ + updateWorldTransformWith (x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number) { + this.appliedRotation = rotation; + + let rotationY = rotation + 90 + shearY; + let la = MathUtils.cosDeg(rotation + shearX) * scaleX, lb = MathUtils.cosDeg(rotationY) * scaleY; + let lc = MathUtils.sinDeg(rotation + shearX) * scaleX, ld = MathUtils.sinDeg(rotationY) * scaleY; + + let parent = this.parent; + if (parent == null) { // Root bone. + let skeleton = this.skeleton; + if (skeleton.flipX) { + x = -x; + la = -la; + lb = -lb; + } + if (skeleton.flipY) { + y = -y; + lc = -lc; + ld = -ld; + } + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + this.worldX = x; + this.worldY = y; + this.worldSignX = MathUtils.signum(scaleX); + this.worldSignY = MathUtils.signum(scaleY); + return; + } + + let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + this.worldX = pa * x + pb * y + parent.worldX; + this.worldY = pc * x + pd * y + parent.worldY; + this.worldSignX = parent.worldSignX * MathUtils.signum(scaleX); + this.worldSignY = parent.worldSignY * MathUtils.signum(scaleY); + + if (this.data.inheritRotation && this.data.inheritScale) { + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } else { + if (this.data.inheritRotation) { // No scale inheritance. + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + let cos = MathUtils.cosDeg(parent.appliedRotation), sin = MathUtils.sinDeg(parent.appliedRotation); + let temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + + if (!parent.data.inheritRotation) break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } else if (this.data.inheritScale) { // No rotation inheritance. + pa = 1; + pb = 0; + pc = 0; + pd = 1; + do { + let cos = MathUtils.cosDeg(parent.appliedRotation), sin = MathUtils.sinDeg(parent.appliedRotation); + let psx = parent.scaleX, psy = parent.scaleY; + let za = cos * psx, zb = sin * psy, zc = sin * psx, zd = cos * psy; + let temp = pa * za + pb * zc; + pb = pb * zd - pa * zb; + pa = temp; + temp = pc * za + pd * zc; + pd = pd * zd - pc * zb; + pc = temp; + + if (psx >= 0) sin = -sin; + temp = pa * cos + pb * sin; + pb = pb * cos - pa * sin; + pa = temp; + temp = pc * cos + pd * sin; + pd = pd * cos - pc * sin; + pc = temp; + + if (!parent.data.inheritScale) break; + parent = parent.parent; + } while (parent != null); + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + } else { + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + } + if (this.skeleton.flipX) { + this.a = -this.a; + this.b = -this.b; + } + if (this.skeleton.flipY) { + this.c = -this.c; + this.d = -this.d; + } + } + } + + setToSetupPose () { + let 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; + } + + getWorldRotationX () { + return Math.atan2(this.c, this.a) * MathUtils.radDeg; + } + + getWorldRotationY () { + return Math.atan2(this.d, this.b) * MathUtils.radDeg; + } + + getWorldScaleX () { + return Math.sqrt(this.a * this.a + this.b * this.b) * this.worldSignX; + } + + getWorldScaleY () { + return Math.sqrt(this.c * this.c + this.d * this.d) * this.worldSignY; + } + + worldToLocalRotationX () { + let parent = this.parent; + if (parent == null) return this.rotation; + let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, a = this.a, c = this.c; + return Math.atan2(pa * c - pc * a, pd * a - pb * c) * MathUtils.radDeg; + } + + worldToLocalRotationY () { + let parent = this.parent; + if (parent == null) return this.rotation; + let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d, b = this.b, d = this.d; + return Math.atan2(pa * d - pc * b, pd * b - pb * d) * MathUtils.radDeg; + } + + rotateWorld (degrees: number) { + let a = this.a, b = this.b, c = this.c, d = this.d; + let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees); + this.a = cos * a - sin * c; + this.b = cos * b - sin * d; + this.c = sin * a + cos * c; + this.d = sin * b + cos * d; + } + + /** Computes the local transform from the world transform. This can be useful to perform processing on the local transform + * after the world transform has been modified directly (eg, by a constraint). + *

+ * Some redundant information is lost by the world transform, such as -1,-1 scale versus 180 rotation. The computed local + * transform values may differ from the original values but are functionally the same. */ + updateLocalTransform () { + let parent = this.parent; + if (parent == null) { + this.x = this.worldX; + this.y = this.worldY; + this.rotation = Math.atan2(this.c, this.a) * MathUtils.radDeg; + this.scaleX = Math.sqrt(this.a * this.a + this.c * this.c); + this.scaleY = Math.sqrt(this.b * this.b + this.d * this.d); + let det = this.a * this.d - this.b * this.c; + this.shearX = 0; + this.shearY = Math.atan2(this.a * this.b + this.c * this.d, det) * MathUtils.radDeg; + return; + } + let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + let pid = 1 / (pa * pd - pb * pc); + let dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY; + this.x = (dx * pd * pid - dy * pb * pid); + this.y = (dy * pa * pid - dx * pc * pid); + let ia = pid * pd; + let id = pid * pa; + let ib = pid * pb; + let ic = pid * pc; + let ra = ia * this.a - ib * this.c; + let rb = ia * this.b - ib * this.d; + let rc = id * this.c - ic * this.a; + let rd = id * this.d - ic * this.b; + this.shearX = 0; + this.scaleX = Math.sqrt(ra * ra + rc * rc); + if (this.scaleX > 0.0001) { + let det = ra * rd - rb * rc; + this.scaleY = det / this.scaleX; + this.shearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg; + this.rotation = Math.atan2(rc, ra) * MathUtils.radDeg; + } else { + this.scaleX = 0; + this.scaleY = Math.sqrt(rb * rb + rd * rd); + this.shearY = 0; + this.rotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg; + } + this.appliedRotation = this.rotation; + } + + worldToLocal (world: Vector2) { + let a = this.a, b = this.b, c = this.c, d = this.d; + let invDet = 1 / (a * d - b * c); + let x = world.x - this.worldX, y = world.y - this.worldY; + world.x = (x * d * invDet - y * b * invDet); + world.y = (y * a * invDet - x * c * invDet); + return world; + } + + localToWorld (local: Vector2) { + let x = local.x, y = local.y; + local.x = x * this.a + y * this.b + this.worldX; + local.y = x * this.c + y * this.d + this.worldY; + return local; + } + } +} diff --git a/spine-ts/core/src/BoneData.ts b/spine-ts/core/src/BoneData.ts new file mode 100644 index 000000000..84a9d9483 --- /dev/null +++ b/spine-ts/core/src/BoneData.ts @@ -0,0 +1,49 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class BoneData { + index: number; + name: string; + parent: BoneData; + length: number; + x = 0; y = 0; rotation = 0; scaleX = 1; scaleY = 1; shearX = 0; shearY = 0; + inheritRotation = true; inheritScale = true; + + constructor (index: number, name: string, parent: BoneData) { + 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; + } + } +} diff --git a/spine-ts/core/src/Event.ts b/spine-ts/core/src/Event.ts new file mode 100644 index 000000000..445e03989 --- /dev/null +++ b/spine-ts/core/src/Event.ts @@ -0,0 +1,46 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class Event { + data: EventData; + intValue: number; + floatValue: number; + stringValue: string; + time: number; + + constructor (time: number, data: EventData) { + if (data == null) throw new Error("data cannot be null."); + this.time = time; + this.data = data; + } + } +} diff --git a/spine-ts/core/src/EventData.ts b/spine-ts/core/src/EventData.ts new file mode 100644 index 000000000..fd8cbcc5d --- /dev/null +++ b/spine-ts/core/src/EventData.ts @@ -0,0 +1,43 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class EventData { + name: string; + intValue: number; + floatValue: number; + stringValue: string; + + constructor (name: string) { + this.name = name; + } + } +} diff --git a/spine-ts/core/src/IkConstraint.ts b/spine-ts/core/src/IkConstraint.ts new file mode 100644 index 000000000..3c5a9fa8d --- /dev/null +++ b/spine-ts/core/src/IkConstraint.ts @@ -0,0 +1,223 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class IkConstraint implements Updatable { + data: IkConstraintData; + bones: Array; + target: Bone; + mix = 1; + bendDirection = 0; + + level = 0; + + constructor (data: IkConstraintData, skeleton: Skeleton) { + 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.bendDirection = data.bendDirection; + + this.bones = new Array(); + for (let i = 0; i < data.bones.length; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findBone(data.target.name); + } + + apply () { + this.update(); + } + + update () { + let target = this.target; + let bones = this.bones; + switch (bones.length) { + case 1: + this.apply1(bones[0], target.worldX, target.worldY, this.mix); + break; + case 2: + this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix); + break; + } + } + + /** Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified in the world + * coordinate system. */ + apply1 (bone: Bone, targetX: number, targetY: number, alpha: number) { + let pp = bone.parent; + let id = 1 / (pp.a * pp.d - pp.b * pp.c); + let x = targetX - pp.worldX, y = targetY - pp.worldY; + let tx = (x * pp.d - y * pp.b) * id - bone.x, ty = (y * pp.a - x * pp.c) * id - bone.y; + let rotationIK = Math.atan2(ty, tx) * MathUtils.radDeg - bone.shearX - bone.rotation; + if (bone.scaleX < 0) rotationIK += 180; + if (rotationIK > 180) + rotationIK -= 360; + else if (rotationIK < -180) rotationIK += 360; + bone.updateWorldTransformWith(bone.x, bone.y, bone.rotation + rotationIK * alpha, bone.scaleX, bone.scaleY, bone.shearX, + bone.shearY); + } + + /** Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as possible. The + * target is specified in the world coordinate system. + * @param child A direct descendant of the parent bone. */ + apply2 (parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, alpha: number) { + if (alpha == 0) { + child.updateWorldTransform(); + return; + } + let px = parent.x, py = parent.y, psx = parent.scaleX, psy = parent.scaleY, csx = child.scaleX; + let 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; + let cx = child.x, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d; + let u = Math.abs(psx - psy) <= 0.0001; + if (!u) { + cy = 0; + cwx = a * cx + parent.worldX; + cwy = c * cx + parent.worldY; + } else { + cy = child.y; + cwx = a * cx + b * cy + parent.worldX; + cwy = c * cx + d * cy + parent.worldY; + } + let pp = parent.parent; + a = pp.a; + b = pp.b; + c = pp.c; + d = pp.d; + let id = 1 / (a * d - b * c), x = targetX - pp.worldX, y = targetY - pp.worldY; + let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py; + x = cwx - pp.worldX; + y = cwy - pp.worldY; + let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py; + let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1 = 0, a2 = 0; + outer: + if (u) { + l2 *= psx; + let cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2); + if (cos < -1) + cos = -1; + else if (cos > 1) cos = 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; + let aa = a * a, bb = b * b, dd = tx * tx + ty * ty, ta = Math.atan2(ty, tx); + c = bb * l1 * l1 + aa * dd - aa * bb; + let c1 = -2 * bb * l1, c2 = bb - aa; + d = c1 * c1 - 4 * c2 * c; + if (d >= 0) { + let q = Math.sqrt(d); + if (c1 < 0) q = -q; + q = -(c1 + q) / 2; + let r0 = q / c2, r1 = c / q; + let 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; + } + } + let minAngle = 0, minDist = Number.MAX_VALUE, minX = 0, minY = 0; + let maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0; + x = l1 + a; + d = x * x; + if (d > maxDist) { + maxAngle = 0; + maxDist = d; + maxX = x; + } + x = l1 - a; + d = x * x; + if (d < minDist) { + minAngle = MathUtils.PI; + minDist = d; + minX = x; + } + let angle = Math.acos(-a * l1 / (aa - bb)); + x = a * Math.cos(angle) + l1; + y = b * Math.sin(angle); + d = x * x + y * y; + if (d < minDist) { + minAngle = angle; + minDist = d; + minX = x; + minY = y; + } + if (d > maxDist) { + maxAngle = angle; + 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; + } + } + let os = Math.atan2(cy, cx) * s2; + let rotation = parent.rotation; + a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation; + if (a1 > 180) + a1 -= 360; + else if (a1 < -180) a1 += 360; + parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.scaleX, parent.scaleY, 0, 0); + rotation = child.rotation; + a2 = ((a2 + os) * MathUtils.radDeg - child.shearX) * s2 + os2 - rotation; + if (a2 > 180) + a2 -= 360; + else if (a2 < -180) a2 += 360; + child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.scaleX, child.scaleY, child.shearX, child.shearY); + } + } +} diff --git a/spine-ts/core/src/IkConstraintData.ts b/spine-ts/core/src/IkConstraintData.ts new file mode 100644 index 000000000..de3ea18a9 --- /dev/null +++ b/spine-ts/core/src/IkConstraintData.ts @@ -0,0 +1,44 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class IkConstraintData { + name: string; + bones = new Array(); + target: BoneData; + bendDirection = 1; + mix = 1; + + constructor (name: string) { + this.name = name; + } + } +} diff --git a/spine-ts/core/src/PathConstraint.ts b/spine-ts/core/src/PathConstraint.ts new file mode 100644 index 000000000..632cf60f6 --- /dev/null +++ b/spine-ts/core/src/PathConstraint.ts @@ -0,0 +1,388 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class PathConstraint implements Updatable { + static NONE = -1; static BEFORE = -2; static AFTER = -3; + + data: PathConstraintData; + bones: Array; + target: Slot; + position = 0; spacing = 0; rotateMix = 0; translateMix = 0; + + spaces = new Array(); positions = new Array(); + world = new Array(); curves = new Array(); lengths = new Array(); + segments = new Array(); + + constructor (data: PathConstraintData, skeleton: Skeleton) { + 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 (let 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; + } + + apply () { + this.update(); + } + + update () { + let attachment = this.target.getAttachment(); + if (!(attachment instanceof PathAttachment)) return; + + let rotateMix = this.rotateMix, translateMix = this.translateMix; + let translate = translateMix > 0, rotate = rotateMix > 0; + if (!translate && !rotate) return; + + let data = this.data; + let spacingMode = data.spacingMode; + let lengthSpacing = spacingMode == SpacingMode.Length; + let rotateMode = data.rotateMode; + let tangents = rotateMode == RotateMode.Tangent, scale = rotateMode == RotateMode.ChainScale; + let boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1; + let bones = this.bones; + let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths: Array = null; + let spacing = this.spacing; + if (scale || lengthSpacing) { + if (scale) lengths = Utils.setArraySize(this.lengths, boneCount); + for (let i = 0, n = spacesCount - 1; i < n;) { + let bone = bones[i]; + let length = bone.data.length, x = length * bone.a, y = length * bone.c; + length = Math.sqrt(x * x + y * y); + if (scale) lengths[i] = length; + spaces[++i] = lengthSpacing ? Math.max(0, length + spacing) : spacing; + } + } else { + for (let i = 1; i < spacesCount; i++) + spaces[i] = spacing; + } + + let positions = this.computeWorldPositions(attachment, spacesCount, tangents, + data.positionMode == PositionMode.Percent, spacingMode == SpacingMode.Percent); + let skeleton = this.target.bone.skeleton; + let skeletonX = skeleton.x, skeletonY = skeleton.y; + let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; + let tip = rotateMode == RotateMode.Chain && offsetRotation == 0; + for (let i = 0, p = 3; i < boneCount; i++, p += 3) { + let bone = bones[i]; + bone.worldX += (boneX - skeletonX - bone.worldX) * translateMix; + bone.worldY += (boneY - skeletonY - bone.worldY) * translateMix; + let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY; + if (scale) { + let length = lengths[i]; + if (length != 0) { + let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * rotateMix + 1; + bone.a *= s; + bone.c *= s; + } + } + boneX = x; + boneY = y; + if (rotate) { + let a = bone.a, b = bone.b, c = bone.c, d = bone.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) - offsetRotation * MathUtils.degRad; + if (tip) { + cos = Math.cos(r); + sin = Math.sin(r); + let length = bone.data.length; + boneX += (length * (cos * a - sin * c) - dx) * rotateMix; + boneY += (length * (sin * a + cos * c) - dy) * rotateMix; + } + if (r > MathUtils.PI) + r -= MathUtils.PI2; + else if (r < -MathUtils.PI) // + r += MathUtils.PI2; + r *= rotateMix; + cos = Math.cos(r); + sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + } + } + + computeWorldPositions (path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean, + percentSpacing: boolean) { + let target = this.target; + let position = this.position; + let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world: Array = null; + let closed = path.closed; + let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE; + + if (!path.constantSpeed) { + let lengths = path.lengths; + curveCount -= closed ? 1 : 2; + let pathLength = lengths[curveCount]; + if (percentPosition) position *= pathLength; + if (percentSpacing) { + for (let i = 0; i < spacesCount; i++) + spaces[i] *= pathLength; + } + world = Utils.setArraySize(this.world, 8); + for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) { + let space = spaces[i]; + position += space; + let p = position; + + if (closed) { + p %= pathLength; + if (p < 0) p += pathLength; + curve = 0; + } else if (p < 0) { + if (prevCurve != PathConstraint.BEFORE) { + prevCurve = PathConstraint.BEFORE; + path.computeWorldVerticesWith(target, 2, 4, world, 0); + } + this.addBeforePosition(p, world, 0, out, o); + continue; + } else if (p > pathLength) { + if (prevCurve != PathConstraint.AFTER) { + prevCurve = PathConstraint.AFTER; + path.computeWorldVerticesWith(target, verticesLength - 6, 4, world, 0); + } + this.addAfterPosition(p - pathLength, world, 0, out, o); + continue; + } + + // Determine curve containing position. + for (;; curve++) { + let length = lengths[curve]; + if (p > length) continue; + if (curve == 0) + p /= length; + else { + let prev = lengths[curve - 1]; + p = (p - prev) / (length - prev); + } + break; + } + if (curve != prevCurve) { + prevCurve = curve; + if (closed && curve == curveCount) { + path.computeWorldVerticesWith(target, verticesLength - 4, 4, world, 0); + path.computeWorldVerticesWith(target, 0, 4, world, 4); + } else + path.computeWorldVerticesWith(target, curve * 6 + 2, 8, world, 0); + } + 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; + } + + // World vertices. + if (closed) { + verticesLength += 2; + world = Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength - 4, world, 0); + path.computeWorldVerticesWith(target, 0, 2, world, verticesLength - 4); + world[verticesLength - 2] = world[0]; + world[verticesLength - 1] = world[1]; + } else { + curveCount--; + verticesLength -= 4; + world = Utils.setArraySize(this.world, verticesLength); + path.computeWorldVerticesWith(target, 2, verticesLength, world, 0); + } + + // Curve lengths. + let curves = Utils.setArraySize(this.curves, curveCount); + let pathLength = 0; + let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0; + let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0; + for (let 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 (let i = 0; i < spacesCount; i++) + spaces[i] *= pathLength; + } + + let segments = this.segments; + let curveLength = 0; + for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) { + let space = spaces[i]; + position += space; + let 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; + } + + // Determine curve containing position. + for (;; curve++) { + let length = curves[curve]; + if (p > length) continue; + if (curve == 0) + p /= length; + else { + let prev = curves[curve - 1]; + p = (p - prev) / (length - prev); + } + break; + } + + // Curve segment lengths. + if (curve != prevCurve) { + prevCurve = curve; + let 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; + } + + // Weight by segment length. + p *= curveLength; + for (;; segment++) { + let length = segments[segment]; + if (p > length) continue; + if (segment == 0) + p /= length; + else { + let prev = segments[segment - 1]; + p = segment + (p - prev) / (length - prev); + } + break; + } + this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0)); + } + return out; + } + + addBeforePosition (p: number, temp: Array, i: number, out: Array, o: number) { + let 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; + } + + addAfterPosition (p: number, temp: Array, i: number, out: Array, o: number) { + let 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; + } + + 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) { + if (p == 0) p = 0.0001; + let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u; + let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p; + let 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)); + } + } +} diff --git a/spine-ts/core/src/PathConstraintData.ts b/spine-ts/core/src/PathConstraintData.ts new file mode 100644 index 000000000..77ba38bbd --- /dev/null +++ b/spine-ts/core/src/PathConstraintData.ts @@ -0,0 +1,59 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class PathConstraintData { + name: string; + bones = new Array(); + target: SlotData; + positionMode: PositionMode; + spacingMode: SpacingMode; + rotateMode: RotateMode; + offsetRotation: number; + position: number; spacing: number; rotateMix: number; translateMix: number; + + constructor (name: string) { + this.name = name; + } + } + + export enum PositionMode { + Fixed, Percent + } + + export enum SpacingMode { + Length, Fixed, Percent + } + + export enum RotateMode { + Tangent, Chain, ChainScale + } +} diff --git a/spine-ts/core/src/Skeleton.ts b/spine-ts/core/src/Skeleton.ts new file mode 100644 index 000000000..1d4f65a4e --- /dev/null +++ b/spine-ts/core/src/Skeleton.ts @@ -0,0 +1,469 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class Skeleton { + data: SkeletonData; + bones: Array; + slots: Array; + drawOrder: Array; + ikConstraints: Array; ikConstraintsSorted: Array; + transformConstraints: Array; + pathConstraints: Array; + _updateCache = new Array(); + skin: Skin; + color: Color; + time = 0; + flipX = false; flipY = false; + x = 0; y = 0; + + constructor (data: SkeletonData) { + if (data == null) throw new Error("data cannot be null."); + this.data = data; + + this.bones = new Array(); + for (let i = 0; i < data.bones.length; i++) { + let boneData = data.bones[i]; + let bone: Bone; + if (boneData.parent == null) + bone = new Bone(boneData, this, null); + else { + let parent = this.bones[boneData.parent.index]; + bone = new Bone(boneData, this, parent); + parent.children.push(bone); + } + this.bones.push(bone); + } + + this.slots = new Array(); + this.drawOrder = new Array(); + for (let i = 0; i < data.slots.length; i++) { + let slotData = data.slots[i]; + let bone = this.bones[slotData.boneData.index]; + let slot = new Slot(slotData, bone); + this.slots.push(slot); + this.drawOrder.push(slot); + } + + this.ikConstraints = new Array(); + this.ikConstraintsSorted = new Array(); + for (let i = 0; i < data.ikConstraints.length; i++) { + let ikConstraintData = data.ikConstraints[i]; + this.ikConstraints.push(new IkConstraint(ikConstraintData, this)); + } + + this.transformConstraints = new Array(); + for (let i = 0; i < data.transformConstraints.length; i++) { + let transformConstraintData = data.transformConstraints[i]; + this.transformConstraints.push(new TransformConstraint(transformConstraintData, this)); + } + + this.pathConstraints = new Array(); + for (let i = 0; i < data.pathConstraints.length; i++) { + let pathConstraintData = data.pathConstraints[i]; + this.pathConstraints.push(new PathConstraint(pathConstraintData, this)); + } + + this.color = new Color(1, 1, 1, 1); + this.updateCache(); + } + + updateCache () { + let updateCache = this._updateCache; + updateCache.length = 0; + + let bones = this.bones; + for (let i = 0, n = bones.length; i < n; i++) + bones[i].sorted = false; + + // IK first, lowest hierarchy depth first. + let ikConstraints = this.ikConstraintsSorted; + ikConstraints.length = 0; + for (let i = 0; i < this.ikConstraints.length; i++) + ikConstraints.push(this.ikConstraints[i]); + let ikCount = ikConstraints.length; + for (let i = 0, level = 0, n = ikCount; i < n; i++) { + let ik = ikConstraints[i]; + let bone = ik.bones[0].parent; + for (level = 0; bone != null; level++) + bone = bone.parent; + ik.level = level; + } + for (let i = 1, ii = 0; i < ikCount; i++) { + let ik = ikConstraints[i]; + let level = ik.level; + for (ii = i - 1; ii >= 0; ii--) { + let other = ikConstraints[ii]; + if (other.level < level) break; + ikConstraints[ii + 1] = other; + } + ikConstraints[ii + 1] = ik; + } + for (let i = 0, n = ikConstraints.length; i < n; i++) { + let constraint = ikConstraints[i]; + let target = constraint.target; + this.sortBone(target); + + let constrained = constraint.bones; + let parent = constrained[0]; + this.sortBone(parent); + + updateCache.push(constraint); + + this.sortReset(parent.children); + constrained[constrained.length - 1].sorted = true; + } + + let pathConstraints = this.pathConstraints; + for (let i = 0, n = pathConstraints.length; i < n; i++) { + let constraint = pathConstraints[i]; + + let slot = constraint.target; + let slotIndex = slot.data.index; + let 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 (let ii = 0, nn = this.data.skins.length; ii < nn; ii++) + this.sortPathConstraintAttachment(this.data.skins[ii], slotIndex, slotBone); + + let attachment = slot.getAttachment(); + if (attachment instanceof PathAttachment) this.sortPathConstraintAttachmentWith(attachment, slotBone); + + let constrained = constraint.bones; + let boneCount = constrained.length; + for (let ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + + updateCache.push(constraint); + + for (let ii = 0; ii < boneCount; ii++) + this.sortReset(constrained[ii].children); + for (let ii = 0; ii < boneCount; ii++) + constrained[ii].sorted = true; + } + + let transformConstraints = this.transformConstraints; + for (let i = 0, n = transformConstraints.length; i < n; i++) { + let constraint = transformConstraints[i]; + + this.sortBone(constraint.target); + + let constrained = constraint.bones; + let boneCount = constrained.length; + for (let ii = 0; ii < boneCount; ii++) + this.sortBone(constrained[ii]); + + updateCache.push(constraint); + + for (let ii = 0; ii < boneCount; ii++) + this.sortReset(constrained[ii].children); + for (let ii = 0; ii < boneCount; ii++) + constrained[ii].sorted = true; + } + + for (let i = 0, n = bones.length; i < n; i++) + this.sortBone(bones[i]); + } + + sortPathConstraintAttachment (skin: Skin, slotIndex: number, slotBone: Bone) { + let attachments = skin.attachments[slotIndex]; + if (!attachments) return; + for (let key in attachments) { + this.sortPathConstraintAttachmentWith(attachments[key], slotBone); + } + } + + sortPathConstraintAttachmentWith (attachment: Attachment, slotBone: Bone) { + if (!(attachment instanceof PathAttachment)) return; + let pathBones = (attachment).bones; + if (pathBones == null) + this.sortBone(slotBone); + else { + let bones = this.bones; + for (let i = 0; i < pathBones.length; i++) { + let boneIndex = pathBones[i]; + this.sortBone(bones[boneIndex]); + } + } + } + + sortBone (bone: Bone) { + if (bone.sorted) return; + let parent = bone.parent; + if (parent != null) this.sortBone(parent); + bone.sorted = true; + this._updateCache.push(bone); + } + + sortReset (bones: Array) { + for (let i = 0, n = bones.length; i < n; i++) { + let bone = bones[i]; + if (bone.sorted) this.sortReset(bone.children); + bone.sorted = false; + } + } + + /** Updates the world transform for each bone and applies constraints. */ + updateWorldTransform () { + let updateCache = this._updateCache; + for (let i = 0, n = updateCache.length; i < n; i++) + updateCache[i].update(); + } + + /** Sets the bones, constraints, and slots to their setup pose values. */ + setToSetupPose () { + this.setBonesToSetupPose(); + this.setSlotsToSetupPose(); + } + + /** Sets the bones and constraints to their setup pose values. */ + setBonesToSetupPose () { + let bones = this.bones; + for (let i = 0, n = bones.length; i < n; i++) + bones[i].setToSetupPose(); + + let ikConstraints = this.ikConstraints; + for (let i = 0, n = ikConstraints.length; i < n; i++) { + let constraint = ikConstraints[i]; + constraint.bendDirection = constraint.data.bendDirection; + constraint.mix = constraint.data.mix; + } + + let transformConstraints = this.transformConstraints; + for (let i = 0, n = transformConstraints.length; i < n; i++) { + let constraint = transformConstraints[i]; + let data = constraint.data; + constraint.rotateMix = data.rotateMix; + constraint.translateMix = data.translateMix; + constraint.scaleMix = data.scaleMix; + constraint.shearMix = data.shearMix; + } + + let pathConstraints = this.pathConstraints; + for (let i = 0, n = pathConstraints.length; i < n; i++) { + let constraint = pathConstraints[i]; + let data = constraint.data; + constraint.position = data.position; + constraint.spacing = data.spacing; + constraint.rotateMix = data.rotateMix; + constraint.translateMix = data.translateMix; + } + } + + setSlotsToSetupPose () { + let slots = this.slots; + Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length); + for (let i = 0, n = slots.length; i < n; i++) + slots[i].setToSetupPose(); + } + + /** @return May return null. */ + getRootBone () { + if (this.bones.length == 0) return null; + return this.bones[0]; + } + + /** @return May be null. */ + findBone (boneName: string) { + if (boneName == null) throw new Error("boneName cannot be null."); + let bones = this.bones; + for (let i = 0, n = bones.length; i < n; i++) { + let bone = bones[i]; + if (bone.data.name == boneName) return bone; + } + return null; + } + + /** @return -1 if the bone was not found. */ + findBoneIndex (boneName: string) { + if (boneName == null) throw new Error("boneName cannot be null."); + let bones = this.bones; + for (let i = 0, n = bones.length; i < n; i++) + if (bones[i].data.name == boneName) return i; + return -1; + } + + /** @return May be null. */ + findSlot (slotName: string) { + if (slotName == null) throw new Error("slotName cannot be null."); + let slots = this.slots; + for (let i = 0, n = slots.length; i < n; i++) { + let slot = slots[i]; + if (slot.data.name == slotName) return slot; + } + return null; + } + + /** @return -1 if the bone was not found. */ + findSlotIndex (slotName: string) { + if (slotName == null) throw new Error("slotName cannot be null."); + let slots = this.slots; + for (let i = 0, n = slots.length; i < n; i++) + if (slots[i].data.name == slotName) return i; + return -1; + } + + /** Sets a skin by name. + * @see #setSkin(Skin) */ + setSkinByName (skinName: string) { + let skin = this.data.findSkin(skinName); + if (skin == null) throw new Error("Skin not found: " + skinName); + this.setSkin(skin); + } + + /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default skin}. + * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no + * old skin, each slot's setup mode attachment is attached from the new skin. + * @param newSkin May be null. */ + setSkin (newSkin: Skin) { + if (newSkin != null) { + if (this.skin != null) + newSkin.attachAll(this, this.skin); + else { + let slots = this.slots; + for (let i = 0, n = slots.length; i < n; i++) { + let slot = slots[i]; + let name = slot.data.attachmentName; + if (name != null) { + let attachment: Attachment = newSkin.getAttachment(i, name); + if (attachment != null) slot.setAttachment(attachment); + } + } + } + } + this.skin = newSkin; + } + + /** @return May be null. */ + getAttachmentByName (slotName: string, attachmentName: string): Attachment { + return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName); + } + + /** @return May be null. */ + getAttachment (slotIndex: number, attachmentName: string): Attachment { + if (attachmentName == null) throw new Error("attachmentName cannot be null."); + if (this.skin != null) { + let attachment: 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; + } + + /** @param attachmentName May be null. */ + setAttachment (slotName: string, attachmentName: string) { + if (slotName == null) throw new Error("slotName cannot be null."); + let slots = this.slots; + for (let i = 0, n = slots.length; i < n; i++) { + let slot = slots[i]; + if (slot.data.name == slotName) { + let attachment: 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); + } + + /** @return May be null. */ + findIkConstraint (constraintName: string) { + if (constraintName == null) throw new Error("constraintName cannot be null."); + let ikConstraints = this.ikConstraints; + for (let i = 0, n = ikConstraints.length; i < n; i++) { + let ikConstraint = ikConstraints[i]; + if (ikConstraint.data.name == constraintName) return ikConstraint; + } + return null; + } + + /** @return May be null. */ + findTransformConstraint (constraintName: string) { + if (constraintName == null) throw new Error("constraintName cannot be null."); + let transformConstraints = this.transformConstraints; + for (let i = 0, n = transformConstraints.length; i < n; i++) { + let constraint = transformConstraints[i]; + if (constraint.data.name == constraintName) return constraint; + } + return null; + } + + /** @return May be null. */ + findPathConstraint (constraintName: string) { + if (constraintName == null) throw new Error("constraintName cannot be null."); + let pathConstraints = this.pathConstraints; + for (let i = 0, n = pathConstraints.length; i < n; i++) { + let constraint = pathConstraints[i]; + if (constraint.data.name == constraintName) return constraint; + } + return null; + } + + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + * @param offset The distance from the skeleton origin to the bottom left corner of the AABB. + * @param size The width and height of the AABB. */ + getBounds (offset: Vector2, size: Vector2) { + if (offset == null) throw new Error("offset cannot be null."); + if (size == null) throw new Error("size cannot be null."); + let drawOrder = this.drawOrder; + let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY; + for (let i = 0, n = drawOrder.length; i < n; i++) { + let slot = drawOrder[i]; + let vertices: ArrayLike = null; + let attachment = slot.getAttachment(); + if (attachment instanceof RegionAttachment) + vertices = (attachment).updateWorldVertices(slot, false); + else if (attachment instanceof MeshAttachment) // + vertices = (attachment).updateWorldVertices(slot, true); + if (vertices != null) { + for (let ii = 0, nn = vertices.length; ii < nn; ii += 5) { + let 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); + } + + update (delta: number) { + this.time += delta; + } + } +} diff --git a/spine-ts/core/src/SkeletonBounds.ts b/spine-ts/core/src/SkeletonBounds.ts new file mode 100644 index 000000000..c9a4aa909 --- /dev/null +++ b/spine-ts/core/src/SkeletonBounds.ts @@ -0,0 +1,193 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class SkeletonBounds { + minX = 0; minY = 0; maxX = 0; maxY = 0; + boundingBoxes = new Array(); + polygons = new Array>(); + private _polygonPool = new Pool>(() => { + return Utils.newFloatArray(16); + }); + + update (skeleton: Skeleton, updateAabb: boolean) { + if (skeleton == null) throw new Error("skeleton cannot be null."); + let boundingBoxes = this.boundingBoxes; + let polygons = this.polygons; + let polygonPool = this._polygonPool; + let slots = skeleton.slots; + let slotCount = slots.length; + + boundingBoxes.length = 0; + polygonPool.freeAll(polygons); + polygons.length = 0; + + for (let i = 0; i < slotCount; i++) { + let slot = slots[i]; + let attachment = slot.getAttachment(); + if (attachment instanceof BoundingBoxAttachment) { + let boundingBox = attachment as BoundingBoxAttachment; + boundingBoxes.push(boundingBox); + + let polygon = polygonPool.obtain(); + if (polygon.length != boundingBox.worldVerticesLength) { + polygon = Utils.newFloatArray(boundingBox.worldVerticesLength); + } + polygons.push(polygon); + boundingBox.computeWorldVertices(slot, polygon); + } + } + + if (updateAabb) this.aabbCompute(); + } + + aabbCompute () { + let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY; + let polygons = this.polygons; + for (let i = 0, n = polygons.length; i < n; i++) { + let polygon = polygons[i]; + let vertices = polygon; + for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) { + let x = vertices[ii]; + let 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; + } + + /** Returns true if the axis aligned bounding box contains the point. */ + aabbContainsPoint (x: number, y: number) { + return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY; + } + + /** Returns true if the axis aligned bounding box intersects the line segment. */ + aabbIntersectsSegment (x1: number, y1: number, x2: number, y2: number) { + let minX = this.minX; + let minY = this.minY; + let maxX = this.maxX; + let maxY = this.maxY; + if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY)) + return false; + let m = (y2 - y1) / (x2 - x1); + let y = m * (minX - x1) + y1; + if (y > minY && y < maxY) return true; + y = m * (maxX - x1) + y1; + if (y > minY && y < maxY) return true; + let 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; + } + + /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */ + aabbIntersectsSkeleton (bounds: SkeletonBounds) { + return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY; + } + + /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more + * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */ + containsPoint (x: number, y: number): BoundingBoxAttachment { + let polygons = this.polygons; + for (let i = 0, n = polygons.length; i < n; i++) + if (this.containsPointPolygon(polygons[i], x, y)) return this.boundingBoxes[i]; + return null; + } + + /** Returns true if the polygon contains the point. */ + containsPointPolygon (polygon: ArrayLike, x: number, y: number) { + let vertices = polygon; + let nn = polygon.length; + + let prevIndex = nn - 2; + let inside = false; + for (let ii = 0; ii < nn; ii += 2) { + let vertexY = vertices[ii + 1]; + let prevY = vertices[prevIndex + 1]; + if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) { + let vertexX = vertices[ii]; + if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) inside = !inside; + } + prevIndex = ii; + } + return inside; + } + + /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it + * is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns + * true. */ + intersectsSegment (x1: number, y1: number, x2: number, y2: number) { + let polygons = this.polygons; + for (let i = 0, n = polygons.length; i < n; i++) + if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) return this.boundingBoxes[i]; + return null; + } + + /** Returns true if the polygon contains any part of the line segment. */ + intersectsSegmentPolygon (polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number) { + let vertices = polygon; + let nn = polygon.length; + + let width12 = x1 - x2, height12 = y1 - y2; + let det1 = x1 * y2 - y1 * x2; + let x3 = vertices[nn - 2], y3 = vertices[nn - 1]; + for (let ii = 0; ii < nn; ii += 2) { + let x4 = vertices[ii], y4 = vertices[ii + 1]; + let det2 = x3 * y4 - y3 * x4; + let width34 = x3 - x4, height34 = y3 - y4; + let det3 = width12 * height34 - height12 * width34; + let x = (det1 * width34 - width12 * det2) / det3; + if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) { + let 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; + } + + /** Returns the polygon for the specified bounding box, or null. */ + getPolygon (boundingBox: BoundingBoxAttachment) { + if (boundingBox == null) throw new Error("boundingBox cannot be null."); + let index = this.boundingBoxes.indexOf(boundingBox); + return index == -1 ? null : this.polygons[index]; + } + } + +} diff --git a/spine-ts/core/src/SkeletonData.ts b/spine-ts/core/src/SkeletonData.ts new file mode 100644 index 000000000..4eba74c75 --- /dev/null +++ b/spine-ts/core/src/SkeletonData.ts @@ -0,0 +1,151 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class SkeletonData { + name: string; + bones = new Array(); // Ordered parents first. + slots = new Array(); // Setup pose draw order. + skins = new Array(); + defaultSkin: Skin; + events = new Array(); + animations = new Array(); + ikConstraints = new Array(); + transformConstraints = new Array(); + pathConstraints = new Array(); + width: number; height: number; + version: string; hash: string; imagesPath: string; + + findBone (boneName: string) { + if (boneName == null) throw new Error("boneName cannot be null."); + let bones = this.bones; + for (let i = 0, n = bones.length; i < n; i++) { + let bone = bones[i]; + if (bone.name == boneName) return bone; + } + return null; + } + + findBoneIndex (boneName: string) { + if (boneName == null) throw new Error("boneName cannot be null."); + let bones = this.bones; + for (let i = 0, n = bones.length; i < n; i++) + if (bones[i].name == boneName) return i; + return -1; + } + + findSlot (slotName: string) { + if (slotName == null) throw new Error("slotName cannot be null."); + let slots = this.slots; + for (let i = 0, n = slots.length; i < n; i++) { + let slot = slots[i]; + if (slot.name == slotName) return slot; + } + return null; + } + + findSlotIndex (slotName: string) { + if (slotName == null) throw new Error("slotName cannot be null."); + let slots = this.slots; + for (let i = 0, n = slots.length; i < n; i++) + if (slots[i].name == slotName) return i; + return -1; + } + + findSkin (skinName: string) { + if (skinName == null) throw new Error("skinName cannot be null."); + let skins = this.skins; + for (let i = 0, n = skins.length; i < n; i++) { + let skin = skins[i]; + if (skin.name == skinName) return skin; + } + return null; + } + + findEvent (eventDataName: string) { + if (eventDataName == null) throw new Error("eventDataName cannot be null."); + let events = this.events; + for (let i = 0, n = events.length; i < n; i++) { + let event = events[i]; + if (event.name == eventDataName) return event; + } + return null; + } + + findAnimation (animationName: string) { + if (animationName == null) throw new Error("animationName cannot be null."); + let animations = this.animations; + for (let i = 0, n = animations.length; i < n; i++) { + let animation = animations[i]; + if (animation.name == animationName) return animation; + } + return null; + } + + findIkConstraint (constraintName: string) { + if (constraintName == null) throw new Error("constraintName cannot be null."); + let ikConstraints = this.ikConstraints; + for (let i = 0, n = ikConstraints.length; i < n; i++) { + let constraint = ikConstraints[i]; + if (constraint.name == constraintName) return constraint; + } + return null; + } + + findTransformConstraint (constraintName: string) { + if (constraintName == null) throw new Error("constraintName cannot be null."); + let transformConstraints = this.transformConstraints; + for (let i = 0, n = transformConstraints.length; i < n; i++) { + let constraint = transformConstraints[i]; + if (constraint.name == constraintName) return constraint; + } + return null; + } + + findPathConstraint (constraintName: string) { + if (constraintName == null) throw new Error("constraintName cannot be null."); + let pathConstraints = this.pathConstraints; + for (let i = 0, n = pathConstraints.length; i < n; i++) { + let constraint = pathConstraints[i]; + if (constraint.name == constraintName) return constraint; + } + return null; + } + + findPathConstraintIndex (pathConstraintName: string) { + if (pathConstraintName == null) throw new Error("pathConstraintName cannot be null."); + let pathConstraints = this.pathConstraints; + for (let i = 0, n = pathConstraints.length; i < n; i++) + if (pathConstraints[i].name == pathConstraintName) return i; + return -1; + } + } +} diff --git a/spine-ts/core/src/SkeletonJson.ts b/spine-ts/core/src/SkeletonJson.ts new file mode 100644 index 000000000..7d1a52486 --- /dev/null +++ b/spine-ts/core/src/SkeletonJson.ts @@ -0,0 +1,715 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class SkeletonJson { + attachmentLoader: AttachmentLoader; + scale = 1; + private linkedMeshes = new Array(); + + constructor (attachmentLoader: AttachmentLoader) { + this.attachmentLoader = attachmentLoader; + } + + readSkeletonData (json: string): SkeletonData { + let scale = this.scale; + let skeletonData = new SkeletonData(); + let root = JSON.parse(json); + + // Skeleton + let skeletonMap = root.skeleton; + if (skeletonMap != null) { + skeletonData.hash = skeletonMap.hash; + skeletonData.version = skeletonMap.spine; + skeletonData.width = skeletonMap.width; + skeletonData.height = skeletonMap.height; + skeletonData.imagesPath = skeletonMap.images; + } + + // Bones + if (root.bones) { + for (let i = 0; i < root.bones.length; i++) { + let boneMap = root.bones[i]; + + let parent: BoneData = null; + let parentName: string = this.getValue(boneMap, "parent", null); + if (parentName != null) { + parent = skeletonData.findBone(parentName); + if (parent == null) throw new Error("Parent bone not found: " + parentName); + } + let data = new BoneData(skeletonData.bones.length, boneMap.name, parent); + 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.inheritRotation = this.getValue(boneMap, "inheritRotation", true); + data.inheritScale = this.getValue(boneMap, "inheritScale", true); + + skeletonData.bones.push(data); + } + } + + // Slots. + if (root.slots) { + for (let i = 0; i < root.slots.length; i++) { + let slotMap = root.slots[i]; + let slotName: string = slotMap.name; + let boneName: string = slotMap.bone; + let boneData = skeletonData.findBone(boneName); + if (boneData == null) throw new Error("Slot bone not found: " + boneName); + let data = new SlotData(skeletonData.slots.length, slotName, boneData); + + let color: string = slotMap.color ? slotMap.color : null; + if (color != null) data.color.setFromString(color); + + data.attachmentName = this.getValue(slotMap, "attachment", null); + data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal")); + skeletonData.slots.push(data); + } + } + + // IK constraints + if (root.ik) { + for (let i = 0; i < root.ik.length; i++) { + let constraintMap = root.ik[i]; + let data = new IkConstraintData(constraintMap.name); + + for (let j = 0; j < constraintMap.bones.length; j++) { + let boneName = constraintMap.bones[j]; + let bone = skeletonData.findBone(boneName); + if (bone == null) throw new Error("IK bone not found: " + boneName); + data.bones.push(bone); + } + + let targetName: string = constraintMap.target; + data.target = skeletonData.findBone(targetName); + if (data.target == null) throw new Error("IK target bone not found: " + targetName); + + data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1; + data.mix = constraintMap.mix ? constraintMap.mix : 1; + + skeletonData.ikConstraints.push(data); + } + } + + // Transform constraints. + if (root.transform) { + for (let i = 0; i < root.transform.length; i++) { + let constraintMap = root.transform[i]; + let data = new TransformConstraintData(constraintMap.name); + + for (let j = 0; j < constraintMap.bones.length; j++) { + let boneName = constraintMap.bones[j]; + let bone = skeletonData.findBone(boneName); + if (bone == null) throw new Error("Transform constraint bone not found: " + boneName); + data.bones.push(bone); + } + + let targetName: string = constraintMap.target; + data.target = skeletonData.findBone(targetName); + if (data.target == null) throw new Error("Transform constraint target bone not found: " + targetName); + + 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); + } + } + + // Path constraints. + if (root.path) { + for (let i = 0; i < root.path.length; i++) { + let constraintMap = root.path[i]; + let data = new PathConstraintData(constraintMap.name); + + for (let j = 0; j < constraintMap.bones.length; j++) { + let boneName = constraintMap.bones[j]; + let bone = skeletonData.findBone(boneName); + if (bone == null) throw new Error("Transform constraint bone not found: " + boneName); + data.bones.push(bone); + } + + let targetName: string = 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 == PositionMode.Fixed) data.position *= scale; + data.spacing = this.getValue(constraintMap, "spacing", 0); + if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale; + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + + skeletonData.pathConstraints.push(data); + } + } + + // Skins. + if (root.skins) { + for (let skinName in root.skins) { + let skinMap = root.skins[skinName] + let skin = new Skin(skinName); + for (let slotName in skinMap) { + let slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) throw new Error("Slot not found: " + slotName); + let slotMap = skinMap[slotName]; + for (let entryName in slotMap) { + let attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName); + if (attachment != null) skin.addAttachment(slotIndex, entryName, attachment); + } + } + skeletonData.skins.push(skin); + if (skin.name == "default") skeletonData.defaultSkin = skin; + } + } + + // Linked meshes. + for (let i = 0, n = this.linkedMeshes.length; i < n; i++) { + let linkedMesh = this.linkedMeshes[i]; + let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin); + if (skin == null) throw new Error("Skin not found: " + linkedMesh.skin); + let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); + if (parent == null) throw new Error("Parent mesh not found: " + linkedMesh.parent); + linkedMesh.mesh.setParentMesh( parent); + linkedMesh.mesh.updateUVs(); + } + this.linkedMeshes.length = 0; + + // Events. + if (root.events) { + for (let eventName in root.events) { + let eventMap = root.events[eventName]; + let data = new EventData(eventName); + data.intValue = this.getValue(eventMap, "int", 0); + data.floatValue = this.getValue(eventMap, "float", 0); + data.stringValue = this.getValue(eventMap, "string", null); + skeletonData.events.push(data); + } + } + + // Animations. + if (root.animations) { + for (let animationName in root.animations) { + let animationMap = root.animations[animationName]; + this.readAnimation(animationMap, animationName, skeletonData); + } + } + + return skeletonData; + } + + readAttachment (map: any, skin: Skin, slotIndex: number, name: string): Attachment { + let scale = this.scale; + name = this.getValue(map, "name", name); + + let type = this.getValue(map, "type", "region"); + + switch (type) { + case "region": { + let path = this.getValue(map, "path", name); + let 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; + + let color: string = this.getValue(map, "color", null); + if (color != null) region.color.setFromString(color); + + region.updateOffset(); + return region; + } + case "boundingbox": { + let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); + if (box == null) return null; + this.readVertices(map, box, map.vertexCount << 1); + return box; + } + case "mesh": + case "linkedmesh": { + let path = this.getValue(map, "path", name); + let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path); + if (mesh == null) return null; + mesh.path = path; + + let color = this.getValue(map, "color", null); + if (color != null) mesh.color.setFromString(color); + + let parent: string = this.getValue(map, "parent", null); + if (parent != null) { + mesh.inheritDeform = this.getValue(map, "deform", true); + this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent)); + return mesh; + } + + let uvs: Array = map.uvs; + this.readVertices(map, mesh, uvs.length); + mesh.triangles = map.triangles; + mesh.regionUVs = uvs; + mesh.updateUVs(); + + mesh.hullLength = this.getValue(map, "hull", 0) * 2; + return mesh; + } + case "path": { + let 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); + + let vertexCount = map.vertexCount; + this.readVertices(map, path, vertexCount << 1); + + let lengths: Array = Utils.newArray(vertexCount / 3, 0); + for (let i = 0; i < map.lengths.length; i++) + lengths[i++] = map.lengths[i] * scale; + path.lengths = lengths; + return path; + } + } + return null; + } + + readVertices (map: any, attachment: VertexAttachment, verticesLength: number) { + let scale = this.scale; + attachment.worldVerticesLength = verticesLength; + let vertices: Array = map.vertices; + if (verticesLength == vertices.length) { + if (scale != 1) { + for (let i = 0, n = vertices.length; i < n; i++) + vertices[i] *= scale; + } + attachment.vertices = Utils.toFloatArray(vertices); + return; + } + let weights = new Array(); + let bones = new Array(); + for (let i = 0, n = vertices.length; i < n;) { + let boneCount = vertices[i++]; + bones.push(boneCount); + for (let 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 = Utils.toFloatArray(weights); + } + + readAnimation (map: any, name: string, skeletonData: SkeletonData) { + let scale = this.scale; + let timelines = new Array(); + let duration = 0; + + // Slot timelines. + if (map.slots) { + for (let slotName in map.slots) { + let slotMap = map.slots[slotName]; + let slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) throw new Error("Slot not found: " + slotName); + for (let timelineName in slotMap) { + let timelineMap = slotMap[timelineName]; + if (timelineName == "color") { + let timeline = new ColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + + let frameIndex = 0; + for (let i = 0; i < timelineMap.length; i++) { + let valueMap = timelineMap[i]; + let color = new Color(); + color.setFromString(valueMap.color); + timeline.setFrame(frameIndex, valueMap.time, 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) * ColorTimeline.ENTRIES]); + + } else if (timelineName = "attachment") { + let timeline = new AttachmentTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + + let frameIndex = 0; + for (let i = 0; i < timelineMap.length; i++) { + let valueMap = timelineMap[i]; + timeline.setFrame(frameIndex++, valueMap.time, valueMap.name); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } else + throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); + } + } + } + + // Bone timelines. + if (map.bones) { + for (let boneName in map.bones) { + let boneMap = map.bones[boneName]; + let boneIndex = skeletonData.findBoneIndex(boneName); + if (boneIndex == -1) throw new Error("Bone not found: " + boneName); + for (let timelineName in boneMap) { + let timelineMap = boneMap[timelineName]; + if (timelineName === "rotate") { + let timeline = new RotateTimeline(timelineMap.length); + timeline.boneIndex = boneIndex; + + let frameIndex = 0; + for (let i = 0; i < timelineMap.length; i++) { + let valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, valueMap.angle); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]); + + } else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") { + let timeline: TranslateTimeline = null; + let timelineScale = 1; + if (timelineName === "scale") + timeline = new ScaleTimeline(timelineMap.length); + else if (timelineName === "shear") + timeline = new ShearTimeline(timelineMap.length); + else { + timeline = new TranslateTimeline(timelineMap.length); + timelineScale = scale; + } + timeline.boneIndex = boneIndex; + + let frameIndex = 0; + for (let i = 0; i < timelineMap.length; i++) { + let valueMap = timelineMap[i]; + let x = this.getValue(valueMap, "x", 0), y = this.getValue(valueMap, "y", 0); + timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]); + + } else + throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); + } + } + } + + // IK constraint timelines. + if (map.ik) { + for (let constraintName in map.ik) { + let constraintMap = map.ik[constraintName]; + let constraint = skeletonData.findIkConstraint(constraintName); + let timeline = new IkConstraintTimeline(constraintMap.length); + timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint); + let frameIndex = 0; + for (let i = 0; i < constraintMap.length; i++) { + let valueMap = constraintMap[i]; + timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "mix", 1), + this.getValue(valueMap, "bendPositive", true) ? 1 : -1); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * IkConstraintTimeline.ENTRIES]); + } + } + + // Transform constraint timelines. + if (map.transform) { + for (let constraintName in map.transform) { + let constraintMap = map.transform[constraintName]; + let constraint = skeletonData.findTransformConstraint(constraintName); + let timeline = new TransformConstraintTimeline(constraintMap.length); + timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint); + let frameIndex = 0; + for (let i = 0; i < constraintMap.length; i++) { + let valueMap = constraintMap[i]; + timeline.setFrame(frameIndex, valueMap.time, 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) * TransformConstraintTimeline.ENTRIES]); + } + } + + // Path constraint timelines. + if (map.paths) { + for (let constraintName in map.paths) { + let constraintMap = map.paths[constraintName]; + let index = skeletonData.findPathConstraintIndex(constraintName); + if (index == -1) throw new Error("Path constraint not found: " + constraintName); + let data = skeletonData.pathConstraints[index]; + for (let timelineName in constraintMap) { + let timelineMap = constraintMap[timelineName]; + if (timelineName === "position" || timelineName === "spacing") { + let timeline: PathConstraintPositionTimeline = null; + let timelineScale = 1; + if (timelineName === "spacing") { + timeline = new PathConstraintSpacingTimeline(timelineMap.length); + if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale; + } else { + timeline = new PathConstraintPositionTimeline(timelineMap.length); + if (data.positionMode == PositionMode.Fixed) timelineScale = scale; + } + timeline.pathConstraintIndex = index; + let frameIndex = 0; + for (let i = 0; i < timelineMap.length; i++) { + let valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, + timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]); + } else if (timelineName === "mix") { + let timeline = new PathConstraintMixTimeline(timelineMap.length); + timeline.pathConstraintIndex = index; + let frameIndex = 0; + for (let i = 0; i < timelineMap.length; i++) { + let valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, 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) * PathConstraintMixTimeline.ENTRIES]); + } + } + } + } + + // Deform timelines. + if (map.deform) { + for (let deformName in map.deform) { + let deformMap = map.deform[deformName]; + let skin = skeletonData.findSkin(deformName); + if (skin == null) throw new Error("Skin not found: " + deformName); + for (let slotName in deformMap) { + let slotMap = deformMap[slotName]; + let slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) throw new Error("Slot not found: " + slotMap.name); + for (let timelineName in slotMap) { + let timelineMap = slotMap[timelineName]; + let attachment = skin.getAttachment(slotIndex, timelineName); + if (attachment == null) throw new Error("Deform attachment not found: " + timelineMap.name); + let weighted = attachment.bones != null; + let vertices = attachment.vertices; + let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length; + + let timeline = new DeformTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + timeline.attachment = attachment; + + let frameIndex = 0; + for (let j = 0; j < timelineMap.length; j++) { + let valueMap = timelineMap[j]; + let deform: ArrayLike; + let verticesValue: Array = this.getValue(valueMap, "vertices", null); + if (verticesValue == null) + deform = weighted ? Utils.newFloatArray(deformLength) : vertices; + else { + deform = Utils.newFloatArray(deformLength); + let start = this.getValue(valueMap, "offset", 0); + Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length); + if (scale != 1) { + for (let i = start, n = i + verticesValue.length; i < n; i++) + deform[i] *= scale; + } + if (!weighted) { + for (let i = 0; i < deformLength; i++) + deform[i] += vertices[i]; + } + } + + timeline.setFrame(frameIndex, valueMap.time, deform); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + } + } + } + + // Draw order timeline. + let drawOrderNode = map.drawOrder; + if (drawOrderNode == null) drawOrderNode = map.draworder; + if (drawOrderNode != null) { + let timeline = new DrawOrderTimeline(drawOrderNode.length); + let slotCount = skeletonData.slots.length; + let frameIndex = 0; + for (let j = 0; j < drawOrderNode.length; j++) { + let drawOrderMap = drawOrderNode[j]; + let drawOrder: Array = null; + let offsets = this.getValue(drawOrderMap, "offsets", null); + if (offsets != null) { + drawOrder = Utils.newArray(slotCount, -1); + let unchanged = Utils.newArray(slotCount - offsets.length, 0); + let originalIndex = 0, unchangedIndex = 0; + for (let i = 0; i < offsets.length; i++) { + let offsetMap = offsets[i]; + let slotIndex = skeletonData.findSlotIndex(offsetMap.slot); + if (slotIndex == -1) throw new Error("Slot not found: " + offsetMap.slot); + // Collect unchanged items. + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + // Set changed items. + drawOrder[originalIndex + offsetMap.offset] = originalIndex++; + } + // Collect remaining unchanged items. + while (originalIndex < slotCount) + unchanged[unchangedIndex++] = originalIndex++; + // Fill in unchanged items. + for (let i = slotCount - 1; i >= 0; i--) + if (drawOrder[i] == -1) drawOrder[i] = unchanged[--unchangedIndex]; + } + timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + + // Event timeline. + if (map.events) { + let timeline = new EventTimeline(map.events.length); + let frameIndex = 0; + for (let i = 0; i < map.events.length; i++) { + let eventMap = map.events[i]; + let eventData = skeletonData.findEvent(eventMap.name); + if (eventData == null) throw new Error("Event not found: " + eventMap.name); + let event = new Event(eventMap.time, eventData); + event.intValue = this.getValue(eventMap, "int", eventData.intValue); + event.floatValue = this.getValue(eventMap, "float", eventData.floatValue); + event.stringValue = this.getValue(eventMap, "string", eventData.stringValue); + timeline.setFrame(frameIndex++, event); + } + 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 Animation(name, timelines, duration)); + } + + readCurve (map: any, timeline: CurveTimeline, frameIndex: number) { + if (!map.curve) return; + if (map.curve === "stepped") + timeline.setStepped(frameIndex); + else if (Object.prototype.toString.call(map.curve) === '[object Array]') { + let curve: Array = map.curve; + timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]); + } + } + + getValue (map: any, prop: string, defaultValue: any) { + return map[prop] !== undefined ? map[prop] : defaultValue; + } + + static blendModeFromString (str: string) { + str = str.toLowerCase(); + if (str == "normal") return BlendMode.Normal; + if (str == "additive") return BlendMode.Additive; + if (str == "multiply") return BlendMode.Multiply; + if (str == "screen") return BlendMode.Screen; + throw new Error(`Unknown blend mode: ${str}`); + } + + static positionModeFromString (str: string) { + str = str.toLowerCase(); + if (str == "fixed") return PositionMode.Fixed; + if (str == "percent") return PositionMode.Percent; + throw new Error(`Unknown position mode: ${str}`); + } + + static spacingModeFromString (str: string) { + str = str.toLowerCase(); + if (str == "length") return SpacingMode.Length; + if (str == "fixed") return SpacingMode.Fixed; + if (str == "percent") return SpacingMode.Percent; + throw new Error(`Unknown position mode: ${str}`); + } + + static rotateModeFromString (str: string) { + str = str.toLowerCase(); + if (str == "tangent") return RotateMode.Tangent; + if (str == "chain") return RotateMode.Chain; + if (str == "chainscale") return RotateMode.ChainScale; + throw new Error(`Unknown rotate mode: ${str}`); + } + } + + class LinkedMesh { + parent: string; skin: string; + slotIndex: number; + mesh: MeshAttachment; + + constructor (mesh: MeshAttachment, skin: string, slotIndex: number, parent: string) { + this.mesh = mesh; + this.skin = skin; + this.slotIndex = slotIndex; + this.parent = parent; + } + } +} diff --git a/spine-ts/core/src/Skin.ts b/spine-ts/core/src/Skin.ts new file mode 100644 index 000000000..0b5fd0708 --- /dev/null +++ b/spine-ts/core/src/Skin.ts @@ -0,0 +1,77 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class Skin { + name: string; + attachments = new Array>(); + + constructor (name: string) { + if (name == null) throw new Error("name cannot be null."); + this.name = name; + } + + addAttachment (slotIndex: number, name: string, attachment: Attachment) { + if (attachment == null) throw new Error("attachment cannot be null."); + let attachments = this.attachments; + if (slotIndex >= attachments.length) attachments.length = slotIndex + 1; + if (!attachments[slotIndex]) attachments[slotIndex] = { }; + attachments[slotIndex][name] = attachment; + } + + /** @return May be null. */ + getAttachment (slotIndex: number, name: string): Attachment { + let dictionary = this.attachments[slotIndex]; + return dictionary ? dictionary[name] : null; + } + + /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ + attachAll (skeleton: Skeleton, oldSkin: Skin) { + let slotIndex = 0; + for (let i = 0; i < skeleton.slots.length; i++) { + let slot = skeleton.slots[i]; + let slotAttachment = slot.getAttachment(); + if (slotAttachment && slotIndex < oldSkin.attachments.length) { + let dictionary = oldSkin.attachments[slotIndex]; + for (let key in dictionary) { + let skinAttachment:Attachment = dictionary[key]; + if (slotAttachment == skinAttachment) { + let attachment = this.getAttachment(slotIndex, name); + if (attachment != null) slot.setAttachment(attachment); + break; + } + } + } + slotIndex++; + } + } + } +} diff --git a/spine-ts/core/src/Slot.ts b/spine-ts/core/src/Slot.ts new file mode 100644 index 000000000..3a761f082 --- /dev/null +++ b/spine-ts/core/src/Slot.ts @@ -0,0 +1,83 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class Slot { + data: SlotData; + bone: Bone; + color: Color; + private attachment: Attachment; + private attachmentTime: number; + attachmentVertices = new Array(); + + constructor (data: SlotData, bone: Bone) { + 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 Color(); + this.setToSetupPose(); + } + + /** @return May be null. */ + getAttachment (): Attachment { + return this.attachment; + } + + /** Sets the attachment and if it changed, resets {@link #getAttachmentTime()} and clears {@link #getAttachmentVertices()}. + * @param attachment May be null. */ + setAttachment (attachment: Attachment) { + if (this.attachment == attachment) return; + this.attachment = attachment; + this.attachmentTime = this.bone.skeleton.time; + this.attachmentVertices.length = 0; + } + + setAttachmentTime (time: number) { + this.attachmentTime = this.bone.skeleton.time - time; + } + + /** Returns the time since the attachment was set. */ + getAttachmentTime (): number { + return this.bone.skeleton.time - this.attachmentTime; + } + + setToSetupPose () { + this.color.setFromColor(this.data.color); + if (this.data.attachmentName == null) + this.attachment = null; + else { + this.attachment = null; + this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName)); + } + } + } +} diff --git a/spine-ts/core/src/SlotData.ts b/spine-ts/core/src/SlotData.ts new file mode 100644 index 000000000..ac14a4b31 --- /dev/null +++ b/spine-ts/core/src/SlotData.ts @@ -0,0 +1,50 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class SlotData { + index: number; + name: string; + boneData: BoneData; + color = new Color(1, 1, 1, 1); + attachmentName: string; + blendMode: BlendMode; + + constructor (index: number, name: string, boneData: BoneData) { + 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; + } + } +} diff --git a/spine-ts/core/src/TransformConstraint.ts b/spine-ts/core/src/TransformConstraint.ts new file mode 100644 index 000000000..dc628ba35 --- /dev/null +++ b/spine-ts/core/src/TransformConstraint.ts @@ -0,0 +1,117 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class TransformConstraint implements Updatable { + data: TransformConstraintData; + bones: Array; + target: Bone; + rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0; + temp = new Vector2(); + + constructor (data: TransformConstraintData, skeleton: Skeleton) { + 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 (let i = 0; i < data.bones.length; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findBone(data.target.name); + } + + apply () { + this.update(); + } + + update () { + let rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + let target = this.target; + let ta = target.a, tb = target.b, tc = target.c, td = target.d; + let bones = this.bones; + for (let i = 0, n = bones.length; i < n; i++) { + let bone = bones[i]; + + if (rotateMix > 0) { + let a = bone.a, b = bone.b, c = bone.c, d = bone.d; + let r = Math.atan2(tc, ta) - Math.atan2(c, a) + this.data.offsetRotation * MathUtils.degRad; + if (r > MathUtils.PI) + r -= MathUtils.PI2; + else if (r < -MathUtils.PI) + r += MathUtils.PI2; + r *= rotateMix; + let cos = Math.cos(r), sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + + if (translateMix > 0) { + let temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + bone.worldX += (temp.x - bone.worldX) * translateMix; + bone.worldY += (temp.y - bone.worldY) * translateMix; + } + + if (scaleMix > 0) { + let bs = Math.sqrt(bone.a * bone.a + bone.c * bone.c); + let ts = Math.sqrt(ta * ta + tc * tc); + let s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleX) * scaleMix) / bs : 0; + bone.a *= s; + bone.c *= s; + bs = Math.sqrt(bone.b * bone.b + bone.d * bone.d); + ts = Math.sqrt(tb * tb + td * td); + s = bs > 0.00001 ? (bs + (ts - bs + this.data.offsetScaleY) * scaleMix) / bs : 0; + bone.b *= s; + bone.d *= s; + } + + if (shearMix > 0) { + let b = bone.b, d = bone.d; + let by = Math.atan2(d, b); + let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a)); + if (r > MathUtils.PI) + r -= MathUtils.PI2; + else if (r < -MathUtils.PI) + r += MathUtils.PI2; + r = by + (r + this.data.offsetShearY * MathUtils.degRad) * shearMix; + let s = Math.sqrt(b * b + d * d); + bone.b = Math.cos(r) * s; + bone.d = Math.sin(r) * s; + } + } + } + } +} diff --git a/spine-ts/core/src/TransformConstraintData.ts b/spine-ts/core/src/TransformConstraintData.ts new file mode 100644 index 000000000..e2144646b --- /dev/null +++ b/spine-ts/core/src/TransformConstraintData.ts @@ -0,0 +1,45 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class TransformConstraintData { + name: string; + bones = new Array(); + target: BoneData; + rotateMix = 0; translateMix = 0; scaleMix = 0; shearMix = 0; + offsetRotation = 0; offsetX = 0; offsetY = 0; offsetScaleX = 0; offsetScaleY = 0; offsetShearY = 0; + + constructor (name: string) { + if (name == null) throw new Error("name cannot be null."); + this.name = name; + } + } +} diff --git a/spine-ts/core/src/Updatable.ts b/spine-ts/core/src/Updatable.ts new file mode 100644 index 000000000..ec2267ebb --- /dev/null +++ b/spine-ts/core/src/Updatable.ts @@ -0,0 +1,36 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export interface Updatable { + update(): void; + } +} diff --git a/spine-ts/core/src/Utils.ts b/spine-ts/core/src/Utils.ts new file mode 100644 index 000000000..0ae496c24 --- /dev/null +++ b/spine-ts/core/src/Utils.ts @@ -0,0 +1,198 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export interface Map { + [key: string]: T; + } + + export interface Disposable { + dispose (): void; + } + + export class Color { + constructor (public r: number = 0, public g: number = 0, public b: number = 0, public a: number = 0) { + } + + set (r: number, g: number, b: number, a: number) { + this.r = r; + this.g = g; + this.b = b; + this.a = a; + this.clamp(); + } + + setFromColor (c: Color) { + this.r = c.r; + this.g = c.g; + this.b = c.b; + this.a = c.a; + } + + setFromString (hex: string) { + 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; + } + + add (r: number, g: number, b: number, a: number) { + this.r += r; + this.g += g; + this.b += b; + this.a += a; + this.clamp(); + } + + clamp () { + 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; + } + } + + export class MathUtils { + static PI = 3.1415927; + static PI2 = MathUtils.PI * 2; + static radiansToDegrees = 180 / MathUtils.PI; + static radDeg = MathUtils.radiansToDegrees; + static degreesToRadians = MathUtils.PI / 180; + static degRad = MathUtils.degreesToRadians; + + static clamp (value: number, min: number, max: number) { + if (value < min) return min; + if (value > max) return max; + return value; + } + + static cosDeg (degrees: number) { + return Math.cos(degrees * MathUtils.degRad); + } + + static sinDeg (degrees: number) { + return Math.sin(degrees * MathUtils.degRad); + } + + static signum (value: number): number { + return value >= 0 ? 1 : -1; + } + + static toInt (x: number) { + return x > 0 ? Math.floor(x) : Math.ceil(x); + } + } + + export class Utils { + static SUPPORTS_TYPED_ARRAYS = typeof(Float32Array) !== "undefined"; + + static arrayCopy (source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number) { + for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) { + dest[j] = source[i]; + } + } + + static setArraySize (array: Array, size: number, value: any = 0): Array { + let oldSize = array.length; + if (oldSize == size) return array; + array.length = size; + if (oldSize < size) { + for (let i = oldSize; i < size; i++) array[i] = value; + } + return array; + } + + static newArray (size: number, defaultValue: T): Array { + let array = new Array(size); + for (let i = 0; i < size; i++) array[i] = defaultValue; + return array; + } + + static newFloatArray (size: number): ArrayLike { + if (Utils.SUPPORTS_TYPED_ARRAYS) { + return new Float32Array(size) + } else { + let array = new Array(size); + for (let i = 0; i < array.length; i++) array[i] = 0; + return array; + } + } + + static toFloatArray (array: Array) { + return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array; + } + } + + export class Pool { + private _items = new Array(16); + private _instantiator: () => T; + + constructor (instantiator: () => T) { + this._instantiator = instantiator; + } + + obtain () { + return this._items.length > 0 ? this._items.pop() : this._instantiator(); + } + + free (item: T) { + this._items.push(item); + } + + freeAll (items: ArrayLike) { + for (let i = 0; i < items.length; i++) this._items[i] = items[i]; + } + + clear () { + this._items.length = 0; + } + } + + export class Vector2 { + constructor (public x = 0, public y = 0) { + } + + set (x: number, y: number): Vector2 { + this.x = x; + this.y = y; + return this; + } + } +} diff --git a/spine-ts/core/src/attachments/Attachment.ts b/spine-ts/core/src/attachments/Attachment.ts new file mode 100644 index 000000000..dfadbaa3c --- /dev/null +++ b/spine-ts/core/src/attachments/Attachment.ts @@ -0,0 +1,124 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export abstract class Attachment { + name: string; + + constructor (name: string) { + if (name == null) throw new Error("name cannot be null."); + this.name = name; + } + } + + export abstract class VertexAttachment extends Attachment { + bones: Array; + vertices: ArrayLike; + worldVerticesLength = 0; + + constructor (name: string) { + super(name); + } + + computeWorldVertices (slot: Slot, worldVertices: ArrayLike) { + this.computeWorldVerticesWith(slot, 0, this.worldVerticesLength, worldVertices, 0); + } + + /** Transforms local vertices to world coordinates. + * @param start The index of the first local vertex value to transform. Each vertex has 2 values, x and y. + * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. + * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param offset The worldVertices index to begin writing values. */ + computeWorldVerticesWith (slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number) { + count += offset; + let skeleton = slot.bone.skeleton; + let x = skeleton.x, y = skeleton.y; + let deformArray = slot.attachmentVertices; + let vertices = this.vertices; + let bones = this.bones; + if (bones == null) { + if (deformArray.length > 0) vertices = deformArray; + let bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + let a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (let v = start, w = offset; w < count; v += 2, w += 2) { + let vx = vertices[v], vy = vertices[v + 1]; + worldVertices[w] = vx * a + vy * b + x; + worldVertices[w + 1] = vx * c + vy * d + y; + } + return; + } + let v = 0, skip = 0; + for (let i = 0; i < start; i += 2) { + let n = bones[v]; + v += n + 1; + skip += n; + } + let skeletonBones = skeleton.bones; + if (deformArray.length == 0) { + for (let w = offset, b = skip * 3; w < count; w += 2) { + let wx = x, wy = y; + let n = bones[v++]; + n += v; + for (; v < n; v++, b += 3) { + let bone = skeletonBones[bones[v]]; + let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } else { + let deform = deformArray; + for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += 2) { + let wx = x, wy = y; + let n = bones[v++]; + n += v; + for (; v < n; v++, b += 3, f += 2) { + let bone = skeletonBones[bones[v]]; + let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + } + + /** Returns true if a deform originally applied to the specified attachment should be applied to this attachment. */ + applyDeform (sourceAttachment: VertexAttachment) { + return this == sourceAttachment; + } + } +} diff --git a/spine-ts/core/src/attachments/AttachmentLoader.ts b/spine-ts/core/src/attachments/AttachmentLoader.ts new file mode 100644 index 000000000..d75dd33ed --- /dev/null +++ b/spine-ts/core/src/attachments/AttachmentLoader.ts @@ -0,0 +1,46 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export interface AttachmentLoader { + /** @return May be null to not load an attachment. */ + newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment; + + /** @return May be null to not load an attachment. */ + newMeshAttachment (skin: Skin, name: string, path: string) : MeshAttachment; + + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment (skin: Skin, name: string) : BoundingBoxAttachment; + + /** @return May be null to not load an attachment */ + newPathAttachment(skin: Skin, name: string): PathAttachment; + } +} diff --git a/spine-ts/core/src/attachments/AttachmentType.ts b/spine-ts/core/src/attachments/AttachmentType.ts new file mode 100644 index 000000000..ea01e62a8 --- /dev/null +++ b/spine-ts/core/src/attachments/AttachmentType.ts @@ -0,0 +1,36 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export enum AttachmentType { + Region, BoundingBox, Mesh, LinkedMesh, Path + } +} diff --git a/spine-ts/core/src/attachments/BoundingBoxAttachment.ts b/spine-ts/core/src/attachments/BoundingBoxAttachment.ts new file mode 100644 index 000000000..a533f8949 --- /dev/null +++ b/spine-ts/core/src/attachments/BoundingBoxAttachment.ts @@ -0,0 +1,38 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class BoundingBoxAttachment extends VertexAttachment { + constructor (name: string) { + super(name); + } + } +} diff --git a/spine-ts/core/src/attachments/MeshAttachment.ts b/spine-ts/core/src/attachments/MeshAttachment.ts new file mode 100644 index 000000000..be18f6a67 --- /dev/null +++ b/spine-ts/core/src/attachments/MeshAttachment.ts @@ -0,0 +1,173 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class MeshAttachment extends VertexAttachment { + region: TextureRegion; + path: string; + regionUVs: ArrayLike; worldVertices: ArrayLike; + triangles: Array; + color = new Color(1, 1, 1, 1); + hullLength: number; + private _parentMesh: MeshAttachment; + inheritDeform = false; + tempColor = new Color(0, 0, 0, 0); + + constructor (name: string) { + super(name); + } + + updateUVs () { + let regionUVs = this.regionUVs; + let verticesLength = regionUVs.length; + let worldVerticesLength = (verticesLength >> 1) * 8; + if (this.worldVertices == null || this.worldVertices.length != worldVerticesLength) + this.worldVertices = Utils.newFloatArray(worldVerticesLength); + + let u = 0, v = 0, width = 0, height = 0; + if (this.region == null) { + u = v = 0; + width = height = 1; + } else { + u = this.region.u; + v = this.region.v; + width = this.region.u2 - u; + height = this.region.v2 - v; + } + if (this.region.rotate) { + for (let i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i + 1] * width; + this.worldVertices[w + 1] = v + height - regionUVs[i] * height; + } + } else { + for (let i = 0, w = 6; i < verticesLength; i += 2, w += 8) { + this.worldVertices[w] = u + regionUVs[i] * width; + this.worldVertices[w + 1] = v + regionUVs[i + 1] * height; + } + } + } + + /** @return The updated world vertices. */ + updateWorldVertices (slot: Slot, premultipliedAlpha: boolean) { + let skeleton = slot.bone.skeleton; + let skeletonColor = skeleton.color, slotColor = slot.color, meshColor = this.color; + let alpha = skeletonColor.a * slotColor.a * meshColor.a; + let multiplier = premultipliedAlpha ? alpha : 1; + let color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * meshColor.r * multiplier, + skeletonColor.g * slotColor.g * meshColor.g * multiplier, + skeletonColor.b * slotColor.b * meshColor.b * multiplier, + alpha); + + let x = skeleton.x, y = skeleton.y; + let deformArray = slot.attachmentVertices; + let vertices = this.vertices, worldVertices = this.worldVertices; + let bones = this.bones; + if (bones == null) { + let verticesLength = vertices.length; + if (deformArray.length > 0) vertices = deformArray; + let bone = slot.bone; + x += bone.worldX; + y += bone.worldY; + let a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (let v = 0, w = 0; v < verticesLength; v += 2, w += 8) { + let vx = vertices[v], vy = vertices[v + 1]; + worldVertices[w] = vx * a + vy * b + x; + worldVertices[w + 1] = vx * c + vy * d + y; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + return worldVertices; + } + let skeletonBones = skeleton.bones; + if (deformArray.length == 0) { + for (let w = 0, v = 0, b = 0, n = bones.length; v < n; w += 8) { + let wx = x, wy = y; + let nn = bones[v++] + v; + for (; v < nn; v++, b += 3) { + let bone = skeletonBones[bones[v]]; + let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } else { + let deform = deformArray; + for (let w = 0, v = 0, b = 0, f = 0, n = bones.length; v < n; w += 8) { + let wx = x, wy = y; + let nn = bones[v++] + v; + for (; v < nn; v++, b += 3, f += 2) { + let bone = skeletonBones[bones[v]]; + let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + worldVertices[w + 2] = color.r; + worldVertices[w + 3] = color.g; + worldVertices[w + 4] = color.b; + worldVertices[w + 5] = color.a; + } + } + return worldVertices; + } + + applyDeform (sourceAttachment: VertexAttachment): boolean { + return this == sourceAttachment || (this.inheritDeform && this._parentMesh == sourceAttachment); + } + + getParentMesh () { + return this._parentMesh; + } + + /** @param parentMesh May be null. */ + setParentMesh (parentMesh: MeshAttachment) { + this._parentMesh = parentMesh; + if (parentMesh != null) { + this.bones = parentMesh.bones; + this.vertices = parentMesh.vertices; + this.regionUVs = parentMesh.regionUVs; + this.triangles = parentMesh.triangles; + this.hullLength = parentMesh.hullLength; + } + } + } + +} diff --git a/spine-ts/core/src/attachments/PathAttachment.ts b/spine-ts/core/src/attachments/PathAttachment.ts new file mode 100644 index 000000000..9f0af2f91 --- /dev/null +++ b/spine-ts/core/src/attachments/PathAttachment.ts @@ -0,0 +1,41 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class PathAttachment extends VertexAttachment { + lengths: Array; + closed = false; constantSpeed = false; + + constructor (name: string) { + super(name); + } + } +} diff --git a/spine-ts/core/src/attachments/RegionAttachment.ts b/spine-ts/core/src/attachments/RegionAttachment.ts new file mode 100644 index 000000000..b1199014e --- /dev/null +++ b/spine-ts/core/src/attachments/RegionAttachment.ts @@ -0,0 +1,206 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class RegionAttachment extends Attachment { + static OX1 = 0; + static OY1 = 1; + static OX2 = 2; + static OY2 = 3; + static OX3 = 4; + static OY3 = 5; + static OX4 = 6; + static OY4 = 7; + + static X1 = 0; + static Y1 = 1; + static C1R = 2; + static C1G = 3; + static C1B = 4; + static C1A = 5; + static U1 = 6; + static V1 = 7; + + static X2 = 8; + static Y2 = 9; + static C2R = 10; + static C2G = 11; + static C2B = 12; + static C2A = 13; + static U2 = 14; + static V2 = 15; + + static X3 = 16; + static Y3 = 17; + static C3R = 18; + static C3G = 19; + static C3B = 20; + static C3A = 21; + static U3 = 22; + static V3 = 23; + + static X4 = 24; + static Y4 = 25; + static C4R = 26; + static C4G = 27; + static C4B = 28; + static C4A = 29; + static U4 = 30; + static V4 = 31; + + x = 0; y = 0; scaleX = 1; scaleY = 1; rotation = 0; width = 0; height = 0; + color = new Color(1, 1, 1, 1); + + path: string; + rendererObject: any; + region: TextureRegion; + + offset = Utils.newFloatArray(8); + vertices = Utils.newFloatArray(8 * 4); + + tempColor = new Color(1, 1, 1, 1); + + constructor (name:string) { + super(name); + } + + setRegion (region: TextureRegion) : void { + let vertices = this.vertices; + if (region.rotate) { + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v2; + vertices[RegionAttachment.U3] = region.u; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v; + vertices[RegionAttachment.U1] = region.u2; + vertices[RegionAttachment.V1] = region.v2; + } else { + vertices[RegionAttachment.U1] = region.u; + vertices[RegionAttachment.V1] = region.v2; + vertices[RegionAttachment.U2] = region.u; + vertices[RegionAttachment.V2] = region.v; + vertices[RegionAttachment.U3] = region.u2; + vertices[RegionAttachment.V3] = region.v; + vertices[RegionAttachment.U4] = region.u2; + vertices[RegionAttachment.V4] = region.v2; + } + } + + updateOffset () : void { + let regionScaleX = this.width / this.region.originalWidth * this.scaleX; + let regionScaleY = this.height / this.region.originalHeight * this.scaleY; + let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX; + let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY; + let localX2 = localX + this.region.width * regionScaleX; + let localY2 = localY + this.region.height * regionScaleY; + let radians = this.rotation * Math.PI / 180; + let cos = Math.cos(radians); + let sin = Math.sin(radians); + let localXCos = localX * cos + this.x; + let localXSin = localX * sin; + let localYCos = localY * cos + this.y; + let localYSin = localY * sin; + let localX2Cos = localX2 * cos + this.x; + let localX2Sin = localX2 * sin; + let localY2Cos = localY2 * cos + this.y; + let localY2Sin = localY2 * sin; + let 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; + } + + updateWorldVertices (slot: Slot, premultipliedAlpha: boolean) { + let skeleton = slot.bone.skeleton; + let skeletonColor = skeleton.color; + let slotColor = slot.color; + let regionColor = this.color; + let alpha = skeletonColor.a * slotColor.a * regionColor.a; + let multiplier = premultipliedAlpha ? alpha : 1; + let color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, + skeletonColor.g * slotColor.g * regionColor.g * multiplier, + skeletonColor.b * slotColor.b * regionColor.b * multiplier, + alpha); + + let vertices = this.vertices; + let offset = this.offset; + let bone = slot.bone; + let x = skeleton.x + bone.worldX, y = skeleton.y + bone.worldY; + let a = bone.a, b = bone.b, c = bone.c, d = bone.d; + let offsetX = 0, offsetY = 0; + + offsetX = offset[RegionAttachment.OX1]; + offsetY = offset[RegionAttachment.OY1]; + vertices[RegionAttachment.X1] = offsetX * a + offsetY * b + x; // br + vertices[RegionAttachment.Y1] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C1R] = color.r; + vertices[RegionAttachment.C1G] = color.g; + vertices[RegionAttachment.C1B] = color.b; + vertices[RegionAttachment.C1A] = color.a; + + offsetX = offset[RegionAttachment.OX2]; + offsetY = offset[RegionAttachment.OY2]; + vertices[RegionAttachment.X2] = offsetX * a + offsetY * b + x; // bl + vertices[RegionAttachment.Y2] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C2R] = color.r; + vertices[RegionAttachment.C2G] = color.g; + vertices[RegionAttachment.C2B] = color.b; + vertices[RegionAttachment.C2A] = color.a; + + offsetX = offset[RegionAttachment.OX3]; + offsetY = offset[RegionAttachment.OY3]; + vertices[RegionAttachment.X3] = offsetX * a + offsetY * b + x; // ul + vertices[RegionAttachment.Y3] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C3R] = color.r; + vertices[RegionAttachment.C3G] = color.g; + vertices[RegionAttachment.C3B] = color.b; + vertices[RegionAttachment.C3A] = color.a; + + offsetX = offset[RegionAttachment.OX4]; + offsetY = offset[RegionAttachment.OY4]; + vertices[RegionAttachment.X4] = offsetX * a + offsetY * b + x; // ur + vertices[RegionAttachment.Y4] = offsetX * c + offsetY * d + y; + vertices[RegionAttachment.C4R] = color.r; + vertices[RegionAttachment.C4G] = color.g; + vertices[RegionAttachment.C4B] = color.b; + vertices[RegionAttachment.C4A] = color.a; + + return vertices; + } + } +} diff --git a/spine-ts/core/src/attachments/TextureRegion.ts b/spine-ts/core/src/attachments/TextureRegion.ts new file mode 100644 index 000000000..519dbdf59 --- /dev/null +++ b/spine-ts/core/src/attachments/TextureRegion.ts @@ -0,0 +1,42 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class TextureRegion { + renderObject: any; + u = 0; v = 0; + u2 = 0; v2 = 0; + width = 0; height = 0; + rotate = false; + offsetX = 0; offsetY = 0; + originalWidth = 0; originalHeight = 0; + } +} diff --git a/spine-ts/tsconfig.core.json b/spine-ts/tsconfig.core.json new file mode 100644 index 000000000..efb8f8c58 --- /dev/null +++ b/spine-ts/tsconfig.core.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "none", + "noImplicitAny": true, + "removeComments": false, + "preserveConstEnums": true, + "outFile": "build/spine-core.js", + "sourceMap": true, + "declaration": true + }, + "include": [ + "core/src/**/*" + ], + "exclude": [ + "webgl/src/*.ts", + "build", + "build/*.d.ts" + ] +} \ No newline at end of file diff --git a/spine-ts/tsconfig.json b/spine-ts/tsconfig.json new file mode 100644 index 000000000..d7c22fd13 --- /dev/null +++ b/spine-ts/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "none", + "noImplicitAny": true, + "removeComments": false, + "preserveConstEnums": true, + "outFile": "build/spine-all.js", + "sourceMap": true, + "declaration": true + }, + "include": [ + "core/src/**/*", + "webgl/src/**/*", + "widget/src/**/*" + ], + "exclude": [ + "build", + "build/*.js", + "build/*.d.ts", + "build/*.js.map" + ] +} \ No newline at end of file diff --git a/spine-ts/tsconfig.webgl.json b/spine-ts/tsconfig.webgl.json new file mode 100644 index 000000000..cb40effe0 --- /dev/null +++ b/spine-ts/tsconfig.webgl.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "none", + "noImplicitAny": true, + "removeComments": false, + "preserveConstEnums": true, + "outFile": "build/spine-webgl.js", + "sourceMap": true, + "declaration": true + }, + "include": [ + "core/src/**/*", + "webgl/src/**/*" + ], + "exclude": [ + "build", + "build/*.d.ts", + "build/*.js", + "build/*.js.map" + ] +} \ No newline at end of file diff --git a/spine-ts/tsconfig.widget.json b/spine-ts/tsconfig.widget.json new file mode 100644 index 000000000..391a247ba --- /dev/null +++ b/spine-ts/tsconfig.widget.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "none", + "noImplicitAny": true, + "removeComments": false, + "preserveConstEnums": true, + "outFile": "build/spine-widget.js", + "sourceMap": true, + "declaration": true + }, + "include": [ + "core/src/**/*", + "webgl/src/**/*", + "widget/src/**/*" + ], + "exclude": [ + "build", + "build/*.d.ts", + "build/*.js", + "build/*.js.map" + ] +} \ No newline at end of file diff --git a/spine-ts/webgl/example/assets/goblins-mesh.atlas b/spine-ts/webgl/example/assets/goblins-mesh.atlas new file mode 100644 index 000000000..d674db469 --- /dev/null +++ b/spine-ts/webgl/example/assets/goblins-mesh.atlas @@ -0,0 +1,293 @@ + +goblins-mesh.png +size: 1024,128 +format: RGBA8888 +filter: Linear,Linear +repeat: none +dagger + rotate: true + xy: 372, 100 + size: 26, 108 + orig: 26, 108 + offset: 0, 0 + index: -1 +goblin/eyes-closed + rotate: false + xy: 2, 7 + size: 34, 12 + orig: 34, 12 + offset: 0, 0 + index: -1 +goblin/head + rotate: false + xy: 107, 36 + size: 103, 66 + orig: 103, 66 + offset: 0, 0 + index: -1 +goblin/left-arm + rotate: false + xy: 901, 56 + size: 37, 35 + orig: 37, 35 + offset: 0, 0 + index: -1 +goblin/left-foot + rotate: false + xy: 929, 95 + size: 65, 31 + orig: 65, 31 + offset: 0, 0 + index: -1 +goblin/left-hand + rotate: false + xy: 452, 2 + size: 36, 41 + orig: 36, 41 + offset: 0, 0 + index: -1 +goblin/left-lower-leg + rotate: true + xy: 713, 93 + size: 33, 70 + orig: 33, 70 + offset: 0, 0 + index: -1 +goblin/left-shoulder + rotate: false + xy: 610, 44 + size: 29, 44 + orig: 29, 44 + offset: 0, 0 + index: -1 +goblin/left-upper-leg + rotate: true + xy: 638, 93 + size: 33, 73 + orig: 33, 73 + offset: 0, 0 + index: -1 +goblin/neck + rotate: false + xy: 490, 2 + size: 36, 41 + orig: 36, 41 + offset: 0, 0 + index: -1 +goblin/pelvis + rotate: false + xy: 482, 45 + size: 62, 43 + orig: 62, 43 + offset: 0, 0 + index: -1 +goblin/right-arm + rotate: true + xy: 690, 2 + size: 23, 50 + orig: 23, 50 + offset: 0, 0 + index: -1 +goblin/right-foot + rotate: false + xy: 771, 58 + size: 63, 33 + orig: 63, 33 + offset: 0, 0 + index: -1 +goblin/right-hand + rotate: false + xy: 940, 56 + size: 36, 37 + orig: 36, 37 + offset: 0, 0 + index: -1 +goblin/right-lower-leg + rotate: true + xy: 482, 90 + size: 36, 76 + orig: 36, 76 + offset: 0, 0 + index: -1 +goblin/right-shoulder + rotate: true + xy: 602, 3 + size: 39, 45 + orig: 39, 45 + offset: 0, 0 + index: -1 +goblin/right-upper-leg + rotate: true + xy: 641, 57 + size: 34, 63 + orig: 34, 63 + offset: 0, 0 + index: -1 +goblin/torso + rotate: true + xy: 212, 34 + size: 68, 96 + orig: 68, 96 + offset: 0, 0 + index: -1 +goblin/undie-straps + rotate: false + xy: 380, 5 + size: 55, 19 + orig: 55, 19 + offset: 0, 0 + index: -1 +goblin/undies + rotate: false + xy: 174, 5 + size: 36, 29 + orig: 36, 29 + offset: 0, 0 + index: -1 +goblingirl/eyes-closed + rotate: false + xy: 269, 11 + size: 37, 21 + orig: 37, 21 + offset: 0, 0 + index: -1 +goblingirl/head + rotate: false + xy: 2, 21 + size: 103, 81 + orig: 103, 81 + offset: 0, 0 + index: -1 +goblingirl/left-arm + rotate: true + xy: 978, 56 + size: 37, 35 + orig: 37, 35 + offset: 0, 0 + index: -1 +goblingirl/left-foot + rotate: false + xy: 107, 3 + size: 65, 31 + orig: 65, 31 + offset: 0, 0 + index: -1 +goblingirl/left-hand + rotate: false + xy: 565, 2 + size: 35, 40 + orig: 35, 40 + offset: 0, 0 + index: -1 +goblingirl/left-lower-leg + rotate: true + xy: 785, 93 + size: 33, 70 + orig: 33, 70 + offset: 0, 0 + index: -1 +goblingirl/left-shoulder + rotate: true + xy: 690, 27 + size: 28, 46 + orig: 28, 46 + offset: 0, 0 + index: -1 +goblingirl/left-upper-leg + rotate: true + xy: 857, 93 + size: 33, 70 + orig: 33, 70 + offset: 0, 0 + index: -1 +goblingirl/neck + rotate: false + xy: 528, 2 + size: 35, 41 + orig: 35, 41 + offset: 0, 0 + index: -1 +goblingirl/pelvis + rotate: false + xy: 546, 45 + size: 62, 43 + orig: 62, 43 + offset: 0, 0 + index: -1 +goblingirl/right-arm + rotate: false + xy: 452, 48 + size: 28, 50 + orig: 28, 50 + offset: 0, 0 + index: -1 +goblingirl/right-foot + rotate: false + xy: 836, 58 + size: 63, 33 + orig: 63, 33 + offset: 0, 0 + index: -1 +goblingirl/right-hand + rotate: true + xy: 771, 20 + size: 36, 37 + orig: 36, 37 + offset: 0, 0 + index: -1 +goblingirl/right-lower-leg + rotate: true + xy: 560, 90 + size: 36, 76 + orig: 36, 76 + offset: 0, 0 + index: -1 +goblingirl/right-shoulder + rotate: false + xy: 649, 10 + size: 39, 45 + orig: 39, 45 + offset: 0, 0 + index: -1 +goblingirl/right-upper-leg + rotate: true + xy: 706, 57 + size: 34, 63 + orig: 34, 63 + offset: 0, 0 + index: -1 +goblingirl/torso + rotate: false + xy: 310, 2 + size: 68, 96 + orig: 68, 96 + offset: 0, 0 + index: -1 +goblingirl/undie-straps + rotate: false + xy: 212, 13 + size: 55, 19 + orig: 55, 19 + offset: 0, 0 + index: -1 +goblingirl/undies + rotate: false + xy: 810, 27 + size: 36, 29 + orig: 36, 29 + offset: 0, 0 + index: -1 +shield + rotate: false + xy: 380, 26 + size: 70, 72 + orig: 70, 72 + offset: 0, 0 + index: -1 +spear + rotate: true + xy: 2, 104 + size: 22, 368 + orig: 22, 368 + offset: 0, 0 + index: -1 diff --git a/spine-ts/webgl/example/assets/goblins-mesh.json b/spine-ts/webgl/example/assets/goblins-mesh.json new file mode 100644 index 000000000..82da6832a --- /dev/null +++ b/spine-ts/webgl/example/assets/goblins-mesh.json @@ -0,0 +1,1082 @@ +{ +"skeleton": { "hash": "P7CQ4ImK+tcAICATgSttlZ5HOSM", "spine": "3.4.00", "width": 0, "height": 0, "images": "./images/" }, +"bones": [ + { "name": "root" }, + { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, + { "name": "torso", "parent": "hip", "length": 85.82, "rotation": 93.92, "x": -6.42, "y": 1.97 }, + { "name": "neck", "parent": "torso", "length": 18.38, "rotation": -1.51, "x": 81.67, "y": -6.34 }, + { "name": "head", "parent": "neck", "length": 68.28, "rotation": -13.92, "x": 20.93, "y": 11.59 }, + { "name": "left shoulder", "parent": "torso", "length": 35.43, "rotation": -156.96, "x": 74.04, "y": -20.38 }, + { "name": "left arm", "parent": "left shoulder", "length": 35.62, "rotation": 28.16, "x": 37.85, "y": -2.34 }, + { "name": "left upper leg", "parent": "hip", "length": 50.39, "rotation": -89.09, "x": 14.45, "y": 2.81 }, + { "name": "left lower leg", "parent": "left upper leg", "length": 49.89, "rotation": -16.65, "x": 56.34, "y": 0.98 }, + { "name": "left foot", "parent": "left lower leg", "length": 46.5, "rotation": 102.43, "x": 58.94, "y": -7.61 }, + { "name": "left hand", "parent": "left arm", "length": 11.52, "rotation": 2.7, "x": 35.62, "y": 0.07 }, + { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, + { "name": "right shoulder", "parent": "torso", "length": 37.24, "rotation": 133.88, "x": 76.02, "y": 18.14 }, + { "name": "right arm", "parent": "right shoulder", "length": 36.74, "rotation": 36.32, "x": 37.6, "y": 0.31 }, + { "name": "right upper leg", "parent": "hip", "length": 42.45, "rotation": -97.49, "x": -20.07, "y": -6.83 }, + { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "rotation": -14.34, "x": 42.99, "y": -0.61 }, + { "name": "right foot", "parent": "right lower leg", "length": 45.45, "rotation": 110.3, "x": 64.88, "y": 0.04 }, + { "name": "right hand", "parent": "right arm", "length": 15.32, "rotation": 2.35, "x": 36.9, "y": 0.34 }, + { "name": "spear1", "parent": "left hand", "length": 65.06, "rotation": 102.43, "x": 0.48, "y": 17.03 }, + { "name": "spear2", "parent": "spear1", "length": 61.41, "rotation": 0.9, "x": 65.05, "y": 0.04 }, + { "name": "spear3", "parent": "spear2", "length": 76.79, "rotation": -0.9, "x": 61.88, "y": 0.57 } +], +"slots": [ + { "name": "left shoulder", "bone": "left shoulder", "attachment": "left shoulder" }, + { "name": "left arm", "bone": "left arm", "attachment": "left arm" }, + { "name": "left hand item", "bone": "left hand", "attachment": "spear" }, + { "name": "left hand", "bone": "left hand", "attachment": "left hand" }, + { "name": "left foot", "bone": "left foot", "attachment": "left foot" }, + { "name": "left lower leg", "bone": "left lower leg", "attachment": "left lower leg" }, + { "name": "left upper leg", "bone": "left upper leg", "attachment": "left upper leg" }, + { "name": "neck", "bone": "neck", "attachment": "neck" }, + { "name": "torso", "bone": "torso", "attachment": "torso" }, + { "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" }, + { "name": "right foot", "bone": "right foot", "attachment": "right foot" }, + { "name": "right lower leg", "bone": "right lower leg", "attachment": "right lower leg" }, + { "name": "undie straps", "bone": "pelvis", "attachment": "undie straps" }, + { "name": "undies", "bone": "pelvis", "attachment": "undies" }, + { "name": "right upper leg", "bone": "right upper leg", "attachment": "right upper leg" }, + { "name": "head", "bone": "head", "attachment": "head" }, + { "name": "eyes", "bone": "head" }, + { "name": "right shoulder", "bone": "right shoulder", "attachment": "right shoulder" }, + { "name": "right arm", "bone": "right arm", "attachment": "right arm" }, + { "name": "right hand thumb", "bone": "right hand", "attachment": "right hand thumb" }, + { "name": "right hand item", "bone": "right hand", "attachment": "dagger" }, + { "name": "right hand", "bone": "right hand", "attachment": "right hand" }, + { "name": "right hand item 2", "bone": "right hand", "attachment": "shield" } +], +"skins": { + "default": { + "left hand item": { + "dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 }, + "spear": { + "type": "mesh", + "uvs": [ 1, 0.11236, 0.77096, 0.13278, 0.76608, 0.21781, 0.75642, 0.386, 0.74723, 0.54607, 0.72117, 1, 0.28838, 1, 0.24208, 0.54327, 0.22589, 0.38361, 0.2089, 0.21605, 0.20043, 0.13242, 0, 0.11519, 0.4527, 0, 0.58399, 0 ], + "triangles": [ 4, 7, 3, 6, 7, 4, 5, 6, 4, 10, 11, 12, 1, 13, 0, 12, 13, 1, 10, 12, 1, 9, 10, 1, 2, 9, 1, 8, 9, 2, 3, 8, 2, 7, 8, 3 ], + "vertices": [ 1, 20, 38.54, -10.88, 1, 1, 20, 30.97, -5.93, 1, 2, 19, 61.48, -5.58, 0.5116, 20, -0.31, -6.16, 0.48839, 2, 18, 64.73, -5.03, 0.50272, 19, -0.4, -5.06, 0.49728, 1, 10, 4.56, 23.91, 1, 1, 10, 41.7, -138.95, 1, 1, 10, 32.41999, -141.1, 1, 1, 10, -6.49, 22.4, 1, 2, 18, 65.48, 6.64, 0.50272, 19, 0.52999, 6.59, 0.49728, 2, 19, 62.18, 6.66, 0.5116, 20, 0.2, 6.09, 0.48839, 1, 20, 30.96, 6.61, 1, 1, 20, 37.25999, 11.09, 1, 1, 20, 79.75, 1.59, 1, 1, 20, 79.78, -1.29, 1 ], + "hull": 14, + "edges": [ 24, 22, 22, 20, 10, 12, 2, 0, 24, 26, 0, 26, 8, 10, 12, 14, 6, 8, 14, 16, 2, 4, 4, 6, 16, 18, 18, 20, 20, 2 ], + "width": 22, + "height": 368 + } + }, + "right hand item": { + "dagger": { + "type": "mesh", + "uvs": [ 0.78091, 0.38453, 1, 0.38405, 1, 0.44881, 0.73953, 0.4687, 0.74641, 0.81344, 0.34022, 1, 0.15434, 1, 0.11303, 0.78858, 0.23007, 0.47367, 0, 0.45047, 0, 0.38621, 0.22367, 0.38573, 0.24384, 0, 1, 0 ], + "triangles": [ 0, 12, 13, 11, 12, 0, 0, 1, 2, 9, 10, 11, 3, 11, 0, 3, 0, 2, 8, 11, 3, 9, 11, 8, 5, 6, 7, 4, 5, 8, 4, 8, 3, 5, 7, 8 ], + "vertices": [ 15.49, -12.82, 21.13, -13.57, 20.16, -20.49, 13.15, -21.67, 8.13, -58.56, -5.13, -77.04, -9.92, -76.36, -7.79, -53.6, -0.03, -20.36, -5.6, -17.04, -4.63, -10.17, 1.12, -10.93, 7.46, 30.24, 26.93, 27.49 ], + "hull": 14, + "edges": [ 22, 20, 24, 26, 22, 24, 2, 0, 0, 22, 0, 26, 12, 14, 14, 16, 18, 20, 16, 18, 2, 4, 4, 6, 6, 8, 10, 12, 8, 10 ], + "width": 26, + "height": 108 + } + }, + "right hand item 2": { + "shield": { "rotation": 93.49, "width": 70, "height": 72 } + } + }, + "goblin": { + "eyes": { + "eyes closed": { "name": "goblin/eyes-closed", "x": 29.19, "y": -24.89, "rotation": -88.92, "width": 34, "height": 12 } + }, + "head": { + "head": { + "name": "goblin/head", + "type": "mesh", + "uvs": [ 0, 0.60494, 0.14172, 0.5145, 0.24218, 0.55229, 0.32667, 0.67806, 0.37969, 0.79352, 0.53505, 0.93014, 0.86056, 1, 0.94071, 0.94169, 0.92098, 0.69923, 0.9888, 0.65497, 0.99003, 0.51643, 0.89632, 0.43561, 0.94487, 0.41916, 1, 0.39713, 1, 0.2836, 0.94017, 0.27027, 0.87906, 0.25666, 0.80754, 0.16044, 0.66698, 0.01997, 0.4734, 0.01805, 0.29215, 0.19893, 0.25392, 0.31823, 0.09117, 0.324, 0, 0.44331, 0.43271, 0.69153, 0.466, 0.47794, 0.35996, 0.31246, 0.73473, 0.68593, 0.72215, 0.57425, 0.88179, 0.5583, 0.80267, 0.51015 ], + "triangles": [ 5, 27, 6, 7, 27, 8, 7, 6, 27, 4, 24, 5, 5, 24, 27, 4, 3, 24, 27, 29, 8, 8, 29, 9, 24, 28, 27, 24, 25, 28, 24, 3, 25, 29, 28, 30, 29, 27, 28, 25, 2, 26, 25, 3, 2, 9, 29, 10, 0, 23, 1, 28, 25, 30, 29, 11, 10, 29, 30, 11, 2, 21, 26, 2, 1, 21, 23, 22, 1, 1, 22, 21, 30, 16, 11, 30, 17, 16, 30, 25, 17, 17, 26, 18, 18, 26, 19, 26, 17, 25, 11, 15, 12, 11, 16, 15, 12, 15, 13, 15, 14, 13, 21, 20, 26, 26, 20, 19 ], + "vertices": [ 14.56, 50.42, 23.12, 35.47, 17.45999, 26.36, 11.57, 16.86, 3.74, 11.71, -5.89, -3.91, -11.83, -37.23, -8.31, -45.63, 7.75, -44.24, 10.39, -51.33, 19.52, -51.82, 25.21, -43.15, 26.12, -47.43, 27.35, -53.16, 34.84, -53.46, 35.96, -47.33, 37.11, -41.08, 43.75, -33.97, 53.58, -19.87, 54.5, 0.03, 43.31, 19.16, 35.59999, 23.41, 35.89, 40.16999, 28.39, 49.87, 10.25, 5.99, 24.2, 2, 35.55, 12.48, 9.39, -25.1, 16.79999, -24.31, 17.2, -40.65, 20.68, -33.02 ], + "hull": 24, + "edges": [ 0, 2, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 26, 28, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 0, 46, 6, 48, 48, 50, 50, 52, 52, 42, 2, 4, 4, 6, 4, 52, 2, 44, 22, 32, 22, 24, 24, 26, 28, 30, 30, 32, 24, 30, 16, 54, 54, 56, 20, 58, 58, 54, 16, 58, 22, 60, 60, 56, 58, 60 ], + "width": 103, + "height": 66 + } + }, + "left arm": { + "left arm": { + "name": "goblin/left-arm", + "type": "mesh", + "uvs": [ 0.68992, 0.29284, 1, 0.46364, 1, 0.74643, 0.84089, 1, 0.66344, 1, 0.33765, 0.64284, 0, 0.44124, 0, 0, 0.34295, 0 ], + "triangles": [ 3, 4, 2, 4, 5, 2, 5, 0, 2, 0, 1, 2, 0, 5, 8, 5, 6, 8, 6, 7, 8 ], + "vertices": [ 18.6, 8.81, 32.18999, 10.31, 38.02, 1.62, 38.08, -9.63, 32.31, -13.49, 14.37, -9.62, -0.75, -10.78, -9.84, 2.77, 1.29, 10.25 ], + "hull": 9, + "edges": [ 14, 16, 16, 0, 0, 2, 2, 4, 6, 4, 6, 8, 8, 10, 12, 14, 10, 12 ], + "width": 37, + "height": 35 + } + }, + "left foot": { + "left foot": { + "name": "goblin/left-foot", + "type": "mesh", + "uvs": [ 0.15733, 0.31873, 0.08195, 0.78502, 0.15884, 0.99366, 0.41633, 0.96804, 0.68822, 0.97636, 1, 0.96388, 0.99385, 0.73501, 0.85294, 0.51862, 0.61479, 0.31056, 0.46991, 0, 0.48032, 0.75604, 0.75994, 0.77706 ], + "triangles": [ 0, 9, 8, 10, 0, 8, 10, 8, 7, 11, 10, 7, 11, 7, 6, 1, 0, 10, 11, 6, 5, 3, 1, 10, 4, 10, 11, 4, 11, 5, 3, 10, 4, 2, 1, 3 ], + "vertices": [ 2.28, 13.07, -1.76, -1.64, 3.59, -7.8, 20.25, -6.04, 37.91, -5.27, 58.12, -3.71, 57.31, 3.34, 47.78, 9.51, 31.95, 15.05, 21.99, 24.11, 24.03, 0.75, 42.21, 1.16 ], + "hull": 10, + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18, 6, 20, 20, 16, 2, 20, 8, 22, 22, 14, 20, 22, 22, 10 ], + "width": 65, + "height": 31 + } + }, + "left hand": { + "left hand": { + "name": "goblin/left-hand", + "type": "mesh", + "uvs": [ 0.518, 0.12578, 1, 0.16285, 0.99788, 0.50578, 0.69745, 1, 0.37445, 1, 0, 0.80051, 0, 0.42792, 0.17601, 0, 0.43567, 0 ], + "triangles": [ 2, 0, 1, 0, 5, 6, 6, 7, 0, 0, 7, 8, 3, 4, 0, 4, 5, 0, 2, 3, 0 ], + "vertices": [ -3.11, 15.42, 10.83, 22.27, 15.5, 14.55, 18.35, -8.96, 9.47999, -14.32, -4.58, -14.3, -11.63, -2.63, -14.89, 13.68, -7.75, 17.99 ], + "hull": 9, + "edges": [ 16, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 14, 16, 12, 14 ], + "width": 36, + "height": 41 + } + }, + "left lower leg": { + "left lower leg": { + "name": "goblin/left-lower-leg", + "type": "mesh", + "uvs": [ 0.95508, 0.20749, 0.81927, 0.65213, 0.94754, 0.77308, 0.67842, 0.97346, 0.46463, 1, 0.26845, 1, 0.04963, 0.90706, 0.2106, 0.60115, 0.07478, 0.40195, 0.18545, 0, 0.28857, 0 ], + "triangles": [ 10, 8, 9, 1, 7, 10, 7, 8, 10, 0, 1, 10, 1, 4, 7, 3, 1, 2, 5, 6, 7, 7, 4, 5, 1, 3, 4 ], + "vertices": [ -0.19, 6.82, 30.97, 10.96, 37.97, 17.33, 53.88, 12.6, 57.58, 6.31, 59.34, 0.08, 55.04, -8.63, 32.99, -9.33, 20.79, -17.43, -7.27, -21.56, -8.18999, -18.29 ], + "hull": 11, + "edges": [ 20, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 18, 20, 16, 18 ], + "width": 33, + "height": 70 + } + }, + "left shoulder": { + "left shoulder": { + "name": "goblin/left-shoulder", + "type": "mesh", + "uvs": [ 0.7377, 0.40692, 1, 0.75237, 1, 1, 0.62046, 1, 0.26184, 0.56601, 0, 0.29783, 0, 0, 0.44115, 0 ], + "triangles": [ 3, 1, 2, 3, 0, 1, 3, 4, 0, 4, 7, 0, 4, 5, 7, 5, 6, 7 ], + "vertices": [ 15.18, 5.74, 32.16999, 5.32, 41.79, 0.21, 36.63, -9.5, 14.88, -9.72, 0.9, -10.89, -10.66, -4.73999, -4.66, 6.54 ], + "hull": 8, + "edges": [ 12, 14, 14, 0, 4, 2, 0, 2, 4, 6, 6, 8, 10, 12, 8, 10 ], + "width": 29, + "height": 44 + } + }, + "left upper leg": { + "left upper leg": { + "name": "goblin/left-upper-leg", + "type": "mesh", + "uvs": [ 1, 0.12167, 1, 0.54873, 0.91067, 0.78907, 0.76567, 1, 0.3087, 0.9579, 0, 0.68777, 0, 0.219, 0.51961, 0, 0.87552, 0 ], + "triangles": [ 7, 8, 0, 5, 6, 7, 0, 1, 7, 4, 5, 7, 1, 4, 7, 2, 4, 1, 3, 4, 2 ], + "vertices": [ 2.33, 13.06, 33.5, 12.57, 51, 9.34, 66.32, 4.31, 63, -10.71, 43.13, -20.58, 8.91, -20.04, -6.79, -2.64, -6.61, 9.1 ], + "hull": 9, + "edges": [ 10, 8, 8, 6, 6, 4, 4, 2, 10, 12, 12, 14, 14, 16, 2, 0, 16, 0 ], + "width": 33, + "height": 73 + } + }, + "neck": { + "neck": { + "name": "goblin/neck", + "type": "mesh", + "uvs": [ 0.81967, 0.27365, 0.92101, 0.82048, 0.47134, 1, 0.15679, 0.9354, 0, 0.7556, 0.19268, 0.51833, 0.15468, 0.35706, 0, 0.21989, 0.13568, 0, 0.68878, 0, 0.70145, 0.53872 ], + "triangles": [ 3, 5, 2, 2, 10, 1, 2, 5, 10, 3, 4, 5, 10, 0, 1, 0, 10, 6, 10, 5, 6, 7, 8, 6, 6, 9, 0, 6, 8, 9 ], + "vertices": [ 18.62, -11.65, -3.98, -13.85, -10.28, 2.76, -6.91, 13.89, 0.8, 19.04999, 10.06, 11.51, 16.74, 12.45, 22.71, 17.64, 31.4, 12.19, 30.12, -7.67, 8.05, -6.71 ], + "hull": 10, + "edges": [ 14, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 2, 2, 20, 20, 0, 0, 18, 16, 18, 14, 16, 0, 2 ], + "width": 36, + "height": 41 + } + }, + "pelvis": { + "pelvis": { + "name": "goblin/pelvis", + "type": "mesh", + "uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ], + "triangles": [ 1, 2, 3, 1, 3, 0 ], + "vertices": [ 25.38, -20.73, -36.61, -20.73, -36.61, 22.26, 25.38, 22.26 ], + "hull": 4, + "edges": [ 0, 2, 2, 4, 4, 6, 0, 6 ], + "width": 62, + "height": 43 + } + }, + "right arm": { + "right arm": { + "name": "goblin/right-arm", + "type": "mesh", + "uvs": [ 1, 0.09223, 1, 0.8501, 0.72058, 1, 0.24384, 1, 0, 0.86558, 0.20822, 0.10919, 0.50903, 0, 0.85342, 0 ], + "triangles": [ 1, 2, 6, 6, 2, 5, 1, 6, 0, 4, 5, 3, 2, 3, 5, 6, 7, 0 ], + "vertices": [ -4.75, 8.89, 33.03, 11.74, 40.99, 5.89, 41.81, -5.03, 35.53, -11.13, -2.53, -9.2, -8.5, -2.71, -9.09, 5.17999 ], + "hull": 8, + "edges": [ 8, 6, 4, 6, 4, 2, 12, 14, 2, 0, 14, 0, 10, 12, 8, 10 ], + "width": 23, + "height": 50 + } + }, + "right foot": { + "right foot": { + "name": "goblin/right-foot", + "type": "mesh", + "uvs": [ 0.40851, 0.0047, 0.59087, 0.33404, 0.75959, 0.48311, 0.88907, 0.59751, 0.97532, 0.89391, 0.90385, 1, 0.6722, 1, 0.38633, 1, 0.08074, 1, 0, 0.88921, 0, 0.65984, 0, 0.46577, 0.0906, 0.0988, 0.305, 0, 0.47461, 0.71257, 0.715, 0.74681 ], + "triangles": [ 1, 10, 11, 1, 13, 0, 14, 1, 2, 1, 12, 13, 12, 1, 11, 14, 10, 1, 15, 14, 2, 15, 2, 3, 9, 10, 14, 15, 3, 4, 7, 8, 9, 14, 7, 9, 6, 14, 15, 5, 6, 15, 7, 14, 6, 4, 5, 15 ], + "vertices": [ 17.36, 25.99, 29.13, 15.44, 39.89, 10.8, 48.14, 7.24, 53.84, -2.38, 49.43, -6, 34.84, -6.39, 16.84, -6.87, -2.4, -7.38, -7.58, -3.86, -7.78, 3.7, -7.95, 10.1, -2.57, 22.36, 10.84, 25.97, 22.14, 2.75, 37.31, 2.03 ], + "hull": 14, + "edges": [ 0, 2, 6, 8, 8, 10, 16, 18, 22, 24, 24, 26, 0, 26, 10, 12, 2, 4, 4, 6, 12, 14, 14, 16, 18, 20, 20, 22, 2, 28, 28, 14, 20, 28, 4, 30, 30, 12, 28, 30, 30, 8 ], + "width": 63, + "height": 33 + } + }, + "right hand": { + "right hand": { + "name": "goblin/right-hand", + "type": "mesh", + "uvs": [ 0.17957, 0, 0, 0.44772, 0, 0.79734, 0.20057, 0.94264, 0.55057, 1, 0.8539, 1, 0.89823, 0.82004, 0.8259, 0.74285, 0.84223, 0.49993, 0.96356, 0.34102, 0.66023, 0 ], + "triangles": [ 8, 10, 9, 0, 10, 1, 8, 2, 1, 8, 1, 10, 7, 3, 8, 3, 2, 8, 4, 3, 7, 5, 7, 6, 4, 7, 5 ], + "vertices": [ -10.82, -9.45, 5.95, -15.34, 18.87999, -14.9, 24, -7.5, 25.69, 5.16, 25.31, 16.07, 18.61, 17.44, 15.84, 14.74, 6.84, 15.02, 0.81, 19.18, -11.41, 7.83 ], + "hull": 11, + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 0, 20 ], + "width": 36, + "height": 37 + } + }, + "right hand thumb": { + "right hand thumb": { + "name": "goblin/right-hand", + "type": "mesh", + "uvs": [ 0.88538, 0.22262, 0.76167, 0.3594, 0.75088, 0.78308, 0.95326, 0.84981, 1, 0.60302 ], + "triangles": [ 1, 0, 4, 2, 1, 4, 3, 2, 4 ], + "vertices": [ -2.82, 15.97, 2.4, 11.71, 18.08, 11.9, 20.27, 19.27, 11.09, 20.62 ], + "hull": 5, + "edges": [ 2, 4, 4, 6, 6, 8, 2, 0, 0, 8 ], + "width": 36, + "height": 37 + } + }, + "right lower leg": { + "right lower leg": { + "name": "goblin/right-lower-leg", + "type": "mesh", + "uvs": [ 1, 0.27261, 0.81312, 0.52592, 0.79587, 0.71795, 0.95544, 0.80988, 0.85193, 0.95493, 0.47241, 1, 0.14033, 1, 0, 0.8773, 0.14896, 0.67914, 0.1619, 0.30325, 0.60611, 0 ], + "triangles": [ 1, 10, 0, 9, 10, 1, 8, 9, 1, 2, 8, 1, 4, 2, 3, 6, 7, 8, 5, 6, 8, 2, 5, 8, 4, 5, 2 ], + "vertices": [ 6.26, 8.46, 23.32, 8.04, 37.09999, 12.89, 41.45, 20.82, 53.07, 21.46, 61.33, 10.06, 65.76999, -1.03, 58.99, -9.18999, 43.02, -9.81, 16.33, -20, -12.79, -9.26 ], + "hull": 11, + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 20, 18, 20 ], + "width": 36, + "height": 76 + } + }, + "right shoulder": { + "right shoulder": { + "name": "goblin/right-shoulder", + "type": "mesh", + "uvs": [ 0.62008, 0.03708, 0.92131, 0.09048, 1, 0.38319, 0.72049, 0.6937, 0.31656, 1, 0, 1, 0, 0.75106, 0.28233, 0.49988 ], + "triangles": [ 4, 6, 7, 4, 7, 3, 4, 5, 6, 7, 0, 3, 2, 0, 1, 2, 3, 0 ], + "vertices": [ -3.17, -11.05, -9, -0.57, -1.01, 10.33, 16.69, 11.17, 37.41, 8.2, 45.45, -1.16, 36.95, -8.46, 21.2, -7.47 ], + "hull": 8, + "edges": [ 10, 12, 12, 14, 14, 0, 0, 2, 2, 4, 4, 6, 8, 10, 6, 8 ], + "width": 39, + "height": 45 + } + }, + "right upper leg": { + "right upper leg": { + "name": "goblin/right-upper-leg", + "type": "mesh", + "uvs": [ 0.27018, 0, 0.11618, 0.18177, 0, 0.70688, 0, 0.89577, 0.26668, 1, 0.48718, 1, 0.67618, 0.83532, 1, 0.5161, 1, 0.25543, 0.74618, 0.0571 ], + "triangles": [ 9, 8, 7, 9, 1, 0, 6, 9, 7, 6, 1, 9, 2, 1, 6, 4, 3, 2, 6, 4, 2, 5, 4, 6 ], + "vertices": [ -9.85, -10.37, 2.17, -14.07, 35.49, -13.66, 47.29, -12.11, 52.61, -2.26, 51.63, 5.16, 40.50999, 10.18, 19.12999, 18.46999, 2.85, 16.32, -8.39999, 6.14 ], + "hull": 10, + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18 ], + "width": 34, + "height": 63 + } + }, + "torso": { + "torso": { + "name": "goblin/torso", + "type": "mesh", + "uvs": [ 0, 0.33287, 0.15945, 0.46488, 0.15761, 0.60314, 0.15502, 0.79806, 0.32807, 0.93478, 0.6875, 1, 0.80731, 1, 1, 0.77763, 1, 0.66147, 1, 0.56703, 0.93207, 0.4771, 0.86944, 0.39416, 0.83837, 0.226, 0.68085, 0, 0.14836, 0, 0, 0.07199, 0.78734, 0.86249, 0.43679, 0.79649, 0.76738, 0.61733, 0.44345, 0.58747, 0.54329, 0.38316, 0.77692, 0.73446, 0.66478, 0.51012 ], + "triangles": [ 5, 16, 6, 6, 16, 7, 4, 17, 5, 5, 17, 16, 4, 3, 17, 17, 21, 16, 16, 21, 7, 3, 2, 17, 21, 19, 18, 21, 17, 19, 17, 2, 19, 21, 8, 7, 21, 18, 8, 18, 9, 8, 19, 22, 18, 18, 10, 9, 18, 22, 10, 2, 1, 19, 19, 20, 22, 19, 1, 20, 22, 11, 10, 22, 20, 11, 20, 1, 14, 20, 12, 11, 1, 0, 14, 20, 13, 12, 20, 14, 13, 0, 15, 14 ], + "vertices": [ 56.93, 27.95, 43.37, 18.23, 30.16, 19.5, 11.53, 21.28, -2.55, 10.69, -10.89, -13.12, -11.59, -21.23, 8.54, -36.12, 19.65, -37.08, 28.68, -37.86, 37.68, -34, 45.98, -30.44, 56.4, -29.07, 84.78, -20.92, 87.9, 15.15, 81.87999, 25.79, 1.67, -21.01, 10.03, 2.18, 25.23, -18.25, 29.98, 0, 48.54, -8.39, 13.98, -21.36, 35.9, -15.6 ], + "hull": 16, + "edges": [ 0, 2, 6, 8, 8, 10, 10, 12, 12, 14, 22, 24, 24, 26, 26, 28, 28, 30, 0, 30, 14, 32, 32, 34, 34, 6, 18, 36, 36, 38, 2, 4, 4, 6, 38, 4, 2, 40, 40, 22, 40, 38, 38, 34, 32, 10, 34, 8, 40, 28, 14, 16, 16, 18, 32, 42, 42, 36, 16, 42, 42, 34, 18, 20, 20, 22, 36, 44, 44, 40, 20, 44 ], + "width": 68, + "height": 96 + } + }, + "undie straps": { + "undie straps": { + "name": "goblin/undie-straps", + "type": "mesh", + "uvs": [ 0.36097, 0.44959, 0.66297, 0.60591, 1, 0.19486, 1, 0.57117, 0.75897, 1, 0.38697, 1, 0, 0.26433, 0, 0, 0.12497, 0 ], + "triangles": [ 6, 7, 8, 6, 8, 0, 3, 1, 2, 5, 0, 1, 6, 0, 5, 4, 1, 3, 5, 1, 4 ], + "vertices": [ -10.56, 12.87, 6.53, 9.89999, 25.62, 17.70999, 25.62, 10.56, 11.97, 2.41, -9.09, 2.41, -31, 16.39, -31, 21.41, -23.92, 21.41 ], + "hull": 9, + "edges": [ 14, 16, 16, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 12, 14, 10, 12, 0, 10, 2, 8 ], + "width": 55, + "height": 19 + } + }, + "undies": { + "undies": { + "name": "goblin/undies", + "type": "mesh", + "uvs": [ 0, 0.32029, 0.14893, 0.59457, 0.22437, 1, 0.35909, 1, 0.50998, 1, 0.79559, 0.58453, 0.9842, 0.28015, 1, 0.00588, 0.46957, 0.17646, 0, 0.03933, 0.48843, 0.59122, 0.48114, 0.43099 ], + "triangles": [ 6, 8, 7, 0, 9, 8, 11, 8, 6, 0, 8, 11, 5, 11, 6, 10, 11, 5, 1, 0, 11, 1, 11, 10, 3, 2, 1, 10, 3, 1, 4, 10, 5, 3, 10, 4 ], + "vertices": [ -13.22, 5.56, -8, -2.47, -5.49, -14.27, -0.64, -14.36, 4.78, -14.45, 15.27, -2.58999, 22.22, 6.11, 22.92, 14.05, 3.75, 9.43999, -13.08, 13.71, 4.21, -2.58999, 4.03, 2.05 ], + "hull": 10, + "edges": [ 0, 2, 2, 4, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18, 4, 6, 6, 8, 6, 20, 16, 22, 22, 20, 0, 22, 22, 12, 2, 20, 20, 10 ], + "width": 36, + "height": 29 + } + } + }, + "goblingirl": { + "eyes": { + "eyes closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.54, "rotation": -87.04, "width": 37, "height": 21 } + }, + "head": { + "head": { "name": "goblingirl/head", "x": 27.71, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 } + }, + "left arm": { + "left arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.42, "rotation": 33.05, "width": 37, "height": 35 } + }, + "left foot": { + "left foot": { "name": "goblingirl/left-foot", "x": 25.17, "y": 7.92, "rotation": 3.32, "width": 65, "height": 31 } + }, + "left hand": { + "left hand": { + "name": "goblingirl/left-hand", + "x": 4.34, + "y": 2.39, + "scaleX": 0.896, + "scaleY": 0.896, + "rotation": 30.34, + "width": 35, + "height": 40 + } + }, + "left lower leg": { + "left lower leg": { "name": "goblingirl/left-lower-leg", "x": 25.02, "y": -0.6, "rotation": 105.75, "width": 33, "height": 70 } + }, + "left shoulder": { + "left shoulder": { "name": "goblingirl/left-shoulder", "x": 19.8, "y": -0.42, "rotation": 61.21, "width": 28, "height": 46 } + }, + "left upper leg": { + "left upper leg": { "name": "goblingirl/left-upper-leg", "x": 30.21, "y": -2.95, "rotation": 89.09, "width": 33, "height": 70 } + }, + "neck": { + "neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.14, "rotation": -98.86, "width": 35, "height": 41 } + }, + "pelvis": { + "pelvis": { "name": "goblingirl/pelvis", "x": -3.87, "y": 3.18, "width": 62, "height": 43 } + }, + "right arm": { + "right arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.52, "width": 28, "height": 50 } + }, + "right foot": { + "right foot": { "name": "goblingirl/right-foot", "x": 23.46, "y": 9.66, "rotation": 1.52, "width": 63, "height": 33 } + }, + "right hand": { + "right hand": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } + }, + "right hand thumb": { + "right hand thumb": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } + }, + "right lower leg": { + "right lower leg": { "name": "goblingirl/right-lower-leg", "x": 26.15, "y": -3.27, "rotation": 111.83, "width": 36, "height": 76 } + }, + "right shoulder": { + "right shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.45, "rotation": 129.85, "width": 39, "height": 45 } + }, + "right upper leg": { + "right upper leg": { "name": "goblingirl/right-upper-leg", "x": 19.69, "y": 2.13, "rotation": 97.49, "width": 34, "height": 63 } + }, + "torso": { + "torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.74, "width": 68, "height": 96 } + }, + "undie straps": { + "undie straps": { "name": "goblingirl/undie-straps", "x": -1.51, "y": 14.18, "width": 55, "height": 19 } + }, + "undies": { + "undies": { "name": "goblingirl/undies", "x": 5.4, "y": 1.7, "width": 36, "height": 29 } + } + } +}, +"animations": { + "walk": { + "slots": { + "eyes": { + "attachment": [ + { "time": 0.7, "name": "eyes closed" }, + { "time": 0.8, "name": null } + ] + } + }, + "bones": { + "left upper leg": { + "rotate": [ + { "time": 0, "angle": -26.55 }, + { "time": 0.1333, "angle": -8.78 }, + { "time": 0.2333, "angle": 9.51 }, + { "time": 0.3666, "angle": 30.74 }, + { "time": 0.5, "angle": 25.33 }, + { "time": 0.6333, "angle": 26.11 }, + { "time": 0.7333, "angle": 7.45 }, + { "time": 0.8666, "angle": -21.19 }, + { "time": 1, "angle": -26.55 } + ], + "translate": [ + { "time": 0, "x": -1.32, "y": 1.7 }, + { "time": 0.3666, "x": -0.06, "y": 2.42 }, + { "time": 1, "x": -1.32, "y": 1.7 } + ] + }, + "right upper leg": { + "rotate": [ + { "time": 0, "angle": 42.45 }, + { + "time": 0.1333, + "angle": 49.86, + "curve": [ 0.414, 0, 0.705, 0.99 ] + }, + { "time": 0.2333, "angle": 22.51 }, + { "time": 0.5, "angle": -16.93 }, + { "time": 0.6333, "angle": 1.89 }, + { + "time": 0.7333, + "angle": 34.86, + "curve": [ 0.462, 0.11, 1, 1 ] + }, + { + "time": 0.8666, + "angle": 58.68, + "curve": [ 0.5, 0.02, 1, 1 ] + }, + { "time": 1, "angle": 42.45 } + ], + "translate": [ + { "time": 0, "x": 6.23, "y": 0 }, + { "time": 0.2333, "x": 2.14, "y": 2.4 }, + { "time": 0.5, "x": 2.44, "y": 4.8 }, + { "time": 1, "x": 6.23, "y": 0 } + ] + }, + "left lower leg": { + "rotate": [ + { "time": 0, "angle": -18.05 }, + { "time": 0.1333, "angle": -63.5 }, + { "time": 0.2333, "angle": -83.01 }, + { "time": 0.5, "angle": 5.11 }, + { "time": 0.6333, "angle": -28.29 }, + { "time": 0.7333, "angle": -27.52 }, + { "time": 0.8666, "angle": 3.53 }, + { "time": 1, "angle": -18.05 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2333, "x": 2.55, "y": -0.47 }, + { "time": 0.5, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "left foot": { + "rotate": [ + { "time": 0, "angle": -14.56 }, + { "time": 0.1333, "angle": -10.42 }, + { "time": 0.2333, "angle": -5.01 }, + { "time": 0.3, "angle": 6.67 }, + { "time": 0.3666, "angle": 3.87 }, + { "time": 0.5, "angle": -3.87 }, + { "time": 0.6333, "angle": 2.78 }, + { "time": 0.7333, "angle": -11.99 }, + { "time": 0.8666, "angle": -12.45 }, + { "time": 1, "angle": -14.56 } + ] + }, + "right shoulder": { + "rotate": [ + { + "time": 0, + "angle": 5.29, + "curve": [ 0.264, 0, 0.75, 1 ] + }, + { "time": 0.6333, "angle": 6.65 }, + { "time": 1, "angle": 5.29 } + ] + }, + "right arm": { + "rotate": [ + { + "time": 0, + "angle": -4.02, + "curve": [ 0.267, 0, 0.804, 0.99 ] + }, + { + "time": 0.6333, + "angle": 19.78, + "curve": [ 0.307, 0, 0.787, 0.99 ] + }, + { "time": 1, "angle": -4.02 } + ] + }, + "right hand": { + "rotate": [ + { "time": 0, "angle": 8.98 }, + { "time": 0.6333, "angle": 0.51 }, + { "time": 1, "angle": 8.98 } + ] + }, + "left shoulder": { + "rotate": [ + { + "time": 0, + "angle": 6.25, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": -11.78, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 6.25 } + ], + "translate": [ + { "time": 0, "x": 1.15, "y": 0.23 } + ] + }, + "left hand": { + "rotate": [ + { + "time": 0, + "angle": -21.23, + "curve": [ 0.295, 0, 0.755, 0.98 ] + }, + { + "time": 0.5, + "angle": -27.28, + "curve": [ 0.241, 0, 0.75, 0.97 ] + }, + { "time": 1, "angle": -21.23 } + ] + }, + "left arm": { + "rotate": [ + { + "time": 0, + "angle": 28.37, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": 60.09, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 28.37 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -10.28 }, + { + "time": 0.1333, + "angle": -15.38, + "curve": [ 0.545, 0, 0.818, 1 ] + }, + { + "time": 0.3666, + "angle": -9.78, + "curve": [ 0.58, 0.17, 0.669, 0.99 ] + }, + { + "time": 0.6333, + "angle": -15.75, + "curve": [ 0.235, 0.01, 0.795, 1 ] + }, + { + "time": 0.8666, + "angle": -7.06, + "curve": [ 0.209, 0, 0.816, 0.98 ] + }, + { "time": 1, "angle": -10.28 } + ], + "translate": [ + { "time": 0, "x": -3.72, "y": -0.01 } + ] + }, + "right foot": { + "rotate": [ + { "time": 0, "angle": -5.25 }, + { "time": 0.2333, "angle": -17.76 }, + { "time": 0.3666, "angle": -20.09 }, + { "time": 0.5, "angle": -19.73 }, + { "time": 0.7333, "angle": -11.68 }, + { "time": 0.8, "angle": 4.46 }, + { "time": 0.8666, "angle": 0.46 }, + { "time": 1, "angle": -5.25 } + ] + }, + "right lower leg": { + "rotate": [ + { + "time": 0, + "angle": -3.39, + "curve": [ 0.316, 0.01, 0.741, 0.98 ] + }, + { + "time": 0.1333, + "angle": -43.21, + "curve": [ 0.414, 0, 0.705, 0.99 ] + }, + { "time": 0.2333, "angle": -25.98 }, + { "time": 0.5, "angle": -19.53 }, + { "time": 0.6333, "angle": -64.8 }, + { + "time": 0.7333, + "angle": -89.54, + "curve": [ 0.557, 0.18, 1, 1 ] + }, + { "time": 1, "angle": -3.39 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.5, "x": 0, "y": 0 }, + { "time": 0.6333, "x": 2.18, "y": 0.21 }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": -8.4 }, + { + "time": 0.1333, + "x": 0, + "y": -9.35, + "curve": [ 0.326, 0.05, 0.674, 0.93 ] + }, + { + "time": 0.2333, + "x": 0, + "y": -0.59, + "curve": [ 0.325, 0.39, 0.643, 0.7 ] + }, + { "time": 0.3666, "x": 0, "y": -3.96 }, + { "time": 0.5, "x": 0, "y": -8.4 }, + { + "time": 0.6333, + "x": 0, + "y": -10, + "curve": [ 0.359, 0.47, 0.646, 0.74 ] + }, + { + "time": 0.7333, + "x": 0, + "y": -5.29, + "curve": [ 0.333, 0.36, 0.662, 0.69 ] + }, + { + "time": 0.8, + "x": 0, + "y": -2.49, + "curve": [ 0.322, 0.35, 0.651, 0.68 ] + }, + { "time": 0.8666, "x": 0, "y": -3.96 }, + { "time": 1, "x": 0, "y": -8.4 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 3.6 }, + { "time": 0.1333, "angle": 17.49 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { "time": 0.5, "angle": 5.17 }, + { "time": 0.6333, "angle": 18.36 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + }, + "head": { + "rotate": [ + { + "time": 0, + "angle": 3.6, + "curve": [ 0, 0, 0.704, 1.17 ] + }, + { "time": 0.1333, "angle": -0.2 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { + "time": 0.5, + "angle": 5.17, + "curve": [ 0, 0, 0.704, 1.61 ] + }, + { "time": 0.6666, "angle": 1.1 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + }, + "pelvis": { + "rotate": [ + { "time": 0, "angle": -1.33 } + ], + "translate": [ + { "time": 0, "x": 0.39, "y": -0.78 } + ] + }, + "spear1": { + "rotate": [ + { "time": 0, "angle": 1.84 }, + { "time": 0.2, "angle": -5.38 }, + { "time": 0.5, "angle": 2.95 }, + { "time": 0.7333, "angle": -3.67 }, + { "time": 1, "angle": 1.84 } + ] + }, + "spear2": { + "rotate": [ + { "time": 0, "angle": 1.84 }, + { "time": 0.2, "angle": -5.38 }, + { "time": 0.5, "angle": 2.95 }, + { "time": 0.7333, "angle": -3.67 }, + { "time": 1, "angle": 1.84 } + ] + }, + "spear3": { + "rotate": [ + { "time": 0, "angle": 3.64 }, + { "time": 0.2, "angle": -3.59 }, + { "time": 0.5, "angle": 4.74 }, + { "time": 0.7333, "angle": -1.87 }, + { "time": 1, "angle": 3.64 } + ] + } + }, + "deform": { + "default": { + "left hand item": { + "spear": [ + { "time": 0 } + ] + }, + "right hand item": { + "dagger": [ + { + "time": 0, + "offset": 26, + "vertices": [ 2.34754, 0.14469 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.5, + "offset": 8, + "vertices": [ -1.19415, 4.31531, 0.07279, 6.41351, 1.66048, 6.18882, 1.75232, 3.59555 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1, + "offset": 26, + "vertices": [ 2.34754, 0.14469 ] + } + ] + } + }, + "goblin": { + "head": { + "head": [ + { + "time": 0, + "curve": [ 0.632, 0, 0.75, 1 ] + }, + { + "time": 0.2, + "vertices": [ -10.97826, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08534, 0.08391, -1.08534, 0.08391, -1.08534, 0.08391, 0, 0, -2.22324, 2.66465, -4.83295, 2.70084, -5.70553, -0.51941, -3.15962, -1.61501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64741, 0.81612, -11.82285, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08534, 0.08391 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.3666, + "vertices": [ 10.69275, 4.05949, 3.66373, 1.85426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47305, 0.09017, 1.47305, 0.09017, 1.47305, 0.09017, 0, 0, 2.69652, -0.22738, 3.77135, 0.11417, 3.6893, 1.55352, 2.49594, 1.65501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.4588, -3.9113, 9.19593, -1.66854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47305, 0.09017 ], + "curve": [ 0.621, 0, 0.75, 1 ] + }, + { + "time": 0.7, + "vertices": [ -10.97826, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.1755, -0.17183, -1.1755, -0.17182, -1.1755, -0.17183, 0, 0, -2.22324, 2.66465, -4.83295, 2.70084, -5.70553, -0.51941, -3.15962, -1.61501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64741, 0.81612, -11.82285, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.1755, -0.17183 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.8666, + "vertices": [ 10.69275, 4.05949, 3.66373, 1.85426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38687, 0.08446, 0.38687, 0.08446, 0.38687, 0.08446, 0, 0, 2.69652, -0.22738, 3.77135, 0.11417, 3.6893, 1.55352, 2.49594, 1.65501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.4588, -3.9113, 9.19593, -1.66854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38687, 0.08446 ], + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1 } + ] + }, + "left foot": { + "left foot": [ + { + "time": 0, + "offset": 8, + "vertices": [ 3.69298, 2.37572, -7.16969, 18.79732, -12.78161, 14.7778, -12.75775, 6.50514, -3.13475, 1.98906, -0.44401, 0.36629, 0, 0, -3.80085, 2.98474 ] + }, + { "time": 0.1333 }, + { + "time": 0.2333, + "offset": 8, + "vertices": [ -3.96072, -2.34594, -5.80445, -12.47629, -2.23129, -12.99037, 2.02941, -9.1036, 0, 0, 0, 0, 0, 0, -1.35254, -5.2883 ] + }, + { + "time": 0.3666, + "offset": 8, + "vertices": [ 0.66504, 0.33548, 0.33902, 2.69014, -0.4817, 2.54524, -1.13592, 1.38562, 0, 0, 0, 0, 0, 0, -0.11907, 0.79273 ] + }, + { "time": 0.5, "curve": "stepped" }, + { "time": 0.6333 }, + { + "time": 0.7333, + "offset": 8, + "vertices": [ -2.97737, 9.40254, -6.91661, 19.92794, -10.55287, 18.41085, -12.37161, 12.38473, -4.72606, 6.30798, 0, 0, -1.48902, 4.88944, -7.06773, 10.70101 ] + }, + { + "time": 0.8333, + "offset": 6, + "vertices": [ 1.05318, 1.56361, -2.52722, 7.9974, -5.5203, 17.14136, -8.93317, 15.79635, -10.73747, 10.22055, -4.23801, 5.36992, 0, 0, 0, 0, -5.83147, 8.55531 ] + }, + { + "time": 1, + "offset": 8, + "vertices": [ 3.69298, 2.37572, -7.16969, 18.79732, -12.78161, 14.7778, -12.75775, 6.50514, -3.13475, 1.98906, -0.44401, 0.36629, 0, 0, -3.80085, 2.98474 ] + } + ] + }, + "pelvis": { + "pelvis": [ + { "time": 0 }, + { + "time": 0.1333, + "offset": 6, + "vertices": [ -0.68989, -4.13283 ] + }, + { + "time": 0.3333, + "offset": 6, + "vertices": [ -1.04945, -3.10476 ] + }, + { + "time": 0.7, + "offset": 6, + "vertices": [ -1.4245, -6.30616 ] + }, + { + "time": 0.8666, + "offset": 6, + "vertices": [ -1.13541, -1.79035 ] + }, + { "time": 1 } + ] + }, + "right foot": { + "right foot": [ + { "time": 0 }, + { + "time": 0.1333, + "offset": 2, + "vertices": [ -2.81258, 2.63114, -2.35238, 3.89441, -1.99921, 4.8639, -0.93273, 5.57982, -0.48886, 5.09854, -0.34812, 3.42912, -0.17445, 1.36898, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.31305, 1.91371, -1.32986, 3.65703 ] + }, + { + "time": 0.2333, + "offset": 2, + "vertices": [ -6.39088, 6.41245, -7.74575, 8.27191, -7.02471, 11.35894, -4.0347, 13.93454, -2.50399, 12.62962, -1.46124, 7.58915, -0.17445, 1.36898, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.84765, 2.61215, -4.53955, 7.92357 ] + }, + { + "time": 0.3, + "offset": 2, + "vertices": [ -8.27184, 6.68821, -9.29764, 10.13797, -8.62231, 14.71339, -4.58629, 18.81939, -2.20304, 17.10709, -0.07794, 9.9046, 2.54451, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.94624, 2.38007, -4.59398, 10.01888 ] + }, + { + "time": 0.3666, + "offset": 2, + "vertices": [ -10.47683, 9.44175, -13.36882, 12.40982, -14.32568, 16.94392, -9.24462, 23.55674, -5.51711, 21.51377, -1.19581, 11.53192, 2.54451, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.14847, 2.29389, -6.63418, 11.37127 ] + }, + { + "time": 0.5, + "offset": 2, + "vertices": [ -5.42473, 4.36854, -10.59004, 7.04468, -11.64251, 11.55845, -6.19665, 20.12805, -1.45497, 18.05411, 4.86619, 6.41678, 2.81462, 0.27601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.96412, 4.94829 ] + }, + { "time": 0.6333 }, + { + "time": 0.7333, + "offset": 4, + "vertices": [ 1.31462, -6.84099, -0.87905, -12.54479, -5.9851, -14.08367, -7.15892, -11.63193, -5.6792, -4.83544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.06163, -6.93844 ] + }, + { + "time": 0.8, + "offset": 4, + "vertices": [ 0.65731, -3.42049, -0.43952, -6.27239, -2.99255, -7.04183, -3.57946, -5.81596, -2.83959, -2.41772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.79687, -1.2802, 0, 0, 0, 0, -1.03081, -3.46922 ] + }, + { "time": 0.8666 } + ] + }, + "right hand": { + "right hand": [ + { + "time": 0, + "offset": 4, + "vertices": [ -1.48416, 0.34736, 0, 0, 1.31152, 0.08085, 1.60295, 0.09881, 0.13673, 0.1547, 0, 0, 0, 0, -0.72862, -0.0449 ] + }, + { "time": 0.5 }, + { + "time": 1, + "offset": 4, + "vertices": [ -1.48416, 0.34736, 0, 0, 1.31152, 0.08085, 1.60295, 0.09881, 0.13673, 0.1547, 0, 0, 0, 0, -0.72862, -0.0449 ] + } + ] + }, + "right lower leg": { + "right lower leg": [ + { "time": 0 }, + { + "time": 0.6, + "offset": 6, + "vertices": [ 1.80396, -1.56552 ] + }, + { "time": 1 } + ] + }, + "right upper leg": { + "right upper leg": [ + { + "time": 0, + "vertices": [ -6.03856, -1.46324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34684, -1.93101, -1.86047, -5.05265, -2.5014, -3.09984 ] + }, + { "time": 0.3333 }, + { + "time": 0.8666, + "offset": 14, + "vertices": [ 0.13424, -2.35377, -1.33317, -5.99572, -1.35861, -4.43323 ] + }, + { + "time": 1, + "vertices": [ -6.03856, -1.46324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34684, -1.93101, -1.86047, -5.05265, -2.5014, -3.09984 ] + } + ] + }, + "torso": { + "torso": [ + { + "time": 0, + "offset": 14, + "vertices": [ -1.48952, -0.24021, -2.72312, -2.15489, -0.51183, -3.39752, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0964, -2.61458, 0, 0, 0.57686, -1.24874, 0, 0, 0, 0, -2.11251, -3.29932 ] + }, + { + "time": 0.1333, + "offset": 14, + "vertices": [ 1.31318, -0.59727, -0.97944, -1.62934, 0.74861, -0.6123, -1.44598, 1.97515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.65701, -3.95221, 0, 0, -1.46987, -0.31373, 0, 0, 0, 0, -3.31756, -3.5535, -2.56329, 0.29673 ] + }, + { + "time": 0.3, + "offset": 14, + "vertices": [ 6.03761, -3.13561, 7.55475, -1.38111, 6.79747, 0.31171, 4.23503, 1.14012, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.07575, -5.16824, 0, 0, 4.0041, 0.27245, 0, 0, 0, 0, 3.4376, -3.52286 ] + }, + { + "time": 0.5, + "offset": 14, + "vertices": [ 2.25942, -0.87202, 2.575, -0.56861, 3.17112, -0.57003, 1.48704, 0.9924, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.22451, -4.43862, 0, 0, 1.48691, 0.01586, 0, 0, 0, 0, 0.31388, -3.28095, -1.53797, 0.17803 ] + }, + { + "time": 0.6333, + "offset": 14, + "vertices": [ 0.75002, -1.51701, -0.97944, -1.62934, 0.74861, -0.6123, -1.44598, 1.97515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.65701, -3.95221, 0, 0, -1.46987, -0.31373, 0, 0, 0, 0, -3.31756, -3.5535, -2.56329, 0.29673 ] + }, + { + "time": 0.8666, + "offset": 14, + "vertices": [ 0.62202, -1.26262, 0.38489, -2.20701, 3.25048, -0.50042, 2.41108, 2.39315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.6639, -3.10099, 0, 0, 2.30655, -1.15196, 0, 0, 0, 0, -0.07676, -3.63497, -0.9321, 0.1079 ] + }, + { + "time": 1, + "offset": 14, + "vertices": [ -1.48952, -0.24021, -2.72312, -2.15489, -0.51183, -3.39752, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0964, -2.61458, 0, 0, 0.57686, -1.24874, 0, 0, 0, 0, -2.11251, -3.29932 ] + } + ] + }, + "undie straps": { + "undie straps": [ + { + "time": 0, + "offset": 2, + "vertices": [ -1.77696, 0.54759, -0.96145, -1.03793, -0.39148, -0.24071, -1.77696, 0.54759 ] + }, + { + "time": 0.1333, + "offset": 2, + "vertices": [ -2.25683, -1.03177, -1.49719, -4.23861, -0.74469, -2.84906, -1.90072, 0.54477 ] + }, + { + "time": 0.3333, + "offset": 2, + "vertices": [ -2.37974, -0.05431, -0.49433, 0.19436, -0.90861, 1.16519, -1.60956, 2.70798, 0.96186, 0.80615 ] + }, + { + "time": 0.7, + "offset": 2, + "vertices": [ -0.91714, -2.76567, -0.62214, -3.63489, -0.8494, -2.26772, -2.56076, 0.5297 ] + }, + { + "time": 0.8666, + "offset": 2, + "vertices": [ -2.56076, 0.5297, -1.58064, 0.32031, -1.3847, 0.32476, -2.56076, 0.5297 ] + }, + { + "time": 1, + "offset": 2, + "vertices": [ -1.77696, 0.54759, -0.80128, 0.53413, -0.80128, 0.53413, -1.77696, 0.54759 ] + } + ] + }, + "undies": { + "undies": [ + { + "time": 0, + "vertices": [ 0.43098, 0.722, 10.60295, -0.11699, 2.29598, 0, 2.29598, 0, 2.29598, 0, 0.58798, 0.24399, -2.40018, -0.65335, -2.2782, -0.77533, 2.29598, 0, 0.58798, -0.48799, 4.98697, -0.11699, 6.50796, -0.23399 ] + }, + { + "time": 0.1333, + "vertices": [ 0.72659, 0.43319, 7.20416, -0.1638, 1.37759, 0, 1.37759, 0, 1.37759, 0, 1.25279, 0.0464, -0.99861, -2.95085, -1.37542, -3.07404, 1.37759, 0, 0.35279, -0.29279, 2.99218, -0.07019, 3.90478, -0.14039 ] + }, + { + "time": 0.3333, + "vertices": [ 1.16999, 0, 2.10599, -0.234, 0, 0, 0, 0, 0, 0, 2.24999, -0.24999, -0.4344, 0.60551, -1.55939, 0.48051 ] + }, + { + "time": 0.5333, + "vertices": [ 1.16999, 0, -0.234, -0.93599, -2.92499, 0.35099, 0, 0, 0, 0, 0.49999, -0.24999, -0.64078, -2.07914, -0.64078, -2.07914 ] + }, + { + "time": 0.7, + "vertices": [ 1.8627, -0.11514, 4.66326, -0.09099, -1.76428, 0.21171, 0, 0, -0.56832, 0.32832, -1.13833, -1.1511, -2.19996, -3.47068, -1.29718, -3.47068, 0, 0, 0, 0, 1.58785, -0.04642, 2.65941, 0.16714 ] + }, + { + "time": 0.8333, + "vertices": [ 2.41687, -0.20725, 8.58108, 0.585, -0.83571, 0.10028, 0, 0, -1.02299, 0.59098, -2.44899, -1.872, -1.62499, 0, 0, 0, 0, 0, 0, 0, 2.85813, -0.08356, 4.78695, 0.30086 ] + }, + { + "time": 0.8666, + "vertices": [ 2.01969, -0.0214, 8.98545, 0.4446, -0.20937, 0.08022, 0.45919, 0, -0.35919, 0.47279, -1.84159, -1.4488, -0.79153, 1.2642, 0.53285, 1.23981, 0.45919, 0, 0.11759, -0.09759, 3.2839, -0.09025, 5.13115, 0.19388 ] + }, + { + "time": 1, + "vertices": [ 0.43098, 0.722, 10.60295, -0.11699, 2.29598, 0, 2.29598, 0, 2.29598, 0, 0.58798, 0.24399, -2.40018, -0.65335, -2.2782, -0.77533, 2.29598, 0, 0.58798, -0.48799, 4.98697, -0.11699, 6.50796, -0.23399 ] + } + ] + } + } + } + } +} +} \ No newline at end of file diff --git a/spine-ts/webgl/example/assets/goblins-mesh.png b/spine-ts/webgl/example/assets/goblins-mesh.png new file mode 100644 index 000000000..fc524c564 Binary files /dev/null and b/spine-ts/webgl/example/assets/goblins-mesh.png differ diff --git a/spine-ts/webgl/example/assets/raptor.atlas b/spine-ts/webgl/example/assets/raptor.atlas new file mode 100644 index 000000000..11728a52d --- /dev/null +++ b/spine-ts/webgl/example/assets/raptor.atlas @@ -0,0 +1,279 @@ + +raptor.png +size: 1024,1024 +format: RGBA8888 +filter: Linear,Linear +repeat: none +back_arm + rotate: true + xy: 140, 191 + size: 46, 29 + orig: 46, 29 + offset: 0, 0 + index: -1 +back_bracer + rotate: true + xy: 167, 317 + size: 39, 28 + orig: 39, 28 + offset: 0, 0 + index: -1 +back_hand + rotate: false + xy: 167, 358 + size: 36, 34 + orig: 36, 34 + offset: 0, 0 + index: -1 +back_knee + rotate: false + xy: 299, 478 + size: 49, 67 + orig: 49, 67 + offset: 0, 0 + index: -1 +back_thigh + rotate: true + xy: 167, 437 + size: 39, 24 + orig: 39, 24 + offset: 0, 0 + index: -1 +eyes_closed + rotate: true + xy: 2, 2 + size: 47, 45 + orig: 47, 45 + offset: 0, 0 + index: -1 +eyes_open + rotate: true + xy: 49, 2 + size: 47, 45 + orig: 47, 45 + offset: 0, 0 + index: -1 +eyes_surprised + rotate: true + xy: 96, 2 + size: 47, 45 + orig: 47, 45 + offset: 0, 0 + index: -1 +front_arm + rotate: false + xy: 419, 544 + size: 48, 30 + orig: 48, 30 + offset: 0, 0 + index: -1 +front_bracer + rotate: false + xy: 880, 695 + size: 41, 29 + orig: 41, 29 + offset: 0, 0 + index: -1 +front_hand + rotate: true + xy: 167, 394 + size: 41, 38 + orig: 41, 38 + offset: 0, 0 + index: -1 +front_open_hand + rotate: false + xy: 880, 726 + size: 43, 44 + orig: 43, 44 + offset: 0, 0 + index: -1 +front_thigh + rotate: false + xy: 360, 545 + size: 57, 29 + orig: 57, 29 + offset: 0, 0 + index: -1 +gun + rotate: false + xy: 785, 774 + size: 107, 103 + orig: 107, 103 + offset: 0, 0 + index: -1 +gun_nohand + rotate: false + xy: 614, 703 + size: 105, 102 + orig: 105, 102 + offset: 0, 0 + index: -1 +head + rotate: false + xy: 2, 137 + size: 136, 149 + orig: 136, 149 + offset: 0, 0 + index: -1 +lower_leg + rotate: true + xy: 780, 699 + size: 73, 98 + orig: 73, 98 + offset: 0, 0 + index: -1 +mouth_grind + rotate: false + xy: 469, 544 + size: 47, 30 + orig: 47, 30 + offset: 0, 0 + index: -1 +mouth_oooo + rotate: true + xy: 894, 772 + size: 105, 30 + orig: 105, 30 + offset: 0, 0 + index: -1 +mouth_smile + rotate: true + xy: 140, 239 + size: 47, 30 + orig: 47, 30 + offset: 0, 0 + index: -1 +neck + rotate: true + xy: 538, 577 + size: 18, 21 + orig: 18, 21 + offset: 0, 0 + index: -1 +raptor_arm_back + rotate: false + xy: 940, 936 + size: 82, 86 + orig: 82, 86 + offset: 0, 0 + index: -1 +raptor_body + rotate: false + xy: 2, 737 + size: 610, 285 + orig: 610, 285 + offset: 0, 0 + index: -1 +raptor_front_arm + rotate: true + xy: 195, 464 + size: 81, 102 + orig: 81, 102 + offset: 0, 0 + index: -1 +raptor_front_leg + rotate: false + xy: 2, 478 + size: 191, 257 + orig: 191, 257 + offset: 0, 0 + index: -1 +raptor_hindleg_back + rotate: false + xy: 614, 807 + size: 169, 215 + orig: 169, 215 + offset: 0, 0 + index: -1 +raptor_horn + rotate: false + xy: 360, 655 + size: 182, 80 + orig: 182, 80 + offset: 0, 0 + index: -1 +raptor_horn_back + rotate: false + xy: 360, 576 + size: 176, 77 + orig: 176, 77 + offset: 0, 0 + index: -1 +raptor_jaw + rotate: false + xy: 785, 879 + size: 153, 143 + orig: 153, 143 + offset: 0, 0 + index: -1 +raptor_saddle_noshadow + rotate: false + xy: 2, 288 + size: 163, 188 + orig: 163, 188 + offset: 0, 0 + index: -1 +raptor_saddle_strap_front + rotate: false + xy: 721, 710 + size: 57, 95 + orig: 57, 95 + offset: 0, 0 + index: -1 +raptor_saddle_strap_rear + rotate: true + xy: 940, 880 + size: 54, 74 + orig: 54, 74 + offset: 0, 0 + index: -1 +raptor_saddle_w_shadow + rotate: false + xy: 195, 547 + size: 163, 188 + orig: 163, 188 + offset: 0, 0 + index: -1 +raptor_tongue + rotate: true + xy: 544, 649 + size: 86, 64 + orig: 86, 64 + offset: 0, 0 + index: -1 +stirrup_back + rotate: true + xy: 140, 145 + size: 44, 35 + orig: 44, 35 + offset: 0, 0 + index: -1 +stirrup_front + rotate: false + xy: 538, 597 + size: 45, 50 + orig: 45, 50 + offset: 0, 0 + index: -1 +stirrup_strap + rotate: false + xy: 350, 497 + size: 49, 46 + orig: 49, 46 + offset: 0, 0 + index: -1 +torso + rotate: true + xy: 610, 647 + size: 54, 91 + orig: 54, 91 + offset: 0, 0 + index: -1 +visor + rotate: false + xy: 2, 51 + size: 131, 84 + orig: 131, 84 + offset: 0, 0 + index: -1 diff --git a/spine-ts/webgl/example/assets/raptor.json b/spine-ts/webgl/example/assets/raptor.json new file mode 100644 index 000000000..d2b55b74c --- /dev/null +++ b/spine-ts/webgl/example/assets/raptor.json @@ -0,0 +1,2621 @@ +{ +"skeleton": { "hash": "/7FMTV1eoFH7zhIaaG8BAH+NQOw", "spine": "3.4.00", "width": 1223.72, "height": 1055.62, "images": "./images/" }, +"bones": [ + { "name": "root" }, + { "name": "hip", "parent": "root", "rotation": 3.15, "x": -136.78, "y": 415.47, "color": "fbff00ff" }, + { "name": "torso1", "parent": "hip", "length": 126.25, "rotation": -4.97, "x": 30.03, "y": -0.4, "color": "eaff00ff" }, + { "name": "saddle", "parent": "torso1", "length": 50.91, "rotation": 91.8, "x": 4.56, "y": 71.86, "color": "ff7300ff" }, + { "name": "spineboy_hip", "parent": "saddle", "length": 0.52, "rotation": 90.01, "x": 81.88, "y": 2.68, "color": "ffffffff" }, + { + "name": "spineboy_torso", + "parent": "spineboy_hip", + "length": 122.45, + "rotation": -75.85, + "x": 1.05, + "y": -2.1, + "color": "ffffffff" + }, + { + "name": "back_arm", + "parent": "spineboy_torso", + "length": 67.21, + "rotation": -120.89, + "x": 96.33, + "y": -38.46, + "color": "ffffffff" + }, + { "name": "back_bracer", "parent": "back_arm", "length": 43.68, "rotation": 17.48, "x": 67.21, "y": -0.31, "color": "ffffffff" }, + { + "name": "back_hand", + "parent": "back_bracer", + "length": 41.97, + "rotation": 9.2, + "x": 43.68, + "y": 0.06, + "inheritRotation": false, + "color": "ffffffff" + }, + { "name": "back_thigh", "parent": "spineboy_hip", "length": 71.15, "rotation": 160.75, "x": -9.57, "y": 2.31, "color": "ffffffff" }, + { "name": "back_knee", "parent": "back_thigh", "length": 97.17, "rotation": -54.97, "x": 71.15, "y": -0.28, "color": "ffffffff" }, + { + "name": "front_arm", + "parent": "spineboy_torso", + "length": 74.51, + "rotation": -118.16, + "x": 101.37, + "y": 9.78, + "color": "ffffffff" + }, + { "name": "torso2", "parent": "torso1", "length": 121.2, "rotation": 39.84, "x": 126.25, "y": -0.37, "color": "eaff00ff" }, + { "name": "front_arm1", "parent": "torso2", "length": 109.99, "rotation": 224.54, "x": 46.37, "y": -84.61, "color": "15ff00ff" }, + { "name": "front_arm2", "parent": "front_arm1", "length": 86.33, "rotation": 105.23, "x": 109.99, "y": 0.2, "color": "15ff00ff" }, + { "name": "neck", "parent": "torso2", "length": 70.59, "rotation": 41.37, "x": 121.19, "y": 0.34, "color": "eaff00ff" }, + { "name": "head", "parent": "neck", "length": 105.5, "rotation": 9.82, "x": 70.59, "y": 0.03, "color": "eaff00ff" }, + { "name": "horn_front", "parent": "head", "length": 87.48, "rotation": 49.36, "x": 82.09, "y": -221.36, "color": "15ff00ff" }, + { "name": "front_arm_target", "parent": "horn_front", "rotation": -138.59, "x": 294.58, "y": 234.17, "color": "15ff00ff" }, + { "name": "front_bracer", "parent": "front_arm", "length": 39.85, "rotation": 20.3, "x": 74.52, "y": -0.41, "color": "ffffffff" }, + { "name": "front_leg1", "parent": "hip", "length": 251.74, "rotation": -51.5, "x": 27.36, "y": -28.27, "color": "15ff00ff" }, + { "name": "front_leg2", "parent": "front_leg1", "length": 208.54, "rotation": 261.93, "x": 251.03, "y": 0.16, "color": "15ff00ff" }, + { "name": "front_leg3", "parent": "front_leg2", "length": 118.18, "rotation": 85.46, "x": 208.5, "y": -1.63, "color": "15ff00ff" }, + { + "name": "front_foot1", + "parent": "front_leg3", + "length": 57.79, + "rotation": 54.46, + "x": 118.19, + "y": -0.79, + "scaleX": 1.126, + "color": "15ff00ff" + }, + { + "name": "front_foot2", + "parent": "front_foot1", + "length": 56.19, + "rotation": -2.15, + "x": 57.78, + "y": -0.02, + "scaleX": 0.73, + "scaleY": 0.823, + "inheritRotation": false, + "color": "15ff00ff" + }, + { + "name": "front_foot3", + "parent": "front_foot2", + "length": 129.88, + "rotation": -2.7, + "x": 49.71, + "y": 20.65, + "scaleX": 1.154, + "color": "15ff00ff" + }, + { "name": "front_foot_goal", "parent": "root", "rotation": -0.94, "x": -45.79, "y": -28.67, "color": "ff0000ff" }, + { "name": "front_hand", "parent": "front_arm2", "length": 47.55, "rotation": -56.83, "x": 86.33, "y": 0.06, "color": "15ff00ff" }, + { + "name": "front_hand2", + "parent": "front_bracer", + "length": 58.18, + "rotation": 13.9, + "x": 39.98, + "y": -0.89, + "inheritRotation": false, + "color": "ffffffff" + }, + { "name": "front_leg_goal", "parent": "front_foot_goal", "x": -106.06, "y": 115.58, "color": "ff0000ff" }, + { + "name": "front_thigh", + "parent": "spineboy_hip", + "length": 77.79, + "rotation": 163.34, + "x": 15.51, + "y": 17.01, + "color": "ffffffff" + }, + { + "name": "gun", + "parent": "spineboy_hip", + "length": 181.35, + "rotation": 107.11, + "x": 16.86, + "y": -7.89, + "scaleX": 0.816, + "scaleY": 0.816, + "color": "ffffffff" + }, + { "name": "neck2", "parent": "spineboy_torso", "length": 32.04, "rotation": -45.22, "x": 113.44, "y": -15.21, "color": "ffffffff" }, + { "name": "head2", "parent": "neck2", "length": 249.64, "rotation": 11.65, "x": 23.01, "y": 3.47, "color": "ffffffff" }, + { "name": "horn_rear", "parent": "head", "length": 73.78, "rotation": 44.31, "x": 99.27, "y": -226.79, "color": "e07800ff" }, + { "name": "jaw", "parent": "head", "length": 203.76, "rotation": -140.14, "x": 29.36, "y": -40.15, "color": "ffff00ff" }, + { "name": "lower_leg", "parent": "front_thigh", "length": 111.5, "rotation": -49.62, "x": 77.92, "y": -0.1, "color": "ffffffff" }, + { "name": "rear_arm1", "parent": "torso2", "length": 109.56, "rotation": -124.71, "x": 57.05, "y": -95.38, "color": "e07800ff" }, + { "name": "rear_arm2", "parent": "rear_arm1", "length": 85.8, "rotation": 123.56, "x": 109.56, "color": "e07800ff" }, + { "name": "rear_arm_target", "parent": "horn_rear", "rotation": -133.55, "x": 232.68, "y": 245.84, "color": "e07800ff" }, + { "name": "rear_leg1", "parent": "hip", "length": 226.27, "rotation": -54.76, "x": 55.19, "y": -71.25, "color": "e07800ff" }, + { "name": "rear_leg2", "parent": "rear_leg1", "length": 172.58, "rotation": -92.25, "x": 226.32, "y": 0.23, "color": "e07800ff" }, + { "name": "rear_leg3", "parent": "rear_leg2", "length": 103.05, "rotation": 82.81, "x": 172.31, "y": 2.21, "color": "e07800ff" }, + { "name": "rear_foot1", "parent": "rear_leg3", "length": 84.51, "rotation": 75.43, "x": 102.37, "y": -0.02, "color": "e07800ff" }, + { + "name": "rear_foot2", + "parent": "rear_foot1", + "length": 102.31, + "rotation": -6.13, + "x": 84.49, + "y": -0.34, + "inheritRotation": false, + "color": "e07800ff" + }, + { "name": "rear_foot_goal", "parent": "root", "x": 33.43, "y": 30.81, "color": "ff0000ff" }, + { "name": "rear_hand", "parent": "rear_arm2", "length": 45.8, "rotation": -76.28, "x": 85.8, "y": 0.1, "color": "e07800ff" }, + { "name": "rear_leg_goal", "parent": "rear_foot_goal", "x": -127.51, "y": 75.99, "color": "ff0000ff" }, + { + "name": "saddle_strap_front1", + "parent": "saddle", + "length": 97.27, + "rotation": -148.11, + "x": -27.36, + "y": -73.38, + "color": "ff7300ff" + }, + { + "name": "saddle_strap_front2", + "parent": "saddle_strap_front1", + "length": 102.74, + "rotation": -11.13, + "x": 97.29, + "y": 0.3, + "color": "ff7300ff" + }, + { + "name": "saddle_strap_rear1", + "parent": "saddle", + "length": 38.62, + "rotation": 151.13, + "x": -33.34, + "y": 87.32, + "color": "ff7300ff" + }, + { "name": "saddle_strap_rear2", "parent": "saddle_strap_rear1", "length": 54.36, "x": 38.63, "y": -0.02, "color": "ff7300ff" }, + { + "name": "saddle_strap_rear3", + "parent": "saddle_strap_rear2", + "length": 44.04, + "rotation": 3.63, + "x": 54.86, + "y": 0.19, + "color": "ff7300ff" + }, + { "name": "spineboy_front_arm_goal", "parent": "saddle", "x": -50.7, "y": -96.93, "color": "ff0004ff" }, + { "name": "spineboy_rear_arm_goal", "parent": "saddle", "x": -30.43, "y": -100.08, "color": "ff0001ff" }, + { "name": "stirrup", "parent": "saddle", "length": 78.17, "rotation": -68.85, "x": -81.94, "y": -103.38, "color": "ff7300ff" }, + { "name": "stirrup_strap1", "parent": "saddle", "length": 43.69, "rotation": -135, "x": -20.38, "y": -29.37, "color": "ff7300ff" }, + { "name": "stirrup_strap2", "parent": "stirrup_strap1", "length": 51.62, "rotation": 9.38, "x": 43.7, "color": "ff7300ff" }, + { "name": "tail1", "parent": "hip", "length": 162.53, "rotation": 162.92, "x": -20.86, "y": 6.87, "color": "eaff00ff" }, + { "name": "tail2", "parent": "tail1", "length": 130.02, "rotation": 30.3, "x": 162.53, "y": -0.82, "color": "eaff00ff" }, + { "name": "tail3", "parent": "tail2", "length": 141.06, "rotation": 6.88, "x": 130.02, "y": 0.1, "color": "eaff00ff" }, + { "name": "tail4", "parent": "tail3", "length": 126.25, "rotation": -18.86, "x": 141.05, "y": 0.64, "color": "eaff00ff" }, + { "name": "tail5", "parent": "tail4", "length": 91.06, "rotation": -22.34, "x": 126.25, "y": -0.47, "color": "eaff00ff" }, + { "name": "tongue1", "parent": "head", "length": 55.11, "rotation": -129.04, "x": 20.81, "y": -104.75, "color": "ffff00ff" }, + { "name": "tongue2", "parent": "tongue1", "length": 44.66, "rotation": 8.93, "x": 55.59, "y": 0.93, "color": "fff200ff" }, + { "name": "tongue3", "parent": "tongue2", "length": 43.64, "rotation": 12.86, "x": 44.26, "y": -0.2, "color": "fff200ff" } +], +"slots": [ + { "name": "back_hand", "bone": "back_hand", "attachment": "back_hand" }, + { "name": "back_arm", "bone": "back_arm", "attachment": "back_arm" }, + { "name": "back_bracer", "bone": "back_bracer", "attachment": "back_bracer" }, + { "name": "back_knee", "bone": "back_knee", "attachment": "back_knee" }, + { "name": "raptor_horn_back", "bone": "horn_rear", "attachment": "raptor_horn_back" }, + { "name": "raptor_tongue", "bone": "root", "attachment": "raptor_tongue" }, + { "name": "raptor_hindleg_back", "bone": "rear_leg1", "attachment": "raptor_hindleg_back" }, + { "name": "raptor_arm_back", "bone": "root", "attachment": "raptor_arm_back" }, + { "name": "raptor_body", "bone": "torso1", "attachment": "raptor_body" }, + { "name": "back_thigh", "bone": "back_thigh", "attachment": "back_thigh" }, + { "name": "raptor_saddle_strap_front", "bone": "saddle_strap_front1", "attachment": "raptor_saddle_strap_front" }, + { "name": "raptor_saddle_strap_rear", "bone": "saddle_strap_rear1", "attachment": "raptor_saddle_strap_rear" }, + { "name": "raptor_saddle_w_shadow", "bone": "saddle", "attachment": "raptor_saddle_w_shadow" }, + { "name": "raptor_saddle_noshadow", "bone": "saddle" }, + { "name": "raptor_front_arm", "bone": "root", "attachment": "raptor_front_arm" }, + { "name": "raptor_front_leg", "bone": "front_leg1", "attachment": "raptor_front_leg" }, + { "name": "raptor_jaw", "bone": "jaw", "attachment": "raptor_jaw" }, + { "name": "neck", "bone": "neck2", "attachment": "neck" }, + { "name": "spineboy_torso", "bone": "spineboy_torso", "attachment": "torso" }, + { "name": "head", "bone": "head2", "attachment": "head" }, + { "name": "eyes_open", "bone": "head2", "attachment": "eyes_open" }, + { "name": "mouth_smile", "bone": "head2", "attachment": "mouth_smile" }, + { "name": "visor", "bone": "head2", "attachment": "visor" }, + { "name": "raptor_horn", "bone": "horn_front", "attachment": "raptor_horn" }, + { "name": "front_thigh", "bone": "front_thigh", "attachment": "front_thigh" }, + { "name": "stirrup_back", "bone": "stirrup", "attachment": "stirrup_back" }, + { "name": "lower_leg", "bone": "lower_leg", "attachment": "lower_leg" }, + { "name": "stirrup_strap", "bone": "stirrup", "attachment": "stirrup_strap" }, + { "name": "stirrup_front", "bone": "stirrup", "attachment": "stirrup_front" }, + { "name": "gun", "bone": "gun", "attachment": "gun_nohand" }, + { "name": "front_arm", "bone": "front_arm", "attachment": "front_arm" }, + { "name": "front_bracer", "bone": "front_bracer", "attachment": "front_bracer" }, + { "name": "front_hand", "bone": "front_hand2", "attachment": "front_hand" } +], +"ik": [ + { + "name": "front_arm_goal", + "bones": [ "front_arm", "front_bracer" ], + "target": "front_arm_target" + }, + { + "name": "front_foot_goal", + "bones": [ "front_leg3", "front_foot1" ], + "target": "front_foot_goal" + }, + { + "name": "front_leg_goal", + "bones": [ "front_leg1", "front_leg2" ], + "target": "front_leg_goal", + "bendPositive": false + }, + { + "name": "rear_arm_goal", + "bones": [ "back_arm", "back_bracer" ], + "target": "rear_arm_target" + }, + { + "name": "rear_foot_goal", + "bones": [ "rear_leg3", "rear_foot1" ], + "target": "rear_foot_goal" + }, + { + "name": "rear_leg_goal", + "bones": [ "rear_leg1", "rear_leg2" ], + "target": "rear_leg_goal", + "bendPositive": false + }, + { + "name": "spineboy_front_leg_goal", + "bones": [ "front_thigh", "lower_leg" ], + "target": "spineboy_front_arm_goal", + "bendPositive": false + }, + { + "name": "spineboy_rear_leg_goal", + "bones": [ "back_thigh", "back_knee" ], + "target": "spineboy_rear_arm_goal", + "bendPositive": false + }, + { + "name": "stirrup", + "bones": [ "stirrup_strap1", "stirrup_strap2" ], + "target": "stirrup" + } +], +"skins": { + "default": { + "back_arm": { + "back_arm": { "x": 29.71, "y": 2.04, "rotation": 16.75, "width": 91, "height": 57 } + }, + "back_bracer": { + "back_bracer": { "x": 13.19, "y": -4.28, "rotation": -0.72, "width": 77, "height": 55 } + }, + "back_hand": { + "back_hand": { "x": 18.6, "y": 4.23, "rotation": -10.99, "width": 72, "height": 68 } + }, + "back_knee": { + "back_knee": { "x": 45.77, "y": 20.47, "rotation": 74.22, "width": 97, "height": 134 } + }, + "back_thigh": { + "back_thigh": { "x": 37.85, "y": -4.36, "rotation": 19.24, "width": 78, "height": 47 } + }, + "eyes_open": { + "eyes_open": { "x": 93.23, "y": -25.45, "rotation": -70.57, "width": 93, "height": 89 } + }, + "front_arm": { + "front_arm": { "x": 31.38, "y": 5.09, "rotation": 14.02, "width": 96, "height": 60 } + }, + "front_bracer": { + "front_bracer": { "x": 11.68, "y": -1.36, "rotation": -6.28, "width": 81, "height": 58 } + }, + "front_hand": { + "front_hand": { "x": 35.7, "y": 7.84, "rotation": -13.96, "width": 82, "height": 75 }, + "front_open_hand": { "x": 42.54, "y": 4.62, "rotation": 62.19, "width": 86, "height": 87 }, + "gun": { "x": 98.9, "y": 22.97, "rotation": 56.34, "width": 213, "height": 206 } + }, + "front_thigh": { + "front_thigh": { "x": 45.7, "y": -3.1, "rotation": 16.65, "width": 114, "height": 58 } + }, + "gun": { + "gun_nohand": { + "type": "mesh", + "uvs": [ 0.71081, 0.16149, 0.85807, 0.41784, 1, 0.6649, 1, 1, 0.71457, 1, 0.49802, 0.6905, 0.30182, 0.41009, 0, 0.58226, 0, 0.1174, 0.27187, 0.12429, 0.24857, 0, 0.36658, 0, 0.61804, 0, 0.70575, 0.53546, 0.53668, 0.26855 ], + "triangles": [ 3, 13, 2, 5, 13, 4, 3, 4, 13, 13, 6, 14, 13, 5, 6, 13, 1, 2, 6, 8, 9, 6, 7, 8, 13, 14, 1, 14, 0, 1, 6, 9, 14, 9, 11, 14, 14, 12, 0, 14, 11, 12, 9, 10, 11 ], + "vertices": [ 23.48, 50.63, 83.86, 46.32, 142.05, 42.17, 197.91, 3.34, 163.7, -45.86, 86.15, -47.34, 15.9, -48.68, 8.42, -120.68, -69.06, -66.81, -35.32, -20.73, -58.83, -10.35, -44.69, 9.99, -14.55, 53.35, 85.21, 6.43, 20.45, 8.2 ], + "hull": 13, + "edges": [ 14, 12, 6, 8, 6, 4, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 8, 10, 10, 12, 6, 26, 10, 26, 4, 2, 26, 2, 22, 28, 28, 26, 12, 28, 2, 0, 0, 24, 28, 0, 18, 12 ], + "width": 210, + "height": 203 + } + }, + "head": { + "head": { "x": 132.33, "y": 1.19, "rotation": -70.57, "width": 271, "height": 298 } + }, + "lower_leg": { + "lower_leg": { "x": 76.2, "y": 22.2, "rotation": 66.28, "width": 146, "height": 195 } + }, + "mouth_smile": { + "mouth_smile": { "x": 27.66, "y": -31.33, "rotation": -70.57, "width": 93, "height": 59 } + }, + "neck": { + "neck": { "x": 15.09, "y": -1.66, "rotation": -58.91, "width": 36, "height": 41 } + }, + "raptor_arm_back": { + "raptor_arm_back": { + "type": "mesh", + "uvs": [ 0.38711, 0.29362, 0.31382, 0.46513, 0.29242, 0.51521, 0.32475, 0.4931, 0.57587, 0.32138, 0.63254, 0.28263, 0.71632, 0.34507, 0.94948, 0.51888, 0.94947, 0.60129, 1, 0.65257, 1, 0.90624, 0.95462, 0.99934, 0.88957, 0.83204, 0.80294, 0.99998, 0.75236, 0.75696, 0.6654, 0.713, 0.62288, 0.63242, 0.58194, 0.65031, 0.22478, 0.80641, 0.07791, 0.73315, 0.07825, 0.66549, 0.07984, 0.34306, 0, 0.29728, 0, 0, 0.32334, 0 ], + "triangles": [ 6, 15, 16, 5, 6, 16, 5, 16, 4, 6, 7, 15, 16, 17, 4, 8, 15, 7, 14, 15, 8, 12, 14, 8, 12, 8, 9, 12, 9, 10, 11, 12, 10, 13, 14, 12, 17, 3, 4, 19, 20, 2, 18, 19, 2, 18, 2, 3, 18, 3, 17, 21, 22, 23, 24, 21, 23, 0, 21, 24, 1, 21, 0, 1, 20, 21, 2, 20, 1 ], + "vertices": [ 2, 37, 36.95, 33.31, 0.91666, 38, 68.53, 41.05, 0.08333, 2, 37, 66.01999, 20.35, 0.76813, 38, 41.41, 24.39, 0.23186, 2, 37, 74.51, 16.57, 0.64468, 38, 33.49, 19.53, 0.35531, 2, 37, 70.89, 21.97, 0.29071, 38, 39.99, 19.45999, 0.70928, 3, 37, 42.77, 63.89, 0.11483, 38, 90.47, 18.95, 0.60854, 46, -17.2, 9, 0.2766, 2, 38, 101.86, 18.83, 0.45955, 46, -14.38, 20.04, 0.54044, 2, 38, 106.47, 2.08, 0.0625, 46, 2.98, 20.56, 0.9375, 1, 46, 51.32, 21.98, 1, 1, 46, 60.41, 11.1, 1, 1, 46, 72.39, 9.60999, 1, 1, 46, 100.37, -23.87, 1, 1, 46, 104.96, -40.9, 1, 1, 46, 78.37, -25.61, 1, 1, 46, 86.05, -56.84, 1, 1, 46, 52.92, -30.04, 1, 2, 38, 62.24, -43.92, 0.0625, 46, 37.18999, -33.33, 0.9375, 2, 38, 64.89, -28.65, 0.3125, 46, 22.98, -27.14, 0.6875, 2, 38, 57.69, -27.17, 0.30612, 46, 19.83, -33.78, 0.69387, 2, 37, 124.19, 3.83, 0.19395, 38, -5.09, -14.23, 0.80604, 2, 37, 110.77, -19.65, 0.3125, 38, -16.87999, 10.1, 0.6875, 2, 37, 99.14, -19.2, 0.51612, 38, -9.93, 19.44, 0.48386, 2, 37, 43.73, -17.03, 0.9375, 38, 23.17, 63.92, 0.0625, 1, 37, 35.41, -29.77, 1, 1, 37, -15.68, -28.02, 1, 1, 37, -13.87, 24.65, 1 ], + "hull": 25, + "edges": [ 44, 46, 44, 42, 38, 36, 32, 30, 30, 28, 28, 26, 24, 22, 18, 16, 16, 14, 46, 48, 38, 4, 6, 4, 6, 36, 42, 40, 40, 38, 4, 2, 2, 0, 40, 2, 10, 32, 36, 34, 34, 32, 10, 8, 8, 6, 34, 8, 14, 12, 12, 10, 12, 30, 18, 20, 22, 20, 26, 24, 48, 0 ], + "width": 163, + "height": 172 + } + }, + "raptor_body": { + "raptor_body": { + "type": "mesh", + "uvs": [ 0.89014, 0.11136, 1, 0.22194, 1, 0.42847, 0.88179, 0.38589, 0.874, 0.47986, 0.84783, 0.51728, 0.82504, 0.54984, 0.82403, 0.61606, 0.82305, 0.67972, 0.74042, 0.86709, 0.61596, 0.93097, 0.49649, 0.90968, 0.41186, 0.71379, 0.36955, 0.70086, 0.32823, 0.68824, 0.30082, 0.69962, 0.27515, 0.71028, 0.25301, 0.71948, 0.22568, 0.73082, 0.20832, 0.72362, 0.19092, 0.7164, 0.15952, 0.70337, 0.1301, 0.69116, 0.09227, 0.67546, 0.06029, 0.63165, 0.02855, 0.58817, 0, 0.49874, 0.05045, 0.53494, 0.08267, 0.54507, 0.11815, 0.55623, 0.14733, 0.54161, 0.17913, 0.52568, 0.20324, 0.5136, 0.22867, 0.50087, 0.24871, 0.47664, 0.27523, 0.44458, 0.32026, 0.39015, 0.37517, 0.35747, 0.43476, 0.32201, 0.4893, 0.35534, 0.56021, 0.39867, 0.61587, 0.40674, 0.67769, 0.4157, 0.69094, 0.31314, 0.69362, 0.14742, 0.79219, 0.08354, 0.51541, 0.74573, 0.62393, 0.75425, 0.70856, 0.7287, 0.76132, 0.63288, 0.7566, 0.49454, 0.80613, 0.27517, 0.65885, 0.59037, 0.53929, 0.54937, 0.42632, 0.52207, 0.3246, 0.55241, 0.22715, 0.618, 0.10574, 0.61341, 0.03969, 0.56109, 0.77916, 0.39461, 0.37556, 0.53721, 0.27743, 0.58416, 0.16958, 0.61582, 0.07259, 0.58715, 0.87545, 0.31683, 0.85488, 0.21417, 0.81012, 0.17403, 0.83214, 0.25662, 0.83823, 0.32214, 0.84622, 0.41719, 0.59954, 0.57003, 0.49074, 0.53763, 0.76917, 0.43888, 0.75912, 0.56845, 0.871, 0.3701, 0.85431, 0.43545, 0.89558, 0.32412, 0.90105, 0.22877, 0.91523, 0.20564, 0.93086, 0.219, 0.93446, 0.25858, 0.91956, 0.2776, 0.9061, 0.26423, 0.9415, 0.25929, 0.93589, 0.21545, 0.91669, 0.19192, 0.89297, 0.22201, 0.90245, 0.28513, 0.92006, 0.281, 0.92143, 0.29619, 0.94856, 0.2643, 0.19894, 0.61694, 0.13973, 0.61469, 0.25158, 0.60156, 0.88779, 0.26675 ], + "triangles": [ 13, 60, 12, 12, 71, 46, 46, 70, 47, 11, 12, 46, 47, 11, 46, 10, 11, 47, 13, 14, 55, 15, 93, 14, 16, 56, 15, 58, 26, 27, 28, 58, 27, 63, 28, 29, 63, 58, 28, 25, 26, 58, 25, 58, 63, 57, 63, 29, 92, 29, 30, 57, 29, 92, 24, 25, 63, 24, 63, 57, 23, 24, 57, 92, 23, 57, 22, 23, 92, 62, 22, 92, 21, 22, 62, 20, 21, 91, 92, 30, 62, 91, 21, 62, 62, 30, 31, 91, 62, 31, 31, 32, 93, 20, 91, 56, 56, 19, 20, 17, 19, 56, 18, 19, 17, 93, 91, 31, 55, 34, 35, 33, 34, 55, 61, 33, 55, 61, 32, 33, 93, 32, 61, 56, 91, 93, 56, 93, 15, 16, 17, 56, 36, 37, 54, 60, 35, 36, 54, 60, 36, 60, 55, 35, 61, 55, 14, 93, 61, 14, 60, 13, 55, 12, 60, 54, 39, 54, 37, 39, 37, 38, 71, 54, 39, 40, 71, 39, 53, 71, 40, 53, 40, 41, 12, 54, 71, 46, 71, 53, 66, 45, 0, 44, 45, 66, 1, 84, 85, 65, 66, 0, 0, 85, 65, 85, 86, 65, 85, 0, 1, 78, 85, 84, 79, 78, 84, 78, 86, 85, 77, 86, 78, 77, 78, 79, 67, 66, 65, 83, 80, 79, 84, 83, 79, 77, 79, 80, 84, 90, 83, 82, 77, 80, 1, 90, 84, 94, 65, 86, 94, 86, 77, 94, 77, 82, 67, 65, 94, 51, 44, 66, 51, 66, 67, 81, 82, 80, 83, 88, 81, 87, 94, 82, 87, 82, 81, 87, 81, 88, 88, 90, 89, 87, 88, 89, 80, 83, 81, 90, 88, 83, 43, 44, 51, 64, 67, 94, 64, 94, 87, 68, 67, 64, 51, 67, 68, 76, 64, 87, 76, 87, 89, 74, 68, 64, 74, 64, 76, 3, 74, 76, 59, 43, 51, 59, 51, 68, 69, 59, 68, 74, 69, 68, 69, 74, 3, 90, 1, 2, 89, 90, 2, 76, 89, 2, 3, 76, 2, 75, 69, 3, 4, 75, 3, 75, 72, 69, 5, 75, 4, 5, 72, 75, 72, 59, 69, 59, 42, 43, 72, 42, 59, 50, 42, 72, 50, 72, 5, 6, 50, 5, 73, 50, 6, 52, 70, 42, 50, 52, 42, 73, 52, 50, 7, 73, 6, 49, 73, 7, 52, 73, 49, 8, 49, 7, 48, 52, 49, 48, 49, 8, 47, 52, 48, 70, 53, 41, 70, 41, 42, 46, 53, 70, 47, 70, 52, 9, 48, 8, 47, 48, 9, 10, 47, 9 ], + "vertices": [ 1, 16, 147.48, -145.48, 1, 1, 16, 89.4, -281.62, 1, 1, 16, -28.24, -285.93, 1, 1, 16, -14.58, -194.68, 1, 4, 12, 238.39, -84.13, 0.20851, 15, 32.09999, -140.85, 0.19336, 16, -61.96, -132.26, 0.42115, 35, 129.57, 6.39, 0.17696, 5, 2, 332.7, 63.71, 0.06905, 12, 199.57, -83.03, 0.29424, 15, 3.69, -114.37, 0.2194, 16, -85.43, -101.32, 0.30859, 35, 127.34, -26.64, 0.1087, 5, 2, 307.08, 43.5, 0.11018, 12, 166.95, -82.12999, 0.37282, 15, -20.18, -92.14, 0.24572, 16, -105.18, -75.33999, 0.21862, 35, 123.08, -64.79, 0.05264, 4, 2, 307.75, 5.7, 0.18627, 12, 143.25, -111.59, 0.58009, 15, -57.43, -98.57, 0.12363, 16, -142.98, -75.33, 0.10999, 2, 2, 308.7, -30.55, 0.25, 12, 120.75, -140.04, 0.75, 2, 2, 213.94, -142.7, 0.75, 12, -23.83, -165.45, 0.25, 3, 2, 64.44999, -187.34, 0.31139, 58, -158.45, 158.33, 0.10379, 1, 84.16, -190.98, 0.5848, 1, 1, -61.47, -178.84, 1, 4, 58, 118.47, 114.74, 0.07383, 59, 17.17, 122.49, 0.17504, 60, -100.71, 132.55, 0.06818, 1, -166.91, -67.94999, 0.68294, 4, 58, 170.4, 123.13, 0.06537, 59, 66.71, 104.77, 0.20999, 60, -53.08, 110.21, 0.12016, 1, -217.69, -61.33, 0.60447, 6, 58, 221.11, 131.31, 0.02179, 59, 115.07, 87.47, 0.23058, 60, -6.58, 88.39, 0.16258, 61, -168.92, 31, 0.02826, 62, -282.82, -90.19, 0.029, 1, -267.66, -55.14, 0.52776, 5, 59, 146.51, 86.08, 0.23635, 60, 26.66, 83.39, 0.19338, 61, -134.99, 41.34, 0.06624, 62, -257.52, -60.65, 0.06962, 1, -298.87, -61.99, 0.43436, 5, 59, 178.73, 86.41, 0.22521, 60, 56.68, 81.29, 0.20997, 61, -107.13, 46.31, 0.11271, 62, -232.44, -51.26, 0.12148, 1, -328.68, -69.24, 0.3306, 5, 59, 203.26, 86.51, 0.21603, 60, 83.06, 77.01999, 0.22457, 61, -79.56, 53.53, 0.13939, 62, -210.89, -28.3, 0.15618, 1, -354.01, -75.41, 0.26379, 5, 59, 238.06, 85.41, 0.20114, 60, 115.65, 74.66, 0.2315, 61, -49.53, 60.58, 0.16455, 62, -185.49, -14.98, 0.19123, 1, -385.33, -83.15, 0.21156, 5, 59, 255.33, 78.85, 0.18224, 60, 133.83, 63.18, 0.23194, 61, -27.04, 56.84, 0.18907, 62, -163.58, -5.26, 0.22658, 1, -406.45, -79.89, 0.17015, 5, 59, 275.48, 71.62, 0.16169, 60, 152.97, 53.58, 0.22885, 61, -5.82, 53.94, 0.21292, 62, -142.85, 0.11, 0.26159, 1, -427.72, -77.47, 0.13493, 5, 59, 313.81, 53.61, 0.14198, 60, 188.04, 35.82, 0.22293, 61, 31.84, 49.3, 0.23478, 62, -106.46, 7.49, 0.29326, 1, -465.96, -72.58999, 0.10702, 5, 59, 345.74, 45.54, 0.12502, 60, 219.6, 19.28, 0.2179, 61, 68.31, 43.02, 0.25622, 62, -70.12999, 18.19, 0.32248, 1, -502.09, -68.19, 0.07835, 4, 59, 390.81, 21.3, 0.11758, 60, 261.62, -3.66, 0.22607, 61, 114.55, 37.83, 0.29087, 62, -26.15, 30.34, 0.36547, 4, 59, 423.87, -11.11, 0.10536, 60, 291.46, -39.06, 0.21954, 61, 154.83, 14.99, 0.30098, 62, 19.91, 25.67, 0.37409, 4, 59, 456.68, -43.27, 0.09949, 60, 321.06, -74.19999, 0.21749, 61, 194.79, -7.66, 0.30788, 62, 65.62, 21.04, 0.37513, 4, 59, 480.34, -100.28, 0.10045, 60, 339.2, -133.2, 0.22026, 61, 232.3, -56.69, 0.31103, 62, 119.7, -8.68999, 0.36824, 4, 59, 424.34, -67.51999, 0.10379, 60, 286.57, -95.27, 0.23087, 61, 169.77, -39.4, 0.30828, 62, 55.51, -18.08, 0.35705, 4, 59, 387.08, -53.84, 0.11505, 60, 250.77, -78.11, 0.2454, 61, 130.24, -35.75, 0.30092, 62, 17.87, -30.67, 0.3386, 4, 59, 346.04, -38.78, 0.13471, 60, 211.34, -59.22, 0.26271, 61, 86.7, -31.72, 0.2888, 62, -23.59, -44.54, 0.31376, 5, 58, 449.17, 125.97, 0.02419, 59, 311.45, -35.25, 0.16384, 60, 175.89, -56.83, 0.2727, 61, 51.53, -43.14, 0.26317, 62, -52.88, -67.87, 0.27607, 5, 58, 418.38, 93.72, 0.05913, 59, 269.72, -40.64, 0.19681, 60, 135.19, -53.82, 0.27688, 61, 13.42, -53.11, 0.23219, 62, -82.03, -93.66, 0.23497, 5, 58, 390.82, 86.58, 0.10638, 59, 241.19, -39.8, 0.2354, 60, 105.59, -52.93, 0.27331, 61, -16.25, -62.16, 0.19459, 62, -108.34, -111.24, 0.19028, 5, 58, 364.8, 62.48, 0.14347, 59, 207.71, -42.14, 0.28099, 60, 73.33, -49.43, 0.26867, 61, -46.11, -70.49, 0.15764, 62, -129.51, -133.56, 0.1492, 5, 58, 345.49, 47.53, 0.18499, 59, 182.34, -50.62, 0.33114, 60, 45.87, -56.62, 0.25881, 61, -71.57, -84.96, 0.1174, 62, -150.85, -153.35, 0.10763, 5, 58, 319.95, 15.15, 0.23755, 59, 145.6, -61.95, 0.39396, 60, 9.60999, -63.26, 0.24619, 61, -101.06, -105.58, 0.06443, 62, -165.65, -187.83, 0.05784, 3, 58, 276.58, -30.61, 0.29942, 59, 85.52, -81.11, 0.46774, 60, -52.01, -76.62, 0.23283, 3, 58, 214.5, -70.36, 0.32855, 59, 11.97, -85.98, 0.48601, 60, -125.69, -74.48, 0.18543, 2, 58, 147.14, -113.5, 0.59565, 59, -67.83999, -91.26, 0.40433, 2, 2, -113.14, 135.84, 0.24192, 58, 91.72, -112.59, 0.75807, 2, 2, -42.12, 116.77, 0.14515, 58, 18.2, -111.17, 0.85484, 1, 2, 44.2, 107.1, 1, 2, 2, 140.09, 96.35, 0.22579, 12, 72.58999, 65.41, 0.7742, 4, 2, 137.69, 169.35, 0.05644, 12, 117.5, 123, 0.24355, 15, 78.3, 94.48, 0.2125, 16, 23.7, 91.74, 0.4875, 2, 15, 171.15, 111.98, 0.25, 16, 118.17, 93.15, 0.75, 1, 16, 158.96, -25.58, 1, 1, 1, -40.63, -86.01, 1, 3, 2, 67.33999, -86.66, 0.33215, 58, -137.02, 59.92, 0.08303, 1, 92.54, -90.61, 0.5848, 2, 2, 170.13, -66.29, 0.75, 12, -8.53, -78.72, 0.25, 2, 2, 231.74, -8.12, 0.4, 12, 76.03, -73.51999, 0.6, 4, 2, 222.04, 70.41, 0.17551, 12, 118.9, -7, 0.55823, 15, -6.58, -3.99, 0.17739, 16, -76.73, 9.18, 0.08884, 1, 16, 50.43, -46.56, 1, 1, 12, -9.88, 20.65, 1, 2, 2, -53.22, 20.53, 0.2, 58, 5.8, -15.09, 0.8, 3, 2, -180.71, 32.22, 0.08564, 58, 132.35, 4.23999, 0.56215, 59, -23.98, 19.01, 0.35219, 3, 58, 246.39, 57.53, 0.30273, 59, 101.61, 10.65, 0.46989, 60, -27.28, 13.2, 0.22737, 5, 58, 346.99, 126.85, 0.13479, 59, 223.17, 22.83, 0.28279, 60, 94.88, 13.77, 0.24481, 61, -47.85, -3.72, 0.17322, 62, -158.02, -73.16, 0.16438, 4, 59, 367.51, -9.96, 0.14656, 60, 235.45, -32.57, 0.23073, 61, 100.06, 1.62, 0.29607, 62, -24.81, -8.63, 0.32661, 4, 59, 440.24, -55.6, 0.10821, 60, 303.52, -84.91, 0.21897, 61, 182.07, -23.8, 0.31097, 62, 60.48, 1.14, 0.36182, 3, 12, 174.99, 22.22, 0.2, 15, 54.82, -19.14, 0.6, 16, -18.79999, -16.2, 0.2, 3, 58, 189.25, 30.83, 0.33253, 59, 38.68, 14.84, 0.48076, 60, -89.52, 23.34, 0.18669, 5, 58, 295.08, 91.08, 0.22891, 59, 160.45, 16.54, 0.38754, 60, 31.85, 13.48, 0.2306, 61, -106.86, -25.89, 0.08042, 62, -203.08, -117.24, 0.0725, 5, 58, 414.43, 146.25, 0.07359, 59, 291.61, 7.27, 0.20198, 60, 161.53, -8.2, 0.23762, 61, 22.27, -1.17999, 0.24024, 62, -94.86, -42.56, 0.24654, 4, 59, 404.01, -32.87, 0.12351, 60, 269.61, -58.84, 0.22261, 61, 141.21, -11.13, 0.30609, 62, 17.98, -3.72, 0.34777, 1, 16, 26.4, -166.06, 1, 1, 16, 87.21, -106.12, 1, 1, 16, 108.19, -49.62, 1, 2, 16, 61.73, -82.12999, 0.50021, 35, 4.42, 52.83, 0.49978, 2, 16, 22.84, -109.4, 0.50021, 35, 51.52, 46.73, 0.49978, 4, 12, 247.12, -50.52, 0.06545, 15, 60.86, -121.4, 0.06069, 16, -30.3, -118, 0.49079, 35, 96.58, 17.21999, 0.38305, 1, 2, 26.73, 14.8, 1, 2, 2, -107.97, 25.67, 0.24192, 58, 60.17, -6.91, 0.75807, 4, 2, 235.53, 102.96, 0.0761, 12, 150.1, 9.35, 0.35533, 15, 27.64, -12.34, 0.41675, 16, -44.43, -4.87, 0.1518, 3, 2, 227.15, 28.49, 0.31015, 12, 95.96, -42.46, 0.60548, 15, -47.23, -15.44, 0.08435, 2, 16, 5.19, -153.1, 0.87618, 35, 90.96, 71.21, 0.12381, 4, 12, 243.13, -60.59, 0.10669, 15, 51.21, -126.33, 0.09893, 16, -40.65, -121.21, 0.47072, 35, 105.71, 17.33, 0.32363, 1, 16, 23.69, -185.21, 1, 1, 16, 79.64, -175.94, 1, 1, 16, 93.96, -187.56, 1, 1, 16, 87.07, -206.55, 1, 1, 16, 64.19999, -216.74, 1, 1, 16, 52.23, -203.68, 1, 1, 16, 59.24, -187.03, 1, 1, 16, 64.26, -223.8, 1, 1, 16, 89.44, -211.41, 1, 1, 16, 102.04, -186.95, 1, 1, 16, 83.1, -166.14, 1, 1, 16, 46.84, -186.41, 1, 1, 16, 50.32, -204.36, 1, 1, 16, 41.7, -206.59, 1, 1, 16, 61.87, -230.97, 1, 5, 58, 374.97, 143.6, 0.10291, 59, 256.29, 17.42, 0.23985, 60, 127.43, 2.07, 0.2431, 61, -13.35, -3.05, 0.20854, 62, -128.14, -55.46, 0.20557, 4, 59, 327.21, 4.42, 0.17789, 60, 196.28, -19.32, 0.24248, 61, 58.71, -1.04999, 0.28055, 62, -62.24, -26.21, 0.29905, 5, 58, 318.32, 113.62, 0.17774, 59, 192.26, 20.14, 0.33383, 60, 64.19, 12.44, 0.24171, 61, -76.55, -13.67, 0.12849, 62, -182.56, -89.31, 0.11821, 2, 16, 56.98, -162.99, 0.89259, 35, 57.54, 112, 0.1074 ], + "hull": 46, + "edges": [ 22, 20, 20, 18, 18, 16, 6, 4, 4, 2, 90, 88, 54, 52, 52, 50, 24, 22, 88, 86, 86, 84, 8, 6, 24, 26, 26, 28, 72, 74, 74, 76, 70, 72, 46, 48, 48, 50, 54, 56, 56, 58, 80, 82, 82, 84, 76, 78, 78, 80, 8, 10, 10, 12, 12, 14, 14, 16, 0, 90, 0, 2, 62, 64, 64, 66, 40, 42, 58, 60, 60, 62, 42, 44, 44, 46, 66, 68, 68, 70, 32, 34, 34, 36, 52, 116, 116, 126, 126, 114, 114, 184, 184, 124, 124, 182, 182, 112, 112, 186, 186, 122, 122, 110, 110, 120, 120, 108, 108, 142, 142, 106, 106, 140, 140, 104, 92, 94, 94, 96, 96, 98, 98, 146, 146, 100, 100, 144, 144, 118, 118, 102, 8, 150, 150, 138, 138, 136, 136, 134, 134, 132, 156, 154, 154, 164, 164, 162, 162, 160, 160, 158, 158, 156, 180, 178, 178, 174, 174, 188, 188, 172, 170, 168, 28, 30, 30, 32, 36, 38, 38, 40 ], + "width": 1219, + "height": 570 + } + }, + "raptor_front_arm": { + "raptor_front_arm": { + "type": "mesh", + "uvs": [ 0.39562, 0.1396, 0.3877, 0.30212, 0.3123, 0.41784, 0.27287, 0.47835, 0.33388, 0.4507, 0.54879, 0.35328, 0.64092, 0.31152, 0.73024, 0.36529, 1, 0.5277, 1, 0.86606, 0.93242, 1, 0.86176, 0.80967, 0.75576, 0.99765, 0.71748, 1, 0.70276, 0.77442, 0.62031, 0.73448, 0.58792, 0.64519, 0.53561, 0.6582, 0.13448, 0.75798, 0, 0.69218, 0.01846, 0.56357, 0.05498, 0.30917, 0, 0.27863, 0, 0.12423, 0, 0, 0.19596, 0, 0.40242, 0, 0.24536, 0.1924, 0.21678, 0.0811 ], + "triangles": [ 0, 28, 26, 23, 25, 28, 28, 25, 26, 23, 24, 25, 6, 7, 16, 6, 16, 5, 15, 16, 7, 7, 14, 15, 8, 14, 7, 11, 14, 8, 11, 8, 9, 12, 14, 11, 13, 14, 12, 10, 11, 9, 17, 4, 5, 16, 17, 5, 18, 19, 3, 18, 3, 4, 18, 4, 17, 27, 28, 0, 27, 22, 23, 27, 23, 28, 1, 27, 0, 21, 22, 27, 21, 27, 1, 2, 21, 1, 2, 20, 21, 3, 20, 2, 19, 20, 3 ], + "vertices": [ 2, 13, 3.06, 31.88, 0.51075, 12, 66.56, -109.48, 0.48924, 1, 13, 35.87, 35.62, 1, 2, 13, 60.94, 27.12, 0.8464, 14, 46.49, 31.12, 0.15358, 2, 13, 74.05, 22.67, 0.3492, 14, 36.5, 21.53, 0.65078, 3, 13, 67, 31.58, 0.10937, 14, 47.66, 23.68, 0.78125, 27, -40.93, -19.44, 0.10937, 2, 14, 86.98, 31.24, 0.65078, 27, -25.75, 17.61, 0.3492, 2, 14, 103.83, 34.49, 0.34375, 27, -19.24, 33.49, 0.65625, 2, 14, 114.04, 19.51, 0.10937, 27, -1.11, 33.84, 0.89062, 1, 27, 53.62, 34.88, 1, 1, 27, 96.03, -19.16, 1, 1, 27, 104.2, -47.31, 1, 1, 27, 71.33999, -23.98, 1, 1, 27, 81.39, -64.61, 1, 1, 27, 76.8, -68.81, 1, 1, 27, 46.65, -34.25, 1, 2, 14, 73.12999, -45.76, 0.10937, 27, 31.14, -36.12, 0.89062, 2, 14, 73.98, -26.9, 0.34375, 27, 15.82, -25.09, 0.65625, 2, 14, 65.1, -26.69, 0.65078, 27, 10.78, -32.41, 0.3492, 3, 13, 133.56, 9.13, 0.10937, 14, -2.94, -25.03, 0.78125, 27, -27.84, -88.47, 0.10937, 2, 13, 123.67, -14.42, 0.3492, 14, -19.29, -5.39, 0.65078, 2, 13, 97.41, -15.43, 0.8464, 14, -8.08, 18.37, 0.15358, 1, 13, 45.46, -17.43, 1, 2, 13, 40.68999, -27.17, 0.45035, 12, -1.69, -93.8, 0.54964, 2, 13, -2.74, -29.63, 0.44352, 12, 18.99, -72.93, 0.55646, 1, 12, 32.11, -48.45, 1, 1, 12, 57.56, -67.43, 1, 1, 12, 84.38, -87.42, 1, 2, 13, 16.44, 5.21, 0.7182, 12, 46.31, -101.86, 0.28178, 2, 13, -4.51, 5.32, 0.48851, 12, 52.82, -81.94, 0.51147 ], + "hull": 27, + "edges": [ 38, 36, 32, 30, 30, 28, 28, 26, 24, 26, 24, 22, 22, 20, 20, 18, 18, 16, 44, 42, 38, 6, 38, 40, 40, 42, 6, 4, 4, 2, 40, 4, 8, 6, 36, 8, 32, 12, 42, 2, 52, 0, 0, 2, 16, 14, 14, 12, 30, 14, 36, 34, 34, 32, 12, 10, 10, 8, 34, 10, 48, 50, 50, 52, 44, 46, 46, 48, 50, 56, 56, 54 ], + "width": 162, + "height": 203 + } + }, + "raptor_front_leg": { + "raptor_front_leg": { + "type": "mesh", + "uvs": [ 0.55116, 0.17817, 0.6279, 0.36027, 0.6671, 0.4533, 0.64879, 0.51527, 0.53553, 0.56893, 0.32335, 0.66946, 0.28674, 0.72086, 0.32538, 0.804, 0.36258, 0.80144, 0.42056, 0.79744, 0.61015, 0.78435, 0.84813, 0.84028, 1, 0.93854, 0.62439, 0.91738, 0.72812, 1, 0.58574, 1, 0.36707, 0.96667, 0.26306, 0.95082, 0.16266, 0.93552, 0.03859, 0.72237, 0, 0.66946, 0.0374, 0.62999, 0.1647, 0.49562, 0.23731, 0.4568, 0.27019, 0.43923, 0.28063, 0.43364, 0.223, 0.4057, 0.12565, 0.35851, 0, 0.29759, 0, 0.1524, 0, 0, 0.32132, 0, 0.32222, 0.22778, 0.4493, 0.38031, 0.47664, 0.44361, 0.4615, 0.47375, 0.35106, 0.53247, 0.20091, 0.65256, 0.18527, 0.72148, 0.25222, 0.86314, 0.30941, 0.88124, 0.55694, 0.89613, 0.55857, 0.89207, 0.47493, 0.85339, 0.6059, 0.91526, 0.39705, 0.89129, 0.13229, 0.09352, 0.36997, 0.45345, 0.37163, 0.43827, 0.32515, 0.39424, 0.23759, 0.34425, 0.34065, 0.47414 ], + "triangles": [ 46, 30, 31, 41, 42, 44, 43, 9, 10, 42, 43, 10, 41, 43, 42, 10, 13, 42, 11, 13, 10, 13, 11, 12, 13, 44, 42, 14, 15, 13, 45, 8, 9, 45, 40, 8, 16, 40, 45, 17, 40, 16, 16, 45, 15, 15, 45, 44, 45, 41, 44, 15, 44, 13, 45, 9, 43, 45, 43, 41, 19, 21, 38, 20, 21, 19, 39, 38, 6, 39, 6, 7, 40, 39, 7, 40, 7, 8, 18, 19, 38, 18, 38, 39, 17, 39, 40, 18, 39, 17, 47, 25, 48, 24, 25, 47, 35, 48, 34, 47, 48, 35, 51, 24, 47, 23, 24, 51, 3, 34, 2, 35, 34, 3, 36, 51, 47, 36, 47, 35, 4, 35, 3, 36, 35, 4, 37, 22, 23, 21, 22, 37, 36, 37, 23, 36, 23, 51, 5, 37, 36, 5, 36, 4, 6, 37, 5, 38, 21, 37, 38, 37, 6, 29, 30, 46, 32, 31, 0, 46, 31, 32, 28, 29, 46, 46, 27, 28, 32, 50, 46, 50, 27, 46, 33, 32, 0, 33, 0, 1, 49, 50, 32, 33, 49, 32, 26, 27, 50, 26, 50, 49, 25, 26, 49, 48, 49, 33, 25, 49, 48, 34, 33, 1, 48, 33, 34, 34, 1, 2 ], + "vertices": [ 2, 20, 128.03, 88.47, 0.8504, 1, 158.83, -71.91, 0.14959, 2, 20, 219.55, 53.15, 0.77988, 21, -48.04, -38.58, 0.22011, 2, 20, 266.3, 35.09999, 0.53544, 21, -36.73, 10.22, 0.46455, 2, 20, 286.89, 9.79, 0.35166, 21, -14.56, 34.14, 0.64832, 2, 20, 281.54, -41.24, 0.09228, 21, 36.71, 36, 0.90771, 3, 20, 271.53, -136.86, 0.05786, 21, 132.77, 39.48, 0.71425, 22, 34.99, 78.76, 0.22787, 3, 21, 158.21, 55.17, 0.5308, 22, 52.65, 54.63, 0.38143, 23, 7.01, 85.54, 0.08776, 5, 21, 167.14, 99.49, 0.21498, 22, 97.55, 49.25, 0.35357, 23, 28.72, 45.87, 0.14219, 24, -21.26, 49.99, 0.22491, 25, -72.29, 25.96, 0.06431, 5, 21, 154.22, 105.55, 0.07537, 22, 102.57, 62.6, 0.23051, 23, 42.51, 49.55, 0.28379, 24, -7.06, 51.39, 0.27004, 25, -58.17, 28.03, 0.14026, 4, 22, 109.72, 83.39, 0.11607, 23, 64.08999, 55.23, 0.08123, 24, 15.12, 53.51, 0.36961, 25, -36.09, 31.19, 0.43307, 1, 25, 35.8, 41.81, 1, 1, 25, 128.11, 17.93, 1, 1, 25, 188.72, -29.42, 1, 2, 24, 93.29, -7.6, 0.47999, 25, 44.86, -26.17, 0.52, 2, 24, 133.17, -49.83, 0.776, 25, 86.69, -66.47, 0.22399, 2, 24, 78.78, -50.15, 0.76799, 25, 32.38, -69.36, 0.232, 1, 24, -4.91, -33.55, 1, 3, 22, 155.04, -5.13, 0.35917, 23, 17.87999, -32.5, 0.30632, 24, -44.62, -25.61, 0.33449, 4, 21, 254.98, 126.27, 0.10154, 22, 131.21, -36.2, 0.54211, 23, -21.24, -31.17, 0.20873, 24, -83.01999, -17.96999, 0.1476, 3, 21, 240.33, 7.81, 0.25586, 22, 11.94, -30.98, 0.61614, 23, -86.31, 68.9, 0.12797, 2, 21, 239.26, -23.1, 0.45486, 22, -18.95999, -32.37, 0.54513, 3, 20, 187.65, -209.73, 0.09777, 21, 216.66, -33.34999, 0.58892, 22, -30.97, -10.65, 0.3133, 2, 20, 163.85, -128.67, 0.19603, 21, 139.75, -68.26, 0.80396, 2, 20, 165.74, -94.49, 0.31962, 21, 105.59, -71.26, 0.68037, 2, 20, 166.39, -79.07, 0.46225, 21, 90.23, -72.76, 0.53774, 2, 20, 166.49, -74.17, 0.53785, 21, 85.42, -73.28, 0.46213, 2, 20, 141.54, -82.46, 0.73138, 21, 97.13, -96.82, 0.26861, 2, 20, 99.76, -97.08, 0.85324, 21, 117.34, -136.23, 0.14675, 2, 20, 45.01, -114.56, 0.83615, 1, -51.09, -135.29, 0.16384, 2, 20, -16.2, -74.76, 0.62989, 1, -42.95, -58.38, 0.3701, 2, 20, -74.73, -19.33, 0.31468, 1, -52.66, 17.54999, 0.68531, 2, 20, 1.67, 76.75, 0.25576, 1, 70.07, 18.78, 0.74423, 1, 20, 93.54, 4.13, 1, 2, 20, 185.14, -6.66, 0.75461, 21, 15.98, -64.26999, 0.24538, 2, 20, 217.11, -18.75, 0.50844, 21, 23.47, -30.93, 0.49154, 2, 20, 225.63, -32.91999, 0.32527, 21, 36.3, -20.5, 0.67472, 2, 20, 223, -84.73, 0.20192, 21, 87.96, -15.86, 0.79807, 3, 20, 235.61, -168.06, 0.0809, 21, 168.69, 8.29, 0.57147, 22, 6.74, 40.47, 0.34761, 3, 21, 191.79, 35.8, 0.32545, 22, 36, 19.62, 0.57243, 23, -31.14, 78.74, 0.10211, 4, 21, 206.64, 111.53, 0.10808, 22, 112.69, 10.82, 0.52067, 23, 6.25, 11.23, 0.23517, 24, -49.03, 19.43, 0.13606, 3, 22, 130.6, 26.41, 0.35067, 23, 29.35, 5.71, 0.28241, 24, -27.12, 10.25, 0.3669, 2, 24, 67.46, 3.16, 0.384, 25, 18.54999, -16.62999, 0.61599, 1, 25, 19.07, -14.51, 1, 2, 24, 36, 24.95, 0.384, 25, -13.89, 3.64, 0.61599, 2, 24, 86.23, -6.55, 0.48799, 25, 37.75, -25.46, 0.512, 4, 21, 164.9, 153.55, 0.02263, 22, 151.18, 56, 0.23908, 23, 65.44, 5.55, 0.19254, 24, 8.45, 4.27, 0.54574, 2, 20, -9.28, -17.5, 0.59605, 1, 7.72, -30.85, 0.40393, 2, 20, 195.9, -53.81, 0.42368, 21, 61.11, -47.06, 0.5763, 2, 20, 190.1, -48.45, 0.53231, 21, 56.61, -53.56, 0.46768, 2, 20, 161.26, -48.26, 0.79873, 21, 60.44, -82.12999, 0.20126, 2, 20, 120.37, -58.54, 0.85455, 21, 76.31, -121.18, 0.14544, 2, 20, 197.37, -69.23, 0.3355, 21, 76.17, -43.46, 0.66449 ], + "hull": 32, + "edges": [ 40, 38, 38, 36, 28, 30, 28, 26, 26, 24, 24, 22, 22, 20, 14, 12, 12, 10, 6, 4, 60, 62, 0, 62, 40, 42, 42, 44, 34, 36, 16, 14, 52, 50, 4, 2, 2, 0, 10, 8, 8, 6, 72, 74, 74, 76, 76, 78, 78, 80, 80, 90, 90, 88, 16, 18, 18, 20, 30, 32, 32, 34, 56, 58, 58, 60, 94, 96, 96, 98, 52, 54, 54, 56, 100, 98, 48, 50, 44, 46, 46, 48, 102, 94, 72, 70, 70, 68, 66, 68, 66, 64, 64, 92, 86, 84, 50, 96, 94, 48, 46, 102, 52, 98, 54, 100, 70, 6, 68, 4, 66, 2, 72, 8, 86, 20, 86, 82, 82, 88, 84, 26, 88, 26 ], + "width": 382, + "height": 514 + } + }, + "raptor_hindleg_back": { + "raptor_hindleg_back": { + "type": "mesh", + "uvs": [ 0.45041, 0.09352, 0.56933, 0.23361, 0.65294, 0.47296, 0.66353, 0.50822, 0.63174, 0.54254, 0.32383, 0.69723, 0.30068, 0.73875, 0.27934, 0.77704, 0.30417, 0.83513, 0.31058, 0.85014, 0.341, 0.85046, 0.45165, 0.85163, 0.59555, 0.81881, 0.91176, 0.92548, 1, 1, 0.56336, 0.96426, 0.48349, 0.9826, 0.29878, 0.98027, 0.22808, 0.98389, 0.15997, 0.98737, 0.15423, 0.95546, 0.13894, 0.87047, 0.07371, 0.78726, 0, 0.75299, 0, 0.7049, 0, 0.671, 0.11875, 0.64652, 0.16535, 0.52659, 0.28495, 0.47397, 0.2901, 0.45773, 0.29427, 0.4446, 0.20635, 0.40396, 0.06128, 0.33691, 0, 0.25247, 0, 0, 0.30793, 0, 0.27599, 0.20261, 0.40397, 0.31121, 0.48439, 0.45963, 0.48317, 0.48383, 0.47029, 0.51062, 0.22698, 0.67328, 0.17141, 0.7242, 0.17122, 0.78241, 0.22995, 0.89469, 0.24677, 0.90829, 0.28672, 0.9146, 0.46582, 0.91414 ], + "triangles": [ 15, 13, 14, 16, 47, 15, 15, 12, 13, 15, 47, 12, 18, 46, 17, 18, 45, 46, 17, 47, 16, 17, 46, 47, 47, 10, 11, 47, 46, 10, 47, 11, 12, 45, 18, 19, 44, 45, 20, 20, 45, 19, 20, 21, 44, 46, 9, 10, 46, 45, 9, 45, 44, 9, 21, 43, 44, 44, 8, 9, 44, 7, 8, 44, 43, 7, 21, 22, 43, 43, 22, 42, 43, 42, 7, 22, 23, 24, 24, 42, 22, 7, 42, 6, 42, 41, 6, 6, 41, 5, 24, 26, 42, 42, 26, 41, 24, 25, 26, 5, 40, 4, 5, 41, 40, 41, 28, 40, 26, 27, 41, 41, 27, 28, 40, 39, 4, 28, 29, 40, 40, 29, 39, 4, 39, 3, 39, 2, 3, 29, 30, 39, 39, 38, 2, 39, 30, 38, 38, 1, 2, 30, 37, 38, 38, 37, 1, 30, 31, 37, 31, 36, 37, 31, 32, 36, 32, 33, 36, 37, 0, 1, 37, 36, 0, 33, 34, 36, 36, 35, 0, 36, 34, 35 ], + "vertices": [ 1, 40, 53.94, 69.15, 1, 1, 40, 126.23, 67.31, 1, 2, 40, 226.42, 31.13, 0.9375, 41, -30.87, -1.11, 0.0625, 2, 40, 240.84, 25.33, 0.7, 41, -25.64, 13.52, 0.3, 2, 40, 246.67, 8.05, 0.3, 41, -8.60999, 20.02, 0.7, 3, 40, 240.81, -115.25, 0.0625, 41, 114.8, 19.01, 0.875, 42, 9.47999, 59.16, 0.0625, 2, 41, 131.07, 29.69, 0.7, 42, 22.11, 44.35, 0.3, 2, 41, 146.06, 39.54, 0.3, 42, 33.75999, 30.71, 0.7, 3, 41, 152.6, 65.01, 0.12566, 42, 59.85, 27.41, 0.75203, 43, 15.85, 48.05, 0.12229, 3, 41, 154.28, 71.58999, 0.05444, 42, 66.58999, 26.56, 0.78401, 43, 16.71999, 41.31, 0.16154, 3, 42, 71.19, 35.75999, 0.64716, 43, 26.78, 39.16999, 0.13169, 44, -67.32, 18.95999, 0.22114, 3, 42, 87.93, 69.21, 0.0625, 43, 63.37, 31.39, 0.675, 44, -30.17, 23.3, 0.26249, 2, 43, 113.82, 35.72, 0.1038, 44, 16.23, 43.56, 0.89619, 1, 44, 128.14, 12.02, 1, 1, 44, 161.85, -15.81, 1, 2, 43, 90.98, -23.36, 0.0138, 44, 13.52, -19.71999, 0.98619, 2, 43, 62.97, -25.81, 0.7, 44, -12.23, -31.02, 0.3, 3, 42, 115.12, -1.33, 0.08333, 43, 1.93, -12.66, 0.83333, 44, -74.26, -38.09999, 0.08333, 2, 42, 106.11, -23.53, 0.3, 43, -21.8, -9.52, 0.7, 2, 42, 97.43, -44.9, 0.7, 43, -44.67, -6.51, 0.3, 2, 42, 84.26, -40.68999, 0.9375, 43, -43.9, 7.29, 0.0625, 1, 42, 49.18, -29.46, 1, 2, 41, 206.75, 5.37, 0.13333, 42, 7.44, -33.77, 0.86666, 2, 41, 219.64, -20.52, 0.36111, 42, -16.64, -49.8, 0.63888, 2, 41, 208.4, -37.82, 0.72083, 42, -35.22, -40.82, 0.27916, 2, 41, 200.49, -50.02, 0.91666, 42, -48.31, -34.48, 0.08333, 1, 41, 161.1, -36.97, 1, 2, 40, 150.1, -116.76, 0.08333, 41, 119.88, -71.55, 0.91666, 2, 40, 154.99, -70.71, 0.42846, 41, 73.68, -68.47, 0.57153, 2, 40, 150.3, -65.26999, 0.35604, 41, 68.42, -73.36, 0.64395, 2, 40, 146.51, -60.87, 0.59147, 41, 64.17, -77.32, 0.40852, 2, 40, 115.12, -75.08, 0.8446, 41, 79.61, -108.13, 0.15538, 1, 40, 63.33, -98.53, 1, 1, 40, 21.78, -94.55, 1, 1, 40, -66.69, -32.04, 1, 1, 40, -6.62, 52.97, 1, 1, 40, 58.14, -6, 1, 1, 40, 121.17, 2.44, 1, 1, 40, 188.87, -12.1, 1, 2, 40, 197.11, -18.42, 0.7, 41, 19.79, -28.44, 0.3, 2, 40, 203.98, -28.61, 0.3, 41, 29.69, -21.17, 0.7, 1, 41, 136.67, -7.42, 1, 2, 41, 164.32, 0.66, 0.7, 42, -2.53, 7.73, 0.3, 2, 41, 177.97, 21.57, 0.25, 42, 19.92, -3.19, 0.75, 1, 42, 71.93, -6.29, 1, 2, 42, 79.66, -3.72, 0.7, 43, -9.28, 21.04, 0.3, 2, 42, 87.98, 7.25, 0.3125, 43, 3.42, 15.76, 0.6875, 3, 42, 114.16, 61.85, 0.04, 43, 62.84, 4.15, 0.7, 44, -21.95, -2.66, 0.26 ], + "hull": 36, + "edges": [ 66, 68, 66, 64, 56, 54, 54, 52, 52, 50, 46, 44, 44, 42, 34, 32, 32, 30, 30, 28, 28, 26, 26, 24, 24, 22, 10, 8, 8, 6, 6, 4, 4, 2, 2, 0, 68, 70, 0, 70, 46, 48, 48, 50, 14, 12, 12, 10, 60, 58, 58, 56, 42, 40, 40, 38, 18, 16, 16, 14, 22, 20, 20, 18, 38, 36, 36, 34, 60, 62, 62, 64, 68, 72, 72, 74, 74, 76, 76, 78, 78, 80, 80, 82, 82, 84, 84, 86, 16, 88, 86, 88, 18, 90, 90, 38, 88, 90, 20, 92, 92, 36, 90, 92, 92, 94, 94, 22, 94, 32, 30, 24, 88, 40, 86, 14, 84, 12, 82, 10, 82, 52, 48, 84, 44, 86, 78, 6, 4, 76, 80, 8, 80, 56, 58, 78, 76, 60 ], + "width": 338, + "height": 429 + } + }, + "raptor_horn": { + "raptor_horn": { "x": 156.2, "y": 74.1, "rotation": -137.26, "width": 363, "height": 159 } + }, + "raptor_horn_back": { + "raptor_horn_back": { "x": 121.42, "y": 83.01, "rotation": -132.21, "width": 351, "height": 153 } + }, + "raptor_jaw": { + "raptor_jaw": { + "type": "mesh", + "uvs": [ 0.40984, 0.22169, 0.42214, 0.3988, 0.67894, 0.53819, 0.7589, 0.62838, 0.99999, 0.4726, 1, 0.53491, 0.87731, 0.77925, 0.63281, 0.94487, 0.39908, 0.96947, 0.19456, 0.89404, 0.21609, 0.6497, 0, 0.46111, 0, 0, 0.26069, 0, 0.19456, 0.29385 ], + "triangles": [ 14, 13, 0, 14, 0, 1, 5, 3, 4, 10, 14, 1, 11, 14, 10, 6, 3, 5, 2, 10, 1, 7, 2, 3, 7, 3, 6, 2, 8, 10, 8, 9, 10, 2, 7, 8, 14, 12, 13, 11, 12, 14 ], + "vertices": [ 1, 35, 28.6, 68.85, 1, 1, 35, 69.65, 38.95, 1, 1, 35, 150.72, 72.87999, 1, 1, 35, 186.16, 74.79, 1, 1, 35, 199.76, 159.69, 1, 1, 35, 213.35, 148.16, 1, 1, 35, 242.43, 74.42, 1, 1, 35, 230.31, -13.08, 1, 1, 35, 189.56, -71.99, 1, 1, 35, 132.76, -105.6, 1, 1, 35, 83.71, -55.39, 1, 2, 16, -18.31, 12.1, 0.67732, 35, -0.04, -70.76, 0.32267, 1, 16, 113.44, 16.95, 1, 1, 16, 116.36, -62.48, 1, 1, 35, 1.86, 5.43, 1 ], + "hull": 14, + "edges": [ 22, 24, 22, 20, 20, 18, 18, 16, 16, 14, 14, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 2, 2, 0, 24, 26, 0, 26, 24, 28, 22, 28, 28, 0 ], + "width": 305, + "height": 286 + } + }, + "raptor_saddle_noshadow": { + "raptor_saddle_noshadow": { "x": 80.83, "y": 10.63, "rotation": -88.64, "width": 326, "height": 375 } + }, + "raptor_saddle_strap_front": { + "raptor_saddle_strap_front": { "x": 128.83, "y": -4.71, "rotation": 61.29, "width": 114, "height": 189 } + }, + "raptor_saddle_strap_rear": { + "raptor_saddle_strap_rear": { + "type": "mesh", + "uvs": [ 0.85499, 0.06802, 1, 0.13237, 1, 0.20266, 0.95981, 0.26524, 0.88583, 0.38045, 0.80684, 0.46413, 0.74038, 0.53453, 0.81676, 0.5895, 0.51961, 1, 0.4516, 1, 0.01739, 0.8407, 0, 0.80889, 0.24645, 0.36639, 0.3792, 0.39151, 0.42457, 0.32099, 0.49229, 0.21571, 0.57673, 0.10986, 0.66437, 0, 0.70168, 0, 0.56028, 0.46321, 0.68822, 0.29772, 0.76845, 0.18722, 0.61529, 0.39206 ], + "triangles": [ 7, 8, 6, 9, 10, 13, 13, 11, 12, 6, 8, 19, 8, 9, 19, 9, 13, 19, 13, 10, 11, 19, 22, 6, 13, 14, 19, 19, 14, 22, 6, 22, 5, 22, 20, 5, 5, 20, 4, 14, 15, 22, 22, 15, 20, 20, 21, 4, 15, 16, 20, 4, 21, 3, 20, 16, 21, 2, 3, 0, 3, 21, 0, 0, 1, 2, 21, 16, 18, 16, 17, 18, 21, 18, 0 ], + "vertices": [ 1, 50, 3.9, -3.27, 1, 1, 50, 4.25, 15.05, 1, 1, 50, 13.24, 20.28, 1, 2, 50, 23.42, 21.2, 0.7, 51, -15.2, 21.22, 0.3, 3, 50, 41.11, 22.87, 0.3, 51, 2.48, 22.89, 0.6375, 52, -33.83, 24.96, 0.0625, 3, 50, 52.07, 21.72, 0.0625, 51, 13.43, 21.74, 0.6375, 52, -22.97, 23.11, 0.3, 2, 51, 18.39, 20.76, 0.25, 52, -18.09, 21.82, 0.75, 1, 52, -18.76, 33.09, 1, 1, 52, 49.92, 31.57, 1, 1, 52, 53.21, 25, 1, 1, 52, 53.11, -27.48, 1, 1, 52, 49.74, -31.27, 1, 1, 52, -20.73, -36.75999, 1, 1, 52, -23.82, -22.28, 1, 3, 50, 53.48, -24.61, 0.0625, 51, 14.84, -24.59, 0.575, 52, -24.51, -23.21, 0.3625, 3, 50, 41.43999, -26.12, 0.3, 51, 2.81, -26.09, 0.6375, 52, -36.62, -23.95, 0.0625, 2, 50, 24.38, -26.12, 0.7, 51, -14.24, -26.1, 0.3, 1, 50, 5.57, -26.12, 1, 1, 50, 3.54, -22.64, 1, 1, 52, -23.08, -0.04, 1, 2, 50, 41.66, -1.72, 0.3125, 51, 3.03, -1.7, 0.6875, 2, 50, 23.85, -2.46, 0.7, 51, -14.77, -2.44, 0.3, 2, 51, 13.95, -1.5, 0.64582, 52, -23.94, -0.11, 0.35416 ], + "hull": 19, + "edges": [ 26, 24, 24, 22, 22, 20, 20, 18, 16, 18, 16, 14, 14, 12, 4, 2, 34, 36, 12, 38, 38, 26, 8, 40, 40, 30, 2, 0, 0, 36, 30, 32, 32, 34, 32, 42, 4, 6, 6, 8, 42, 6, 26, 28, 28, 30, 28, 44, 8, 10, 10, 12, 44, 10 ], + "width": 108, + "height": 148 + } + }, + "raptor_saddle_w_shadow": { + "raptor_saddle_w_shadow": { "x": 80.83, "y": 10.63, "rotation": -88.64, "width": 326, "height": 375 } + }, + "raptor_tongue": { + "raptor_tongue": { + "type": "mesh", + "uvs": [ 0.35242, 0.2156, 0.4794, 0.44245, 0.62071, 0.61176, 0.80562, 0.75373, 1, 0.90297, 1, 1, 0.8971, 1, 0.72054, 0.92254, 0.50668, 0.82872, 0.30401, 0.70725, 0.10537, 0.57888, 0, 0.50622, 0, 0, 0.26224, 0 ], + "triangles": [ 8, 7, 6, 6, 4, 5, 4, 6, 3, 6, 7, 3, 7, 8, 3, 8, 2, 3, 9, 10, 1, 8, 9, 2, 9, 1, 2, 1, 10, 0, 10, 11, 0, 0, 12, 13, 0, 11, 12 ], + "vertices": [ 2, 63, 3.63, 27.04, 0.6875, 64, -47.26, 33.87, 0.3125, 3, 63, 39.09, 19.45, 0.3125, 64, -13.41, 20.86, 0.625, 65, -51.54, 33.37, 0.0625, 3, 63, 71.56, 19.02, 0.0625, 64, 18.58, 15.39, 0.625, 65, -21.56, 20.92, 0.3125, 2, 64, 55.03, 16.85, 0.3125, 65, 14.29, 14.23, 0.6875, 2, 64, 93.34, 18.39, 0.08333, 65, 51.98, 7.21, 0.91666, 1, 65, 56.09, -4.5, 1, 2, 64, 85.06, -1.49, 0.08333, 65, 39.48, -10.33, 0.91666, 2, 64, 54.22, -9.18, 0.3125, 65, 7.71, -10.96, 0.6875, 3, 63, 75.14, -14.72, 0.0625, 64, 16.87, -18.5, 0.625, 65, -30.77, -11.73, 0.3125, 3, 63, 38.8, -25.8, 0.3125, 64, -20.74, -23.8, 0.625, 65, -68.62, -8.53, 0.0625, 2, 63, 2.4, -35.77, 0.6875, 64, -58.25, -27.99, 0.3125, 2, 63, -17.28, -40.62, 0.91666, 64, -78.44999, -29.71, 0.08333, 1, 63, -59.91, 8.18, 1, 2, 63, -26.13, 37.68999, 0.91666, 64, -75.01999, 49.02, 0.08333 ], + "hull": 14, + "edges": [ 22, 24, 10, 12, 10, 8, 24, 26, 16, 4, 18, 16, 2, 4, 18, 2, 22, 20, 0, 26, 20, 0, 0, 2, 12, 14, 14, 16, 4, 6, 6, 8, 14, 6, 20, 18 ], + "width": 171, + "height": 128 + } + }, + "spineboy_torso": { + "torso": { "x": 55.88, "y": 4.86, "rotation": -104.14, "width": 108, "height": 182 } + }, + "stirrup_back": { + "stirrup_back": { "x": 53.2, "y": 31.34, "rotation": -21.12, "width": 87, "height": 69 } + }, + "stirrup_front": { + "stirrup_front": { "x": 36.13, "y": 20.39, "rotation": -21.12, "width": 89, "height": 100 } + }, + "stirrup_strap": { + "stirrup_strap": { + "type": "mesh", + "uvs": [ 0.36822, 0.27893, 0.45737, 0.38897, 0.54451, 0.49651, 0.67872, 0.59135, 0.81977, 0.69102, 1, 0.77344, 1, 1, 0.77956, 1, 0.63729, 0.81629, 0.53364, 0.72348, 0.40534, 0.6086, 0.30886, 0.52535, 0.21049, 0.44047, 0, 0.26245, 0, 0, 0.30637, 0, 0.20241, 0.23 ], + "triangles": [ 2, 10, 1, 9, 10, 2, 9, 2, 3, 8, 9, 3, 8, 3, 4, 7, 8, 4, 7, 4, 5, 7, 5, 6, 16, 14, 15, 13, 14, 16, 16, 15, 0, 12, 16, 0, 12, 0, 1, 13, 16, 12, 11, 12, 1, 10, 11, 1 ], + "vertices": [ 2, 56, 24.71, 8.03, 0.80344, 57, -17.42, 11.02, 0.19655, 2, 56, 37.95, 8.04, 0.59978, 57, -4.36, 8.87, 0.40021, 2, 56, 50.88, 8.04, 0.36895, 57, 8.39, 6.77, 0.63103, 2, 56, 65.92, 12.27, 0.17748, 57, 23.91, 8.47999, 0.82251, 2, 56, 81.72, 16.7, 0.05943, 57, 40.23, 10.28, 0.94056, 2, 56, 98.82, 25.04, 0.01209, 57, 58.46, 15.71, 0.9879, 2, 56, 114.44, 11.57, 0.00191, 57, 71.67, -0.11, 0.99808, 2, 56, 100.47, -4.61, 0.01816, 57, 55.25, -13.81, 0.98182, 2, 56, 78.79, -4.14, 0.07487, 57, 33.93999, -9.81, 0.92512, 2, 56, 65.83, -6.24, 0.2028, 57, 20.81, -9.76, 0.79719, 2, 56, 49.78, -8.83, 0.39971, 57, 4.55, -9.7, 0.60028, 2, 56, 37.93, -10.97, 0.62658, 57, -7.48, -9.88, 0.37341, 2, 56, 25.85, -13.15, 0.82034, 57, -19.75, -10.06, 0.17965, 2, 56, 0.25, -18.03, 0.95288, 57, -45.81, -10.7, 0.04711, 2, 56, -17.83, -2.43, 0.97709, 57, -61.11, 7.63, 0.0229, 2, 56, 1.57, 20.07, 0.94774, 57, -38.29, 26.67, 0.05225, 2, 56, 10.84, -1.23, 0.97709, 57, -32.62, 4.14, 0.0229 ], + "hull": 16, + "edges": [ 28, 30, 30, 0, 12, 10, 8, 10, 12, 14, 14, 16, 26, 28, 24, 26, 26, 32, 32, 30, 20, 22, 22, 24, 0, 2, 2, 4, 4, 6, 6, 8, 16, 18, 18, 20 ], + "width": 97, + "height": 91 + } + }, + "visor": { + "visor": { "x": 99.13, "y": 6.51, "rotation": -70.57, "width": 261, "height": 168 } + } + } +}, +"animations": { + "Jump": { + "bones": { + "root": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { + "time": 0.3, + "x": 0, + "y": 0, + "curve": [ 0.201, 0.17, 0.815, 0.83 ] + }, + { "time": 0.6666, "x": 1482.78, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_foot_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.2, "angle": 0 }, + { "time": 0.3, "angle": -41.64 }, + { "time": 0.3666, "angle": -69.66 }, + { "time": 0.4333, "angle": -12.8 }, + { "time": 0.5333, "angle": 5.73 }, + { "time": 0.6666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3, "x": 0, "y": 0 }, + { "time": 0.3666, "x": -60.01, "y": 111.1 }, + { "time": 0.4333, "x": 213.18, "y": 291.22 }, + { "time": 0.5333, "x": 243.73, "y": 332.61 }, + { "time": 0.6666, "x": 95.94, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.6666, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": -4.48 }, + { "time": 0.1, "angle": -23.02 }, + { "time": 0.3, "angle": 19.24 }, + { "time": 0.5333, "angle": 20.85 }, + { "time": 0.6666, "angle": -10.76 }, + { "time": 0.7666, "angle": -18.58 }, + { "time": 0.9333, "angle": -3.56 }, + { "time": 1.0666, "angle": -4.48 } + ], + "translate": [ + { "time": 0, "x": -100.65, "y": 49.77 }, + { + "time": 0.1, + "x": 9.37, + "y": -109.06, + "curve": [ 0.245, 0, 0.609, 0.41 ] + }, + { + "time": 0.1666, + "x": 150.37, + "y": -76.51, + "curve": [ 0.401, 0.34, 0.858, 0.87 ] + }, + { "time": 0.3, "x": 361, "y": 36.69 }, + { + "time": 0.5333, + "x": 5.36, + "y": 290.91, + "curve": [ 0.808, 0, 0.892, 0.81 ] + }, + { "time": 0.6666, "x": -56.27, "y": 88.07 }, + { + "time": 0.7666, + "x": 179.93, + "y": -59.94, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.9333, + "x": 238.11, + "y": 50.63, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.0666, "x": 213.19, "y": 49.77 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_foot_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.2, "angle": 0 }, + { "time": 0.3, "angle": -41.64 }, + { "time": 0.3666, "angle": -69.66 }, + { "time": 0.4333, "angle": -57.97 }, + { "time": 0.7, "angle": -9.19 }, + { "time": 0.7333, "angle": -7.78 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3, "x": 0, "y": 0 }, + { "time": 0.3666, "x": -131.66, "y": 47.58 }, + { "time": 0.4333, "x": -16.1, "y": 205.84 }, + { "time": 0.5333, "x": 61.29, "y": 320.2 }, + { "time": 0.7333, "x": 235.62, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7333, "x": 1, "y": 1 } + ] + }, + "front_leg1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_leg_goal": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3, "x": 0, "y": 0 }, + { "time": 0.7, "x": -0.39, "y": 24.29 }, + { "time": 0.7666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_leg1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_leg_goal": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3, "x": 0, "y": 0 }, + { "time": 0.7, "x": 6.75, "y": 25.64 }, + { "time": 0.7666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "tail1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": -11.02 }, + { "time": 0.3, "angle": 0.53 }, + { "time": 0.4333, "angle": 8.64 }, + { "time": 0.7, "angle": -9.73 }, + { + "time": 0.7666, + "angle": -4.46, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "torso1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_leg2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_leg2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tail2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": -39.83 }, + { "time": 0.3, "angle": -31.82 }, + { "time": 0.4333, "angle": -7.28 }, + { "time": 0.5333, "angle": 1.28 }, + { "time": 0.6, "angle": -7.22 }, + { "time": 0.7, "angle": -30.66 }, + { + "time": 0.7666, + "angle": -40.54, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "torso2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 0.51 }, + { "time": 0.3, "angle": -1.9 }, + { "time": 0.5333, "angle": 1.04 }, + { "time": 0.7, "angle": -3.25 }, + { "time": 0.7666, "angle": 4.81 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1666, "angle": -308.79 }, + { "time": 0.3, "angle": -398.7 }, + { "time": 0.5333, "angle": -297.8 }, + { "time": 0.7, "angle": 62.19 }, + { "time": 0.7666, "angle": -325.36 }, + { "time": 0.8333, "angle": -374.42 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_leg3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": -8.25 }, + { "time": 0.3, "angle": -1.9 }, + { "time": 0.5333, "angle": 5.44 }, + { "time": 0.7, "angle": 24.01 }, + { "time": 0.7666, "angle": 4.82 }, + { "time": 0.8666, "angle": -1.78 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.1, "x": 0, "y": 0 }, + { "time": 0.3, "x": 62.9, "y": -44.25 }, + { "time": 0.5333, "x": -4.35, "y": 17.31 }, + { "time": 0.7, "x": 0, "y": 0 }, + { "time": 0.7666, "x": 23.29, "y": -42.27 }, + { "time": 0.8666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_arm1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 51.2 }, + { "time": 0.3333, "angle": -38.7 }, + { "time": 0.6, "angle": 62.19, "curve": "stepped" }, + { "time": 0.7333, "angle": 62.19 }, + { "time": 0.8, "angle": 34.62 }, + { "time": 0.8666, "angle": -14.43 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_leg3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_front1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_rear1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "spineboy_front_arm_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "spineboy_hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.8666, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.1, "x": 35.96, "y": -11.83 }, + { "time": 0.3, "x": 31.1, "y": -50.39 }, + { "time": 0.5333, "x": 12.1, "y": -8.03 }, + { "time": 0.7, "x": 41.7, "y": -19.46 }, + { "time": 0.8666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8666, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "spineboy_rear_arm_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "stirrup": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "stirrup_strap1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tail3": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": -8.97 }, + { "time": 0.3, "angle": -18.38 }, + { "time": 0.4333, "angle": 0.9 }, + { "time": 0.5333, "angle": 11.43 }, + { "time": 0.6, "angle": 17.22 }, + { "time": 0.7, "angle": 4.74 }, + { + "time": 0.7666, + "angle": -20.69, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { + "time": 0.9666, + "angle": -20.4, + "curve": [ 0.382, 0.57, 0.735, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_thigh": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 23.1 }, + { "time": 0.3, "angle": -75.92 }, + { "time": 0.5333, "angle": -1.41 }, + { "time": 0.7666, "angle": 26.86 }, + { "time": 0.8333, "angle": -56.14 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_foot1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_thigh": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 15.27 }, + { "time": 0.3, "angle": -53.4 }, + { "time": 0.5666, "angle": -63.35 }, + { "time": 0.7666, "angle": -29.92 }, + { "time": 0.9, "angle": 7.24 }, + { "time": 1, "angle": -3.69 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 9.93 }, + { "time": 0.3, "angle": -3.76 }, + { "time": 0.5333, "angle": -26.63 }, + { "time": 0.7, "angle": -10.23 }, + { "time": 0.7666, "angle": 21.8 }, + { "time": 0.8666, "angle": 15.36 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_arm2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 23.1 }, + { "time": 0.3, "angle": -75.92 }, + { "time": 0.5333, "angle": -1.41 }, + { "time": 0.7666, "angle": 26.86 }, + { "time": 0.8333, "angle": -56.14 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_foot1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_front2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_rear2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "spineboy_torso": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1666, "angle": -24.93 }, + { "time": 0.2333, "angle": -20.34 }, + { "time": 0.5333, "angle": -11.2 }, + { "time": 0.7, "angle": 10.49 }, + { + "time": 0.8333, + "angle": -30.21, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1, "angle": 1.34 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "stirrup_strap2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tail4": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 34.12 }, + { "time": 0.3, "angle": -12.25 }, + { "time": 0.4333, "angle": 11.11 }, + { "time": 0.5333, "angle": 25.19 }, + { "time": 0.6, "angle": 32.5 }, + { "time": 0.7, "angle": 24.4 }, + { + "time": 0.7666, + "angle": 9.9, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { + "time": 0.9666, + "angle": -11.72, + "curve": [ 0.382, 0.57, 0.735, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_arm": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_knee": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_foot2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.3, "angle": 0 }, + { "time": 0.3666, "angle": -63.6 }, + { "time": 0.4333, "angle": -80.16 }, + { "time": 0.5333, "angle": -17.48 }, + { "time": 0.6666, "angle": 24.85 }, + { "time": 0.7666, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.6666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.6666, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_hand": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5333, "angle": -27.74 }, + { "time": 0.7666, "angle": -27.09 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "horn_front": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "horn_rear": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "jaw": { + "rotate": [ + { "time": 0, "angle": 15.56 }, + { "time": 0.2333, "angle": -0.92 }, + { "time": 0.5, "angle": 20.4 }, + { "time": 0.7, "angle": 18.32 }, + { "time": 0.7666, "angle": 5.17 }, + { "time": 0.8333, "angle": 20.34 }, + { "time": 1.0666, "angle": 15.56 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "lower_leg": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "neck2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 11.08 }, + { "time": 0.8333, "angle": 8.16 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_foot2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.3, "angle": 0 }, + { "time": 0.3666, "angle": -87.93 }, + { "time": 0.4333, "angle": -126.75 }, + { "time": 0.5333, "angle": -63.79 }, + { "time": 0.7, "angle": 24.85 }, + { "time": 0.7666, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.7, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_hand": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5333, "angle": -27.74 }, + { "time": 0.7666, "angle": -27.09 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_rear3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tail5": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 76.87 }, + { "time": 0.3, "angle": -12.25 }, + { "time": 0.4333, "angle": 10.5 }, + { "time": 0.5333, "angle": 24.81 }, + { "time": 0.6, "angle": 32.21 }, + { "time": 0.7, "angle": 24.4 }, + { + "time": 0.7666, + "angle": 9.9, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { + "time": 0.9666, + "angle": -41.66, + "curve": [ 0.382, 0.57, 0.735, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tongue1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_bracer": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm_target": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_foot3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.3, "angle": 0 }, + { "time": 0.3666, "angle": -84.17 }, + { "time": 0.4333, "angle": -127.53 }, + { "time": 0.5333, "angle": -52.16 }, + { "time": 0.6666, "angle": 10.77 }, + { "time": 0.7666, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.6666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.6666, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "head2": { + "rotate": [ + { "time": 0, "angle": 15.31 }, + { "time": 0.1, "angle": 29.85 }, + { "time": 0.2, "angle": 22.43 }, + { "time": 0.3, "angle": 12.64 }, + { "time": 0.4666, "angle": 24.85 }, + { "time": 0.5333, "angle": 9.28 }, + { "time": 0.7, "angle": 4.77 }, + { "time": 0.7666, "angle": 37.9 }, + { + "time": 0.8333, + "angle": 18.87, + "curve": [ 0.056, 0.81, 0.75, 1 ] + }, + { "time": 1, "angle": 22.96 }, + { "time": 1.0666, "angle": 15.31 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_arm_target": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tongue2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_hand": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_hand2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tongue3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + } + } + }, + "empty": {}, + "gungrab": { + "slots": { + "front_hand": { + "attachment": [ + { "time": 0, "name": "front_open_hand" }, + { "time": 0.1666, "name": "gun" } + ] + }, + "gun": { + "attachment": [ + { "time": 0, "name": "gun_nohand" }, + { "time": 0.1666, "name": null } + ] + } + }, + "bones": { + "front_hand2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 12.33 }, + { "time": 0.1666, "angle": -89.54 }, + { "time": 0.2333, "angle": -79.78 }, + { "time": 0.4666, "angle": -10.18 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 }, + { "time": 0.1666, "x": 0.938, "y": 0.938 }, + { "time": 0.4666, "x": 1, "y": 1 } + ] + }, + "front_arm": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.0666, "angle": -31.99 }, + { + "time": 0.1666, + "angle": 223.11, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.2333, + "angle": 155.19, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.3666, + "angle": 246.13, + "curve": [ 0.184, 0.33, 0.75, 1 ] + }, + { "time": 0.4666, "angle": -56.74 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.1666, "x": 6.49, "y": -2.66 }, + { "time": 0.2333, "x": 6.84, "y": 4.79 }, + { "time": 0.4666, "x": 0, "y": 0 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1666, "angle": 86.01 }, + { "time": 0.2333, "angle": 114.94 }, + { + "time": 0.3666, + "angle": 81.86, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.4666, "angle": 34.73 } + ] + } + }, + "ik": { + "front_arm_goal": [ + { "time": 0, "mix": 0 } + ] + } + }, + "walk": { + "bones": { + "root": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_foot_goal": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.2666, "angle": -51.26 }, + { "time": 0.4, "angle": -65.17 }, + { "time": 0.5333, "angle": -76.28 }, + { "time": 0.8, "angle": -76.52 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 343.28, "y": 36.5 }, + { "time": 0.2666, "x": 86.5, "y": 36.99 }, + { "time": 0.5333, "x": -173.36, "y": 37.42 }, + { "time": 0.6, "x": -68.15, "y": 141.15 }, + { "time": 0.7333, "x": 91.78, "y": 238.01 }, + { "time": 0.8, "x": 155.89, "y": 190.91 }, + { "time": 0.9666, "x": 303.28, "y": 94.4 }, + { "time": 1.0666, "x": 343.28, "y": 36.5 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": -4.78 }, + { "time": 0.0666, "angle": -3.99 }, + { "time": 0.2666, "angle": -12.49 }, + { "time": 0.5333, "angle": -4.78 }, + { "time": 0.6, "angle": -3.99 }, + { "time": 0.8, "angle": -12.49 }, + { "time": 1.0666, "angle": -4.78 } + ], + "translate": [ + { + "time": 0, + "x": 161.93, + "y": 4.89, + "curve": [ 0.27, 0.37, 0.62, 0.4 ] + }, + { + "time": 0.0666, + "x": 165.04, + "y": -5.99, + "curve": [ 0.244, 0, 0.757, 1 ] + }, + { + "time": 0.2666, + "x": 178.8, + "y": 136.52, + "curve": [ 0.25, 0, 0.841, 0.8 ] + }, + { + "time": 0.5333, + "x": 161.93, + "y": 4.89, + "curve": [ 0.27, 0.37, 0.62, 0.4 ] + }, + { + "time": 0.6, + "x": 165.04, + "y": -5.99, + "curve": [ 0.244, 0, 0.757, 1 ] + }, + { + "time": 0.8, + "x": 178.8, + "y": 136.52, + "curve": [ 0.25, 0, 0.858, 0.82 ] + }, + { "time": 1.0666, "x": 161.93, "y": 4.89 } + ] + }, + "rear_foot_goal": { + "rotate": [ + { "time": 0, "angle": -62.73 }, + { "time": 0.2666, "angle": -107.17 }, + { "time": 0.4666, "angle": -40.51 }, + { "time": 0.8, "angle": -97.15 }, + { "time": 1.0666, "angle": -62.73 } + ], + "translate": [ + { "time": 0, "x": -266.69, "y": -15.46 }, + { "time": 0.1333, "x": -87.88, "y": 124.85 }, + { "time": 0.2666, "x": 88.35, "y": 134.06 }, + { "time": 0.3666, "x": 198.39, "y": 90.64 }, + { "time": 0.4666, "x": 308.19, "y": -26.42 }, + { "time": 0.6, "x": 167.06, "y": -26.42 }, + { "time": 1.0666, "x": -266.69, "y": -15.46 } + ] + }, + "front_leg1": { + "rotate": [ + { "time": 0, "angle": 27.07 }, + { "time": 1.0666, "angle": 31.39 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.0666, "x": -0.21, "y": 15.19 }, + { "time": 0.5333, "x": -0.33, "y": 12.15 }, + { "time": 0.7333, "x": -4.74, "y": 31.93 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_leg_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": -18.04, "y": -2.88 }, + { "time": 0.4333, "x": -42.2, "y": -88.63 }, + { "time": 0.5333, "x": -27.31, "y": -43.9 }, + { "time": 0.7333, "x": -1.52, "y": -94.28 }, + { "time": 0.8, "x": -24.29, "y": -116.41 }, + { "time": 1, "x": -41.88, "y": -93.3 }, + { "time": 1.0666, "x": -18.04, "y": -2.88 } + ] + }, + "rear_leg1": { + "rotate": [ + { "time": 0, "angle": -64.85 }, + { "time": 1.0666, "angle": -45.71 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_leg_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": -2.05, "y": 15.12 }, + { "time": 0.2666, "x": 17.49, "y": -150.43 }, + { "time": 0.4666, "x": -40.21, "y": -81.76 }, + { "time": 0.5333, "x": -31.68, "y": -82.43 }, + { "time": 0.8, "x": 2.65, "y": -169.21 }, + { "time": 0.9333, "x": -16.76, "y": -98.31 }, + { "time": 1.0666, "x": -2.05, "y": 15.12 } + ] + }, + "tail1": { + "rotate": [ + { "time": 0, "angle": 1.3 }, + { "time": 0.0666, "angle": 4.13 }, + { "time": 0.3333, "angle": -5.77 }, + { "time": 0.6333, "angle": 4.13 }, + { "time": 0.9, "angle": -5.77 }, + { "time": 1.0666, "angle": 1.3 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.0666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "torso1": { + "rotate": [ + { "time": 0, "angle": 7.21 }, + { "time": 0.2666, "angle": 4.19 }, + { "time": 0.5333, "angle": 7.21 }, + { "time": 0.8, "angle": 4.19 }, + { "time": 1.0666, "angle": 7.21 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_leg2": { + "rotate": [ + { "time": 0, "angle": -347.28 }, + { "time": 1.0666, "angle": -362.06 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_leg2": { + "rotate": [ + { "time": 0, "angle": 27.05 }, + { "time": 1.0666, "angle": 9.92 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle": { + "rotate": [ + { "time": 0, "angle": -2.51 }, + { "time": 0.2666, "angle": -4.17 }, + { "time": 0.5333, "angle": -3.85 }, + { "time": 0.8, "angle": -3.09 }, + { "time": 1.0666, "angle": -2.51 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { + "time": 0.2666, + "x": 0, + "y": 0, + "curve": [ 0.149, 0.28, 0.75, 1 ] + }, + { + "time": 0.3333, + "x": -0.03, + "y": 5.91, + "curve": [ 0.421, 0, 0.85, 0.78 ] + }, + { "time": 0.5333, "x": 0, "y": 0 }, + { "time": 0.6, "x": -0.2, "y": -2.35 }, + { + "time": 0.8, + "x": 0, + "y": 0, + "curve": [ 0.149, 0.28, 0.75, 1 ] + }, + { + "time": 0.8666, + "x": -0.03, + "y": 5.91, + "curve": [ 0.421, 0, 0.85, 0.78 ] + }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tail2": { + "rotate": [ + { "time": 0, "angle": -19.15 }, + { "time": 0.2333, "angle": -11.3 }, + { "time": 0.5, "angle": -9.37 }, + { "time": 0.7666, "angle": -11.3 }, + { "time": 1.0333, "angle": -20.27 }, + { "time": 1.0666, "angle": -19.15 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 0.8, "y": 1 }, + { "time": 0.2333, "x": 0.9, "y": 1 }, + { "time": 0.5, "x": 0.8, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 0.8, "y": 1 } + ] + }, + "torso2": { + "rotate": [ + { "time": 0, "angle": 8.6 }, + { + "time": 0.2666, + "angle": 9.52, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.5333, "angle": 8.01 }, + { + "time": 0.8, + "angle": 5.48, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.0666, "angle": 8.6 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_arm1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5, "angle": -367.82 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 20.64, "y": -7.55 }, + { "time": 0.5, "x": -2.86, "y": 3.32 }, + { "time": 0.8, "x": 24.09, "y": -1.47 }, + { "time": 0.9333, "x": 21.73, "y": -3.7 }, + { "time": 1.0666, "x": 20.64, "y": -7.55 } + ] + }, + "front_leg3": { + "rotate": [ + { "time": 0, "angle": 1.14, "curve": "stepped" }, + { "time": 1.0666, "angle": 1.14 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 6.5 }, + { "time": 0.2666, "angle": 12.71 }, + { "time": 0.5333, "angle": 6.5 }, + { "time": 0.8, "angle": 12.71 }, + { "time": 1.0666, "angle": 6.5 } + ], + "translate": [ + { "time": 0, "x": 12.59, "y": -31.3 }, + { + "time": 0.2666, + "x": -10.84, + "y": -72.28, + "curve": [ 0.204, 0.01, 0.861, 0.86 ] + }, + { "time": 0.5333, "x": 12.59, "y": -31.3 }, + { + "time": 0.8, + "x": -10.84, + "y": -72.28, + "curve": [ 0.204, 0.01, 0.861, 0.86 ] + }, + { "time": 1.0666, "x": 12.59, "y": -31.3 } + ] + }, + "rear_arm1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5, "angle": 13.71 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.5, "x": 11.12, "y": -13.38 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_leg3": { + "rotate": [ + { "time": 0, "angle": -23.18, "curve": "stepped" }, + { "time": 1.0666, "angle": -23.18 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_front1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_rear1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tail3": { + "rotate": [ + { "time": 0, "angle": -12.46 }, + { "time": 0.2333, "angle": 12.65 }, + { "time": 0.5, "angle": -20.79 }, + { "time": 0.7666, "angle": 12.65 }, + { "time": 1.0333, "angle": -16.04 }, + { "time": 1.0666, "angle": -12.46 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.2333, "x": 1, "y": 1 }, + { "time": 0.5, "x": 0.997, "y": 1 }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5, "angle": 22.44 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_foot1": { + "rotate": [ + { "time": 0, "angle": -41.33, "curve": "stepped" }, + { "time": 1.0666, "angle": -41.33 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": -7.36 }, + { + "time": 0.1333, + "angle": -12.99, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.4, "angle": -6.12 }, + { "time": 0.5333, "angle": -7.36 }, + { + "time": 0.6666, + "angle": -12.99, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.9333, "angle": -6.12 }, + { "time": 1.0666, "angle": -7.36 } + ], + "translate": [ + { "time": 0, "x": -3.88, "y": -32.87 }, + { "time": 0.9333, "x": -3.33, "y": -22.81 }, + { "time": 1.0666, "x": -3.88, "y": -32.87 } + ] + }, + "rear_arm2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5, "angle": -30.2 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_foot1": { + "rotate": [ + { "time": 0, "angle": 2.07, "curve": "stepped" }, + { "time": 1.0666, "angle": 2.07 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_front2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_rear2": { + "rotate": [ + { "time": 0, "angle": -4.44 }, + { "time": 0.1, "angle": -2.66 }, + { "time": 0.3, "angle": -0.35 }, + { "time": 0.4333, "angle": -1.7 }, + { "time": 0.6333, "angle": -2.54 }, + { "time": 0.9, "angle": -0.51 }, + { "time": 1.0666, "angle": -4.44 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "stirrup": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.2666, "angle": -4.95 }, + { "time": 0.5333, "angle": 0 }, + { "time": 0.8, "angle": -4.95 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 8.97, "y": 4.99 }, + { "time": 0.2666, "x": 4.85, "y": 0.99 }, + { "time": 0.5333, "x": 7.75, "y": -2.99 }, + { "time": 0.8, "x": 4.85, "y": 0.99 }, + { "time": 1.0666, "x": 8.97, "y": 4.99 } + ] + }, + "tail4": { + "rotate": [ + { "time": 0, "angle": 10.25 }, + { + "time": 0.2333, + "angle": 39.47, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.5, "angle": 1.33 }, + { + "time": 0.7666, + "angle": 39.47, + "curve": [ 0.664, 0, 0.75, 1 ] + }, + { "time": 1.0333, "angle": 6.08 }, + { "time": 1.0666, "angle": 10.25 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.2333, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.5, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_foot2": { + "rotate": [ + { "time": 0, "angle": 36.9 }, + { "time": 0.0666, "angle": 7.88 }, + { "time": 0.1333, "angle": 4.66 }, + { "time": 0.4, "angle": 7.59 }, + { "time": 0.5333, "angle": 8.08 }, + { "time": 0.6666, "angle": -67.33 }, + { "time": 0.7333, "angle": -65.23 }, + { "time": 1, "angle": 27.74 }, + { "time": 1.0666, "angle": 36.9 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_hand": { + "rotate": [ + { "time": 0, "angle": 9.49 }, + { "time": 0.5, "angle": -48.6 }, + { "time": 1.0666, "angle": 9.49 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "horn_front": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2666, "x": -7.18, "y": -1.38 }, + { "time": 0.5333, "x": 0, "y": 0 }, + { "time": 0.8, "x": -7.18, "y": -1.38 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "horn_rear": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2666, "x": 12.34, "y": 9.16 }, + { "time": 0.5333, "x": 0, "y": 0 }, + { "time": 0.8, "x": 12.34, "y": 9.16 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "jaw": { + "rotate": [ + { "time": 0, "angle": 25.56 }, + { "time": 0.2, "angle": 21.27 }, + { "time": 0.3333, "angle": 21.35 }, + { "time": 0.6666, "angle": 15.6 }, + { "time": 0.8666, "angle": 22.96 }, + { "time": 1.0666, "angle": 25.56 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_foot2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": -82.37 }, + { "time": 0.2666, "angle": -110.3 }, + { "time": 0.4333, "angle": 36.21 }, + { "time": 0.5333, "angle": 2.1 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_hand": { + "rotate": [ + { "time": 0, "angle": -28.89 }, + { "time": 0.5, "angle": 12.19 }, + { "time": 1.0666, "angle": -28.89 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_rear3": { + "rotate": [ + { "time": 0, "angle": -1.31 }, + { "time": 0.1, "angle": 0.46 }, + { "time": 0.3, "angle": 2.77 }, + { "time": 0.4333, "angle": 1.42 }, + { "time": 0.6333, "angle": 0.58 }, + { "time": 0.9, "angle": 2.61 }, + { "time": 1.0666, "angle": -1.31 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tail5": { + "rotate": [ + { + "time": 0, + "angle": -26.34, + "curve": [ 0.391, -0.58, 0.653, 1.01 ] + }, + { + "time": 0.2333, + "angle": 45.41, + "curve": [ 0.391, -0.58, 0.653, 1.01 ] + }, + { + "time": 0.5, + "angle": -21.92, + "curve": [ 0.391, -0.58, 0.653, 1.01 ] + }, + { + "time": 0.7666, + "angle": 45.41, + "curve": [ 0.391, -0.58, 0.653, 1.01 ] + }, + { "time": 1.0333, "angle": -7.73 }, + { "time": 1.0666, "angle": -26.34 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 0.765, "y": 1 }, + { "time": 0.2333, "x": 1, "y": 1 }, + { "time": 0.5, "x": 0.765, "y": 1 }, + { "time": 0.7666, "x": 1, "y": 1 }, + { "time": 1.0666, "x": 0.765, "y": 1 } + ] + }, + "tongue1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": 7.55 }, + { "time": 0.6666, "angle": -1.68 }, + { "time": 0.9333, "angle": 8.11 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_foot3": { + "rotate": [ + { "time": 0, "angle": -1.65 }, + { "time": 0.0666, "angle": -5.29 }, + { "time": 0.1333, "angle": -3.94 }, + { "time": 0.2666, "angle": -3.81 }, + { "time": 0.5333, "angle": -5.89 }, + { "time": 0.6, "angle": -21.2 }, + { "time": 0.6666, "angle": -73.63 }, + { "time": 0.7333, "angle": -102.81 }, + { "time": 0.8333, "angle": -41.3 }, + { "time": 1, "angle": 10.93 }, + { "time": 1.0666, "angle": -1.65 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tongue2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": 7.55 }, + { "time": 0.6666, "angle": -1.68 }, + { "time": 0.9333, "angle": 8.11 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tongue3": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": 7.55 }, + { "time": 0.6666, "angle": -1.68 }, + { "time": 0.9333, "angle": 8.11 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "head2": { + "rotate": [ + { "time": 0, "angle": 38.59 }, + { "time": 0.2666, "angle": 43.18 }, + { "time": 0.5333, "angle": 38.59 }, + { "time": 0.8, "angle": 43.18 }, + { "time": 1.0666, "angle": 38.59 } + ] + }, + "neck2": { + "rotate": [ + { "time": 0, "angle": 9.65 }, + { "time": 0.2666, "angle": 14.71 }, + { "time": 0.5333, "angle": 9.65 }, + { "time": 0.8, "angle": 14.71 }, + { "time": 1.0666, "angle": 9.65 } + ] + }, + "spineboy_hip": { + "translate": [ + { + "time": 0, + "x": 32.54, + "y": 1.34, + "curve": [ 0.412, 0, 0.872, 0.78 ] + }, + { + "time": 0.2666, + "x": -12.88, + "y": 0.58, + "curve": [ 0.138, 0.17, 0.75, 1 ] + }, + { + "time": 0.5333, + "x": 32.54, + "y": 1.34, + "curve": [ 0.367, 0, 0.867, 0.81 ] + }, + { + "time": 0.8, + "x": -12.88, + "y": 0.58, + "curve": [ 0.164, 0.17, 0.75, 1 ] + }, + { "time": 1.0666, "x": 32.54, "y": 1.34 } + ] + }, + "spineboy_torso": { + "rotate": [ + { "time": 0, "angle": -37.93 }, + { + "time": 0.2666, + "angle": -29.47, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { "time": 0.5333, "angle": -37.93 }, + { + "time": 0.8, + "angle": -29.47, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { "time": 1.0666, "angle": -37.71 } + ] + }, + "front_arm": { + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.3333, "x": -14.43, "y": -11.03 }, + { "time": 0.5333, "x": 0, "y": 0 }, + { "time": 0.8, "x": -14.43, "y": -11.03 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "gun": { + "rotate": [ + { + "time": 0, + "angle": -11.68, + "curve": [ 0.379, 0.6, 0.724, 1 ] + }, + { "time": 0.0666, "angle": -17.59 }, + { + "time": 0.3333, + "angle": 14.45, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6, + "angle": -24.74, + "curve": [ 0.326, 0, 0.715, 1 ] + }, + { + "time": 0.8666, + "angle": 14.45, + "curve": [ 0.242, 0, 0.666, 0.66 ] + }, + { "time": 1.0666, "angle": -11.68 } + ], + "translate": [ + { "time": 0, "x": 0.84, "y": -3.81 }, + { "time": 0.0666, "x": 0, "y": 0 }, + { "time": 0.3333, "x": 3.37, "y": -15.27 }, + { "time": 0.6, "x": 0, "y": 0 }, + { "time": 0.8666, "x": 3.37, "y": -15.27 }, + { "time": 1.0666, "x": 0.84, "y": -3.81 } + ] + } + }, + "deform": { + "default": { + "raptor_body": { + "raptor_body": [ + { "time": 0 }, + { + "time": 0.2666, + "offset": 314, + "vertices": [ -16.78684, 15.47479, -0.63024, 22.82083, 18.11511, 13.89254, 19.32452, 12.15423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, 0, 0, 0, 0, 0, 0, -3.24548, 0.81152, 0, 0, -3.24548, 0.81152 ] + }, + { "time": 0.5333 }, + { + "time": 0.8, + "offset": 314, + "vertices": [ -16.78684, 15.47479, -0.63024, 22.82083, 18.11511, 13.89254, 19.32452, 12.15423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, 0, 0, 0, 0, 0, 0, -3.24548, 0.81152, 0, 0, -3.24548, 0.81152 ] + }, + { "time": 1.0666 } + ] + }, + "raptor_front_leg": { + "raptor_front_leg": [ + { "time": 0, "curve": "stepped" }, + { "time": 0.2666 }, + { + "time": 0.5333, + "offset": 138, + "vertices": [ -2.23608, 21.95403, 21.54915, -4.7554 ] + }, + { + "time": 0.6, + "offset": 138, + "vertices": [ 7.17962, 15.14358, 15.26523, -6.91741 ] + }, + { + "time": 0.7333, + "offset": 110, + "vertices": [ -0.82485, 0.73406, -0.01284, -1.10443, 0, 0, 0, 0, 1.4866, -2.59426, 0.98071, 2.82342, 2.7366, -10.49935, 6.12506, 8.95282, -2.60873, -2.28384, 3.43417, -0.47045, -2.28305, -4.76037, 5.08892, 1.40078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.37966, -1.75515, -2.13229, -0.65667, -2.86239, -0.77365, 2.45989, -1.65319 ] + }, + { "time": 0.8, "curve": "stepped" }, + { "time": 0.9666, "curve": "stepped" }, + { "time": 1.0666 } + ] + } + } + } + } +} +} \ No newline at end of file diff --git a/spine-ts/webgl/example/assets/raptor.png b/spine-ts/webgl/example/assets/raptor.png new file mode 100644 index 000000000..503d1c446 Binary files /dev/null and b/spine-ts/webgl/example/assets/raptor.png differ diff --git a/spine-ts/webgl/example/assets/spineboy.atlas b/spine-ts/webgl/example/assets/spineboy.atlas new file mode 100644 index 000000000..e9500cc4a --- /dev/null +++ b/spine-ts/webgl/example/assets/spineboy.atlas @@ -0,0 +1,195 @@ + +spineboy.png +size: 1024,1024 +format: RGBA8888 +filter: Linear,Linear +repeat: none +eye_indifferent + rotate: false + xy: 550, 694 + size: 93, 89 + orig: 93, 89 + offset: 0, 0 + index: -1 +eye_surprised + rotate: false + xy: 834, 856 + size: 93, 89 + orig: 93, 89 + offset: 0, 0 + index: -1 +front_bracer + rotate: false + xy: 678, 774 + size: 58, 80 + orig: 58, 80 + offset: 0, 0 + index: -1 +front_fist_closed + rotate: true + xy: 466, 593 + size: 75, 82 + orig: 75, 82 + offset: 0, 0 + index: -1 +front_fist_open + rotate: false + xy: 550, 605 + size: 86, 87 + orig: 86, 87 + offset: 0, 0 + index: -1 +front_foot + rotate: false + xy: 550, 785 + size: 126, 69 + orig: 126, 69 + offset: 0, 0 + index: -1 +front_foot_bend1 + rotate: true + xy: 375, 492 + size: 128, 70 + orig: 128, 70 + offset: 0, 0 + index: -1 +front_foot_bend2 + rotate: true + xy: 275, 330 + size: 108, 93 + orig: 108, 93 + offset: 0, 0 + index: -1 +front_shin + rotate: false + xy: 466, 670 + size: 82, 184 + orig: 82, 184 + offset: 0, 0 + index: -1 +front_thigh + rotate: false + xy: 214, 208 + size: 48, 112 + orig: 48, 112 + offset: 0, 0 + index: -1 +front_upper_arm + rotate: false + xy: 214, 109 + size: 54, 97 + orig: 54, 97 + offset: 0, 0 + index: -1 +goggles + rotate: false + xy: 466, 856 + size: 261, 166 + orig: 261, 166 + offset: 0, 0 + index: -1 +gun + rotate: false + xy: 2, 117 + size: 210, 203 + orig: 210, 203 + offset: 0, 0 + index: -1 +head + rotate: false + xy: 2, 322 + size: 271, 298 + orig: 271, 298 + offset: 0, 0 + index: -1 +mouth_grind + rotate: false + xy: 929, 896 + size: 93, 59 + orig: 93, 59 + offset: 0, 0 + index: -1 +mouth_oooo + rotate: false + xy: 929, 835 + size: 93, 59 + orig: 93, 59 + offset: 0, 0 + index: -1 +mouth_smile + rotate: false + xy: 447, 532 + size: 93, 59 + orig: 93, 59 + offset: 0, 0 + index: -1 +muzzle + rotate: false + xy: 2, 622 + size: 462, 400 + orig: 462, 400 + offset: 0, 0 + index: -1 +neck + rotate: false + xy: 796, 819 + size: 36, 41 + orig: 36, 41 + offset: 0, 0 + index: -1 +rear_bracer + rotate: false + xy: 738, 788 + size: 56, 72 + orig: 56, 72 + offset: 0, 0 + index: -1 +rear_foot + rotate: true + xy: 2, 2 + size: 113, 60 + orig: 113, 60 + offset: 0, 0 + index: -1 +rear_foot_bend1 + rotate: false + xy: 64, 49 + size: 117, 66 + orig: 117, 66 + offset: 0, 0 + index: -1 +rear_foot_bend2 + rotate: false + xy: 729, 862 + size: 103, 83 + orig: 103, 83 + offset: 0, 0 + index: -1 +rear_shin + rotate: true + xy: 729, 947 + size: 75, 178 + orig: 75, 178 + offset: 0, 0 + index: -1 +rear_thigh + rotate: true + xy: 909, 957 + size: 65, 104 + orig: 65, 104 + offset: 0, 0 + index: -1 +rear_upper_arm + rotate: true + xy: 447, 483 + size: 47, 87 + orig: 47, 87 + offset: 0, 0 + index: -1 +torso + rotate: false + xy: 275, 440 + size: 98, 180 + orig: 98, 180 + offset: 0, 0 + index: -1 diff --git a/spine-ts/webgl/example/assets/spineboy.json b/spine-ts/webgl/example/assets/spineboy.json new file mode 100644 index 000000000..88bafe6a7 --- /dev/null +++ b/spine-ts/webgl/example/assets/spineboy.json @@ -0,0 +1,2412 @@ +{ +"skeleton": { "hash": "rPoYyBLFG6F0CGZ5wsUEBKDJU9U", "spine": "3.3.07", "width": 470.71, "height": 731.57, "images": "./images/" }, +"bones": [ + { "name": "hip", "y": 247.47 }, + { "name": "torso", "parent": "hip", "length": 127.55, "rotation": 103.82, "x": -1.61, "y": 4.9, "color": "e0da19ff" }, + { "name": "front_upper_arm", "parent": "torso", "length": 69.45, "rotation": 168.37, "x": 103.75, "y": 19.32, "color": "00ff04ff" }, + { + "name": "front_bracer", + "parent": "front_upper_arm", + "length": 40.57, + "rotation": 18.29, + "x": 68.8, + "y": -0.68, + "color": "00ff04ff" + }, + { "name": "front_fist", "parent": "front_bracer", "length": 65.38, "rotation": 12.43, "x": 40.56, "y": 0.19, "color": "00ff04ff" }, + { "name": "front_thigh", "parent": "hip", "length": 74.8, "rotation": -95.51, "x": -17.45, "y": -11.64, "color": "00ff04ff" }, + { "name": "front_shin", "parent": "front_thigh", "length": 128.76, "rotation": -2.21, "x": 78.69, "y": 1.6, "color": "00ff04ff" }, + { "name": "front_foot", "parent": "front_shin", "length": 91.34, "rotation": 77.9, "x": 128.75, "y": -0.33, "color": "00ff04ff" }, + { "name": "rear_upper_arm", "parent": "torso", "length": 51.93, "rotation": -169.55, "x": 92.35, "y": -19.22, "color": "ff000dff" }, + { "name": "rear_bracer", "parent": "rear_upper_arm", "length": 34.55, "rotation": 23.15, "x": 51.35, "color": "ff000dff" }, + { "name": "gun", "parent": "rear_bracer", "length": 43.1, "rotation": 5.34, "x": 34.42, "y": -0.45, "color": "ff000dff" }, + { "name": "gunTip", "parent": "gun", "rotation": 6.83, "x": 201.04, "y": 52.13, "color": "ff000dff" }, + { "name": "neck", "parent": "torso", "length": 25.45, "rotation": -31.53, "x": 127.49, "y": -0.3, "color": "e0da19ff" }, + { "name": "head", "parent": "neck", "length": 263.57, "rotation": 23.18, "x": 27.66, "y": -0.25, "color": "e0da19ff" }, + { "name": "rear_thigh", "parent": "hip", "length": 85.71, "rotation": -72.54, "x": 8.91, "y": -5.62, "color": "ff000dff" }, + { "name": "rear_shin", "parent": "rear_thigh", "length": 121.87, "rotation": -19.83, "x": 86.1, "y": -1.32, "color": "ff000dff" }, + { "name": "rear_foot", "parent": "rear_shin", "length": 82.57, "rotation": 69.3, "x": 121.45, "y": -0.75, "color": "ff000dff" } +], +"slots": [ + { "name": "rear_upper_arm", "bone": "rear_upper_arm", "attachment": "rear_upper_arm" }, + { "name": "rear_bracer", "bone": "rear_bracer", "attachment": "rear_bracer" }, + { "name": "gun", "bone": "gun", "attachment": "gun" }, + { "name": "rear_foot", "bone": "rear_foot", "attachment": "rear_foot" }, + { "name": "rear_thigh", "bone": "rear_thigh", "attachment": "rear_thigh" }, + { "name": "rear_shin", "bone": "rear_shin", "attachment": "rear_shin" }, + { "name": "neck", "bone": "neck", "attachment": "neck" }, + { "name": "torso", "bone": "torso", "attachment": "torso" }, + { "name": "front_upper_arm", "bone": "front_upper_arm", "attachment": "front_upper_arm" }, + { "name": "head", "bone": "head", "attachment": "head" }, + { "name": "eye", "bone": "head", "attachment": "eye_indifferent" }, + { "name": "front_thigh", "bone": "front_thigh", "attachment": "front_thigh" }, + { "name": "front_foot", "bone": "front_foot", "attachment": "front_foot" }, + { "name": "front_shin", "bone": "front_shin", "attachment": "front_shin" }, + { "name": "mouth", "bone": "head", "attachment": "mouth_smile" }, + { "name": "goggles", "bone": "head", "attachment": "goggles" }, + { "name": "front_bracer", "bone": "front_bracer", "attachment": "front_bracer" }, + { "name": "front_fist", "bone": "front_fist", "attachment": "front_fist_closed" }, + { "name": "muzzle", "bone": "gunTip", "blend": "additive" }, + { "name": "head-bb", "bone": "head" } +], +"skins": { + "default": { + "eye": { + "eye_indifferent": { "x": 85.72, "y": -28.18, "rotation": -70.63, "width": 93, "height": 89 }, + "eye_surprised": { "x": 85.72, "y": -28.18, "rotation": -70.63, "width": 93, "height": 89 } + }, + "front_bracer": { + "front_bracer": { "x": 12.03, "y": -1.67, "rotation": 79.59, "width": 58, "height": 80 } + }, + "front_fist": { + "front_fist_closed": { "x": 35.49, "y": 6, "rotation": 67.16, "width": 75, "height": 82 }, + "front_fist_open": { "x": 39.56, "y": 7.76, "rotation": 67.16, "width": 86, "height": 87 } + }, + "front_foot": { + "front_foot": { "x": 29.51, "y": 7.83, "rotation": 18.68, "width": 126, "height": 69 }, + "front_foot_bend1": { "x": 29.51, "y": 7.83, "rotation": 18.68, "width": 128, "height": 70 }, + "front_foot_bend2": { "x": 16.07, "y": 13.83, "rotation": 18.68, "width": 108, "height": 93 } + }, + "front_shin": { + "front_shin": { "x": 55.11, "y": -3.54, "rotation": 96.59, "width": 82, "height": 184 } + }, + "front_thigh": { + "front_thigh": { "x": 42.47, "y": 4.44, "rotation": 84.86, "width": 48, "height": 112 } + }, + "front_upper_arm": { + "front_upper_arm": { "x": 28.3, "y": 7.37, "rotation": 97.89, "width": 54, "height": 97 } + }, + "goggles": { + "goggles": { "x": 97.07, "y": 6.54, "rotation": -70.63, "width": 261, "height": 166 } + }, + "gun": { + "gun": { "x": 77.3, "y": 16.4, "rotation": 60.82, "width": 210, "height": 203 } + }, + "head": { + "head": { "x": 128.95, "y": 0.29, "rotation": -70.63, "width": 271, "height": 298 } + }, + "head-bb": { + "head": { + "type": "boundingbox", + "vertexCount": 6, + "vertices": [ -19.14, -70.3, 40.8, -118.07, 257.77, -115.61, 285.16, 57.18, 120.77, 164.95, -5.06, 76.94 ] + } + }, + "mouth": { + "mouth_grind": { "x": 23.68, "y": -32.23, "rotation": -70.63, "width": 93, "height": 59 }, + "mouth_oooo": { "x": 23.68, "y": -32.23, "rotation": -70.63, "width": 93, "height": 59 }, + "mouth_smile": { "x": 23.68, "y": -32.23, "rotation": -70.63, "width": 93, "height": 59 } + }, + "muzzle": { + "muzzle": { "x": 18.25, "y": 5.44, "rotation": 0.15, "width": 462, "height": 400 } + }, + "neck": { + "neck": { "x": 9.76, "y": -3.01, "rotation": -55.22, "width": 36, "height": 41 } + }, + "rear_bracer": { + "rear_bracer": { "x": 11.15, "y": -2.2, "rotation": 66.17, "width": 56, "height": 72 } + }, + "rear_foot": { + "rear_foot": { "x": 31.51, "y": 3.57, "rotation": 23.07, "width": 113, "height": 60 }, + "rear_foot_bend1": { "x": 34.39, "y": 4.8, "rotation": 23.07, "width": 117, "height": 66 }, + "rear_foot_bend2": { "x": 30.38, "y": 12.62, "rotation": 23.07, "width": 103, "height": 83 } + }, + "rear_shin": { + "rear_shin": { "x": 58.29, "y": -2.75, "rotation": 92.37, "width": 75, "height": 178 } + }, + "rear_thigh": { + "rear_thigh": { "x": 33.1, "y": -4.11, "rotation": 72.54, "width": 65, "height": 104 } + }, + "rear_upper_arm": { + "rear_upper_arm": { "x": 21.12, "y": 4.08, "rotation": 89.32, "width": 47, "height": 87 } + }, + "torso": { + "torso": { "x": 63.61, "y": 7.12, "rotation": -94.53, "width": 98, "height": 180 } + } + } +}, +"events": { + "footstep": {}, + "headAttach": { "int": 3, "float": 4 }, + "headBehind": { "int": 5, "float": 6, "string": "setup" }, + "headPop": { "int": 1, "float": 2 } +}, +"animations": { + "death": { + "slots": { + "eye": { + "attachment": [ + { "time": 0, "name": "eye_surprised" }, + { "time": 0.4666, "name": "eye_indifferent" }, + { "time": 2.2333, "name": "eye_surprised" }, + { "time": 4.5333, "name": "eye_indifferent" } + ] + }, + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_oooo" }, + { "time": 2.2333, "name": "mouth_grind" }, + { "time": 4.5333, "name": "mouth_oooo" } + ] + } + }, + "bones": { + "head": { + "rotate": [ + { "time": 0, "angle": -2.82 }, + { "time": 0.1333, "angle": -28.74 }, + { "time": 0.2333, "angle": 11.42 }, + { "time": 0.3333, "angle": -50.24 }, + { "time": 0.4, "angle": -72.66, "curve": "stepped" }, + { "time": 0.4333, "angle": -72.66 }, + { "time": 0.5, "angle": -20.24 }, + { "time": 0.5666, "angle": -85.28, "curve": "stepped" }, + { "time": 0.9333, "angle": -85.28, "curve": "stepped" }, + { "time": 2.2333, "angle": -85.28 }, + { "time": 2.5, "angle": -51.96, "curve": "stepped" }, + { "time": 4.5333, "angle": -51.96 }, + { "time": 4.6666, "angle": -85.28 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": -2.82 }, + { "time": 0.1333, "angle": 12.35 }, + { "time": 0.2333, "angle": 29.89 }, + { "time": 0.3, "angle": 70.36 }, + { "time": 0.4, "angle": -10.22, "curve": "stepped" }, + { "time": 0.4333, "angle": -10.22 }, + { "time": 0.5, "angle": 2.92 }, + { "time": 0.5666, "angle": 47.94, "curve": "stepped" }, + { "time": 2.2333, "angle": 47.94 }, + { "time": 2.5, "angle": 18.5, "curve": "stepped" }, + { "time": 4.5333, "angle": 18.5 }, + { "time": 4.6666, "angle": 47.94 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -8.61 }, + { "time": 0.1333, "angle": 28.19 }, + { "time": 0.2666, "angle": -280.19 }, + { "time": 0.4, "angle": -237.22, "curve": "stepped" }, + { "time": 0.4333, "angle": -237.22 }, + { "time": 0.5, "angle": 76.03, "curve": "stepped" }, + { "time": 0.8, "angle": 76.03, "curve": "stepped" }, + { "time": 0.9333, "angle": 76.03, "curve": "stepped" }, + { "time": 2.2333, "angle": 76.03 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 2.2333, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { "time": 0, "angle": -38.85 }, + { "time": 0.1333, "angle": -299.58 }, + { "time": 0.2666, "angle": -244.74 }, + { "time": 0.4, "angle": -292.35 }, + { "time": 0.4333, "angle": -315.84 }, + { "time": 0.5, "angle": -347.94 }, + { "time": 0.7, "angle": -347.33, "curve": "stepped" }, + { "time": 2.2333, "angle": -347.33 }, + { "time": 2.7, "angle": -290.68 }, + { "time": 2.7666, "angle": -285.1 }, + { "time": 4.6666, "angle": -290.68 }, + { "time": 4.8, "angle": 8.61 }, + { "time": 4.8666, "angle": 10.94 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": -44.69 }, + { "time": 0.1333, "angle": 112.26 }, + { "time": 0.2666, "angle": 129.07 }, + { "time": 0.4, "angle": 134.94, "curve": "stepped" }, + { "time": 0.4333, "angle": 134.94 }, + { "time": 0.5666, "angle": 172.6, "curve": "stepped" }, + { "time": 0.9333, "angle": 172.6, "curve": "stepped" }, + { "time": 2.2333, "angle": 172.6 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 21.88 }, + { "time": 0.1333, "angle": 11.48 }, + { "time": 0.2666, "angle": -18.81 }, + { "time": 0.4, "angle": -18.92 }, + { "time": 0.4333, "angle": -18.28 }, + { "time": 0.5, "angle": 60.61 }, + { "time": 0.7, "angle": -18.87, "curve": "stepped" }, + { "time": 2.2333, "angle": -18.87 }, + { "time": 2.7, "angle": -1.95, "curve": "stepped" }, + { "time": 4.6666, "angle": -1.95 }, + { "time": 4.8, "angle": 34.55 }, + { "time": 4.9333, "angle": -18.74 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": -2.33 }, + { "time": 0.2666, "angle": 26.34 }, + { "time": 0.7, "angle": -6.07, "curve": "stepped" }, + { "time": 2.2333, "angle": -6.07 }, + { "time": 2.7, "angle": 5.72, "curve": "stepped" }, + { "time": 4.6666, "angle": 5.72 }, + { "time": 4.8666, "angle": -6.52 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 10.36 }, + { "time": 0.1333, "angle": -23.12 }, + { "time": 0.2666, "angle": -23.11 }, + { "time": 0.4, "angle": -23.16, "curve": "stepped" }, + { "time": 0.4333, "angle": -23.16 }, + { "time": 0.5666, "angle": -23.2, "curve": "stepped" }, + { "time": 0.9333, "angle": -23.2, "curve": "stepped" }, + { "time": 2.2333, "angle": -23.2 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": -2.78 }, + { "time": 0.1333, "angle": -24.58 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.9333, "angle": 0, "curve": "stepped" }, + { "time": 2.2333, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2, "x": 50.34, "y": 151.73 }, + { "time": 0.4, "x": 5.16, "y": -119.64, "curve": "stepped" }, + { "time": 0.4333, "x": 5.16, "y": -119.64 }, + { "time": 0.5, "x": 50.34, "y": -205.18, "curve": "stepped" }, + { "time": 0.8, "x": 50.34, "y": -205.18, "curve": "stepped" }, + { "time": 0.9333, "x": 50.34, "y": -205.18, "curve": "stepped" }, + { "time": 2.2333, "x": 50.34, "y": -205.18 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_thigh": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 8.47 }, + { "time": 0.2666, "angle": 115.95 }, + { "time": 0.4, "angle": 180.66, "curve": "stepped" }, + { "time": 0.4333, "angle": 180.66 }, + { "time": 0.5, "angle": 155.22 }, + { "time": 0.6, "angle": 97.73 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": -27.37 }, + { "time": 0.2666, "angle": -35.1 }, + { "time": 0.4, "angle": -37.72, "curve": "stepped" }, + { "time": 0.4333, "angle": -37.72 }, + { "time": 0.5, "angle": -40.06 }, + { "time": 0.6, "angle": 2.76 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 70.45 }, + { "time": 0.2666, "angle": 155.34 }, + { "time": 0.4, "angle": 214.31, "curve": "stepped" }, + { "time": 0.4333, "angle": 214.31 }, + { "time": 0.5, "angle": 169.67 }, + { "time": 0.8, "angle": 83.27 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 18.93 }, + { "time": 0.2666, "angle": -21.04 }, + { "time": 0.4, "angle": -29.93, "curve": "stepped" }, + { "time": 0.4333, "angle": -29.93 }, + { "time": 0.5, "angle": -16.79 }, + { "time": 0.8, "angle": 7.77 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": -11.62 }, + { "time": 0.4, "angle": -45.59, "curve": "stepped" }, + { "time": 0.4333, "angle": -45.59 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.4, "angle": -48.75, "curve": "stepped" }, + { "time": 0.4333, "angle": -48.75 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "gunTip": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + } + } + }, + "hit": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0.1666, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_grind" }, + { "time": 0.3333, "name": "mouth_smile" } + ] + } + }, + "bones": { + "torso": { + "rotate": [ + { "time": 0, "angle": 56.42 }, + { "time": 0.3333, "angle": 8.89 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 35.38 }, + { "time": 0.2333, "angle": 24.94 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 10.21 }, + { "time": 0.3333, "angle": -41.3 } + ] + }, + "front_upper_arm": { + "rotate": [ + { + "time": 0, + "angle": -310.92, + "curve": [ 0.38, 0.53, 0.744, 1 ] + }, + { "time": 0.3333, "angle": -112.59 } + ], + "translate": [ + { "time": 0, "x": 7.23, "y": -13.13 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 36.99 }, + { "time": 0.3333, "angle": -28.64 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": 13.59 }, + { "time": 0.3333, "angle": 7.55 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { + "time": 0, + "angle": 271.02, + "curve": [ 0.342, 0.36, 0.68, 0.71 ] + }, + { "time": 0.3333, "angle": -15.84 } + ], + "translate": [ + { "time": 0.3333, "x": -0.09, "y": -0.46 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": 40.03 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 14.98 }, + { "time": 0.3333, "angle": 39.75 } + ] + }, + "hip": { + "translate": [ + { "time": 0, "x": -75.54, "y": -78.03 }, + { "time": 0.2333, "x": -36.48, "y": 12.42 }, + { "time": 0.3333, "x": -36.48, "y": -2.99 } + ] + }, + "front_thigh": { + "rotate": [ + { + "time": 0, + "angle": 90.94, + "curve": [ 0.227, 0.26, 0.432, 1 ] + }, + { "time": 0.3333, "angle": 32.02 } + ], + "translate": [ + { "time": 0, "x": 7.21, "y": -4 } + ] + }, + "rear_thigh": { + "rotate": [ + { + "time": 0, + "angle": 40.51, + "curve": [ 0.295, 0.3, 0.59, 0.99 ] + }, + { "time": 0.3333, "angle": 90.76 } + ], + "translate": [ + { "time": 0, "x": -1.96, "y": -0.32 } + ] + }, + "front_shin": { + "rotate": [ + { "time": 0, "angle": -96.62 }, + { "time": 0.3333, "angle": -15.13 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": 7.99 }, + { "time": 0.3333, "angle": -67.54 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": 5.4 }, + { "time": 0.3333, "angle": -16.26 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": 2.67 }, + { "time": 0.3333, "angle": -10.31 } + ] + } + } + }, + "idle": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_open" }, + { "time": 1.6666, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_smile" }, + { "time": 1.6666, "name": "mouth_smile" } + ] + } + }, + "bones": { + "torso": { + "rotate": [ + { + "time": 0, + "angle": -5.61, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.8333, + "angle": -9.65, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -5.61 } + ], + "translate": [ + { "time": 0, "x": -6.49, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { + "time": 0, + "angle": -59.85, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -54.31, + "curve": [ 0.324, 0.11, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -59.85 } + ], + "translate": [ + { "time": 0, "x": -7.12, "y": -8.23 }, + { "time": 0.6666, "x": -6.32, "y": -8.3 }, + { "time": 1.6666, "x": -7.12, "y": -8.23 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { + "time": 0, + "angle": 62.41, + "curve": [ 0.504, 0.02, 0.75, 1 ] + }, + { + "time": 0.7333, + "angle": 43.83, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": 62.41 } + ], + "translate": [ + { "time": 0, "x": -1.83, "y": -16.78 }, + { "time": 0.6666, "x": 0.34, "y": -15.23 }, + { "time": 1.6666, "x": -1.83, "y": -16.78 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.6666, "angle": 2.39 }, + { "time": 1.6666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": -1.88, "y": -4.76, "curve": "stepped" }, + { "time": 1.6666, "x": -1.88, "y": -4.76 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_thigh": { + "rotate": [ + { + "time": 0, + "angle": 0.64, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": -4.34, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": 0.64 } + ], + "translate": [ + { "time": 0, "x": -13.39, "y": 6.69, "curve": "stepped" }, + { "time": 1.6666, "x": -13.39, "y": 6.69 } + ], + "scale": [ + { + "time": 0, + "x": 0.896, + "y": 1, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "x": 0.825, + "y": 1, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "x": 0.896, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { "time": 0, "angle": -19.28, "curve": "stepped" }, + { "time": 1.6666, "angle": -19.28 } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "x": 0.994, + "y": 1, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { + "time": 0, + "angle": 30.5, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": 40.15, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": 30.5 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { + "time": 0, + "angle": -23.83, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": -43.77, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": -23.83 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { + "time": 0, + "angle": 5.13, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": 10.04, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": 5.13 } + ], + "scale": [ + { "time": 0, "x": 0.755, "y": 1.309, "curve": "stepped" }, + { "time": 1.6666, "x": 0.755, "y": 1.309 } + ] + }, + "hip": { + "translate": [ + { + "time": 0, + "x": -6.63, + "y": -23.01, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "x": 6.27, + "y": -35, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "x": -6.63, "y": -23.01 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { + "time": 0, + "angle": -7.34, + "curve": [ 0.235, 0, 0.558, 0.99 ] + }, + { + "time": 0.6666, + "angle": 3.85, + "curve": [ 0.594, 0, 0.653, 1 ] + }, + { "time": 1.6666, "angle": -7.34 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { + "time": 0, + "angle": -17.16, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": 12.52, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -17.16 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { + "time": 0, + "angle": -5.51, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -3.12, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -5.51 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { + "time": 0, + "angle": 45.46, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": 41.33, + "curve": [ 0.32, 0.1, 0.736, 0.91 ] + }, + { "time": 1.6666, "angle": 45.46 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -15.59, + "curve": [ 0.732, 0, 0.769, 0.99 ] + }, + { "time": 1.6666, "angle": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { + "time": 0, + "angle": -6.84, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -14.63, + "curve": [ 0.324, 0.11, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -6.84 } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "x": 0.689, + "y": 1.1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "x": 1, "y": 1 } + ] + } + } + }, + "jump": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_open" }, + { "time": 0.2, "name": "front_fist_closed" }, + { "time": 0.6666, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_grind" } + ] + }, + "torso": { + "attachment": [ + { "time": 0, "name": "torso" } + ] + } + }, + "bones": { + "front_thigh": { + "rotate": [ + { + "time": 0, + "angle": 91.53, + "curve": [ 0.278, 0.46, 0.763, 1 ] + }, + { + "time": 0.2, + "angle": -35.83, + "curve": [ 0.761, 0, 0.75, 1 ] + }, + { "time": 0.4333, "angle": 127.74 }, + { + "time": 0.7333, + "angle": 48.18, + "curve": [ 0.227, 0.26, 0.432, 1 ] + }, + { "time": 0.8333, "angle": 25.35 }, + { "time": 0.9333, "angle": 45.37 }, + { "time": 1.0333, "angle": 38.12 }, + { "time": 1.1333, "angle": 25.35 }, + { "time": 1.3333, "angle": 91.53 } + ], + "translate": [ + { "time": 0, "x": -2.56, "y": 5.77 }, + { "time": 0.4333, "x": 8.3, "y": 7.98 }, + { "time": 0.7333, "x": 7.21, "y": -4 }, + { "time": 1.3333, "x": -2.56, "y": 5.77 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -42.63 }, + { "time": 0.2, "angle": -5.74 }, + { "time": 0.4333, "angle": -50.76 }, + { "time": 0.7333, "angle": 1.89 }, + { "time": 0.8333, "angle": 11.58 }, + { "time": 0.9666, "angle": -1.89 }, + { "time": 1.1333, "angle": 11.58 }, + { "time": 1.3333, "angle": -42.63 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { "time": 0, "angle": -26.32 }, + { "time": 0.2, "angle": 121.44 }, + { "time": 0.4333, "angle": 70.54 }, + { + "time": 0.7333, + "angle": 79.89, + "curve": [ 0.295, 0.3, 0.59, 0.99 ] + }, + { "time": 0.8333, "angle": 99.12 }, + { "time": 0.9333, "angle": 74.05 }, + { "time": 1.0333, "angle": 98.04 }, + { "time": 1.1333, "angle": 99.12 }, + { "time": 1.3333, "angle": -26.32 } + ], + "translate": [ + { "time": 0, "x": -0.56, "y": -0.32 }, + { "time": 0.4333, "x": -8.5, "y": 10.58 }, + { "time": 0.7333, "x": -1.96, "y": -0.32 }, + { "time": 1.3333, "x": -0.56, "y": -0.32 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": -78.69 }, + { "time": 0.4333, "angle": -55.56 }, + { "time": 0.7333, "angle": -62.84 }, + { "time": 0.8333, "angle": -80.74 }, + { "time": 0.9333, "angle": -41.12 }, + { "time": 1.0333, "angle": -77.4 }, + { "time": 1.1333, "angle": -80.74 }, + { "time": 1.3333, "angle": -78.69 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7333, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { "time": 0, "angle": -22.61 }, + { "time": 0.2, "angle": -246.68 }, + { + "time": 0.6, + "angle": 11.28, + "curve": [ 0.246, 0, 0.633, 0.53 ] + }, + { + "time": 0.7333, + "angle": -57.45, + "curve": [ 0.38, 0.53, 0.744, 1 ] + }, + { "time": 0.8666, "angle": -112.59 }, + { "time": 0.9333, "angle": -102.17 }, + { "time": 1.0333, "angle": -108.61 }, + { "time": 1.1333, "angle": -112.59 }, + { "time": 1.3333, "angle": -22.61 } + ], + "translate": [ + { "time": 0, "x": 6.08, "y": 7.15 }, + { "time": 0.2, "x": 7.23, "y": -13.13, "curve": "stepped" }, + { "time": 0.7333, "x": 7.23, "y": -13.13 }, + { "time": 1.3333, "x": 6.08, "y": 7.15 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 66.46 }, + { "time": 0.2, "angle": 42.39 }, + { "time": 0.4333, "angle": 26.06 }, + { "time": 0.7333, "angle": 13.28 }, + { "time": 0.8666, "angle": -28.64 }, + { "time": 0.9333, "angle": -22.31 }, + { "time": 1.0333, "angle": -35.39 }, + { "time": 1.1333, "angle": -28.64 }, + { "time": 1.3333, "angle": 66.46 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": -28.43 }, + { "time": 0.4333, "angle": -45.6 }, + { "time": 0.7333, "angle": -53.66 }, + { "time": 0.8666, "angle": 7.55 }, + { "time": 0.9333, "angle": 31.15 }, + { "time": 1.0333, "angle": -32.58 }, + { "time": 1.1333, "angle": 7.55 }, + { "time": 1.3333, "angle": -28.43 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": 39.68 }, + { "time": 0.2, "angle": 276.57 }, + { "time": 0.3, "angle": 17.73 }, + { "time": 0.4333, "angle": 83.38 }, + { + "time": 0.6, + "angle": -4.71, + "curve": [ 0.246, 0, 0.633, 0.53 ] + }, + { + "time": 0.7333, + "angle": -69.63, + "curve": [ 0.342, 0.36, 0.68, 0.71 ] + }, + { + "time": 0.7666, + "angle": 321.47, + "curve": [ 0.333, 0.33, 0.667, 0.66 ] + }, + { + "time": 0.8, + "angle": 33.7, + "curve": [ 0.358, 0.64, 0.693, 1 ] + }, + { "time": 0.8666, "angle": 34.56 }, + { "time": 1.0333, "angle": 71.96 }, + { "time": 1.1333, "angle": 34.56 }, + { "time": 1.3333, "angle": 39.68 } + ], + "translate": [ + { "time": 0, "x": -3.1, "y": -4.86 }, + { "time": 0.2, "x": 23.33, "y": 49.07 }, + { "time": 0.4333, "x": 20.78, "y": 40.21 }, + { "time": 1.3333, "x": -3.1, "y": -4.86 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 29.66 }, + { "time": 0.2, "angle": 45.06 }, + { "time": 0.4333, "angle": -4.34 }, + { "time": 0.7666, "angle": 61.68 }, + { "time": 0.8, "angle": 82.59 }, + { "time": 0.8666, "angle": 80.06 }, + { "time": 1.0333, "angle": 57.56 }, + { "time": 1.1333, "angle": 80.06 }, + { "time": 1.3333, "angle": 29.66 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 24.9 }, + { "time": 0.2, "angle": 16.31 }, + { "time": 0.4333, "angle": 7.44 }, + { "time": 0.7333, "angle": -20.35 }, + { "time": 0.8333, "angle": -0.69, "curve": "stepped" }, + { "time": 1.1333, "angle": -0.69 }, + { "time": 1.3333, "angle": 24.9 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 24.92 }, + { "time": 0.2, "angle": 10.36 }, + { "time": 0.4333, "angle": 28.65 }, + { "time": 0.7333, "angle": -2.65 }, + { "time": 0.8333, "angle": -28.94, "curve": "stepped" }, + { "time": 1.1333, "angle": -28.94 }, + { "time": 1.3333, "angle": 24.92 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { + "time": 0, + "x": -34.51, + "y": -78.62, + "curve": [ 0.232, 1, 0.75, 1 ] + }, + { + "time": 0.2, + "x": -34.51, + "y": 182.5, + "curve": [ 0.232, 0.48, 0.598, 0.79 ] + }, + { + "time": 0.7666, + "x": -34.51, + "y": 596.22, + "curve": [ 0.329, 0.17, 0.66, 0.21 ] + }, + { "time": 1.1333, "x": -34.51, "y": 2.49 }, + { "time": 1.3333, "x": -34.51, "y": -78.62 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { + "time": 0, + "angle": -90.62, + "curve": [ 0.416, 0.54, 0.743, 1 ] + }, + { + "time": 0.2, + "angle": -10.52, + "curve": [ 0.644, 0, 0.75, 1 ] + }, + { "time": 0.4333, "angle": -127.72 }, + { "time": 0.7333, "angle": -19.91 }, + { "time": 0.8333, "angle": -5.16 }, + { "time": 0.9333, "angle": -35.06 }, + { "time": 1.0333, "angle": -43.97 }, + { "time": 1.1333, "angle": -5.16 }, + { "time": 1.3333, "angle": -90.62 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": -0.79 }, + { "time": 0.0333, "angle": 16.27 }, + { "time": 0.0666, "angle": 23.52 }, + { "time": 0.1, "angle": 21.02 }, + { "time": 0.1333, "angle": 10.92 }, + { "time": 0.2, "angle": -38.45 }, + { "time": 0.4333, "angle": 6.62 }, + { "time": 0.7333, "angle": -11.51 }, + { "time": 1.0333, "angle": -22.91 }, + { "time": 1.3333, "angle": -0.79 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": -12.77 }, + { "time": 0.2, "angle": 17.05 }, + { "time": 0.4333, "angle": 19.45 }, + { "time": 0.7333, "angle": 2.67 }, + { "time": 1.0333, "angle": -28.49 }, + { "time": 1.3333, "angle": -12.77 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 6.18 }, + { "time": 0.2, "angle": 30.81 }, + { "time": 0.4333, "angle": 13.25 }, + { "time": 0.7333, "angle": 14.98 }, + { "time": 0.7666, "angle": 25.64 }, + { "time": 0.8, "angle": 20.62 }, + { "time": 0.8666, "angle": 64.52 }, + { "time": 1.0333, "angle": 8.59 }, + { "time": 1.1333, "angle": 64.52 }, + { "time": 1.3333, "angle": 6.18 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + } + } + }, + "run": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_closed" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_grind" } + ] + }, + "torso": { + "attachment": [ + { "time": 0, "name": "torso" } + ] + } + }, + "bones": { + "front_thigh": { + "rotate": [ + { + "time": 0, + "angle": 42.05, + "curve": [ 0.195, 0.86, 0.75, 1 ] + }, + { "time": 0.0666, "angle": 46.07 }, + { "time": 0.1333, "angle": -20.28 }, + { "time": 0.2, "angle": -27.23 }, + { "time": 0.2666, "angle": -47.16 }, + { "time": 0.3333, "angle": -39.79 }, + { "time": 0.4, "angle": -25.86 }, + { "time": 0.4666, "angle": 14.35 }, + { "time": 0.5333, "angle": 55.62 }, + { "time": 0.6, "angle": 69.65 }, + { "time": 0.6666, "angle": 86.4 }, + { "time": 0.7333, "angle": 65.87 }, + { "time": 0.8, "angle": 42.05 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.0333, "x": -5.79, "y": 11.15 }, + { "time": 0.0666, "x": -5.13, "y": 11.55 }, + { "time": 0.1333, "x": -7.7, "y": 8.98 }, + { "time": 0.5333, "x": -1.26, "y": 3.83 }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -39.7 }, + { "time": 0.2, "angle": -57.29 }, + { "time": 0.4, "angle": -39.7 }, + { "time": 0.6, "angle": -57.29 }, + { "time": 0.8, "angle": -39.7 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { "time": 0, "angle": -56.59 }, + { "time": 0.0666, "angle": -21.57 }, + { "time": 0.1333, "angle": 27.95 }, + { "time": 0.2, "angle": 42.42 }, + { "time": 0.2666, "angle": 62.37 }, + { "time": 0.3333, "angle": 45.42 }, + { "time": 0.4, "angle": 15.67 }, + { "time": 0.4666, "angle": 28.22 }, + { "time": 0.5333, "angle": -38.62 }, + { "time": 0.6, "angle": -53.26 }, + { "time": 0.6666, "angle": -79.31 }, + { "time": 0.7333, "angle": -86.47 }, + { "time": 0.8, "angle": -56.59 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.4, "x": -6.76, "y": -3.86 }, + { "time": 0.4333, "x": -15.85, "y": 7.28 }, + { "time": 0.4666, "x": -13.04, "y": 4.04 }, + { "time": 0.5, "x": -10.24, "y": 7.11 }, + { "time": 0.5333, "x": -9.01, "y": -5.15 }, + { "time": 0.6666, "x": -23.18, "y": -2.57 }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": -74 }, + { "time": 0.0666, "angle": -83.38 }, + { "time": 0.1333, "angle": -106.69 }, + { "time": 0.2, "angle": -66.01 }, + { "time": 0.2666, "angle": -55.22 }, + { "time": 0.3333, "angle": -24.8 }, + { + "time": 0.4, + "angle": 18.44, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.4666, "angle": -56.65 }, + { + "time": 0.5333, + "angle": -11.94, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.6666, "angle": -41.26 }, + { "time": 0.7333, "angle": -43.6 }, + { "time": 0.8, "angle": -74 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { "time": 0, "angle": -89.36 }, + { "time": 0.0666, "angle": -95.67 }, + { "time": 0.1333, "angle": -22 }, + { "time": 0.2, "angle": -316.04 }, + { "time": 0.2666, "angle": -274.94 }, + { "time": 0.3333, "angle": -273.74 }, + { "time": 0.4, "angle": -272.09 }, + { "time": 0.4666, "angle": -264.89 }, + { "time": 0.5333, "angle": -320.09 }, + { "time": 0.6, "angle": -50.83 }, + { "time": 0.6666, "angle": -81.72 }, + { "time": 0.7333, "angle": -83.92 }, + { "time": 0.8, "angle": -89.36 } + ], + "translate": [ + { "time": 0, "x": 6.24, "y": 10.05 }, + { "time": 0.2666, "x": 4.95, "y": -13.13 }, + { "time": 0.6, "x": -2.43, "y": 1.94 }, + { "time": 0.8, "x": 6.24, "y": 10.05 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 33.43 }, + { "time": 0.0666, "angle": 20.53 }, + { "time": 0.1333, "angle": 15.26 }, + { "time": 0.2, "angle": 19.28 }, + { "time": 0.2666, "angle": 22.62 }, + { "time": 0.3333, "angle": 37.29 }, + { "time": 0.4, "angle": 41.53 }, + { "time": 0.4666, "angle": 31.73 }, + { "time": 0.5333, "angle": 67.45 }, + { "time": 0.6666, "angle": 39.77 }, + { "time": 0.7333, "angle": 30.95 }, + { "time": 0.8, "angle": 33.43 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": -19.75 }, + { "time": 0.0666, "angle": -37.11 }, + { "time": 0.1333, "angle": -50.79 }, + { "time": 0.2666, "angle": -12.69 }, + { "time": 0.3333, "angle": 3.01 }, + { "time": 0.4333, "angle": 12.05 }, + { "time": 0.5333, "angle": 13.25 }, + { "time": 0.8, "angle": -19.75 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": 68.68 }, + { "time": 0.0666, "angle": 73.89 }, + { "time": 0.1333, "angle": -9.64 }, + { "time": 0.2, "angle": 284.27 }, + { "time": 0.2666, "angle": 283.29 }, + { "time": 0.3333, "angle": 278.28 }, + { "time": 0.4, "angle": 271.02 }, + { "time": 0.4666, "angle": 263.2 }, + { "time": 0.5333, "angle": 314.25 }, + { "time": 0.6, "angle": 16.83 }, + { "time": 0.6666, "angle": 70.35 }, + { "time": 0.7333, "angle": 73.53 }, + { "time": 0.8, "angle": 68.68 } + ], + "translate": [ + { "time": 0, "x": -2.57, "y": -8.89 }, + { "time": 0.1333, "x": -4.68, "y": 7.2 }, + { "time": 0.2, "x": 21.73, "y": 51.17 }, + { "time": 0.6, "x": 4.33, "y": 2.05 }, + { "time": 0.8, "x": -2.57, "y": -8.89 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 31.04 }, + { "time": 0.0666, "angle": 28.28 }, + { "time": 0.1333, "angle": 49.36 }, + { "time": 0.2, "angle": 59.37 }, + { "time": 0.2666, "angle": 8.56 }, + { "time": 0.3333, "angle": 9.38 }, + { "time": 0.4, "angle": 11.51 }, + { "time": 0.4666, "angle": 7.22 }, + { "time": 0.5333, "angle": -18.44 }, + { "time": 0.6, "angle": 11.44 }, + { "time": 0.6666, "angle": 9.99 }, + { "time": 0.7333, "angle": 8.28 }, + { "time": 0.8, "angle": 31.04 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 11.03 }, + { "time": 0.2, "angle": 13.58 }, + { "time": 0.4, "angle": 11.03 }, + { "time": 0.6, "angle": 13.58 }, + { "time": 0.8, "angle": 11.03 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 11.03 }, + { "time": 0.1, "angle": 12.34 }, + { "time": 0.2, "angle": 25.55 }, + { "time": 0.4, "angle": 11.03 }, + { "time": 0.5, "angle": 12.34 }, + { "time": 0.6, "angle": 25.55 }, + { "time": 0.8, "angle": 11.03 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": -62.47, "y": -23.1 }, + { + "time": 0.0666, + "x": -62.47, + "y": -38.51, + "curve": [ 0.244, 0.04, 0.75, 1 ] + }, + { + "time": 0.2666, + "x": -62.47, + "y": 22.28, + "curve": [ 0.17, 0.52, 0.75, 1 ] + }, + { "time": 0.4, "x": -62.47, "y": -23.1 }, + { "time": 0.4333, "x": -62.47, "y": -24.59 }, + { + "time": 0.4666, + "x": -62.47, + "y": -43.29, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.6666, "x": -62.47, "y": 22.28 }, + { "time": 0.8, "x": -62.47, "y": -23.1 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.481, 0.01, 0.75, 1 ] + }, + { "time": 0.0666, "angle": -64.42 }, + { + "time": 0.1333, + "angle": -20.59, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.2666, "angle": -62.51 }, + { "time": 0.3333, "angle": -79.74 }, + { "time": 0.4, "angle": -78.28 }, + { + "time": 0.4666, + "angle": -118.96, + "curve": [ 0.93, 0, 0.952, 0.95 ] + }, + { "time": 0.6, "angle": -88.95 }, + { "time": 0.6666, "angle": -79.09 }, + { "time": 0.7333, "angle": -47.77 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": 0 }, + { + "time": 0.0333, + "angle": -21.13, + "curve": [ 0.121, 0.23, 0.75, 1 ] + }, + { "time": 0.0666, "angle": 17.64 }, + { "time": 0.1, "angle": 29.92 }, + { "time": 0.1333, "angle": 16.44 }, + { "time": 0.2, "angle": -29.22 }, + { "time": 0.2666, "angle": -1.61 }, + { "time": 0.3333, "angle": -10.22 }, + { "time": 0.4666, "angle": -15.99 }, + { "time": 0.6, "angle": 9.03 }, + { "time": 0.7333, "angle": 17.32 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.0666, "angle": -12.04 }, + { "time": 0.1333, "angle": -0.87 }, + { "time": 0.2, "angle": 25.81 }, + { "time": 0.2666, "angle": 4.71 }, + { + "time": 0.4, + "angle": 18.09, + "curve": [ 0.281, 0.73, 0.75, 1 ] + }, + { "time": 0.4333, "angle": -1.7 }, + { "time": 0.4666, "angle": 27.12 }, + { "time": 0.5, "angle": 38.83 }, + { "time": 0.5333, "angle": 30.76 }, + { "time": 0.5666, "angle": -20.49 }, + { "time": 0.6, "angle": -30.8 }, + { "time": 0.6666, "angle": -1.31 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 24.72 }, + { "time": 0.5, "angle": -11.87 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + } + }, + "events": [ + { "time": 0, "name": "footstep" }, + { "time": 0.4, "name": "footstep", "int": 1 } + ] + }, + "shoot": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0.1333, "name": "front_fist_closed" }, + { "time": 0.4, "name": "front_fist_open" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0.1333, "name": "mouth_grind" } + ] + }, + "muzzle": { + "color": [ + { + "time": 0.1333, + "color": "ffffff00", + "curve": [ 0.118, 0.99, 0.75, 1 ] + }, + { + "time": 0.1666, + "color": "ffffffff", + "curve": [ 0.821, 0, 0.909, 0.89 ] + }, + { "time": 0.2666, "color": "ffffff00" } + ], + "attachment": [ + { "time": 0.1333, "name": "muzzle" }, + { "time": 0.2666, "name": null } + ] + } + }, + "bones": { + "front_fist": { + "scale": [ + { "time": 0.1333, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.4, "x": 1, "y": 1 } + ] + }, + "gunTip": { + "translate": [ + { "time": 0.1333, "x": 0, "y": 0 }, + { "time": 0.2, "x": 20.93, "y": 1.57 } + ], + "scale": [ + { "time": 0.1333, "x": 1, "y": 1 }, + { "time": 0.2, "x": 1.247, "y": 1.516 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 1.9 } + ], + "translate": [ + { + "time": 0, + "x": 7.95, + "y": 5.84, + "curve": [ 0, 0.3, 0.678, 1 ] + }, + { "time": 0.3, "x": -9.3, "y": -1.41 }, + { "time": 0.4, "x": 0, "y": 0 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": -30.47 } + ], + "translate": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": [ 0, 0.3, 0.678, 1 ] + }, + { "time": 0.3, "x": -5.99, "y": -3.71 }, + { "time": 0.4, "x": 0, "y": 0 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": 62.3 } + ], + "translate": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": [ 0, 0.3, 0.678, 1 ] + }, + { "time": 0.3, "x": 2.81, "y": 11.41 }, + { "time": 0.4, "x": 0, "y": 0 } + ] + } + } + }, + "test": { + "slots": { + "front_foot": { + "color": [ + { "time": 0.6666, "color": "ffffffff" }, + { "time": 1.3333, "color": "ff0700ff" } + ] + }, + "gun": { + "color": [ + { "time": 0, "color": "ffffffff", "curve": "stepped" }, + { "time": 0.6666, "color": "ffffffff" }, + { "time": 1.3333, "color": "32ff00ff" } + ] + }, + "rear_foot": { + "color": [ + { "time": 0.6666, "color": "ffffffff" }, + { "time": 1.3333, "color": "ff0700ff" } + ] + } + }, + "bones": { + "head": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": -20.72 }, + { "time": 0.6666, "angle": -32.41 }, + { "time": 1, "angle": -5.3 }, + { "time": 1.3333, "angle": 24.96 }, + { "time": 1.6666, "angle": 15.61 }, + { "time": 2, "angle": 0 } + ], + "translate": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": [ 0.172, 0.37, 0.574, 0.73 ] + }, + { + "time": 0.1666, + "x": 144.19, + "y": -77.59, + "curve": [ 0.372, 0.61, 0.765, 1 ] + }, + { + "time": 0.3333, + "x": 217.61, + "y": -192.63, + "curve": [ 0.282, 0, 0.624, 0.31 ] + }, + { + "time": 0.5, + "x": 181.21, + "y": -365.66, + "curve": [ 0.313, 0.21, 0.654, 0.54 ] + }, + { + "time": 0.6666, + "x": 20.09, + "y": -500.4, + "curve": [ 0.147, 0.27, 0.75, 1 ] + }, + { "time": 0.8333, "x": -194.24, "y": -341.84 }, + { "time": 1, "x": -307.93, "y": -114 }, + { + "time": 1.1666, + "x": -330.38, + "y": 121.42, + "curve": [ 0.25, 0, 0.764, 0.48 ] + }, + { + "time": 1.3333, + "x": -240.42, + "y": 335.66, + "curve": [ 0.229, 0.37, 0.58, 0.73 ] + }, + { + "time": 1.5, + "x": -56.12, + "y": 288.06, + "curve": [ 0.296, 0.6, 0.641, 1 ] + }, + { + "time": 1.6666, + "x": 87.63, + "y": 191.33, + "curve": [ 0.238, 0, 0.626, 0.39 ] + }, + { + "time": 1.8333, + "x": 60.62, + "y": 95.14, + "curve": [ 0.41, 0.26, 0.803, 0.62 ] + }, + { "time": 2, "x": 0, "y": 0 } + ] + } + }, + "drawOrder": [ + { + "time": 0.6666, + "offsets": [ + { "slot": "head", "offset": -9 }, + { "slot": "eye", "offset": -9 }, + { "slot": "mouth", "offset": -12 }, + { "slot": "goggles", "offset": -12 } + ] + }, + { "time": 1.3333 } + ], + "events": [ + { "time": 0, "name": "headPop", "int": 0, "float": 0, "string": "pop.wav" }, + { "time": 1, "name": "headBehind", "int": 7, "float": 8, "string": "animate" }, + { "time": 2, "name": "headAttach", "int": 0, "float": 0, "string": "attach.wav" } + ] + }, + "walk": { + "slots": { + "front_fist": { + "attachment": [ + { "time": 0, "name": "front_fist_closed" } + ] + }, + "mouth": { + "attachment": [ + { "time": 0, "name": "mouth_smile" } + ] + }, + "torso": { + "attachment": [ + { "time": 0, "name": "torso" } + ] + } + }, + "bones": { + "front_thigh": { + "rotate": [ + { "time": 0, "angle": 15.79 }, + { "time": 0.1, "angle": 27.39 }, + { "time": 0.2, "angle": -7.94 }, + { "time": 0.3, "angle": -16.94 }, + { "time": 0.4, "angle": -28.62 }, + { "time": 0.5, "angle": -19.3 }, + { "time": 0.6, "angle": -3.08 }, + { "time": 0.7, "angle": 29.51 }, + { "time": 0.8, "angle": 15.79 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.4, "x": -1.18, "y": 0.54 }, + { "time": 0.5, "x": 0.11, "y": 0.41 }, + { "time": 0.6, "x": 9.48, "y": 0.27 }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.4, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_shin": { + "rotate": [ + { "time": 0, "angle": 5.12 }, + { "time": 0.1, "angle": -20.87 }, + { "time": 0.2, "angle": 13.37 }, + { "time": 0.3, "angle": 15.98 }, + { "time": 0.4, "angle": 5.94 }, + { "time": 0.5, "angle": -26.76 }, + { "time": 0.7, "angle": -55.44 }, + { "time": 0.8, "angle": 5.12 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_thigh": { + "rotate": [ + { "time": 0, "angle": -34.38 }, + { "time": 0.1, "angle": -30.32 }, + { "time": 0.2, "angle": -37.22 }, + { "time": 0.3, "angle": 20.73 }, + { "time": 0.4, "angle": 8.69 }, + { "time": 0.5, "angle": 12.16 }, + { "time": 0.6, "angle": -24.62 }, + { "time": 0.7, "angle": -27.26 }, + { "time": 0.8, "angle": -34.38 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.4, "x": 4.08, "y": -9.53 }, + { "time": 0.5, "x": 0, "y": 0 }, + { "time": 0.7, "x": -21.14, "y": -9.6 }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_shin": { + "rotate": [ + { "time": 0, "angle": 14.26 }, + { "time": 0.1, "angle": -17.3 }, + { "time": 0.2, "angle": -12.67 }, + { "time": 0.3, "angle": -58.89 }, + { "time": 0.4, "angle": 15.95 }, + { "time": 0.5, "angle": -9 }, + { "time": 0.6, "angle": 26.06 }, + { "time": 0.7, "angle": 21.85 }, + { "time": 0.8, "angle": 14.26 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 }, + { "time": 0.1, "x": 0.951, "y": 1 }, + { "time": 0.5, "x": 0.975, "y": 1 }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_foot": { + "rotate": [ + { "time": 0, "angle": 10.13 }, + { "time": 0.1, "angle": 12.27 }, + { "time": 0.2, "angle": -2.94 }, + { "time": 0.3, "angle": 6.29 }, + { "time": 0.4, "angle": 13.45 }, + { "time": 0.5, "angle": -3.57 }, + { "time": 0.6, "angle": -0.97 }, + { "time": 0.7, "angle": 2.97 }, + { "time": 0.8, "angle": 10.13 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_upper_arm": { + "rotate": [ + { "time": 0, "angle": -23.74 }, + { "time": 0.4, "angle": -320.57 }, + { "time": 0.8, "angle": -23.74 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_upper_arm": { + "rotate": [ + { "time": 0, "angle": 11.62 }, + { "time": 0.1, "angle": 19.36 }, + { "time": 0.4, "angle": 345.26 }, + { "time": 0.5, "angle": 343.44 }, + { "time": 0.8, "angle": 11.62 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -12.11 }, + { "time": 0.1666, "angle": -17.16 }, + { "time": 0.4, "angle": -12.11 }, + { "time": 0.5666, "angle": -15.81 }, + { "time": 0.8, "angle": -12.11 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 1.41 }, + { "time": 0.2333, "angle": -3.04 }, + { "time": 0.4, "angle": 1.41 }, + { "time": 0.6333, "angle": -3.04 }, + { "time": 0.8, "angle": 1.41 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 6.97 }, + { "time": 0.1666, "angle": 8.02 }, + { "time": 0.2666, "angle": 12.65 }, + { "time": 0.4, "angle": 6.97 }, + { "time": 0.5666, "angle": 8.02 }, + { "time": 0.6666, "angle": 12.65 }, + { "time": 0.8, "angle": 6.97 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { + "time": 0, + "x": -23.93, + "y": 3.22, + "curve": [ 0.518, 0.03, 0.807, 0.61 ] + }, + { + "time": 0.1, + "x": -23.93, + "y": -9.24, + "curve": [ 0.135, 0.33, 0.601, 0.99 ] + }, + { + "time": 0.2, + "x": -23.93, + "y": 4.35, + "curve": [ 0.204, 0.68, 0.75, 1 ] + }, + { + "time": 0.3, + "x": -23.93, + "y": 2.38, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.4, + "x": -23.93, + "y": -2.5, + "curve": [ 0.692, 0.01, 0.75, 1 ] + }, + { + "time": 0.5, + "x": -23.93, + "y": -10.32, + "curve": [ 0.235, 0.77, 0.75, 1 ] + }, + { + "time": 0.6, + "x": -23.93, + "y": 4.35, + "curve": [ 0.287, 0.37, 0.718, 0.76 ] + }, + { + "time": 0.7, + "x": -23.93, + "y": 10.34, + "curve": [ 0.615, 0, 0.75, 1 ] + }, + { "time": 0.8, "x": -23.93, "y": 3.22 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.4, "angle": 20.59 }, + { "time": 0.8, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_foot": { + "rotate": [ + { "time": 0, "angle": 12.49 }, + { "time": 0.1, "angle": -8.34 }, + { "time": 0.2, "angle": -6.17 }, + { "time": 0.3, "angle": -0.75 }, + { "time": 0.3333, "angle": 3.89 }, + { "time": 0.4, "angle": 10.22 }, + { "time": 0.5, "angle": 11.44 }, + { "time": 0.6, "angle": -0.33 }, + { "time": 0.7, "angle": 0.15 }, + { "time": 0.8, "angle": 12.49 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "rear_bracer": { + "rotate": [ + { "time": 0, "angle": 3.58 }, + { "time": 0.1, "angle": 5.51 }, + { "time": 0.4, "angle": -22.77 }, + { "time": 0.5, "angle": -9.65 }, + { "time": 0.8, "angle": 3.58 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "front_fist": { + "rotate": [ + { "time": 0, "angle": -15.22 }, + { "time": 0.1, "angle": -51.4 }, + { "time": 0.4, "angle": -39.4 }, + { "time": 0.5, "angle": 19.26 }, + { "time": 0.8, "angle": -15.22 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { + "time": 0, + "angle": -24.06, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.1, + "angle": -10.94, + "curve": [ 0.381, 0.54, 0.742, 1 ] + }, + { + "time": 0.4, + "angle": 25.34, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6666, + "angle": -27.47, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.8, "angle": -24.06 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.8, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8, "x": 1, "y": 1 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/spine-ts/webgl/example/assets/spineboy.png b/spine-ts/webgl/example/assets/spineboy.png new file mode 100644 index 000000000..c336b66f6 Binary files /dev/null and b/spine-ts/webgl/example/assets/spineboy.png differ diff --git a/spine-ts/webgl/example/assets/tank.atlas b/spine-ts/webgl/example/assets/tank.atlas new file mode 100644 index 000000000..ecf24e7df --- /dev/null +++ b/spine-ts/webgl/example/assets/tank.atlas @@ -0,0 +1,125 @@ + +tank.png +size: 2048,1024 +format: RGBA8888 +filter: Linear,Linear +repeat: none +images/antenna + rotate: true + xy: 1295, 683 + size: 22, 303 + orig: 22, 303 + offset: 0, 0 + index: -1 +images/cannon + rotate: false + xy: 2, 93 + size: 931, 58 + orig: 931, 58 + offset: 0, 0 + index: -1 +images/cannonConnector + rotate: true + xy: 1676, 455 + size: 112, 135 + orig: 112, 135 + offset: 0, 0 + index: -1 +images/guntower + rotate: false + xy: 1295, 707 + size: 730, 289 + orig: 730, 289 + offset: 0, 0 + index: -1 +images/machinegun + rotate: false + xy: 2, 34 + size: 331, 57 + orig: 331, 57 + offset: 0, 0 + index: -1 +images/machinegun-mount + rotate: false + xy: 1952, 609 + size: 72, 96 + orig: 72, 96 + offset: 0, 0 + index: -1 +images/rock + rotate: false + xy: 935, 96 + size: 252, 55 + orig: 252, 55 + offset: 0, 0 + index: -1 +images/tankBottom + rotate: false + xy: 2, 377 + size: 1285, 276 + orig: 1285, 276 + offset: 0, 0 + index: -1 +images/tankBottom-shadow + rotate: false + xy: 2, 655 + size: 1291, 341 + orig: 1291, 341 + offset: 0, 0 + index: -1 +images/tankTop + rotate: false + xy: 2, 153 + size: 1407, 222 + orig: 1407, 222 + offset: 0, 0 + index: -1 +images/tread + rotate: false + xy: 2, 2 + size: 96, 30 + orig: 96, 30 + offset: 0, 0 + index: -1 +images/tread-inside + rotate: false + xy: 335, 63 + size: 25, 28 + orig: 25, 28 + offset: 0, 0 + index: -1 +images/wheel-big + rotate: false + xy: 1295, 490 + size: 191, 191 + orig: 191, 191 + offset: 0, 0 + index: -1 +images/wheel-big-overlay + rotate: false + xy: 1488, 495 + size: 186, 186 + orig: 186, 186 + offset: 0, 0 + index: -1 +images/wheel-mid + rotate: false + xy: 1676, 569 + size: 136, 136 + orig: 136, 136 + offset: 0, 0 + index: -1 +images/wheel-mid-overlay + rotate: false + xy: 1814, 569 + size: 136, 136 + orig: 136, 136 + offset: 0, 0 + index: -1 +images/wheel-small + rotate: false + xy: 1813, 496 + size: 71, 71 + orig: 71, 71 + offset: 0, 0 + index: -1 diff --git a/spine-ts/webgl/example/assets/tank.json b/spine-ts/webgl/example/assets/tank.json new file mode 100644 index 000000000..c26ccbe47 --- /dev/null +++ b/spine-ts/webgl/example/assets/tank.json @@ -0,0 +1,1899 @@ +{ +"skeleton": { "hash": "kgtyty1lpfv5JU2lygtFi2u3oQQ", "spine": "3.3.07", "width": 1914.53, "height": 964.05, "images": "" }, +"bones": [ + { "name": "root" }, + { "name": "tankRoot", "parent": "root", "y": 200 }, + { "name": "tankTreads", "parent": "tankRoot" }, + { "name": "tankBody", "parent": "tankTreads", "y": 10 }, + { "name": "guntower", "parent": "tankBody", "x": -21.72, "y": 245.47 }, + { "name": "antennaRoot", "parent": "guntower", "x": 164.6, "y": 202.52 }, + { "name": "antenna1", "parent": "antennaRoot", "length": 40, "rotation": 90, "y": 39.99, "color": "ffee00ff" }, + { "name": "antenna2", "parent": "antenna1", "length": 42, "x": 42, "color": "ffee00ff" }, + { "name": "antenna3", "parent": "antenna2", "length": 42, "x": 42, "color": "ffee00ff" }, + { "name": "antenna4", "parent": "antenna3", "length": 42, "x": 42, "color": "ffee00ff" }, + { "name": "antenna5", "parent": "antenna4", "length": 42, "x": 42, "color": "ffee00ff" }, + { "name": "antenna6", "parent": "antenna5", "length": 42, "x": 42, "color": "ffee00ff" }, + { "name": "cannonConnector", "parent": "guntower", "x": -235.04, "y": 96.07 }, + { "name": "cannonTarget", "parent": "tankRoot", "x": -1486.66, "y": 351.82, "color": "ff3f00ff" }, + { "name": "cannon", "parent": "cannonConnector", "length": 946.68, "rotation": 180, "color": "ff4000ff" }, + { "name": "cannonTip", "parent": "cannon", "x": 946.68, "color": "ff4000ff" }, + { "name": "machineGunTarget", "parent": "tankRoot", "x": -1474, "y": 559.42, "color": "ff3f00ff" }, + { + "name": "machinegun-mount", + "parent": "guntower", + "length": 90.97, + "rotation": 90, + "x": -123.72, + "y": 218.32, + "color": "15ff00ff" + }, + { + "name": "machinegun", + "parent": "machinegun-mount", + "length": 208.94, + "rotation": 90, + "x": 91.52, + "y": -1.03, + "color": "15ff00ff" + }, + { "name": "machinegun-tip", "parent": "machinegun", "x": 210.42, "y": -12.2 }, + { "name": "rock", "parent": "root", "x": -656.45 }, + { + "name": "tread", + "parent": "tankRoot", + "length": 82, + "rotation": 180, + "x": -22.89, + "y": 213.85, + "scaleX": 0.993, + "color": "e64344ff" + }, + { "name": "tread2", "parent": "tread", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread3", "parent": "tread2", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread4", "parent": "tread3", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread5", "parent": "tread4", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread6", "parent": "tread5", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread7", "parent": "tread6", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread8", "parent": "tread7", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread9", "parent": "tread8", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread10", "parent": "tread9", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread11", "parent": "tread10", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread12", "parent": "tread11", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread13", "parent": "tread12", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread14", "parent": "tread13", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread15", "parent": "tread14", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread16", "parent": "tread15", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread17", "parent": "tread16", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread18", "parent": "tread17", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread19", "parent": "tread18", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread20", "parent": "tread19", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread21", "parent": "tread20", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread22", "parent": "tread21", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread23", "parent": "tread22", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread24", "parent": "tread23", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread25", "parent": "tread24", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread26", "parent": "tread25", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread27", "parent": "tread26", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread28", "parent": "tread27", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread29", "parent": "tread28", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread30", "parent": "tread29", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread31", "parent": "tread30", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread32", "parent": "tread31", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread33", "parent": "tread32", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread34", "parent": "tread33", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread35", "parent": "tread34", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "tread36", "parent": "tread35", "length": 82, "x": 82, "color": "e64344ff" }, + { "name": "wheel-midCenter", "parent": "tankRoot", "y": -114.56 }, + { "name": "treadCollider1", "parent": "wheel-midCenter", "x": -329.57, "y": -85.44, "color": "ff00fbff" }, + { "name": "treadCollider2", "parent": "wheel-midCenter", "x": -165.95, "y": -85.44, "color": "ff00fbff" }, + { "name": "treadCollider3", "parent": "wheel-midCenter", "y": -85.44, "color": "ff00fbff" }, + { "name": "treadCollider4", "parent": "wheel-midCenter", "x": 163.56, "y": -85.44, "color": "ff00fbff" }, + { "name": "treadCollider5", "parent": "wheel-midCenter", "x": 329.12, "y": -85.44, "color": "ff00fbff" }, + { "name": "treadGravity1", "parent": "tankRoot", "rotation": 180, "x": -175.35, "y": 109.99, "color": "ff00fbff" }, + { "name": "treadGravity2", "parent": "tankRoot", "rotation": 180, "x": 177.88, "y": 105.45, "color": "ff00fbff" }, + { "name": "wheel-bigRoot1", "parent": "tankTreads", "x": -549.59, "y": 14.39, "color": "abe323ff" }, + { "name": "wheel-big1", "parent": "wheel-bigRoot1", "x": -0.02, "color": "abe323ff" }, + { "name": "wheel-bigRoot2", "parent": "tankTreads", "x": 547.33, "y": 14.39 }, + { "name": "wheel-big2", "parent": "wheel-bigRoot2" }, + { "name": "wheel-midRoot1", "parent": "wheel-midCenter", "x": -410.57, "color": "abe323ff" }, + { "name": "wheel-mid1", "parent": "wheel-midRoot1", "color": "abe323ff" }, + { "name": "wheel-midRoot2", "parent": "wheel-midCenter", "x": -246.95 }, + { "name": "wheel-mid2", "parent": "wheel-midRoot2" }, + { "name": "wheel-midRoot3", "parent": "wheel-midCenter", "x": -82.72 }, + { "name": "wheel-mid3", "parent": "wheel-midRoot3" }, + { "name": "wheel-midRoot4", "parent": "wheel-midCenter", "x": 80.89 }, + { "name": "wheel-mid4", "parent": "wheel-midRoot4" }, + { "name": "wheel-midRoot5", "parent": "wheel-midCenter", "x": 244.51 }, + { "name": "wheel-mid5", "parent": "wheel-midRoot5" }, + { "name": "wheel-midRoot6", "parent": "wheel-midCenter", "x": 408.73 }, + { "name": "wheel-mid6", "parent": "wheel-midRoot6" }, + { "name": "wheel-smallRoot1", "parent": "tankTreads", "x": -337.38, "y": 109.43 }, + { "name": "wheel-small1", "parent": "wheel-smallRoot1", "color": "abe323ff" }, + { "name": "wheel-smallRoot2", "parent": "tankTreads", "x": 0.08, "y": 109.43 }, + { "name": "wheel-small2", "parent": "wheel-smallRoot2" }, + { "name": "wheel-smallRoot3", "parent": "tankTreads", "x": 334.68, "y": 109.43 }, + { "name": "wheel-small3", "parent": "wheel-smallRoot3" } +], +"slots": [ + { "name": "tankBody-shadow", "bone": "tankBody", "color": "ffffffb9", "attachment": "images/tankBottom-shadow" }, + { "name": "bottom", "bone": "tankBody", "attachment": "images/tankBottom" }, + { "name": "tread-inside1", "bone": "tread", "attachment": "images/tread-inside" }, + { "name": "tread-inside53", "bone": "tread27", "attachment": "images/tread-inside" }, + { "name": "tread-inside27", "bone": "tread14", "attachment": "images/tread-inside" }, + { "name": "tread-inside3", "bone": "tread2", "attachment": "images/tread-inside" }, + { "name": "tread-inside55", "bone": "tread28", "attachment": "images/tread-inside" }, + { "name": "tread-inside29", "bone": "tread15", "attachment": "images/tread-inside" }, + { "name": "tread-inside5", "bone": "tread3", "attachment": "images/tread-inside" }, + { "name": "tread-inside57", "bone": "tread29", "attachment": "images/tread-inside" }, + { "name": "tread-inside31", "bone": "tread16", "attachment": "images/tread-inside" }, + { "name": "tread-inside7", "bone": "tread4", "attachment": "images/tread-inside" }, + { "name": "tread-inside59", "bone": "tread30", "attachment": "images/tread-inside" }, + { "name": "tread-inside33", "bone": "tread17", "attachment": "images/tread-inside" }, + { "name": "tread-inside9", "bone": "tread5", "attachment": "images/tread-inside" }, + { "name": "tread-inside61", "bone": "tread31", "attachment": "images/tread-inside" }, + { "name": "tread-inside35", "bone": "tread18", "attachment": "images/tread-inside" }, + { "name": "tread-inside11", "bone": "tread6", "attachment": "images/tread-inside" }, + { "name": "tread-inside63", "bone": "tread32", "attachment": "images/tread-inside" }, + { "name": "tread-inside37", "bone": "tread19", "attachment": "images/tread-inside" }, + { "name": "tread-inside13", "bone": "tread7", "attachment": "images/tread-inside" }, + { "name": "tread-inside65", "bone": "tread33", "attachment": "images/tread-inside" }, + { "name": "tread-inside39", "bone": "tread20", "attachment": "images/tread-inside" }, + { "name": "tread-inside15", "bone": "tread8", "attachment": "images/tread-inside" }, + { "name": "tread-inside67", "bone": "tread34", "attachment": "images/tread-inside" }, + { "name": "tread-inside69", "bone": "tread35", "attachment": "images/tread-inside" }, + { "name": "tread-inside71", "bone": "tread36", "attachment": "images/tread-inside" }, + { "name": "tread-inside41", "bone": "tread21", "attachment": "images/tread-inside" }, + { "name": "tread-inside17", "bone": "tread9", "attachment": "images/tread-inside" }, + { "name": "tread-inside43", "bone": "tread22", "attachment": "images/tread-inside" }, + { "name": "tread-inside19", "bone": "tread10", "attachment": "images/tread-inside" }, + { "name": "tread-inside45", "bone": "tread23", "attachment": "images/tread-inside" }, + { "name": "tread-inside21", "bone": "tread11", "attachment": "images/tread-inside" }, + { "name": "tread-inside47", "bone": "tread24", "attachment": "images/tread-inside" }, + { "name": "tread-inside23", "bone": "tread12", "attachment": "images/tread-inside" }, + { "name": "tread-inside49", "bone": "tread25", "attachment": "images/tread-inside" }, + { "name": "tread-inside25", "bone": "tread13", "attachment": "images/tread-inside" }, + { "name": "tread-inside51", "bone": "tread26", "attachment": "images/tread-inside" }, + { "name": "tread-inside2", "bone": "tread", "attachment": "images/tread-inside" }, + { "name": "tread-inside54", "bone": "tread27", "attachment": "images/tread-inside" }, + { "name": "tread-inside28", "bone": "tread14", "attachment": "images/tread-inside" }, + { "name": "tread-inside4", "bone": "tread2", "attachment": "images/tread-inside" }, + { "name": "tread-inside56", "bone": "tread28", "attachment": "images/tread-inside" }, + { "name": "tread-inside30", "bone": "tread15", "attachment": "images/tread-inside" }, + { "name": "tread-inside6", "bone": "tread3", "attachment": "images/tread-inside" }, + { "name": "tread-inside58", "bone": "tread29", "attachment": "images/tread-inside" }, + { "name": "tread-inside32", "bone": "tread16", "attachment": "images/tread-inside" }, + { "name": "tread-inside8", "bone": "tread4", "attachment": "images/tread-inside" }, + { "name": "tread-inside60", "bone": "tread30", "attachment": "images/tread-inside" }, + { "name": "tread-inside34", "bone": "tread17", "attachment": "images/tread-inside" }, + { "name": "tread-inside10", "bone": "tread5", "attachment": "images/tread-inside" }, + { "name": "tread-inside62", "bone": "tread31", "attachment": "images/tread-inside" }, + { "name": "tread-inside36", "bone": "tread18", "attachment": "images/tread-inside" }, + { "name": "tread-inside12", "bone": "tread6", "attachment": "images/tread-inside" }, + { "name": "tread-inside64", "bone": "tread32", "attachment": "images/tread-inside" }, + { "name": "tread-inside38", "bone": "tread19", "attachment": "images/tread-inside" }, + { "name": "tread-inside14", "bone": "tread7", "attachment": "images/tread-inside" }, + { "name": "tread-inside66", "bone": "tread33", "attachment": "images/tread-inside" }, + { "name": "tread-inside40", "bone": "tread20", "attachment": "images/tread-inside" }, + { "name": "tread-inside16", "bone": "tread8", "attachment": "images/tread-inside" }, + { "name": "tread-inside68", "bone": "tread34", "attachment": "images/tread-inside" }, + { "name": "tread-inside70", "bone": "tread35", "attachment": "images/tread-inside" }, + { "name": "tread-inside72", "bone": "tread36", "attachment": "images/tread-inside" }, + { "name": "tread-inside42", "bone": "tread21", "attachment": "images/tread-inside" }, + { "name": "tread-inside18", "bone": "tread9", "attachment": "images/tread-inside" }, + { "name": "tread-inside44", "bone": "tread22", "attachment": "images/tread-inside" }, + { "name": "tread-inside20", "bone": "tread10", "attachment": "images/tread-inside" }, + { "name": "tread-inside46", "bone": "tread23", "attachment": "images/tread-inside" }, + { "name": "tread-inside22", "bone": "tread11", "attachment": "images/tread-inside" }, + { "name": "tread-inside48", "bone": "tread24", "attachment": "images/tread-inside" }, + { "name": "tread-inside24", "bone": "tread12", "attachment": "images/tread-inside" }, + { "name": "tread-inside50", "bone": "tread25", "attachment": "images/tread-inside" }, + { "name": "tread-inside26", "bone": "tread13", "attachment": "images/tread-inside" }, + { "name": "tread-inside52", "bone": "tread26", "attachment": "images/tread-inside" }, + { "name": "wheel-big", "bone": "wheel-big1", "color": "dbdbdbff", "attachment": "images/wheel-big" }, + { "name": "wheel-big2", "bone": "wheel-big2", "color": "dbdbdbff", "attachment": "images/wheel-big" }, + { "name": "wheel-mid", "bone": "wheel-mid1", "attachment": "images/wheel-mid" }, + { "name": "wheel-mid2", "bone": "wheel-mid2", "attachment": "images/wheel-mid" }, + { "name": "wheel-mid3", "bone": "wheel-mid3", "attachment": "images/wheel-mid" }, + { "name": "wheel-mid4", "bone": "wheel-mid4", "attachment": "images/wheel-mid" }, + { "name": "wheel-mid5", "bone": "wheel-mid5", "attachment": "images/wheel-mid" }, + { "name": "wheel-mid6", "bone": "wheel-mid6", "attachment": "images/wheel-mid" }, + { "name": "wheel-small", "bone": "wheel-small1", "attachment": "images/wheel-small" }, + { "name": "wheel-small2", "bone": "wheel-small2", "attachment": "images/wheel-small" }, + { "name": "wheel-small3", "bone": "wheel-small3", "attachment": "images/wheel-small" }, + { + "name": "wheel-mid-overlay", + "bone": "wheel-midRoot1", + "color": "ffffffec", + "attachment": "images/wheel-mid-overlay", + "blend": "multiply" + }, + { + "name": "wheel-mid-overlay2", + "bone": "wheel-midRoot2", + "color": "ffffffec", + "attachment": "images/wheel-mid-overlay", + "blend": "multiply" + }, + { + "name": "wheel-mid-overlay3", + "bone": "wheel-midRoot3", + "color": "ffffffec", + "attachment": "images/wheel-mid-overlay", + "blend": "multiply" + }, + { + "name": "wheel-mid-overlay4", + "bone": "wheel-midRoot4", + "color": "ffffffec", + "attachment": "images/wheel-mid-overlay", + "blend": "multiply" + }, + { + "name": "wheel-mid-overlay5", + "bone": "wheel-midRoot5", + "color": "ffffffec", + "attachment": "images/wheel-mid-overlay", + "blend": "multiply" + }, + { + "name": "wheel-mid-overlay6", + "bone": "wheel-midRoot6", + "color": "ffffffec", + "attachment": "images/wheel-mid-overlay", + "blend": "multiply" + }, + { + "name": "wheel-big-overlay1", + "bone": "wheel-bigRoot1", + "color": "ffffffe9", + "attachment": "images/wheel-big-overlay", + "blend": "multiply" + }, + { + "name": "wheel-big-overlay2", + "bone": "wheel-bigRoot2", + "color": "ffffffe9", + "attachment": "images/wheel-big-overlay", + "blend": "multiply" + }, + { "name": "treads", "bone": "tankRoot", "attachment": "treads" }, + { "name": "tread", "bone": "tread", "color": "c0974fff", "attachment": "images/tread" }, + { "name": "tread27", "bone": "tread27", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread14", "bone": "tread14", "attachment": "images/tread" }, + { "name": "tread2", "bone": "tread2", "attachment": "images/tread" }, + { "name": "tread28", "bone": "tread28", "attachment": "images/tread" }, + { "name": "tread15", "bone": "tread15", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread3", "bone": "tread3", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread29", "bone": "tread29", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread16", "bone": "tread16", "attachment": "images/tread" }, + { "name": "tread4", "bone": "tread4", "attachment": "images/tread" }, + { "name": "tread30", "bone": "tread30", "attachment": "images/tread" }, + { "name": "tread17", "bone": "tread17", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread5", "bone": "tread5", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread31", "bone": "tread31", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread18", "bone": "tread18", "attachment": "images/tread" }, + { "name": "tread6", "bone": "tread6", "attachment": "images/tread" }, + { "name": "tread32", "bone": "tread32", "attachment": "images/tread" }, + { "name": "tread19", "bone": "tread19", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread7", "bone": "tread7", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread33", "bone": "tread33", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread20", "bone": "tread20", "attachment": "images/tread" }, + { "name": "tread8", "bone": "tread8", "attachment": "images/tread" }, + { "name": "tread34", "bone": "tread34", "attachment": "images/tread" }, + { "name": "tread35", "bone": "tread35", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread36", "bone": "tread36", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread21", "bone": "tread21", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread9", "bone": "tread9", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread22", "bone": "tread22", "attachment": "images/tread" }, + { "name": "tread10", "bone": "tread10", "attachment": "images/tread" }, + { "name": "tread23", "bone": "tread23", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread11", "bone": "tread11", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread24", "bone": "tread24", "attachment": "images/tread" }, + { "name": "tread12", "bone": "tread12", "attachment": "images/tread" }, + { "name": "tread25", "bone": "tread25", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread13", "bone": "tread13", "color": "adc9b8ff", "attachment": "images/tread" }, + { "name": "tread26", "bone": "tread26", "attachment": "images/tread" }, + { "name": "rock", "bone": "rock", "attachment": "images/rock" }, + { "name": "machinegun", "bone": "machinegun", "attachment": "images/machinegun" }, + { "name": "machinegun-mount", "bone": "machinegun-mount", "attachment": "images/machinegun-mount" }, + { "name": "tankTop", "bone": "tankBody", "attachment": "images/tankTop" }, + { "name": "guntower", "bone": "guntower", "attachment": "images/guntower" }, + { "name": "cannon", "bone": "cannon", "attachment": "images/cannon" }, + { "name": "cannonConnector", "bone": "cannonConnector", "attachment": "images/cannonConnector" }, + { "name": "antenna", "bone": "antennaRoot", "attachment": "images/antenna" } +], +"ik": [ + { + "name": "cannonTarget", + "bones": [ "cannon" ], + "target": "cannonTarget" + }, + { + "name": "machineGunTarget", + "bones": [ "machinegun" ], + "target": "machineGunTarget", + "mix": 0 + } +], +"transform": [ + { + "name": "wheel-big", + "bones": [ "wheel-big2" ], + "target": "wheel-big1", + "rotation": 65.6, + "translateMix": 0, + "scaleMix": 0, + "shearMix": 0 + }, + { + "name": "wheel-mid1", + "bones": [ "wheel-mid2", "wheel-mid4" ], + "target": "wheel-mid1", + "rotation": 93, + "translateMix": 0, + "scaleMix": 0, + "shearMix": 0 + }, + { + "name": "wheel-mid2", + "bones": [ "wheel-mid3", "wheel-mid5" ], + "target": "wheel-mid1", + "rotation": -89, + "translateMix": 0, + "scaleMix": 0, + "shearMix": 0 + }, + { + "name": "wheel-mid3", + "bones": [ "wheel-mid6" ], + "target": "wheel-mid1", + "rotation": -152.6, + "translateMix": 0, + "scaleMix": 0, + "shearMix": 0 + }, + { + "name": "wheel-small1", + "bones": [ "wheel-small2" ], + "target": "wheel-small1", + "rotation": 87, + "translateMix": 0, + "scaleMix": 0, + "shearMix": 0 + }, + { + "name": "wheel-small2", + "bones": [ "wheel-small3" ], + "target": "wheel-small1", + "rotation": 54.9, + "translateMix": 0, + "scaleMix": 0, + "shearMix": 0 + } +], +"path": [ + { + "name": "treads", + "bones": [ + "tread", + "tread2", + "tread3", + "tread4", + "tread5", + "tread6", + "tread7", + "tread8", + "tread9", + "tread10", + "tread11", + "tread12", + "tread13", + "tread14", + "tread15", + "tread16", + "tread17", + "tread18", + "tread19", + "tread20", + "tread21", + "tread22", + "tread23", + "tread24", + "tread25", + "tread26", + "tread27", + "tread28", + "tread29", + "tread30", + "tread31", + "tread32", + "tread33", + "tread34", + "tread35", + "tread36" + ], + "target": "treads", + "rotateMode": "chain" + } +], +"skins": { + "default": { + "antenna": { + "images/antenna": { + "type": "mesh", + "uvs": [ 0.64286, 0.07875, 0.65354, 0.15349, 0.66324, 0.22137, 0.67367, 0.29433, 0.68383, 0.36543, 0.69359, 0.43374, 0.7031, 0.50029, 0.71311, 0.5703, 0.72327, 0.64138, 0.73406, 0.71688, 0.7444, 0.78929, 0.75614, 0.8714, 0.76905, 0.9431, 1, 0.9431, 1, 1, 0, 1, 0, 0.9431, 0.20105, 0.9431, 0.20105, 0.87093, 0.21461, 0.78846, 0.22651, 0.71606, 0.23885, 0.64098, 0.25035, 0.57104, 0.26206, 0.49983, 0.27306, 0.4329, 0.2843, 0.36453, 0.29592, 0.29381, 0.308, 0.22037, 0.319, 0.15345, 0.33141, 0.07795, 0.34423, 0, 0.6316, 0 ], + "triangles": [ 30, 31, 0, 29, 30, 0, 29, 0, 1, 28, 29, 1, 28, 1, 2, 27, 28, 2, 27, 2, 3, 26, 3, 4, 25, 26, 4, 25, 4, 5, 26, 27, 3, 24, 5, 6, 23, 24, 6, 7, 23, 6, 24, 25, 5, 22, 7, 8, 21, 22, 8, 21, 8, 9, 7, 22, 23, 20, 9, 10, 19, 20, 10, 20, 21, 9, 19, 10, 11, 18, 19, 11, 17, 18, 11, 17, 11, 12, 15, 16, 17, 12, 13, 14, 15, 17, 12, 14, 15, 12 ], + "vertices": [ 2, 10, 65.37999, -3.14, 0.3125, 11, 23.38, -3.14, 0.6875, 3, 9, 84.73, -3.37, 0.0625, 10, 42.73, -3.37, 0.625, 11, 0.73, -3.37, 0.3125, 3, 9, 64.16, -3.59, 0.3125, 10, 22.16, -3.59, 0.625, 11, -19.83, -3.59, 0.0625, 3, 8, 84.06, -3.82, 0.0625, 9, 42.06, -3.82, 0.625, 10, 0.06, -3.82, 0.3125, 3, 8, 62.51, -4.04, 0.3125, 9, 20.51, -4.04, 0.625, 10, -21.48, -4.04, 0.0625, 3, 7, 83.81, -4.25, 0.0625, 8, 41.81, -4.25, 0.625, 9, -0.18, -4.25, 0.3125, 3, 7, 63.65, -4.46, 0.3125, 8, 21.65, -4.46, 0.625, 9, -20.34, -4.46, 0.0625, 3, 6, 84.43, -4.67999, 0.0625, 7, 42.43, -4.67999, 0.625, 8, 0.43, -4.67999, 0.3125, 3, 6, 62.9, -4.91, 0.3125, 7, 20.9, -4.91, 0.625, 8, -21.09, -4.91, 0.0625, 3, 5, 5.14, 80.01999, 0.0625, 6, 40.02, -5.14, 0.625, 7, -1.97, -5.14, 0.3125, 3, 5, 5.37, 58.08, 0.375, 6, 18.08, -5.37, 0.5625, 7, -23.91, -5.37, 0.0625, 1, 5, 5.63, 33.2, 1, 1, 5, 5.91, 11.48, 1, 1, 5, 11, 11.48, 1, 1, 5, 10.99, -5.75, 1, 1, 5, -11, -5.75, 1, 1, 5, -10.99, 11.48, 1, 1, 5, -6.57, 11.48, 1, 1, 5, -6.57, 33.34, 1, 3, 5, -6.27, 58.33, 0.375, 6, 18.33, 6.27, 0.5625, 7, -23.66, 6.27, 0.0625, 3, 5, -6.01, 80.26999, 0.0625, 6, 40.27, 6.01, 0.625, 7, -1.72, 6.01, 0.3125, 3, 6, 63.02, 5.74, 0.3125, 7, 21.02, 5.74, 0.625, 8, -20.96999, 5.74, 0.0625, 3, 6, 84.21, 5.49, 0.0625, 7, 42.21, 5.49, 0.625, 8, 0.21, 5.49, 0.3125, 3, 7, 63.79, 5.23, 0.3125, 8, 21.79, 5.23, 0.625, 9, -20.2, 5.23, 0.0625, 3, 7, 84.07, 4.98999, 0.0625, 8, 42.07, 4.98999, 0.625, 9, 0.07, 4.98999, 0.3125, 3, 8, 62.78, 4.73999, 0.3125, 9, 20.78, 4.73999, 0.625, 10, -21.21, 4.73999, 0.0625, 3, 8, 84.21, 4.48, 0.0625, 9, 42.21, 4.48, 0.625, 10, 0.21, 4.48, 0.3125, 3, 9, 64.46, 4.21999, 0.3125, 10, 22.46, 4.21999, 0.625, 11, -19.53, 4.21999, 0.0625, 3, 9, 84.74, 3.98, 0.0625, 10, 42.74, 3.98, 0.625, 11, 0.74, 3.98, 0.3125, 2, 10, 65.62, 3.7, 0.3125, 11, 23.62, 3.7, 0.6875, 1, 11, 47.24, 3.42, 1, 1, 11, 47.24, -2.89, 1 ], + "hull": 32, + "edges": [ 28, 30, 28, 26, 30, 32, 26, 24, 24, 22, 32, 34, 34, 24, 34, 36, 36, 22, 60, 62, 38, 36, 20, 22, 38, 20, 40, 38, 18, 20, 40, 18, 42, 40, 16, 18, 42, 16, 44, 42, 14, 16, 44, 14, 46, 44, 12, 14, 46, 12, 48, 46, 10, 12, 48, 10, 50, 48, 8, 10, 50, 8, 52, 50, 6, 8, 52, 6, 54, 52, 4, 6, 54, 4, 56, 54, 2, 4, 56, 2, 60, 58, 58, 56, 62, 0, 0, 2, 58, 0 ], + "width": 22, + "height": 303 + } + }, + "bottom": { + "images/tankBottom": { "x": -16.66, "y": 9.89, "width": 1285, "height": 276 } + }, + "cannon": { + "images/cannon": { "x": 481.95, "y": -0.02, "rotation": 179.99, "width": 931, "height": 58 } + }, + "cannonConnector": { + "images/cannonConnector": { + "type": "mesh", + "uvs": [ 1, 0.03236, 1, 0.10602, 0.90987, 0.32859, 0.81975, 0.55116, 0.72962, 0.77372, 0.6395, 0.99629, 0.42157, 0.99629, 0.20364, 0.99629, 0, 0.85433, 0, 0.69901, 0.02267, 0.52884, 0, 0.31444, 0.21601, 0.12998, 0.43367, 0, 0.63546, 0.0037, 0.48407, 0.77059, 0.31496, 0.52496, 0.64132, 0.19648, 0.21516, 0.76765, 0.58345, 0.5647, 0.68444, 0.40146, 0.46758, 0.36649, 0.28934, 0.34603 ], + "triangles": [ 21, 22, 12, 11, 12, 22, 17, 21, 13, 17, 13, 14, 21, 12, 13, 21, 17, 20, 16, 22, 21, 10, 11, 22, 10, 22, 16, 19, 21, 20, 16, 21, 19, 18, 10, 16, 9, 10, 18, 15, 16, 19, 18, 16, 15, 8, 9, 18, 7, 8, 18, 6, 18, 15, 7, 18, 6, 14, 0, 1, 17, 14, 1, 2, 17, 1, 20, 17, 2, 3, 20, 2, 19, 20, 3, 4, 19, 3, 15, 19, 4, 5, 15, 4, 6, 15, 5 ], + "vertices": [ 1, 12, 35.91, 69.08, 1, 1, 12, 35.91, 59.13, 1, 1, 12, 25.81, 29.09, 1, 1, 12, 15.72, -0.95, 1, 1, 12, 5.63, -31, 1, 1, 12, -4.46, -61.04, 1, 2, 12, -28.87, -61.04, 0.33333, 14, 28.87, 61.03, 0.66666, 1, 14, 53.27, 61.01, 1, 1, 14, 76.08, 41.83, 1, 1, 14, 71.17, 21.62, 1, 1, 14, 72.83, -1.62, 1, 1, 14, 70.37, -29.12, 1, 1, 14, 50.66, -56.13, 1, 2, 12, -28.43, 74.37, 0.41, 14, 28.43, -74.39, 0.58999, 2, 12, -4.91, 72.94999, 0.52, 14, 4.91, -72.94999, 0.48, 2, 12, -21.87, -30.57, 0.49, 14, 21.87, 30.56, 0.51, 1, 14, 40.81, -2.59999, 1, 2, 12, -4.25, 46.92, 0.49, 14, 4.25, -46.92, 0.51, 1, 14, 51.98, 30.15, 1, 2, 12, -10.74, -2.78, 0.49, 14, 10.74, 2.77, 0.51, 2, 12, 0.56, 19.25, 0.49, 14, -0.56, -19.25, 0.51, 1, 14, 23.71, -23.98, 1, 1, 14, 43.68, -26.76, 1 ], + "hull": 15, + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 0 ], + "width": 112, + "height": 135 + } + }, + "guntower": { + "images/guntower": { "x": 77.22, "y": 122.58, "width": 730, "height": 289 } + }, + "machinegun": { + "images/machinegun": { "x": 44.85, "y": -5.72, "rotation": -180, "width": 331, "height": 57 } + }, + "machinegun-mount": { + "images/machinegun-mount": { "x": 47.42, "y": -1.53, "rotation": -90, "width": 72, "height": 96 } + }, + "rock": { + "images/rock": { "color": "404040ff", "x": 25.23, "y": 27.35, "width": 252, "height": 55 } + }, + "tankBody-shadow": { + "images/tankBottom-shadow": { "x": -11.43, "y": -42.88, "width": 1291, "height": 341 } + }, + "tankTop": { + "images/tankTop": { "x": 6.8, "y": 168.71, "width": 1407, "height": 222 } + }, + "tread": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread-inside1": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside10": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside11": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside12": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside13": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside14": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside15": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside16": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside17": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside18": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside19": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside2": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside20": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside21": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside22": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside23": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside24": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside25": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside26": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside27": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside28": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside29": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside3": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside30": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside31": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside32": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside33": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside34": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside35": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside36": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside37": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside38": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside39": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside4": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside40": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside41": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside42": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside43": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside44": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside45": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside46": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside47": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside48": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside49": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside5": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside50": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside51": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside52": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside53": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside54": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside55": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside56": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside57": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside58": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside59": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside6": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside60": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside61": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside62": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside63": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside64": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside65": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside66": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside67": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside68": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside69": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside7": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside70": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside71": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside72": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside8": { + "images/tread-inside": { "x": 20.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread-inside9": { + "images/tread-inside": { "x": 60.1, "y": 12.56, "rotation": -180, "width": 25, "height": 28 } + }, + "tread10": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread11": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread12": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread13": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread14": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread15": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread16": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread17": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread18": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread19": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread2": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread20": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread21": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread22": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread23": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread24": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread25": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread26": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread27": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread28": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread29": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread3": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread30": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread31": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread32": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread33": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread34": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread35": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread36": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread4": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread5": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread6": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread7": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread8": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "tread9": { + "images/tread": { "x": 45.47, "y": -8.28, "rotation": -179.99, "width": 96, "height": 30 } + }, + "treads": { + "treads": { + "type": "path", + "closed": true, + "lengths": [ 182.41, 349, 472.77, 602.99, 780.46, 1052.96, 1133.44, 1218.43, 1298.34, 1382.7, 1465.57, 1546.11, 1628.02, 1707.73, 1794.36, 1876.75, 2158.69, 2321.34, 2438.56, 2579.42, 2745.35, 2919.23 ], + "vertexCount": 66, + "vertices": [ 1, 83, 11.23, 41.86, 1, 1, 83, 0.78, 41.93999, 1, 1, 83, -34.72, 42.23, 1, 1, 63, -104.21, 0.41, 1, 1, 63, 0.07, 0.55, 1, 1, 63, 68.8, 0.64, 1, 1, 81, 20.5, 43.47, 1, 1, 81, 1.13, 40.81, 1, 1, 81, -27.38, 36.84, 1, 1, 65, 147.06, 105, 1, 1, 65, 96.21, 96.63, 1, 1, 65, 43.87, 87.71, 1, 1, 65, 16.18, 103.34, 1, 1, 65, -33.66999, 94.2, 1, 1, 65, -99.35, 81.25, 1, 1, 65, -122.04, -1.69, 1, 1, 65, -83.58, -47.92, 1, 1, 65, -33.53, -109.36, 1, 1, 69, -83.56, -66.08999, 1, 1, 69, -2.16, -67.89, 1, 2, 69, 56.68, -41.48, 0.67999, 58, -24.31, -41.49, 0.32, 1, 58, -26.58, 16.69, 1, 1, 58, -2.69, 16.69, 1, 1, 58, 13.51, 16.69, 1, 2, 71, -52.41, -46.51, 0.74399, 58, 30.2, -46.51, 0.256, 1, 71, -0.32, -68.92, 1, 2, 71, 52.09, -44.72, 0.712, 59, -28.9, -44.73, 0.28799, 1, 59, -22.8, 16.24, 1, 1, 59, -1.42, 16.24, 1, 1, 59, 20.46999, 16.24, 1, 2, 73, -47.21, -47.45, 0.744, 59, 36.00999, -47.46, 0.25599, 1, 73, -0.28, -69.65, 1, 2, 73, 45.23, -47.26, 0.736, 60, -37.48, -47.26, 0.26399, 1, 60, -23.76, 15.27, 1, 1, 60, -0.13, 15.27, 1, 1, 60, 24.45, 15.27, 1, 2, 75, -47.36, -48.7, 0.74399, 60, 33.52, -48.7, 0.256, 1, 75, -0.49, -70.39, 1, 2, 75, 49.09, -48.33, 0.744, 61, -33.57, -48.34, 0.25599, 1, 61, -20.89, 15.83, 1, 1, 61, -1.25, 15.83, 1, 1, 61, 15.78, 15.83, 1, 2, 77, -52.49, -48.21, 0.75999, 61, 28.45, -48.21, 0.24, 1, 77, -2.5, -68.92, 1, 2, 77, 55.72, -47.82, 0.752, 62, -28.88, -47.82, 0.248, 1, 62, -21.64, 16.69, 1, 1, 62, -0.48, 16.69, 1, 1, 62, 20.73, 16.69, 1, 2, 79, -53.65, -48.89, 0.76, 62, 25.96, -48.89, 0.23999, 1, 79, 2.27, -69.65, 1, 1, 79, 44.94, -69.74, 1, 1, 65, 1172.98, -85.6, 1, 1, 65, 1190.53, -42.24, 1, 1, 65, 1215.63, 19.75, 1, 1, 65, 1175.55, 76.62, 1, 1, 65, 1134.22, 95.07, 1, 1, 65, 1128.4, 97.66, 1, 1, 65, 1081.79, 87.47, 1, 1, 65, 1017.16, 92.52, 1, 1, 65, 977.9, 95.58, 1, 1, 85, 47.07, 42.29, 1, 1, 85, 0.24, 42.74, 1, 1, 85, -29.63, 43.28, 1, 1, 64, -86.64, 1.35, 1, 1, 64, 0.49, 0.25, 1, 1, 64, 92.42, -0.89, 1 ] + } + }, + "wheel-big": { + "images/wheel-big": { "width": 191, "height": 191 } + }, + "wheel-big-overlay1": { + "images/wheel-big-overlay": { "width": 186, "height": 186 } + }, + "wheel-big-overlay2": { + "images/wheel-big-overlay": { "width": 186, "height": 186 } + }, + "wheel-big2": { + "images/wheel-big": { "width": 191, "height": 191 } + }, + "wheel-mid": { + "images/wheel-mid": { "width": 136, "height": 136 } + }, + "wheel-mid-overlay": { + "images/wheel-mid-overlay": { "width": 136, "height": 136 } + }, + "wheel-mid-overlay2": { + "images/wheel-mid-overlay": { "width": 136, "height": 136 } + }, + "wheel-mid-overlay3": { + "images/wheel-mid-overlay": { "width": 136, "height": 136 } + }, + "wheel-mid-overlay4": { + "images/wheel-mid-overlay": { "width": 136, "height": 136 } + }, + "wheel-mid-overlay5": { + "images/wheel-mid-overlay": { "width": 136, "height": 136 } + }, + "wheel-mid-overlay6": { + "images/wheel-mid-overlay": { "width": 136, "height": 136 } + }, + "wheel-mid2": { + "images/wheel-mid": { "width": 136, "height": 136 } + }, + "wheel-mid3": { + "images/wheel-mid": { "width": 136, "height": 136 } + }, + "wheel-mid4": { + "images/wheel-mid": { "width": 136, "height": 136 } + }, + "wheel-mid5": { + "images/wheel-mid": { "width": 136, "height": 136 } + }, + "wheel-mid6": { + "images/wheel-mid": { "width": 136, "height": 136 } + }, + "wheel-small": { + "images/wheel-small": { "width": 71, "height": 71 } + }, + "wheel-small2": { + "images/wheel-small": { "width": 71, "height": 71 } + }, + "wheel-small3": { + "images/wheel-small": { "width": 71, "height": 71 } + } + } +}, +"animations": { + "drive": { + "bones": { + "tankRoot": { + "translate": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": [ 0.549, 0, 0.907, 0.84 ] + }, + { + "time": 3.0333, + "x": -1426.14, + "y": 0, + "curve": [ 0.211, 0.23, 0.851, 0.92 ] + }, + { + "time": 4.8666, + "x": -2806.98, + "y": 0, + "curve": [ 0.253, 0.27, 0.625, 0.94 ] + }, + { "time": 5.3333, "x": -2903.34, "y": 0 } + ] + }, + "wheel-midRoot1": { + "translate": [ + { "time": 0.7666, "x": 0, "y": 0 }, + { + "time": 1.1666, + "x": 0, + "y": 50.95, + "curve": [ 0.633, 0, 0.907, 0.82 ] + }, + { "time": 1.5666, "x": 0, "y": 0 } + ] + }, + "treadCollider1": { + "rotate": [ + { "time": 1.1, "angle": 0 }, + { "time": 1.2333, "angle": -19.78 }, + { "time": 1.4666, "angle": 0 }, + { "time": 1.6, "angle": 28.87 }, + { "time": 1.8, "angle": 0 } + ], + "translate": [ + { "time": 1.1, "x": 0, "y": 0 }, + { + "time": 1.4666, + "x": 0, + "y": 58.66, + "curve": [ 0.352, 0, 0.828, 0.92 ] + }, + { "time": 1.8, "x": 0, "y": 0 } + ] + }, + "wheel-midRoot2": { + "translate": [ + { "time": 1.2666, "x": 0, "y": 0 }, + { + "time": 1.6333, + "x": 0, + "y": 55.07, + "curve": [ 0.889, 0.01, 0.843, 0.81 ] + }, + { "time": 1.9333, "x": 0, "y": 0 } + ] + }, + "treadCollider2": { + "rotate": [ + { "time": 1.5333, "angle": 0 }, + { "time": 1.6333, "angle": -18.67 }, + { "time": 1.8, "angle": 0 }, + { "time": 1.9, "angle": 29.49 }, + { "time": 2.0666, "angle": 0 } + ], + "translate": [ + { + "time": 1.5333, + "x": 0, + "y": 0, + "curve": [ 0.16, 0.25, 0.813, 0.82 ] + }, + { + "time": 1.8, + "x": 0, + "y": 59.03, + "curve": [ 0.376, 0.26, 0.879, 0.79 ] + }, + { "time": 2.0666, "x": 0, "y": 0 } + ] + }, + "wheel-midRoot3": { + "translate": [ + { "time": 1.6666, "x": 0, "y": 0 }, + { + "time": 1.9333, + "x": 0, + "y": 60.17, + "curve": [ 0.544, 0, 0.838, 0.77 ] + }, + { "time": 2.2, "x": 0, "y": 0 } + ] + }, + "treadCollider3": { + "rotate": [ + { "time": 1.8666, "angle": 0 }, + { "time": 1.9333, "angle": -20.16 }, + { "time": 2.0666, "angle": 0.57 }, + { "time": 2.1666, "angle": 33.66 }, + { "time": 2.3333, "angle": 0 } + ], + "translate": [ + { "time": 1.8666, "x": 0, "y": 0 }, + { + "time": 2.0666, + "x": 0, + "y": 61.53, + "curve": [ 0.582, 0, 0.836, 0.77 ] + }, + { "time": 2.3333, "x": 0, "y": 0 } + ] + }, + "wheel-midRoot4": { + "translate": [ + { "time": 1.9333, "x": 0, "y": 0 }, + { + "time": 2.2, + "x": 0, + "y": 58.89, + "curve": [ 0.48, 0, 0.75, 1 ] + }, + { "time": 2.4666, "x": 0, "y": 0 } + ] + }, + "treadCollider4": { + "rotate": [ + { "time": 2.1333, "angle": 0 }, + { "time": 2.2, "angle": -20.43 }, + { "time": 2.3333, "angle": 4.49 }, + { "time": 2.4333, "angle": 35.87 }, + { "time": 2.5666, "angle": 0 } + ], + "translate": [ + { + "time": 2.1333, + "x": 0, + "y": 0, + "curve": [ 0.191, 0.49, 0.75, 1 ] + }, + { "time": 2.3333, "x": 0, "y": 66.64 }, + { "time": 2.5666, "x": 0, "y": 0 } + ] + }, + "wheel-midRoot5": { + "translate": [ + { "time": 2.2, "x": 0, "y": 0 }, + { "time": 2.4333, "x": 0, "y": 60.26 }, + { "time": 2.7, "x": 0, "y": 0 } + ] + }, + "treadCollider5": { + "rotate": [ + { "time": 2.3333, "angle": 0 }, + { "time": 2.4333, "angle": -23.6 }, + { "time": 2.5666, "angle": 6.49 }, + { "time": 2.6666, "angle": 29.93 }, + { "time": 2.8, "angle": -0.13 } + ], + "translate": [ + { "time": 2.3333, "x": 0, "y": 0 }, + { "time": 2.4333, "x": 0, "y": 36.34 }, + { "time": 2.5, "x": 0, "y": 56.39 }, + { "time": 2.5666, "x": 0, "y": 61.34 }, + { "time": 2.8, "x": 0, "y": 2.04 } + ] + }, + "wheel-midRoot6": { + "translate": [ + { + "time": 2.4333, + "x": 0, + "y": 0, + "curve": [ 0.19, 0.26, 0.804, 0.8 ] + }, + { + "time": 2.6333, + "x": 0, + "y": 51.86, + "curve": [ 0.346, 0, 0.852, 0.7 ] + }, + { "time": 2.8, "x": 0, "y": 0 } + ] + }, + "wheel-mid1": { + "rotate": [ + { + "time": 0, + "angle": 21, + "curve": [ 0.504, 0.11, 0.931, 0.71 ] + }, + { "time": 0.8, "angle": 120 }, + { "time": 1.2333, "angle": 240 }, + { "time": 1.6, "angle": 0 }, + { "time": 1.9, "angle": 120 }, + { "time": 2.1666, "angle": 240 }, + { "time": 2.4, "angle": 0 }, + { "time": 2.5666, "angle": 120 }, + { "time": 2.7333, "angle": 240 }, + { "time": 2.9333, "angle": 0 }, + { "time": 3.1, "angle": 120 }, + { "time": 3.2666, "angle": 240 }, + { "time": 3.4333, "angle": 0 }, + { "time": 3.6333, "angle": 120 }, + { "time": 3.8, "angle": 240 }, + { "time": 3.9666, "angle": 0 }, + { "time": 4.1666, "angle": 120 }, + { "time": 4.3333, "angle": 240 }, + { "time": 4.5, "angle": 0 }, + { "time": 4.7, "angle": 120 }, + { "time": 4.8666, "angle": 240 }, + { "time": 5.2666, "angle": -67.99 } + ] + }, + "tankTreads": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.145, 0.34, 0.75, 1 ] + }, + { "time": 1.1, "angle": -3.9 }, + { "time": 1.3333, "angle": -2.37 }, + { "time": 1.6333, "angle": -3.54 }, + { "time": 2.1666, "angle": 0.27 }, + { + "time": 2.4666, + "angle": 2.55, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.7, + "angle": 3.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 3, "angle": -3.62 }, + { "time": 3.2333, "angle": -1.23, "curve": "stepped" }, + { + "time": 4.8666, + "angle": -1.23, + "curve": [ 0.188, 0.16, 0.75, 1 ] + }, + { + "time": 5.2, + "angle": 4.47, + "curve": [ 0.416, 0.01, 0.75, 1 ] + }, + { + "time": 5.5666, + "angle": -3.08, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 5.8333, "angle": -1.23 } + ] + }, + "wheel-big1": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.504, 0.11, 0.931, 0.71 ] + }, + { "time": 1.1, "angle": 120 }, + { "time": 1.5333, "angle": 240 }, + { "time": 1.8, "angle": 360 }, + { "time": 2.0333, "angle": 120 }, + { "time": 2.2666, "angle": 240 }, + { "time": 2.4666, "angle": 360 }, + { "time": 2.7, "angle": 120 }, + { "time": 2.9333, "angle": 240 }, + { "time": 3.1333, "angle": 360 }, + { "time": 3.3666, "angle": 120 }, + { "time": 3.5666, "angle": 240 }, + { "time": 3.8, "angle": -24 }, + { "time": 4.0333, "angle": 120 }, + { "time": 4.2333, "angle": 240 }, + { "time": 4.4666, "angle": -24 }, + { "time": 4.7, "angle": 120 }, + { "time": 4.8666, "angle": -143.99 }, + { + "time": 5.0666, + "angle": -131.4, + "curve": [ 0.14, 0.25, 0.75, 1 ] + }, + { "time": 5.6666, "angle": -76.85 }, + { "time": 5.8333, "angle": -72.3 } + ] + }, + "treadGravity1": { + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.4666, "x": 0, "y": 0 }, + { "time": 1.8, "x": 0, "y": 29.44 }, + { "time": 2.3333, "x": 0, "y": -0.52 }, + { "time": 2.5666, "x": 0, "y": 5.2 }, + { "time": 2.6666, "x": 0, "y": -11.05, "curve": "stepped" }, + { "time": 4.8666, "x": 0, "y": -11.05 }, + { "time": 5.0666, "x": 0, "y": -1.91 }, + { "time": 5.5333, "x": 0, "y": -6.9 }, + { "time": 5.7333, "x": 0, "y": -11.05 } + ] + }, + "treadGravity2": { + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.4666, "x": 0, "y": 0 }, + { "time": 1.8, "x": 0, "y": 8.5 }, + { "time": 2.3333, "x": 0, "y": 34.74 }, + { "time": 2.5666, "x": 0, "y": 5.2 }, + { "time": 2.6666, "x": 0, "y": -11.05, "curve": "stepped" }, + { "time": 4.8666, "x": 0, "y": -11.05 }, + { "time": 5.0666, "x": 0, "y": 3.9 }, + { "time": 5.5333, "x": 0, "y": -6.9 }, + { "time": 5.7333, "x": 0, "y": -11.05 } + ] + }, + "wheel-small1": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.504, 0.11, 0.931, 0.71 ] + }, + { "time": 0.7, "angle": 120 }, + { "time": 1.1, "angle": 240 }, + { "time": 1.4666, "angle": 360 }, + { "time": 1.7666, "angle": 120 }, + { "time": 2.0333, "angle": 240 }, + { "time": 2.2666, "angle": 360 }, + { "time": 2.4333, "angle": 120 }, + { "time": 2.5666, "angle": 240 }, + { "time": 2.7, "angle": 360 }, + { "time": 2.8333, "angle": 120 }, + { "time": 2.9666, "angle": 240 }, + { "time": 3.1, "angle": 360 }, + { "time": 3.2333, "angle": 120 }, + { "time": 3.3666, "angle": 240 }, + { "time": 3.5, "angle": 360 }, + { "time": 3.6333, "angle": 120 }, + { "time": 3.7666, "angle": 240 }, + { "time": 3.9, "angle": 360 }, + { "time": 4.0333, "angle": 120 }, + { "time": 4.1666, "angle": 240 }, + { "time": 4.3, "angle": 360 }, + { "time": 4.4333, "angle": 120 }, + { "time": 4.5666, "angle": 240 }, + { "time": 4.7, "angle": 360 }, + { "time": 4.8333, "angle": 120 }, + { "time": 5, "angle": 240 }, + { + "time": 5.2, + "angle": -25.64, + "curve": [ 0.181, 0.26, 0.75, 1 ] + }, + { "time": 5.5666, "angle": 90 } + ] + }, + "tankBody": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.1666, + "angle": -1.41, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.9333, + "angle": -0.18, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.3, + "angle": 0.84, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.0333, + "angle": -2.33, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.4666, + "angle": -0.45, + "curve": [ 0.329, 0.32, 0.757, 1 ] + }, + { + "time": 4.8666, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.3333, + "angle": 1.82, + "curve": [ 0.324, 0.01, 0.75, 1 ] + }, + { + "time": 5.6666, + "angle": -1.15, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 6.0333, "angle": 0 } + ] + }, + "antenna1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { + "time": 0.4333, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.7333, + "angle": -1.55, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.0666, + "angle": -0.68, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.4, + "angle": 0.61, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -0.67, "curve": "stepped" }, + { + "time": 2.1333, + "angle": -0.67, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.3666, + "angle": 0.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": -1.69, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.8666, + "angle": 1.18, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.0333, + "angle": -1.09, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.2333, + "angle": 1.03, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.5, + "angle": -0.44, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 4.6666, "angle": -0.18 }, + { + "time": 5.0333, + "angle": -1.05, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.3666, + "angle": 9.17, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.6666, + "angle": -3.14, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.9, + "angle": 2.96, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 6.1, + "angle": -0.29, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 6.2666, "angle": 0.96 }, + { "time": 6.4, "angle": 0 } + ] + }, + "antenna2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { + "time": 0.4333, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.7333, + "angle": -1.55, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.0666, + "angle": -0.68, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.4, + "angle": 0.61, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -0.67, "curve": "stepped" }, + { + "time": 2.1333, + "angle": -0.67, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.3666, + "angle": 0.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": -1.69, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.8666, + "angle": 1.18, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.0333, + "angle": -1.09, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.2333, + "angle": 1.03, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.5, + "angle": -0.44, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 4.6666, "angle": -0.18 }, + { + "time": 5.0333, + "angle": -1.05, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.3666, + "angle": 9.17, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.6666, + "angle": -3.14, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.9, + "angle": 2.96, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 6.1, + "angle": -0.29, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 6.2666, "angle": 0.96 }, + { "time": 6.4, "angle": 0 } + ] + }, + "antenna3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { + "time": 0.4333, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.7333, + "angle": -1.55, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.0666, + "angle": -0.68, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.4, + "angle": 0.61, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -0.67, "curve": "stepped" }, + { + "time": 2.1333, + "angle": -0.67, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.3666, + "angle": 0.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": -1.69, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.8666, + "angle": 1.18, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.0333, + "angle": -1.09, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.2333, + "angle": 1.03, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.5, + "angle": -0.44, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 4.6666, "angle": -0.18 }, + { + "time": 5.0333, + "angle": -1.05, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.3666, + "angle": 9.17, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.6666, + "angle": -3.14, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.9, + "angle": 2.96, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 6.1, + "angle": -0.29, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 6.2666, "angle": 0.96 }, + { "time": 6.4, "angle": 0 } + ] + }, + "antenna4": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { + "time": 0.4333, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.7333, + "angle": -1.55, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.0666, + "angle": -0.68, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.4, + "angle": 0.61, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -0.67, "curve": "stepped" }, + { + "time": 2.1333, + "angle": -0.67, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.3666, + "angle": 0.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": -1.69, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.8666, + "angle": 1.18, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.0333, + "angle": -1.09, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.2333, + "angle": 1.03, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.5, + "angle": -0.44, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 4.6666, "angle": -0.18 }, + { + "time": 5.0333, + "angle": -1.05, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.3666, + "angle": 9.17, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.6666, + "angle": -3.14, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.9, + "angle": 2.96, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 6.1, + "angle": -0.29, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 6.2666, "angle": 0.96 }, + { "time": 6.4, "angle": 0 } + ] + }, + "antenna5": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { + "time": 0.4333, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.7333, + "angle": -1.55, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.0666, + "angle": -0.68, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.4, + "angle": 0.61, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -0.67, "curve": "stepped" }, + { + "time": 2.1333, + "angle": -0.67, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.3666, + "angle": 0.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": -1.69, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.8666, + "angle": 1.18, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.0333, + "angle": -1.09, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.2333, + "angle": 1.03, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.5, + "angle": -0.44, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 4.6666, "angle": -0.18 }, + { + "time": 5.0333, + "angle": -1.05, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.3666, + "angle": 9.17, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.6666, + "angle": -3.14, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.9, + "angle": 2.96, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 6.1, + "angle": -0.29, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 6.2666, "angle": 0.96 }, + { "time": 6.4, "angle": 0 } + ] + }, + "antenna6": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { + "time": 0.4333, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.7333, + "angle": -1.55, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.0666, + "angle": -0.68, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 1.4, + "angle": 0.61, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.6666, "angle": -0.67, "curve": "stepped" }, + { + "time": 2.1333, + "angle": -0.67, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.3666, + "angle": 0.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": -1.69, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.8666, + "angle": 1.18, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.0333, + "angle": -1.09, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.2333, + "angle": 1.03, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 3.5, + "angle": -0.44, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 4.6666, "angle": -0.18 }, + { + "time": 5.0333, + "angle": -1.05, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.3666, + "angle": 9.17, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.6666, + "angle": -3.14, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.9, + "angle": 2.96, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 6.1, + "angle": -0.29, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 6.2666, "angle": 0.96 }, + { "time": 6.4, "angle": 0 } + ] + }, + "machinegun": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { + "time": 2.8333, + "angle": 0, + "curve": [ 0.183, 0.17, 0.75, 1 ] + }, + { + "time": 3, + "angle": -4.43, + "curve": [ 0.156, 0.16, 0.75, 1 ] + }, + { + "time": 3.1666, + "angle": -2.93, + "curve": [ 0.156, 0.16, 0.75, 1 ] + }, + { + "time": 4.8333, + "angle": 0, + "curve": [ 0.183, 0.17, 0.75, 1 ] + }, + { + "time": 5.1666, + "angle": -6.05, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 5.4, + "angle": 6.15, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 5.6, "angle": -1.26 } + ] + }, + "cannon": { + "rotate": [ + { "time": 0, "angle": 0 } + ] + }, + "cannonTarget": { + "translate": [ + { + "time": 5, + "x": 0, + "y": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 6.3333, "x": -15.38, "y": 99.99 } + ] + } + }, + "ik": { + "cannonTarget": [ + { "time": 0, "mix": 0.809, "curve": "stepped" }, + { "time": 4.7333, "mix": 0.809 }, + { "time": 5.1666, "mix": 0.504 }, + { "time": 5.6666 } + ] + }, + "paths": { + "treads": { + "position": [ + { + "time": 0, + "curve": [ 0.549, 0, 0.907, 0.84 ] + }, + { "time": 3.0333, "position": 0.51 }, + { "time": 4.8666, "position": 0.9794 }, + { + "time": 5.2666, + "position": 1, + "curve": [ 0.226, 0.15, 0.765, 0.96 ] + }, + { + "time": 5.5333, + "position": 1.02, + "curve": [ 0.279, 0.32, 0.694, 0.99 ] + }, + { "time": 5.8333, "position": 1.021 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/spine-ts/webgl/example/assets/tank.png b/spine-ts/webgl/example/assets/tank.png new file mode 100644 index 000000000..b0b1b3642 Binary files /dev/null and b/spine-ts/webgl/example/assets/tank.png differ diff --git a/spine-ts/webgl/example/assets/vine.atlas b/spine-ts/webgl/example/assets/vine.atlas new file mode 100644 index 000000000..313213413 --- /dev/null +++ b/spine-ts/webgl/example/assets/vine.atlas @@ -0,0 +1,13 @@ + +vine.png +size: 128,1024 +format: RGBA8888 +filter: Linear,Linear +repeat: none +images/vine + rotate: false + xy: 2, 2 + size: 68, 962 + orig: 68, 962 + offset: 0, 0 + index: -1 diff --git a/spine-ts/webgl/example/assets/vine.json b/spine-ts/webgl/example/assets/vine.json new file mode 100644 index 000000000..a08c20022 --- /dev/null +++ b/spine-ts/webgl/example/assets/vine.json @@ -0,0 +1,300 @@ +{ +"skeleton": { "hash": "Ww/IgnvLkO+Bc7+ljr0JS3OTq8Q", "spine": "3.4.00", "width": 227.35, "height": 841.02, "images": "" }, +"bones": [ + { "name": "root" }, + { "name": "vine1", "parent": "root", "length": 74, "rotation": 90, "x": 339.09, "y": -467.15, "color": "f700ffff" }, + { "name": "vine2", "parent": "vine1", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine3", "parent": "vine2", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine4", "parent": "vine3", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine5", "parent": "vine4", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine6", "parent": "vine5", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine7", "parent": "vine6", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine8", "parent": "vine7", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine9", "parent": "vine8", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine10", "parent": "vine9", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine11", "parent": "vine10", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine12", "parent": "vine11", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine13", "parent": "vine12", "length": 74, "x": 74, "color": "f700ffff" }, + { "name": "vine-control1", "parent": "root", "length": 296.68, "rotation": 88.64, "x": -2.5, "y": 2.55, "color": "ff0004ff" }, + { "name": "vine-control2", "parent": "vine-control1", "length": 292.59, "rotation": 0.96, "x": 296.68, "color": "ff0004ff" }, + { "name": "vine-control3", "parent": "vine-control2", "length": 247.5, "rotation": 0.16, "x": 292.59, "color": "ff0004ff" }, + { "name": "vine-control4", "parent": "vine-control3", "length": 212.43, "rotation": 0.5, "x": 247.5, "color": "ff0004ff" } +], +"slots": [ + { "name": "vine-path", "bone": "root", "attachment": "vine-path" }, + { "name": "vine", "bone": "vine1", "attachment": "images/vine" } +], +"path": [ + { + "name": "vine-path", + "bones": [ "vine1", "vine2", "vine3", "vine4", "vine5", "vine6", "vine7", "vine8", "vine9", "vine10", "vine11", "vine12", "vine13" ], + "target": "vine-path", + "rotateMode": "chainScale" + } +], +"skins": { + "default": { + "vine": { + "images/vine": { + "type": "mesh", + "uvs": [ 0, 0, 0.5, 0, 1, 0, 1, 0.03846, 1, 0.07692, 1, 0.11538, 1, 0.15384, 1, 0.1923, 1, 0.23076, 1, 0.26923, 1, 0.30769, 1, 0.34615, 1, 0.38461, 1, 0.42307, 1, 0.46153, 1, 0.5, 1, 0.53846, 1, 0.57692, 1, 0.61538, 1, 0.65384, 1, 0.6923, 1, 0.73076, 1, 0.76923, 1, 0.80769, 1, 0.84615, 1, 0.88461, 1, 0.92307, 1, 0.96153, 1, 1, 0.5, 1, 0, 1, 0, 0.96153, 0, 0.92307, 0, 0.88461, 0, 0.84615, 0, 0.80769, 0, 0.76923, 0, 0.73076, 0, 0.6923, 0, 0.65384, 0, 0.61538, 0, 0.57692, 0, 0.53846, 0, 0.5, 0, 0.46153, 0, 0.42307, 0, 0.38461, 0, 0.34615, 0, 0.30769, 0, 0.26923, 0, 0.23076, 0, 0.1923, 0, 0.15384, 0, 0.11538, 0, 0.07692, 0, 0.03846, 0.5, 0.03846, 0.5, 0.07692, 0.5, 0.11538, 0.5, 0.15384, 0.5, 0.1923, 0.5, 0.23076, 0.5, 0.26923, 0.5, 0.30769, 0.5, 0.34615, 0.5, 0.38461, 0.5, 0.42307, 0.5, 0.46153, 0.5, 0.5, 0.5, 0.53846, 0.5, 0.57692, 0.5, 0.61538, 0.5, 0.65384, 0.5, 0.6923, 0.5, 0.73076, 0.5, 0.76923, 0.5, 0.80769, 0.5, 0.84615, 0.5, 0.88461, 0.5, 0.92307, 0.5, 0.96153 ], + "triangles": [ 57, 56, 3, 54, 55, 56, 56, 2, 3, 55, 1, 56, 56, 1, 2, 55, 0, 1, 54, 56, 57, 59, 58, 5, 52, 53, 58, 58, 4, 5, 53, 57, 58, 58, 57, 4, 53, 54, 57, 57, 3, 4, 61, 60, 7, 50, 51, 60, 60, 6, 7, 51, 59, 60, 60, 59, 6, 51, 52, 59, 59, 5, 6, 52, 58, 59, 63, 62, 9, 48, 49, 62, 62, 8, 9, 49, 61, 62, 62, 61, 8, 49, 50, 61, 61, 7, 8, 50, 60, 61, 65, 64, 11, 46, 47, 64, 64, 10, 11, 47, 63, 64, 64, 63, 10, 47, 48, 63, 63, 9, 10, 48, 62, 63, 67, 66, 13, 44, 45, 66, 66, 12, 13, 45, 65, 66, 66, 65, 12, 45, 46, 65, 65, 11, 12, 46, 64, 65, 69, 68, 15, 42, 43, 68, 68, 14, 15, 43, 67, 68, 68, 67, 14, 43, 44, 67, 67, 13, 14, 44, 66, 67, 71, 70, 17, 40, 41, 70, 70, 16, 17, 41, 69, 70, 70, 69, 16, 41, 42, 69, 69, 15, 16, 42, 68, 69, 73, 72, 19, 38, 39, 72, 72, 18, 19, 39, 71, 72, 72, 71, 18, 39, 40, 71, 71, 17, 18, 40, 70, 71, 75, 74, 21, 36, 37, 74, 74, 20, 21, 37, 73, 74, 74, 73, 20, 37, 38, 73, 73, 19, 20, 38, 72, 73, 77, 76, 23, 34, 35, 76, 76, 22, 23, 35, 75, 76, 76, 75, 22, 35, 36, 75, 75, 21, 22, 36, 74, 75, 78, 77, 24, 33, 34, 77, 32, 78, 79, 79, 78, 25, 32, 33, 78, 78, 24, 25, 33, 77, 78, 77, 23, 24, 34, 76, 77, 79, 25, 26, 29, 27, 28, 30, 80, 29, 29, 80, 27, 30, 31, 80, 80, 26, 27, 31, 79, 80, 80, 79, 26, 31, 32, 79 ], + "vertices": [ 4, 10, 294, 33.89, 3.2E-4, 11, 220, 33.89, 0.01648, 12, 146, 33.89, 0.21526, 13, 72, 33.89, 0.76791, 3, 11, 220, -0.1, 0.00752, 12, 146, -0.1, 0.16869, 13, 72, -0.1, 0.82378, 4, 10, 294, -34.09999, 3.2E-4, 11, 220, -34.09999, 0.01648, 12, 146, -34.09999, 0.21526, 13, 72, -34.09999, 0.76791, 4, 10, 257, -34.09999, 0.00195, 11, 183, -34.09999, 0.04739, 12, 109, -34.09999, 0.33351, 13, 35, -34.09999, 0.61714, 5, 9, 294, -34.09999, 2.4E-4, 10, 220, -34.09999, 0.01163, 11, 146, -34.09999, 0.14109, 12, 72, -34.09999, 0.49171, 13, -1.99, -34.09999, 0.35531, 5, 9, 257, -34.09999, 0.00195, 10, 183, -34.09999, 0.04663, 11, 109, -34.09999, 0.31166, 12, 35, -34.09999, 0.48761, 13, -38.99, -34.09999, 0.15212, 6, 8, 294, -34.09999, 2.4E-4, 9, 220, -34.09999, 0.01163, 10, 146, -34.09999, 0.14101, 11, 72, -34.09999, 0.48685, 12, -1.99, -34.09999, 0.31174, 13, -75.99, -34.09999, 0.0485, 6, 8, 257, -34.09999, 0.00195, 9, 183, -34.09999, 0.04663, 10, 109, -34.09999, 0.31166, 11, 35, -34.09999, 0.48685, 12, -38.99, -34.09999, 0.14101, 13, -112.99, -34.09999, 0.01188, 7, 7, 294, -34.09999, 2.4E-4, 8, 220, -34.09999, 0.01163, 9, 146, -34.09999, 0.14101, 10, 72, -34.09999, 0.48685, 11, -1.99, -34.09999, 0.31166, 12, -75.99, -34.09999, 0.04663, 13, -149.99, -34.09999, 0.00195, 7, 7, 257, -34.09999, 0.00195, 8, 183, -34.09999, 0.04663, 9, 109, -34.09999, 0.31166, 10, 35, -34.09999, 0.48685, 11, -38.99, -34.09999, 0.14101, 12, -112.99, -34.09999, 0.01163, 13, -186.99, -34.09999, 2.4E-4, 7, 6, 294, -34.09999, 2.4E-4, 7, 220, -34.09999, 0.01163, 8, 146, -34.09999, 0.14101, 9, 72, -34.09999, 0.48685, 10, -1.99, -34.09999, 0.31166, 11, -75.99, -34.09999, 0.04663, 12, -149.99, -34.09999, 0.00195, 7, 6, 257, -34.09999, 0.00195, 7, 183, -34.09999, 0.04663, 8, 109, -34.09999, 0.31166, 9, 35, -34.09999, 0.48685, 10, -38.99, -34.09999, 0.14101, 11, -112.99, -34.09999, 0.01163, 12, -186.99, -34.09999, 2.4E-4, 7, 5, 294, -34.09999, 2.4E-4, 6, 220, -34.09999, 0.01163, 7, 146, -34.09999, 0.14101, 8, 72, -34.09999, 0.48685, 9, -1.99, -34.09999, 0.31166, 10, -75.99, -34.09999, 0.04663, 11, -149.99, -34.09999, 0.00195, 7, 5, 257, -34.09999, 0.00195, 6, 183, -34.09999, 0.04663, 7, 109, -34.09999, 0.31166, 8, 35, -34.09999, 0.48685, 9, -38.99, -34.09999, 0.14101, 10, -112.99, -34.09999, 0.01163, 11, -186.99, -34.09999, 2.4E-4, 7, 4, 294, -34.09999, 2.4E-4, 5, 220, -34.09999, 0.01163, 6, 146, -34.09999, 0.14101, 7, 72, -34.09999, 0.48685, 8, -1.99, -34.09999, 0.31166, 9, -75.99, -34.09999, 0.04663, 10, -149.99, -34.09999, 0.00195, 7, 4, 257, -34.09999, 0.00195, 5, 183, -34.09999, 0.04663, 6, 109, -34.09999, 0.31166, 7, 35, -34.09999, 0.48685, 8, -38.99, -34.09999, 0.14101, 9, -112.99, -34.09999, 0.01163, 10, -186.99, -34.09999, 2.4E-4, 7, 3, 294, -34.09999, 2.4E-4, 4, 220, -34.09999, 0.01163, 5, 146, -34.09999, 0.14101, 6, 72, -34.09999, 0.48685, 7, -1.99, -34.09999, 0.31166, 8, -75.99, -34.09999, 0.04663, 9, -149.99, -34.09999, 0.00195, 7, 3, 257, -34.09999, 0.00195, 4, 183, -34.09999, 0.04663, 5, 109, -34.09999, 0.31166, 6, 35, -34.09999, 0.48685, 7, -38.99, -34.09999, 0.14101, 8, -112.99, -34.09999, 0.01163, 9, -186.99, -34.09999, 2.4E-4, 7, 2, 294, -34.09999, 2.4E-4, 3, 220, -34.09999, 0.01163, 4, 146, -34.09999, 0.14101, 5, 72, -34.09999, 0.48685, 6, -1.99, -34.09999, 0.31166, 7, -75.99, -34.09999, 0.04663, 8, -149.99, -34.09999, 0.00195, 7, 2, 257, -34.09999, 0.00195, 3, 183, -34.09999, 0.04663, 4, 109, -34.09999, 0.31166, 5, 35, -34.09999, 0.48685, 6, -38.99, -34.09999, 0.14101, 7, -112.99, -34.09999, 0.01163, 8, -186.99, -34.09999, 2.4E-4, 7, 1, 294, -34.09999, 2.4E-4, 2, 220, -34.09999, 0.01163, 3, 146, -34.09999, 0.14101, 4, 72, -34.09999, 0.48685, 5, -1.99, -34.09999, 0.31166, 6, -75.99, -34.09999, 0.04663, 7, -149.99, -34.09999, 0.00195, 7, 1, 257, -34.09999, 0.0017, 2, 183, -34.09999, 0.04687, 3, 109, -34.09999, 0.31166, 4, 35, -34.09999, 0.48685, 5, -38.99, -34.09999, 0.14101, 6, -112.99, -34.09999, 0.01163, 7, -186.99, -34.09999, 2.4E-4, 6, 1, 220, -34.09999, 0.01033, 2, 146, -34.09999, 0.14256, 3, 72, -34.09999, 0.48685, 4, -1.99, -34.09999, 0.31166, 5, -75.99, -34.09999, 0.04663, 6, -149.99, -34.09999, 0.00195, 6, 1, 183, -34.09999, 0.04058, 2, 109, -34.09999, 0.31966, 3, 35, -34.09999, 0.48685, 4, -38.99, -34.09999, 0.14101, 5, -112.99, -34.09999, 0.01163, 6, -186.99, -34.09999, 2.4E-4, 5, 1, 146, -34.09999, 0.1274, 2, 72, -34.09999, 0.51233, 3, -1.99, -34.09999, 0.31166, 4, -75.99, -34.09999, 0.04663, 5, -149.99, -34.09999, 0.00195, 5, 1, 109, -34.09999, 0.30116, 2, 35, -34.09999, 0.54594, 3, -38.99, -34.09999, 0.14101, 4, -112.99, -34.09999, 0.01163, 5, -186.99, -34.09999, 2.4E-4, 4, 1, 72, -34.09999, 0.55403, 2, -1.99, -34.09999, 0.39738, 3, -75.99, -34.09999, 0.04663, 4, -149.99, -34.09999, 0.00195, 4, 1, 35, -34.09999, 0.77978, 2, -38.99, -34.09999, 0.20825, 3, -112.99, -34.09999, 0.01171, 4, -186.99, -34.09999, 2.4E-4, 3, 1, -1.99, -34.09999, 0.89032, 2, -75.99, -34.09999, 0.10696, 3, -149.99, -34.09999, 0.00271, 3, 1, -1.99, -0.1, 0.9264, 2, -75.99, -0.1, 0.07272, 3, -149.99, -0.1, 8.6E-4, 3, 1, -1.99, 33.89, 0.89032, 2, -75.99, 33.89, 0.10696, 3, -149.99, 33.89, 0.00271, 4, 1, 35, 33.89, 0.77978, 2, -38.99, 33.89, 0.20825, 3, -112.99, 33.89, 0.01171, 4, -186.99, 33.89, 2.4E-4, 4, 1, 72, 33.89, 0.55403, 2, -1.99, 33.89, 0.39738, 3, -75.99, 33.89, 0.04663, 4, -149.99, 33.89, 0.00195, 5, 1, 109, 33.89, 0.30116, 2, 35, 33.89, 0.54594, 3, -38.99, 33.89, 0.14101, 4, -112.99, 33.89, 0.01163, 5, -186.99, 33.89, 2.4E-4, 5, 1, 146, 33.89, 0.1274, 2, 72, 33.89, 0.51233, 3, -1.99, 33.89, 0.31166, 4, -75.99, 33.89, 0.04663, 5, -149.99, 33.89, 0.00195, 6, 1, 183, 33.89, 0.04058, 2, 109, 33.89, 0.31966, 3, 35, 33.89, 0.48685, 4, -38.99, 33.89, 0.14101, 5, -112.99, 33.89, 0.01163, 6, -186.99, 33.89, 2.4E-4, 6, 1, 220, 33.89, 0.01033, 2, 146, 33.89, 0.14256, 3, 72, 33.89, 0.48685, 4, -1.99, 33.89, 0.31166, 5, -75.99, 33.89, 0.04663, 6, -149.99, 33.89, 0.00195, 7, 1, 257, 33.89, 0.0017, 2, 183, 33.89, 0.04687, 3, 109, 33.89, 0.31166, 4, 35, 33.89, 0.48685, 5, -38.99, 33.89, 0.14101, 6, -112.99, 33.89, 0.01163, 7, -186.99, 33.89, 2.4E-4, 7, 1, 294, 33.89, 2.4E-4, 2, 220, 33.89, 0.01163, 3, 146, 33.89, 0.14101, 4, 72, 33.89, 0.48685, 5, -1.99, 33.89, 0.31166, 6, -75.99, 33.89, 0.04663, 7, -149.99, 33.89, 0.00195, 7, 2, 257, 33.89, 0.00195, 3, 183, 33.89, 0.04663, 4, 109, 33.89, 0.31166, 5, 35, 33.89, 0.48685, 6, -38.99, 33.89, 0.14101, 7, -112.99, 33.89, 0.01163, 8, -186.99, 33.89, 2.4E-4, 7, 2, 294, 33.89, 2.4E-4, 3, 220, 33.89, 0.01163, 4, 146, 33.89, 0.14101, 5, 72, 33.89, 0.48685, 6, -1.99, 33.89, 0.31166, 7, -75.99, 33.89, 0.04663, 8, -149.99, 33.89, 0.00195, 7, 3, 257, 33.89, 0.00195, 4, 183, 33.89, 0.04663, 5, 109, 33.89, 0.31166, 6, 35, 33.89, 0.48685, 7, -38.99, 33.89, 0.14101, 8, -112.99, 33.89, 0.01163, 9, -186.99, 33.89, 2.4E-4, 7, 3, 294, 33.89, 2.4E-4, 4, 220, 33.89, 0.01163, 5, 146, 33.89, 0.14101, 6, 72, 33.89, 0.48685, 7, -1.99, 33.89, 0.31166, 8, -75.99, 33.89, 0.04663, 9, -149.99, 33.89, 0.00195, 7, 4, 257, 33.89, 0.00195, 5, 183, 33.89, 0.04663, 6, 109, 33.89, 0.31166, 7, 35, 33.89, 0.48685, 8, -38.99, 33.89, 0.14101, 9, -112.99, 33.89, 0.01163, 10, -186.99, 33.89, 2.4E-4, 7, 4, 294, 33.89, 2.4E-4, 5, 220, 33.89, 0.01163, 6, 146, 33.89, 0.14101, 7, 72, 33.89, 0.48685, 8, -1.99, 33.89, 0.31166, 9, -75.99, 33.89, 0.04663, 10, -149.99, 33.89, 0.00195, 7, 5, 257, 33.89, 0.00195, 6, 183, 33.89, 0.04663, 7, 109, 33.89, 0.31166, 8, 35, 33.89, 0.48685, 9, -38.99, 33.89, 0.14101, 10, -112.99, 33.89, 0.01163, 11, -186.99, 33.89, 2.4E-4, 7, 5, 294, 33.89, 2.4E-4, 6, 220, 33.89, 0.01163, 7, 146, 33.89, 0.14101, 8, 72, 33.89, 0.48685, 9, -1.99, 33.89, 0.31166, 10, -75.99, 33.89, 0.04663, 11, -149.99, 33.89, 0.00195, 7, 6, 257, 33.89, 0.00195, 7, 183, 33.89, 0.04663, 8, 109, 33.89, 0.31166, 9, 35, 33.89, 0.48685, 10, -38.99, 33.89, 0.14101, 11, -112.99, 33.89, 0.01163, 12, -186.99, 33.89, 2.4E-4, 7, 6, 294, 33.89, 2.4E-4, 7, 220, 33.89, 0.01163, 8, 146, 33.89, 0.14101, 9, 72, 33.89, 0.48685, 10, -1.99, 33.89, 0.31166, 11, -75.99, 33.89, 0.04663, 12, -149.99, 33.89, 0.00195, 7, 7, 257, 33.89, 0.00195, 8, 183, 33.89, 0.04663, 9, 109, 33.89, 0.31166, 10, 35, 33.89, 0.48685, 11, -38.99, 33.89, 0.14101, 12, -112.99, 33.89, 0.01163, 13, -186.99, 33.89, 2.4E-4, 7, 7, 294, 33.89, 2.4E-4, 8, 220, 33.89, 0.01163, 9, 146, 33.89, 0.14101, 10, 72, 33.89, 0.48685, 11, -1.99, 33.89, 0.31166, 12, -75.99, 33.89, 0.04663, 13, -149.99, 33.89, 0.00195, 6, 8, 257, 33.89, 0.00195, 9, 183, 33.89, 0.04663, 10, 109, 33.89, 0.31166, 11, 35, 33.89, 0.48685, 12, -38.99, 33.89, 0.14101, 13, -112.99, 33.89, 0.01188, 6, 8, 294, 33.89, 2.4E-4, 9, 220, 33.89, 0.01163, 10, 146, 33.89, 0.14101, 11, 72, 33.89, 0.48685, 12, -1.99, 33.89, 0.31174, 13, -75.99, 33.89, 0.0485, 5, 9, 257, 33.89, 0.00195, 10, 183, 33.89, 0.04663, 11, 109, 33.89, 0.31166, 12, 35, 33.89, 0.48761, 13, -38.99, 33.89, 0.15212, 5, 9, 294, 33.89, 2.4E-4, 10, 220, 33.89, 0.01163, 11, 146, 33.89, 0.14109, 12, 72, 33.89, 0.49171, 13, -1.99, 33.89, 0.35531, 4, 10, 257, 33.89, 0.00195, 11, 183, 33.89, 0.04739, 12, 109, 33.89, 0.33351, 13, 35, 33.89, 0.61714, 4, 10, 257, -0.1, 6.5E-4, 11, 183, -0.1, 0.03067, 12, 109, -0.1, 0.31658, 13, 35, -0.1, 0.65209, 4, 10, 220, -0.1, 0.00542, 11, 146, -0.1, 0.11402, 12, 72, -0.1, 0.5478, 13, -1.99, -0.1, 0.33273, 5, 9, 257, -0.1, 6.5E-4, 10, 183, -0.1, 0.03045, 11, 109, -0.1, 0.30373, 12, 35, -0.1, 0.54592, 13, -38.99, -0.1, 0.11923, 5, 9, 220, -0.1, 0.00542, 10, 146, -0.1, 0.11402, 11, 72, -0.1, 0.5457, 12, -1.99, -0.1, 0.30373, 13, -75.99, -0.1, 0.0311, 6, 8, 257, -0.1, 6.5E-4, 9, 183, -0.1, 0.03045, 10, 109, -0.1, 0.30373, 11, 35, -0.1, 0.5457, 12, -38.99, -0.1, 0.11402, 13, -112.99, -0.1, 0.00542, 6, 8, 220, -0.1, 0.00542, 9, 146, -0.1, 0.11402, 10, 72, -0.1, 0.5457, 11, -1.99, -0.1, 0.30373, 12, -75.99, -0.1, 0.03045, 13, -149.99, -0.1, 6.5E-4, 6, 7, 257, -0.1, 6.5E-4, 8, 183, -0.1, 0.03045, 9, 109, -0.1, 0.30373, 10, 35, -0.1, 0.5457, 11, -38.99, -0.1, 0.11402, 12, -112.99, -0.1, 0.00542, 6, 7, 220, -0.1, 0.00542, 8, 146, -0.1, 0.11402, 9, 72, -0.1, 0.5457, 10, -1.99, -0.1, 0.30373, 11, -75.99, -0.1, 0.03045, 12, -149.99, -0.1, 6.5E-4, 6, 6, 257, -0.1, 6.5E-4, 7, 183, -0.1, 0.03045, 8, 109, -0.1, 0.30373, 9, 35, -0.1, 0.5457, 10, -38.99, -0.1, 0.11402, 11, -112.99, -0.1, 0.00542, 6, 6, 220, -0.1, 0.00542, 7, 146, -0.1, 0.11402, 8, 72, -0.1, 0.5457, 9, -1.99, -0.1, 0.30373, 10, -75.99, -0.1, 0.03045, 11, -149.99, -0.1, 6.5E-4, 6, 5, 257, -0.1, 6.5E-4, 6, 183, -0.1, 0.03045, 7, 109, -0.1, 0.30373, 8, 35, -0.1, 0.5457, 9, -38.99, -0.1, 0.11402, 10, -112.99, -0.1, 0.00542, 6, 5, 220, -0.1, 0.00542, 6, 146, -0.1, 0.11402, 7, 72, -0.1, 0.5457, 8, -1.99, -0.1, 0.30373, 9, -75.99, -0.1, 0.03045, 10, -149.99, -0.1, 6.5E-4, 6, 4, 257, -0.1, 6.5E-4, 5, 183, -0.1, 0.03045, 6, 109, -0.1, 0.30373, 7, 35, -0.1, 0.5457, 8, -38.99, -0.1, 0.11402, 9, -112.99, -0.1, 0.00542, 6, 4, 220, -0.1, 0.00542, 5, 146, -0.1, 0.11402, 6, 72, -0.1, 0.5457, 7, -1.99, -0.1, 0.30373, 8, -75.99, -0.1, 0.03045, 9, -149.99, -0.1, 6.5E-4, 6, 3, 257, -0.1, 6.5E-4, 4, 183, -0.1, 0.03045, 5, 109, -0.1, 0.30373, 6, 35, -0.1, 0.5457, 7, -38.99, -0.1, 0.11402, 8, -112.99, -0.1, 0.00542, 6, 3, 220, -0.1, 0.00542, 4, 146, -0.1, 0.11402, 5, 72, -0.1, 0.5457, 6, -1.99, -0.1, 0.30373, 7, -75.99, -0.1, 0.03045, 8, -149.99, -0.1, 6.5E-4, 6, 2, 257, -0.1, 6.5E-4, 3, 183, -0.1, 0.03045, 4, 109, -0.1, 0.30373, 5, 35, -0.1, 0.5457, 6, -38.99, -0.1, 0.11402, 7, -112.99, -0.1, 0.00542, 6, 2, 220, -0.1, 0.00542, 3, 146, -0.1, 0.11402, 4, 72, -0.1, 0.5457, 5, -1.99, -0.1, 0.30373, 6, -75.99, -0.1, 0.03045, 7, -149.99, -0.1, 6.5E-4, 6, 1, 257, -0.1, 6.5E-4, 2, 183, -0.1, 0.03045, 3, 109, -0.1, 0.30373, 4, 35, -0.1, 0.5457, 5, -38.99, -0.1, 0.11402, 6, -112.99, -0.1, 0.00542, 6, 1, 220, -0.1, 0.00477, 2, 146, -0.1, 0.11467, 3, 72, -0.1, 0.5457, 4, -1.99, -0.1, 0.30373, 5, -75.99, -0.1, 0.03045, 6, -149.99, -0.1, 6.5E-4, 5, 1, 183, -0.1, 0.02676, 2, 109, -0.1, 0.30807, 3, 35, -0.1, 0.5457, 4, -38.99, -0.1, 0.11402, 5, -112.99, -0.1, 0.00542, 5, 1, 146, -0.1, 0.09905, 2, 72, -0.1, 0.5661, 3, -1.99, -0.1, 0.30373, 4, -75.99, -0.1, 0.03045, 5, -149.99, -0.1, 6.5E-4, 4, 1, 109, -0.1, 0.27658, 2, 35, -0.1, 0.60395, 3, -38.99, -0.1, 0.11402, 4, -112.99, -0.1, 0.00542, 4, 1, 72, -0.1, 0.55929, 2, -1.99, -0.1, 0.40959, 3, -75.99, -0.1, 0.03045, 4, -149.99, -0.1, 6.5E-4, 3, 1, 35, -0.1, 0.81845, 2, -38.99, -0.1, 0.17611, 3, -112.99, -0.1, 0.00542 ], + "hull": 56, + "edges": [ 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 46, 48, 48, 50, 50, 52, 52, 54, 54, 56, 60, 62, 62, 64, 64, 66, 66, 68, 68, 70, 70, 72, 72, 74, 74, 76, 76, 78, 78, 80, 80, 82, 82, 84, 84, 86, 86, 88, 88, 90, 90, 92, 92, 94, 94, 96, 96, 98, 98, 100, 100, 102, 102, 104, 104, 106, 106, 108, 108, 110, 110, 0, 0, 2, 58, 60, 2, 4, 56, 58, 62, 160, 160, 54, 64, 158, 158, 52, 66, 156, 156, 50, 68, 154, 154, 48, 46, 152, 152, 70, 72, 150, 150, 44, 42, 148, 148, 74, 76, 146, 146, 40, 38, 144, 144, 78, 80, 142, 142, 36, 34, 140, 140, 82, 84, 138, 138, 32, 30, 136, 136, 86, 88, 134, 134, 28, 26, 132, 132, 90, 92, 130, 130, 24, 22, 128, 128, 94, 96, 126, 126, 20, 18, 124, 124, 98, 100, 122, 122, 16, 14, 120, 120, 102, 12, 118, 118, 104, 106, 116, 116, 10, 8, 114, 114, 108, 110, 112, 112, 6 ], + "width": 68, + "height": 962 + } + }, + "vine-path": { + "vine-path": { + "type": "path", + "lengths": [ 223.68, 474.79, 780.31, 992.69, 1196.42, 2277.75 ], + "vertexCount": 18, + "vertices": [ 1, 14, -31.64, 22.49, 1, 1, 14, -2.73, -6.56, 1, 1, 14, 56.89, -69, 1, 1, 14, 115.57, 75.01, 1, 1, 14, 198.6, 53.37, 1, 2, 14, 332.76, 19.74, 0.8, 15, 36.41, 19.12999, 0.19999, 2, 14, 276.72, -68.37, 0.232, 15, -21.1, -68.01999, 0.76799, 1, 15, 96.09, -93.88, 1, 2, 15, 229.75, -122.63, 0.664, 16, -63.18, -122.45, 0.33599, 2, 15, 242.53, 29.31, 0.52, 16, -49.97, 29.45, 0.47999, 1, 16, 66.72, 38.65, 1, 2, 16, 183.42, 47.85, 0.80799, 17, -63.65, 48.41, 0.192, 2, 16, 177.29, -41.22, 0.77599, 17, -70.56, -40.61, 0.224, 2, 16, 265.5, -16.18, 0.488, 17, 17.86, -16.34, 0.51199, 2, 16, 343.25, 7.25, 0.21599, 17, 95.81, 6.41, 0.784, 1, 17, 138.78, 45.72, 1, 1, 17, 212.86, 5.44, 1, 1, 14, 1094.34, -1.02, 1 ] + } + } + } +}, +"animations": { + "animation": { + "slots": { + "vine": { + "color": [ + { + "time": 0, + "color": "ffcb73ff", + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 10.3666, "color": "fefaffff" } + ] + } + }, + "bones": { + "vine1": { + "scale": [ + { + "time": 0, + "x": 1, + "y": 0.183, + "curve": [ 0.166, 0.22, 0.598, 0.99 ] + }, + { + "time": 3.6333, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 11.4333, "x": 1, "y": 1.438 } + ] + }, + "vine-control1": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": 2.86, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 4.7, + "angle": -0.13, + "curve": [ 0.505, 0, 0.75, 1 ] + }, + { + "time": 6.4333, + "angle": 0.68, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 9.6, "angle": 0.68 } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 4.3333, + "x": 1, + "y": 0.792, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 7.6, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.568, 0.99 ] + }, + { "time": 11.4333, "x": 1, "y": 0.636 } + ] + }, + "vine-control2": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": 2.86, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 4.7, + "angle": -0.13, + "curve": [ 0.505, 0, 0.75, 1 ] + }, + { + "time": 6.4333, + "angle": 0.68, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 9.6, "angle": 0.68 } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 4.3333, + "x": 1, + "y": 0.791, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 7.6, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 11.4333, "x": 1, "y": 0.923 } + ] + }, + "vine-control3": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": 10.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 4.7, + "angle": -11.18, + "curve": [ 0.505, 0, 0.75, 1 ] + }, + { + "time": 6.4333, + "angle": -0.47, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 9.6, "angle": -5.23 } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 4.3333, + "x": 1, + "y": 0.791, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 7.6, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 11.4333, "x": 1, "y": 0.923 } + ] + }, + "vine-control4": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 2.5666, + "angle": 10.88, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 4.7, + "angle": -11.18, + "curve": [ 0.505, 0, 0.75, 1 ] + }, + { + "time": 6.4333, + "angle": 7.47, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 9.6, "angle": 2.71 } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 4.3333, + "x": 1, + "y": 0.791, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 7.6, + "x": 1, + "y": 1, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 11.4333, "x": 1, "y": 0.923 } + ] + } + }, + "paths": { + "vine-path": { + "position": [ + { "time": 0, "position": -0.1 }, + { "time": 0.3333, "position": -0.025 } + ], + "spacing": [ + { "time": 0, "spacing": -100 }, + { + "time": 0.3333, + "spacing": -71.8, + "curve": [ 0.32, 0.18, 0.624, 0.6 ] + }, + { + "time": 3.1333, + "spacing": -13.199, + "curve": [ 0.251, 0.5, 0.557, 0.98 ] + }, + { "time": 6.7333, "spacing": 20.9 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/spine-ts/webgl/example/assets/vine.png b/spine-ts/webgl/example/assets/vine.png new file mode 100644 index 000000000..15ad8b736 Binary files /dev/null and b/spine-ts/webgl/example/assets/vine.png differ diff --git a/spine-ts/webgl/example/index.html b/spine-ts/webgl/example/index.html new file mode 100644 index 000000000..4e89c96cf --- /dev/null +++ b/spine-ts/webgl/example/index.html @@ -0,0 +1,219 @@ + + + + +

+
+Skeleton: +Animation: +Skin: +
+ + + \ No newline at end of file diff --git a/spine-ts/webgl/src/AssetManager.ts b/spine-ts/webgl/src/AssetManager.ts new file mode 100644 index 000000000..02b403a0d --- /dev/null +++ b/spine-ts/webgl/src/AssetManager.ts @@ -0,0 +1,133 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class AssetManager implements Disposable { + private _gl: WebGLRenderingContext; + private _assets: Map = {}; + private _errors: Map = {}; + private _toLoad = 0; + private _loaded = 0; + + constructor (gl: WebGLRenderingContext) { + this._gl = gl; + } + + loadText(path: string, + success: (path: string, text: string) => void = null, + error: (path: string, error: string) => void = null + ) { + this._toLoad++; + let request = new XMLHttpRequest(); + request.onreadystatechange = () => { + if (request.readyState == XMLHttpRequest.DONE) { + if (request.status >= 200 && request.status < 300) { + if (success) success(path, request.responseText); + this._assets[path] = request.responseText; + } else { + if (error) error(path, `Couldn't load text ${path}: status ${request.status}, ${request.responseText}`); + this._errors[path] = `Couldn't load text ${path}: status ${request.status}, ${request.responseText}`; + } + this._toLoad--; + this._loaded++; + } + }; + request.open("GET", path, true); + request.send(); + } + + loadTexture (path: string, + success: (path: string, image: HTMLImageElement) => void = null, + error: (path: string, error: string) => void = null + ) { + this._toLoad++; + let img = new Image(); + img.src = path; + img.onload = (ev) => { + if (success) success(path, img); + let texture = new Texture(this._gl, img); + this._assets[path] = texture; + this._toLoad--; + this._loaded++; + } + img.onerror = (ev) => { + if (error) error(path, `Couldn't load image ${path}`); + this._errors[path] = `Couldn't load image ${path}`; + this._toLoad--; + this._loaded++; + } + } + + get (path: string) { + return this._assets[path]; + } + + remove (path: string) { + let asset = this._assets[path]; + if (asset instanceof Texture) { + asset.dispose(); + } + this._assets[path] = null; + } + + removeAll () { + for (let key in this._assets) { + let asset = this._assets[key]; + if (asset instanceof Texture) asset.dispose(); + } + this._assets = {}; + } + + isLoadingComplete (): boolean { + return this._toLoad == 0; + } + + toLoad (): number { + return this._toLoad; + } + + loaded (): number { + return this._loaded; + } + + dispose () { + this.removeAll(); + } + + hasErrors() { + return Object.keys(this._errors).length > 0; + } + + errors() { + return this._errors; + } + } +} diff --git a/spine-ts/webgl/src/Matrix4.ts b/spine-ts/webgl/src/Matrix4.ts new file mode 100644 index 000000000..aa80403a4 --- /dev/null +++ b/spine-ts/webgl/src/Matrix4.ts @@ -0,0 +1,303 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export const M00 = 0; + export const M01 = 4; + export const M02 = 8; + export const M03 = 12; + export const M10 = 1; + export const M11 = 5; + export const M12 = 9; + export const M13 = 13; + export const M20 = 2; + export const M21 = 6; + export const M22 = 10; + export const M23 = 14; + export const M30 = 3; + export const M31 = 7; + export const M32 = 11; + export const M33 = 15; + + export class Matrix4 { + temp: Float32Array = new Float32Array(16); + values: Float32Array = new Float32Array(16); + + constructor () { + let v = this.values; + v[M00] = 1; + v[M11] = 1; + v[M22] = 1; + v[M33] = 1; + } + + set (values: ArrayLike): Matrix4 { + this.values.set(values); + return this; + } + + transpose (): Matrix4 { + let t = this.temp; + let v = this.values; + t[M00] = v[M00]; + t[M01] = v[M10]; + t[M02] = v[M20]; + t[M03] = v[M30]; + t[M10] = v[M01]; + t[M11] = v[M11]; + t[M12] = v[M21]; + t[M13] = v[M31]; + t[M20] = v[M02]; + t[M21] = v[M12]; + t[M22] = v[M22]; + t[M23] = v[M32]; + t[M30] = v[M03]; + t[M31] = v[M13]; + t[M32] = v[M23]; + t[M33] = v[M33]; + return this.set(t); + } + + identity (): Matrix4 { + let v = this.values; + v[M00] = 1; + v[M01] = 0; + v[M02] = 0; + v[M03] = 0; + v[M10] = 0; + v[M11] = 1; + v[M12] = 0; + v[M13] = 0; + v[M20] = 0; + v[M21] = 0; + v[M22] = 1; + v[M23] = 0; + v[M30] = 0; + v[M31] = 0; + v[M32] = 0; + v[M33] = 1; + return this; + } + + invert (): Matrix4 { + let v = this.values; + let t = this.temp; + let l_det = v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] + - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] + - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] + - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] + - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33]; + if (l_det == 0) throw new Error("non-invertible matrix"); + let inv_det = 1.0 / l_det; + t[M00] = v[M12] * v[M23] * v[M31] - v[M13] * v[M22] * v[M31] + v[M13] * v[M21] * v[M32] + - v[M11] * v[M23] * v[M32] - v[M12] * v[M21] * v[M33] + v[M11] * v[M22] * v[M33]; + t[M01] = v[M03] * v[M22] * v[M31] - v[M02] * v[M23] * v[M31] - v[M03] * v[M21] * v[M32] + + v[M01] * v[M23] * v[M32] + v[M02] * v[M21] * v[M33] - v[M01] * v[M22] * v[M33]; + t[M02] = v[M02] * v[M13] * v[M31] - v[M03] * v[M12] * v[M31] + v[M03] * v[M11] * v[M32] + - v[M01] * v[M13] * v[M32] - v[M02] * v[M11] * v[M33] + v[M01] * v[M12] * v[M33]; + t[M03] = v[M03] * v[M12] * v[M21] - v[M02] * v[M13] * v[M21] - v[M03] * v[M11] * v[M22] + + v[M01] * v[M13] * v[M22] + v[M02] * v[M11] * v[M23] - v[M01] * v[M12] * v[M23]; + t[M10] = v[M13] * v[M22] * v[M30] - v[M12] * v[M23] * v[M30] - v[M13] * v[M20] * v[M32] + + v[M10] * v[M23] * v[M32] + v[M12] * v[M20] * v[M33] - v[M10] * v[M22] * v[M33]; + t[M11] = v[M02] * v[M23] * v[M30] - v[M03] * v[M22] * v[M30] + v[M03] * v[M20] * v[M32] + - v[M00] * v[M23] * v[M32] - v[M02] * v[M20] * v[M33] + v[M00] * v[M22] * v[M33]; + t[M12] = v[M03] * v[M12] * v[M30] - v[M02] * v[M13] * v[M30] - v[M03] * v[M10] * v[M32] + + v[M00] * v[M13] * v[M32] + v[M02] * v[M10] * v[M33] - v[M00] * v[M12] * v[M33]; + t[M13] = v[M02] * v[M13] * v[M20] - v[M03] * v[M12] * v[M20] + v[M03] * v[M10] * v[M22] + - v[M00] * v[M13] * v[M22] - v[M02] * v[M10] * v[M23] + v[M00] * v[M12] * v[M23]; + t[M20] = v[M11] * v[M23] * v[M30] - v[M13] * v[M21] * v[M30] + v[M13] * v[M20] * v[M31] + - v[M10] * v[M23] * v[M31] - v[M11] * v[M20] * v[M33] + v[M10] * v[M21] * v[M33]; + t[M21] = v[M03] * v[M21] * v[M30] - v[M01] * v[M23] * v[M30] - v[M03] * v[M20] * v[M31] + + v[M00] * v[M23] * v[M31] + v[M01] * v[M20] * v[M33] - v[M00] * v[M21] * v[M33]; + t[M22] = v[M01] * v[M13] * v[M30] - v[M03] * v[M11] * v[M30] + v[M03] * v[M10] * v[M31] + - v[M00] * v[M13] * v[M31] - v[M01] * v[M10] * v[M33] + v[M00] * v[M11] * v[M33]; + t[M23] = v[M03] * v[M11] * v[M20] - v[M01] * v[M13] * v[M20] - v[M03] * v[M10] * v[M21] + + v[M00] * v[M13] * v[M21] + v[M01] * v[M10] * v[M23] - v[M00] * v[M11] * v[M23]; + t[M30] = v[M12] * v[M21] * v[M30] - v[M11] * v[M22] * v[M30] - v[M12] * v[M20] * v[M31] + + v[M10] * v[M22] * v[M31] + v[M11] * v[M20] * v[M32] - v[M10] * v[M21] * v[M32]; + t[M31] = v[M01] * v[M22] * v[M30] - v[M02] * v[M21] * v[M30] + v[M02] * v[M20] * v[M31] + - v[M00] * v[M22] * v[M31] - v[M01] * v[M20] * v[M32] + v[M00] * v[M21] * v[M32]; + t[M32] = v[M02] * v[M11] * v[M30] - v[M01] * v[M12] * v[M30] - v[M02] * v[M10] * v[M31] + + v[M00] * v[M12] * v[M31] + v[M01] * v[M10] * v[M32] - v[M00] * v[M11] * v[M32]; + t[M33] = v[M01] * v[M12] * v[M20] - v[M02] * v[M11] * v[M20] + v[M02] * v[M10] * v[M21] + - v[M00] * v[M12] * v[M21] - v[M01] * v[M10] * v[M22] + v[M00] * v[M11] * v[M22]; + v[M00] = t[M00] * inv_det; + v[M01] = t[M01] * inv_det; + v[M02] = t[M02] * inv_det; + v[M03] = t[M03] * inv_det; + v[M10] = t[M10] * inv_det; + v[M11] = t[M11] * inv_det; + v[M12] = t[M12] * inv_det; + v[M13] = t[M13] * inv_det; + v[M20] = t[M20] * inv_det; + v[M21] = t[M21] * inv_det; + v[M22] = t[M22] * inv_det; + v[M23] = t[M23] * inv_det; + v[M30] = t[M30] * inv_det; + v[M31] = t[M31] * inv_det; + v[M32] = t[M32] * inv_det; + v[M33] = t[M33] * inv_det; + return this; + } + + determinant (): number { + let v = this.values; + return v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] + - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] + - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] + - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] + - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33]; + } + + translate (x: number, y: number, z: number): Matrix4 { + let v = this.values; + v[M03] += x; + v[M13] += y; + v[M23] += z; + return this; + } + + copy (): Matrix4 { + return new Matrix4().set(this.values); + } + + projection (near: number, far: number, fovy: number, aspectRatio: number): Matrix4 { + this.identity(); + let l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0)); + let l_a1 = (far + near) / (near - far); + let l_a2 = (2 * far * near) / (near - far); + let v = this.values; + v[M00] = l_fd / aspectRatio; + v[M10] = 0; + v[M20] = 0; + v[M30] = 0; + v[M01] = 0; + v[M11] = l_fd; + v[M21] = 0; + v[M31] = 0; + v[M02] = 0; + v[M12] = 0; + v[M22] = l_a1; + v[M32] = -1; + v[M03] = 0; + v[M13] = 0; + v[M23] = l_a2; + v[M33] = 0; + return this; + } + + ortho2d (x: number, y: number, width: number, height: number): Matrix4 { + return this.ortho(x, x + width, y, y + height, 0, 1); + } + + ortho (left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4 { + this.identity(); + let x_orth = 2 / (right - left); + let y_orth = 2 / (top - bottom); + let z_orth = -2 / (far - near); + + let tx = -(right + left) / (right - left); + let ty = -(top + bottom) / (top - bottom); + let tz = -(far + near) / (far - near); + + let v = this.values; + v[M00] = x_orth; + v[M10] = 0; + v[M20] = 0; + v[M30] = 0; + v[M01] = 0; + v[M11] = y_orth; + v[M21] = 0; + v[M31] = 0; + v[M02] = 0; + v[M12] = 0; + v[M22] = z_orth; + v[M32] = 0; + v[M03] = tx; + v[M13] = ty; + v[M23] = tz; + v[M33] = 1; + return this; + } + + multiply (matrix: Matrix4): Matrix4 { + let t = this.temp; + let v = this.values; + let m = matrix.values; + t[M00] = v[M00] * m[M00] + v[M01] * m[M10] + v[M02] * m[M20] + v[M03] * m[M30]; + t[M01] = v[M00] * m[M01] + v[M01] * m[M11] + v[M02] * m[M21] + v[M03] * m[M31]; + t[M02] = v[M00] * m[M02] + v[M01] * m[M12] + v[M02] * m[M22] + v[M03] * m[M32]; + t[M03] = v[M00] * m[M03] + v[M01] * m[M13] + v[M02] * m[M23] + v[M03] * m[M33]; + t[M10] = v[M10] * m[M00] + v[M11] * m[M10] + v[M12] * m[M20] + v[M13] * m[M30]; + t[M11] = v[M10] * m[M01] + v[M11] * m[M11] + v[M12] * m[M21] + v[M13] * m[M31]; + t[M12] = v[M10] * m[M02] + v[M11] * m[M12] + v[M12] * m[M22] + v[M13] * m[M32]; + t[M13] = v[M10] * m[M03] + v[M11] * m[M13] + v[M12] * m[M23] + v[M13] * m[M33]; + t[M20] = v[M20] * m[M00] + v[M21] * m[M10] + v[M22] * m[M20] + v[M23] * m[M30]; + t[M21] = v[M20] * m[M01] + v[M21] * m[M11] + v[M22] * m[M21] + v[M23] * m[M31]; + t[M22] = v[M20] * m[M02] + v[M21] * m[M12] + v[M22] * m[M22] + v[M23] * m[M32]; + t[M23] = v[M20] * m[M03] + v[M21] * m[M13] + v[M22] * m[M23] + v[M23] * m[M33]; + t[M30] = v[M30] * m[M00] + v[M31] * m[M10] + v[M32] * m[M20] + v[M33] * m[M30]; + t[M31] = v[M30] * m[M01] + v[M31] * m[M11] + v[M32] * m[M21] + v[M33] * m[M31]; + t[M32] = v[M30] * m[M02] + v[M31] * m[M12] + v[M32] * m[M22] + v[M33] * m[M32]; + t[M33] = v[M30] * m[M03] + v[M31] * m[M13] + v[M32] * m[M23] + v[M33] * m[M33]; + return this.set(this.temp); + } + + multiplyLeft (matrix: Matrix4): Matrix4 { + let t = this.temp; + let v = this.values; + let m = matrix.values; + t[M00] = m[M00] * v[M00] + m[M01] * v[M10] + m[M02] * v[M20] + m[M03] * v[M30]; + t[M01] = m[M00] * v[M01] + m[M01] * v[M11] + m[M02] * v[M21] + m[M03] * v[M31]; + t[M02] = m[M00] * v[M02] + m[M01] * v[M12] + m[M02] * v[M22] + m[M03] * v[M32]; + t[M03] = m[M00] * v[M03] + m[M01] * v[M13] + m[M02] * v[M23] + m[M03] * v[M33]; + t[M10] = m[M10] * v[M00] + m[M11] * v[M10] + m[M12] * v[M20] + m[M13] * v[M30]; + t[M11] = m[M10] * v[M01] + m[M11] * v[M11] + m[M12] * v[M21] + m[M13] * v[M31]; + t[M12] = m[M10] * v[M02] + m[M11] * v[M12] + m[M12] * v[M22] + m[M13] * v[M32]; + t[M13] = m[M10] * v[M03] + m[M11] * v[M13] + m[M12] * v[M23] + m[M13] * v[M33]; + t[M20] = m[M20] * v[M00] + m[M21] * v[M10] + m[M22] * v[M20] + m[M23] * v[M30]; + t[M21] = m[M20] * v[M01] + m[M21] * v[M11] + m[M22] * v[M21] + m[M23] * v[M31]; + t[M22] = m[M20] * v[M02] + m[M21] * v[M12] + m[M22] * v[M22] + m[M23] * v[M32]; + t[M23] = m[M20] * v[M03] + m[M21] * v[M13] + m[M22] * v[M23] + m[M23] * v[M33]; + t[M30] = m[M30] * v[M00] + m[M31] * v[M10] + m[M32] * v[M20] + m[M33] * v[M30]; + t[M31] = m[M30] * v[M01] + m[M31] * v[M11] + m[M32] * v[M21] + m[M33] * v[M31]; + t[M32] = m[M30] * v[M02] + m[M31] * v[M12] + m[M32] * v[M22] + m[M33] * v[M32]; + t[M33] = m[M30] * v[M03] + m[M31] * v[M13] + m[M32] * v[M23] + m[M33] * v[M33]; + return this.set(this.temp); + } + } +} diff --git a/spine-ts/webgl/src/Mesh.ts b/spine-ts/webgl/src/Mesh.ts new file mode 100644 index 000000000..bb66d0865 --- /dev/null +++ b/spine-ts/webgl/src/Mesh.ts @@ -0,0 +1,184 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class Mesh implements Disposable { + private _gl: WebGLRenderingContext; + private _vertices:Float32Array; + private _verticesBuffer: WebGLBuffer; + private _verticesLength = 0; + private _dirtyVertices = false; + private _indices:Uint16Array; + private _indicesBuffer: WebGLBuffer; + private _indicesLength = 0; + private _dirtyIndices = false; + private _elementsPerVertex = 0; + + attributes (): VertexAttribute[] { return this._attributes; } + + maxVertices (): number { return this._vertices.length / this._elementsPerVertex; } + numVertices (): number { return this._verticesLength / this._elementsPerVertex; } + setVerticesLength (length: number) { + this._dirtyVertices = true; + this._verticesLength = length; + } + vertices (): Float32Array { return this._vertices; } + + maxIndices (): number { return this._indices.length; } + numIndices (): number { return this._indicesLength; } + setIndicesLength (length: number) { + this._dirtyIndices = true; + this._indicesLength = length; + } + indices (): Uint16Array { return this._indices }; + + constructor (gl: WebGLRenderingContext, private _attributes: VertexAttribute[], maxVertices: number, maxIndices: number) { + this._gl = gl; + this._elementsPerVertex = 0; + for (let i = 0; i < _attributes.length; i++) { + this._elementsPerVertex += _attributes[i].numElements; + } + this._vertices = new Float32Array(maxVertices * this._elementsPerVertex); + this._indices = new Uint16Array(maxIndices); + } + + setVertices (vertices: Array) { + this._dirtyVertices = true; + if (vertices.length > this._vertices.length) throw Error("Mesh can't store more than " + this.maxVertices() + " vertices"); + this._vertices.set(vertices, 0); + this._verticesLength = vertices.length; + } + + setIndices (indices: Array) { + this._dirtyIndices = true; + if (indices.length > this._indices.length) throw Error("Mesh can't store more than " + this.maxIndices() + " indices"); + this._indices.set(indices, 0); + this._indicesLength = indices.length; + } + + draw (shader: Shader, primitiveType: number) { + this.drawWithOffset(shader, primitiveType, 0, this._indicesLength > 0? this._indicesLength: this._verticesLength); + } + + drawWithOffset (shader: Shader, primitiveType: number, offset: number, count: number) { + let gl = this._gl; + if (this._dirtyVertices || this._dirtyIndices) this.update(); + this.bind(shader); + if (this._indicesLength > 0) gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2); + else gl.drawArrays(primitiveType, offset, count); + this.unbind(shader); + } + + bind (shader: Shader) { + let gl = this._gl; + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + let offset = 0; + for (let i = 0; i < this._attributes.length; i++) { + let attrib = this._attributes[i]; + let location = shader.getAttributeLocation(attrib.name); + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, attrib.numElements, gl.FLOAT, false, this._elementsPerVertex * 4, offset * 4); + offset += attrib.numElements; + } + if (this._indicesLength > 0) gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + } + + unbind (shader: Shader) { + let gl = this._gl; + for (let i = 0; i < this._attributes.length; i++) { + let attrib = this._attributes[i]; + let location = shader.getAttributeLocation(attrib.name); + gl.disableVertexAttribArray(location); + } + gl.bindBuffer(gl.ARRAY_BUFFER, null); + if (this._indicesLength > 0) gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null); + } + + private update () { + let gl = this._gl; + if (this._dirtyVertices) { + if (!this._verticesBuffer) { + this._verticesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ARRAY_BUFFER, this._verticesBuffer); + gl.bufferData(gl.ARRAY_BUFFER, this._vertices.subarray(0, this._verticesLength), gl.STATIC_DRAW); + this._dirtyVertices = false; + } + + if (this._dirtyIndices) { + if (!this._indicesBuffer) { + this._indicesBuffer = gl.createBuffer(); + } + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer); + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this._indices.subarray(0, this._indicesLength), gl.STATIC_DRAW); + this._dirtyIndices = false; + } + } + + dispose () { + let gl = this._gl; + gl.deleteBuffer(this._verticesBuffer); + gl.deleteBuffer(this._indicesBuffer); + } + } + + export class VertexAttribute { + constructor (public name: string, public type: VertexAttributeType, public numElements: number) { } + } + + export class Position2Attribute extends VertexAttribute { + constructor () { + super(Shader.POSITION, VertexAttributeType.Float, 2); + } + } + + export class Position3Attribute extends VertexAttribute { + constructor () { + super(Shader.POSITION, VertexAttributeType.Float, 3); + } + } + + export class TexCoordAttribute extends VertexAttribute { + constructor (unit: number = 0) { + super(Shader.TEXCOORDS + (unit == 0? "": unit), VertexAttributeType.Float, 2); + } + } + + export class ColorAttribute extends VertexAttribute { + constructor () { + super(Shader.COLOR, VertexAttributeType.Float, 4); + } + } + + export enum VertexAttributeType { + Float + } +} diff --git a/spine-ts/webgl/src/PolygonBatcher.ts b/spine-ts/webgl/src/PolygonBatcher.ts new file mode 100644 index 000000000..e76c2fbc6 --- /dev/null +++ b/spine-ts/webgl/src/PolygonBatcher.ts @@ -0,0 +1,121 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class PolygonBatcher { + private _gl: WebGLRenderingContext; + private _drawCalls: number; + private _drawing = false; + private _mesh: Mesh; + private _shader: Shader = null; + private _lastTexture: Texture = null; + private _verticesLength = 0; + private _indicesLength = 0; + private _srcBlend: number = WebGLRenderingContext.SRC_ALPHA; + private _dstBlend: number = WebGLRenderingContext.ONE_MINUS_SRC_ALPHA; + + constructor (gl: WebGLRenderingContext, maxVertices: number = 10920) { + if (maxVertices > 10920) throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices); + this._gl = gl; + this._mesh = new Mesh(gl, [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute()], maxVertices, maxVertices * 3); + } + + begin (shader: Shader) { + let gl = this._gl; + if (this._drawing) throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()"); + this._drawCalls = 0; + this._shader = shader; + this._lastTexture = null; + this._drawing = true; + + gl.enable(gl.BLEND); + gl.blendFunc(this._srcBlend, this._dstBlend); + } + + setBlendMode (srcBlend: number, dstBlend: number) { + let gl = this._gl; + this._srcBlend = srcBlend; + this._dstBlend = dstBlend; + if (this._drawing) { + this.flush(); + gl.blendFunc(this._srcBlend, this._dstBlend); + } + } + + draw (texture: Texture, vertices: ArrayLike, indices: Array) { + if (texture != this._lastTexture) { + this.flush(); + this._lastTexture = texture; + texture.bind(); + } else if (this._verticesLength + vertices.length > this._mesh.vertices().length || + this._indicesLength + indices.length > this._mesh.indices().length) { + this.flush(); + } + + let indexStart = this._mesh.numVertices(); + this._mesh.vertices().set(vertices, this._verticesLength); + this._verticesLength += vertices.length; + this._mesh.setVerticesLength(this._verticesLength) + + let indicesArray = this._mesh.indices(); + for (let i = this._indicesLength, j = 0; j < indices.length; i++, j++) + indicesArray[i] = indices[j] + indexStart; + this._indicesLength += indices.length; + this._mesh.setIndicesLength(this._indicesLength); + } + + private flush () { + let gl = this._gl; + if (this._verticesLength == 0) return; + + this._mesh.draw(this._shader, gl.TRIANGLES); + + this._verticesLength = 0; + this._indicesLength = 0; + this._mesh.setVerticesLength(0); + this._mesh.setIndicesLength(0); + this._drawCalls++; + } + + end () { + let gl = this._gl; + if (!this._drawing) throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()"); + if (this._verticesLength > 0 || this._indicesLength > 0) this.flush(); + this._shader = null; + this._lastTexture = null; + this._drawing = false; + + gl.disable(gl.BLEND); + } + + drawCalls () { return this._drawCalls; } + } +} diff --git a/spine-ts/webgl/src/Shader.ts b/spine-ts/webgl/src/Shader.ts new file mode 100644 index 000000000..a491f5172 --- /dev/null +++ b/spine-ts/webgl/src/Shader.ts @@ -0,0 +1,240 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class Shader implements Disposable { + public static MVP_MATRIX = "u_projTrans"; + public static POSITION = "a_position"; + public static COLOR = "a_color"; + public static TEXCOORDS = "a_texCoords"; + public static SAMPLER = "u_texture"; + + private _gl: WebGLRenderingContext; + private _vs: WebGLShader = null; + private _fs: WebGLShader = null; + private _program: WebGLProgram = null; + private _tmp2x2: Float32Array = new Float32Array(2 * 2); + private _tmp3x3: Float32Array = new Float32Array(3 * 3); + private _tmp4x4: Float32Array = new Float32Array(4 * 4); + + public program () { return this._program; } + public vertexShader () { return this._vertexShader; } + public fragmentShader () { return this._fragmentShader; } + + constructor (gl: WebGLRenderingContext, private _vertexShader: string, private _fragmentShader: string) { + this._gl = gl; + this.compile(); + } + + private compile () { + let gl = this._gl; + try { + this._vs = this.compileShader(gl.VERTEX_SHADER, this._vertexShader); + this._fs = this.compileShader(gl.FRAGMENT_SHADER, this._fragmentShader); + this._program = this.compileProgram(this._vs, this._fs); + } catch (e) { + this.dispose(); + throw e; + } + } + + private compileShader (type: number, source: string) { + let gl = this._gl; + let shader = gl.createShader(type); + gl.shaderSource(shader, source); + gl.compileShader(shader); + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + let error = "Couldn't compile shader: " + gl.getShaderInfoLog(shader); + gl.deleteShader(shader); + throw new Error(error); + } + return shader; + } + + private compileProgram (vs: WebGLShader, fs: WebGLShader) { + let gl = this._gl; + let program = gl.createProgram(); + gl.attachShader(program, vs); + gl.attachShader(program, fs); + gl.linkProgram(program); + + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + let error = "Couldn't compile shader program: " + gl.getProgramInfoLog(program); + gl.deleteProgram(program); + throw new Error(error); + } + return program; + } + + public bind () { + this._gl.useProgram(this._program); + } + + public unbind () { + this._gl.useProgram(null); + } + + public setUniformi (uniform: string, value: number) { + this._gl.uniform1i(this.getUniformLocation(uniform), value); + } + + public setUniformf (uniform: string, value: number) { + this._gl.uniform1f(this.getUniformLocation(uniform), value); + } + + public setUniform2f (uniform: string, value: number, value2: number) { + this._gl.uniform2f(this.getUniformLocation(uniform), value, value2); + } + + public setUniform3f (uniform: string, value: number, value2: number, value3: number) { + this._gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3); + } + + public setUniform4f (uniform: string, value: number, value2: number, value3: number, value4: number) { + this._gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4); + } + + public setUniform2x2f (uniform: string, value: ArrayLike) { + let gl = this._gl; + this._tmp2x2.set(value); + gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this._tmp2x2); + } + + public setUniform3x3f (uniform: string, value: ArrayLike) { + let gl = this._gl; + this._tmp3x3.set(value); + gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this._tmp3x3); + } + + public setUniform4x4f (uniform: string, value: ArrayLike) { + let gl = this._gl; + this._tmp4x4.set(value); + gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this._tmp4x4); + } + + public getUniformLocation (uniform: string): WebGLUniformLocation { + let gl = this._gl; + let location = gl.getUniformLocation(this._program, uniform); + if (!location) throw new Error(`Couldn't find location for uniform ${uniform}`); + return location; + } + + public getAttributeLocation (attribute: string): number { + let gl = this._gl; + let location = gl.getAttribLocation(this._program, attribute); + if (location == -1) throw new Error(`Couldn't find location for attribute ${attribute}`); + return location; + } + + public dispose () { + let gl = this._gl; + if (this._vs) { + gl.deleteShader(this._vs); + this._vs = null; + } + + if (this._fs) { + gl.deleteShader(this._fs); + this._fs = null; + } + + if (this._program) { + gl.deleteProgram(this._program); + this._program = null; + } + } + + public static newColoredTextured (gl: WebGLRenderingContext): Shader { + let vs = ` + attribute vec4 ${Shader.POSITION}; + attribute vec4 ${Shader.COLOR}; + attribute vec2 ${Shader.TEXCOORDS}; + uniform mat4 ${Shader.MVP_MATRIX}; + varying vec4 v_color; + varying vec2 v_texCoords; + + void main () { + v_color = ${Shader.COLOR}; + v_texCoords = ${Shader.TEXCOORDS}; + gl_Position = ${Shader.MVP_MATRIX} * ${Shader.POSITION}; + } + `; + + let fs = ` + #ifdef GL_ES + #define LOWP lowp + precision mediump float; + #else + #define LOWP + #endif + varying LOWP vec4 v_color; + varying vec2 v_texCoords; + uniform sampler2D u_texture; + + void main () { + gl_FragColor = v_color * texture2D(u_texture, v_texCoords); + } + `; + + return new Shader(gl, vs, fs); + } + + public static newColored (gl: WebGLRenderingContext): Shader { + let vs = ` + attribute vec4 ${Shader.POSITION}; + attribute vec4 ${Shader.COLOR}; + uniform mat4 ${Shader.MVP_MATRIX}; + varying vec4 v_color; + + void main () { + v_color = ${Shader.COLOR}; + gl_Position = ${Shader.MVP_MATRIX} * ${Shader.POSITION}; + } + `; + + let fs = ` + #ifdef GL_ES + #define LOWP lowp + precision mediump float; + #else + #define LOWP + #endif + varying LOWP vec4 v_color; + + void main () { + gl_FragColor = v_color; + } + `; + + return new Shader(gl, vs, fs); + } + } +} diff --git a/spine-ts/webgl/src/SkeletonRenderer.ts b/spine-ts/webgl/src/SkeletonRenderer.ts new file mode 100644 index 000000000..384dcc7ce --- /dev/null +++ b/spine-ts/webgl/src/SkeletonRenderer.ts @@ -0,0 +1,78 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class SkeletonRenderer { + static QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0]; + + premultipliedAlpha = false; + private _gl: WebGLRenderingContext; + + constructor (gl: WebGLRenderingContext) { + this._gl = gl; + } + + draw (batcher: PolygonBatcher, skeleton: Skeleton) { + let premultipliedAlpha = this.premultipliedAlpha; + let blendMode: BlendMode = null; + + let vertices: ArrayLike = null; + let triangles: Array = null; + let drawOrder = skeleton.drawOrder; + for (let i = 0, n = drawOrder.length; i < n; i++) { + let slot = drawOrder[i]; + let attachment = slot.getAttachment(); + let texture: Texture = null; + if (attachment instanceof RegionAttachment) { + let region = attachment; + vertices = region.updateWorldVertices(slot, premultipliedAlpha); + triangles = SkeletonRenderer.QUAD_TRIANGLES; + texture = (region.region.renderObject).texture; + + } else if (attachment instanceof MeshAttachment) { + let mesh = attachment; + vertices = mesh.updateWorldVertices(slot, premultipliedAlpha); + triangles = mesh.triangles; + texture = (mesh.region.renderObject).texture; + } + + if (texture != null) { + let slotBlendMode = slot.data.blendMode; + if (slotBlendMode != blendMode) { + blendMode = slotBlendMode; + batcher.setBlendMode(getSourceGLBlendMode(this._gl, blendMode, premultipliedAlpha), getDestGLBlendMode(this._gl, blendMode)); + } + batcher.draw(texture, vertices, triangles); + } + } + } + } +} diff --git a/spine-ts/webgl/src/Texture.ts b/spine-ts/webgl/src/Texture.ts new file mode 100644 index 000000000..30e797102 --- /dev/null +++ b/spine-ts/webgl/src/Texture.ts @@ -0,0 +1,131 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class Texture implements Disposable { + private _gl: WebGLRenderingContext; + private _texture: WebGLTexture; + private _image: HTMLImageElement; + private _boundUnit = 0; + + constructor (gl: WebGLRenderingContext, image: HTMLImageElement, useMipMaps: boolean = false) { + this._gl = gl; + this._texture = gl.createTexture(); + this._image = image; + this.update(useMipMaps); + } + + getImage (): HTMLImageElement { + return this._image; + } + + setFilters (minFilter: TextureFilter, magFilter: TextureFilter) { + let gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter); + } + + setWraps (uWrap: TextureWrap, vWrap: TextureWrap) { + let gl = this._gl; + this.bind(); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap); + } + + update (useMipMaps: boolean) { + let gl = this._gl; + this.bind(); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps? gl.LINEAR_MIPMAP_LINEAR: gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + if (useMipMaps) gl.generateMipmap(gl.TEXTURE_2D); + } + + bind (unit: number = 0) { + let gl = this._gl; + this._boundUnit = unit; + gl.activeTexture(gl.TEXTURE0 + unit); + gl.bindTexture(gl.TEXTURE_2D, this._texture); + } + + unbind () { + let gl = this._gl; + gl.activeTexture(gl.TEXTURE0 + this._boundUnit); + gl.bindTexture(gl.TEXTURE_2D, null); + } + + dispose () { + let gl = this._gl; + gl.deleteTexture(this._texture); + } + + public static filterFromString (text: string): TextureFilter { + 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}`); + } + } + + public static wrapFromString (text: string): TextureWrap { + 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}`); + } + } + } + + export enum TextureFilter { + Nearest = WebGLRenderingContext.NEAREST, + Linear = WebGLRenderingContext.LINEAR, + MipMap = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR, + MipMapNearestNearest = WebGLRenderingContext.NEAREST_MIPMAP_NEAREST, + MipMapLinearNearest = WebGLRenderingContext.LINEAR_MIPMAP_NEAREST, + MipMapNearestLinear = WebGLRenderingContext.NEAREST_MIPMAP_LINEAR, + MipMapLinearLinear = WebGLRenderingContext.LINEAR_MIPMAP_LINEAR + } + + export enum TextureWrap { + MirroredRepeat = WebGLRenderingContext.MIRRORED_REPEAT, + ClampToEdge = WebGLRenderingContext.CLAMP_TO_EDGE, + Repeat = WebGLRenderingContext.REPEAT + } +} diff --git a/spine-ts/webgl/src/TextureAtlas.ts b/spine-ts/webgl/src/TextureAtlas.ts new file mode 100644 index 000000000..f07c71ec7 --- /dev/null +++ b/spine-ts/webgl/src/TextureAtlas.ts @@ -0,0 +1,213 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class TextureAtlas implements Disposable { + pages = new Array(); + regions = new Array(); + + constructor (atlasText: string, textureLoader: (path: string) => Texture) { + this.load(atlasText, textureLoader); + } + + private load (atlasText: string, textureLoader: (path: string) => Texture) { + if (textureLoader == null) + throw new Error("textureLoader cannot be null."); + + let reader = new TextureAtlasReader(atlasText); + let tuple = new Array(4); + let page:TextureAtlasPage = null; + while (true) { + let line = reader.readLine(); + if (line == null) + break; + line = line.trim(); + if (line.length == 0) + page = null; + else if (!page) { + page = new TextureAtlasPage(); + page.name = line; + + if (reader.readTuple(tuple) == 2) { // size is only optional for an atlas packed with an old TexturePacker. + page.width = parseInt(tuple[0]); + page.height = parseInt(tuple[1]); + reader.readTuple(tuple); + } + // page.format = Format[tuple[0]]; we don't need format in WebGL + + reader.readTuple(tuple); + page.minFilter = Texture.filterFromString(tuple[0]); + page.magFilter = Texture.filterFromString(tuple[1]); + + let direction= reader.readValue(); + page.uWrap = TextureWrap.ClampToEdge; + page.vWrap = TextureWrap.ClampToEdge; + if (direction == "x") + page.uWrap = TextureWrap.Repeat; + else if (direction == "y") + page.vWrap = TextureWrap.Repeat; + else if (direction == "xy") + page.uWrap = page.vWrap = TextureWrap.Repeat; + + page.texture = textureLoader(line); + page.texture.setFilters(page.minFilter, page.magFilter); + page.texture.setWraps(page.uWrap, page.vWrap); + page.width = page.texture.getImage().width; + page.height = page.texture.getImage().height; + this.pages.push(page); + } else { + let region:TextureAtlasRegion = new TextureAtlasRegion(); + region.name = line; + region.page = page; + + region.rotate = reader.readValue() == "true"; + + reader.readTuple(tuple); + let x = parseInt(tuple[0]); + let y = parseInt(tuple[1]); + + reader.readTuple(tuple); + let width = parseInt(tuple[0]); + let height = parseInt(tuple[1]); + + region.u = x / page.width; + region.v = y / page.height; + if (region.rotate) { + region.u2 = (x + height) / page.width; + region.v2 = (y + width) / page.height; + } else { + region.u2 = (x + width) / page.width; + region.v2 = (y + height) / page.height; + } + region.x = x; + region.y = y; + region.width = Math.abs(width); + region.height = Math.abs(height); + + if (reader.readTuple(tuple) == 4) { // split is optional + // region.splits = new Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + if (reader.readTuple(tuple) == 4) { // pad is optional, but only present with splits + //region.pads = Vector.(parseInt(tuple[0]), parseInt(tuple[1]), parseInt(tuple[2]), parseInt(tuple[3])); + reader.readTuple(tuple); + } + } + + region.originalWidth = parseInt(tuple[0]); + region.originalHeight = parseInt(tuple[1]); + + reader.readTuple(tuple); + region.offsetX = parseInt(tuple[0]); + region.offsetY = parseInt(tuple[1]); + + region.index = parseInt(reader.readValue()); + + region.texture = page.texture; + this.regions.push(region); + } + } + } + + findRegion (name: string): TextureAtlasRegion { + for (let i = 0; i < this.regions.length; i++) { + if (this.regions[i].name == name) { + return this.regions[i]; + } + } + return null; + } + + dispose () { + for (let i = 0; i < this.pages.length; i++) { + this.pages[i].texture.dispose(); + } + } + } + + class TextureAtlasReader { + lines: Array; + index: number = 0; + + constructor (text: string) { + this.lines = text.split(/\r\n|\r|\n/); + } + + readLine (): string { + if (this.index >= this.lines.length) + return null; + return this.lines[this.index++]; + } + + readValue (): string { + let line = this.readLine(); + let colon= line.indexOf(":"); + if (colon == -1) + throw new Error("Invalid line: " + line); + return line.substring(colon + 1).trim(); + } + + readTuple (tuple: Array): number { + let line = this.readLine(); + let colon = line.indexOf(":"); + if (colon == -1) + throw new Error("Invalid line: " + line); + let i = 0, lastMatch = colon + 1; + for (; i < 3; i++) { + let 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; + } + } + + export class TextureAtlasPage { + name: string; + minFilter: TextureFilter; + magFilter: TextureFilter; + uWrap: TextureWrap; + vWrap: TextureWrap; + texture: Texture; + width: number; + height: number; + } + + export class TextureAtlasRegion extends TextureRegion { + page: TextureAtlasPage; + name: string; + x: number; + y: number; + index: number; + rotate: boolean; + texture: Texture; + } +} diff --git a/spine-ts/webgl/src/TextureAtlasAttachmentLoader.ts b/spine-ts/webgl/src/TextureAtlasAttachmentLoader.ts new file mode 100644 index 000000000..28b869fe7 --- /dev/null +++ b/spine-ts/webgl/src/TextureAtlasAttachmentLoader.ts @@ -0,0 +1,71 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class TextureAtlasAttachmentLoader implements AttachmentLoader { + atlas: TextureAtlas; + + constructor (atlas: TextureAtlas) { + this.atlas = atlas; + } + + /** @return May be null to not load an attachment. */ + newRegionAttachment (skin: Skin, name: string, path: string): RegionAttachment { + let region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")"); + let attachment = new RegionAttachment(name); + attachment.setRegion(region); + attachment.region = region; + return attachment; + } + + /** @return May be null to not load an attachment. */ + newMeshAttachment (skin: Skin, name: string, path: string) : MeshAttachment { + let region = this.atlas.findRegion(path); + region.renderObject = region; + if (region == null) throw new Error("Region not found in atlas: " + path + " (mesh attachment: " + name + ")"); + let attachment = new MeshAttachment(name); + attachment.region = region; + return attachment; + } + + /** @return May be null to not load an attachment. */ + newBoundingBoxAttachment (skin: Skin, name: string) : BoundingBoxAttachment { + return new BoundingBoxAttachment(name); + } + + /** @return May be null to not load an attachment */ + newPathAttachment (skin: Skin, name: string): PathAttachment { + return new PathAttachment(name); + } + } +} diff --git a/spine-ts/webgl/src/Vector3.ts b/spine-ts/webgl/src/Vector3.ts new file mode 100644 index 000000000..50b6c84ba --- /dev/null +++ b/spine-ts/webgl/src/Vector3.ts @@ -0,0 +1,110 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export class Vector3 { + x = 0; + y = 0; + z = 0; + + set (x: number, y: number, z: number): Vector3 { + this.x = x; + this.y = y; + this.z = z; + return this; + } + + add (v: Vector3): Vector3 { + this.x += v.x; + this.y += v.y; + this.z += v.z; + return this; + } + + sub (v: Vector3): Vector3 { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + return this; + } + + scale (s: number): Vector3 { + this.x *= s; + this.y *= s; + this.z *= s; + return this; + } + + normalize (): Vector3 { + let len = this.length(); + if (len == 0) return this; + len = 1 / len; + this.x *= len; + this.y *= len; + this.z *= len; + return this; + } + + cross (v: Vector3): Vector3 { + return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x) + } + + multiply (matrix: Matrix4): Vector3 { + let l_mat = matrix.values; + return this.set(this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03], + this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13], + this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]); + } + + project (matrix: Matrix4): Vector3 { + let l_mat = matrix.values; + let l_w = 1 / (this.x * l_mat[M30] + this.y * l_mat[M31] + this.z * l_mat[M32] + l_mat[M33]); + return this.set((this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03]) * l_w, + (this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13]) * l_w, + (this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]) * l_w); + } + + dot (v: Vector3): number { + return this.x * v.x + this.y * v.y + this.z * v.z; + } + + length (): number { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + } + + distance (v: Vector3): number { + let a = v.x - this.x; + let b = v.y - this.y; + let c = v.z - this.z; + return Math.sqrt(a * a + b * b + c * c); + } + } +} diff --git a/spine-ts/webgl/src/WebGL.ts b/spine-ts/webgl/src/WebGL.ts new file mode 100644 index 000000000..a7a637d81 --- /dev/null +++ b/spine-ts/webgl/src/WebGL.ts @@ -0,0 +1,52 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine.webgl { + export function getSourceGLBlendMode (gl: WebGLRenderingContext, blendMode: BlendMode, premultipliedAlpha: boolean = false) { + switch(blendMode) { + case BlendMode.Normal: return premultipliedAlpha? gl.ONE : gl.SRC_ALPHA; + case BlendMode.Additive: return premultipliedAlpha? gl.ONE : gl.SRC_ALPHA; + case BlendMode.Multiply: return gl.DST_COLOR; + case BlendMode.Screen: return gl.ONE; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } + + export function getDestGLBlendMode (gl: WebGLRenderingContext, blendMode: BlendMode) { + switch(blendMode) { + case BlendMode.Normal: return gl.ONE_MINUS_SRC_ALPHA; + case BlendMode.Additive: return gl.ONE; + case BlendMode.Multiply: return gl.ONE_MINUS_SRC_ALPHA; + case BlendMode.Screen: return gl.ONE_MINUS_SRC_ALPHA; + default: throw new Error("Unknown blend mode: " + blendMode); + } + } +} diff --git a/spine-ts/widget/example/assets/raptor.atlas b/spine-ts/widget/example/assets/raptor.atlas new file mode 100644 index 000000000..11728a52d --- /dev/null +++ b/spine-ts/widget/example/assets/raptor.atlas @@ -0,0 +1,279 @@ + +raptor.png +size: 1024,1024 +format: RGBA8888 +filter: Linear,Linear +repeat: none +back_arm + rotate: true + xy: 140, 191 + size: 46, 29 + orig: 46, 29 + offset: 0, 0 + index: -1 +back_bracer + rotate: true + xy: 167, 317 + size: 39, 28 + orig: 39, 28 + offset: 0, 0 + index: -1 +back_hand + rotate: false + xy: 167, 358 + size: 36, 34 + orig: 36, 34 + offset: 0, 0 + index: -1 +back_knee + rotate: false + xy: 299, 478 + size: 49, 67 + orig: 49, 67 + offset: 0, 0 + index: -1 +back_thigh + rotate: true + xy: 167, 437 + size: 39, 24 + orig: 39, 24 + offset: 0, 0 + index: -1 +eyes_closed + rotate: true + xy: 2, 2 + size: 47, 45 + orig: 47, 45 + offset: 0, 0 + index: -1 +eyes_open + rotate: true + xy: 49, 2 + size: 47, 45 + orig: 47, 45 + offset: 0, 0 + index: -1 +eyes_surprised + rotate: true + xy: 96, 2 + size: 47, 45 + orig: 47, 45 + offset: 0, 0 + index: -1 +front_arm + rotate: false + xy: 419, 544 + size: 48, 30 + orig: 48, 30 + offset: 0, 0 + index: -1 +front_bracer + rotate: false + xy: 880, 695 + size: 41, 29 + orig: 41, 29 + offset: 0, 0 + index: -1 +front_hand + rotate: true + xy: 167, 394 + size: 41, 38 + orig: 41, 38 + offset: 0, 0 + index: -1 +front_open_hand + rotate: false + xy: 880, 726 + size: 43, 44 + orig: 43, 44 + offset: 0, 0 + index: -1 +front_thigh + rotate: false + xy: 360, 545 + size: 57, 29 + orig: 57, 29 + offset: 0, 0 + index: -1 +gun + rotate: false + xy: 785, 774 + size: 107, 103 + orig: 107, 103 + offset: 0, 0 + index: -1 +gun_nohand + rotate: false + xy: 614, 703 + size: 105, 102 + orig: 105, 102 + offset: 0, 0 + index: -1 +head + rotate: false + xy: 2, 137 + size: 136, 149 + orig: 136, 149 + offset: 0, 0 + index: -1 +lower_leg + rotate: true + xy: 780, 699 + size: 73, 98 + orig: 73, 98 + offset: 0, 0 + index: -1 +mouth_grind + rotate: false + xy: 469, 544 + size: 47, 30 + orig: 47, 30 + offset: 0, 0 + index: -1 +mouth_oooo + rotate: true + xy: 894, 772 + size: 105, 30 + orig: 105, 30 + offset: 0, 0 + index: -1 +mouth_smile + rotate: true + xy: 140, 239 + size: 47, 30 + orig: 47, 30 + offset: 0, 0 + index: -1 +neck + rotate: true + xy: 538, 577 + size: 18, 21 + orig: 18, 21 + offset: 0, 0 + index: -1 +raptor_arm_back + rotate: false + xy: 940, 936 + size: 82, 86 + orig: 82, 86 + offset: 0, 0 + index: -1 +raptor_body + rotate: false + xy: 2, 737 + size: 610, 285 + orig: 610, 285 + offset: 0, 0 + index: -1 +raptor_front_arm + rotate: true + xy: 195, 464 + size: 81, 102 + orig: 81, 102 + offset: 0, 0 + index: -1 +raptor_front_leg + rotate: false + xy: 2, 478 + size: 191, 257 + orig: 191, 257 + offset: 0, 0 + index: -1 +raptor_hindleg_back + rotate: false + xy: 614, 807 + size: 169, 215 + orig: 169, 215 + offset: 0, 0 + index: -1 +raptor_horn + rotate: false + xy: 360, 655 + size: 182, 80 + orig: 182, 80 + offset: 0, 0 + index: -1 +raptor_horn_back + rotate: false + xy: 360, 576 + size: 176, 77 + orig: 176, 77 + offset: 0, 0 + index: -1 +raptor_jaw + rotate: false + xy: 785, 879 + size: 153, 143 + orig: 153, 143 + offset: 0, 0 + index: -1 +raptor_saddle_noshadow + rotate: false + xy: 2, 288 + size: 163, 188 + orig: 163, 188 + offset: 0, 0 + index: -1 +raptor_saddle_strap_front + rotate: false + xy: 721, 710 + size: 57, 95 + orig: 57, 95 + offset: 0, 0 + index: -1 +raptor_saddle_strap_rear + rotate: true + xy: 940, 880 + size: 54, 74 + orig: 54, 74 + offset: 0, 0 + index: -1 +raptor_saddle_w_shadow + rotate: false + xy: 195, 547 + size: 163, 188 + orig: 163, 188 + offset: 0, 0 + index: -1 +raptor_tongue + rotate: true + xy: 544, 649 + size: 86, 64 + orig: 86, 64 + offset: 0, 0 + index: -1 +stirrup_back + rotate: true + xy: 140, 145 + size: 44, 35 + orig: 44, 35 + offset: 0, 0 + index: -1 +stirrup_front + rotate: false + xy: 538, 597 + size: 45, 50 + orig: 45, 50 + offset: 0, 0 + index: -1 +stirrup_strap + rotate: false + xy: 350, 497 + size: 49, 46 + orig: 49, 46 + offset: 0, 0 + index: -1 +torso + rotate: true + xy: 610, 647 + size: 54, 91 + orig: 54, 91 + offset: 0, 0 + index: -1 +visor + rotate: false + xy: 2, 51 + size: 131, 84 + orig: 131, 84 + offset: 0, 0 + index: -1 diff --git a/spine-ts/widget/example/assets/raptor.json b/spine-ts/widget/example/assets/raptor.json new file mode 100644 index 000000000..d2b55b74c --- /dev/null +++ b/spine-ts/widget/example/assets/raptor.json @@ -0,0 +1,2621 @@ +{ +"skeleton": { "hash": "/7FMTV1eoFH7zhIaaG8BAH+NQOw", "spine": "3.4.00", "width": 1223.72, "height": 1055.62, "images": "./images/" }, +"bones": [ + { "name": "root" }, + { "name": "hip", "parent": "root", "rotation": 3.15, "x": -136.78, "y": 415.47, "color": "fbff00ff" }, + { "name": "torso1", "parent": "hip", "length": 126.25, "rotation": -4.97, "x": 30.03, "y": -0.4, "color": "eaff00ff" }, + { "name": "saddle", "parent": "torso1", "length": 50.91, "rotation": 91.8, "x": 4.56, "y": 71.86, "color": "ff7300ff" }, + { "name": "spineboy_hip", "parent": "saddle", "length": 0.52, "rotation": 90.01, "x": 81.88, "y": 2.68, "color": "ffffffff" }, + { + "name": "spineboy_torso", + "parent": "spineboy_hip", + "length": 122.45, + "rotation": -75.85, + "x": 1.05, + "y": -2.1, + "color": "ffffffff" + }, + { + "name": "back_arm", + "parent": "spineboy_torso", + "length": 67.21, + "rotation": -120.89, + "x": 96.33, + "y": -38.46, + "color": "ffffffff" + }, + { "name": "back_bracer", "parent": "back_arm", "length": 43.68, "rotation": 17.48, "x": 67.21, "y": -0.31, "color": "ffffffff" }, + { + "name": "back_hand", + "parent": "back_bracer", + "length": 41.97, + "rotation": 9.2, + "x": 43.68, + "y": 0.06, + "inheritRotation": false, + "color": "ffffffff" + }, + { "name": "back_thigh", "parent": "spineboy_hip", "length": 71.15, "rotation": 160.75, "x": -9.57, "y": 2.31, "color": "ffffffff" }, + { "name": "back_knee", "parent": "back_thigh", "length": 97.17, "rotation": -54.97, "x": 71.15, "y": -0.28, "color": "ffffffff" }, + { + "name": "front_arm", + "parent": "spineboy_torso", + "length": 74.51, + "rotation": -118.16, + "x": 101.37, + "y": 9.78, + "color": "ffffffff" + }, + { "name": "torso2", "parent": "torso1", "length": 121.2, "rotation": 39.84, "x": 126.25, "y": -0.37, "color": "eaff00ff" }, + { "name": "front_arm1", "parent": "torso2", "length": 109.99, "rotation": 224.54, "x": 46.37, "y": -84.61, "color": "15ff00ff" }, + { "name": "front_arm2", "parent": "front_arm1", "length": 86.33, "rotation": 105.23, "x": 109.99, "y": 0.2, "color": "15ff00ff" }, + { "name": "neck", "parent": "torso2", "length": 70.59, "rotation": 41.37, "x": 121.19, "y": 0.34, "color": "eaff00ff" }, + { "name": "head", "parent": "neck", "length": 105.5, "rotation": 9.82, "x": 70.59, "y": 0.03, "color": "eaff00ff" }, + { "name": "horn_front", "parent": "head", "length": 87.48, "rotation": 49.36, "x": 82.09, "y": -221.36, "color": "15ff00ff" }, + { "name": "front_arm_target", "parent": "horn_front", "rotation": -138.59, "x": 294.58, "y": 234.17, "color": "15ff00ff" }, + { "name": "front_bracer", "parent": "front_arm", "length": 39.85, "rotation": 20.3, "x": 74.52, "y": -0.41, "color": "ffffffff" }, + { "name": "front_leg1", "parent": "hip", "length": 251.74, "rotation": -51.5, "x": 27.36, "y": -28.27, "color": "15ff00ff" }, + { "name": "front_leg2", "parent": "front_leg1", "length": 208.54, "rotation": 261.93, "x": 251.03, "y": 0.16, "color": "15ff00ff" }, + { "name": "front_leg3", "parent": "front_leg2", "length": 118.18, "rotation": 85.46, "x": 208.5, "y": -1.63, "color": "15ff00ff" }, + { + "name": "front_foot1", + "parent": "front_leg3", + "length": 57.79, + "rotation": 54.46, + "x": 118.19, + "y": -0.79, + "scaleX": 1.126, + "color": "15ff00ff" + }, + { + "name": "front_foot2", + "parent": "front_foot1", + "length": 56.19, + "rotation": -2.15, + "x": 57.78, + "y": -0.02, + "scaleX": 0.73, + "scaleY": 0.823, + "inheritRotation": false, + "color": "15ff00ff" + }, + { + "name": "front_foot3", + "parent": "front_foot2", + "length": 129.88, + "rotation": -2.7, + "x": 49.71, + "y": 20.65, + "scaleX": 1.154, + "color": "15ff00ff" + }, + { "name": "front_foot_goal", "parent": "root", "rotation": -0.94, "x": -45.79, "y": -28.67, "color": "ff0000ff" }, + { "name": "front_hand", "parent": "front_arm2", "length": 47.55, "rotation": -56.83, "x": 86.33, "y": 0.06, "color": "15ff00ff" }, + { + "name": "front_hand2", + "parent": "front_bracer", + "length": 58.18, + "rotation": 13.9, + "x": 39.98, + "y": -0.89, + "inheritRotation": false, + "color": "ffffffff" + }, + { "name": "front_leg_goal", "parent": "front_foot_goal", "x": -106.06, "y": 115.58, "color": "ff0000ff" }, + { + "name": "front_thigh", + "parent": "spineboy_hip", + "length": 77.79, + "rotation": 163.34, + "x": 15.51, + "y": 17.01, + "color": "ffffffff" + }, + { + "name": "gun", + "parent": "spineboy_hip", + "length": 181.35, + "rotation": 107.11, + "x": 16.86, + "y": -7.89, + "scaleX": 0.816, + "scaleY": 0.816, + "color": "ffffffff" + }, + { "name": "neck2", "parent": "spineboy_torso", "length": 32.04, "rotation": -45.22, "x": 113.44, "y": -15.21, "color": "ffffffff" }, + { "name": "head2", "parent": "neck2", "length": 249.64, "rotation": 11.65, "x": 23.01, "y": 3.47, "color": "ffffffff" }, + { "name": "horn_rear", "parent": "head", "length": 73.78, "rotation": 44.31, "x": 99.27, "y": -226.79, "color": "e07800ff" }, + { "name": "jaw", "parent": "head", "length": 203.76, "rotation": -140.14, "x": 29.36, "y": -40.15, "color": "ffff00ff" }, + { "name": "lower_leg", "parent": "front_thigh", "length": 111.5, "rotation": -49.62, "x": 77.92, "y": -0.1, "color": "ffffffff" }, + { "name": "rear_arm1", "parent": "torso2", "length": 109.56, "rotation": -124.71, "x": 57.05, "y": -95.38, "color": "e07800ff" }, + { "name": "rear_arm2", "parent": "rear_arm1", "length": 85.8, "rotation": 123.56, "x": 109.56, "color": "e07800ff" }, + { "name": "rear_arm_target", "parent": "horn_rear", "rotation": -133.55, "x": 232.68, "y": 245.84, "color": "e07800ff" }, + { "name": "rear_leg1", "parent": "hip", "length": 226.27, "rotation": -54.76, "x": 55.19, "y": -71.25, "color": "e07800ff" }, + { "name": "rear_leg2", "parent": "rear_leg1", "length": 172.58, "rotation": -92.25, "x": 226.32, "y": 0.23, "color": "e07800ff" }, + { "name": "rear_leg3", "parent": "rear_leg2", "length": 103.05, "rotation": 82.81, "x": 172.31, "y": 2.21, "color": "e07800ff" }, + { "name": "rear_foot1", "parent": "rear_leg3", "length": 84.51, "rotation": 75.43, "x": 102.37, "y": -0.02, "color": "e07800ff" }, + { + "name": "rear_foot2", + "parent": "rear_foot1", + "length": 102.31, + "rotation": -6.13, + "x": 84.49, + "y": -0.34, + "inheritRotation": false, + "color": "e07800ff" + }, + { "name": "rear_foot_goal", "parent": "root", "x": 33.43, "y": 30.81, "color": "ff0000ff" }, + { "name": "rear_hand", "parent": "rear_arm2", "length": 45.8, "rotation": -76.28, "x": 85.8, "y": 0.1, "color": "e07800ff" }, + { "name": "rear_leg_goal", "parent": "rear_foot_goal", "x": -127.51, "y": 75.99, "color": "ff0000ff" }, + { + "name": "saddle_strap_front1", + "parent": "saddle", + "length": 97.27, + "rotation": -148.11, + "x": -27.36, + "y": -73.38, + "color": "ff7300ff" + }, + { + "name": "saddle_strap_front2", + "parent": "saddle_strap_front1", + "length": 102.74, + "rotation": -11.13, + "x": 97.29, + "y": 0.3, + "color": "ff7300ff" + }, + { + "name": "saddle_strap_rear1", + "parent": "saddle", + "length": 38.62, + "rotation": 151.13, + "x": -33.34, + "y": 87.32, + "color": "ff7300ff" + }, + { "name": "saddle_strap_rear2", "parent": "saddle_strap_rear1", "length": 54.36, "x": 38.63, "y": -0.02, "color": "ff7300ff" }, + { + "name": "saddle_strap_rear3", + "parent": "saddle_strap_rear2", + "length": 44.04, + "rotation": 3.63, + "x": 54.86, + "y": 0.19, + "color": "ff7300ff" + }, + { "name": "spineboy_front_arm_goal", "parent": "saddle", "x": -50.7, "y": -96.93, "color": "ff0004ff" }, + { "name": "spineboy_rear_arm_goal", "parent": "saddle", "x": -30.43, "y": -100.08, "color": "ff0001ff" }, + { "name": "stirrup", "parent": "saddle", "length": 78.17, "rotation": -68.85, "x": -81.94, "y": -103.38, "color": "ff7300ff" }, + { "name": "stirrup_strap1", "parent": "saddle", "length": 43.69, "rotation": -135, "x": -20.38, "y": -29.37, "color": "ff7300ff" }, + { "name": "stirrup_strap2", "parent": "stirrup_strap1", "length": 51.62, "rotation": 9.38, "x": 43.7, "color": "ff7300ff" }, + { "name": "tail1", "parent": "hip", "length": 162.53, "rotation": 162.92, "x": -20.86, "y": 6.87, "color": "eaff00ff" }, + { "name": "tail2", "parent": "tail1", "length": 130.02, "rotation": 30.3, "x": 162.53, "y": -0.82, "color": "eaff00ff" }, + { "name": "tail3", "parent": "tail2", "length": 141.06, "rotation": 6.88, "x": 130.02, "y": 0.1, "color": "eaff00ff" }, + { "name": "tail4", "parent": "tail3", "length": 126.25, "rotation": -18.86, "x": 141.05, "y": 0.64, "color": "eaff00ff" }, + { "name": "tail5", "parent": "tail4", "length": 91.06, "rotation": -22.34, "x": 126.25, "y": -0.47, "color": "eaff00ff" }, + { "name": "tongue1", "parent": "head", "length": 55.11, "rotation": -129.04, "x": 20.81, "y": -104.75, "color": "ffff00ff" }, + { "name": "tongue2", "parent": "tongue1", "length": 44.66, "rotation": 8.93, "x": 55.59, "y": 0.93, "color": "fff200ff" }, + { "name": "tongue3", "parent": "tongue2", "length": 43.64, "rotation": 12.86, "x": 44.26, "y": -0.2, "color": "fff200ff" } +], +"slots": [ + { "name": "back_hand", "bone": "back_hand", "attachment": "back_hand" }, + { "name": "back_arm", "bone": "back_arm", "attachment": "back_arm" }, + { "name": "back_bracer", "bone": "back_bracer", "attachment": "back_bracer" }, + { "name": "back_knee", "bone": "back_knee", "attachment": "back_knee" }, + { "name": "raptor_horn_back", "bone": "horn_rear", "attachment": "raptor_horn_back" }, + { "name": "raptor_tongue", "bone": "root", "attachment": "raptor_tongue" }, + { "name": "raptor_hindleg_back", "bone": "rear_leg1", "attachment": "raptor_hindleg_back" }, + { "name": "raptor_arm_back", "bone": "root", "attachment": "raptor_arm_back" }, + { "name": "raptor_body", "bone": "torso1", "attachment": "raptor_body" }, + { "name": "back_thigh", "bone": "back_thigh", "attachment": "back_thigh" }, + { "name": "raptor_saddle_strap_front", "bone": "saddle_strap_front1", "attachment": "raptor_saddle_strap_front" }, + { "name": "raptor_saddle_strap_rear", "bone": "saddle_strap_rear1", "attachment": "raptor_saddle_strap_rear" }, + { "name": "raptor_saddle_w_shadow", "bone": "saddle", "attachment": "raptor_saddle_w_shadow" }, + { "name": "raptor_saddle_noshadow", "bone": "saddle" }, + { "name": "raptor_front_arm", "bone": "root", "attachment": "raptor_front_arm" }, + { "name": "raptor_front_leg", "bone": "front_leg1", "attachment": "raptor_front_leg" }, + { "name": "raptor_jaw", "bone": "jaw", "attachment": "raptor_jaw" }, + { "name": "neck", "bone": "neck2", "attachment": "neck" }, + { "name": "spineboy_torso", "bone": "spineboy_torso", "attachment": "torso" }, + { "name": "head", "bone": "head2", "attachment": "head" }, + { "name": "eyes_open", "bone": "head2", "attachment": "eyes_open" }, + { "name": "mouth_smile", "bone": "head2", "attachment": "mouth_smile" }, + { "name": "visor", "bone": "head2", "attachment": "visor" }, + { "name": "raptor_horn", "bone": "horn_front", "attachment": "raptor_horn" }, + { "name": "front_thigh", "bone": "front_thigh", "attachment": "front_thigh" }, + { "name": "stirrup_back", "bone": "stirrup", "attachment": "stirrup_back" }, + { "name": "lower_leg", "bone": "lower_leg", "attachment": "lower_leg" }, + { "name": "stirrup_strap", "bone": "stirrup", "attachment": "stirrup_strap" }, + { "name": "stirrup_front", "bone": "stirrup", "attachment": "stirrup_front" }, + { "name": "gun", "bone": "gun", "attachment": "gun_nohand" }, + { "name": "front_arm", "bone": "front_arm", "attachment": "front_arm" }, + { "name": "front_bracer", "bone": "front_bracer", "attachment": "front_bracer" }, + { "name": "front_hand", "bone": "front_hand2", "attachment": "front_hand" } +], +"ik": [ + { + "name": "front_arm_goal", + "bones": [ "front_arm", "front_bracer" ], + "target": "front_arm_target" + }, + { + "name": "front_foot_goal", + "bones": [ "front_leg3", "front_foot1" ], + "target": "front_foot_goal" + }, + { + "name": "front_leg_goal", + "bones": [ "front_leg1", "front_leg2" ], + "target": "front_leg_goal", + "bendPositive": false + }, + { + "name": "rear_arm_goal", + "bones": [ "back_arm", "back_bracer" ], + "target": "rear_arm_target" + }, + { + "name": "rear_foot_goal", + "bones": [ "rear_leg3", "rear_foot1" ], + "target": "rear_foot_goal" + }, + { + "name": "rear_leg_goal", + "bones": [ "rear_leg1", "rear_leg2" ], + "target": "rear_leg_goal", + "bendPositive": false + }, + { + "name": "spineboy_front_leg_goal", + "bones": [ "front_thigh", "lower_leg" ], + "target": "spineboy_front_arm_goal", + "bendPositive": false + }, + { + "name": "spineboy_rear_leg_goal", + "bones": [ "back_thigh", "back_knee" ], + "target": "spineboy_rear_arm_goal", + "bendPositive": false + }, + { + "name": "stirrup", + "bones": [ "stirrup_strap1", "stirrup_strap2" ], + "target": "stirrup" + } +], +"skins": { + "default": { + "back_arm": { + "back_arm": { "x": 29.71, "y": 2.04, "rotation": 16.75, "width": 91, "height": 57 } + }, + "back_bracer": { + "back_bracer": { "x": 13.19, "y": -4.28, "rotation": -0.72, "width": 77, "height": 55 } + }, + "back_hand": { + "back_hand": { "x": 18.6, "y": 4.23, "rotation": -10.99, "width": 72, "height": 68 } + }, + "back_knee": { + "back_knee": { "x": 45.77, "y": 20.47, "rotation": 74.22, "width": 97, "height": 134 } + }, + "back_thigh": { + "back_thigh": { "x": 37.85, "y": -4.36, "rotation": 19.24, "width": 78, "height": 47 } + }, + "eyes_open": { + "eyes_open": { "x": 93.23, "y": -25.45, "rotation": -70.57, "width": 93, "height": 89 } + }, + "front_arm": { + "front_arm": { "x": 31.38, "y": 5.09, "rotation": 14.02, "width": 96, "height": 60 } + }, + "front_bracer": { + "front_bracer": { "x": 11.68, "y": -1.36, "rotation": -6.28, "width": 81, "height": 58 } + }, + "front_hand": { + "front_hand": { "x": 35.7, "y": 7.84, "rotation": -13.96, "width": 82, "height": 75 }, + "front_open_hand": { "x": 42.54, "y": 4.62, "rotation": 62.19, "width": 86, "height": 87 }, + "gun": { "x": 98.9, "y": 22.97, "rotation": 56.34, "width": 213, "height": 206 } + }, + "front_thigh": { + "front_thigh": { "x": 45.7, "y": -3.1, "rotation": 16.65, "width": 114, "height": 58 } + }, + "gun": { + "gun_nohand": { + "type": "mesh", + "uvs": [ 0.71081, 0.16149, 0.85807, 0.41784, 1, 0.6649, 1, 1, 0.71457, 1, 0.49802, 0.6905, 0.30182, 0.41009, 0, 0.58226, 0, 0.1174, 0.27187, 0.12429, 0.24857, 0, 0.36658, 0, 0.61804, 0, 0.70575, 0.53546, 0.53668, 0.26855 ], + "triangles": [ 3, 13, 2, 5, 13, 4, 3, 4, 13, 13, 6, 14, 13, 5, 6, 13, 1, 2, 6, 8, 9, 6, 7, 8, 13, 14, 1, 14, 0, 1, 6, 9, 14, 9, 11, 14, 14, 12, 0, 14, 11, 12, 9, 10, 11 ], + "vertices": [ 23.48, 50.63, 83.86, 46.32, 142.05, 42.17, 197.91, 3.34, 163.7, -45.86, 86.15, -47.34, 15.9, -48.68, 8.42, -120.68, -69.06, -66.81, -35.32, -20.73, -58.83, -10.35, -44.69, 9.99, -14.55, 53.35, 85.21, 6.43, 20.45, 8.2 ], + "hull": 13, + "edges": [ 14, 12, 6, 8, 6, 4, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 8, 10, 10, 12, 6, 26, 10, 26, 4, 2, 26, 2, 22, 28, 28, 26, 12, 28, 2, 0, 0, 24, 28, 0, 18, 12 ], + "width": 210, + "height": 203 + } + }, + "head": { + "head": { "x": 132.33, "y": 1.19, "rotation": -70.57, "width": 271, "height": 298 } + }, + "lower_leg": { + "lower_leg": { "x": 76.2, "y": 22.2, "rotation": 66.28, "width": 146, "height": 195 } + }, + "mouth_smile": { + "mouth_smile": { "x": 27.66, "y": -31.33, "rotation": -70.57, "width": 93, "height": 59 } + }, + "neck": { + "neck": { "x": 15.09, "y": -1.66, "rotation": -58.91, "width": 36, "height": 41 } + }, + "raptor_arm_back": { + "raptor_arm_back": { + "type": "mesh", + "uvs": [ 0.38711, 0.29362, 0.31382, 0.46513, 0.29242, 0.51521, 0.32475, 0.4931, 0.57587, 0.32138, 0.63254, 0.28263, 0.71632, 0.34507, 0.94948, 0.51888, 0.94947, 0.60129, 1, 0.65257, 1, 0.90624, 0.95462, 0.99934, 0.88957, 0.83204, 0.80294, 0.99998, 0.75236, 0.75696, 0.6654, 0.713, 0.62288, 0.63242, 0.58194, 0.65031, 0.22478, 0.80641, 0.07791, 0.73315, 0.07825, 0.66549, 0.07984, 0.34306, 0, 0.29728, 0, 0, 0.32334, 0 ], + "triangles": [ 6, 15, 16, 5, 6, 16, 5, 16, 4, 6, 7, 15, 16, 17, 4, 8, 15, 7, 14, 15, 8, 12, 14, 8, 12, 8, 9, 12, 9, 10, 11, 12, 10, 13, 14, 12, 17, 3, 4, 19, 20, 2, 18, 19, 2, 18, 2, 3, 18, 3, 17, 21, 22, 23, 24, 21, 23, 0, 21, 24, 1, 21, 0, 1, 20, 21, 2, 20, 1 ], + "vertices": [ 2, 37, 36.95, 33.31, 0.91666, 38, 68.53, 41.05, 0.08333, 2, 37, 66.01999, 20.35, 0.76813, 38, 41.41, 24.39, 0.23186, 2, 37, 74.51, 16.57, 0.64468, 38, 33.49, 19.53, 0.35531, 2, 37, 70.89, 21.97, 0.29071, 38, 39.99, 19.45999, 0.70928, 3, 37, 42.77, 63.89, 0.11483, 38, 90.47, 18.95, 0.60854, 46, -17.2, 9, 0.2766, 2, 38, 101.86, 18.83, 0.45955, 46, -14.38, 20.04, 0.54044, 2, 38, 106.47, 2.08, 0.0625, 46, 2.98, 20.56, 0.9375, 1, 46, 51.32, 21.98, 1, 1, 46, 60.41, 11.1, 1, 1, 46, 72.39, 9.60999, 1, 1, 46, 100.37, -23.87, 1, 1, 46, 104.96, -40.9, 1, 1, 46, 78.37, -25.61, 1, 1, 46, 86.05, -56.84, 1, 1, 46, 52.92, -30.04, 1, 2, 38, 62.24, -43.92, 0.0625, 46, 37.18999, -33.33, 0.9375, 2, 38, 64.89, -28.65, 0.3125, 46, 22.98, -27.14, 0.6875, 2, 38, 57.69, -27.17, 0.30612, 46, 19.83, -33.78, 0.69387, 2, 37, 124.19, 3.83, 0.19395, 38, -5.09, -14.23, 0.80604, 2, 37, 110.77, -19.65, 0.3125, 38, -16.87999, 10.1, 0.6875, 2, 37, 99.14, -19.2, 0.51612, 38, -9.93, 19.44, 0.48386, 2, 37, 43.73, -17.03, 0.9375, 38, 23.17, 63.92, 0.0625, 1, 37, 35.41, -29.77, 1, 1, 37, -15.68, -28.02, 1, 1, 37, -13.87, 24.65, 1 ], + "hull": 25, + "edges": [ 44, 46, 44, 42, 38, 36, 32, 30, 30, 28, 28, 26, 24, 22, 18, 16, 16, 14, 46, 48, 38, 4, 6, 4, 6, 36, 42, 40, 40, 38, 4, 2, 2, 0, 40, 2, 10, 32, 36, 34, 34, 32, 10, 8, 8, 6, 34, 8, 14, 12, 12, 10, 12, 30, 18, 20, 22, 20, 26, 24, 48, 0 ], + "width": 163, + "height": 172 + } + }, + "raptor_body": { + "raptor_body": { + "type": "mesh", + "uvs": [ 0.89014, 0.11136, 1, 0.22194, 1, 0.42847, 0.88179, 0.38589, 0.874, 0.47986, 0.84783, 0.51728, 0.82504, 0.54984, 0.82403, 0.61606, 0.82305, 0.67972, 0.74042, 0.86709, 0.61596, 0.93097, 0.49649, 0.90968, 0.41186, 0.71379, 0.36955, 0.70086, 0.32823, 0.68824, 0.30082, 0.69962, 0.27515, 0.71028, 0.25301, 0.71948, 0.22568, 0.73082, 0.20832, 0.72362, 0.19092, 0.7164, 0.15952, 0.70337, 0.1301, 0.69116, 0.09227, 0.67546, 0.06029, 0.63165, 0.02855, 0.58817, 0, 0.49874, 0.05045, 0.53494, 0.08267, 0.54507, 0.11815, 0.55623, 0.14733, 0.54161, 0.17913, 0.52568, 0.20324, 0.5136, 0.22867, 0.50087, 0.24871, 0.47664, 0.27523, 0.44458, 0.32026, 0.39015, 0.37517, 0.35747, 0.43476, 0.32201, 0.4893, 0.35534, 0.56021, 0.39867, 0.61587, 0.40674, 0.67769, 0.4157, 0.69094, 0.31314, 0.69362, 0.14742, 0.79219, 0.08354, 0.51541, 0.74573, 0.62393, 0.75425, 0.70856, 0.7287, 0.76132, 0.63288, 0.7566, 0.49454, 0.80613, 0.27517, 0.65885, 0.59037, 0.53929, 0.54937, 0.42632, 0.52207, 0.3246, 0.55241, 0.22715, 0.618, 0.10574, 0.61341, 0.03969, 0.56109, 0.77916, 0.39461, 0.37556, 0.53721, 0.27743, 0.58416, 0.16958, 0.61582, 0.07259, 0.58715, 0.87545, 0.31683, 0.85488, 0.21417, 0.81012, 0.17403, 0.83214, 0.25662, 0.83823, 0.32214, 0.84622, 0.41719, 0.59954, 0.57003, 0.49074, 0.53763, 0.76917, 0.43888, 0.75912, 0.56845, 0.871, 0.3701, 0.85431, 0.43545, 0.89558, 0.32412, 0.90105, 0.22877, 0.91523, 0.20564, 0.93086, 0.219, 0.93446, 0.25858, 0.91956, 0.2776, 0.9061, 0.26423, 0.9415, 0.25929, 0.93589, 0.21545, 0.91669, 0.19192, 0.89297, 0.22201, 0.90245, 0.28513, 0.92006, 0.281, 0.92143, 0.29619, 0.94856, 0.2643, 0.19894, 0.61694, 0.13973, 0.61469, 0.25158, 0.60156, 0.88779, 0.26675 ], + "triangles": [ 13, 60, 12, 12, 71, 46, 46, 70, 47, 11, 12, 46, 47, 11, 46, 10, 11, 47, 13, 14, 55, 15, 93, 14, 16, 56, 15, 58, 26, 27, 28, 58, 27, 63, 28, 29, 63, 58, 28, 25, 26, 58, 25, 58, 63, 57, 63, 29, 92, 29, 30, 57, 29, 92, 24, 25, 63, 24, 63, 57, 23, 24, 57, 92, 23, 57, 22, 23, 92, 62, 22, 92, 21, 22, 62, 20, 21, 91, 92, 30, 62, 91, 21, 62, 62, 30, 31, 91, 62, 31, 31, 32, 93, 20, 91, 56, 56, 19, 20, 17, 19, 56, 18, 19, 17, 93, 91, 31, 55, 34, 35, 33, 34, 55, 61, 33, 55, 61, 32, 33, 93, 32, 61, 56, 91, 93, 56, 93, 15, 16, 17, 56, 36, 37, 54, 60, 35, 36, 54, 60, 36, 60, 55, 35, 61, 55, 14, 93, 61, 14, 60, 13, 55, 12, 60, 54, 39, 54, 37, 39, 37, 38, 71, 54, 39, 40, 71, 39, 53, 71, 40, 53, 40, 41, 12, 54, 71, 46, 71, 53, 66, 45, 0, 44, 45, 66, 1, 84, 85, 65, 66, 0, 0, 85, 65, 85, 86, 65, 85, 0, 1, 78, 85, 84, 79, 78, 84, 78, 86, 85, 77, 86, 78, 77, 78, 79, 67, 66, 65, 83, 80, 79, 84, 83, 79, 77, 79, 80, 84, 90, 83, 82, 77, 80, 1, 90, 84, 94, 65, 86, 94, 86, 77, 94, 77, 82, 67, 65, 94, 51, 44, 66, 51, 66, 67, 81, 82, 80, 83, 88, 81, 87, 94, 82, 87, 82, 81, 87, 81, 88, 88, 90, 89, 87, 88, 89, 80, 83, 81, 90, 88, 83, 43, 44, 51, 64, 67, 94, 64, 94, 87, 68, 67, 64, 51, 67, 68, 76, 64, 87, 76, 87, 89, 74, 68, 64, 74, 64, 76, 3, 74, 76, 59, 43, 51, 59, 51, 68, 69, 59, 68, 74, 69, 68, 69, 74, 3, 90, 1, 2, 89, 90, 2, 76, 89, 2, 3, 76, 2, 75, 69, 3, 4, 75, 3, 75, 72, 69, 5, 75, 4, 5, 72, 75, 72, 59, 69, 59, 42, 43, 72, 42, 59, 50, 42, 72, 50, 72, 5, 6, 50, 5, 73, 50, 6, 52, 70, 42, 50, 52, 42, 73, 52, 50, 7, 73, 6, 49, 73, 7, 52, 73, 49, 8, 49, 7, 48, 52, 49, 48, 49, 8, 47, 52, 48, 70, 53, 41, 70, 41, 42, 46, 53, 70, 47, 70, 52, 9, 48, 8, 47, 48, 9, 10, 47, 9 ], + "vertices": [ 1, 16, 147.48, -145.48, 1, 1, 16, 89.4, -281.62, 1, 1, 16, -28.24, -285.93, 1, 1, 16, -14.58, -194.68, 1, 4, 12, 238.39, -84.13, 0.20851, 15, 32.09999, -140.85, 0.19336, 16, -61.96, -132.26, 0.42115, 35, 129.57, 6.39, 0.17696, 5, 2, 332.7, 63.71, 0.06905, 12, 199.57, -83.03, 0.29424, 15, 3.69, -114.37, 0.2194, 16, -85.43, -101.32, 0.30859, 35, 127.34, -26.64, 0.1087, 5, 2, 307.08, 43.5, 0.11018, 12, 166.95, -82.12999, 0.37282, 15, -20.18, -92.14, 0.24572, 16, -105.18, -75.33999, 0.21862, 35, 123.08, -64.79, 0.05264, 4, 2, 307.75, 5.7, 0.18627, 12, 143.25, -111.59, 0.58009, 15, -57.43, -98.57, 0.12363, 16, -142.98, -75.33, 0.10999, 2, 2, 308.7, -30.55, 0.25, 12, 120.75, -140.04, 0.75, 2, 2, 213.94, -142.7, 0.75, 12, -23.83, -165.45, 0.25, 3, 2, 64.44999, -187.34, 0.31139, 58, -158.45, 158.33, 0.10379, 1, 84.16, -190.98, 0.5848, 1, 1, -61.47, -178.84, 1, 4, 58, 118.47, 114.74, 0.07383, 59, 17.17, 122.49, 0.17504, 60, -100.71, 132.55, 0.06818, 1, -166.91, -67.94999, 0.68294, 4, 58, 170.4, 123.13, 0.06537, 59, 66.71, 104.77, 0.20999, 60, -53.08, 110.21, 0.12016, 1, -217.69, -61.33, 0.60447, 6, 58, 221.11, 131.31, 0.02179, 59, 115.07, 87.47, 0.23058, 60, -6.58, 88.39, 0.16258, 61, -168.92, 31, 0.02826, 62, -282.82, -90.19, 0.029, 1, -267.66, -55.14, 0.52776, 5, 59, 146.51, 86.08, 0.23635, 60, 26.66, 83.39, 0.19338, 61, -134.99, 41.34, 0.06624, 62, -257.52, -60.65, 0.06962, 1, -298.87, -61.99, 0.43436, 5, 59, 178.73, 86.41, 0.22521, 60, 56.68, 81.29, 0.20997, 61, -107.13, 46.31, 0.11271, 62, -232.44, -51.26, 0.12148, 1, -328.68, -69.24, 0.3306, 5, 59, 203.26, 86.51, 0.21603, 60, 83.06, 77.01999, 0.22457, 61, -79.56, 53.53, 0.13939, 62, -210.89, -28.3, 0.15618, 1, -354.01, -75.41, 0.26379, 5, 59, 238.06, 85.41, 0.20114, 60, 115.65, 74.66, 0.2315, 61, -49.53, 60.58, 0.16455, 62, -185.49, -14.98, 0.19123, 1, -385.33, -83.15, 0.21156, 5, 59, 255.33, 78.85, 0.18224, 60, 133.83, 63.18, 0.23194, 61, -27.04, 56.84, 0.18907, 62, -163.58, -5.26, 0.22658, 1, -406.45, -79.89, 0.17015, 5, 59, 275.48, 71.62, 0.16169, 60, 152.97, 53.58, 0.22885, 61, -5.82, 53.94, 0.21292, 62, -142.85, 0.11, 0.26159, 1, -427.72, -77.47, 0.13493, 5, 59, 313.81, 53.61, 0.14198, 60, 188.04, 35.82, 0.22293, 61, 31.84, 49.3, 0.23478, 62, -106.46, 7.49, 0.29326, 1, -465.96, -72.58999, 0.10702, 5, 59, 345.74, 45.54, 0.12502, 60, 219.6, 19.28, 0.2179, 61, 68.31, 43.02, 0.25622, 62, -70.12999, 18.19, 0.32248, 1, -502.09, -68.19, 0.07835, 4, 59, 390.81, 21.3, 0.11758, 60, 261.62, -3.66, 0.22607, 61, 114.55, 37.83, 0.29087, 62, -26.15, 30.34, 0.36547, 4, 59, 423.87, -11.11, 0.10536, 60, 291.46, -39.06, 0.21954, 61, 154.83, 14.99, 0.30098, 62, 19.91, 25.67, 0.37409, 4, 59, 456.68, -43.27, 0.09949, 60, 321.06, -74.19999, 0.21749, 61, 194.79, -7.66, 0.30788, 62, 65.62, 21.04, 0.37513, 4, 59, 480.34, -100.28, 0.10045, 60, 339.2, -133.2, 0.22026, 61, 232.3, -56.69, 0.31103, 62, 119.7, -8.68999, 0.36824, 4, 59, 424.34, -67.51999, 0.10379, 60, 286.57, -95.27, 0.23087, 61, 169.77, -39.4, 0.30828, 62, 55.51, -18.08, 0.35705, 4, 59, 387.08, -53.84, 0.11505, 60, 250.77, -78.11, 0.2454, 61, 130.24, -35.75, 0.30092, 62, 17.87, -30.67, 0.3386, 4, 59, 346.04, -38.78, 0.13471, 60, 211.34, -59.22, 0.26271, 61, 86.7, -31.72, 0.2888, 62, -23.59, -44.54, 0.31376, 5, 58, 449.17, 125.97, 0.02419, 59, 311.45, -35.25, 0.16384, 60, 175.89, -56.83, 0.2727, 61, 51.53, -43.14, 0.26317, 62, -52.88, -67.87, 0.27607, 5, 58, 418.38, 93.72, 0.05913, 59, 269.72, -40.64, 0.19681, 60, 135.19, -53.82, 0.27688, 61, 13.42, -53.11, 0.23219, 62, -82.03, -93.66, 0.23497, 5, 58, 390.82, 86.58, 0.10638, 59, 241.19, -39.8, 0.2354, 60, 105.59, -52.93, 0.27331, 61, -16.25, -62.16, 0.19459, 62, -108.34, -111.24, 0.19028, 5, 58, 364.8, 62.48, 0.14347, 59, 207.71, -42.14, 0.28099, 60, 73.33, -49.43, 0.26867, 61, -46.11, -70.49, 0.15764, 62, -129.51, -133.56, 0.1492, 5, 58, 345.49, 47.53, 0.18499, 59, 182.34, -50.62, 0.33114, 60, 45.87, -56.62, 0.25881, 61, -71.57, -84.96, 0.1174, 62, -150.85, -153.35, 0.10763, 5, 58, 319.95, 15.15, 0.23755, 59, 145.6, -61.95, 0.39396, 60, 9.60999, -63.26, 0.24619, 61, -101.06, -105.58, 0.06443, 62, -165.65, -187.83, 0.05784, 3, 58, 276.58, -30.61, 0.29942, 59, 85.52, -81.11, 0.46774, 60, -52.01, -76.62, 0.23283, 3, 58, 214.5, -70.36, 0.32855, 59, 11.97, -85.98, 0.48601, 60, -125.69, -74.48, 0.18543, 2, 58, 147.14, -113.5, 0.59565, 59, -67.83999, -91.26, 0.40433, 2, 2, -113.14, 135.84, 0.24192, 58, 91.72, -112.59, 0.75807, 2, 2, -42.12, 116.77, 0.14515, 58, 18.2, -111.17, 0.85484, 1, 2, 44.2, 107.1, 1, 2, 2, 140.09, 96.35, 0.22579, 12, 72.58999, 65.41, 0.7742, 4, 2, 137.69, 169.35, 0.05644, 12, 117.5, 123, 0.24355, 15, 78.3, 94.48, 0.2125, 16, 23.7, 91.74, 0.4875, 2, 15, 171.15, 111.98, 0.25, 16, 118.17, 93.15, 0.75, 1, 16, 158.96, -25.58, 1, 1, 1, -40.63, -86.01, 1, 3, 2, 67.33999, -86.66, 0.33215, 58, -137.02, 59.92, 0.08303, 1, 92.54, -90.61, 0.5848, 2, 2, 170.13, -66.29, 0.75, 12, -8.53, -78.72, 0.25, 2, 2, 231.74, -8.12, 0.4, 12, 76.03, -73.51999, 0.6, 4, 2, 222.04, 70.41, 0.17551, 12, 118.9, -7, 0.55823, 15, -6.58, -3.99, 0.17739, 16, -76.73, 9.18, 0.08884, 1, 16, 50.43, -46.56, 1, 1, 12, -9.88, 20.65, 1, 2, 2, -53.22, 20.53, 0.2, 58, 5.8, -15.09, 0.8, 3, 2, -180.71, 32.22, 0.08564, 58, 132.35, 4.23999, 0.56215, 59, -23.98, 19.01, 0.35219, 3, 58, 246.39, 57.53, 0.30273, 59, 101.61, 10.65, 0.46989, 60, -27.28, 13.2, 0.22737, 5, 58, 346.99, 126.85, 0.13479, 59, 223.17, 22.83, 0.28279, 60, 94.88, 13.77, 0.24481, 61, -47.85, -3.72, 0.17322, 62, -158.02, -73.16, 0.16438, 4, 59, 367.51, -9.96, 0.14656, 60, 235.45, -32.57, 0.23073, 61, 100.06, 1.62, 0.29607, 62, -24.81, -8.63, 0.32661, 4, 59, 440.24, -55.6, 0.10821, 60, 303.52, -84.91, 0.21897, 61, 182.07, -23.8, 0.31097, 62, 60.48, 1.14, 0.36182, 3, 12, 174.99, 22.22, 0.2, 15, 54.82, -19.14, 0.6, 16, -18.79999, -16.2, 0.2, 3, 58, 189.25, 30.83, 0.33253, 59, 38.68, 14.84, 0.48076, 60, -89.52, 23.34, 0.18669, 5, 58, 295.08, 91.08, 0.22891, 59, 160.45, 16.54, 0.38754, 60, 31.85, 13.48, 0.2306, 61, -106.86, -25.89, 0.08042, 62, -203.08, -117.24, 0.0725, 5, 58, 414.43, 146.25, 0.07359, 59, 291.61, 7.27, 0.20198, 60, 161.53, -8.2, 0.23762, 61, 22.27, -1.17999, 0.24024, 62, -94.86, -42.56, 0.24654, 4, 59, 404.01, -32.87, 0.12351, 60, 269.61, -58.84, 0.22261, 61, 141.21, -11.13, 0.30609, 62, 17.98, -3.72, 0.34777, 1, 16, 26.4, -166.06, 1, 1, 16, 87.21, -106.12, 1, 1, 16, 108.19, -49.62, 1, 2, 16, 61.73, -82.12999, 0.50021, 35, 4.42, 52.83, 0.49978, 2, 16, 22.84, -109.4, 0.50021, 35, 51.52, 46.73, 0.49978, 4, 12, 247.12, -50.52, 0.06545, 15, 60.86, -121.4, 0.06069, 16, -30.3, -118, 0.49079, 35, 96.58, 17.21999, 0.38305, 1, 2, 26.73, 14.8, 1, 2, 2, -107.97, 25.67, 0.24192, 58, 60.17, -6.91, 0.75807, 4, 2, 235.53, 102.96, 0.0761, 12, 150.1, 9.35, 0.35533, 15, 27.64, -12.34, 0.41675, 16, -44.43, -4.87, 0.1518, 3, 2, 227.15, 28.49, 0.31015, 12, 95.96, -42.46, 0.60548, 15, -47.23, -15.44, 0.08435, 2, 16, 5.19, -153.1, 0.87618, 35, 90.96, 71.21, 0.12381, 4, 12, 243.13, -60.59, 0.10669, 15, 51.21, -126.33, 0.09893, 16, -40.65, -121.21, 0.47072, 35, 105.71, 17.33, 0.32363, 1, 16, 23.69, -185.21, 1, 1, 16, 79.64, -175.94, 1, 1, 16, 93.96, -187.56, 1, 1, 16, 87.07, -206.55, 1, 1, 16, 64.19999, -216.74, 1, 1, 16, 52.23, -203.68, 1, 1, 16, 59.24, -187.03, 1, 1, 16, 64.26, -223.8, 1, 1, 16, 89.44, -211.41, 1, 1, 16, 102.04, -186.95, 1, 1, 16, 83.1, -166.14, 1, 1, 16, 46.84, -186.41, 1, 1, 16, 50.32, -204.36, 1, 1, 16, 41.7, -206.59, 1, 1, 16, 61.87, -230.97, 1, 5, 58, 374.97, 143.6, 0.10291, 59, 256.29, 17.42, 0.23985, 60, 127.43, 2.07, 0.2431, 61, -13.35, -3.05, 0.20854, 62, -128.14, -55.46, 0.20557, 4, 59, 327.21, 4.42, 0.17789, 60, 196.28, -19.32, 0.24248, 61, 58.71, -1.04999, 0.28055, 62, -62.24, -26.21, 0.29905, 5, 58, 318.32, 113.62, 0.17774, 59, 192.26, 20.14, 0.33383, 60, 64.19, 12.44, 0.24171, 61, -76.55, -13.67, 0.12849, 62, -182.56, -89.31, 0.11821, 2, 16, 56.98, -162.99, 0.89259, 35, 57.54, 112, 0.1074 ], + "hull": 46, + "edges": [ 22, 20, 20, 18, 18, 16, 6, 4, 4, 2, 90, 88, 54, 52, 52, 50, 24, 22, 88, 86, 86, 84, 8, 6, 24, 26, 26, 28, 72, 74, 74, 76, 70, 72, 46, 48, 48, 50, 54, 56, 56, 58, 80, 82, 82, 84, 76, 78, 78, 80, 8, 10, 10, 12, 12, 14, 14, 16, 0, 90, 0, 2, 62, 64, 64, 66, 40, 42, 58, 60, 60, 62, 42, 44, 44, 46, 66, 68, 68, 70, 32, 34, 34, 36, 52, 116, 116, 126, 126, 114, 114, 184, 184, 124, 124, 182, 182, 112, 112, 186, 186, 122, 122, 110, 110, 120, 120, 108, 108, 142, 142, 106, 106, 140, 140, 104, 92, 94, 94, 96, 96, 98, 98, 146, 146, 100, 100, 144, 144, 118, 118, 102, 8, 150, 150, 138, 138, 136, 136, 134, 134, 132, 156, 154, 154, 164, 164, 162, 162, 160, 160, 158, 158, 156, 180, 178, 178, 174, 174, 188, 188, 172, 170, 168, 28, 30, 30, 32, 36, 38, 38, 40 ], + "width": 1219, + "height": 570 + } + }, + "raptor_front_arm": { + "raptor_front_arm": { + "type": "mesh", + "uvs": [ 0.39562, 0.1396, 0.3877, 0.30212, 0.3123, 0.41784, 0.27287, 0.47835, 0.33388, 0.4507, 0.54879, 0.35328, 0.64092, 0.31152, 0.73024, 0.36529, 1, 0.5277, 1, 0.86606, 0.93242, 1, 0.86176, 0.80967, 0.75576, 0.99765, 0.71748, 1, 0.70276, 0.77442, 0.62031, 0.73448, 0.58792, 0.64519, 0.53561, 0.6582, 0.13448, 0.75798, 0, 0.69218, 0.01846, 0.56357, 0.05498, 0.30917, 0, 0.27863, 0, 0.12423, 0, 0, 0.19596, 0, 0.40242, 0, 0.24536, 0.1924, 0.21678, 0.0811 ], + "triangles": [ 0, 28, 26, 23, 25, 28, 28, 25, 26, 23, 24, 25, 6, 7, 16, 6, 16, 5, 15, 16, 7, 7, 14, 15, 8, 14, 7, 11, 14, 8, 11, 8, 9, 12, 14, 11, 13, 14, 12, 10, 11, 9, 17, 4, 5, 16, 17, 5, 18, 19, 3, 18, 3, 4, 18, 4, 17, 27, 28, 0, 27, 22, 23, 27, 23, 28, 1, 27, 0, 21, 22, 27, 21, 27, 1, 2, 21, 1, 2, 20, 21, 3, 20, 2, 19, 20, 3 ], + "vertices": [ 2, 13, 3.06, 31.88, 0.51075, 12, 66.56, -109.48, 0.48924, 1, 13, 35.87, 35.62, 1, 2, 13, 60.94, 27.12, 0.8464, 14, 46.49, 31.12, 0.15358, 2, 13, 74.05, 22.67, 0.3492, 14, 36.5, 21.53, 0.65078, 3, 13, 67, 31.58, 0.10937, 14, 47.66, 23.68, 0.78125, 27, -40.93, -19.44, 0.10937, 2, 14, 86.98, 31.24, 0.65078, 27, -25.75, 17.61, 0.3492, 2, 14, 103.83, 34.49, 0.34375, 27, -19.24, 33.49, 0.65625, 2, 14, 114.04, 19.51, 0.10937, 27, -1.11, 33.84, 0.89062, 1, 27, 53.62, 34.88, 1, 1, 27, 96.03, -19.16, 1, 1, 27, 104.2, -47.31, 1, 1, 27, 71.33999, -23.98, 1, 1, 27, 81.39, -64.61, 1, 1, 27, 76.8, -68.81, 1, 1, 27, 46.65, -34.25, 1, 2, 14, 73.12999, -45.76, 0.10937, 27, 31.14, -36.12, 0.89062, 2, 14, 73.98, -26.9, 0.34375, 27, 15.82, -25.09, 0.65625, 2, 14, 65.1, -26.69, 0.65078, 27, 10.78, -32.41, 0.3492, 3, 13, 133.56, 9.13, 0.10937, 14, -2.94, -25.03, 0.78125, 27, -27.84, -88.47, 0.10937, 2, 13, 123.67, -14.42, 0.3492, 14, -19.29, -5.39, 0.65078, 2, 13, 97.41, -15.43, 0.8464, 14, -8.08, 18.37, 0.15358, 1, 13, 45.46, -17.43, 1, 2, 13, 40.68999, -27.17, 0.45035, 12, -1.69, -93.8, 0.54964, 2, 13, -2.74, -29.63, 0.44352, 12, 18.99, -72.93, 0.55646, 1, 12, 32.11, -48.45, 1, 1, 12, 57.56, -67.43, 1, 1, 12, 84.38, -87.42, 1, 2, 13, 16.44, 5.21, 0.7182, 12, 46.31, -101.86, 0.28178, 2, 13, -4.51, 5.32, 0.48851, 12, 52.82, -81.94, 0.51147 ], + "hull": 27, + "edges": [ 38, 36, 32, 30, 30, 28, 28, 26, 24, 26, 24, 22, 22, 20, 20, 18, 18, 16, 44, 42, 38, 6, 38, 40, 40, 42, 6, 4, 4, 2, 40, 4, 8, 6, 36, 8, 32, 12, 42, 2, 52, 0, 0, 2, 16, 14, 14, 12, 30, 14, 36, 34, 34, 32, 12, 10, 10, 8, 34, 10, 48, 50, 50, 52, 44, 46, 46, 48, 50, 56, 56, 54 ], + "width": 162, + "height": 203 + } + }, + "raptor_front_leg": { + "raptor_front_leg": { + "type": "mesh", + "uvs": [ 0.55116, 0.17817, 0.6279, 0.36027, 0.6671, 0.4533, 0.64879, 0.51527, 0.53553, 0.56893, 0.32335, 0.66946, 0.28674, 0.72086, 0.32538, 0.804, 0.36258, 0.80144, 0.42056, 0.79744, 0.61015, 0.78435, 0.84813, 0.84028, 1, 0.93854, 0.62439, 0.91738, 0.72812, 1, 0.58574, 1, 0.36707, 0.96667, 0.26306, 0.95082, 0.16266, 0.93552, 0.03859, 0.72237, 0, 0.66946, 0.0374, 0.62999, 0.1647, 0.49562, 0.23731, 0.4568, 0.27019, 0.43923, 0.28063, 0.43364, 0.223, 0.4057, 0.12565, 0.35851, 0, 0.29759, 0, 0.1524, 0, 0, 0.32132, 0, 0.32222, 0.22778, 0.4493, 0.38031, 0.47664, 0.44361, 0.4615, 0.47375, 0.35106, 0.53247, 0.20091, 0.65256, 0.18527, 0.72148, 0.25222, 0.86314, 0.30941, 0.88124, 0.55694, 0.89613, 0.55857, 0.89207, 0.47493, 0.85339, 0.6059, 0.91526, 0.39705, 0.89129, 0.13229, 0.09352, 0.36997, 0.45345, 0.37163, 0.43827, 0.32515, 0.39424, 0.23759, 0.34425, 0.34065, 0.47414 ], + "triangles": [ 46, 30, 31, 41, 42, 44, 43, 9, 10, 42, 43, 10, 41, 43, 42, 10, 13, 42, 11, 13, 10, 13, 11, 12, 13, 44, 42, 14, 15, 13, 45, 8, 9, 45, 40, 8, 16, 40, 45, 17, 40, 16, 16, 45, 15, 15, 45, 44, 45, 41, 44, 15, 44, 13, 45, 9, 43, 45, 43, 41, 19, 21, 38, 20, 21, 19, 39, 38, 6, 39, 6, 7, 40, 39, 7, 40, 7, 8, 18, 19, 38, 18, 38, 39, 17, 39, 40, 18, 39, 17, 47, 25, 48, 24, 25, 47, 35, 48, 34, 47, 48, 35, 51, 24, 47, 23, 24, 51, 3, 34, 2, 35, 34, 3, 36, 51, 47, 36, 47, 35, 4, 35, 3, 36, 35, 4, 37, 22, 23, 21, 22, 37, 36, 37, 23, 36, 23, 51, 5, 37, 36, 5, 36, 4, 6, 37, 5, 38, 21, 37, 38, 37, 6, 29, 30, 46, 32, 31, 0, 46, 31, 32, 28, 29, 46, 46, 27, 28, 32, 50, 46, 50, 27, 46, 33, 32, 0, 33, 0, 1, 49, 50, 32, 33, 49, 32, 26, 27, 50, 26, 50, 49, 25, 26, 49, 48, 49, 33, 25, 49, 48, 34, 33, 1, 48, 33, 34, 34, 1, 2 ], + "vertices": [ 2, 20, 128.03, 88.47, 0.8504, 1, 158.83, -71.91, 0.14959, 2, 20, 219.55, 53.15, 0.77988, 21, -48.04, -38.58, 0.22011, 2, 20, 266.3, 35.09999, 0.53544, 21, -36.73, 10.22, 0.46455, 2, 20, 286.89, 9.79, 0.35166, 21, -14.56, 34.14, 0.64832, 2, 20, 281.54, -41.24, 0.09228, 21, 36.71, 36, 0.90771, 3, 20, 271.53, -136.86, 0.05786, 21, 132.77, 39.48, 0.71425, 22, 34.99, 78.76, 0.22787, 3, 21, 158.21, 55.17, 0.5308, 22, 52.65, 54.63, 0.38143, 23, 7.01, 85.54, 0.08776, 5, 21, 167.14, 99.49, 0.21498, 22, 97.55, 49.25, 0.35357, 23, 28.72, 45.87, 0.14219, 24, -21.26, 49.99, 0.22491, 25, -72.29, 25.96, 0.06431, 5, 21, 154.22, 105.55, 0.07537, 22, 102.57, 62.6, 0.23051, 23, 42.51, 49.55, 0.28379, 24, -7.06, 51.39, 0.27004, 25, -58.17, 28.03, 0.14026, 4, 22, 109.72, 83.39, 0.11607, 23, 64.08999, 55.23, 0.08123, 24, 15.12, 53.51, 0.36961, 25, -36.09, 31.19, 0.43307, 1, 25, 35.8, 41.81, 1, 1, 25, 128.11, 17.93, 1, 1, 25, 188.72, -29.42, 1, 2, 24, 93.29, -7.6, 0.47999, 25, 44.86, -26.17, 0.52, 2, 24, 133.17, -49.83, 0.776, 25, 86.69, -66.47, 0.22399, 2, 24, 78.78, -50.15, 0.76799, 25, 32.38, -69.36, 0.232, 1, 24, -4.91, -33.55, 1, 3, 22, 155.04, -5.13, 0.35917, 23, 17.87999, -32.5, 0.30632, 24, -44.62, -25.61, 0.33449, 4, 21, 254.98, 126.27, 0.10154, 22, 131.21, -36.2, 0.54211, 23, -21.24, -31.17, 0.20873, 24, -83.01999, -17.96999, 0.1476, 3, 21, 240.33, 7.81, 0.25586, 22, 11.94, -30.98, 0.61614, 23, -86.31, 68.9, 0.12797, 2, 21, 239.26, -23.1, 0.45486, 22, -18.95999, -32.37, 0.54513, 3, 20, 187.65, -209.73, 0.09777, 21, 216.66, -33.34999, 0.58892, 22, -30.97, -10.65, 0.3133, 2, 20, 163.85, -128.67, 0.19603, 21, 139.75, -68.26, 0.80396, 2, 20, 165.74, -94.49, 0.31962, 21, 105.59, -71.26, 0.68037, 2, 20, 166.39, -79.07, 0.46225, 21, 90.23, -72.76, 0.53774, 2, 20, 166.49, -74.17, 0.53785, 21, 85.42, -73.28, 0.46213, 2, 20, 141.54, -82.46, 0.73138, 21, 97.13, -96.82, 0.26861, 2, 20, 99.76, -97.08, 0.85324, 21, 117.34, -136.23, 0.14675, 2, 20, 45.01, -114.56, 0.83615, 1, -51.09, -135.29, 0.16384, 2, 20, -16.2, -74.76, 0.62989, 1, -42.95, -58.38, 0.3701, 2, 20, -74.73, -19.33, 0.31468, 1, -52.66, 17.54999, 0.68531, 2, 20, 1.67, 76.75, 0.25576, 1, 70.07, 18.78, 0.74423, 1, 20, 93.54, 4.13, 1, 2, 20, 185.14, -6.66, 0.75461, 21, 15.98, -64.26999, 0.24538, 2, 20, 217.11, -18.75, 0.50844, 21, 23.47, -30.93, 0.49154, 2, 20, 225.63, -32.91999, 0.32527, 21, 36.3, -20.5, 0.67472, 2, 20, 223, -84.73, 0.20192, 21, 87.96, -15.86, 0.79807, 3, 20, 235.61, -168.06, 0.0809, 21, 168.69, 8.29, 0.57147, 22, 6.74, 40.47, 0.34761, 3, 21, 191.79, 35.8, 0.32545, 22, 36, 19.62, 0.57243, 23, -31.14, 78.74, 0.10211, 4, 21, 206.64, 111.53, 0.10808, 22, 112.69, 10.82, 0.52067, 23, 6.25, 11.23, 0.23517, 24, -49.03, 19.43, 0.13606, 3, 22, 130.6, 26.41, 0.35067, 23, 29.35, 5.71, 0.28241, 24, -27.12, 10.25, 0.3669, 2, 24, 67.46, 3.16, 0.384, 25, 18.54999, -16.62999, 0.61599, 1, 25, 19.07, -14.51, 1, 2, 24, 36, 24.95, 0.384, 25, -13.89, 3.64, 0.61599, 2, 24, 86.23, -6.55, 0.48799, 25, 37.75, -25.46, 0.512, 4, 21, 164.9, 153.55, 0.02263, 22, 151.18, 56, 0.23908, 23, 65.44, 5.55, 0.19254, 24, 8.45, 4.27, 0.54574, 2, 20, -9.28, -17.5, 0.59605, 1, 7.72, -30.85, 0.40393, 2, 20, 195.9, -53.81, 0.42368, 21, 61.11, -47.06, 0.5763, 2, 20, 190.1, -48.45, 0.53231, 21, 56.61, -53.56, 0.46768, 2, 20, 161.26, -48.26, 0.79873, 21, 60.44, -82.12999, 0.20126, 2, 20, 120.37, -58.54, 0.85455, 21, 76.31, -121.18, 0.14544, 2, 20, 197.37, -69.23, 0.3355, 21, 76.17, -43.46, 0.66449 ], + "hull": 32, + "edges": [ 40, 38, 38, 36, 28, 30, 28, 26, 26, 24, 24, 22, 22, 20, 14, 12, 12, 10, 6, 4, 60, 62, 0, 62, 40, 42, 42, 44, 34, 36, 16, 14, 52, 50, 4, 2, 2, 0, 10, 8, 8, 6, 72, 74, 74, 76, 76, 78, 78, 80, 80, 90, 90, 88, 16, 18, 18, 20, 30, 32, 32, 34, 56, 58, 58, 60, 94, 96, 96, 98, 52, 54, 54, 56, 100, 98, 48, 50, 44, 46, 46, 48, 102, 94, 72, 70, 70, 68, 66, 68, 66, 64, 64, 92, 86, 84, 50, 96, 94, 48, 46, 102, 52, 98, 54, 100, 70, 6, 68, 4, 66, 2, 72, 8, 86, 20, 86, 82, 82, 88, 84, 26, 88, 26 ], + "width": 382, + "height": 514 + } + }, + "raptor_hindleg_back": { + "raptor_hindleg_back": { + "type": "mesh", + "uvs": [ 0.45041, 0.09352, 0.56933, 0.23361, 0.65294, 0.47296, 0.66353, 0.50822, 0.63174, 0.54254, 0.32383, 0.69723, 0.30068, 0.73875, 0.27934, 0.77704, 0.30417, 0.83513, 0.31058, 0.85014, 0.341, 0.85046, 0.45165, 0.85163, 0.59555, 0.81881, 0.91176, 0.92548, 1, 1, 0.56336, 0.96426, 0.48349, 0.9826, 0.29878, 0.98027, 0.22808, 0.98389, 0.15997, 0.98737, 0.15423, 0.95546, 0.13894, 0.87047, 0.07371, 0.78726, 0, 0.75299, 0, 0.7049, 0, 0.671, 0.11875, 0.64652, 0.16535, 0.52659, 0.28495, 0.47397, 0.2901, 0.45773, 0.29427, 0.4446, 0.20635, 0.40396, 0.06128, 0.33691, 0, 0.25247, 0, 0, 0.30793, 0, 0.27599, 0.20261, 0.40397, 0.31121, 0.48439, 0.45963, 0.48317, 0.48383, 0.47029, 0.51062, 0.22698, 0.67328, 0.17141, 0.7242, 0.17122, 0.78241, 0.22995, 0.89469, 0.24677, 0.90829, 0.28672, 0.9146, 0.46582, 0.91414 ], + "triangles": [ 15, 13, 14, 16, 47, 15, 15, 12, 13, 15, 47, 12, 18, 46, 17, 18, 45, 46, 17, 47, 16, 17, 46, 47, 47, 10, 11, 47, 46, 10, 47, 11, 12, 45, 18, 19, 44, 45, 20, 20, 45, 19, 20, 21, 44, 46, 9, 10, 46, 45, 9, 45, 44, 9, 21, 43, 44, 44, 8, 9, 44, 7, 8, 44, 43, 7, 21, 22, 43, 43, 22, 42, 43, 42, 7, 22, 23, 24, 24, 42, 22, 7, 42, 6, 42, 41, 6, 6, 41, 5, 24, 26, 42, 42, 26, 41, 24, 25, 26, 5, 40, 4, 5, 41, 40, 41, 28, 40, 26, 27, 41, 41, 27, 28, 40, 39, 4, 28, 29, 40, 40, 29, 39, 4, 39, 3, 39, 2, 3, 29, 30, 39, 39, 38, 2, 39, 30, 38, 38, 1, 2, 30, 37, 38, 38, 37, 1, 30, 31, 37, 31, 36, 37, 31, 32, 36, 32, 33, 36, 37, 0, 1, 37, 36, 0, 33, 34, 36, 36, 35, 0, 36, 34, 35 ], + "vertices": [ 1, 40, 53.94, 69.15, 1, 1, 40, 126.23, 67.31, 1, 2, 40, 226.42, 31.13, 0.9375, 41, -30.87, -1.11, 0.0625, 2, 40, 240.84, 25.33, 0.7, 41, -25.64, 13.52, 0.3, 2, 40, 246.67, 8.05, 0.3, 41, -8.60999, 20.02, 0.7, 3, 40, 240.81, -115.25, 0.0625, 41, 114.8, 19.01, 0.875, 42, 9.47999, 59.16, 0.0625, 2, 41, 131.07, 29.69, 0.7, 42, 22.11, 44.35, 0.3, 2, 41, 146.06, 39.54, 0.3, 42, 33.75999, 30.71, 0.7, 3, 41, 152.6, 65.01, 0.12566, 42, 59.85, 27.41, 0.75203, 43, 15.85, 48.05, 0.12229, 3, 41, 154.28, 71.58999, 0.05444, 42, 66.58999, 26.56, 0.78401, 43, 16.71999, 41.31, 0.16154, 3, 42, 71.19, 35.75999, 0.64716, 43, 26.78, 39.16999, 0.13169, 44, -67.32, 18.95999, 0.22114, 3, 42, 87.93, 69.21, 0.0625, 43, 63.37, 31.39, 0.675, 44, -30.17, 23.3, 0.26249, 2, 43, 113.82, 35.72, 0.1038, 44, 16.23, 43.56, 0.89619, 1, 44, 128.14, 12.02, 1, 1, 44, 161.85, -15.81, 1, 2, 43, 90.98, -23.36, 0.0138, 44, 13.52, -19.71999, 0.98619, 2, 43, 62.97, -25.81, 0.7, 44, -12.23, -31.02, 0.3, 3, 42, 115.12, -1.33, 0.08333, 43, 1.93, -12.66, 0.83333, 44, -74.26, -38.09999, 0.08333, 2, 42, 106.11, -23.53, 0.3, 43, -21.8, -9.52, 0.7, 2, 42, 97.43, -44.9, 0.7, 43, -44.67, -6.51, 0.3, 2, 42, 84.26, -40.68999, 0.9375, 43, -43.9, 7.29, 0.0625, 1, 42, 49.18, -29.46, 1, 2, 41, 206.75, 5.37, 0.13333, 42, 7.44, -33.77, 0.86666, 2, 41, 219.64, -20.52, 0.36111, 42, -16.64, -49.8, 0.63888, 2, 41, 208.4, -37.82, 0.72083, 42, -35.22, -40.82, 0.27916, 2, 41, 200.49, -50.02, 0.91666, 42, -48.31, -34.48, 0.08333, 1, 41, 161.1, -36.97, 1, 2, 40, 150.1, -116.76, 0.08333, 41, 119.88, -71.55, 0.91666, 2, 40, 154.99, -70.71, 0.42846, 41, 73.68, -68.47, 0.57153, 2, 40, 150.3, -65.26999, 0.35604, 41, 68.42, -73.36, 0.64395, 2, 40, 146.51, -60.87, 0.59147, 41, 64.17, -77.32, 0.40852, 2, 40, 115.12, -75.08, 0.8446, 41, 79.61, -108.13, 0.15538, 1, 40, 63.33, -98.53, 1, 1, 40, 21.78, -94.55, 1, 1, 40, -66.69, -32.04, 1, 1, 40, -6.62, 52.97, 1, 1, 40, 58.14, -6, 1, 1, 40, 121.17, 2.44, 1, 1, 40, 188.87, -12.1, 1, 2, 40, 197.11, -18.42, 0.7, 41, 19.79, -28.44, 0.3, 2, 40, 203.98, -28.61, 0.3, 41, 29.69, -21.17, 0.7, 1, 41, 136.67, -7.42, 1, 2, 41, 164.32, 0.66, 0.7, 42, -2.53, 7.73, 0.3, 2, 41, 177.97, 21.57, 0.25, 42, 19.92, -3.19, 0.75, 1, 42, 71.93, -6.29, 1, 2, 42, 79.66, -3.72, 0.7, 43, -9.28, 21.04, 0.3, 2, 42, 87.98, 7.25, 0.3125, 43, 3.42, 15.76, 0.6875, 3, 42, 114.16, 61.85, 0.04, 43, 62.84, 4.15, 0.7, 44, -21.95, -2.66, 0.26 ], + "hull": 36, + "edges": [ 66, 68, 66, 64, 56, 54, 54, 52, 52, 50, 46, 44, 44, 42, 34, 32, 32, 30, 30, 28, 28, 26, 26, 24, 24, 22, 10, 8, 8, 6, 6, 4, 4, 2, 2, 0, 68, 70, 0, 70, 46, 48, 48, 50, 14, 12, 12, 10, 60, 58, 58, 56, 42, 40, 40, 38, 18, 16, 16, 14, 22, 20, 20, 18, 38, 36, 36, 34, 60, 62, 62, 64, 68, 72, 72, 74, 74, 76, 76, 78, 78, 80, 80, 82, 82, 84, 84, 86, 16, 88, 86, 88, 18, 90, 90, 38, 88, 90, 20, 92, 92, 36, 90, 92, 92, 94, 94, 22, 94, 32, 30, 24, 88, 40, 86, 14, 84, 12, 82, 10, 82, 52, 48, 84, 44, 86, 78, 6, 4, 76, 80, 8, 80, 56, 58, 78, 76, 60 ], + "width": 338, + "height": 429 + } + }, + "raptor_horn": { + "raptor_horn": { "x": 156.2, "y": 74.1, "rotation": -137.26, "width": 363, "height": 159 } + }, + "raptor_horn_back": { + "raptor_horn_back": { "x": 121.42, "y": 83.01, "rotation": -132.21, "width": 351, "height": 153 } + }, + "raptor_jaw": { + "raptor_jaw": { + "type": "mesh", + "uvs": [ 0.40984, 0.22169, 0.42214, 0.3988, 0.67894, 0.53819, 0.7589, 0.62838, 0.99999, 0.4726, 1, 0.53491, 0.87731, 0.77925, 0.63281, 0.94487, 0.39908, 0.96947, 0.19456, 0.89404, 0.21609, 0.6497, 0, 0.46111, 0, 0, 0.26069, 0, 0.19456, 0.29385 ], + "triangles": [ 14, 13, 0, 14, 0, 1, 5, 3, 4, 10, 14, 1, 11, 14, 10, 6, 3, 5, 2, 10, 1, 7, 2, 3, 7, 3, 6, 2, 8, 10, 8, 9, 10, 2, 7, 8, 14, 12, 13, 11, 12, 14 ], + "vertices": [ 1, 35, 28.6, 68.85, 1, 1, 35, 69.65, 38.95, 1, 1, 35, 150.72, 72.87999, 1, 1, 35, 186.16, 74.79, 1, 1, 35, 199.76, 159.69, 1, 1, 35, 213.35, 148.16, 1, 1, 35, 242.43, 74.42, 1, 1, 35, 230.31, -13.08, 1, 1, 35, 189.56, -71.99, 1, 1, 35, 132.76, -105.6, 1, 1, 35, 83.71, -55.39, 1, 2, 16, -18.31, 12.1, 0.67732, 35, -0.04, -70.76, 0.32267, 1, 16, 113.44, 16.95, 1, 1, 16, 116.36, -62.48, 1, 1, 35, 1.86, 5.43, 1 ], + "hull": 14, + "edges": [ 22, 24, 22, 20, 20, 18, 18, 16, 16, 14, 14, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 2, 2, 0, 24, 26, 0, 26, 24, 28, 22, 28, 28, 0 ], + "width": 305, + "height": 286 + } + }, + "raptor_saddle_noshadow": { + "raptor_saddle_noshadow": { "x": 80.83, "y": 10.63, "rotation": -88.64, "width": 326, "height": 375 } + }, + "raptor_saddle_strap_front": { + "raptor_saddle_strap_front": { "x": 128.83, "y": -4.71, "rotation": 61.29, "width": 114, "height": 189 } + }, + "raptor_saddle_strap_rear": { + "raptor_saddle_strap_rear": { + "type": "mesh", + "uvs": [ 0.85499, 0.06802, 1, 0.13237, 1, 0.20266, 0.95981, 0.26524, 0.88583, 0.38045, 0.80684, 0.46413, 0.74038, 0.53453, 0.81676, 0.5895, 0.51961, 1, 0.4516, 1, 0.01739, 0.8407, 0, 0.80889, 0.24645, 0.36639, 0.3792, 0.39151, 0.42457, 0.32099, 0.49229, 0.21571, 0.57673, 0.10986, 0.66437, 0, 0.70168, 0, 0.56028, 0.46321, 0.68822, 0.29772, 0.76845, 0.18722, 0.61529, 0.39206 ], + "triangles": [ 7, 8, 6, 9, 10, 13, 13, 11, 12, 6, 8, 19, 8, 9, 19, 9, 13, 19, 13, 10, 11, 19, 22, 6, 13, 14, 19, 19, 14, 22, 6, 22, 5, 22, 20, 5, 5, 20, 4, 14, 15, 22, 22, 15, 20, 20, 21, 4, 15, 16, 20, 4, 21, 3, 20, 16, 21, 2, 3, 0, 3, 21, 0, 0, 1, 2, 21, 16, 18, 16, 17, 18, 21, 18, 0 ], + "vertices": [ 1, 50, 3.9, -3.27, 1, 1, 50, 4.25, 15.05, 1, 1, 50, 13.24, 20.28, 1, 2, 50, 23.42, 21.2, 0.7, 51, -15.2, 21.22, 0.3, 3, 50, 41.11, 22.87, 0.3, 51, 2.48, 22.89, 0.6375, 52, -33.83, 24.96, 0.0625, 3, 50, 52.07, 21.72, 0.0625, 51, 13.43, 21.74, 0.6375, 52, -22.97, 23.11, 0.3, 2, 51, 18.39, 20.76, 0.25, 52, -18.09, 21.82, 0.75, 1, 52, -18.76, 33.09, 1, 1, 52, 49.92, 31.57, 1, 1, 52, 53.21, 25, 1, 1, 52, 53.11, -27.48, 1, 1, 52, 49.74, -31.27, 1, 1, 52, -20.73, -36.75999, 1, 1, 52, -23.82, -22.28, 1, 3, 50, 53.48, -24.61, 0.0625, 51, 14.84, -24.59, 0.575, 52, -24.51, -23.21, 0.3625, 3, 50, 41.43999, -26.12, 0.3, 51, 2.81, -26.09, 0.6375, 52, -36.62, -23.95, 0.0625, 2, 50, 24.38, -26.12, 0.7, 51, -14.24, -26.1, 0.3, 1, 50, 5.57, -26.12, 1, 1, 50, 3.54, -22.64, 1, 1, 52, -23.08, -0.04, 1, 2, 50, 41.66, -1.72, 0.3125, 51, 3.03, -1.7, 0.6875, 2, 50, 23.85, -2.46, 0.7, 51, -14.77, -2.44, 0.3, 2, 51, 13.95, -1.5, 0.64582, 52, -23.94, -0.11, 0.35416 ], + "hull": 19, + "edges": [ 26, 24, 24, 22, 22, 20, 20, 18, 16, 18, 16, 14, 14, 12, 4, 2, 34, 36, 12, 38, 38, 26, 8, 40, 40, 30, 2, 0, 0, 36, 30, 32, 32, 34, 32, 42, 4, 6, 6, 8, 42, 6, 26, 28, 28, 30, 28, 44, 8, 10, 10, 12, 44, 10 ], + "width": 108, + "height": 148 + } + }, + "raptor_saddle_w_shadow": { + "raptor_saddle_w_shadow": { "x": 80.83, "y": 10.63, "rotation": -88.64, "width": 326, "height": 375 } + }, + "raptor_tongue": { + "raptor_tongue": { + "type": "mesh", + "uvs": [ 0.35242, 0.2156, 0.4794, 0.44245, 0.62071, 0.61176, 0.80562, 0.75373, 1, 0.90297, 1, 1, 0.8971, 1, 0.72054, 0.92254, 0.50668, 0.82872, 0.30401, 0.70725, 0.10537, 0.57888, 0, 0.50622, 0, 0, 0.26224, 0 ], + "triangles": [ 8, 7, 6, 6, 4, 5, 4, 6, 3, 6, 7, 3, 7, 8, 3, 8, 2, 3, 9, 10, 1, 8, 9, 2, 9, 1, 2, 1, 10, 0, 10, 11, 0, 0, 12, 13, 0, 11, 12 ], + "vertices": [ 2, 63, 3.63, 27.04, 0.6875, 64, -47.26, 33.87, 0.3125, 3, 63, 39.09, 19.45, 0.3125, 64, -13.41, 20.86, 0.625, 65, -51.54, 33.37, 0.0625, 3, 63, 71.56, 19.02, 0.0625, 64, 18.58, 15.39, 0.625, 65, -21.56, 20.92, 0.3125, 2, 64, 55.03, 16.85, 0.3125, 65, 14.29, 14.23, 0.6875, 2, 64, 93.34, 18.39, 0.08333, 65, 51.98, 7.21, 0.91666, 1, 65, 56.09, -4.5, 1, 2, 64, 85.06, -1.49, 0.08333, 65, 39.48, -10.33, 0.91666, 2, 64, 54.22, -9.18, 0.3125, 65, 7.71, -10.96, 0.6875, 3, 63, 75.14, -14.72, 0.0625, 64, 16.87, -18.5, 0.625, 65, -30.77, -11.73, 0.3125, 3, 63, 38.8, -25.8, 0.3125, 64, -20.74, -23.8, 0.625, 65, -68.62, -8.53, 0.0625, 2, 63, 2.4, -35.77, 0.6875, 64, -58.25, -27.99, 0.3125, 2, 63, -17.28, -40.62, 0.91666, 64, -78.44999, -29.71, 0.08333, 1, 63, -59.91, 8.18, 1, 2, 63, -26.13, 37.68999, 0.91666, 64, -75.01999, 49.02, 0.08333 ], + "hull": 14, + "edges": [ 22, 24, 10, 12, 10, 8, 24, 26, 16, 4, 18, 16, 2, 4, 18, 2, 22, 20, 0, 26, 20, 0, 0, 2, 12, 14, 14, 16, 4, 6, 6, 8, 14, 6, 20, 18 ], + "width": 171, + "height": 128 + } + }, + "spineboy_torso": { + "torso": { "x": 55.88, "y": 4.86, "rotation": -104.14, "width": 108, "height": 182 } + }, + "stirrup_back": { + "stirrup_back": { "x": 53.2, "y": 31.34, "rotation": -21.12, "width": 87, "height": 69 } + }, + "stirrup_front": { + "stirrup_front": { "x": 36.13, "y": 20.39, "rotation": -21.12, "width": 89, "height": 100 } + }, + "stirrup_strap": { + "stirrup_strap": { + "type": "mesh", + "uvs": [ 0.36822, 0.27893, 0.45737, 0.38897, 0.54451, 0.49651, 0.67872, 0.59135, 0.81977, 0.69102, 1, 0.77344, 1, 1, 0.77956, 1, 0.63729, 0.81629, 0.53364, 0.72348, 0.40534, 0.6086, 0.30886, 0.52535, 0.21049, 0.44047, 0, 0.26245, 0, 0, 0.30637, 0, 0.20241, 0.23 ], + "triangles": [ 2, 10, 1, 9, 10, 2, 9, 2, 3, 8, 9, 3, 8, 3, 4, 7, 8, 4, 7, 4, 5, 7, 5, 6, 16, 14, 15, 13, 14, 16, 16, 15, 0, 12, 16, 0, 12, 0, 1, 13, 16, 12, 11, 12, 1, 10, 11, 1 ], + "vertices": [ 2, 56, 24.71, 8.03, 0.80344, 57, -17.42, 11.02, 0.19655, 2, 56, 37.95, 8.04, 0.59978, 57, -4.36, 8.87, 0.40021, 2, 56, 50.88, 8.04, 0.36895, 57, 8.39, 6.77, 0.63103, 2, 56, 65.92, 12.27, 0.17748, 57, 23.91, 8.47999, 0.82251, 2, 56, 81.72, 16.7, 0.05943, 57, 40.23, 10.28, 0.94056, 2, 56, 98.82, 25.04, 0.01209, 57, 58.46, 15.71, 0.9879, 2, 56, 114.44, 11.57, 0.00191, 57, 71.67, -0.11, 0.99808, 2, 56, 100.47, -4.61, 0.01816, 57, 55.25, -13.81, 0.98182, 2, 56, 78.79, -4.14, 0.07487, 57, 33.93999, -9.81, 0.92512, 2, 56, 65.83, -6.24, 0.2028, 57, 20.81, -9.76, 0.79719, 2, 56, 49.78, -8.83, 0.39971, 57, 4.55, -9.7, 0.60028, 2, 56, 37.93, -10.97, 0.62658, 57, -7.48, -9.88, 0.37341, 2, 56, 25.85, -13.15, 0.82034, 57, -19.75, -10.06, 0.17965, 2, 56, 0.25, -18.03, 0.95288, 57, -45.81, -10.7, 0.04711, 2, 56, -17.83, -2.43, 0.97709, 57, -61.11, 7.63, 0.0229, 2, 56, 1.57, 20.07, 0.94774, 57, -38.29, 26.67, 0.05225, 2, 56, 10.84, -1.23, 0.97709, 57, -32.62, 4.14, 0.0229 ], + "hull": 16, + "edges": [ 28, 30, 30, 0, 12, 10, 8, 10, 12, 14, 14, 16, 26, 28, 24, 26, 26, 32, 32, 30, 20, 22, 22, 24, 0, 2, 2, 4, 4, 6, 6, 8, 16, 18, 18, 20 ], + "width": 97, + "height": 91 + } + }, + "visor": { + "visor": { "x": 99.13, "y": 6.51, "rotation": -70.57, "width": 261, "height": 168 } + } + } +}, +"animations": { + "Jump": { + "bones": { + "root": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { + "time": 0.3, + "x": 0, + "y": 0, + "curve": [ 0.201, 0.17, 0.815, 0.83 ] + }, + { "time": 0.6666, "x": 1482.78, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "front_foot_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.2, "angle": 0 }, + { "time": 0.3, "angle": -41.64 }, + { "time": 0.3666, "angle": -69.66 }, + { "time": 0.4333, "angle": -12.8 }, + { "time": 0.5333, "angle": 5.73 }, + { "time": 0.6666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3, "x": 0, "y": 0 }, + { "time": 0.3666, "x": -60.01, "y": 111.1 }, + { "time": 0.4333, "x": 213.18, "y": 291.22 }, + { "time": 0.5333, "x": 243.73, "y": 332.61 }, + { "time": 0.6666, "x": 95.94, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.6666, "x": 1, "y": 1 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": -4.48 }, + { "time": 0.1, "angle": -23.02 }, + { "time": 0.3, "angle": 19.24 }, + { "time": 0.5333, "angle": 20.85 }, + { "time": 0.6666, "angle": -10.76 }, + { "time": 0.7666, "angle": -18.58 }, + { "time": 0.9333, "angle": -3.56 }, + { "time": 1.0666, "angle": -4.48 } + ], + "translate": [ + { "time": 0, "x": -100.65, "y": 49.77 }, + { + "time": 0.1, + "x": 9.37, + "y": -109.06, + "curve": [ 0.245, 0, 0.609, 0.41 ] + }, + { + "time": 0.1666, + "x": 150.37, + "y": -76.51, + "curve": [ 0.401, 0.34, 0.858, 0.87 ] + }, + { "time": 0.3, "x": 361, "y": 36.69 }, + { + "time": 0.5333, + "x": 5.36, + "y": 290.91, + "curve": [ 0.808, 0, 0.892, 0.81 ] + }, + { "time": 0.6666, "x": -56.27, "y": 88.07 }, + { + "time": 0.7666, + "x": 179.93, + "y": -59.94, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.9333, + "x": 238.11, + "y": 50.63, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.0666, "x": 213.19, "y": 49.77 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_foot_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.2, "angle": 0 }, + { "time": 0.3, "angle": -41.64 }, + { "time": 0.3666, "angle": -69.66 }, + { "time": 0.4333, "angle": -57.97 }, + { "time": 0.7, "angle": -9.19 }, + { "time": 0.7333, "angle": -7.78 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3, "x": 0, "y": 0 }, + { "time": 0.3666, "x": -131.66, "y": 47.58 }, + { "time": 0.4333, "x": -16.1, "y": 205.84 }, + { "time": 0.5333, "x": 61.29, "y": 320.2 }, + { "time": 0.7333, "x": 235.62, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7333, "x": 1, "y": 1 } + ] + }, + "front_leg1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_leg_goal": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3, "x": 0, "y": 0 }, + { "time": 0.7, "x": -0.39, "y": 24.29 }, + { "time": 0.7666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "rear_leg1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_leg_goal": { + "rotate": [ + { "time": 0, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3, "x": 0, "y": 0 }, + { "time": 0.7, "x": 6.75, "y": 25.64 }, + { "time": 0.7666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 } + ] + }, + "tail1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": -11.02 }, + { "time": 0.3, "angle": 0.53 }, + { "time": 0.4333, "angle": 8.64 }, + { "time": 0.7, "angle": -9.73 }, + { + "time": 0.7666, + "angle": -4.46, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "torso1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_leg2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_leg2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tail2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": -39.83 }, + { "time": 0.3, "angle": -31.82 }, + { "time": 0.4333, "angle": -7.28 }, + { "time": 0.5333, "angle": 1.28 }, + { "time": 0.6, "angle": -7.22 }, + { "time": 0.7, "angle": -30.66 }, + { + "time": 0.7666, + "angle": -40.54, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "torso2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 0.51 }, + { "time": 0.3, "angle": -1.9 }, + { "time": 0.5333, "angle": 1.04 }, + { "time": 0.7, "angle": -3.25 }, + { "time": 0.7666, "angle": 4.81 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1666, "angle": -308.79 }, + { "time": 0.3, "angle": -398.7 }, + { "time": 0.5333, "angle": -297.8 }, + { "time": 0.7, "angle": 62.19 }, + { "time": 0.7666, "angle": -325.36 }, + { "time": 0.8333, "angle": -374.42 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_leg3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": -8.25 }, + { "time": 0.3, "angle": -1.9 }, + { "time": 0.5333, "angle": 5.44 }, + { "time": 0.7, "angle": 24.01 }, + { "time": 0.7666, "angle": 4.82 }, + { "time": 0.8666, "angle": -1.78 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.1, "x": 0, "y": 0 }, + { "time": 0.3, "x": 62.9, "y": -44.25 }, + { "time": 0.5333, "x": -4.35, "y": 17.31 }, + { "time": 0.7, "x": 0, "y": 0 }, + { "time": 0.7666, "x": 23.29, "y": -42.27 }, + { "time": 0.8666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_arm1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 51.2 }, + { "time": 0.3333, "angle": -38.7 }, + { "time": 0.6, "angle": 62.19, "curve": "stepped" }, + { "time": 0.7333, "angle": 62.19 }, + { "time": 0.8, "angle": 34.62 }, + { "time": 0.8666, "angle": -14.43 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_leg3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_front1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_rear1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "spineboy_front_arm_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "spineboy_hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.8666, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.1, "x": 35.96, "y": -11.83 }, + { "time": 0.3, "x": 31.1, "y": -50.39 }, + { "time": 0.5333, "x": 12.1, "y": -8.03 }, + { "time": 0.7, "x": 41.7, "y": -19.46 }, + { "time": 0.8666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.8666, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "spineboy_rear_arm_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "stirrup": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "stirrup_strap1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tail3": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": -8.97 }, + { "time": 0.3, "angle": -18.38 }, + { "time": 0.4333, "angle": 0.9 }, + { "time": 0.5333, "angle": 11.43 }, + { "time": 0.6, "angle": 17.22 }, + { "time": 0.7, "angle": 4.74 }, + { + "time": 0.7666, + "angle": -20.69, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { + "time": 0.9666, + "angle": -20.4, + "curve": [ 0.382, 0.57, 0.735, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_thigh": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 23.1 }, + { "time": 0.3, "angle": -75.92 }, + { "time": 0.5333, "angle": -1.41 }, + { "time": 0.7666, "angle": 26.86 }, + { "time": 0.8333, "angle": -56.14 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_foot1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_thigh": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "gun": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 15.27 }, + { "time": 0.3, "angle": -53.4 }, + { "time": 0.5666, "angle": -63.35 }, + { "time": 0.7666, "angle": -29.92 }, + { "time": 0.9, "angle": 7.24 }, + { "time": 1, "angle": -3.69 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 9.93 }, + { "time": 0.3, "angle": -3.76 }, + { "time": 0.5333, "angle": -26.63 }, + { "time": 0.7, "angle": -10.23 }, + { "time": 0.7666, "angle": 21.8 }, + { "time": 0.8666, "angle": 15.36 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_arm2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 23.1 }, + { "time": 0.3, "angle": -75.92 }, + { "time": 0.5333, "angle": -1.41 }, + { "time": 0.7666, "angle": 26.86 }, + { "time": 0.8333, "angle": -56.14 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_foot1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_front2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_rear2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "spineboy_torso": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1666, "angle": -24.93 }, + { "time": 0.2333, "angle": -20.34 }, + { "time": 0.5333, "angle": -11.2 }, + { "time": 0.7, "angle": 10.49 }, + { + "time": 0.8333, + "angle": -30.21, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1, "angle": 1.34 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "stirrup_strap2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tail4": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 34.12 }, + { "time": 0.3, "angle": -12.25 }, + { "time": 0.4333, "angle": 11.11 }, + { "time": 0.5333, "angle": 25.19 }, + { "time": 0.6, "angle": 32.5 }, + { "time": 0.7, "angle": 24.4 }, + { + "time": 0.7666, + "angle": 9.9, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { + "time": 0.9666, + "angle": -11.72, + "curve": [ 0.382, 0.57, 0.735, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_arm": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_knee": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_foot2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.3, "angle": 0 }, + { "time": 0.3666, "angle": -63.6 }, + { "time": 0.4333, "angle": -80.16 }, + { "time": 0.5333, "angle": -17.48 }, + { "time": 0.6666, "angle": 24.85 }, + { "time": 0.7666, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.6666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.6666, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_hand": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5333, "angle": -27.74 }, + { "time": 0.7666, "angle": -27.09 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "horn_front": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "horn_rear": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "jaw": { + "rotate": [ + { "time": 0, "angle": 15.56 }, + { "time": 0.2333, "angle": -0.92 }, + { "time": 0.5, "angle": 20.4 }, + { "time": 0.7, "angle": 18.32 }, + { "time": 0.7666, "angle": 5.17 }, + { "time": 0.8333, "angle": 20.34 }, + { "time": 1.0666, "angle": 15.56 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "lower_leg": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "neck2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 11.08 }, + { "time": 0.8333, "angle": 8.16 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_foot2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.3, "angle": 0 }, + { "time": 0.3666, "angle": -87.93 }, + { "time": 0.4333, "angle": -126.75 }, + { "time": 0.5333, "angle": -63.79 }, + { "time": 0.7, "angle": 24.85 }, + { "time": 0.7666, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.7, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_hand": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5333, "angle": -27.74 }, + { "time": 0.7666, "angle": -27.09 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "saddle_strap_rear3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tail5": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1, "angle": 76.87 }, + { "time": 0.3, "angle": -12.25 }, + { "time": 0.4333, "angle": 10.5 }, + { "time": 0.5333, "angle": 24.81 }, + { "time": 0.6, "angle": 32.21 }, + { "time": 0.7, "angle": 24.4 }, + { + "time": 0.7666, + "angle": 9.9, + "curve": [ 0.243, 0, 0.648, 1 ] + }, + { + "time": 0.9666, + "angle": -41.66, + "curve": [ 0.382, 0.57, 0.735, 1 ] + }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tongue1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_bracer": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm_target": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_foot3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.3, "angle": 0 }, + { "time": 0.3666, "angle": -84.17 }, + { "time": 0.4333, "angle": -127.53 }, + { "time": 0.5333, "angle": -52.16 }, + { "time": 0.6666, "angle": 10.77 }, + { "time": 0.7666, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.6666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.6666, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "head2": { + "rotate": [ + { "time": 0, "angle": 15.31 }, + { "time": 0.1, "angle": 29.85 }, + { "time": 0.2, "angle": 22.43 }, + { "time": 0.3, "angle": 12.64 }, + { "time": 0.4666, "angle": 24.85 }, + { "time": 0.5333, "angle": 9.28 }, + { "time": 0.7, "angle": 4.77 }, + { "time": 0.7666, "angle": 37.9 }, + { + "time": 0.8333, + "angle": 18.87, + "curve": [ 0.056, 0.81, 0.75, 1 ] + }, + { "time": 1, "angle": 22.96 }, + { "time": 1.0666, "angle": 15.31 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "rear_arm_target": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tongue2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "back_hand": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_hand2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "tongue3": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + } + } + }, + "empty": {}, + "gungrab": { + "slots": { + "front_hand": { + "attachment": [ + { "time": 0, "name": "front_open_hand" }, + { "time": 0.1666, "name": "gun" } + ] + }, + "gun": { + "attachment": [ + { "time": 0, "name": "gun_nohand" }, + { "time": 0.1666, "name": null } + ] + } + }, + "bones": { + "front_hand2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": 12.33 }, + { "time": 0.1666, "angle": -89.54 }, + { "time": 0.2333, "angle": -79.78 }, + { "time": 0.4666, "angle": -10.18 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 }, + { "time": 0.1666, "x": 0.938, "y": 0.938 }, + { "time": 0.4666, "x": 1, "y": 1 } + ] + }, + "front_arm": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.0666, "angle": -31.99 }, + { + "time": 0.1666, + "angle": 223.11, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.2333, + "angle": 155.19, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.3666, + "angle": 246.13, + "curve": [ 0.184, 0.33, 0.75, 1 ] + }, + { "time": 0.4666, "angle": -56.74 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.1666, "x": 6.49, "y": -2.66 }, + { "time": 0.2333, "x": 6.84, "y": 4.79 }, + { "time": 0.4666, "x": 0, "y": 0 } + ] + }, + "front_bracer": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1666, "angle": 86.01 }, + { "time": 0.2333, "angle": 114.94 }, + { + "time": 0.3666, + "angle": 81.86, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.4666, "angle": 34.73 } + ] + } + }, + "ik": { + "front_arm_goal": [ + { "time": 0, "mix": 0 } + ] + } + }, + "walk": { + "bones": { + "root": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_foot_goal": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.2666, "angle": -51.26 }, + { "time": 0.4, "angle": -65.17 }, + { "time": 0.5333, "angle": -76.28 }, + { "time": 0.8, "angle": -76.52 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 343.28, "y": 36.5 }, + { "time": 0.2666, "x": 86.5, "y": 36.99 }, + { "time": 0.5333, "x": -173.36, "y": 37.42 }, + { "time": 0.6, "x": -68.15, "y": 141.15 }, + { "time": 0.7333, "x": 91.78, "y": 238.01 }, + { "time": 0.8, "x": 155.89, "y": 190.91 }, + { "time": 0.9666, "x": 303.28, "y": 94.4 }, + { "time": 1.0666, "x": 343.28, "y": 36.5 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": -4.78 }, + { "time": 0.0666, "angle": -3.99 }, + { "time": 0.2666, "angle": -12.49 }, + { "time": 0.5333, "angle": -4.78 }, + { "time": 0.6, "angle": -3.99 }, + { "time": 0.8, "angle": -12.49 }, + { "time": 1.0666, "angle": -4.78 } + ], + "translate": [ + { + "time": 0, + "x": 161.93, + "y": 4.89, + "curve": [ 0.27, 0.37, 0.62, 0.4 ] + }, + { + "time": 0.0666, + "x": 165.04, + "y": -5.99, + "curve": [ 0.244, 0, 0.757, 1 ] + }, + { + "time": 0.2666, + "x": 178.8, + "y": 136.52, + "curve": [ 0.25, 0, 0.841, 0.8 ] + }, + { + "time": 0.5333, + "x": 161.93, + "y": 4.89, + "curve": [ 0.27, 0.37, 0.62, 0.4 ] + }, + { + "time": 0.6, + "x": 165.04, + "y": -5.99, + "curve": [ 0.244, 0, 0.757, 1 ] + }, + { + "time": 0.8, + "x": 178.8, + "y": 136.52, + "curve": [ 0.25, 0, 0.858, 0.82 ] + }, + { "time": 1.0666, "x": 161.93, "y": 4.89 } + ] + }, + "rear_foot_goal": { + "rotate": [ + { "time": 0, "angle": -62.73 }, + { "time": 0.2666, "angle": -107.17 }, + { "time": 0.4666, "angle": -40.51 }, + { "time": 0.8, "angle": -97.15 }, + { "time": 1.0666, "angle": -62.73 } + ], + "translate": [ + { "time": 0, "x": -266.69, "y": -15.46 }, + { "time": 0.1333, "x": -87.88, "y": 124.85 }, + { "time": 0.2666, "x": 88.35, "y": 134.06 }, + { "time": 0.3666, "x": 198.39, "y": 90.64 }, + { "time": 0.4666, "x": 308.19, "y": -26.42 }, + { "time": 0.6, "x": 167.06, "y": -26.42 }, + { "time": 1.0666, "x": -266.69, "y": -15.46 } + ] + }, + "front_leg1": { + "rotate": [ + { "time": 0, "angle": 27.07 }, + { "time": 1.0666, "angle": 31.39 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.0666, "x": -0.21, "y": 15.19 }, + { "time": 0.5333, "x": -0.33, "y": 12.15 }, + { "time": 0.7333, "x": -4.74, "y": 31.93 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_leg_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": -18.04, "y": -2.88 }, + { "time": 0.4333, "x": -42.2, "y": -88.63 }, + { "time": 0.5333, "x": -27.31, "y": -43.9 }, + { "time": 0.7333, "x": -1.52, "y": -94.28 }, + { "time": 0.8, "x": -24.29, "y": -116.41 }, + { "time": 1, "x": -41.88, "y": -93.3 }, + { "time": 1.0666, "x": -18.04, "y": -2.88 } + ] + }, + "rear_leg1": { + "rotate": [ + { "time": 0, "angle": -64.85 }, + { "time": 1.0666, "angle": -45.71 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_leg_goal": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": -2.05, "y": 15.12 }, + { "time": 0.2666, "x": 17.49, "y": -150.43 }, + { "time": 0.4666, "x": -40.21, "y": -81.76 }, + { "time": 0.5333, "x": -31.68, "y": -82.43 }, + { "time": 0.8, "x": 2.65, "y": -169.21 }, + { "time": 0.9333, "x": -16.76, "y": -98.31 }, + { "time": 1.0666, "x": -2.05, "y": 15.12 } + ] + }, + "tail1": { + "rotate": [ + { "time": 0, "angle": 1.3 }, + { "time": 0.0666, "angle": 4.13 }, + { "time": 0.3333, "angle": -5.77 }, + { "time": 0.6333, "angle": 4.13 }, + { "time": 0.9, "angle": -5.77 }, + { "time": 1.0666, "angle": 1.3 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.0666, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "torso1": { + "rotate": [ + { "time": 0, "angle": 7.21 }, + { "time": 0.2666, "angle": 4.19 }, + { "time": 0.5333, "angle": 7.21 }, + { "time": 0.8, "angle": 4.19 }, + { "time": 1.0666, "angle": 7.21 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_leg2": { + "rotate": [ + { "time": 0, "angle": -347.28 }, + { "time": 1.0666, "angle": -362.06 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_leg2": { + "rotate": [ + { "time": 0, "angle": 27.05 }, + { "time": 1.0666, "angle": 9.92 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle": { + "rotate": [ + { "time": 0, "angle": -2.51 }, + { "time": 0.2666, "angle": -4.17 }, + { "time": 0.5333, "angle": -3.85 }, + { "time": 0.8, "angle": -3.09 }, + { "time": 1.0666, "angle": -2.51 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { + "time": 0.2666, + "x": 0, + "y": 0, + "curve": [ 0.149, 0.28, 0.75, 1 ] + }, + { + "time": 0.3333, + "x": -0.03, + "y": 5.91, + "curve": [ 0.421, 0, 0.85, 0.78 ] + }, + { "time": 0.5333, "x": 0, "y": 0 }, + { "time": 0.6, "x": -0.2, "y": -2.35 }, + { + "time": 0.8, + "x": 0, + "y": 0, + "curve": [ 0.149, 0.28, 0.75, 1 ] + }, + { + "time": 0.8666, + "x": -0.03, + "y": 5.91, + "curve": [ 0.421, 0, 0.85, 0.78 ] + }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tail2": { + "rotate": [ + { "time": 0, "angle": -19.15 }, + { "time": 0.2333, "angle": -11.3 }, + { "time": 0.5, "angle": -9.37 }, + { "time": 0.7666, "angle": -11.3 }, + { "time": 1.0333, "angle": -20.27 }, + { "time": 1.0666, "angle": -19.15 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 0.8, "y": 1 }, + { "time": 0.2333, "x": 0.9, "y": 1 }, + { "time": 0.5, "x": 0.8, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 0.8, "y": 1 } + ] + }, + "torso2": { + "rotate": [ + { "time": 0, "angle": 8.6 }, + { + "time": 0.2666, + "angle": 9.52, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.5333, "angle": 8.01 }, + { + "time": 0.8, + "angle": 5.48, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 1.0666, "angle": 8.6 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_arm1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5, "angle": -367.82 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 20.64, "y": -7.55 }, + { "time": 0.5, "x": -2.86, "y": 3.32 }, + { "time": 0.8, "x": 24.09, "y": -1.47 }, + { "time": 0.9333, "x": 21.73, "y": -3.7 }, + { "time": 1.0666, "x": 20.64, "y": -7.55 } + ] + }, + "front_leg3": { + "rotate": [ + { "time": 0, "angle": 1.14, "curve": "stepped" }, + { "time": 1.0666, "angle": 1.14 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 6.5 }, + { "time": 0.2666, "angle": 12.71 }, + { "time": 0.5333, "angle": 6.5 }, + { "time": 0.8, "angle": 12.71 }, + { "time": 1.0666, "angle": 6.5 } + ], + "translate": [ + { "time": 0, "x": 12.59, "y": -31.3 }, + { + "time": 0.2666, + "x": -10.84, + "y": -72.28, + "curve": [ 0.204, 0.01, 0.861, 0.86 ] + }, + { "time": 0.5333, "x": 12.59, "y": -31.3 }, + { + "time": 0.8, + "x": -10.84, + "y": -72.28, + "curve": [ 0.204, 0.01, 0.861, 0.86 ] + }, + { "time": 1.0666, "x": 12.59, "y": -31.3 } + ] + }, + "rear_arm1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5, "angle": 13.71 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.5, "x": 11.12, "y": -13.38 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_leg3": { + "rotate": [ + { "time": 0, "angle": -23.18, "curve": "stepped" }, + { "time": 1.0666, "angle": -23.18 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_front1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_rear1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tail3": { + "rotate": [ + { "time": 0, "angle": -12.46 }, + { "time": 0.2333, "angle": 12.65 }, + { "time": 0.5, "angle": -20.79 }, + { "time": 0.7666, "angle": 12.65 }, + { "time": 1.0333, "angle": -16.04 }, + { "time": 1.0666, "angle": -12.46 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.2333, "x": 1, "y": 1 }, + { "time": 0.5, "x": 0.997, "y": 1 }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_arm2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5, "angle": 22.44 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_foot1": { + "rotate": [ + { "time": 0, "angle": -41.33, "curve": "stepped" }, + { "time": 1.0666, "angle": -41.33 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "head": { + "rotate": [ + { "time": 0, "angle": -7.36 }, + { + "time": 0.1333, + "angle": -12.99, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.4, "angle": -6.12 }, + { "time": 0.5333, "angle": -7.36 }, + { + "time": 0.6666, + "angle": -12.99, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.9333, "angle": -6.12 }, + { "time": 1.0666, "angle": -7.36 } + ], + "translate": [ + { "time": 0, "x": -3.88, "y": -32.87 }, + { "time": 0.9333, "x": -3.33, "y": -22.81 }, + { "time": 1.0666, "x": -3.88, "y": -32.87 } + ] + }, + "rear_arm2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.5, "angle": -30.2 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_foot1": { + "rotate": [ + { "time": 0, "angle": 2.07, "curve": "stepped" }, + { "time": 1.0666, "angle": 2.07 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_front2": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_rear2": { + "rotate": [ + { "time": 0, "angle": -4.44 }, + { "time": 0.1, "angle": -2.66 }, + { "time": 0.3, "angle": -0.35 }, + { "time": 0.4333, "angle": -1.7 }, + { "time": 0.6333, "angle": -2.54 }, + { "time": 0.9, "angle": -0.51 }, + { "time": 1.0666, "angle": -4.44 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "stirrup": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.2666, "angle": -4.95 }, + { "time": 0.5333, "angle": 0 }, + { "time": 0.8, "angle": -4.95 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 8.97, "y": 4.99 }, + { "time": 0.2666, "x": 4.85, "y": 0.99 }, + { "time": 0.5333, "x": 7.75, "y": -2.99 }, + { "time": 0.8, "x": 4.85, "y": 0.99 }, + { "time": 1.0666, "x": 8.97, "y": 4.99 } + ] + }, + "tail4": { + "rotate": [ + { "time": 0, "angle": 10.25 }, + { + "time": 0.2333, + "angle": 39.47, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { "time": 0.5, "angle": 1.33 }, + { + "time": 0.7666, + "angle": 39.47, + "curve": [ 0.664, 0, 0.75, 1 ] + }, + { "time": 1.0333, "angle": 6.08 }, + { "time": 1.0666, "angle": 10.25 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.2333, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.5, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 1.0666, "x": 1, "y": 1 } + ] + }, + "front_foot2": { + "rotate": [ + { "time": 0, "angle": 36.9 }, + { "time": 0.0666, "angle": 7.88 }, + { "time": 0.1333, "angle": 4.66 }, + { "time": 0.4, "angle": 7.59 }, + { "time": 0.5333, "angle": 8.08 }, + { "time": 0.6666, "angle": -67.33 }, + { "time": 0.7333, "angle": -65.23 }, + { "time": 1, "angle": 27.74 }, + { "time": 1.0666, "angle": 36.9 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_hand": { + "rotate": [ + { "time": 0, "angle": 9.49 }, + { "time": 0.5, "angle": -48.6 }, + { "time": 1.0666, "angle": 9.49 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "horn_front": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2666, "x": -7.18, "y": -1.38 }, + { "time": 0.5333, "x": 0, "y": 0 }, + { "time": 0.8, "x": -7.18, "y": -1.38 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "horn_rear": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2666, "x": 12.34, "y": 9.16 }, + { "time": 0.5333, "x": 0, "y": 0 }, + { "time": 0.8, "x": 12.34, "y": 9.16 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "jaw": { + "rotate": [ + { "time": 0, "angle": 25.56 }, + { "time": 0.2, "angle": 21.27 }, + { "time": 0.3333, "angle": 21.35 }, + { "time": 0.6666, "angle": 15.6 }, + { "time": 0.8666, "angle": 22.96 }, + { "time": 1.0666, "angle": 25.56 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_foot2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.1333, "angle": -82.37 }, + { "time": 0.2666, "angle": -110.3 }, + { "time": 0.4333, "angle": 36.21 }, + { "time": 0.5333, "angle": 2.1 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "rear_hand": { + "rotate": [ + { "time": 0, "angle": -28.89 }, + { "time": 0.5, "angle": 12.19 }, + { "time": 1.0666, "angle": -28.89 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "saddle_strap_rear3": { + "rotate": [ + { "time": 0, "angle": -1.31 }, + { "time": 0.1, "angle": 0.46 }, + { "time": 0.3, "angle": 2.77 }, + { "time": 0.4333, "angle": 1.42 }, + { "time": 0.6333, "angle": 0.58 }, + { "time": 0.9, "angle": 2.61 }, + { "time": 1.0666, "angle": -1.31 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tail5": { + "rotate": [ + { + "time": 0, + "angle": -26.34, + "curve": [ 0.391, -0.58, 0.653, 1.01 ] + }, + { + "time": 0.2333, + "angle": 45.41, + "curve": [ 0.391, -0.58, 0.653, 1.01 ] + }, + { + "time": 0.5, + "angle": -21.92, + "curve": [ 0.391, -0.58, 0.653, 1.01 ] + }, + { + "time": 0.7666, + "angle": 45.41, + "curve": [ 0.391, -0.58, 0.653, 1.01 ] + }, + { "time": 1.0333, "angle": -7.73 }, + { "time": 1.0666, "angle": -26.34 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 0.765, "y": 1 }, + { "time": 0.2333, "x": 1, "y": 1 }, + { "time": 0.5, "x": 0.765, "y": 1 }, + { "time": 0.7666, "x": 1, "y": 1 }, + { "time": 1.0666, "x": 0.765, "y": 1 } + ] + }, + "tongue1": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": 7.55 }, + { "time": 0.6666, "angle": -1.68 }, + { "time": 0.9333, "angle": 8.11 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "front_foot3": { + "rotate": [ + { "time": 0, "angle": -1.65 }, + { "time": 0.0666, "angle": -5.29 }, + { "time": 0.1333, "angle": -3.94 }, + { "time": 0.2666, "angle": -3.81 }, + { "time": 0.5333, "angle": -5.89 }, + { "time": 0.6, "angle": -21.2 }, + { "time": 0.6666, "angle": -73.63 }, + { "time": 0.7333, "angle": -102.81 }, + { "time": 0.8333, "angle": -41.3 }, + { "time": 1, "angle": 10.93 }, + { "time": 1.0666, "angle": -1.65 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tongue2": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": 7.55 }, + { "time": 0.6666, "angle": -1.68 }, + { "time": 0.9333, "angle": 8.11 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "tongue3": { + "rotate": [ + { "time": 0, "angle": 0 }, + { "time": 0.3333, "angle": 7.55 }, + { "time": 0.6666, "angle": -1.68 }, + { "time": 0.9333, "angle": 8.11 }, + { "time": 1.0666, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "head2": { + "rotate": [ + { "time": 0, "angle": 38.59 }, + { "time": 0.2666, "angle": 43.18 }, + { "time": 0.5333, "angle": 38.59 }, + { "time": 0.8, "angle": 43.18 }, + { "time": 1.0666, "angle": 38.59 } + ] + }, + "neck2": { + "rotate": [ + { "time": 0, "angle": 9.65 }, + { "time": 0.2666, "angle": 14.71 }, + { "time": 0.5333, "angle": 9.65 }, + { "time": 0.8, "angle": 14.71 }, + { "time": 1.0666, "angle": 9.65 } + ] + }, + "spineboy_hip": { + "translate": [ + { + "time": 0, + "x": 32.54, + "y": 1.34, + "curve": [ 0.412, 0, 0.872, 0.78 ] + }, + { + "time": 0.2666, + "x": -12.88, + "y": 0.58, + "curve": [ 0.138, 0.17, 0.75, 1 ] + }, + { + "time": 0.5333, + "x": 32.54, + "y": 1.34, + "curve": [ 0.367, 0, 0.867, 0.81 ] + }, + { + "time": 0.8, + "x": -12.88, + "y": 0.58, + "curve": [ 0.164, 0.17, 0.75, 1 ] + }, + { "time": 1.0666, "x": 32.54, "y": 1.34 } + ] + }, + "spineboy_torso": { + "rotate": [ + { "time": 0, "angle": -37.93 }, + { + "time": 0.2666, + "angle": -29.47, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { "time": 0.5333, "angle": -37.93 }, + { + "time": 0.8, + "angle": -29.47, + "curve": [ 0.492, 0, 0.75, 1 ] + }, + { "time": 1.0666, "angle": -37.71 } + ] + }, + "front_arm": { + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.3333, "x": -14.43, "y": -11.03 }, + { "time": 0.5333, "x": 0, "y": 0 }, + { "time": 0.8, "x": -14.43, "y": -11.03 }, + { "time": 1.0666, "x": 0, "y": 0 } + ] + }, + "gun": { + "rotate": [ + { + "time": 0, + "angle": -11.68, + "curve": [ 0.379, 0.6, 0.724, 1 ] + }, + { "time": 0.0666, "angle": -17.59 }, + { + "time": 0.3333, + "angle": 14.45, + "curve": [ 0.25, 0, 0.75, 1 ] + }, + { + "time": 0.6, + "angle": -24.74, + "curve": [ 0.326, 0, 0.715, 1 ] + }, + { + "time": 0.8666, + "angle": 14.45, + "curve": [ 0.242, 0, 0.666, 0.66 ] + }, + { "time": 1.0666, "angle": -11.68 } + ], + "translate": [ + { "time": 0, "x": 0.84, "y": -3.81 }, + { "time": 0.0666, "x": 0, "y": 0 }, + { "time": 0.3333, "x": 3.37, "y": -15.27 }, + { "time": 0.6, "x": 0, "y": 0 }, + { "time": 0.8666, "x": 3.37, "y": -15.27 }, + { "time": 1.0666, "x": 0.84, "y": -3.81 } + ] + } + }, + "deform": { + "default": { + "raptor_body": { + "raptor_body": [ + { "time": 0 }, + { + "time": 0.2666, + "offset": 314, + "vertices": [ -16.78684, 15.47479, -0.63024, 22.82083, 18.11511, 13.89254, 19.32452, 12.15423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, 0, 0, 0, 0, 0, 0, -3.24548, 0.81152, 0, 0, -3.24548, 0.81152 ] + }, + { "time": 0.5333 }, + { + "time": 0.8, + "offset": 314, + "vertices": [ -16.78684, 15.47479, -0.63024, 22.82083, 18.11511, 13.89254, 19.32452, 12.15423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, -3.24548, 0.81152, 0, 0, 0, 0, 0, 0, -3.24548, 0.81152, 0, 0, -3.24548, 0.81152 ] + }, + { "time": 1.0666 } + ] + }, + "raptor_front_leg": { + "raptor_front_leg": [ + { "time": 0, "curve": "stepped" }, + { "time": 0.2666 }, + { + "time": 0.5333, + "offset": 138, + "vertices": [ -2.23608, 21.95403, 21.54915, -4.7554 ] + }, + { + "time": 0.6, + "offset": 138, + "vertices": [ 7.17962, 15.14358, 15.26523, -6.91741 ] + }, + { + "time": 0.7333, + "offset": 110, + "vertices": [ -0.82485, 0.73406, -0.01284, -1.10443, 0, 0, 0, 0, 1.4866, -2.59426, 0.98071, 2.82342, 2.7366, -10.49935, 6.12506, 8.95282, -2.60873, -2.28384, 3.43417, -0.47045, -2.28305, -4.76037, 5.08892, 1.40078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.37966, -1.75515, -2.13229, -0.65667, -2.86239, -0.77365, 2.45989, -1.65319 ] + }, + { "time": 0.8, "curve": "stepped" }, + { "time": 0.9666, "curve": "stepped" }, + { "time": 1.0666 } + ] + } + } + } + } +} +} \ No newline at end of file diff --git a/spine-ts/widget/example/assets/raptor.png b/spine-ts/widget/example/assets/raptor.png new file mode 100644 index 000000000..503d1c446 Binary files /dev/null and b/spine-ts/widget/example/assets/raptor.png differ diff --git a/spine-ts/widget/example/index.html b/spine-ts/widget/example/index.html new file mode 100644 index 000000000..30026abc2 --- /dev/null +++ b/spine-ts/widget/example/index.html @@ -0,0 +1,30 @@ + + + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/spine-ts/widget/src/Widget.ts b/spine-ts/widget/src/Widget.ts new file mode 100644 index 000000000..c651b153a --- /dev/null +++ b/spine-ts/widget/src/Widget.ts @@ -0,0 +1,261 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.5 + * + * Copyright (c) 2013-2016, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable, and + * non-transferable license to use, install, execute, and perform the Spine + * Runtimes software and derivative works solely for personal or internal + * use. Without the written permission of Esoteric Software (see Section 2 of + * the Spine Software License Agreement), you may not (a) modify, translate, + * adapt, or develop new applications using the Spine Runtimes or otherwise + * create derivative works or improvements of the Spine Runtimes or (b) remove, + * delete, alter, or obscure any trademarks or any copyright, trademark, patent, + * or other intellectual property or proprietary rights notices on or in the + * Software, including any copy thereof. Redistributions in binary or source + * form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF + * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +module spine { + export class SpineWidget { + skeleton: Skeleton; + state: AnimationState; + gl: WebGLRenderingContext; + canvas: HTMLCanvasElement; + + private _config: SpineWidgetConfig; + private _assetManager: spine.webgl.AssetManager; + private _shader: spine.webgl.Shader; + private _batcher: spine.webgl.PolygonBatcher; + private _mvp = new spine.webgl.Matrix4(); + private _skeletonRenderer: spine.webgl.SkeletonRenderer; + private _paused = false; + private _lastFrameTime = Date.now() / 1000.0; + private _backgroundColor = new Color(); + private _loaded = false; + + constructor (element: Element | string, config: SpineWidgetConfig) { + if (!element) throw new Error("Please provide a DOM element, e.g. document.getElementById('myelement')"); + if (!config) throw new Error("Please provide a configuration, specifying at least the json file, atlas file and animation name"); + + let elementId = element as string; + if (typeof(element) === "string") element = document.getElementById(element as string); + if (element == null) throw new Error(`Element ${elementId} does not exist`); + + this.validateConfig(config); + + let canvas = this.canvas = document.createElement("canvas"); + ( element).appendChild(canvas); + canvas.width = config.width; + canvas.height = config.height; + var webglConfig = { alpha: false }; + let gl = this.gl = (canvas.getContext("webgl", webglConfig) || canvas.getContext("experimental-webgl", webglConfig)); + + this._shader = spine.webgl.Shader.newColoredTextured(gl); + this._batcher = new spine.webgl.PolygonBatcher(gl); + this._mvp.ortho2d(0, 0, 639, 479); + this._skeletonRenderer = new spine.webgl.SkeletonRenderer(gl); + + let assets = this._assetManager = new spine.webgl.AssetManager(gl); + assets.loadText(config.atlas); + assets.loadText(config.json); + assets.loadTexture(config.atlas.replace(".atlas", ".png")); + requestAnimationFrame(() => { this.load(); }); + } + + private validateConfig (config: SpineWidgetConfig) { + if (!config.atlas) throw new Error("Please specify config.atlas"); + if (!config.json) throw new Error("Please specify config.json"); + if (!config.animation) throw new Error("Please specify config.animationName"); + + if (!config.scale) config.scale = 1.0; + if (!config.skin) config.skin = "default"; + if (config.loop === undefined) config.loop = true; + if (!config.y) config.y = 20; + if (!config.width) config.width = 640; + if (!config.height) config.height = 480; + if (!config.x) config.x = config.width / 2; + if (!config.backgroundColor) config.backgroundColor = "#555555"; + if (!config.imagesPath) { + let index = config.atlas.lastIndexOf("/"); + if (index != -1) { + config.imagesPath = config.atlas.substr(0, index) + "/"; + } else { + config.imagesPath = ""; + } + } + if (!config.premultipliedAlpha === undefined) config.premultipliedAlpha = false; + this._backgroundColor.setFromString(config.backgroundColor); + this._config = config; + } + + private load () { + let assetManager = this._assetManager; + let imagesPath = this._config.imagesPath; + let config = this._config; + if (assetManager.isLoadingComplete()) { + if (assetManager.hasErrors()) { + if (config.error) config.error(this, "Failed to load assets: " + JSON.stringify(assetManager.errors)); + else throw new Error("Failed to load assets: " + JSON.stringify(assetManager.errors)); + } + + let atlas = new spine.webgl.TextureAtlas(this._assetManager.get(this._config.atlas) as string, (path) => { + return assetManager.get(imagesPath + path) as spine.webgl.Texture; + }); + + let atlasLoader = new spine.webgl.TextureAtlasAttachmentLoader(atlas); + var skeletonJson = new spine.SkeletonJson(atlasLoader); + + // Set the scale to apply during parsing, parse the file, and create a new skeleton. + skeletonJson.scale = config.scale; + var skeletonData = skeletonJson.readSkeletonData(assetManager.get(config.json) as string); + var skeleton = this.skeleton = new spine.Skeleton(skeletonData); + skeleton.x = config.x; + skeleton.y = config.y; + skeleton.setSkinByName(config.skin); + + var animationState = this.state = new spine.AnimationState(new spine.AnimationStateData(skeleton.data)); + animationState.setAnimation(0, config.animation, true); + if (config.success) config.success(this); + this._loaded = true; + requestAnimationFrame(() => { this.render(); }); + } else + requestAnimationFrame(() => { this.load(); }); + } + + private render () { + var now = Date.now() / 1000; + var delta = now - this._lastFrameTime; + if (delta > 0.1) delta = 0; + this._lastFrameTime = now; + + let gl = this.gl; + let color = this._backgroundColor; + gl.clearColor(color.r, color.g, color.b, color.a); + gl.clear(gl.COLOR_BUFFER_BIT); + + // Apply the animation state based on the delta time. + var state = this.state; + var skeleton = this.skeleton; + var premultipliedAlpha = this._config.premultipliedAlpha; + state.update(delta); + state.apply(skeleton); + skeleton.updateWorldTransform(); + + // Bind the shader and set the texture and model-view-projection matrix. + let shader = this._shader; + shader.bind(); + shader.setUniformi(spine.webgl.Shader.SAMPLER, 0); + shader.setUniform4x4f(spine.webgl.Shader.MVP_MATRIX, this._mvp.values); + + // Start the batch and tell the SkeletonRenderer to render the active skeleton. + let batcher = this._batcher; + let skeletonRenderer = this._skeletonRenderer; + batcher.begin(shader); + skeletonRenderer.premultipliedAlpha = premultipliedAlpha; + skeletonRenderer.draw(batcher, skeleton); + batcher.end(); + + shader.unbind(); + + if (!this._paused) requestAnimationFrame(() => { this.render(); }); + } + + pause () { + this._paused = true; + } + + play () { + this._paused = false; + requestAnimationFrame(() => { this.render(); }); + } + + isPlaying () { + return !this._paused; + } + + setAnimation (animationName: string) { + if (!this._loaded) throw new Error("Widget isn't loaded yet"); + this.skeleton.setToSetupPose(); + this.state.setAnimation(0, animationName, this._config.loop); + } + + + static loadWidgets() { + let widgets = document.getElementsByClassName("spine-widget"); + for (var i = 0; i < widgets.length; i++) { + SpineWidget.loadWidget(widgets[i]); + } + } + + static loadWidget(widget: Element) { + let config = new SpineWidgetConfig(); + config.atlas = widget.getAttribute("data-atlas"); + config.json = widget.getAttribute("data-json"); + config.animation = widget.getAttribute("data-animation"); + if (widget.getAttribute("data-images-path")) config.imagesPath = widget.getAttribute("data-images-path"); + if (widget.getAttribute("data-skin")) config.skin = widget.getAttribute("data-skin"); + if (widget.getAttribute("data-loop")) config.loop = widget.getAttribute("data-loop") === "true"; + if (widget.getAttribute("data-scale")) config.scale = parseFloat(widget.getAttribute("data-scale")); + if (widget.getAttribute("data-x")) config.x = parseFloat(widget.getAttribute("data-x")); + if (widget.getAttribute("data-y")) config.x = parseFloat(widget.getAttribute("data-y")); + if (widget.getAttribute("data-width")) config.width = parseInt(widget.getAttribute("data-width")); + if (widget.getAttribute("data-height")) config.height = parseInt(widget.getAttribute("data-height")); + if (widget.getAttribute("data-background-color")) config.backgroundColor = widget.getAttribute("data-background-color"); + if (widget.getAttribute("data-premultiplied-alpha")) config.premultipliedAlpha = widget.getAttribute("data-premultiplied-alpha") === "true"; + + new spine.SpineWidget(widget, config); + } + + static pageLoaded = false; + private static ready () { + if (SpineWidget.pageLoaded) return; + SpineWidget.pageLoaded = true; + SpineWidget.loadWidgets(); + } + + static setupDOMListener() { + if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", SpineWidget.ready, false); + window.addEventListener("load", SpineWidget.ready, false); + } else { + (document).attachEvent("onreadystatechange", function readyStateChange() { + if (document.readyState === "complete" ) SpineWidget.ready(); + }); + (window).attachEvent("onload", SpineWidget.ready); + } + } + } + + export class SpineWidgetConfig { + json: string; + atlas: string; + animation: string; + imagesPath: string; + skin = "default"; + loop = true; + scale = 1.0; + x = 0; + y = 0; + width = 640; + height = 480; + backgroundColor = "#555555"; + premultipliedAlpha = false; + success: (widget: SpineWidget) => void; + error: (widget: SpineWidget, msg: string) => void; + } +} +spine.SpineWidget.setupDOMListener(); \ No newline at end of file