diff --git a/.gitignore b/.gitignore index 833666d36..a828f2014 100644 --- a/.gitignore +++ b/.gitignore @@ -19,8 +19,9 @@ spine-cpp/Debug/* spine-sfml/Debug/* spine-sfml/SFML -spine-libgdx/bin/* -spine-libgdx/libs/* +spine-libgdx/spine-libgdx/bin/* +spine-libgdx/spine-libgdx-tests/bin/* +spine-libgdx/spine-skeletonviewer/bin/* spine-cocos2dx/2/cocos2dx/ !spine-cocos2dx/2/cocos2dx/Place cocos2dx here.txt @@ -32,6 +33,8 @@ xcuserdata spine-cocos2d-iphone/2/cocos2d/* !spine-cocos2d-iphone/2/cocos2d/Place cocos2d here.txt +spine-cocos2d-iphone/3/cocos2d/* +!spine-cocos2d-iphone/3/cocos2d/Place cocos2d here.txt spine-csharp/bin spine-csharp/obj @@ -83,6 +86,9 @@ spine-love/love/ spine-as3/spine-as3/bin spine-as3/spine-as3-example/bin-debug spine-as3/spine-as3-example/bin-release + spine-starling/spine-starling/bin spine-starling/spine-starling-example/bin-debug spine-starling/spine-starling-example/bin-release + +spine-turbulenz/spine-js/spine.js diff --git a/spine-as3/README.md b/spine-as3/README.md index 9669ecadd..2de67af4e 100644 --- a/spine-as3/README.md +++ b/spine-as3/README.md @@ -13,3 +13,7 @@ Alternatively, the contents of the `spine-as3/src` directory can be copied into * [Flash Demo](http://esotericsoftware.com/spine/files/demos/as3/spineboy/index.html) * [Flash Demo source](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-as3/spine-as3-example/src/Main.as#L55) + +## Notes + +- Atlas images should not use premultiplied alpha. diff --git a/spine-as3/spine-as3-example/.actionScriptProperties b/spine-as3/spine-as3-example/.actionScriptProperties index 0d78d262b..c1ebbc092 100644 --- a/spine-as3/spine-as3-example/.actionScriptProperties +++ b/spine-as3/spine-as3-example/.actionScriptProperties @@ -1,6 +1,6 @@ - - + + @@ -33,10 +33,9 @@ - + - diff --git a/spine-cocos2dx/2/example/Resources/ipad-retina/goblins-ffd.atlas b/spine-as3/spine-as3-example/src/goblins-mesh.atlas similarity index 99% rename from spine-cocos2dx/2/example/Resources/ipad-retina/goblins-ffd.atlas rename to spine-as3/spine-as3-example/src/goblins-mesh.atlas index 5fefae2bb..d0ddb80c6 100644 --- a/spine-cocos2dx/2/example/Resources/ipad-retina/goblins-ffd.atlas +++ b/spine-as3/spine-as3-example/src/goblins-mesh.atlas @@ -1,5 +1,5 @@ -goblins-ffd.png +goblins-mesh.png format: RGBA8888 filter: Linear,Linear repeat: none diff --git a/spine-as3/spine-as3-example/src/goblins-ffd.json b/spine-as3/spine-as3-example/src/goblins-mesh.json similarity index 100% rename from spine-as3/spine-as3-example/src/goblins-ffd.json rename to spine-as3/spine-as3-example/src/goblins-mesh.json diff --git a/spine-as3/spine-as3-example/src/goblins-ffd.png b/spine-as3/spine-as3-example/src/goblins-mesh.png similarity index 100% rename from spine-as3/spine-as3-example/src/goblins-ffd.png rename to spine-as3/spine-as3-example/src/goblins-mesh.png diff --git a/spine-as3/spine-as3-example/src/Main.as b/spine-as3/spine-as3-example/src/spine/Main.as similarity index 95% rename from spine-as3/spine-as3-example/src/Main.as rename to spine-as3/spine-as3-example/src/spine/Main.as index 3f499db10..bf8c1c6fa 100644 --- a/spine-as3/spine-as3-example/src/Main.as +++ b/spine-as3/spine-as3-example/src/spine/Main.as @@ -28,20 +28,17 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -package { +package spine { import flash.display.Sprite; -import spine.Event; -import spine.SkeletonData; -import spine.SkeletonJson; import spine.animation.AnimationStateData; import spine.atlas.Atlas; import spine.attachments.AtlasAttachmentLoader; import spine.flash.FlashTextureLoader; import spine.flash.SkeletonAnimation; -[SWF(width = "640", height = "480", frameRate = "60", backgroundColor = "#dddddd")] +[SWF(width = "800", height = "600", frameRate = "60", backgroundColor = "#dddddd")] public class Main extends Sprite { [Embed(source = "spineboy.atlas", mimeType = "application/octet-stream")] static public const SpineboyAtlas:Class; @@ -66,8 +63,8 @@ public class Main extends Sprite { stateData.setMixByName("jump", "jump", 0.2); skeleton = new SkeletonAnimation(skeletonData, stateData); - skeleton.x = 320; - skeleton.y = 420; + skeleton.x = 400; + skeleton.y = 560; skeleton.state.onStart.add(function (trackIndex:int) : void { trace(trackIndex + " start: " + skeleton.state.getCurrent(trackIndex)); diff --git a/spine-as3/spine-as3/src/spine/Bone.as b/spine-as3/spine-as3/src/spine/Bone.as index 0330f0257..c548b36e0 100644 --- a/spine-as3/spine-as3/src/spine/Bone.as +++ b/spine-as3/spine-as3/src/spine/Bone.as @@ -34,12 +34,16 @@ public class Bone { static public var yDown:Boolean; internal var _data:BoneData; + internal var _skeleton:Skeleton; internal var _parent:Bone; public var x:Number; public var y:Number; public var rotation:Number; + public var rotationIK:Number; public var scaleX:Number public var scaleY:Number; + public var flipX:Boolean; + public var flipY:Boolean; internal var _m00:Number; internal var _m01:Number; @@ -50,50 +54,61 @@ public class Bone { internal var _worldRotation:Number; internal var _worldScaleX:Number; internal var _worldScaleY:Number; + internal var _worldFlipX:Boolean; + internal var _worldFlipY:Boolean; /** @param parent May be null. */ - public function Bone (data:BoneData, parent:Bone) { - if (data == null) - throw new ArgumentError("data cannot be null."); + public function Bone (data:BoneData, skeleton:Skeleton, parent:Bone) { + if (data == null) throw new ArgumentError("data cannot be null."); + if (skeleton == null) throw new ArgumentError("skeleton cannot be null."); _data = data; + _skeleton = skeleton; _parent = parent; setToSetupPose(); } /** Computes the world SRT using the parent bone and the local SRT. */ - public function updateWorldTransform (flipX:Boolean, flipY:Boolean) : void { - if (_parent != null) { - _worldX = x * _parent._m00 + y * _parent._m01 + _parent._worldX; - _worldY = x * _parent._m10 + y * _parent._m11 + _parent._worldY; + public function updateWorldTransform () : void { + var parent:Bone = _parent; + if (parent) { + _worldX = x * parent._m00 + y * parent._m01 + parent._worldX; + _worldY = x * parent._m10 + y * parent._m11 + parent._worldY; if (_data.inheritScale) { - _worldScaleX = _parent._worldScaleX * scaleX; - _worldScaleY = _parent._worldScaleY * scaleY; + _worldScaleX = parent._worldScaleX * scaleX; + _worldScaleY = parent._worldScaleY * scaleY; } else { _worldScaleX = scaleX; _worldScaleY = scaleY; } - _worldRotation = _data.inheritRotation ? _parent._worldRotation + rotation : rotation; + _worldRotation = _data.inheritRotation ? parent._worldRotation + rotationIK : rotationIK; + _worldFlipX = parent._worldFlipX != flipX; + _worldFlipY = parent._worldFlipY != flipY; } else { - _worldX = flipX ? -x : x; - _worldY = flipY != yDown ? -y : y; + var skeletonFlipX:Boolean = _skeleton.flipX, skeletonFlipY:Boolean = _skeleton.flipY; + _worldX = skeletonFlipX ? -x : x; + _worldY = skeletonFlipY != yDown ? -y : y; _worldScaleX = scaleX; _worldScaleY = scaleY; - _worldRotation = rotation; + _worldRotation = rotationIK; + _worldFlipX = skeletonFlipX != flipX; + _worldFlipY = skeletonFlipY != flipY; } var radians:Number = _worldRotation * (Math.PI / 180); var cos:Number = Math.cos(radians); var sin:Number = Math.sin(radians); - _m00 = cos * _worldScaleX; - _m10 = sin * _worldScaleX; - _m01 = -sin * _worldScaleY; - _m11 = cos * _worldScaleY; - if (flipX) { - _m00 = -_m00; - _m01 = -_m01; + if (_worldFlipX) { + _m00 = -cos * _worldScaleX; + _m01 = sin * _worldScaleY; + } else { + _m00 = cos * _worldScaleX; + _m01 = -sin * _worldScaleY; } - if (flipY != yDown) { - _m10 = -_m10; - _m11 = -_m11; + if (_worldFlipY != yDown) { + _m10 = -sin * _worldScaleX; + _m11 = -cos * _worldScaleY; + } else { + _m10 = sin * _worldScaleX; + _m11 = cos * _worldScaleY; } } @@ -101,17 +116,24 @@ public class Bone { x = _data.x; y = _data.y; rotation = _data.rotation; + rotationIK = rotation; scaleX = _data.scaleX; scaleY = _data.scaleY; + flipX = _data.flipX; + flipY = _data.flipY; } public function get data () : BoneData { return _data; } - + public function get parent () : Bone { return _parent; } + + public function get skeleton () : Skeleton { + return _skeleton; + } public function get m00 () : Number { return _m00; @@ -148,6 +170,32 @@ public class Bone { public function get worldScaleY () : Number { return _worldScaleY; } + + public function get worldFlipX () : Boolean { + return _worldFlipX; + } + + public function get worldFlipY () : Boolean { + return _worldFlipY; + } + + public function worldToLocal (world:Vector.) : void { + var dx:Number = world[0] - _worldX, dy:Number = world[1] - _worldY; + var m00:Number = _m00, m10:Number = _m10, m01:Number = _m01, m11:Number = _m11; + if (_worldFlipX != (_worldFlipY != yDown)) { + m00 = -m00; + m11 = -m11; + } + var invDet:Number = 1 / (m00 * m11 - m01 * m10); + world[0] = (dx * m00 * invDet - dy * m01 * invDet); + world[1] = (dy * m11 * invDet - dx * m10 * invDet); + } + + public function localToWorld (local:Vector.) : void { + var localX:Number = local[0], localY:Number = local[1]; + local[0] = localX * _m00 + localY * _m01 + _worldX; + local[1] = localX * _m10 + localY * _m11 + _worldY; + } public function toString () : String { return _data._name; diff --git a/spine-as3/spine-as3/src/spine/BoneData.as b/spine-as3/spine-as3/src/spine/BoneData.as index cdc738904..a5cc2546e 100644 --- a/spine-as3/spine-as3/src/spine/BoneData.as +++ b/spine-as3/spine-as3/src/spine/BoneData.as @@ -31,8 +31,8 @@ package spine { public class BoneData { - internal var _parent:BoneData; internal var _name:String; + internal var _parent:BoneData; public var length:Number; public var x:Number; public var y:Number; @@ -41,24 +41,25 @@ public class BoneData { public var scaleY:Number = 1; public var inheritScale:Boolean = true; public var inheritRotation:Boolean = true; + public var flipX:Boolean; + public var flipY:Boolean; /** @param parent May be null. */ public function BoneData (name:String, parent:BoneData) { - if (name == null) - throw new ArgumentError("name cannot be null."); + if (name == null) throw new ArgumentError("name cannot be null."); _name = name; _parent = parent; } + public function get name () : String { + return _name; + } + /** @return May be null. */ public function get parent () : BoneData { return _parent; } - public function get name () : String { - return _name; - } - public function toString () : String { return _name; } diff --git a/spine-as3/spine-as3/src/spine/Event.as b/spine-as3/spine-as3/src/spine/Event.as index 9d22320ad..e33e75022 100644 --- a/spine-as3/spine-as3/src/spine/Event.as +++ b/spine-as3/spine-as3/src/spine/Event.as @@ -37,8 +37,7 @@ public class Event { public var stringValue:String; public function Event (data:EventData) { - if (data == null) - throw new ArgumentError("data cannot be null."); + if (data == null) throw new ArgumentError("data cannot be null."); _data = data; } diff --git a/spine-as3/spine-as3/src/spine/EventData.as b/spine-as3/spine-as3/src/spine/EventData.as index 8ac68e670..b2896a5fe 100644 --- a/spine-as3/spine-as3/src/spine/EventData.as +++ b/spine-as3/spine-as3/src/spine/EventData.as @@ -37,8 +37,7 @@ public class EventData { public var stringValue:String; public function EventData (name:String) { - if (name == null) - throw new ArgumentError("name cannot be null."); + if (name == null) throw new ArgumentError("name cannot be null."); _name = name; } diff --git a/spine-as3/spine-as3/src/spine/IkConstraint.as b/spine-as3/spine-as3/src/spine/IkConstraint.as new file mode 100644 index 000000000..7e754b6d0 --- /dev/null +++ b/spine-as3/spine-as3/src/spine/IkConstraint.as @@ -0,0 +1,149 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +package spine { + +public class IkConstraint { + static private const tempPosition:Vector. = new Vector.(2, true); + static private const radDeg:Number = 180 / Math.PI; + + internal var _data:IkConstraintData; + public var bones:Vector.; + public var target:Bone; + public var bendDirection:int; + public var mix:Number; + + public function IkConstraint (data:IkConstraintData, skeleton:Skeleton) { + if (data == null) throw new ArgumentError("data cannot be null."); + if (skeleton == null) throw new ArgumentError("skeleton cannot be null."); + _data = data; + mix = data.mix; + bendDirection = data.bendDirection; + + bones = new Vector.(); + for each (var boneData:BoneData in data.bones) + bones[bones.length] = skeleton.findBone(boneData.name); + target = skeleton.findBone(data.target._name); + } + + public function apply () : void { + switch (bones.length) { + case 1: + apply1(bones[0], target._worldX, target._worldY, mix); + break; + case 2: + apply2(bones[0], bones[1], target._worldX, target._worldY, bendDirection, mix); + break; + } + } + + public function get data () : IkConstraintData { + return _data; + } + + public function toString () : String { + return _data._name; + } + + /** 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. */ + static public function apply1 (bone:Bone, targetX:Number, targetY:Number, alpha:Number) : void { + var parentRotation:Number = (!bone._data.inheritRotation || bone._parent == null) ? 0 : bone._parent._worldRotation; + var rotation:Number = bone.rotation; + var rotationIK:Number = Math.atan2(targetY - bone._worldY, targetX - bone._worldX) * radDeg - parentRotation; + bone.rotationIK = rotation + (rotationIK - rotation) * alpha; + } + + /** 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 Any descendant bone of the parent. */ + static public function apply2 (parent:Bone, child:Bone, targetX:Number, targetY:Number, bendDirection:int, alpha:Number) : void { + var childRotation:Number = child.rotation, parentRotation:Number = parent.rotation; + if (alpha == 0) { + child.rotationIK = childRotation; + parent.rotationIK = parentRotation; + return; + } + var positionX:Number, positionY:Number; + var parentParent:Bone = parent._parent; + if (parentParent) { + tempPosition[0] = targetX; + tempPosition[1] = targetY; + parentParent.worldToLocal(tempPosition); + targetX = (tempPosition[0] - parent.x) * parentParent._worldScaleX; + targetY = (tempPosition[1] - parent.y) * parentParent._worldScaleY; + } else { + targetX -= parent.x; + targetY -= parent.y; + } + if (child._parent == parent) { + positionX = child.x; + positionY = child.y; + } else { + tempPosition[0] = child.x; + tempPosition[1] = child.y; + child._parent.localToWorld(tempPosition); + parent.worldToLocal(tempPosition); + positionX = tempPosition[0]; + positionY = tempPosition[1]; + } + var childX:Number = positionX * parent._worldScaleX, childY:Number = positionY * parent._worldScaleY; + var offset:Number = Math.atan2(childY, childX); + var len1:Number = Math.sqrt(childX * childX + childY * childY), len2:Number = child.data.length * child._worldScaleX; + // Based on code by Ryan Juckett with permission: Copyright (c) 2008-2009 Ryan Juckett, http://www.ryanjuckett.com/ + var cosDenom:Number = 2 * len1 * len2; + if (cosDenom < 0.0001) { + child.rotationIK = childRotation + (Math.atan2(targetY, targetX) * radDeg - parentRotation - childRotation) * alpha; + return; + } + var cos:Number = (targetX * targetX + targetY * targetY - len1 * len1 - len2 * len2) / cosDenom; + if (cos < -1) + cos = -1; + else if (cos > 1) + cos = 1; + var childAngle:Number = Math.acos(cos) * bendDirection; + var adjacent:Number = len1 + len2 * cos, opposite:Number = len2 * Math.sin(childAngle); + var parentAngle:Number = Math.atan2(targetY * adjacent - targetX * opposite, targetX * adjacent + targetY * opposite); + var rotation:Number = (parentAngle - offset) * radDeg - parentRotation; + if (rotation > 180) + rotation -= 360; + else if (rotation < -180) // + rotation += 360; + parent.rotationIK = parentRotation + rotation * alpha; + rotation = (childAngle + offset) * radDeg - childRotation; + if (rotation > 180) + rotation -= 360; + else if (rotation < -180) // + rotation += 360; + child.rotationIK = childRotation + (rotation + parent._worldRotation - child._parent._worldRotation) * alpha; + } +} + +} diff --git a/spine-as3/spine-as3/src/spine/IkConstraintData.as b/spine-as3/spine-as3/src/spine/IkConstraintData.as new file mode 100644 index 000000000..4a3e64782 --- /dev/null +++ b/spine-as3/spine-as3/src/spine/IkConstraintData.as @@ -0,0 +1,54 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +package spine { + +public class IkConstraintData { + internal var _name:String; + public var bones:Vector. = new Vector.(); + public var target:BoneData; + public var bendDirection:int = 1; + public var mix:Number = 1; + + public function IkConstraintData (name:String) { + if (name == null) throw new ArgumentError("name cannot be null."); + _name = name; + } + + public function get name () : String { + return _name; + } + + public function toString () : String { + return _name; + } +} + +} diff --git a/spine-as3/spine-as3/src/spine/Skeleton.as b/spine-as3/spine-as3/src/spine/Skeleton.as index 04ff6b8f2..fd17d693a 100644 --- a/spine-as3/spine-as3/src/spine/Skeleton.as +++ b/spine-as3/spine-as3/src/spine/Skeleton.as @@ -33,45 +33,95 @@ import spine.attachments.Attachment; public class Skeleton { internal var _data:SkeletonData; - internal var _bones:Vector.; - internal var _slots:Vector.; - internal var _drawOrder:Vector.; - internal var _skin:Skin; - public var r:Number = 1; - public var g:Number = 1; - public var b:Number = 1; - public var a:Number = 1; + public var bones:Vector.; + public var slots:Vector.; + public var drawOrder:Vector.; + public var ikConstraints:Vector.; + private var _boneCache:Vector.> = new Vector.>(); + private var _skin:Skin; + public var r:Number = 1, g:Number = 1, b:Number = 1, a:Number = 1; public var time:Number = 0; - public var flipX:Boolean; - public var flipY:Boolean; - public var x:Number = 0; - public var y:Number = 0; + public var flipX:Boolean, flipY:Boolean; + public var x:Number = 0, y:Number = 0; public function Skeleton (data:SkeletonData) { if (data == null) throw new ArgumentError("data cannot be null."); _data = data; - _bones = new Vector.(); + bones = new Vector.(); for each (var boneData:BoneData in data.bones) { - var parent:Bone = boneData.parent == null ? null : _bones[data.bones.indexOf(boneData.parent)]; - _bones[_bones.length] = new Bone(boneData, parent); + var parent:Bone = boneData.parent == null ? null : bones[data.bones.indexOf(boneData.parent)]; + bones[bones.length] = new Bone(boneData, this, parent); } - _slots = new Vector.(); - _drawOrder = new Vector.(); + slots = new Vector.(); + drawOrder = new Vector.(); for each (var slotData:SlotData in data.slots) { - var bone:Bone = _bones[data.bones.indexOf(slotData.boneData)]; - var slot:Slot = new Slot(slotData, this, bone); - _slots[_slots.length] = slot; - _drawOrder[_drawOrder.length] = slot; + var bone:Bone = bones[data.bones.indexOf(slotData.boneData)]; + var slot:Slot = new Slot(slotData, bone); + slots[slots.length] = slot; + drawOrder[drawOrder.length] = slot; + } + + ikConstraints = new Vector.() + for each (var ikConstraintData:IkConstraintData in data.ikConstraints) + ikConstraints[ikConstraints.length] = new IkConstraint(ikConstraintData, this); + + updateCache(); + } + + /** Caches information about bones and IK constraints. Must be called if bones or IK constraints are added or removed. */ + public function updateCache () : void { + var ikConstraintsCount:int = ikConstraints.length; + + var arrayCount:int = ikConstraintsCount + 1; + if (_boneCache.length > arrayCount) _boneCache.splice(arrayCount, _boneCache.length - arrayCount); + for each (var cachedBones:Vector. in _boneCache) + cachedBones.length = 0; + while (_boneCache.length < arrayCount) + _boneCache[_boneCache.length] = new Vector.(); + + var nonIkBones:Vector. = _boneCache[0]; + + outer: + for each (var bone:Bone in bones) { + var current:Bone = bone; + do { + var ii:int = 0; + for each (var ikConstraint:IkConstraint in ikConstraints) { + var parent:Bone = ikConstraint.bones[0]; + var child:Bone = ikConstraint.bones[int(ikConstraint.bones.length - 1)]; + while (true) { + if (current == child) { + _boneCache[ii].push(bone); + _boneCache[int(ii + 1)].push(bone); + continue outer; + } + if (child == parent) break; + child = child.parent; + } + ii++; + } + current = current.parent; + } while (current != null); + nonIkBones[nonIkBones.length] = bone; } } - /** Updates the world transform for each bone. */ + /** Updates the world transform for each bone and applies IK constraints. */ public function updateWorldTransform () : void { - for each (var bone:Bone in _bones) - bone.updateWorldTransform(flipX, flipY); + var bone:Bone; + for each (bone in bones) + bone.rotationIK = bone.rotation; + var i:int = 0, last:int = _boneCache.length - 1; + while (true) { + for each (bone in _boneCache[i]) + bone.updateWorldTransform(); + if (i == last) break; + ikConstraints[i].apply(); + i++; + } } /** Sets the bones and slots to their setup pose values. */ @@ -81,13 +131,18 @@ public class Skeleton { } public function setBonesToSetupPose () : void { - for each (var bone:Bone in _bones) + for each (var bone:Bone in bones) bone.setToSetupPose(); + + for each (var ikConstraint:IkConstraint in ikConstraints) { + ikConstraint.bendDirection = ikConstraint._data.bendDirection; + ikConstraint.mix = ikConstraint._data.mix; + } } public function setSlotsToSetupPose () : void { var i:int = 0; - for each (var slot:Slot in _slots) { + for each (var slot:Slot in slots) { drawOrder[i++] = slot; slot.setToSetupPose(); } @@ -97,23 +152,17 @@ public class Skeleton { return _data; } - public function get bones () : Vector. { - return _bones; - } - public function get rootBone () : Bone { - if (_bones.length == 0) - return null; - return _bones[0]; + if (bones.length == 0) return null; + return bones[0]; } /** @return May be null. */ public function findBone (boneName:String) : Bone { if (boneName == null) throw new ArgumentError("boneName cannot be null."); - for each (var bone:Bone in _bones) - if (bone.data.name == boneName) - return bone; + for each (var bone:Bone in bones) + if (bone._data._name == boneName) return bone; return null; } @@ -122,25 +171,19 @@ public class Skeleton { if (boneName == null) throw new ArgumentError("boneName cannot be null."); var i:int = 0; - for each (var bone:Bone in _bones) { - if (bone.data.name == boneName) - return i; + for each (var bone:Bone in bones) { + if (bone._data._name == boneName) return i; i++; } return -1; } - public function get slots () : Vector. { - return _slots; - } - /** @return May be null. */ public function findSlot (slotName:String) : Slot { if (slotName == null) throw new ArgumentError("slotName cannot be null."); - for each (var slot:Slot in _slots) - if (slot.data.name == slotName) - return slot; + for each (var slot:Slot in slots) + if (slot._data._name == slotName) return slot; return null; } @@ -149,32 +192,31 @@ public class Skeleton { if (slotName == null) throw new ArgumentError("slotName cannot be null."); var i:int = 0; - for each (var slot:Slot in _slots) { - if (slot.data.name == slotName) - return i; + for each (var slot:Slot in slots) { + if (slot._data._name == slotName) return i; i++; } return -1; } - public function get drawOrder () : Vector. { - return _drawOrder; - } - public function get skin () : Skin { return _skin; } public function set skinName (skinName:String) : void { var skin:Skin = data.findSkin(skinName); - if (skin == null) - throw new ArgumentError("Skin not found: " + skinName); + if (skin == null) throw new ArgumentError("Skin not found: " + skinName); this.skin = skin; } - /** Sets the skin used to look up attachments not found 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. + /** @return May be null. */ + public function get skinName () : String { + return _skin == null ? null : _skin._name; + } + + /** 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. */ public function set skin (newSkin:Skin) : void { if (newSkin) { @@ -182,8 +224,8 @@ public class Skeleton { newSkin.attachAll(this, skin); else { var i:int = 0; - for each (var slot:Slot in _slots) { - var name:String = slot.data.attachmentName; + for each (var slot:Slot in slots) { + var name:String = slot._data.attachmentName; if (name) { var attachment:Attachment = newSkin.getAttachment(i, name); if (attachment) slot.attachment = attachment; @@ -202,25 +244,21 @@ public class Skeleton { /** @return May be null. */ public function getAttachmentForSlotIndex (slotIndex:int, attachmentName:String) : Attachment { - if (attachmentName == null) - throw new ArgumentError("attachmentName cannot be null."); + if (attachmentName == null) throw new ArgumentError("attachmentName cannot be null."); if (skin != null) { var attachment:Attachment = skin.getAttachment(slotIndex, attachmentName); - if (attachment != null) - return attachment; + if (attachment != null) return attachment; } - if (data.defaultSkin != null) - return data.defaultSkin.getAttachment(slotIndex, attachmentName); + if (data.defaultSkin != null) return data.defaultSkin.getAttachment(slotIndex, attachmentName); return null; } /** @param attachmentName May be null. */ public function setAttachment (slotName:String, attachmentName:String) : void { - if (slotName == null) - throw new ArgumentError("slotName cannot be null."); + if (slotName == null) throw new ArgumentError("slotName cannot be null."); var i:int = 0; - for each (var slot:Slot in _slots) { - if (slot.data.name == slotName) { + for each (var slot:Slot in slots) { + if (slot._data._name == slotName) { var attachment:Attachment = null; if (attachmentName != null) { attachment = getAttachmentForSlotIndex(i, attachmentName); @@ -235,6 +273,14 @@ public class Skeleton { throw new ArgumentError("Slot not found: " + slotName); } + /** @return May be null. */ + public function findIkConstraint (ikConstraintName:String) : IkConstraint { + if (ikConstraintName == null) throw new ArgumentError("ikConstraintName cannot be null."); + for each (var ikConstraint:IkConstraint in ikConstraints) + if (ikConstraint._data._name == ikConstraintName) return ikConstraint; + return null; + } + public function update (delta:Number) : void { time += delta; } diff --git a/spine-as3/spine-as3/src/spine/SkeletonBounds.as b/spine-as3/spine-as3/src/spine/SkeletonBounds.as index cff12650b..6335840fd 100644 --- a/spine-as3/spine-as3/src/spine/SkeletonBounds.as +++ b/spine-as3/spine-as3/src/spine/SkeletonBounds.as @@ -43,7 +43,7 @@ public class SkeletonBounds { var slots:Vector. = skeleton.slots; var slotCount:int = slots.length; var x:Number = skeleton.x, y:Number = skeleton.y; - + boundingBoxes.length = 0; for each (var polygon:Polygon in polygons) polygonPool[polygonPool.length] = polygon; diff --git a/spine-as3/spine-as3/src/spine/SkeletonData.as b/spine-as3/spine-as3/src/spine/SkeletonData.as index f09a31022..158a1f687 100644 --- a/spine-as3/spine-as3/src/spine/SkeletonData.as +++ b/spine-as3/spine-as3/src/spine/SkeletonData.as @@ -32,6 +32,7 @@ package spine { import spine.animation.Animation; public class SkeletonData { + /** May be null. */ public var name:String; public var bones:Vector. = new Vector.(); // Ordered parents first. public var slots:Vector. = new Vector.(); // Setup pose draw order. @@ -39,122 +40,87 @@ public class SkeletonData { public var defaultSkin:Skin; public var events:Vector. = new Vector.(); public var animations:Vector. = new Vector.(); + public var ikConstraints:Vector. = new Vector.(); + public var width:Number, height:Number; + public var version:String, hash:String; // --- Bones. - public function addBone (bone:BoneData) : void { - if (bone == null) - throw new ArgumentError("bone cannot be null."); - bones[bones.length] = bone; - } - /** @return May be null. */ public function findBone (boneName:String) : BoneData { - if (boneName == null) - throw new ArgumentError("boneName cannot be null."); + if (boneName == null) throw new ArgumentError("boneName cannot be null."); for (var i:int = 0, n:int = bones.length; i < n; i++) { var bone:BoneData = bones[i]; - if (bone._name == boneName) - return bone; + if (bone._name == boneName) return bone; } return null; } /** @return -1 if the bone was not found. */ public function findBoneIndex (boneName:String) : int { - if (boneName == null) - throw new ArgumentError("boneName cannot be null."); + if (boneName == null) throw new ArgumentError("boneName cannot be null."); for (var i:int = 0, n:int = bones.length; i < n; i++) - if (bones[i]._name == boneName) - return i; + if (bones[i]._name == boneName) return i; return -1; } // --- Slots. - public function addSlot (slot:SlotData) : void { - if (slot == null) - throw new ArgumentError("slot cannot be null."); - slots[slots.length] = slot; - } - /** @return May be null. */ public function findSlot (slotName:String) : SlotData { - if (slotName == null) - throw new ArgumentError("slotName cannot be null."); + if (slotName == null) throw new ArgumentError("slotName cannot be null."); for (var i:int = 0, n:int = slots.length; i < n; i++) { var slot:SlotData = slots[i]; - if (slot._name == slotName) - return slot; + if (slot._name == slotName) return slot; } return null; } /** @return -1 if the bone was not found. */ public function findSlotIndex (slotName:String) : int { - if (slotName == null) - throw new ArgumentError("slotName cannot be null."); + if (slotName == null) throw new ArgumentError("slotName cannot be null."); for (var i:int = 0, n:int = slots.length; i < n; i++) - if (slots[i]._name == slotName) - return i; + if (slots[i]._name == slotName) return i; return -1; } // --- Skins. - public function addSkin (skin:Skin) : void { - if (skin == null) - throw new ArgumentError("skin cannot be null."); - skins[skins.length] = skin; - } - /** @return May be null. */ public function findSkin (skinName:String) : Skin { - if (skinName == null) - throw new ArgumentError("skinName cannot be null."); + if (skinName == null) throw new ArgumentError("skinName cannot be null."); for each (var skin:Skin in skins) - if (skin._name == skinName) - return skin; + if (skin._name == skinName) return skin; return null; } // --- Events. - public function addEvent (eventData:EventData) : void { - if (eventData == null) - throw new ArgumentError("eventData cannot be null."); - events[events.length] = eventData; - } - /** @return May be null. */ public function findEvent (eventName:String) : EventData { - if (eventName == null) - throw new ArgumentError("eventName cannot be null."); - for (var i:int = 0, n:int = events.length; i < n; i++) { - var eventData:EventData = events[i]; - if (eventData.name == eventName) - return eventData; - } + if (eventName == null) throw new ArgumentError("eventName cannot be null."); + for each (var eventData:EventData in events) + if (eventData._name == eventName) return eventData; return null; } // --- Animations. - public function addAnimation (animation:Animation) : void { - if (animation == null) - throw new ArgumentError("animation cannot be null."); - animations[animations.length] = animation; - } - /** @return May be null. */ public function findAnimation (animationName:String) : Animation { - if (animationName == null) - throw new ArgumentError("animationName cannot be null."); - for (var i:int = 0, n:int = animations.length; i < n; i++) { - var animation:Animation = animations[i]; - if (animation.name == animationName) - return animation; - } + if (animationName == null) throw new ArgumentError("animationName cannot be null."); + for each (var animation:Animation in animations) + if (animation.name == animationName) return animation; + return null; + } + + // --- IK constraints. + + /** @return May be null. */ + public function findIkConstraint (ikConstraintName:String) : IkConstraintData { + if (ikConstraintName == null) throw new ArgumentError("ikConstraintName cannot be null."); + for each (var ikConstraintData:IkConstraintData in ikConstraints) + if (ikConstraintData._name == ikConstraintName) return ikConstraintData; return null; } diff --git a/spine-as3/spine-as3/src/spine/SkeletonJson.as b/spine-as3/spine-as3/src/spine/SkeletonJson.as index 0e0cc1ad9..9bceb7bf9 100644 --- a/spine-as3/spine-as3/src/spine/SkeletonJson.as +++ b/spine-as3/spine-as3/src/spine/SkeletonJson.as @@ -38,6 +38,9 @@ import spine.animation.CurveTimeline; import spine.animation.DrawOrderTimeline; import spine.animation.EventTimeline; import spine.animation.FfdTimeline; +import spine.animation.FlipXTimeline; +import spine.animation.FlipYTimeline; +import spine.animation.IkConstraintTimeline; import spine.animation.RotateTimeline; import spine.animation.ScaleTimeline; import spine.animation.Timeline; @@ -51,12 +54,6 @@ import spine.attachments.RegionAttachment; import spine.attachments.SkinnedMeshAttachment; public class SkeletonJson { - static public const TIMELINE_SCALE:String = "scale"; - static public const TIMELINE_ROTATE:String = "rotate"; - static public const TIMELINE_TRANSLATE:String = "translate"; - static public const TIMELINE_ATTACHMENT:String = "attachment"; - static public const TIMELINE_COLOR:String = "color"; - public var attachmentLoader:AttachmentLoader; public var scale:Number = 1; @@ -66,8 +63,7 @@ public class SkeletonJson { /** @param object A String or ByteArray. */ public function readSkeletonData (object:*, name:String = null) : SkeletonData { - if (object == null) - throw new ArgumentError("object cannot be null."); + if (object == null) throw new ArgumentError("object cannot be null."); var root:Object; if (object is String) @@ -82,6 +78,15 @@ public class SkeletonJson { var skeletonData:SkeletonData = new SkeletonData(); skeletonData.name = name; + // Skeleton. + var skeletonMap:Object = root["skeleton"]; + if (skeletonMap) { + skeletonData.hash = skeletonMap["hash"]; + skeletonData.version = skeletonMap["spine"]; + skeletonData.width = skeletonMap["width"] || 0; + skeletonData.height = skeletonMap["height"] || 0; + } + // Bones. var boneData:BoneData; for each (var boneMap:Object in root["bones"]) { @@ -89,8 +94,7 @@ public class SkeletonJson { var parentName:String = boneMap["parent"]; if (parentName) { parent = skeletonData.findBone(parentName); - if (!parent) - throw new Error("Parent bone not found: " + parentName); + if (!parent) throw new Error("Parent bone not found: " + parentName); } boneData = new BoneData(boneMap["name"], parent); boneData.length = (boneMap["length"] || 0) * scale; @@ -99,17 +103,37 @@ public class SkeletonJson { boneData.rotation = (boneMap["rotation"] || 0); boneData.scaleX = boneMap.hasOwnProperty("scaleX") ? boneMap["scaleX"] : 1; boneData.scaleY = boneMap.hasOwnProperty("scaleY") ? boneMap["scaleY"] : 1; + boneData.flipX = boneMap["flipX"] || false; + boneData.flipY = boneMap["flipY"] || false; boneData.inheritScale = boneMap.hasOwnProperty("inheritScale") ? boneMap["inheritScale"] : true; boneData.inheritRotation = boneMap.hasOwnProperty("inheritRotation") ? boneMap["inheritRotation"] : true; - skeletonData.addBone(boneData); + skeletonData.bones[skeletonData.bones.length] = boneData; + } + + // IK constraints. + for each (var ikMap:Object in root["ik"]) { + var ikConstraintData:IkConstraintData = new IkConstraintData(ikMap["name"]); + + for each (var boneName:String in ikMap["bones"]) { + var bone:BoneData = skeletonData.findBone(boneName); + if (!bone) throw new Error("IK bone not found: " + boneName); + ikConstraintData.bones[ikConstraintData.bones.length] = bone; + } + + ikConstraintData.target = skeletonData.findBone(ikMap["target"]); + if (!ikConstraintData.target) throw new Error("Target bone not found: " + ikMap["target"]); + + ikConstraintData.bendDirection = (!ikMap.hasOwnProperty("bendPositive") || ikMap["bendPositive"]) ? 1 : -1; + ikConstraintData.mix = ikMap.hasOwnProperty("mix") ? ikMap["mix"] : 1; + + skeletonData.ikConstraints[skeletonData.ikConstraints.length] = ikConstraintData; } // Slots. for each (var slotMap:Object in root["slots"]) { - var boneName:String = slotMap["bone"]; + boneName = slotMap["bone"]; boneData = skeletonData.findBone(boneName); - if (!boneData) - throw new Error("Slot bone not found: " + boneName); + if (!boneData) throw new Error("Slot bone not found: " + boneName); var slotData:SlotData = new SlotData(slotMap["name"], boneData); var color:String = slotMap["color"]; @@ -123,7 +147,7 @@ public class SkeletonJson { slotData.attachmentName = slotMap["attachment"]; slotData.additiveBlending = slotMap["additive"]; - skeletonData.addSlot(slotData); + skeletonData.slots[skeletonData.slots.length] = slotData; } // Skins. @@ -140,7 +164,7 @@ public class SkeletonJson { skin.addAttachment(slotIndex, attachmentName, attachment); } } - skeletonData.addSkin(skin); + skeletonData.skins[skeletonData.skins.length] = skin; if (skin.name == "default") skeletonData.defaultSkin = skin; } @@ -154,7 +178,7 @@ public class SkeletonJson { eventData.intValue = eventMap["int"] || 0; eventData.floatValue = eventMap["float"] || 0; eventData.stringValue = eventMap["string"] || null; - skeletonData.addEvent(eventData); + skeletonData.events[skeletonData.events.length] = eventData; } } @@ -286,7 +310,7 @@ public class SkeletonJson { for (timelineName in slotMap) { values = slotMap[timelineName]; - if (timelineName == TIMELINE_COLOR) { + if (timelineName == "color") { var colorTimeline:ColorTimeline = new ColorTimeline(values.length); colorTimeline.slotIndex = slotIndex; @@ -304,7 +328,7 @@ public class SkeletonJson { timelines[timelines.length] = colorTimeline; duration = Math.max(duration, colorTimeline.frames[colorTimeline.frameCount * 5 - 5]); - } else if (timelineName == TIMELINE_ATTACHMENT) { + } else if (timelineName == "attachment") { var attachmentTimeline:AttachmentTimeline = new AttachmentTimeline(values.length); attachmentTimeline.slotIndex = slotIndex; @@ -313,7 +337,7 @@ public class SkeletonJson { attachmentTimeline.setFrame(frameIndex++, valueMap["time"], valueMap["name"]); timelines[timelines.length] = attachmentTimeline; duration = Math.max(duration, attachmentTimeline.frames[attachmentTimeline.frameCount - 1]); - + } else throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); } @@ -322,13 +346,12 @@ public class SkeletonJson { var bones:Object = map["bones"]; for (var boneName:String in bones) { var boneIndex:int = skeletonData.findBoneIndex(boneName); - if (boneIndex == -1) - throw new Error("Bone not found: " + boneName); + if (boneIndex == -1) throw new Error("Bone not found: " + boneName); var boneMap:Object = bones[boneName]; for (timelineName in boneMap) { values = boneMap[timelineName]; - if (timelineName == TIMELINE_ROTATE) { + if (timelineName == "rotate") { var rotateTimeline:RotateTimeline = new RotateTimeline(values.length); rotateTimeline.boneIndex = boneIndex; @@ -341,10 +364,10 @@ public class SkeletonJson { timelines[timelines.length] = rotateTimeline; duration = Math.max(duration, rotateTimeline.frames[rotateTimeline.frameCount * 2 - 2]); - } else if (timelineName == TIMELINE_TRANSLATE || timelineName == TIMELINE_SCALE) { + } else if (timelineName == "translate" || timelineName == "scale") { var timeline:TranslateTimeline; var timelineScale:Number = 1; - if (timelineName == TIMELINE_SCALE) + if (timelineName == "scale") timeline = new ScaleTimeline(values.length); else { timeline = new TranslateTimeline(values.length); @@ -363,11 +386,43 @@ public class SkeletonJson { timelines[timelines.length] = timeline; duration = Math.max(duration, timeline.frames[timeline.frameCount * 3 - 3]); + } else if (timelineName == "flipX" || timelineName == "flipY") { + var flipX:Boolean = timelineName == "flipX"; + var flipTimeline:FlipXTimeline = flipX ? new FlipXTimeline(values.length) : new FlipYTimeline(values.length); + flipTimeline.boneIndex = boneIndex; + + var field:String = flipX ? "x" : "y"; + frameIndex = 0; + for each (valueMap in values) { + flipTimeline.setFrame(frameIndex, valueMap["time"], valueMap[field] || false); + frameIndex++; + } + timelines[timelines.length] = flipTimeline; + duration = Math.max(duration, flipTimeline.frames[flipTimeline.frameCount * 3 - 3]); + } else throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); } } + var ikMap:Object = map["ik"]; + for (var ikConstraintName:String in ikMap) { + var ikConstraint:IkConstraintData = skeletonData.findIkConstraint(ikConstraintName); + values = ikMap[ikConstraintName]; + var ikTimeline:IkConstraintTimeline = new IkConstraintTimeline(values.length); + ikTimeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(ikConstraint); + frameIndex = 0; + for each (valueMap in values) { + var mix:Number = valueMap.hasOwnProperty("mix") ? valueMap["mix"] : 1; + var bendDirection:int = (!valueMap.hasOwnProperty("bendPositive") || valueMap["bendPositive"]) ? 1 : -1; + ikTimeline.setFrame(frameIndex, valueMap["time"], mix, bendDirection); + readCurve(ikTimeline, frameIndex, valueMap); + frameIndex++; + } + timelines[timelines.length] = ikTimeline; + duration = Math.max(duration, ikTimeline.frames[ikTimeline.frameCount * 3 - 3]); + } + var ffd:Object = map["ffd"]; for (var skinName:String in ffd) { var skin:Skin = skeletonData.findSkin(skinName); @@ -426,7 +481,8 @@ public class SkeletonJson { } } - var drawOrderValues:Object = map["draworder"]; + var drawOrderValues:Object = map["drawOrder"]; + if (!drawOrderValues) drawOrderValues = map["draworder"]; if (drawOrderValues) { var drawOrderTimeline:DrawOrderTimeline = new DrawOrderTimeline(drawOrderValues.length); var slotCount:int = skeletonData.slots.length; @@ -468,7 +524,7 @@ public class SkeletonJson { frameIndex = 0; for each (var eventMap:Object in eventsMap) { var eventData:EventData = skeletonData.findEvent(eventMap["name"]); - if (eventData == null) throw new Error("Event not found: " + eventMap["name"]); + if (!eventData) throw new Error("Event not found: " + eventMap["name"]); var event:Event = new Event(eventData); event.intValue = eventMap.hasOwnProperty("int") ? eventMap["int"] : eventData.intValue; event.floatValue = eventMap.hasOwnProperty("float") ? eventMap["float"] : eventData.floatValue; @@ -479,23 +535,20 @@ public class SkeletonJson { duration = Math.max(duration, eventTimeline.frames[eventTimeline.frameCount - 1]); } - skeletonData.addAnimation(new Animation(name, timelines, duration)); + skeletonData.animations[skeletonData.animations.length] = new Animation(name, timelines, duration); } static private function readCurve (timeline:CurveTimeline, frameIndex:int, valueMap:Object) : void { var curve:Object = valueMap["curve"]; - if (curve == null) - return; + if (!curve) return; if (curve == "stepped") timeline.setStepped(frameIndex); - else if (curve is Array) { + else if (curve is Array) timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]); - } } static private function toColor (hexString:String, colorIndex:int) : Number { - if (hexString.length != 8) - throw new ArgumentError("Color hexidecimal length must be 8, recieved: " + hexString); + if (hexString.length != 8) throw new ArgumentError("Color hexidecimal length must be 8, recieved: " + hexString); return parseInt(hexString.substring(colorIndex * 2, colorIndex * 2 + 2), 16) / 255; } diff --git a/spine-as3/spine-as3/src/spine/Skin.as b/spine-as3/spine-as3/src/spine/Skin.as index c12e509ef..45f6e4b94 100644 --- a/spine-as3/spine-as3/src/spine/Skin.as +++ b/spine-as3/spine-as3/src/spine/Skin.as @@ -39,14 +39,12 @@ public class Skin { private var _attachments:Vector. = new Vector.(); public function Skin (name:String) { - if (name == null) - throw new ArgumentError("name cannot be null."); + if (name == null) throw new ArgumentError("name cannot be null."); _name = name; } public function addAttachment (slotIndex:int, name:String, attachment:Attachment) : void { - if (attachment == null) - throw new ArgumentError("attachment cannot be null."); + if (attachment == null) throw new ArgumentError("attachment cannot be null."); if (slotIndex >= attachments.length) attachments.length = slotIndex + 1; if (!attachments[slotIndex]) attachments[slotIndex] = new Dictionary(); attachments[slotIndex][name] = attachment; @@ -74,7 +72,7 @@ public class Skin { /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */ public function attachAll (skeleton:Skeleton, oldSkin:Skin) : void { var slotIndex:int = 0; - for each (var slot:Slot in skeleton._slots) { + for each (var slot:Slot in skeleton.slots) { var slotAttachment:Attachment = slot.attachment; if (slotAttachment && slotIndex < oldSkin.attachments.length) { var dictionary:Dictionary = oldSkin.attachments[slotIndex]; diff --git a/spine-as3/spine-as3/src/spine/Slot.as b/spine-as3/spine-as3/src/spine/Slot.as index 0303bdda0..ea32a5d80 100644 --- a/spine-as3/spine-as3/src/spine/Slot.as +++ b/spine-as3/spine-as3/src/spine/Slot.as @@ -34,7 +34,6 @@ import spine.attachments.Attachment; public class Slot { internal var _data:SlotData; internal var _bone:Bone; - internal var _skeleton:Skeleton; public var r:Number; public var g:Number; public var b:Number; @@ -43,15 +42,10 @@ public class Slot { private var _attachmentTime:Number; public var attachmentVertices:Vector. = new Vector.(); - public function Slot (data:SlotData, skeleton:Skeleton, bone:Bone) { - if (data == null) - throw new ArgumentError("data cannot be null."); - if (skeleton == null) - throw new ArgumentError("skeleton cannot be null."); - if (bone == null) - throw new ArgumentError("bone cannot be null."); + public function Slot (data:SlotData, bone:Bone) { + if (data == null) throw new ArgumentError("data cannot be null."); + if (bone == null) throw new ArgumentError("bone cannot be null."); _data = data; - _skeleton = skeleton; _bone = bone; setToSetupPose(); } @@ -59,14 +53,14 @@ public class Slot { public function get data () : SlotData { return _data; } - - public function get skeleton () : Skeleton { - return _skeleton; - } - + public function get bone () : Bone { return _bone; } + + public function get skeleton () : Skeleton { + return _bone._skeleton; + } /** @return May be null. */ public function get attachment () : Attachment { @@ -77,26 +71,26 @@ public class Slot { * @param attachment May be null. */ public function set attachment (attachment:Attachment) : void { _attachment = attachment; - _attachmentTime = _skeleton.time; + _attachmentTime = _bone._skeleton.time; attachmentVertices.length = 0; } public function set attachmentTime (time:Number) : void { - _attachmentTime = skeleton.time - time; + _attachmentTime = _bone._skeleton.time - time; } /** Returns the time since the attachment was set. */ public function get attachmentTime () : Number { - return skeleton.time - _attachmentTime; + return _bone._skeleton.time - _attachmentTime; } public function setToSetupPose () : void { - var slotIndex:int = skeleton.data.slots.indexOf(data); + var slotIndex:int = _bone._skeleton.data.slots.indexOf(data); r = _data.r; g = _data.g; b = _data.b; a = _data.a; - attachment = _data.attachmentName == null ? null : skeleton.getAttachmentForSlotIndex(slotIndex, data.attachmentName); + attachment = _data.attachmentName == null ? null : _bone._skeleton.getAttachmentForSlotIndex(slotIndex, data.attachmentName); } public function toString () : String { diff --git a/spine-as3/spine-as3/src/spine/SlotData.as b/spine-as3/spine-as3/src/spine/SlotData.as index 4ac20778d..2cba62223 100644 --- a/spine-as3/spine-as3/src/spine/SlotData.as +++ b/spine-as3/spine-as3/src/spine/SlotData.as @@ -41,10 +41,8 @@ public class SlotData { public var additiveBlending:Boolean; public function SlotData (name:String, boneData:BoneData) { - if (name == null) - throw new ArgumentError("name cannot be null."); - if (boneData == null) - throw new ArgumentError("boneData cannot be null."); + if (name == null) throw new ArgumentError("name cannot be null."); + if (boneData == null) throw new ArgumentError("boneData cannot be null."); _name = name; _boneData = boneData; } diff --git a/spine-as3/spine-as3/src/spine/animation/Animation.as b/spine-as3/spine-as3/src/spine/animation/Animation.as index 078567de2..244b819d6 100644 --- a/spine-as3/spine-as3/src/spine/animation/Animation.as +++ b/spine-as3/spine-as3/src/spine/animation/Animation.as @@ -38,10 +38,8 @@ public class Animation { public var duration:Number; public function Animation (name:String, timelines:Vector., duration:Number) { - if (name == null) - throw new ArgumentError("name cannot be null."); - if (timelines == null) - throw new ArgumentError("timelines cannot be null."); + if (name == null) throw new ArgumentError("name cannot be null."); + if (timelines == null) throw new ArgumentError("timelines cannot be null."); _name = name; _timelines = timelines; this.duration = duration; @@ -53,8 +51,7 @@ public class Animation { /** Poses the skeleton at the specified time for this animation. */ public function apply (skeleton:Skeleton, lastTime:Number, time:Number, loop:Boolean, events:Vector.) : void { - if (skeleton == null) - throw new ArgumentError("skeleton cannot be null."); + if (skeleton == null) throw new ArgumentError("skeleton cannot be null."); if (loop && duration != 0) { time %= duration; @@ -68,8 +65,7 @@ public class Animation { /** Poses the skeleton at the specified time for this animation mixed with the current pose. * @param alpha The amount of this animation that affects the current pose. */ public function mix (skeleton:Skeleton, lastTime:Number, time:Number, loop:Boolean, events:Vector., alpha:Number) : void { - if (skeleton == null) - throw new ArgumentError("skeleton cannot be null."); + if (skeleton == null) throw new ArgumentError("skeleton cannot be null."); if (loop && duration != 0) { time %= duration; @@ -107,6 +103,25 @@ public class Animation { return 0; // Can't happen. } + /** @param target After the first and before the last entry. */ + static public function binarySearch1 (values:Vector., target:Number) : int { + var low:int = 0; + var high:int = values.length - 2; + if (high == 0) + return 1; + var current:int = high >>> 1; + while (true) { + if (values[int(current + 1)] <= target) + low = current + 1; + else + high = current; + if (low == high) + return low + 1; + current = (low + high) >>> 1; + } + return 0; // Can't happen. + } + static public function linearSearch (values:Vector., target:Number, step:int) : int { for (var i:int = 0, last:int = values.length - step; i <= last; i += step) if (values[i] > target) diff --git a/spine-as3/spine-as3/src/spine/animation/AnimationStateData.as b/spine-as3/spine-as3/src/spine/animation/AnimationStateData.as index d3bc864d6..15ca733c4 100644 --- a/spine-as3/spine-as3/src/spine/animation/AnimationStateData.as +++ b/spine-as3/spine-as3/src/spine/animation/AnimationStateData.as @@ -46,26 +46,21 @@ public class AnimationStateData { public function setMixByName (fromName:String, toName:String, duration:Number) : void { var from:Animation = _skeletonData.findAnimation(fromName); - if (from == null) - throw new ArgumentError("Animation not found: " + fromName); + if (from == null) throw new ArgumentError("Animation not found: " + fromName); var to:Animation = _skeletonData.findAnimation(toName); - if (to == null) - throw new ArgumentError("Animation not found: " + toName); + if (to == null) throw new ArgumentError("Animation not found: " + toName); setMix(from, to, duration); } public function setMix (from:Animation, to:Animation, duration:Number) : void { - if (from == null) - throw new ArgumentError("from cannot be null."); - if (to == null) - throw new ArgumentError("to cannot be null."); + if (from == null) throw new ArgumentError("from cannot be null."); + if (to == null) throw new ArgumentError("to cannot be null."); animationToMixTime[from.name + ":" + to.name] = duration; } public function getMix (from:Animation, to:Animation) : Number { var time:Object = animationToMixTime[from.name + ":" + to.name]; - if (time == null) - return defaultMix; + if (time == null) return defaultMix; return time as Number; } } diff --git a/spine-as3/spine-as3/src/spine/animation/CurveTimeline.as b/spine-as3/spine-as3/src/spine/animation/CurveTimeline.as index 825f36319..4f54c0134 100644 --- a/spine-as3/spine-as3/src/spine/animation/CurveTimeline.as +++ b/spine-as3/spine-as3/src/spine/animation/CurveTimeline.as @@ -35,78 +35,51 @@ import spine.Skeleton; /** Base class for frames that use an interpolation bezier curve. */ public class CurveTimeline implements Timeline { static private const LINEAR:Number = 0; - static private const STEPPED:Number = -1; + static private const STEPPED:Number = 1; + static private const BEZIER:Number = 2; static private const BEZIER_SEGMENTS:int = 10; + static private const BEZIER_SIZE:int = BEZIER_SEGMENTS * 2 - 1; - private var curves:Vector.; // dfx, dfy, ddfx, ddfy, dddfx, dddfy, ... + private var curves:Vector.; // type, x, y, ... public function CurveTimeline (frameCount:int) { - curves = new Vector.(frameCount * 6, true) + curves = new Vector.((frameCount - 1) * BEZIER_SIZE, true) } public function apply (skeleton:Skeleton, lastTime:Number, time:Number, firedEvents:Vector., alpha:Number) : void { } public function get frameCount () : int { - return curves.length / 6; + return curves.length / BEZIER_SIZE + 1; } public function setLinear (frameIndex:int) : void { - curves[int(frameIndex * 6)] = LINEAR; + curves[int(frameIndex * BEZIER_SIZE)] = LINEAR; } public function setStepped (frameIndex:int) : void { - curves[int(frameIndex * 6)] = STEPPED; + curves[int(frameIndex * BEZIER_SIZE)] = STEPPED; } /** 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. */ public function setCurve (frameIndex:int, cx1:Number, cy1:Number, cx2:Number, cy2:Number) : void { - var subdiv_step:Number = 1 / BEZIER_SEGMENTS; - var subdiv_step2:Number = subdiv_step * subdiv_step; - var subdiv_step3:Number = subdiv_step2 * subdiv_step; - var pre1:Number = 3 * subdiv_step; - var pre2:Number = 3 * subdiv_step2; - var pre4:Number = 6 * subdiv_step2; - var pre5:Number = 6 * subdiv_step3; - var tmp1x:Number = -cx1 * 2 + cx2; - var tmp1y:Number = -cy1 * 2 + cy2; - var tmp2x:Number = (cx1 - cx2) * 3 + 1; - var tmp2y:Number = (cy1 - cy2) * 3 + 1; - var i:int = frameIndex * 6; - curves[i] = cx1 * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3; - curves[int(i + 1)] = cy1 * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3; - curves[int(i + 2)] = tmp1x * pre4 + tmp2x * pre5; - curves[int(i + 3)] = tmp1y * pre4 + tmp2y * pre5; - curves[int(i + 4)] = tmp2x * pre5; - curves[int(i + 5)] = tmp2y * pre5; - } + var subdiv1:Number = 1 / BEZIER_SEGMENTS, subdiv2:Number = subdiv1 * subdiv1, subdiv3:Number = subdiv2 * subdiv1; + var pre1:Number = 3 * subdiv1, pre2:Number = 3 * subdiv2, pre4:Number = 6 * subdiv2, pre5:Number = 6 * subdiv3; + var tmp1x:Number = -cx1 * 2 + cx2, tmp1y:Number = -cy1 * 2 + cy2, tmp2x:Number = (cx1 - cx2) * 3 + 1, tmp2y:Number = (cy1 - cy2) * 3 + 1; + var dfx:Number = cx1 * pre1 + tmp1x * pre2 + tmp2x * subdiv3, dfy:Number = cy1 * pre1 + tmp1y * pre2 + tmp2y * subdiv3; + var ddfx:Number = tmp1x * pre4 + tmp2x * pre5, ddfy:Number = tmp1y * pre4 + tmp2y * pre5; + var dddfx:Number = tmp2x * pre5, dddfy:Number = tmp2y * pre5; - public function getCurvePercent (frameIndex:int, percent:Number) : Number { - var curveIndex:int = frameIndex * 6; - var dfx:Number = curves[curveIndex]; - if (dfx == LINEAR) - return percent; - if (dfx == STEPPED) - return 0; - var dfy:Number = curves[int(curveIndex + 1)]; - var ddfx:Number = curves[int(curveIndex + 2)]; - var ddfy:Number = curves[int(curveIndex + 3)]; - var dddfx:Number = curves[int(curveIndex + 4)]; - var dddfy:Number = curves[int(curveIndex + 5)]; - var x:Number = dfx; - var y:Number = dfy; - var i:int = BEZIER_SEGMENTS - 2; - while (true) { - if (x >= percent) { - var prevX:Number = x - dfx; - var prevY:Number = y - dfy; - return prevY + (y - prevY) * (percent - prevX) / (x - prevX); - } - if (i == 0) - break; - i--; + var i:int = frameIndex * BEZIER_SIZE; + var curves:Vector. = this.curves; + curves[int(i++)] = BEZIER; + + var x:Number = dfx, y:Number = dfy; + for (var n:int = i + BEZIER_SIZE - 1; i < n; i += 2) { + curves[i] = x; + curves[int(i + 1)] = y; dfx += ddfx; dfy += ddfy; ddfx += dddfx; @@ -114,6 +87,31 @@ public class CurveTimeline implements Timeline { x += dfx; y += dfy; } + } + + public function getCurvePercent (frameIndex:int, percent:Number) : Number { + var curves:Vector. = this.curves; + var i:int = frameIndex * BEZIER_SIZE; + var type:Number = curves[i]; + if (type == LINEAR) return percent; + if (type == STEPPED) return 0; + i++; + var x:Number = 0; + for (var start:int = i, n:int = i + BEZIER_SIZE - 1; i < n; i += 2) { + x = curves[i]; + if (x >= percent) { + var prevX:Number, prevY:Number; + if (i == start) { + prevX = 0; + prevY = 0; + } else { + prevX = curves[int(i - 2)]; + prevY = curves[int(i - 1)]; + } + return prevY + (curves[int(i + 1)] - prevY) * (percent - prevX) / (x - prevX); + } + } + var y:Number = curves[int(i - 1)]; return y + (1 - y) * (percent - x) / (1 - x); // Last point is 1,1. } } diff --git a/spine-as3/spine-as3/src/spine/animation/DrawOrderTimeline.as b/spine-as3/spine-as3/src/spine/animation/DrawOrderTimeline.as index a8e9d132b..ed3340ada 100644 --- a/spine-as3/spine-as3/src/spine/animation/DrawOrderTimeline.as +++ b/spine-as3/spine-as3/src/spine/animation/DrawOrderTimeline.as @@ -60,7 +60,7 @@ public class DrawOrderTimeline implements Timeline { if (time >= frames[int(frames.length - 1)]) // Time is after last frame. frameIndex = frames.length - 1; else - frameIndex = Animation.binarySearch(frames, time, 1) - 1; + frameIndex = Animation.binarySearch1(frames, time) - 1; var drawOrder:Vector. = skeleton.drawOrder; var slots:Vector. = skeleton.slots; diff --git a/spine-as3/spine-as3/src/spine/animation/EventTimeline.as b/spine-as3/spine-as3/src/spine/animation/EventTimeline.as index 8b4346f6f..606f29be9 100644 --- a/spine-as3/spine-as3/src/spine/animation/EventTimeline.as +++ b/spine-as3/spine-as3/src/spine/animation/EventTimeline.as @@ -67,7 +67,7 @@ public class EventTimeline implements Timeline { if (lastTime < frames[0]) frameIndex = 0; else { - frameIndex = Animation.binarySearch(frames, lastTime, 1); + frameIndex = Animation.binarySearch1(frames, lastTime); var frame:Number = frames[frameIndex]; while (frameIndex > 0) { // Fire multiple events with the same frame. if (frames[int(frameIndex - 1)] != frame) break; diff --git a/spine-as3/spine-as3/src/spine/animation/FfdTimeline.as b/spine-as3/spine-as3/src/spine/animation/FfdTimeline.as index 83104ab5c..18ef9eb99 100644 --- a/spine-as3/spine-as3/src/spine/animation/FfdTimeline.as +++ b/spine-as3/spine-as3/src/spine/animation/FfdTimeline.as @@ -57,16 +57,13 @@ public class FfdTimeline extends CurveTimeline { if (slot.attachment != attachment) return; var frames:Vector. = this.frames; - if (time < frames[0]) { - slot.attachmentVertices.length = 0; - return; // Time is before first frame. - } + if (time < frames[0]) return; // Time is before first frame. var frameVertices:Vector.> = this.frameVertices; var vertexCount:int = frameVertices[0].length; var vertices:Vector. = slot.attachmentVertices; - if (vertices.length != vertexCount) alpha = 1; + if (vertices.length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices. vertices.length = vertexCount; var i:int; @@ -83,7 +80,7 @@ public class FfdTimeline extends CurveTimeline { } // Interpolate between the previous frame and the current frame. - var frameIndex:int = Animation.binarySearch(frames, time, 1); + var frameIndex:int = Animation.binarySearch1(frames, time); var frameTime:Number = frames[frameIndex]; var percent:Number = 1 - (time - frameTime) / (frames[int(frameIndex - 1)] - frameTime); percent = getCurvePercent(frameIndex - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); diff --git a/spine-as3/spine-as3/src/spine/animation/FlipXTimeline.as b/spine-as3/spine-as3/src/spine/animation/FlipXTimeline.as new file mode 100644 index 000000000..c69180d0d --- /dev/null +++ b/spine-as3/spine-as3/src/spine/animation/FlipXTimeline.as @@ -0,0 +1,73 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +package spine.animation { +import spine.Bone; +import spine.Event; +import spine.Skeleton; + +public class FlipXTimeline implements Timeline { + public var boneIndex:int; + public var frames:Vector.; // time, flip, ... + + public function FlipXTimeline (frameCount:int) { + frames = new Vector.(frameCount * 2, true); + } + + public function get frameCount () : int { + return frames.length / 2; + } + + /** Sets the time and angle of the specified keyframe. */ + public function setFrame (frameIndex:int, time:Number, flip:Boolean) : void { + frameIndex *= 2; + frames[frameIndex] = time; + frames[int(frameIndex + 1)] = flip ? 1 : 0; + } + + public function apply (skeleton:Skeleton, lastTime:Number, time:Number, firedEvents:Vector., alpha:Number) : void { + if (time < frames[0]) { + if (lastTime > time) apply(skeleton, lastTime, int.MAX_VALUE, null, 0); + return; + } else if (lastTime > time) // + lastTime = -1; + + var frameIndex:int = (time >= frames[frames.length - 2] ? frames.length : Animation.binarySearch(frames, time, 2)) - 2; + if (frames[frameIndex] < lastTime) return; + + setFlip(skeleton.bones[boneIndex], frames[frameIndex + 1] != 0); + } + + protected function setFlip (bone:Bone, flip:Boolean) : void { + bone.flipX = flip; + } +} + +} diff --git a/spine-as3/spine-as3/src/spine/animation/FlipYTimeline.as b/spine-as3/spine-as3/src/spine/animation/FlipYTimeline.as new file mode 100644 index 000000000..827ae0ed6 --- /dev/null +++ b/spine-as3/spine-as3/src/spine/animation/FlipYTimeline.as @@ -0,0 +1,44 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +package spine.animation { +import spine.Bone; + +public class FlipYTimeline extends FlipXTimeline { + public function FlipYTimeline (frameCount:int) { + super(frameCount); + } + + override protected function setFlip (bone:Bone, flip:Boolean) : void { + bone.flipY = flip; + } +} + +} \ No newline at end of file diff --git a/spine-as3/spine-as3/src/spine/animation/IkConstraintTimeline.as b/spine-as3/spine-as3/src/spine/animation/IkConstraintTimeline.as new file mode 100644 index 000000000..e0baf05e6 --- /dev/null +++ b/spine-as3/spine-as3/src/spine/animation/IkConstraintTimeline.as @@ -0,0 +1,82 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +package spine.animation { +import spine.Event; +import spine.IkConstraint; +import spine.Skeleton; + +public class IkConstraintTimeline extends CurveTimeline { + static private const PREV_FRAME_TIME:int = -3; + static private const PREV_FRAME_MIX:int = -2; + static private const PREV_FRAME_BEND_DIRECTION:int = -1; + static private const FRAME_MIX:int = 1; + + public var ikConstraintIndex:int; + public var frames:Vector.; // time, mix, bendDirection, ... + + public function IkConstraintTimeline (frameCount:int) { + super(frameCount); + frames = new Vector.(frameCount * 3, true); + } + + /** Sets the time, mix and bend direction of the specified keyframe. */ + public function setFrame (frameIndex:int, time:Number, mix:Number, bendDirection:int) : void { + frameIndex *= 3; + frames[frameIndex] = time; + frames[int(frameIndex + 1)] = mix; + frames[int(frameIndex + 2)] = bendDirection; + } + + override public function apply (skeleton:Skeleton, lastTime:Number, time:Number, firedEvents:Vector., alpha:Number) : void { + if (time < frames[0]) return; // Time is before first frame. + + var ikConstraint:IkConstraint = skeleton.ikConstraints[ikConstraintIndex]; + + if (time >= frames[int(frames.length - 3)]) { // Time is after last frame. + ikConstraint.mix += (frames[int(frames.length - 2)] - ikConstraint.mix) * alpha; + ikConstraint.bendDirection = int(frames[int(frames.length - 1)]); + return; + } + + // Interpolate between the previous frame and the current frame. + var frameIndex:int = Animation.binarySearch(frames, time, 3); + var prevFrameMix:Number = frames[int(frameIndex + PREV_FRAME_MIX)]; + var frameTime:Number = frames[frameIndex]; + var percent:Number = 1 - (time - frameTime) / (frames[int(frameIndex + PREV_FRAME_TIME)] - frameTime); + percent = getCurvePercent(frameIndex / 3 - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); + + var mix:Number = prevFrameMix + (frames[int(frameIndex + FRAME_MIX)] - prevFrameMix) * percent; + ikConstraint.mix += (mix - ikConstraint.mix) * alpha; + ikConstraint.bendDirection = int(frames[int(frameIndex + PREV_FRAME_BEND_DIRECTION)]); + } +} + +} diff --git a/spine-as3/spine-as3/src/spine/flash/SkeletonSprite.as b/spine-as3/spine-as3/src/spine/flash/SkeletonSprite.as index cfef97a80..656892827 100644 --- a/spine-as3/spine-as3/src/spine/flash/SkeletonSprite.as +++ b/spine-as3/spine-as3/src/spine/flash/SkeletonSprite.as @@ -97,6 +97,7 @@ public class SkeletonSprite extends Sprite { bitmap.rotation = -regionAttachment.rotation; bitmap.scaleX = regionAttachment.scaleX * (regionAttachment.width / region.width); bitmap.scaleY = regionAttachment.scaleY * (regionAttachment.height / region.height); + // Position using attachment translation, shifted as if scale and rotation were at image center. var radians:Number = -regionAttachment.rotation * Math.PI / 180; @@ -127,10 +128,12 @@ public class SkeletonSprite extends Sprite { colorTransform.alphaMultiplier = skeleton.a * slot.a * regionAttachment.a; wrapper.transform.colorTransform = colorTransform; + var bone:Bone = slot.bone; var flipX:int = skeleton.flipX ? -1 : 1; var flipY:int = skeleton.flipY ? -1 : 1; + if (bone.worldFlipX) flipX = -flipX; + if (bone.worldFlipY) flipY = -flipY; - var bone:Bone = slot.bone; wrapper.x = bone.worldX; wrapper.y = bone.worldY; wrapper.rotation = -bone.worldRotation * flipX * flipY; diff --git a/spine-c/Makefile b/spine-c/Makefile new file mode 100644 index 000000000..a277e035b --- /dev/null +++ b/spine-c/Makefile @@ -0,0 +1,50 @@ +LIBS = -lm +CFLAGS = -Wall -I./include/ + +SRC=$(wildcard src/spine/*.c) +OBJ_FILES := $(addprefix obj/,$(notdir $(SRC:.c=.o))) +STATIC_OBJ_FILES := $(addprefix obj/,$(notdir $(SRC:.c=-s.o))) +DEBUG_OBJ_FILES := $(addprefix obj/,$(notdir $(SRC:.c=-d.o))) + +default: + @echo + @echo "- Options are (debug|release)-dynamic and release-static." + @echo "- Ex: release-static" + @echo + +release-dynamic: $(OBJ_FILES) + @mkdir -p dist + gcc -s -shared -Wl,-soname,libspine.so -o dist/libspine.so $(OBJ_FILES) + @echo + @echo - /dist/libspine.so + @echo + +debug-dynamic: $(DEBUG_OBJ_FILES) + @mkdir -p dist + gcc -g3 -shared -Wl,-soname,libspine.so -o dist/libspine-d.so $(DEBUG_OBJ_FILES) + @echo + @echo - /dist/libspine-d.so + @echo + +obj/%.o: src/spine/%.c + @mkdir -p obj + gcc -fPIC -c -o $@ $< $(CFLAGS) $(LIBS) + +obj/%-d.o: src/spine/%.c + @mkdir -p obj + gcc -fPIC -c -o $@ $< $(CFLAGS) + +release-static: $(STATIC_OBJ_FILES) + @mkdir -p dist + ar rcs dist/libspine-s.a $(STATIC_OBJ_FILES) + @echo + @echo - /dist/libspine-s.a + @echo + +obj/%-s.o: src/spine/%.c + @mkdir -p obj + gcc -c -o $@ $< $(CFLAGS) $(LIBS) + +clean: + rm -rf obj/* + rm -rf dist/* diff --git a/spine-c/README.md b/spine-c/README.md index f3a72db18..71ec54b08 100644 --- a/spine-c/README.md +++ b/spine-c/README.md @@ -11,10 +11,6 @@ Alternatively, the contents of the `spine-c/src` and `spine-c/include` directori If `SPINE_SHORT_NAMES` is defined, the `sp` prefix for all structs and functions is optional. Only use this if the spine-c names won't cause a conflict. -## Examples - -[Loading data](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/example/main.c) - ## Extension Extending spine-c requires implementing three methods: diff --git a/spine-c/include/spine/Animation.h b/spine-c/include/spine/Animation.h index 576fcefe9..69c2c3444 100644 --- a/spine-c/include/spine/Animation.h +++ b/spine-c/include/spine/Animation.h @@ -41,7 +41,7 @@ extern "C" { typedef struct spTimeline spTimeline; struct spSkeleton; -typedef struct { +typedef struct spAnimation { const char* const name; float duration; @@ -84,7 +84,9 @@ typedef enum { SP_TIMELINE_EVENT, SP_TIMELINE_DRAWORDER, SP_TIMELINE_FFD, - SP_TIMELINE_IKCONSTRAINT + SP_TIMELINE_IKCONSTRAINT, + SP_TIMELINE_FLIPX, + SP_TIMELINE_FLIPY } spTimelineType; struct spTimeline { @@ -112,7 +114,7 @@ typedef spTimeline Timeline; /**/ -typedef struct { +typedef struct spCurveTimeline { spTimeline super; float* curves; /* type, x, y, ... */ } spCurveTimeline; @@ -141,7 +143,11 @@ typedef struct spBaseTimeline { int const framesCount; float* const frames; /* time, angle, ... for rotate. time, x, y, ... for translate and scale. */ int boneIndex; -} spRotateTimeline; +} spBaseTimeline; + +/**/ + +typedef struct spBaseTimeline spRotateTimeline; spRotateTimeline* spRotateTimeline_create (int framesCount); @@ -183,7 +189,7 @@ typedef spScaleTimeline ScaleTimeline; /**/ -typedef struct { +typedef struct spColorTimeline { spCurveTimeline super; int const framesCount; float* const frames; /* time, r, g, b, a, ... */ @@ -202,7 +208,7 @@ typedef spColorTimeline ColorTimeline; /**/ -typedef struct { +typedef struct spAttachmentTimeline { spTimeline super; int const framesCount; float* const frames; /* time, ... */ @@ -223,7 +229,7 @@ typedef spAttachmentTimeline AttachmentTimeline; /**/ -typedef struct { +typedef struct spEventTimeline { spTimeline super; int const framesCount; float* const frames; /* time, ... */ @@ -242,7 +248,7 @@ typedef spEventTimeline EventTimeline; /**/ -typedef struct { +typedef struct spDrawOrderTimeline { spTimeline super; int const framesCount; float* const frames; /* time, ... */ @@ -262,7 +268,7 @@ typedef spDrawOrderTimeline DrawOrderTimeline; /**/ -typedef struct { +typedef struct spFFDTimeline { spCurveTimeline super; int const framesCount; float* const frames; /* time, ... */ @@ -284,7 +290,7 @@ typedef spFFDTimeline FFDTimeline; /**/ -typedef struct { +typedef struct spIkConstraintTimeline { spCurveTimeline super; int const framesCount; float* const frames; /* time, mix, bendDirection, ... */ @@ -304,6 +310,26 @@ typedef spIkConstraintTimeline IkConstraintTimeline; /**/ +typedef struct spFlipTimeline { + spTimeline super; + int const x; + int const framesCount; + float* const frames; /* time, flip, ... */ + int boneIndex; +} spFlipTimeline; + +spFlipTimeline* spFlipTimeline_create (int framesCount, int/*bool*/x); + +void spFlipTimeline_setFrame (spFlipTimeline* self, int frameIndex, float time, int/*bool*/flip); + +#ifdef SPINE_SHORT_NAMES +typedef spFlipTimeline FlipTimeline; +#define FlipTimeline_create(...) spFlipTimeline_create(__VA_ARGS__) +#define FlipTimeline_setFrame(...) spFlipTimeline_setFrame(__VA_ARGS__) +#endif + +/**/ + #ifdef __cplusplus } #endif diff --git a/spine-c/include/spine/AnimationStateData.h b/spine-c/include/spine/AnimationStateData.h index ba1c38662..1d8dfd3aa 100644 --- a/spine-c/include/spine/AnimationStateData.h +++ b/spine-c/include/spine/AnimationStateData.h @@ -38,7 +38,7 @@ extern "C" { #endif -typedef struct { +typedef struct spAnimationStateData { spSkeletonData* const skeletonData; float defaultMix; const void* const entries; diff --git a/spine-c/include/spine/AtlasAttachmentLoader.h b/spine-c/include/spine/AtlasAttachmentLoader.h index bd36afb33..cc1ba628e 100644 --- a/spine-c/include/spine/AtlasAttachmentLoader.h +++ b/spine-c/include/spine/AtlasAttachmentLoader.h @@ -38,7 +38,7 @@ extern "C" { #endif -typedef struct { +typedef struct spAtlasAttachmentLoader { spAttachmentLoader super; spAtlas* atlas; } spAtlasAttachmentLoader; diff --git a/spine-c/include/spine/Attachment.h b/spine-c/include/spine/Attachment.h index 9b516b04f..485cf43bb 100644 --- a/spine-c/include/spine/Attachment.h +++ b/spine-c/include/spine/Attachment.h @@ -35,19 +35,16 @@ extern "C" { #endif -struct spSlot; - typedef enum { SP_ATTACHMENT_REGION, SP_ATTACHMENT_BOUNDING_BOX, SP_ATTACHMENT_MESH, SP_ATTACHMENT_SKINNED_MESH } spAttachmentType; -typedef struct spAttachment spAttachment; -struct spAttachment { +typedef struct spAttachment { const char* const name; const spAttachmentType type; const void* const vtable; -}; +} spAttachment; void spAttachment_dispose (spAttachment* self); diff --git a/spine-c/include/spine/AttachmentLoader.h b/spine-c/include/spine/AttachmentLoader.h index 4088e0c47..1f0402e02 100644 --- a/spine-c/include/spine/AttachmentLoader.h +++ b/spine-c/include/spine/AttachmentLoader.h @@ -38,8 +38,7 @@ extern "C" { #endif -typedef struct spAttachmentLoader spAttachmentLoader; -struct spAttachmentLoader { +typedef struct spAttachmentLoader { const char* error1; const char* error2; @@ -51,7 +50,7 @@ struct spAttachmentLoader { vtable(0) { } #endif -}; +} spAttachmentLoader; void spAttachmentLoader_dispose (spAttachmentLoader* self); diff --git a/spine-c/include/spine/Bone.h b/spine-c/include/spine/Bone.h index 5e8b1f7bf..43436168e 100644 --- a/spine-c/include/spine/Bone.h +++ b/spine-c/include/spine/Bone.h @@ -47,11 +47,13 @@ struct spBone { float x, y; float rotation, rotationIK; float scaleX, scaleY; + int/*bool*/flipX, flipY; float const m00, m01, worldX; /* a b x */ float const m10, m11, worldY; /* c d y */ float const worldRotation; float const worldScaleX, worldScaleY; + int/*bool*/const worldFlipX, worldFlipY; }; void spBone_setYDown (int/*bool*/yDown); diff --git a/spine-c/include/spine/BoneData.h b/spine-c/include/spine/BoneData.h index 77cb90937..0df381dd9 100644 --- a/spine-c/include/spine/BoneData.h +++ b/spine-c/include/spine/BoneData.h @@ -43,6 +43,7 @@ struct spBoneData { float x, y; float rotation; float scaleX, scaleY; + int/*bool*/flipX, flipY; int/*bool*/inheritScale, inheritRotation; }; diff --git a/spine-c/include/spine/BoundingBoxAttachment.h b/spine-c/include/spine/BoundingBoxAttachment.h index e67db6c77..582e02720 100644 --- a/spine-c/include/spine/BoundingBoxAttachment.h +++ b/spine-c/include/spine/BoundingBoxAttachment.h @@ -39,12 +39,11 @@ extern "C" { #endif -typedef struct spBoundingBoxAttachment spBoundingBoxAttachment; -struct spBoundingBoxAttachment { +typedef struct spBoundingBoxAttachment { spAttachment super; int verticesCount; float* vertices; -}; +} spBoundingBoxAttachment; spBoundingBoxAttachment* spBoundingBoxAttachment_create (const char* name); void spBoundingBoxAttachment_computeWorldVertices (spBoundingBoxAttachment* self, spBone* bone, float* vertices); diff --git a/spine-c/include/spine/Event.h b/spine-c/include/spine/Event.h index dabdd24a0..1ac5c75ba 100644 --- a/spine-c/include/spine/Event.h +++ b/spine-c/include/spine/Event.h @@ -37,13 +37,12 @@ extern "C" { #endif -typedef struct spEvent spEvent; -struct spEvent { +typedef struct spEvent { spEventData* const data; int intValue; float floatValue; const char* stringValue; -}; +} spEvent; spEvent* spEvent_create (spEventData* data); void spEvent_dispose (spEvent* self); diff --git a/spine-c/include/spine/EventData.h b/spine-c/include/spine/EventData.h index bbbb65462..4a5b88325 100644 --- a/spine-c/include/spine/EventData.h +++ b/spine-c/include/spine/EventData.h @@ -35,13 +35,12 @@ extern "C" { #endif -typedef struct spEventData spEventData; -struct spEventData { +typedef struct spEventData { const char* const name; int intValue; float floatValue; const char* stringValue; -}; +} spEventData; spEventData* spEventData_create (const char* name); void spEventData_dispose (spEventData* self); diff --git a/spine-c/include/spine/IkConstraint.h b/spine-c/include/spine/IkConstraint.h index b5cd89b59..6d5e87453 100644 --- a/spine-c/include/spine/IkConstraint.h +++ b/spine-c/include/spine/IkConstraint.h @@ -40,8 +40,7 @@ extern "C" { struct spSkeleton; -typedef struct spIkConstraint spIkConstraint; -struct spIkConstraint { +typedef struct spIkConstraint { spIkConstraintData* const data; int bonesCount; @@ -50,7 +49,7 @@ struct spIkConstraint { spBone* target; int bendDirection; float mix; -}; +} spIkConstraint; spIkConstraint* spIkConstraint_create (spIkConstraintData* data, const struct spSkeleton* skeleton); void spIkConstraint_dispose (spIkConstraint* self); diff --git a/spine-c/include/spine/IkConstraintData.h b/spine-c/include/spine/IkConstraintData.h index 7cacd369d..9325e6e03 100644 --- a/spine-c/include/spine/IkConstraintData.h +++ b/spine-c/include/spine/IkConstraintData.h @@ -37,8 +37,7 @@ extern "C" { #endif -typedef struct spIkConstraintData spIkConstraintData; -struct spIkConstraintData { +typedef struct spIkConstraintData { const char* const name; int bonesCount; @@ -47,7 +46,7 @@ struct spIkConstraintData { spBoneData* target; int bendDirection; float mix; -}; +} spIkConstraintData; spIkConstraintData* spIkConstraintData_create (const char* name); void spIkConstraintData_dispose (spIkConstraintData* self); diff --git a/spine-c/include/spine/MeshAttachment.h b/spine-c/include/spine/MeshAttachment.h index 5948d84ae..e5eb271d9 100644 --- a/spine-c/include/spine/MeshAttachment.h +++ b/spine-c/include/spine/MeshAttachment.h @@ -39,8 +39,7 @@ extern "C" { #endif -typedef struct spMeshAttachment spMeshAttachment; -struct spMeshAttachment { +typedef struct spMeshAttachment { spAttachment super; const char* path; @@ -67,7 +66,7 @@ struct spMeshAttachment { int edgesCount; int* edges; float width, height; -}; +} spMeshAttachment; spMeshAttachment* spMeshAttachment_create (const char* name); void spMeshAttachment_updateUVs (spMeshAttachment* self); diff --git a/spine-c/include/spine/RegionAttachment.h b/spine-c/include/spine/RegionAttachment.h index 22def9486..c076eeac4 100644 --- a/spine-c/include/spine/RegionAttachment.h +++ b/spine-c/include/spine/RegionAttachment.h @@ -43,8 +43,7 @@ typedef enum { SP_VERTEX_X1 = 0, SP_VERTEX_Y1, SP_VERTEX_X2, SP_VERTEX_Y2, SP_VERTEX_X3, SP_VERTEX_Y3, SP_VERTEX_X4, SP_VERTEX_Y4 } spVertexIndex; -typedef struct spRegionAttachment spRegionAttachment; -struct spRegionAttachment { +typedef struct spRegionAttachment { spAttachment super; const char* path; float x, y, scaleX, scaleY, rotation, width, height; @@ -57,7 +56,7 @@ struct spRegionAttachment { float offset[8]; float uvs[8]; -}; +} spRegionAttachment; spRegionAttachment* spRegionAttachment_create (const char* name); void spRegionAttachment_setUVs (spRegionAttachment* self, float u, float v, float u2, float v2, int/*bool*/rotate); diff --git a/spine-c/include/spine/Skeleton.h b/spine-c/include/spine/Skeleton.h index 34517c8ff..518ce0d6c 100644 --- a/spine-c/include/spine/Skeleton.h +++ b/spine-c/include/spine/Skeleton.h @@ -40,8 +40,7 @@ extern "C" { #endif -typedef struct spSkeleton spSkeleton; -struct spSkeleton { +typedef struct spSkeleton { spSkeletonData* const data; int bonesCount; @@ -60,7 +59,7 @@ struct spSkeleton { float time; int/*bool*/flipX, flipY; float x, y; -}; +} spSkeleton; spSkeleton* spSkeleton_create (spSkeletonData* data); void spSkeleton_dispose (spSkeleton* self); @@ -83,8 +82,9 @@ spSlot* spSkeleton_findSlot (const spSkeleton* self, const char* slotName); /* Returns -1 if the slot was not found. */ int spSkeleton_findSlotIndex (const spSkeleton* self, const char* slotName); -/* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are - * attached if the corresponding attachment from the old skin was attached. +/* Sets the skin used to look up attachments before looking in the SkeletonData defaultSkin. 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 skin May be 0.*/ void spSkeleton_setSkin (spSkeleton* self, spSkin* skin); /* Returns 0 if the skin was not found. See spSkeleton_setSkin. diff --git a/spine-c/include/spine/SkeletonBounds.h b/spine-c/include/spine/SkeletonBounds.h index 9767dacf4..c7746d4c1 100644 --- a/spine-c/include/spine/SkeletonBounds.h +++ b/spine-c/include/spine/SkeletonBounds.h @@ -38,7 +38,7 @@ extern "C" { #endif -typedef struct { +typedef struct spPolygon { float* const vertices; int count; int capacity; @@ -60,7 +60,7 @@ typedef spPolygon Polygon; /**/ -typedef struct { +typedef struct spSkeletonBounds { int count; spBoundingBoxAttachment** boundingBoxes; spPolygon** polygons; diff --git a/spine-c/include/spine/SkeletonData.h b/spine-c/include/spine/SkeletonData.h index e6c46ec95..4635b3011 100644 --- a/spine-c/include/spine/SkeletonData.h +++ b/spine-c/include/spine/SkeletonData.h @@ -42,7 +42,7 @@ extern "C" { #endif -typedef struct spSkeletonData{ +typedef struct spSkeletonData { const char* version; const char* hash; float width, height; diff --git a/spine-c/include/spine/SkeletonJson.h b/spine-c/include/spine/SkeletonJson.h index ba2bef522..76c34ce24 100644 --- a/spine-c/include/spine/SkeletonJson.h +++ b/spine-c/include/spine/SkeletonJson.h @@ -41,7 +41,7 @@ extern "C" { #endif -typedef struct { +typedef struct spSkeletonJson { float scale; spAttachmentLoader* attachmentLoader; const char* const error; diff --git a/spine-c/include/spine/Skin.h b/spine-c/include/spine/Skin.h index 22d56fe9c..e8d5a7930 100644 --- a/spine-c/include/spine/Skin.h +++ b/spine-c/include/spine/Skin.h @@ -39,7 +39,7 @@ extern "C" { struct spSkeleton; -typedef struct { +typedef struct spSkin { const char* const name; } spSkin; diff --git a/spine-c/include/spine/SkinnedMeshAttachment.h b/spine-c/include/spine/SkinnedMeshAttachment.h index 9d60565e6..f00ef4417 100644 --- a/spine-c/include/spine/SkinnedMeshAttachment.h +++ b/spine-c/include/spine/SkinnedMeshAttachment.h @@ -38,8 +38,7 @@ extern "C" { #endif -typedef struct spSkinnedMeshAttachment spSkinnedMeshAttachment; -struct spSkinnedMeshAttachment { +typedef struct spSkinnedMeshAttachment { spAttachment super; const char* path; @@ -70,7 +69,7 @@ struct spSkinnedMeshAttachment { int edgesCount; int* edges; float width, height; -}; +} spSkinnedMeshAttachment; spSkinnedMeshAttachment* spSkinnedMeshAttachment_create (const char* name); void spSkinnedMeshAttachment_updateUVs (spSkinnedMeshAttachment* self); diff --git a/spine-c/include/spine/SlotData.h b/spine-c/include/spine/SlotData.h index f47132638..d1ef5a50e 100644 --- a/spine-c/include/spine/SlotData.h +++ b/spine-c/include/spine/SlotData.h @@ -37,7 +37,7 @@ extern "C" { #endif -typedef struct { +typedef struct spSlotData { const char* const name; const spBoneData* const boneData; const char* attachmentName; diff --git a/spine-c/include/spine/extension.h b/spine-c/include/spine/extension.h index 281d63212..0d63f650a 100644 --- a/spine-c/include/spine/extension.h +++ b/spine-c/include/spine/extension.h @@ -124,7 +124,7 @@ char* _readFile (const char* path, int* length); /**/ -typedef struct { +typedef struct _spAnimationState { spAnimationState super; spEvent** events; diff --git a/spine-c/src/spine/Animation.c b/spine-c/src/spine/Animation.c index 755da5738..01138f02f 100644 --- a/spine-c/src/spine/Animation.c +++ b/spine-c/src/spine/Animation.c @@ -602,7 +602,7 @@ void _spDrawOrderTimeline_apply (const spTimeline* timeline, spSkeleton* skeleto drawOrderToSetupIndex = self->drawOrders[frameIndex]; if (!drawOrderToSetupIndex) - memcpy(skeleton->drawOrder, skeleton->slots, self->slotsCount * sizeof(int)); + memcpy(skeleton->drawOrder, skeleton->slots, self->slotsCount * sizeof(spSlot*)); else { for (i = 0; i < self->slotsCount; ++i) skeleton->drawOrder[i] = skeleton->slots[drawOrderToSetupIndex[i]]; @@ -659,20 +659,17 @@ void _spFFDTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, flo spSlot *slot = skeleton->slots[self->slotIndex]; if (slot->attachment != self->attachment) return; - if (time < self->frames[0]) { - slot->attachmentVerticesCount = 0; - return; /* Time is before first frame. */ - } + if (time < self->frames[0]) return; /* Time is before first frame. */ - if (slot->attachmentVerticesCount == 0) alpha = 1; if (slot->attachmentVerticesCount < self->frameVerticesCount) { if (slot->attachmentVerticesCapacity < self->frameVerticesCount) { FREE(slot->attachmentVertices); slot->attachmentVertices = MALLOC(float, self->frameVerticesCount); slot->attachmentVerticesCapacity = self->frameVerticesCount; } - slot->attachmentVerticesCount = self->frameVerticesCount; - } + } else if (slot->attachmentVerticesCount > self->frameVerticesCount) + alpha = 1; /* Don't mix from uninitialized slot vertices. */ + slot->attachmentVerticesCount = self->frameVerticesCount; if (time >= self->frames[self->framesCount - 1]) { /* Time is after last frame. */ @@ -789,3 +786,51 @@ void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameInd self->frames[frameIndex + 1] = mix; self->frames[frameIndex + 2] = (float)bendDirection; } + +/**/ + +void _spFlipTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time, + spEvent** firedEvents, int* eventsCount, float alpha) { + int frameIndex; + spFlipTimeline* self = (spFlipTimeline*)timeline; + + if (time < self->frames[0]) { + if (lastTime > time) _spFlipTimeline_apply(timeline, skeleton, lastTime, (float)INT_MAX, 0, 0, 0); + return; + } else if (lastTime > time) /**/ + lastTime = -1; + + frameIndex = (time >= self->frames[self->framesCount - 2] ? + self->framesCount : binarySearch(self->frames, self->framesCount, time, 2)) - 2; + if (self->frames[frameIndex] < lastTime) return; + + if (self->x) + skeleton->bones[self->boneIndex]->flipX = (int)self->frames[frameIndex + 1]; + else + skeleton->bones[self->boneIndex]->flipY = (int)self->frames[frameIndex + 1]; +} + +void _spFlipTimeline_dispose (spTimeline* timeline) { + spFlipTimeline* self = SUB_CAST(spFlipTimeline, timeline); + _spTimeline_deinit(SUPER(self)); + FREE(self->frames); + FREE(self); +} + +spFlipTimeline* spFlipTimeline_create (int framesCount, int/*bool*/x) { + spFlipTimeline* self = NEW(spFlipTimeline); + _spTimeline_init(SUPER(self), x ? SP_TIMELINE_FLIPX : SP_TIMELINE_FLIPY, _spFlipTimeline_dispose, _spFlipTimeline_apply); + CONST_CAST(int, self->x) = x; + CONST_CAST(int, self->framesCount) = framesCount << 1; + CONST_CAST(float*, self->frames) = CALLOC(float, self->framesCount); + return self; +} + +void spFlipTimeline_setFrame (spFlipTimeline* self, int frameIndex, float time, int/*bool*/flip) { + frameIndex <<= 1; + self->frames[frameIndex] = time; + self->frames[frameIndex + 1] = (float)flip; +} + +/**/ + diff --git a/spine-c/src/spine/Atlas.c b/spine-c/src/spine/Atlas.c index 5aa3dcc43..20dd5d349 100644 --- a/spine-c/src/spine/Atlas.c +++ b/spine-c/src/spine/Atlas.c @@ -137,7 +137,7 @@ static int readTuple (const char* end, Str tuple[]) { } static char* mallocString (Str* str) { - int length = str->end - str->begin; + int length = (int)(str->end - str->begin); char* string = MALLOC(char, length + 1); memcpy(string, str->begin, length); string[length] = '\0'; @@ -145,7 +145,7 @@ static char* mallocString (Str* str) { } static int indexOf (const char** array, int count, Str* str) { - int length = str->end - str->begin; + int length = (int)(str->end - str->begin); int i; for (i = count - 1; i >= 0; i--) if (strncmp(array[i], str->begin, length) == 0) return i; @@ -157,7 +157,7 @@ static int equals (Str* str, const char* other) { } static int toInt (Str* str) { - return strtol(str->begin, (char**)&str->end, 10); + return (int)strtol(str->begin, (char**)&str->end, 10); } static spAtlas* abortAtlas (spAtlas* self) { @@ -174,7 +174,7 @@ spAtlas* spAtlas_create (const char* begin, int length, const char* dir, void* r int count; const char* end = begin + length; - int dirLength = strlen(dir); + int dirLength = (int)strlen(dir); int needsSlash = dirLength > 0 && dir[dirLength - 1] != '/' && dir[dirLength - 1] != '\\'; spAtlasPage *page = 0; @@ -307,7 +307,7 @@ spAtlas* spAtlas_createFromFile (const char* path, void* rendererObject) { const char* lastBackwardSlash = strrchr(path, '\\'); const char* lastSlash = lastForwardSlash > lastBackwardSlash ? lastForwardSlash : lastBackwardSlash; if (lastSlash == path) lastSlash++; /* Never drop starting slash. */ - dirLength = lastSlash ? lastSlash - path : 0; + dirLength = (int)(lastSlash ? lastSlash - path : 0); dir = MALLOC(char, dirLength + 1); memcpy(dir, path, dirLength); dir[dirLength] = '\0'; diff --git a/spine-c/src/spine/Bone.c b/spine-c/src/spine/Bone.c index 0e91facc5..ad1e74da5 100644 --- a/spine-c/src/spine/Bone.c +++ b/spine-c/src/spine/Bone.c @@ -64,24 +64,29 @@ void spBone_updateWorldTransform (spBone* self) { } CONST_CAST(float, self->worldRotation) = self->data->inheritRotation ? self->parent->worldRotation + self->rotationIK : self->rotationIK; + CONST_CAST(int, self->worldFlipX) = self->parent->worldFlipX ^ self->flipX; + CONST_CAST(int, self->worldFlipY) = self->parent->worldFlipY ^ self->flipY; } else { + int skeletonFlipX = self->skeleton->flipX, skeletonFlipY = self->skeleton->flipY; CONST_CAST(float, self->worldX) = self->skeleton->flipX ? -self->x : self->x; CONST_CAST(float, self->worldY) = self->skeleton->flipY != yDown ? -self->y : self->y; CONST_CAST(float, self->worldScaleX) = self->scaleX; CONST_CAST(float, self->worldScaleY) = self->scaleY; CONST_CAST(float, self->worldRotation) = self->rotationIK; + CONST_CAST(int, self->worldFlipX) = skeletonFlipX ^ self->flipX; + CONST_CAST(int, self->worldFlipY) = skeletonFlipY ^ self->flipY; } radians = self->worldRotation * DEG_RAD; cosine = COS(radians); sine = SIN(radians); - if (self->skeleton->flipX) { + if (self->worldFlipX) { CONST_CAST(float, self->m00) = -cosine * self->worldScaleX; CONST_CAST(float, self->m01) = sine * self->worldScaleY; } else { CONST_CAST(float, self->m00) = cosine * self->worldScaleX; CONST_CAST(float, self->m01) = -sine * self->worldScaleY; } - if (self->skeleton->flipY != yDown) { + if (self->worldFlipY != yDown) { CONST_CAST(float, self->m10) = -sine * self->worldScaleX; CONST_CAST(float, self->m11) = -cosine * self->worldScaleY; } else { @@ -97,13 +102,15 @@ void spBone_setToSetupPose (spBone* self) { self->rotationIK = self->rotation; self->scaleX = self->data->scaleX; self->scaleY = self->data->scaleY; + self->flipX = self->data->flipX; + self->flipY = self->data->flipY; } void spBone_worldToLocal (spBone* self, float worldX, float worldY, float* localX, float* localY) { float invDet; float dx = worldX - self->worldX, dy = worldY - self->worldY; float m00 = self->m00, m11 = self->m11; - if (self->skeleton->flipX != (self->skeleton->flipY != yDown)) { + if (self->worldFlipX != (self->worldFlipY != yDown)) { m00 *= -1; m11 *= -1; } diff --git a/spine-c/src/spine/SkeletonData.c b/spine-c/src/spine/SkeletonData.c index d586415b7..fc80ac411 100644 --- a/spine-c/src/spine/SkeletonData.c +++ b/spine-c/src/spine/SkeletonData.c @@ -62,6 +62,9 @@ void spSkeletonData_dispose (spSkeletonData* self) { spIkConstraintData_dispose(self->ikConstraints[i]); FREE(self->ikConstraints); + FREE(self->hash); + FREE(self->version); + FREE(self); } diff --git a/spine-c/src/spine/SkeletonJson.c b/spine-c/src/spine/SkeletonJson.c index 09a0cc04d..366fe3186 100644 --- a/spine-c/src/spine/SkeletonJson.c +++ b/spine-c/src/spine/SkeletonJson.c @@ -64,7 +64,7 @@ void _spSkeletonJson_setError (spSkeletonJson* self, Json* root, const char* val int length; FREE(self->error); strcpy(message, value1); - length = strlen(value1); + length = (int)strlen(value1); if (value2) strncat(message + length, value2, 256 - length); MALLOC_STR(self->error, message); if (root) Json_dispose(root); @@ -81,7 +81,7 @@ static float toColor (const char* value, int index) { digits[0] = *value; digits[1] = *(value + 1); digits[2] = '\0'; - color = strtoul(digits, &error, 16); + color = (int)strtoul(digits, &error, 16); if (*error != 0) return -1; return color / (float)255; } @@ -106,16 +106,19 @@ static spAnimation* _spSkeletonJson_readAnimation (spSkeletonJson* self, Json* r spAnimation* animation; Json* frame; float duration; + int timelinesCount = 0; Json* bones = Json_getItem(root, "bones"); Json* slots = Json_getItem(root, "slots"); Json* ik = Json_getItem(root, "ik"); Json* ffd = Json_getItem(root, "ffd"); - Json* drawOrder = Json_getItem(root, "draworder"); + Json* drawOrder = Json_getItem(root, "drawOrder"); Json* events = Json_getItem(root, "events"); + Json* flipX = Json_getItem(root, "flipx"); + Json* flipY = Json_getItem(root, "flipy"); Json *boneMap, *slotMap, *ikMap, *ffdMap; + if (!drawOrder) drawOrder = Json_getItem(root, "draworder"); - int timelinesCount = 0; for (boneMap = bones ? bones->child : 0; boneMap; boneMap = boneMap->next) timelinesCount += boneMap->size; for (slotMap = slots ? slots->child : 0; slotMap; slotMap = slotMap->next) @@ -124,8 +127,10 @@ static spAnimation* _spSkeletonJson_readAnimation (spSkeletonJson* self, Json* r for (ffdMap = ffd ? ffd->child : 0; ffdMap; ffdMap = ffdMap->next) for (slotMap = ffdMap->child; slotMap; slotMap = slotMap->next) timelinesCount += slotMap->size; - if (events) ++timelinesCount; if (drawOrder) ++timelinesCount; + if (events) ++timelinesCount; + if (flipX) ++timelinesCount; + if (flipY) ++timelinesCount; animation = spAnimation_create(root->name, timelinesCount); animation->timelinesCount = 0; @@ -214,6 +219,17 @@ static spAnimation* _spSkeletonJson_readAnimation (spSkeletonJson* self, Json* r animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); duration = timeline->frames[timelineArray->size * 3 - 3]; if (duration > animation->duration) animation->duration = duration; + } else if (strcmp(timelineArray->name, "flipX") == 0 || strcmp(timelineArray->name, "flipY") == 0) { + int x = strcmp(timelineArray->name, "flipX") == 0; + const char* field = x ? "x" : "y"; + spFlipTimeline *timeline = spFlipTimeline_create(timelineArray->size, x); + timeline->boneIndex = boneIndex; + for (frame = timelineArray->child, i = 0; frame; frame = frame->next, ++i) + spFlipTimeline_setFrame(timeline, i, Json_getFloat(frame, "time", 0), Json_getInt(frame, field, 0)); + animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline); + duration = timeline->frames[timelineArray->size * 2 - 2]; + if (duration > animation->duration) animation->duration = duration; + } else { spAnimation_dispose(animation); _spSkeletonJson_setError(self, 0, "Invalid timeline type for a bone: ", timelineArray->name); @@ -418,8 +434,8 @@ spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const cha skeleton = Json_getItem(root, "skeleton"); if (skeleton) { - skeletonData->hash = Json_getString(skeleton, "hash", 0); - skeletonData->version = Json_getString(skeleton, "spine", 0); + MALLOC_STR(skeletonData->hash, Json_getString(skeleton, "hash", 0)); + MALLOC_STR(skeletonData->version, Json_getString(skeleton, "spine", 0)); skeletonData->width = Json_getFloat(skeleton, "width", 0); skeletonData->height = Json_getFloat(skeleton, "height", 0); } @@ -450,6 +466,8 @@ spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const cha boneData->scaleY = Json_getFloat(boneMap, "scaleY", 1); boneData->inheritScale = Json_getInt(boneMap, "inheritScale", 1); boneData->inheritRotation = Json_getInt(boneMap, "inheritRotation", 1); + boneData->flipX = Json_getInt(boneMap, "flipX", 0); + boneData->flipY = Json_getInt(boneMap, "flipY", 0); skeletonData->bones[i] = boneData; skeletonData->bonesCount++; diff --git a/spine-c/src/spine/extension.c b/spine-c/src/spine/extension.c index 7920491e8..f45bb2d26 100644 --- a/spine-c/src/spine/extension.c +++ b/spine-c/src/spine/extension.c @@ -67,7 +67,7 @@ char* _readFile (const char* path, int* length) { if (!file) return 0; fseek(file, 0, SEEK_END); - *length = ftell(file); + *length = (int)ftell(file); fseek(file, 0, SEEK_SET); data = MALLOC(char, *length); diff --git a/spine-as3/spine-as3-example/src/goblins-ffd.atlas b/spine-cocos2d-iphone/2/Resources/goblins-mesh.atlas similarity index 99% rename from spine-as3/spine-as3-example/src/goblins-ffd.atlas rename to spine-cocos2d-iphone/2/Resources/goblins-mesh.atlas index 5fefae2bb..d0ddb80c6 100644 --- a/spine-as3/spine-as3-example/src/goblins-ffd.atlas +++ b/spine-cocos2d-iphone/2/Resources/goblins-mesh.atlas @@ -1,5 +1,5 @@ -goblins-ffd.png +goblins-mesh.png format: RGBA8888 filter: Linear,Linear repeat: none diff --git a/spine-cocos2d-iphone/2/Resources/goblins-ffd.json b/spine-cocos2d-iphone/2/Resources/goblins-mesh.json similarity index 100% rename from spine-cocos2d-iphone/2/Resources/goblins-ffd.json rename to spine-cocos2d-iphone/2/Resources/goblins-mesh.json diff --git a/spine-cocos2d-iphone/2/Resources/goblins-ffd.png b/spine-cocos2d-iphone/2/Resources/goblins-mesh.png similarity index 100% rename from spine-cocos2d-iphone/2/Resources/goblins-ffd.png rename to spine-cocos2d-iphone/2/Resources/goblins-mesh.png diff --git a/spine-cocos2d-iphone/2/example/GoblinsExample.m b/spine-cocos2d-iphone/2/example/GoblinsExample.m index 23bf66920..46d973ba5 100644 --- a/spine-cocos2d-iphone/2/example/GoblinsExample.m +++ b/spine-cocos2d-iphone/2/example/GoblinsExample.m @@ -14,7 +14,7 @@ self = [super initWithColor:ccc4(128, 128, 128, 255)]; if (!self) return nil; - skeletonNode = [SkeletonAnimation skeletonWithFile:@"goblins-ffd.json" atlasFile:@"goblins-ffd.atlas" scale:1]; + skeletonNode = [SkeletonAnimation skeletonWithFile:@"goblins-mesh.json" atlasFile:@"goblins-mesh.atlas" scale:1]; [skeletonNode setSkin:@"goblin"]; [skeletonNode setAnimationForTrack:0 name:@"walk" loop:YES]; diff --git a/spine-cocos2d-iphone/2/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj b/spine-cocos2d-iphone/2/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj index ba94640bc..2a7de1097 100644 --- a/spine-cocos2d-iphone/2/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj +++ b/spine-cocos2d-iphone/2/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj @@ -7,7 +7,12 @@ objects = { /* Begin PBXBuildFile section */ - 434D47F1192A2480003127B5 /* libcocos2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 434D47E2192A246B003127B5 /* libcocos2d.a */; }; + 4327E30419E9879C007E7FB7 /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4327E30219E9879C007E7FB7 /* IkConstraint.c */; }; + 4327E30519E9879C007E7FB7 /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 4327E30319E9879C007E7FB7 /* IkConstraintData.c */; }; + 4327E30619E98913007E7FB7 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 652107951895250000B1FF07 /* CoreText.framework */; }; + 4327E30919E98977007E7FB7 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4327E30819E98977007E7FB7 /* GLKit.framework */; }; + 4327E30A19E989A3007E7FB7 /* libcocos2d_chipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 434D47E6192A246B003127B5 /* libcocos2d_chipmunk.a */; }; + 4327E30B19E98A32007E7FB7 /* libChipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 434D47E0192A246B003127B5 /* libChipmunk.a */; }; 43C3282F170B0C19004A9460 /* spine-cocos2d-iphone.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C3282D170B0C19004A9460 /* spine-cocos2d-iphone.m */; }; 43C3286C170B0DA6004A9460 /* spineboy.json in Resources */ = {isa = PBXBuildFile; fileRef = 43C32868170B0DA6004A9460 /* spineboy.json */; }; 43C3286E170B0DA6004A9460 /* spineboy.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43C3286A170B0DA6004A9460 /* spineboy.atlas */; }; @@ -25,9 +30,9 @@ 43C32888170B0DBE004A9460 /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 43C3287C170B0DBE004A9460 /* iTunesArtwork */; }; 43C32A06170B0F93004A9460 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A05170B0F93004A9460 /* main.m */; }; 43C32A09170B10FF004A9460 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A08170B10FF004A9460 /* AppDelegate.m */; }; - 43F7010F1927FBC700CA4038 /* goblins-ffd.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */; }; - 43F701101927FBC700CA4038 /* goblins-ffd.json in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010D1927FBC700CA4038 /* goblins-ffd.json */; }; - 43F701111927FBC700CA4038 /* goblins-ffd.png in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010E1927FBC700CA4038 /* goblins-ffd.png */; }; + 43F7010F1927FBC700CA4038 /* goblins-mesh.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010C1927FBC700CA4038 /* goblins-mesh.atlas */; }; + 43F701101927FBC700CA4038 /* goblins-mesh.json in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010D1927FBC700CA4038 /* goblins-mesh.json */; }; + 43F701111927FBC700CA4038 /* goblins-mesh.png in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010E1927FBC700CA4038 /* goblins-mesh.png */; }; 43F7FF511927F91900CA4038 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF381927F91900CA4038 /* Animation.c */; }; 43F7FF521927F91900CA4038 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF391927F91900CA4038 /* AnimationState.c */; }; 43F7FF531927F91900CA4038 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF3A1927F91900CA4038 /* AnimationStateData.c */; }; @@ -57,7 +62,6 @@ 43F7FF891927F94800CA4038 /* SkeletonRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF861927F94800CA4038 /* SkeletonRenderer.m */; }; 43F7FF8E1927F96700CA4038 /* GoblinsExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF8B1927F96700CA4038 /* GoblinsExample.m */; }; 43F7FF8F1927F96700CA4038 /* SpineboyExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF8D1927F96700CA4038 /* SpineboyExample.m */; }; - 652107961895250000B1FF07 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 652107951895250000B1FF07 /* CoreText.framework */; }; 9A5D2499170A94DA0030D4DD /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D2498170A94DA0030D4DD /* QuartzCore.framework */; }; 9A5D249B170A94DA0030D4DD /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D249A170A94DA0030D4DD /* OpenGLES.framework */; }; 9A5D249D170A94DA0030D4DD /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D249C170A94DA0030D4DD /* OpenAL.framework */; }; @@ -150,6 +154,11 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 4327E30019E9879C007E7FB7 /* IkConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IkConstraint.h; path = "../../spine-c/include/spine/IkConstraint.h"; sourceTree = ""; }; + 4327E30119E9879C007E7FB7 /* IkConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IkConstraintData.h; path = "../../spine-c/include/spine/IkConstraintData.h"; sourceTree = ""; }; + 4327E30219E9879C007E7FB7 /* IkConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IkConstraint.c; path = "../../spine-c/src/spine/IkConstraint.c"; sourceTree = ""; }; + 4327E30319E9879C007E7FB7 /* IkConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IkConstraintData.c; path = "../../spine-c/src/spine/IkConstraintData.c"; sourceTree = ""; }; + 4327E30819E98977007E7FB7 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; 434D47CA192A246A003127B5 /* cocos2d-ios.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "cocos2d-ios.xcodeproj"; path = "cocos2d/cocos2d-ios.xcodeproj"; sourceTree = SOURCE_ROOT; }; 43C3282D170B0C19004A9460 /* spine-cocos2d-iphone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "spine-cocos2d-iphone.m"; path = "src/spine/spine-cocos2d-iphone.m"; sourceTree = ""; }; 43C3282E170B0C19004A9460 /* spine-cocos2d-iphone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "spine-cocos2d-iphone.h"; path = "src/spine/spine-cocos2d-iphone.h"; sourceTree = ""; }; @@ -172,9 +181,9 @@ 43C32A05170B0F93004A9460 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "Resources-ios/main.m"; sourceTree = ""; }; 43C32A07170B10FF004A9460 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "Resources-ios/AppDelegate.h"; sourceTree = ""; }; 43C32A08170B10FF004A9460 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "Resources-ios/AppDelegate.m"; sourceTree = ""; }; - 43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "goblins-ffd.atlas"; path = "Resources/goblins-ffd.atlas"; sourceTree = ""; }; - 43F7010D1927FBC700CA4038 /* goblins-ffd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "goblins-ffd.json"; path = "Resources/goblins-ffd.json"; sourceTree = ""; }; - 43F7010E1927FBC700CA4038 /* goblins-ffd.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "goblins-ffd.png"; path = "Resources/goblins-ffd.png"; sourceTree = ""; }; + 43F7010C1927FBC700CA4038 /* goblins-mesh.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "goblins-mesh.atlas"; path = "Resources/goblins-mesh.atlas"; sourceTree = ""; }; + 43F7010D1927FBC700CA4038 /* goblins-mesh.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "goblins-mesh.json"; path = "Resources/goblins-mesh.json"; sourceTree = ""; }; + 43F7010E1927FBC700CA4038 /* goblins-mesh.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "goblins-mesh.png"; path = "Resources/goblins-mesh.png"; sourceTree = ""; }; 43F7FF381927F91900CA4038 /* Animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Animation.c; path = "../../spine-c/src/spine/Animation.c"; sourceTree = ""; }; 43F7FF391927F91900CA4038 /* AnimationState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationState.c; path = "../../spine-c/src/spine/AnimationState.c"; sourceTree = ""; }; 43F7FF3A1927F91900CA4038 /* AnimationStateData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationStateData.c; path = "../../spine-c/src/spine/AnimationStateData.c"; sourceTree = ""; }; @@ -252,8 +261,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 434D47F1192A2480003127B5 /* libcocos2d.a in Frameworks */, - 652107961895250000B1FF07 /* CoreText.framework in Frameworks */, + 4327E30A19E989A3007E7FB7 /* libcocos2d_chipmunk.a in Frameworks */, + 4327E30B19E98A32007E7FB7 /* libChipmunk.a in Frameworks */, + 4327E30919E98977007E7FB7 /* GLKit.framework in Frameworks */, + 4327E30619E98913007E7FB7 /* CoreText.framework in Frameworks */, 9A5D2499170A94DA0030D4DD /* QuartzCore.framework in Frameworks */, 9A5D249B170A94DA0030D4DD /* OpenGLES.framework in Frameworks */, 9A5D249D170A94DA0030D4DD /* OpenAL.framework in Frameworks */, @@ -333,6 +344,10 @@ 43F7FF741927F92500CA4038 /* EventData.h */, 43F7FF441927F91900CA4038 /* extension.c */, 43F7FF751927F92500CA4038 /* extension.h */, + 4327E30219E9879C007E7FB7 /* IkConstraint.c */, + 4327E30019E9879C007E7FB7 /* IkConstraint.h */, + 4327E30319E9879C007E7FB7 /* IkConstraintData.c */, + 4327E30119E9879C007E7FB7 /* IkConstraintData.h */, 43F7FF451927F91900CA4038 /* Json.c */, 43F7FF461927F91900CA4038 /* Json.h */, 43F7FF471927F91900CA4038 /* MeshAttachment.c */, @@ -378,9 +393,9 @@ 43C32867170B0C7F004A9460 /* Resources */ = { isa = PBXGroup; children = ( - 43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */, - 43F7010D1927FBC700CA4038 /* goblins-ffd.json */, - 43F7010E1927FBC700CA4038 /* goblins-ffd.png */, + 43F7010C1927FBC700CA4038 /* goblins-mesh.atlas */, + 43F7010D1927FBC700CA4038 /* goblins-mesh.json */, + 43F7010E1927FBC700CA4038 /* goblins-mesh.png */, 43C32868170B0DA6004A9460 /* spineboy.json */, 43C3286A170B0DA6004A9460 /* spineboy.atlas */, 43C3286B170B0DA6004A9460 /* spineboy.png */, @@ -430,6 +445,7 @@ 9A5D2497170A94DA0030D4DD /* Frameworks */ = { isa = PBXGroup; children = ( + 4327E30819E98977007E7FB7 /* GLKit.framework */, 652107951895250000B1FF07 /* CoreText.framework */, 9A5D2498170A94DA0030D4DD /* QuartzCore.framework */, 9A5D249A170A94DA0030D4DD /* OpenGLES.framework */, @@ -479,7 +495,7 @@ 9A5D248D170A94DA0030D4DD /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; + LastUpgradeCheck = 0510; ORGANIZATIONNAME = "Craig Hinrichs"; }; buildConfigurationList = 9A5D2490170A94DA0030D4DD /* Build configuration list for PBXProject "spine-cocos2d-iphone-ios" */; @@ -604,9 +620,9 @@ 43C32885170B0DBE004A9460 /* Icon.png in Resources */, 43C32886170B0DBE004A9460 /* Icon@2x.png in Resources */, 43C32888170B0DBE004A9460 /* iTunesArtwork in Resources */, - 43F7010F1927FBC700CA4038 /* goblins-ffd.atlas in Resources */, - 43F701101927FBC700CA4038 /* goblins-ffd.json in Resources */, - 43F701111927FBC700CA4038 /* goblins-ffd.png in Resources */, + 43F7010F1927FBC700CA4038 /* goblins-mesh.atlas in Resources */, + 43F701101927FBC700CA4038 /* goblins-mesh.json in Resources */, + 43F701111927FBC700CA4038 /* goblins-mesh.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -633,9 +649,11 @@ 43F7FF5B1927F91900CA4038 /* Event.c in Sources */, 43F7FF5C1927F91900CA4038 /* EventData.c in Sources */, 43F7FF5D1927F91900CA4038 /* extension.c in Sources */, + 4327E30419E9879C007E7FB7 /* IkConstraint.c in Sources */, 43F7FF5E1927F91900CA4038 /* Json.c in Sources */, 43F7FF5F1927F91900CA4038 /* MeshAttachment.c in Sources */, 43F7FF601927F91900CA4038 /* RegionAttachment.c in Sources */, + 4327E30519E9879C007E7FB7 /* IkConstraintData.c in Sources */, 43F7FF611927F91900CA4038 /* Skeleton.c in Sources */, 43F7FF621927F91900CA4038 /* SkeletonBounds.c in Sources */, 43F7FF631927F91900CA4038 /* SkeletonData.c in Sources */, @@ -659,6 +677,12 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; @@ -668,11 +692,17 @@ ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 4.0; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT)"; }; name = Debug; }; @@ -680,6 +710,12 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -687,18 +723,24 @@ "NS_BLOCK_ASSERTIONS=1", ); GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 4.0; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT)"; }; name = Release; }; 9A5D2644170A94DC0030D4DD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -710,12 +752,14 @@ "\"cocos2d/cocos2d\"/**", ); INFOPLIST_FILE = "Resources-ios/Info.plist"; + ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "-lz", "-lsqlite3", "-ObjC", ); PRODUCT_NAME = "$(TARGET_NAME)"; + VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT)"; WRAPPER_EXTENSION = app; }; name = Debug; @@ -723,7 +767,8 @@ 9A5D2645170A94DC0030D4DD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Resources-ios/Prefix.pch"; @@ -734,6 +779,7 @@ "\"cocos2d/cocos2d\"/**", ); INFOPLIST_FILE = "Resources-ios/Info.plist"; + ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "-lz", "-lsqlite3", @@ -741,6 +787,7 @@ ); PRODUCT_NAME = "$(TARGET_NAME)"; VALIDATE_PRODUCT = YES; + VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT)"; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-osx.xcodeproj/project.pbxproj b/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-osx.xcodeproj/project.pbxproj deleted file mode 100644 index 5e38e24e3..000000000 --- a/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-osx.xcodeproj/project.pbxproj +++ /dev/null @@ -1,676 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 43BFBE0F170A778A00ECBACB /* spine-cocos2d-iphone.m in Sources */ = {isa = PBXBuildFile; fileRef = 43BFBE0D170A778A00ECBACB /* spine-cocos2d-iphone.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 43C32A1B170B1295004A9460 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A11170B1295004A9460 /* AppDelegate.m */; }; - 43C32A1C170B1295004A9460 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A13170B1295004A9460 /* InfoPlist.strings */; }; - 43C32A1D170B1295004A9460 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A15170B1295004A9460 /* MainMenu.xib */; }; - 43C32A1E170B1295004A9460 /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A17170B1295004A9460 /* icon.icns */; }; - 43C32A20170B1295004A9460 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A19170B1295004A9460 /* main.m */; }; - 43C32A36170D0A4D004A9460 /* spineboy.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A30170D0A4D004A9460 /* spineboy.atlas */; }; - 43C32A37170D0A4D004A9460 /* spineboy.json in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A31170D0A4D004A9460 /* spineboy.json */; }; - 43C32A38170D0A4D004A9460 /* spineboy.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A32170D0A4D004A9460 /* spineboy.png */; }; - 43F7FD711927C31700CA4038 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD581927C31700CA4038 /* Animation.c */; }; - 43F7FD721927C31700CA4038 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD591927C31700CA4038 /* AnimationState.c */; }; - 43F7FD731927C31700CA4038 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5A1927C31700CA4038 /* AnimationStateData.c */; }; - 43F7FD741927C31700CA4038 /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5B1927C31700CA4038 /* Atlas.c */; }; - 43F7FD751927C31700CA4038 /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5C1927C31700CA4038 /* AtlasAttachmentLoader.c */; }; - 43F7FD761927C31700CA4038 /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5D1927C31700CA4038 /* Attachment.c */; }; - 43F7FD771927C31700CA4038 /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5E1927C31700CA4038 /* AttachmentLoader.c */; }; - 43F7FD781927C31700CA4038 /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5F1927C31700CA4038 /* Bone.c */; }; - 43F7FD791927C31700CA4038 /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD601927C31700CA4038 /* BoneData.c */; }; - 43F7FD7A1927C31700CA4038 /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD611927C31700CA4038 /* BoundingBoxAttachment.c */; }; - 43F7FD7B1927C31700CA4038 /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD621927C31700CA4038 /* Event.c */; }; - 43F7FD7C1927C31700CA4038 /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD631927C31700CA4038 /* EventData.c */; }; - 43F7FD7D1927C31700CA4038 /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD641927C31700CA4038 /* extension.c */; }; - 43F7FD7E1927C31700CA4038 /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD651927C31700CA4038 /* Json.c */; }; - 43F7FD7F1927C31700CA4038 /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD671927C31700CA4038 /* MeshAttachment.c */; }; - 43F7FD801927C31700CA4038 /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD681927C31700CA4038 /* RegionAttachment.c */; }; - 43F7FD811927C31700CA4038 /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD691927C31700CA4038 /* Skeleton.c */; }; - 43F7FD821927C31700CA4038 /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6A1927C31700CA4038 /* SkeletonBounds.c */; }; - 43F7FD831927C31700CA4038 /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6B1927C31700CA4038 /* SkeletonData.c */; }; - 43F7FD841927C31700CA4038 /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6C1927C31700CA4038 /* SkeletonJson.c */; }; - 43F7FD851927C31700CA4038 /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6D1927C31700CA4038 /* Skin.c */; }; - 43F7FD861927C31700CA4038 /* SkinnedMeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6E1927C31700CA4038 /* SkinnedMeshAttachment.c */; }; - 43F7FD871927C31700CA4038 /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6F1927C31700CA4038 /* Slot.c */; }; - 43F7FD881927C31700CA4038 /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD701927C31700CA4038 /* SlotData.c */; }; - 43F7FDA81927C33C00CA4038 /* SkeletonAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDA41927C33C00CA4038 /* SkeletonAnimation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 43F7FDA91927C33C00CA4038 /* SkeletonRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDA61927C33C00CA4038 /* SkeletonRenderer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 43F7FDAC1927C34600CA4038 /* SpineboyExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDAB1927C34600CA4038 /* SpineboyExample.m */; }; - 43F7FDB01927C35600CA4038 /* goblins-ffd.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43F7FDAD1927C35600CA4038 /* goblins-ffd.atlas */; }; - 43F7FDB11927C35600CA4038 /* goblins-ffd.json in Resources */ = {isa = PBXBuildFile; fileRef = 43F7FDAE1927C35600CA4038 /* goblins-ffd.json */; }; - 43F7FDB21927C35600CA4038 /* goblins-ffd.png in Resources */ = {isa = PBXBuildFile; fileRef = 43F7FDAF1927C35600CA4038 /* goblins-ffd.png */; }; - 43F7FDB51927D04200CA4038 /* GoblinsExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDB41927D04200CA4038 /* GoblinsExample.m */; }; - 83F1A0E319868B46001F6B44 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83F1A0E219868B46001F6B44 /* GLKit.framework */; }; - A2BD1E68192A41C100405470 /* libcocos2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E63192A417300405470 /* libcocos2d.a */; }; - A2BD1E73192A47A000405470 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E6C192A47A000405470 /* AVFoundation.framework */; }; - A2BD1E74192A47A000405470 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E6D192A47A000405470 /* QuartzCore.framework */; }; - A2BD1E75192A47A000405470 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E6E192A47A000405470 /* OpenGL.framework */; }; - A2BD1E76192A47A000405470 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E6F192A47A000405470 /* OpenAL.framework */; }; - A2BD1E77192A47A000405470 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E70192A47A000405470 /* AudioToolbox.framework */; }; - A2BD1E78192A47A000405470 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E71192A47A000405470 /* AppKit.framework */; }; - A2BD1E79192A47A000405470 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E72192A47A000405470 /* Foundation.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - A2BD1E62192A417300405470 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = E01E663D121CA00A001A484F; - remoteInfo = cocos2d; - }; - A2BD1E66192A417300405470 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D37EE9FC187D4E7700CB5EF2; - remoteInfo = ObjectiveChipmunk; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 4319B51316FF9B2600C1D7A9 /* SpineExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpineExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 43BFBE0D170A778A00ECBACB /* spine-cocos2d-iphone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "spine-cocos2d-iphone.m"; path = "src/spine/spine-cocos2d-iphone.m"; sourceTree = ""; }; - 43BFBE0E170A778A00ECBACB /* spine-cocos2d-iphone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "spine-cocos2d-iphone.h"; path = "src/spine/spine-cocos2d-iphone.h"; sourceTree = ""; }; - 43C32A10170B1295004A9460 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "../Resources-mac/AppDelegate.h"; sourceTree = ""; }; - 43C32A11170B1295004A9460 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "../Resources-mac/AppDelegate.m"; sourceTree = ""; }; - 43C32A14170B1295004A9460 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = InfoPlist.strings; sourceTree = ""; }; - 43C32A16170B1295004A9460 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = MainMenu.xib; sourceTree = ""; }; - 43C32A17170B1295004A9460 /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = icon.icns; path = "Resources-mac/icon.icns"; sourceTree = ""; }; - 43C32A18170B1295004A9460 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = "Resources-mac/Info.plist"; sourceTree = ""; }; - 43C32A19170B1295004A9460 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "../Resources-mac/main.m"; sourceTree = ""; }; - 43C32A1A170B1295004A9460 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = "../Resources-mac/Prefix.pch"; sourceTree = ""; }; - 43C32A30170D0A4D004A9460 /* spineboy.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = spineboy.atlas; sourceTree = ""; }; - 43C32A31170D0A4D004A9460 /* spineboy.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = spineboy.json; sourceTree = ""; }; - 43C32A32170D0A4D004A9460 /* spineboy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = spineboy.png; sourceTree = ""; }; - 43F7FD581927C31700CA4038 /* Animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Animation.c; path = "../../spine-c/src/spine/Animation.c"; sourceTree = ""; }; - 43F7FD591927C31700CA4038 /* AnimationState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationState.c; path = "../../spine-c/src/spine/AnimationState.c"; sourceTree = ""; }; - 43F7FD5A1927C31700CA4038 /* AnimationStateData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationStateData.c; path = "../../spine-c/src/spine/AnimationStateData.c"; sourceTree = ""; }; - 43F7FD5B1927C31700CA4038 /* Atlas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Atlas.c; path = "../../spine-c/src/spine/Atlas.c"; sourceTree = ""; }; - 43F7FD5C1927C31700CA4038 /* AtlasAttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AtlasAttachmentLoader.c; path = "../../spine-c/src/spine/AtlasAttachmentLoader.c"; sourceTree = ""; }; - 43F7FD5D1927C31700CA4038 /* Attachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Attachment.c; path = "../../spine-c/src/spine/Attachment.c"; sourceTree = ""; }; - 43F7FD5E1927C31700CA4038 /* AttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AttachmentLoader.c; path = "../../spine-c/src/spine/AttachmentLoader.c"; sourceTree = ""; }; - 43F7FD5F1927C31700CA4038 /* Bone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Bone.c; path = "../../spine-c/src/spine/Bone.c"; sourceTree = ""; }; - 43F7FD601927C31700CA4038 /* BoneData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BoneData.c; path = "../../spine-c/src/spine/BoneData.c"; sourceTree = ""; }; - 43F7FD611927C31700CA4038 /* BoundingBoxAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BoundingBoxAttachment.c; path = "../../spine-c/src/spine/BoundingBoxAttachment.c"; sourceTree = ""; }; - 43F7FD621927C31700CA4038 /* Event.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Event.c; path = "../../spine-c/src/spine/Event.c"; sourceTree = ""; }; - 43F7FD631927C31700CA4038 /* EventData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = EventData.c; path = "../../spine-c/src/spine/EventData.c"; sourceTree = ""; }; - 43F7FD641927C31700CA4038 /* extension.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = extension.c; path = "../../spine-c/src/spine/extension.c"; sourceTree = ""; }; - 43F7FD651927C31700CA4038 /* Json.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Json.c; path = "../../spine-c/src/spine/Json.c"; sourceTree = ""; }; - 43F7FD661927C31700CA4038 /* Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Json.h; path = "../../spine-c/src/spine/Json.h"; sourceTree = ""; }; - 43F7FD671927C31700CA4038 /* MeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = MeshAttachment.c; path = "../../spine-c/src/spine/MeshAttachment.c"; sourceTree = ""; }; - 43F7FD681927C31700CA4038 /* RegionAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = RegionAttachment.c; path = "../../spine-c/src/spine/RegionAttachment.c"; sourceTree = ""; }; - 43F7FD691927C31700CA4038 /* Skeleton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Skeleton.c; path = "../../spine-c/src/spine/Skeleton.c"; sourceTree = ""; }; - 43F7FD6A1927C31700CA4038 /* SkeletonBounds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonBounds.c; path = "../../spine-c/src/spine/SkeletonBounds.c"; sourceTree = ""; }; - 43F7FD6B1927C31700CA4038 /* SkeletonData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonData.c; path = "../../spine-c/src/spine/SkeletonData.c"; sourceTree = ""; }; - 43F7FD6C1927C31700CA4038 /* SkeletonJson.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonJson.c; path = "../../spine-c/src/spine/SkeletonJson.c"; sourceTree = ""; }; - 43F7FD6D1927C31700CA4038 /* Skin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Skin.c; path = "../../spine-c/src/spine/Skin.c"; sourceTree = ""; }; - 43F7FD6E1927C31700CA4038 /* SkinnedMeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkinnedMeshAttachment.c; path = "../../spine-c/src/spine/SkinnedMeshAttachment.c"; sourceTree = ""; }; - 43F7FD6F1927C31700CA4038 /* Slot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Slot.c; path = "../../spine-c/src/spine/Slot.c"; sourceTree = ""; }; - 43F7FD701927C31700CA4038 /* SlotData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SlotData.c; path = "../../spine-c/src/spine/SlotData.c"; sourceTree = ""; }; - 43F7FD891927C32800CA4038 /* Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Animation.h; path = "../../spine-c/include/spine/Animation.h"; sourceTree = ""; }; - 43F7FD8A1927C32800CA4038 /* AnimationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationState.h; path = "../../spine-c/include/spine/AnimationState.h"; sourceTree = ""; }; - 43F7FD8B1927C32800CA4038 /* AnimationStateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationStateData.h; path = "../../spine-c/include/spine/AnimationStateData.h"; sourceTree = ""; }; - 43F7FD8C1927C32800CA4038 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Atlas.h; path = "../../spine-c/include/spine/Atlas.h"; sourceTree = ""; }; - 43F7FD8D1927C32800CA4038 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtlasAttachmentLoader.h; path = "../../spine-c/include/spine/AtlasAttachmentLoader.h"; sourceTree = ""; }; - 43F7FD8E1927C32800CA4038 /* Attachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Attachment.h; path = "../../spine-c/include/spine/Attachment.h"; sourceTree = ""; }; - 43F7FD8F1927C32800CA4038 /* AttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AttachmentLoader.h; path = "../../spine-c/include/spine/AttachmentLoader.h"; sourceTree = ""; }; - 43F7FD901927C32800CA4038 /* Bone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bone.h; path = "../../spine-c/include/spine/Bone.h"; sourceTree = ""; }; - 43F7FD911927C32800CA4038 /* BoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BoneData.h; path = "../../spine-c/include/spine/BoneData.h"; sourceTree = ""; }; - 43F7FD921927C32800CA4038 /* BoundingBoxAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BoundingBoxAttachment.h; path = "../../spine-c/include/spine/BoundingBoxAttachment.h"; sourceTree = ""; }; - 43F7FD931927C32800CA4038 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Event.h; path = "../../spine-c/include/spine/Event.h"; sourceTree = ""; }; - 43F7FD941927C32800CA4038 /* EventData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EventData.h; path = "../../spine-c/include/spine/EventData.h"; sourceTree = ""; }; - 43F7FD951927C32800CA4038 /* extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extension.h; path = "../../spine-c/include/spine/extension.h"; sourceTree = ""; }; - 43F7FD961927C32800CA4038 /* MeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MeshAttachment.h; path = "../../spine-c/include/spine/MeshAttachment.h"; sourceTree = ""; }; - 43F7FD971927C32800CA4038 /* RegionAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegionAttachment.h; path = "../../spine-c/include/spine/RegionAttachment.h"; sourceTree = ""; }; - 43F7FD981927C32800CA4038 /* Skeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Skeleton.h; path = "../../spine-c/include/spine/Skeleton.h"; sourceTree = ""; }; - 43F7FD991927C32800CA4038 /* SkeletonBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonBounds.h; path = "../../spine-c/include/spine/SkeletonBounds.h"; sourceTree = ""; }; - 43F7FD9A1927C32800CA4038 /* SkeletonData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonData.h; path = "../../spine-c/include/spine/SkeletonData.h"; sourceTree = ""; }; - 43F7FD9B1927C32800CA4038 /* SkeletonJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonJson.h; path = "../../spine-c/include/spine/SkeletonJson.h"; sourceTree = ""; }; - 43F7FD9C1927C32800CA4038 /* Skin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Skin.h; path = "../../spine-c/include/spine/Skin.h"; sourceTree = ""; }; - 43F7FD9D1927C32800CA4038 /* SkinnedMeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkinnedMeshAttachment.h; path = "../../spine-c/include/spine/SkinnedMeshAttachment.h"; sourceTree = ""; }; - 43F7FD9E1927C32800CA4038 /* Slot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Slot.h; path = "../../spine-c/include/spine/Slot.h"; sourceTree = ""; }; - 43F7FD9F1927C32800CA4038 /* SlotData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SlotData.h; path = "../../spine-c/include/spine/SlotData.h"; sourceTree = ""; }; - 43F7FDA01927C32800CA4038 /* spine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spine.h; path = "../../spine-c/include/spine/spine.h"; sourceTree = ""; }; - 43F7FDA31927C33C00CA4038 /* SkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonAnimation.h; path = src/spine/SkeletonAnimation.h; sourceTree = ""; }; - 43F7FDA41927C33C00CA4038 /* SkeletonAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SkeletonAnimation.m; path = src/spine/SkeletonAnimation.m; sourceTree = ""; }; - 43F7FDA51927C33C00CA4038 /* SkeletonRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonRenderer.h; path = src/spine/SkeletonRenderer.h; sourceTree = ""; }; - 43F7FDA61927C33C00CA4038 /* SkeletonRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SkeletonRenderer.m; path = src/spine/SkeletonRenderer.m; sourceTree = ""; }; - 43F7FDAA1927C34600CA4038 /* SpineboyExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpineboyExample.h; sourceTree = ""; }; - 43F7FDAB1927C34600CA4038 /* SpineboyExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpineboyExample.m; sourceTree = ""; }; - 43F7FDAD1927C35600CA4038 /* goblins-ffd.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "goblins-ffd.atlas"; sourceTree = ""; }; - 43F7FDAE1927C35600CA4038 /* goblins-ffd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "goblins-ffd.json"; sourceTree = ""; }; - 43F7FDAF1927C35600CA4038 /* goblins-ffd.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "goblins-ffd.png"; sourceTree = ""; }; - 43F7FDB31927D04200CA4038 /* GoblinsExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GoblinsExample.h; sourceTree = ""; }; - 43F7FDB41927D04200CA4038 /* GoblinsExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GoblinsExample.m; sourceTree = ""; }; - 83F1A0E219868B46001F6B44 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; - A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "cocos2d-osx.xcodeproj"; path = "cocos2d/cocos2d-osx.xcodeproj"; sourceTree = SOURCE_ROOT; }; - A2BD1E6C192A47A000405470 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - A2BD1E6D192A47A000405470 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - A2BD1E6E192A47A000405470 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; - A2BD1E6F192A47A000405470 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; - A2BD1E70192A47A000405470 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - A2BD1E71192A47A000405470 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - A2BD1E72192A47A000405470 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 4319B51016FF9B2600C1D7A9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 83F1A0E319868B46001F6B44 /* GLKit.framework in Frameworks */, - A2BD1E78192A47A000405470 /* AppKit.framework in Frameworks */, - A2BD1E73192A47A000405470 /* AVFoundation.framework in Frameworks */, - A2BD1E75192A47A000405470 /* OpenGL.framework in Frameworks */, - A2BD1E68192A41C100405470 /* libcocos2d.a in Frameworks */, - A2BD1E76192A47A000405470 /* OpenAL.framework in Frameworks */, - A2BD1E74192A47A000405470 /* QuartzCore.framework in Frameworks */, - A2BD1E77192A47A000405470 /* AudioToolbox.framework in Frameworks */, - A2BD1E79192A47A000405470 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4319B50816FF9B2600C1D7A9 = { - isa = PBXGroup; - children = ( - 4319B6BC16FF9D1700C1D7A9 /* Classes */, - 4319B7CB16FF9D3900C1D7A9 /* Resources */, - 43C32A0F170B1282004A9460 /* Resources-mac */, - 4319B6C616FF9D3900C1D7A9 /* cocos2d */, - 4319B51616FF9B2600C1D7A9 /* Frameworks */, - 4319B51416FF9B2600C1D7A9 /* Products */, - ); - sourceTree = ""; - }; - 4319B51416FF9B2600C1D7A9 /* Products */ = { - isa = PBXGroup; - children = ( - 4319B51316FF9B2600C1D7A9 /* SpineExample.app */, - ); - name = Products; - sourceTree = ""; - }; - 4319B51616FF9B2600C1D7A9 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 83F1A0E219868B46001F6B44 /* GLKit.framework */, - A2BD1E6C192A47A000405470 /* AVFoundation.framework */, - A2BD1E6D192A47A000405470 /* QuartzCore.framework */, - A2BD1E6E192A47A000405470 /* OpenGL.framework */, - A2BD1E6F192A47A000405470 /* OpenAL.framework */, - A2BD1E70192A47A000405470 /* AudioToolbox.framework */, - A2BD1E71192A47A000405470 /* AppKit.framework */, - A2BD1E72192A47A000405470 /* Foundation.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4319B6BC16FF9D1700C1D7A9 /* Classes */ = { - isa = PBXGroup; - children = ( - 4319B8921701168A00C1D7A9 /* spine-c */, - 4319B8931701168F00C1D7A9 /* spine-cocos2d-iphone */, - 43F7FDAA1927C34600CA4038 /* SpineboyExample.h */, - 43F7FDAB1927C34600CA4038 /* SpineboyExample.m */, - 43F7FDB31927D04200CA4038 /* GoblinsExample.h */, - 43F7FDB41927D04200CA4038 /* GoblinsExample.m */, - 43C32A10170B1295004A9460 /* AppDelegate.h */, - 43C32A11170B1295004A9460 /* AppDelegate.m */, - 43C32A19170B1295004A9460 /* main.m */, - 43C32A1A170B1295004A9460 /* Prefix.pch */, - ); - name = Classes; - path = example; - sourceTree = SOURCE_ROOT; - }; - 4319B6C616FF9D3900C1D7A9 /* cocos2d */ = { - isa = PBXGroup; - children = ( - A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */, - ); - name = cocos2d; - path = libs; - sourceTree = SOURCE_ROOT; - }; - 4319B7CB16FF9D3900C1D7A9 /* Resources */ = { - isa = PBXGroup; - children = ( - 43F7FDAD1927C35600CA4038 /* goblins-ffd.atlas */, - 43F7FDAE1927C35600CA4038 /* goblins-ffd.json */, - 43F7FDAF1927C35600CA4038 /* goblins-ffd.png */, - 43C32A30170D0A4D004A9460 /* spineboy.atlas */, - 43C32A31170D0A4D004A9460 /* spineboy.json */, - 43C32A32170D0A4D004A9460 /* spineboy.png */, - ); - path = Resources; - sourceTree = SOURCE_ROOT; - }; - 4319B8921701168A00C1D7A9 /* spine-c */ = { - isa = PBXGroup; - children = ( - 43F7FD581927C31700CA4038 /* Animation.c */, - 43F7FD891927C32800CA4038 /* Animation.h */, - 43F7FD591927C31700CA4038 /* AnimationState.c */, - 43F7FD8A1927C32800CA4038 /* AnimationState.h */, - 43F7FD5A1927C31700CA4038 /* AnimationStateData.c */, - 43F7FD8B1927C32800CA4038 /* AnimationStateData.h */, - 43F7FD5B1927C31700CA4038 /* Atlas.c */, - 43F7FD8C1927C32800CA4038 /* Atlas.h */, - 43F7FD5C1927C31700CA4038 /* AtlasAttachmentLoader.c */, - 43F7FD8D1927C32800CA4038 /* AtlasAttachmentLoader.h */, - 43F7FD5D1927C31700CA4038 /* Attachment.c */, - 43F7FD8E1927C32800CA4038 /* Attachment.h */, - 43F7FD5E1927C31700CA4038 /* AttachmentLoader.c */, - 43F7FD8F1927C32800CA4038 /* AttachmentLoader.h */, - 43F7FD5F1927C31700CA4038 /* Bone.c */, - 43F7FD901927C32800CA4038 /* Bone.h */, - 43F7FD601927C31700CA4038 /* BoneData.c */, - 43F7FD911927C32800CA4038 /* BoneData.h */, - 43F7FD611927C31700CA4038 /* BoundingBoxAttachment.c */, - 43F7FD921927C32800CA4038 /* BoundingBoxAttachment.h */, - 43F7FD621927C31700CA4038 /* Event.c */, - 43F7FD931927C32800CA4038 /* Event.h */, - 43F7FD631927C31700CA4038 /* EventData.c */, - 43F7FD941927C32800CA4038 /* EventData.h */, - 43F7FD641927C31700CA4038 /* extension.c */, - 43F7FD951927C32800CA4038 /* extension.h */, - 43F7FD651927C31700CA4038 /* Json.c */, - 43F7FD661927C31700CA4038 /* Json.h */, - 43F7FD671927C31700CA4038 /* MeshAttachment.c */, - 43F7FD961927C32800CA4038 /* MeshAttachment.h */, - 43F7FD681927C31700CA4038 /* RegionAttachment.c */, - 43F7FD971927C32800CA4038 /* RegionAttachment.h */, - 43F7FD691927C31700CA4038 /* Skeleton.c */, - 43F7FD981927C32800CA4038 /* Skeleton.h */, - 43F7FD6A1927C31700CA4038 /* SkeletonBounds.c */, - 43F7FD991927C32800CA4038 /* SkeletonBounds.h */, - 43F7FD6B1927C31700CA4038 /* SkeletonData.c */, - 43F7FD9A1927C32800CA4038 /* SkeletonData.h */, - 43F7FD6C1927C31700CA4038 /* SkeletonJson.c */, - 43F7FD9B1927C32800CA4038 /* SkeletonJson.h */, - 43F7FD6D1927C31700CA4038 /* Skin.c */, - 43F7FD9C1927C32800CA4038 /* Skin.h */, - 43F7FD6E1927C31700CA4038 /* SkinnedMeshAttachment.c */, - 43F7FD9D1927C32800CA4038 /* SkinnedMeshAttachment.h */, - 43F7FD6F1927C31700CA4038 /* Slot.c */, - 43F7FD9E1927C32800CA4038 /* Slot.h */, - 43F7FD701927C31700CA4038 /* SlotData.c */, - 43F7FD9F1927C32800CA4038 /* SlotData.h */, - 43F7FDA01927C32800CA4038 /* spine.h */, - ); - name = "spine-c"; - path = ..; - sourceTree = ""; - }; - 4319B8931701168F00C1D7A9 /* spine-cocos2d-iphone */ = { - isa = PBXGroup; - children = ( - 43F7FDA31927C33C00CA4038 /* SkeletonAnimation.h */, - 43F7FDA41927C33C00CA4038 /* SkeletonAnimation.m */, - 43F7FDA51927C33C00CA4038 /* SkeletonRenderer.h */, - 43F7FDA61927C33C00CA4038 /* SkeletonRenderer.m */, - 43BFBE0D170A778A00ECBACB /* spine-cocos2d-iphone.m */, - 43BFBE0E170A778A00ECBACB /* spine-cocos2d-iphone.h */, - ); - name = "spine-cocos2d-iphone"; - path = ..; - sourceTree = ""; - }; - 43C32A0F170B1282004A9460 /* Resources-mac */ = { - isa = PBXGroup; - children = ( - 43C32A12170B1295004A9460 /* English.lproj */, - 43C32A17170B1295004A9460 /* icon.icns */, - 43C32A18170B1295004A9460 /* Info.plist */, - ); - name = "Resources-mac"; - sourceTree = ""; - }; - 43C32A12170B1295004A9460 /* English.lproj */ = { - isa = PBXGroup; - children = ( - 43C32A13170B1295004A9460 /* InfoPlist.strings */, - 43C32A15170B1295004A9460 /* MainMenu.xib */, - ); - name = English.lproj; - path = "Resources-mac/English.lproj"; - sourceTree = ""; - }; - A2BD1E5D192A417300405470 /* Products */ = { - isa = PBXGroup; - children = ( - A2BD1E63192A417300405470 /* libcocos2d.a */, - A2BD1E67192A417300405470 /* libObjectiveChipmunk.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 4319B51216FF9B2600C1D7A9 /* SpineExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4319B6AC16FF9B2B00C1D7A9 /* Build configuration list for PBXNativeTarget "SpineExample" */; - buildPhases = ( - 4319B50F16FF9B2600C1D7A9 /* Sources */, - 4319B51016FF9B2600C1D7A9 /* Frameworks */, - 4319B51116FF9B2600C1D7A9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SpineExample; - productName = "spine-cocos2d-iphone-mac"; - productReference = 4319B51316FF9B2600C1D7A9 /* SpineExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 4319B50A16FF9B2600C1D7A9 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0510; - ORGANIZATIONNAME = "Esoteric Software"; - }; - buildConfigurationList = 4319B50D16FF9B2600C1D7A9 /* Build configuration list for PBXProject "spine-cocos2d-iphone-osx" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - English, - ); - mainGroup = 4319B50816FF9B2600C1D7A9; - productRefGroup = 4319B51416FF9B2600C1D7A9 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = A2BD1E5D192A417300405470 /* Products */; - ProjectRef = A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 4319B51216FF9B2600C1D7A9 /* SpineExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - A2BD1E63192A417300405470 /* libcocos2d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcocos2d.a; - remoteRef = A2BD1E62192A417300405470 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A2BD1E67192A417300405470 /* libObjectiveChipmunk.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libObjectiveChipmunk.a; - remoteRef = A2BD1E66192A417300405470 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 4319B51116FF9B2600C1D7A9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 43C32A1C170B1295004A9460 /* InfoPlist.strings in Resources */, - 43C32A1D170B1295004A9460 /* MainMenu.xib in Resources */, - 43C32A1E170B1295004A9460 /* icon.icns in Resources */, - 43C32A36170D0A4D004A9460 /* spineboy.atlas in Resources */, - 43C32A37170D0A4D004A9460 /* spineboy.json in Resources */, - 43C32A38170D0A4D004A9460 /* spineboy.png in Resources */, - 43F7FDB01927C35600CA4038 /* goblins-ffd.atlas in Resources */, - 43F7FDB11927C35600CA4038 /* goblins-ffd.json in Resources */, - 43F7FDB21927C35600CA4038 /* goblins-ffd.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 4319B50F16FF9B2600C1D7A9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 43BFBE0F170A778A00ECBACB /* spine-cocos2d-iphone.m in Sources */, - 43C32A1B170B1295004A9460 /* AppDelegate.m in Sources */, - 43C32A20170B1295004A9460 /* main.m in Sources */, - 43F7FD711927C31700CA4038 /* Animation.c in Sources */, - 43F7FD721927C31700CA4038 /* AnimationState.c in Sources */, - 43F7FD731927C31700CA4038 /* AnimationStateData.c in Sources */, - 43F7FD741927C31700CA4038 /* Atlas.c in Sources */, - 43F7FD751927C31700CA4038 /* AtlasAttachmentLoader.c in Sources */, - 43F7FD761927C31700CA4038 /* Attachment.c in Sources */, - 43F7FD771927C31700CA4038 /* AttachmentLoader.c in Sources */, - 43F7FD781927C31700CA4038 /* Bone.c in Sources */, - 43F7FD791927C31700CA4038 /* BoneData.c in Sources */, - 43F7FD7A1927C31700CA4038 /* BoundingBoxAttachment.c in Sources */, - 43F7FD7B1927C31700CA4038 /* Event.c in Sources */, - 43F7FD7C1927C31700CA4038 /* EventData.c in Sources */, - 43F7FD7D1927C31700CA4038 /* extension.c in Sources */, - 43F7FD7E1927C31700CA4038 /* Json.c in Sources */, - 43F7FD7F1927C31700CA4038 /* MeshAttachment.c in Sources */, - 43F7FD801927C31700CA4038 /* RegionAttachment.c in Sources */, - 43F7FD811927C31700CA4038 /* Skeleton.c in Sources */, - 43F7FD821927C31700CA4038 /* SkeletonBounds.c in Sources */, - 43F7FD831927C31700CA4038 /* SkeletonData.c in Sources */, - 43F7FD841927C31700CA4038 /* SkeletonJson.c in Sources */, - 43F7FD851927C31700CA4038 /* Skin.c in Sources */, - 43F7FD861927C31700CA4038 /* SkinnedMeshAttachment.c in Sources */, - 43F7FD871927C31700CA4038 /* Slot.c in Sources */, - 43F7FD881927C31700CA4038 /* SlotData.c in Sources */, - 43F7FDA81927C33C00CA4038 /* SkeletonAnimation.m in Sources */, - 43F7FDA91927C33C00CA4038 /* SkeletonRenderer.m in Sources */, - 43F7FDAC1927C34600CA4038 /* SpineboyExample.m in Sources */, - 43F7FDB51927D04200CA4038 /* GoblinsExample.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 43C32A13170B1295004A9460 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 43C32A14170B1295004A9460 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 43C32A15170B1295004A9460 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 43C32A16170B1295004A9460 /* English */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 4319B6AA16FF9B2B00C1D7A9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - DEBUG, - "COCOS2D_DEBUG=1", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 4319B6AB16FF9B2B00C1D7A9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - NDEBUG, - "NS_BLOCK_ASSERTIONS=1", - ); - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 4319B6AD16FF9B2B00C1D7A9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ENABLE_OBJC_ARC = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks\"", - ); - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Resources-mac/Prefix.pch"; - GCC_WARN_64_TO_32_BIT_CONVERSION = NO; - HEADER_SEARCH_PATHS = ( - "\"src\"", - "\"../../spine-c/include\"", - "\"cocos2d/cocos2d\"/**", - "\"cocos2d/external/kazmath/include\"", - "\"cocos2d/external/ObjectAL\"/**", - ); - INFOPLIST_FILE = "Resources-mac/Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/cocos2d/external/Chipmunk/msvc/glew/lib/Release/Win32\"", - "\"$(SRCROOT)/cocos2d/external/Chipmunk/msvc/glfw/lib-msvc100\"", - "\"$(SRCROOT)/cocos2d/external/Chipmunk/xcode/libGLEW/lib\"", - "\"$(SRCROOT)/cocos2d/external/Chipmunk/xcode/libglfw/lib\"", - "\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib\"", - ); - OTHER_CFLAGS = ""; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - OTHER_LDFLAGS = ( - "-lz", - "-lsqlite3", - "-ObjC", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 4319B6AE16FF9B2B00C1D7A9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ENABLE_OBJC_ARC = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Resources-mac/Prefix.pch"; - GCC_WARN_64_TO_32_BIT_CONVERSION = NO; - HEADER_SEARCH_PATHS = ( - "\"src\"", - "\"../../spine-c/include\"", - "\"cocos2d/cocos2d\"/**", - "\"cocos2d/external/kazmath/include\"", - "\"cocos2d/external/ObjectAL\"/**", - ); - INFOPLIST_FILE = "Resources-mac/Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/cocos2d/external/Chipmunk/msvc/glew/lib/Release/Win32\"", - "\"$(SRCROOT)/cocos2d/external/Chipmunk/msvc/glfw/lib-msvc100\"", - "\"$(SRCROOT)/cocos2d/external/Chipmunk/xcode/libGLEW/lib\"", - "\"$(SRCROOT)/cocos2d/external/Chipmunk/xcode/libglfw/lib\"", - "\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib\"", - ); - OTHER_CFLAGS = ""; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - OTHER_LDFLAGS = ( - "-lz", - "-lsqlite3", - "-ObjC", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4319B50D16FF9B2600C1D7A9 /* Build configuration list for PBXProject "spine-cocos2d-iphone-osx" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4319B6AA16FF9B2B00C1D7A9 /* Debug */, - 4319B6AB16FF9B2B00C1D7A9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4319B6AC16FF9B2B00C1D7A9 /* Build configuration list for PBXNativeTarget "SpineExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4319B6AD16FF9B2B00C1D7A9 /* Debug */, - 4319B6AE16FF9B2B00C1D7A9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 4319B50A16FF9B2600C1D7A9 /* Project object */; -} diff --git a/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-osx.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-osx.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7be9ccdeb..000000000 --- a/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-osx.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/spine-cocos2d-iphone/3.0/README.md b/spine-cocos2d-iphone/3/README.md similarity index 100% rename from spine-cocos2d-iphone/3.0/README.md rename to spine-cocos2d-iphone/3/README.md diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/AppDelegate.h b/spine-cocos2d-iphone/3/Resources-ios/AppDelegate.h similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/AppDelegate.h rename to spine-cocos2d-iphone/3/Resources-ios/AppDelegate.h diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/AppDelegate.m b/spine-cocos2d-iphone/3/Resources-ios/AppDelegate.m similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/AppDelegate.m rename to spine-cocos2d-iphone/3/Resources-ios/AppDelegate.m diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Default-568h@2x.png b/spine-cocos2d-iphone/3/Resources-ios/Default-568h@2x.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Default-568h@2x.png rename to spine-cocos2d-iphone/3/Resources-ios/Default-568h@2x.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Default-Landscape~ipad.png b/spine-cocos2d-iphone/3/Resources-ios/Default-Landscape~ipad.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Default-Landscape~ipad.png rename to spine-cocos2d-iphone/3/Resources-ios/Default-Landscape~ipad.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Default.png b/spine-cocos2d-iphone/3/Resources-ios/Default.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Default.png rename to spine-cocos2d-iphone/3/Resources-ios/Default.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Default@2x.png b/spine-cocos2d-iphone/3/Resources-ios/Default@2x.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Default@2x.png rename to spine-cocos2d-iphone/3/Resources-ios/Default@2x.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Icon-72.png b/spine-cocos2d-iphone/3/Resources-ios/Icon-72.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Icon-72.png rename to spine-cocos2d-iphone/3/Resources-ios/Icon-72.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Icon-Small-50.png b/spine-cocos2d-iphone/3/Resources-ios/Icon-Small-50.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Icon-Small-50.png rename to spine-cocos2d-iphone/3/Resources-ios/Icon-Small-50.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Icon-Small.png b/spine-cocos2d-iphone/3/Resources-ios/Icon-Small.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Icon-Small.png rename to spine-cocos2d-iphone/3/Resources-ios/Icon-Small.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Icon-Small@2x.png b/spine-cocos2d-iphone/3/Resources-ios/Icon-Small@2x.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Icon-Small@2x.png rename to spine-cocos2d-iphone/3/Resources-ios/Icon-Small@2x.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Icon.png b/spine-cocos2d-iphone/3/Resources-ios/Icon.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Icon.png rename to spine-cocos2d-iphone/3/Resources-ios/Icon.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Icon@2x.png b/spine-cocos2d-iphone/3/Resources-ios/Icon@2x.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Icon@2x.png rename to spine-cocos2d-iphone/3/Resources-ios/Icon@2x.png diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Info.plist b/spine-cocos2d-iphone/3/Resources-ios/Info.plist similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Info.plist rename to spine-cocos2d-iphone/3/Resources-ios/Info.plist diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/Prefix.pch b/spine-cocos2d-iphone/3/Resources-ios/Prefix.pch similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/Prefix.pch rename to spine-cocos2d-iphone/3/Resources-ios/Prefix.pch diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/iTunesArtwork b/spine-cocos2d-iphone/3/Resources-ios/iTunesArtwork similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/iTunesArtwork rename to spine-cocos2d-iphone/3/Resources-ios/iTunesArtwork diff --git a/spine-cocos2d-iphone/3.0/Resources-ios/main.m b/spine-cocos2d-iphone/3/Resources-ios/main.m similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-ios/main.m rename to spine-cocos2d-iphone/3/Resources-ios/main.m diff --git a/spine-cocos2d-iphone/3.0/Resources-mac/AppDelegate.h b/spine-cocos2d-iphone/3/Resources-mac/AppDelegate.h similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-mac/AppDelegate.h rename to spine-cocos2d-iphone/3/Resources-mac/AppDelegate.h diff --git a/spine-cocos2d-iphone/3.0/Resources-mac/AppDelegate.m b/spine-cocos2d-iphone/3/Resources-mac/AppDelegate.m similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-mac/AppDelegate.m rename to spine-cocos2d-iphone/3/Resources-mac/AppDelegate.m diff --git a/spine-cocos2d-iphone/3.0/Resources-mac/English.lproj/InfoPlist.strings b/spine-cocos2d-iphone/3/Resources-mac/English.lproj/InfoPlist.strings similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-mac/English.lproj/InfoPlist.strings rename to spine-cocos2d-iphone/3/Resources-mac/English.lproj/InfoPlist.strings diff --git a/spine-cocos2d-iphone/3.0/Resources-mac/English.lproj/MainMenu.xib b/spine-cocos2d-iphone/3/Resources-mac/English.lproj/MainMenu.xib similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-mac/English.lproj/MainMenu.xib rename to spine-cocos2d-iphone/3/Resources-mac/English.lproj/MainMenu.xib diff --git a/spine-cocos2d-iphone/3.0/Resources-mac/Info.plist b/spine-cocos2d-iphone/3/Resources-mac/Info.plist similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-mac/Info.plist rename to spine-cocos2d-iphone/3/Resources-mac/Info.plist diff --git a/spine-cocos2d-iphone/3.0/Resources-mac/Prefix.pch b/spine-cocos2d-iphone/3/Resources-mac/Prefix.pch similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-mac/Prefix.pch rename to spine-cocos2d-iphone/3/Resources-mac/Prefix.pch diff --git a/spine-cocos2d-iphone/3.0/Resources-mac/icon.icns b/spine-cocos2d-iphone/3/Resources-mac/icon.icns similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-mac/icon.icns rename to spine-cocos2d-iphone/3/Resources-mac/icon.icns diff --git a/spine-cocos2d-iphone/3.0/Resources-mac/main.m b/spine-cocos2d-iphone/3/Resources-mac/main.m similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources-mac/main.m rename to spine-cocos2d-iphone/3/Resources-mac/main.m diff --git a/spine-cocos2d-iphone/2/Resources/goblins-ffd.atlas b/spine-cocos2d-iphone/3/Resources/goblins-mesh.atlas similarity index 99% rename from spine-cocos2d-iphone/2/Resources/goblins-ffd.atlas rename to spine-cocos2d-iphone/3/Resources/goblins-mesh.atlas index 5fefae2bb..d0ddb80c6 100644 --- a/spine-cocos2d-iphone/2/Resources/goblins-ffd.atlas +++ b/spine-cocos2d-iphone/3/Resources/goblins-mesh.atlas @@ -1,5 +1,5 @@ -goblins-ffd.png +goblins-mesh.png format: RGBA8888 filter: Linear,Linear repeat: none diff --git a/spine-cocos2d-iphone/3.0/Resources/goblins-ffd.json b/spine-cocos2d-iphone/3/Resources/goblins-mesh.json similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources/goblins-ffd.json rename to spine-cocos2d-iphone/3/Resources/goblins-mesh.json diff --git a/spine-cocos2d-iphone/3.0/Resources/goblins-ffd.png b/spine-cocos2d-iphone/3/Resources/goblins-mesh.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources/goblins-ffd.png rename to spine-cocos2d-iphone/3/Resources/goblins-mesh.png diff --git a/spine-cocos2d-iphone/3.0/Resources/spineboy.atlas b/spine-cocos2d-iphone/3/Resources/spineboy.atlas similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources/spineboy.atlas rename to spine-cocos2d-iphone/3/Resources/spineboy.atlas diff --git a/spine-cocos2d-iphone/3.0/Resources/spineboy.json b/spine-cocos2d-iphone/3/Resources/spineboy.json similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources/spineboy.json rename to spine-cocos2d-iphone/3/Resources/spineboy.json diff --git a/spine-cocos2d-iphone/3.0/Resources/spineboy.png b/spine-cocos2d-iphone/3/Resources/spineboy.png similarity index 100% rename from spine-cocos2d-iphone/3.0/Resources/spineboy.png rename to spine-cocos2d-iphone/3/Resources/spineboy.png diff --git a/spine-cocos2d-iphone/3.0/example/GoblinsExample.h b/spine-cocos2d-iphone/3/example/GoblinsExample.h similarity index 100% rename from spine-cocos2d-iphone/3.0/example/GoblinsExample.h rename to spine-cocos2d-iphone/3/example/GoblinsExample.h diff --git a/spine-cocos2d-iphone/3.0/example/GoblinsExample.m b/spine-cocos2d-iphone/3/example/GoblinsExample.m similarity index 89% rename from spine-cocos2d-iphone/3.0/example/GoblinsExample.m rename to spine-cocos2d-iphone/3/example/GoblinsExample.m index 99f241dfe..62fef9921 100644 --- a/spine-cocos2d-iphone/3.0/example/GoblinsExample.m +++ b/spine-cocos2d-iphone/3/example/GoblinsExample.m @@ -14,7 +14,7 @@ self = [super init]; if (!self) return nil; - skeletonNode = [SkeletonAnimation skeletonWithFile:@"goblins-ffd.json" atlasFile:@"goblins-ffd.atlas" scale:1]; + skeletonNode = [SkeletonAnimation skeletonWithFile:@"goblins-mesh.json" atlasFile:@"goblins-mesh.atlas" scale:1]; [skeletonNode setSkin:@"goblin"]; [skeletonNode setAnimationForTrack:0 name:@"walk" loop:YES]; diff --git a/spine-cocos2d-iphone/3.0/example/SpineboyExample.h b/spine-cocos2d-iphone/3/example/SpineboyExample.h similarity index 100% rename from spine-cocos2d-iphone/3.0/example/SpineboyExample.h rename to spine-cocos2d-iphone/3/example/SpineboyExample.h diff --git a/spine-cocos2d-iphone/3.0/example/SpineboyExample.m b/spine-cocos2d-iphone/3/example/SpineboyExample.m similarity index 100% rename from spine-cocos2d-iphone/3.0/example/SpineboyExample.m rename to spine-cocos2d-iphone/3/example/SpineboyExample.m diff --git a/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj b/spine-cocos2d-iphone/3/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj similarity index 93% rename from spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj rename to spine-cocos2d-iphone/3/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj index 638c26ba5..3f7ea834e 100644 --- a/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj +++ b/spine-cocos2d-iphone/3/spine-cocos2d-iphone-ios.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 43B7CC0919DC4ACD0031321C /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B7CC0719DC4ACD0031321C /* IkConstraint.c */; }; + 43B7CC0A19DC4ACD0031321C /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B7CC0819DC4ACD0031321C /* IkConstraintData.c */; }; 43C3282F170B0C19004A9460 /* spine-cocos2d-iphone.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C3282D170B0C19004A9460 /* spine-cocos2d-iphone.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 43C3286C170B0DA6004A9460 /* spineboy.json in Resources */ = {isa = PBXBuildFile; fileRef = 43C32868170B0DA6004A9460 /* spineboy.json */; }; 43C3286E170B0DA6004A9460 /* spineboy.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43C3286A170B0DA6004A9460 /* spineboy.atlas */; }; @@ -24,9 +26,9 @@ 43C32888170B0DBE004A9460 /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 43C3287C170B0DBE004A9460 /* iTunesArtwork */; }; 43C32A06170B0F93004A9460 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A05170B0F93004A9460 /* main.m */; }; 43C32A09170B10FF004A9460 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A08170B10FF004A9460 /* AppDelegate.m */; }; - 43F7010F1927FBC700CA4038 /* goblins-ffd.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */; }; - 43F701101927FBC700CA4038 /* goblins-ffd.json in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010D1927FBC700CA4038 /* goblins-ffd.json */; }; - 43F701111927FBC700CA4038 /* goblins-ffd.png in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010E1927FBC700CA4038 /* goblins-ffd.png */; }; + 43F7010F1927FBC700CA4038 /* goblins-mesh.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010C1927FBC700CA4038 /* goblins-mesh.atlas */; }; + 43F701101927FBC700CA4038 /* goblins-mesh.json in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010D1927FBC700CA4038 /* goblins-mesh.json */; }; + 43F701111927FBC700CA4038 /* goblins-mesh.png in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010E1927FBC700CA4038 /* goblins-mesh.png */; }; 43F7FF511927F91900CA4038 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF381927F91900CA4038 /* Animation.c */; }; 43F7FF521927F91900CA4038 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF391927F91900CA4038 /* AnimationState.c */; }; 43F7FF531927F91900CA4038 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF3A1927F91900CA4038 /* AnimationStateData.c */; }; @@ -80,6 +82,10 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 43B7CC0719DC4ACD0031321C /* IkConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IkConstraint.c; path = "../../spine-c/src/spine/IkConstraint.c"; sourceTree = ""; }; + 43B7CC0819DC4ACD0031321C /* IkConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IkConstraintData.c; path = "../../spine-c/src/spine/IkConstraintData.c"; sourceTree = ""; }; + 43B7CC0D19DC4AE30031321C /* IkConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IkConstraint.h; path = "../../spine-c/include/spine/IkConstraint.h"; sourceTree = ""; }; + 43B7CC0E19DC4AE30031321C /* IkConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IkConstraintData.h; path = "../../spine-c/include/spine/IkConstraintData.h"; sourceTree = ""; }; 43C3282D170B0C19004A9460 /* spine-cocos2d-iphone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "spine-cocos2d-iphone.m"; path = "src/spine/spine-cocos2d-iphone.m"; sourceTree = ""; }; 43C3282E170B0C19004A9460 /* spine-cocos2d-iphone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "spine-cocos2d-iphone.h"; path = "src/spine/spine-cocos2d-iphone.h"; sourceTree = ""; }; 43C32868170B0DA6004A9460 /* spineboy.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = spineboy.json; path = Resources/spineboy.json; sourceTree = ""; }; @@ -101,9 +107,9 @@ 43C32A05170B0F93004A9460 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "Resources-ios/main.m"; sourceTree = ""; }; 43C32A07170B10FF004A9460 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "Resources-ios/AppDelegate.h"; sourceTree = ""; }; 43C32A08170B10FF004A9460 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "Resources-ios/AppDelegate.m"; sourceTree = ""; }; - 43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "goblins-ffd.atlas"; path = "Resources/goblins-ffd.atlas"; sourceTree = ""; }; - 43F7010D1927FBC700CA4038 /* goblins-ffd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "goblins-ffd.json"; path = "Resources/goblins-ffd.json"; sourceTree = ""; }; - 43F7010E1927FBC700CA4038 /* goblins-ffd.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "goblins-ffd.png"; path = "Resources/goblins-ffd.png"; sourceTree = ""; }; + 43F7010C1927FBC700CA4038 /* goblins-mesh.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "goblins-mesh.atlas"; path = "Resources/goblins-mesh.atlas"; sourceTree = ""; }; + 43F7010D1927FBC700CA4038 /* goblins-mesh.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "goblins-mesh.json"; path = "Resources/goblins-mesh.json"; sourceTree = ""; }; + 43F7010E1927FBC700CA4038 /* goblins-mesh.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "goblins-mesh.png"; path = "Resources/goblins-mesh.png"; sourceTree = ""; }; 43F7FF381927F91900CA4038 /* Animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Animation.c; path = "../../spine-c/src/spine/Animation.c"; sourceTree = ""; }; 43F7FF391927F91900CA4038 /* AnimationState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationState.c; path = "../../spine-c/src/spine/AnimationState.c"; sourceTree = ""; }; 43F7FF3A1927F91900CA4038 /* AnimationStateData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationStateData.c; path = "../../spine-c/src/spine/AnimationStateData.c"; sourceTree = ""; }; @@ -245,6 +251,10 @@ 43F7FF741927F92500CA4038 /* EventData.h */, 43F7FF441927F91900CA4038 /* extension.c */, 43F7FF751927F92500CA4038 /* extension.h */, + 43B7CC0719DC4ACD0031321C /* IkConstraint.c */, + 43B7CC0D19DC4AE30031321C /* IkConstraint.h */, + 43B7CC0819DC4ACD0031321C /* IkConstraintData.c */, + 43B7CC0E19DC4AE30031321C /* IkConstraintData.h */, 43F7FF451927F91900CA4038 /* Json.c */, 43F7FF461927F91900CA4038 /* Json.h */, 43F7FF471927F91900CA4038 /* MeshAttachment.c */, @@ -288,9 +298,9 @@ 43C32867170B0C7F004A9460 /* Resources */ = { isa = PBXGroup; children = ( - 43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */, - 43F7010D1927FBC700CA4038 /* goblins-ffd.json */, - 43F7010E1927FBC700CA4038 /* goblins-ffd.png */, + 43F7010C1927FBC700CA4038 /* goblins-mesh.atlas */, + 43F7010D1927FBC700CA4038 /* goblins-mesh.json */, + 43F7010E1927FBC700CA4038 /* goblins-mesh.png */, 43C32868170B0DA6004A9460 /* spineboy.json */, 43C3286A170B0DA6004A9460 /* spineboy.atlas */, 43C3286B170B0DA6004A9460 /* spineboy.png */, @@ -453,9 +463,9 @@ 43C32885170B0DBE004A9460 /* Icon.png in Resources */, 43C32886170B0DBE004A9460 /* Icon@2x.png in Resources */, 43C32888170B0DBE004A9460 /* iTunesArtwork in Resources */, - 43F7010F1927FBC700CA4038 /* goblins-ffd.atlas in Resources */, - 43F701101927FBC700CA4038 /* goblins-ffd.json in Resources */, - 43F701111927FBC700CA4038 /* goblins-ffd.png in Resources */, + 43F7010F1927FBC700CA4038 /* goblins-mesh.atlas in Resources */, + 43F701101927FBC700CA4038 /* goblins-mesh.json in Resources */, + 43F701111927FBC700CA4038 /* goblins-mesh.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -481,6 +491,7 @@ 43F7FF5A1927F91900CA4038 /* BoundingBoxAttachment.c in Sources */, 43F7FF5B1927F91900CA4038 /* Event.c in Sources */, 43F7FF5C1927F91900CA4038 /* EventData.c in Sources */, + 43B7CC0A19DC4ACD0031321C /* IkConstraintData.c in Sources */, 43F7FF5D1927F91900CA4038 /* extension.c in Sources */, 43F7FF5E1927F91900CA4038 /* Json.c in Sources */, 43F7FF5F1927F91900CA4038 /* MeshAttachment.c in Sources */, @@ -490,6 +501,7 @@ 43F7FF631927F91900CA4038 /* SkeletonData.c in Sources */, 43F7FF641927F91900CA4038 /* SkeletonJson.c in Sources */, 43F7FF651927F91900CA4038 /* Skin.c in Sources */, + 43B7CC0919DC4ACD0031321C /* IkConstraint.c in Sources */, 43F7FF661927F91900CA4038 /* SkinnedMeshAttachment.c in Sources */, 43F7FF671927F91900CA4038 /* Slot.c in Sources */, 43F7FF681927F91900CA4038 /* SlotData.c in Sources */, @@ -567,7 +579,7 @@ 9A5D2644170A94DC0030D4DD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; @@ -595,7 +607,7 @@ 9A5D2645170A94DC0030D4DD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + ALWAYS_SEARCH_USER_PATHS = YES; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; diff --git a/spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/spine-cocos2d-iphone/3/spine-cocos2d-iphone-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from spine-cocos2d-iphone/3.0/spine-cocos2d-iphone-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to spine-cocos2d-iphone/3/spine-cocos2d-iphone-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/spine-cocos2d-iphone/3.0/src/spine/SkeletonAnimation.h b/spine-cocos2d-iphone/3/src/spine/SkeletonAnimation.h similarity index 100% rename from spine-cocos2d-iphone/3.0/src/spine/SkeletonAnimation.h rename to spine-cocos2d-iphone/3/src/spine/SkeletonAnimation.h diff --git a/spine-cocos2d-iphone/3.0/src/spine/SkeletonAnimation.m b/spine-cocos2d-iphone/3/src/spine/SkeletonAnimation.m similarity index 100% rename from spine-cocos2d-iphone/3.0/src/spine/SkeletonAnimation.m rename to spine-cocos2d-iphone/3/src/spine/SkeletonAnimation.m diff --git a/spine-cocos2d-iphone/3.0/src/spine/SkeletonRenderer.h b/spine-cocos2d-iphone/3/src/spine/SkeletonRenderer.h old mode 100755 new mode 100644 similarity index 100% rename from spine-cocos2d-iphone/3.0/src/spine/SkeletonRenderer.h rename to spine-cocos2d-iphone/3/src/spine/SkeletonRenderer.h diff --git a/spine-cocos2d-iphone/3.0/src/spine/SkeletonRenderer.m b/spine-cocos2d-iphone/3/src/spine/SkeletonRenderer.m old mode 100755 new mode 100644 similarity index 82% rename from spine-cocos2d-iphone/3.0/src/spine/SkeletonRenderer.m rename to spine-cocos2d-iphone/3/src/spine/SkeletonRenderer.m index b4ab82425..bd57ebec2 --- a/spine-cocos2d-iphone/3.0/src/spine/SkeletonRenderer.m +++ b/spine-cocos2d-iphone/3/src/spine/SkeletonRenderer.m @@ -66,14 +66,14 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; _skeleton = spSkeleton_create(skeletonData); _rootBone = _skeleton->bones[0]; - - _blendFunc.src = GL_ONE; - _blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA; - _drawNode = [[CCDrawNode alloc] init]; - [_drawNode setBlendMode: [CCBlendMode premultipliedAlphaMode]]; - [self addChild:_drawNode]; - - [self setShader:[CCShader positionTextureColorShader]]; + + _blendFunc.src = GL_ONE; + _blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA; + _drawNode = [[CCDrawNode alloc] init]; + [_drawNode setBlendMode: [CCBlendMode premultipliedAlphaMode]]; + [self addChild:_drawNode]; + + [self setShader:[CCShader positionTextureColorShader]]; } - (id) initWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData { @@ -124,7 +124,6 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; } - (void) dealloc { - if (_ownsSkeletonData) spSkeletonData_dispose(_skeleton->data); if (_atlas) spAtlas_dispose(_atlas); spSkeleton_dispose(_skeleton); @@ -133,22 +132,19 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; } -(void)draw:(CCRenderer *)renderer transform:(const GLKMatrix4 *)transform { - CCColor* nodeColor = self.color; _skeleton->r = nodeColor.red; _skeleton->g = nodeColor.green; _skeleton->b = nodeColor.blue; - _skeleton->a = self.opacity; + _skeleton->a = self.displayedOpacity; int additive = -1; - ccColor4B color; const float* uvs = 0; int verticesCount = 0; const int* triangles = 0; int trianglesCount = 0; float r = 0, g = 0, b = 0, a = 0; for (int i = 0, n = _skeleton->slotsCount; i < n; i++) { - spSlot* slot = _skeleton->drawOrder[i]; if (!slot->attachment) continue; CCTexture *texture = 0; @@ -168,7 +164,6 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; break; } case SP_ATTACHMENT_MESH: { - spMeshAttachment* attachment = (spMeshAttachment*)slot->attachment; spMeshAttachment_computeWorldVertices(attachment, slot, worldVertices); texture = [self getTextureForMesh:attachment]; @@ -183,7 +178,6 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; break; } case SP_ATTACHMENT_SKINNED_MESH: { - spSkinnedMeshAttachment* attachment = (spSkinnedMeshAttachment*)slot->attachment; spSkinnedMeshAttachment_computeWorldVertices(attachment, slot, worldVertices); texture = [self getTextureForSkinnedMesh:attachment]; @@ -201,35 +195,40 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; } if (texture) { if (slot->data->additiveBlending != additive) { - [self setBlendMode:[CCBlendMode blendModeWithOptions:@{CCBlendFuncSrcColor: @(_blendFunc.src),CCBlendFuncDstColor: @(slot->data->additiveBlending ? GL_ONE : _blendFunc.dst)}]]; + [self setBlendMode:[CCBlendMode blendModeWithOptions:@{CCBlendFuncSrcColor: @(_blendFunc.src),CCBlendFuncDstColor: @(slot->data->additiveBlending ? GL_ONE : _blendFunc.dst)}]]; additive = slot->data->additiveBlending; } - color.a = _skeleton->a * slot->a * a * 255; - float multiplier = _premultipliedAlpha ? color.a : 255; - color.r = _skeleton->r * slot->r * r * multiplier; - color.g = _skeleton->g * slot->g * g * multiplier; - color.b = _skeleton->b * slot->b * b * multiplier; + if (_premultipliedAlpha) { + a *= _skeleton->a * slot->a; + r *= _skeleton->r * slot->r * a; + g *= _skeleton->g * slot->g * a; + b *= _skeleton->b * slot->b * a; + } else { + a *= _skeleton->a * slot->a; + r *= _skeleton->r * slot->r; + g *= _skeleton->g * slot->g; + b *= _skeleton->b * slot->b; + } self.texture = texture; - CGSize size = texture.contentSize; - GLKVector2 center = GLKVector2Make(size.width/2.0, size.height/2.0); - GLKVector2 extents = GLKVector2Make(size.width/2.0, size.height/2.0); - if(CCRenderCheckVisbility(transform, center, extents)){ - CCRenderBuffer buffer = [renderer enqueueTriangles:trianglesCount/3 andVertexes:verticesCount withState:self.renderState globalSortOrder:0]; - for(int i = 0; (i*2) < verticesCount; ++i) { - CCVertex vertex; - vertex.position = GLKVector4Make(worldVertices[i*2], worldVertices[i*2 + 1], 0.0, 1.0); - vertex.color = GLKVector4Make(color.r, color.g, color.b, color.a); - vertex.texCoord1 = GLKVector2Make(uvs[i*2], 1 - uvs[(i*2) +1]); - CCRenderBufferSetVertex(buffer, i, CCVertexApplyTransform(vertex, transform)); - } - for(int j = 0; j*3 < trianglesCount; ++j) { - CCRenderBufferSetTriangle(buffer, j, triangles[j*3], triangles[(j*3) + 1], triangles[(j*3) + 2]); - } - } + CGSize size = texture.contentSize; + GLKVector2 center = GLKVector2Make(size.width / 2.0, size.height / 2.0); + GLKVector2 extents = GLKVector2Make(size.width / 2.0, size.height / 2.0); + if (CCRenderCheckVisbility(transform, center, extents)) { + CCRenderBuffer buffer = [renderer enqueueTriangles:(trianglesCount / 3) andVertexes:verticesCount withState:self.renderState globalSortOrder:0]; + for (int i = 0; i * 2 < verticesCount; ++i) { + CCVertex vertex; + vertex.position = GLKVector4Make(worldVertices[i * 2], worldVertices[i * 2 + 1], 0.0, 1.0); + vertex.color = GLKVector4Make(r, g, b, a); + vertex.texCoord1 = GLKVector2Make(uvs[i * 2], 1 - uvs[i * 2 + 1]); + CCRenderBufferSetVertex(buffer, i, CCVertexApplyTransform(vertex, transform)); + } + for (int j = 0; j * 3 < trianglesCount; ++j) { + CCRenderBufferSetTriangle(buffer, j, triangles[j * 3], triangles[j * 3 + 1], triangles[j * 3 + 2]); + } + } } - } - [_drawNode clear]; + [_drawNode clear]; if (_debugSlots) { // Slots. CGPoint points[4]; @@ -242,8 +241,7 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; points[1] = ccp(worldVertices[2], worldVertices[3]); points[2] = ccp(worldVertices[4], worldVertices[5]); points[3] = ccp(worldVertices[6], worldVertices[7]); - [_drawNode drawPolyWithVerts:points count:4 fillColor:[CCColor clearColor] borderWidth:1 borderColor:[CCColor blueColor]]; - + [_drawNode drawPolyWithVerts:points count:4 fillColor:[CCColor clearColor] borderWidth:1 borderColor:[CCColor blueColor]]; } } if (_debugBones) { @@ -252,14 +250,14 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0}; spBone *bone = _skeleton->bones[i]; float x = bone->data->length * bone->m00 + bone->worldX; float y = bone->data->length * bone->m10 + bone->worldY; - [_drawNode drawSegmentFrom:ccp(bone->worldX, bone->worldY) to: ccp(x, y)radius:2 color:[CCColor redColor]]; + [_drawNode drawSegmentFrom:ccp(bone->worldX, bone->worldY) to: ccp(x, y)radius:2 color:[CCColor redColor]]; } - + // Bone origins. for (int i = 0, n = _skeleton->bonesCount; i < n; i++) { spBone *bone = _skeleton->bones[i]; - [_drawNode drawDot:ccp(bone->worldX, bone->worldY) radius:4 color:[CCColor greenColor]]; - if (i == 0) [_drawNode drawDot:ccp(bone->worldX, bone->worldY) radius:4 color:[CCColor blueColor]]; + [_drawNode drawDot:ccp(bone->worldX, bone->worldY) radius:4 color:[CCColor greenColor]]; + if (i == 0) [_drawNode drawDot:ccp(bone->worldX, bone->worldY) radius:4 color:[CCColor blueColor]]; } } } diff --git a/spine-cocos2d-iphone/3.0/src/spine/spine-cocos2d-iphone.h b/spine-cocos2d-iphone/3/src/spine/spine-cocos2d-iphone.h similarity index 100% rename from spine-cocos2d-iphone/3.0/src/spine/spine-cocos2d-iphone.h rename to spine-cocos2d-iphone/3/src/spine/spine-cocos2d-iphone.h diff --git a/spine-cocos2d-iphone/3.0/src/spine/spine-cocos2d-iphone.m b/spine-cocos2d-iphone/3/src/spine/spine-cocos2d-iphone.m similarity index 100% rename from spine-cocos2d-iphone/3.0/src/spine/spine-cocos2d-iphone.m rename to spine-cocos2d-iphone/3/src/spine/spine-cocos2d-iphone.m diff --git a/spine-cocos2dx/2/example/Classes/GoblinsExample.cpp b/spine-cocos2dx/2/example/Classes/GoblinsExample.cpp index e3b745c14..efbd63b93 100644 --- a/spine-cocos2dx/2/example/Classes/GoblinsExample.cpp +++ b/spine-cocos2dx/2/example/Classes/GoblinsExample.cpp @@ -47,7 +47,7 @@ CCScene* GoblinsExample::scene () { bool GoblinsExample::init () { if (!CCLayerColor::initWithColor(ccc4(128, 128, 128, 255))) return false; - skeletonNode = SkeletonAnimation::createWithFile("goblins-ffd.json", "goblins-ffd.atlas", 1.5f); + skeletonNode = SkeletonAnimation::createWithFile("goblins-mesh.json", "goblins-mesh.atlas", 1.5f); skeletonNode->setAnimation(0, "walk", true); skeletonNode->setSkin("goblin"); diff --git a/spine-cocos2dx/2/example/Resources/common/goblins-ffd.json b/spine-cocos2dx/2/example/Resources/common/goblins-mesh.json similarity index 100% rename from spine-cocos2dx/2/example/Resources/common/goblins-ffd.json rename to spine-cocos2dx/2/example/Resources/common/goblins-mesh.json diff --git a/spine-cocos2d-iphone/3.0/Resources/goblins-ffd.atlas b/spine-cocos2dx/2/example/Resources/ipad-retina/goblins-mesh.atlas similarity index 99% rename from spine-cocos2d-iphone/3.0/Resources/goblins-ffd.atlas rename to spine-cocos2dx/2/example/Resources/ipad-retina/goblins-mesh.atlas index 5fefae2bb..d0ddb80c6 100644 --- a/spine-cocos2d-iphone/3.0/Resources/goblins-ffd.atlas +++ b/spine-cocos2dx/2/example/Resources/ipad-retina/goblins-mesh.atlas @@ -1,5 +1,5 @@ -goblins-ffd.png +goblins-mesh.png format: RGBA8888 filter: Linear,Linear repeat: none diff --git a/spine-cocos2dx/2/example/Resources/ipad-retina/goblins-ffd.png b/spine-cocos2dx/2/example/Resources/ipad-retina/goblins-mesh.png similarity index 100% rename from spine-cocos2dx/2/example/Resources/ipad-retina/goblins-ffd.png rename to spine-cocos2dx/2/example/Resources/ipad-retina/goblins-mesh.png diff --git a/spine-cocos2dx/2/example/Resources/ipad/goblins-ffd.atlas b/spine-cocos2dx/2/example/Resources/ipad/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-cocos2dx/2/example/Resources/ipad/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-cocos2dx/2/example/Resources/ipad/goblins-mesh.atlas b/spine-cocos2dx/2/example/Resources/ipad/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-cocos2dx/2/example/Resources/ipad/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-cocos2dx/2/example/Resources/ipad/goblins-ffd.png b/spine-cocos2dx/2/example/Resources/ipad/goblins-mesh.png similarity index 100% rename from spine-cocos2dx/2/example/Resources/ipad/goblins-ffd.png rename to spine-cocos2dx/2/example/Resources/ipad/goblins-mesh.png diff --git a/spine-cocos2dx/2/example/Resources/iphone-retina/goblins-ffd.atlas b/spine-cocos2dx/2/example/Resources/iphone-retina/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-cocos2dx/2/example/Resources/iphone-retina/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-cocos2dx/2/example/Resources/iphone-retina/goblins-mesh.atlas b/spine-cocos2dx/2/example/Resources/iphone-retina/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-cocos2dx/2/example/Resources/iphone-retina/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-cocos2dx/2/example/Resources/iphone-retina/goblins-ffd.png b/spine-cocos2dx/2/example/Resources/iphone-retina/goblins-mesh.png similarity index 100% rename from spine-cocos2dx/2/example/Resources/iphone-retina/goblins-ffd.png rename to spine-cocos2dx/2/example/Resources/iphone-retina/goblins-mesh.png diff --git a/spine-cocos2dx/2/example/Resources/iphone/goblins-ffd.atlas b/spine-cocos2dx/2/example/Resources/iphone/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-cocos2dx/2/example/Resources/iphone/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-cocos2dx/2/example/Resources/iphone/goblins-mesh.atlas b/spine-cocos2dx/2/example/Resources/iphone/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-cocos2dx/2/example/Resources/iphone/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-cocos2dx/2/example/Resources/iphone/goblins-ffd.png b/spine-cocos2dx/2/example/Resources/iphone/goblins-mesh.png similarity index 100% rename from spine-cocos2dx/2/example/Resources/iphone/goblins-ffd.png rename to spine-cocos2dx/2/example/Resources/iphone/goblins-mesh.png diff --git a/spine-cocos2dx/3/example/Classes/GoblinsExample.cpp b/spine-cocos2dx/3/example/Classes/GoblinsExample.cpp index 45f0c291e..bbc44cd9f 100644 --- a/spine-cocos2dx/3/example/Classes/GoblinsExample.cpp +++ b/spine-cocos2dx/3/example/Classes/GoblinsExample.cpp @@ -47,7 +47,7 @@ Scene* GoblinsExample::scene () { bool GoblinsExample::init () { if (!LayerColor::initWithColor(Color4B(128, 128, 128, 255))) return false; - skeletonNode = SkeletonAnimation::createWithFile("goblins-ffd.json", "goblins-ffd.atlas", 1.5f); + skeletonNode = SkeletonAnimation::createWithFile("goblins-mesh.json", "goblins-mesh.atlas", 1.5f); skeletonNode->setAnimation(0, "walk", true); skeletonNode->setSkin("goblin"); diff --git a/spine-cocos2dx/3/example/Resources/common/goblins-ffd.json b/spine-cocos2dx/3/example/Resources/common/goblins-mesh.json similarity index 100% rename from spine-cocos2dx/3/example/Resources/common/goblins-ffd.json rename to spine-cocos2dx/3/example/Resources/common/goblins-mesh.json diff --git a/spine-cocos2dx/3/example/Resources/ipad-retina/goblins-ffd.atlas b/spine-cocos2dx/3/example/Resources/ipad-retina/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-cocos2dx/3/example/Resources/ipad-retina/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-cocos2dx/3/example/Resources/ipad-retina/goblins-mesh.atlas b/spine-cocos2dx/3/example/Resources/ipad-retina/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-cocos2dx/3/example/Resources/ipad-retina/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-cocos2dx/3/example/Resources/ipad-retina/goblins-ffd.png b/spine-cocos2dx/3/example/Resources/ipad-retina/goblins-mesh.png similarity index 100% rename from spine-cocos2dx/3/example/Resources/ipad-retina/goblins-ffd.png rename to spine-cocos2dx/3/example/Resources/ipad-retina/goblins-mesh.png diff --git a/spine-cocos2dx/3/example/Resources/ipad/goblins-ffd.atlas b/spine-cocos2dx/3/example/Resources/ipad/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-cocos2dx/3/example/Resources/ipad/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-cocos2dx/3/example/Resources/ipad/goblins-mesh.atlas b/spine-cocos2dx/3/example/Resources/ipad/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-cocos2dx/3/example/Resources/ipad/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-cocos2dx/3/example/Resources/ipad/goblins-ffd.png b/spine-cocos2dx/3/example/Resources/ipad/goblins-mesh.png similarity index 100% rename from spine-cocos2dx/3/example/Resources/ipad/goblins-ffd.png rename to spine-cocos2dx/3/example/Resources/ipad/goblins-mesh.png diff --git a/spine-cocos2dx/3/example/Resources/iphone-retina/goblins-ffd.atlas b/spine-cocos2dx/3/example/Resources/iphone-retina/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-cocos2dx/3/example/Resources/iphone-retina/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-cocos2dx/3/example/Resources/iphone-retina/goblins-mesh.atlas b/spine-cocos2dx/3/example/Resources/iphone-retina/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-cocos2dx/3/example/Resources/iphone-retina/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-cocos2dx/3/example/Resources/iphone-retina/goblins-ffd.png b/spine-cocos2dx/3/example/Resources/iphone-retina/goblins-mesh.png similarity index 100% rename from spine-cocos2dx/3/example/Resources/iphone-retina/goblins-ffd.png rename to spine-cocos2dx/3/example/Resources/iphone-retina/goblins-mesh.png diff --git a/spine-cocos2dx/3/example/Resources/iphone/goblins-ffd.atlas b/spine-cocos2dx/3/example/Resources/iphone/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-cocos2dx/3/example/Resources/iphone/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-cocos2dx/3/example/Resources/iphone/goblins-mesh.atlas b/spine-cocos2dx/3/example/Resources/iphone/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-cocos2dx/3/example/Resources/iphone/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-cocos2dx/3/example/Resources/iphone/goblins-ffd.png b/spine-cocos2dx/3/example/Resources/iphone/goblins-mesh.png similarity index 100% rename from spine-cocos2dx/3/example/Resources/iphone/goblins-ffd.png rename to spine-cocos2dx/3/example/Resources/iphone/goblins-mesh.png diff --git a/spine-cocos2dx/3/src/spine/SkeletonAnimation.cpp b/spine-cocos2dx/3/src/spine/SkeletonAnimation.cpp index 48ce80d67..66d64a6ed 100644 --- a/spine-cocos2dx/3/src/spine/SkeletonAnimation.cpp +++ b/spine-cocos2dx/3/src/spine/SkeletonAnimation.cpp @@ -98,6 +98,11 @@ void SkeletonAnimation::initialize () { stateInternal->disposeTrackEntry = disposeTrackEntry; } +SkeletonAnimation::SkeletonAnimation () + : SkeletonRenderer() { + initialize(); +} + SkeletonAnimation::SkeletonAnimation (spSkeletonData *skeletonData) : SkeletonRenderer(skeletonData) { initialize(); diff --git a/spine-cocos2dx/3/src/spine/SkeletonRenderer.cpp b/spine-cocos2dx/3/src/spine/SkeletonRenderer.cpp index 5a062086d..0c0083eb2 100644 --- a/spine-cocos2dx/3/src/spine/SkeletonRenderer.cpp +++ b/spine-cocos2dx/3/src/spine/SkeletonRenderer.cpp @@ -75,7 +75,6 @@ void SkeletonRenderer::initialize () { setOpacityModifyRGB(true); setGLProgram(ShaderCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); - scheduleUpdate(); } void SkeletonRenderer::setSkeletonData (spSkeletonData *skeletonData, bool ownsSkeletonData) { @@ -370,6 +369,16 @@ bool SkeletonRenderer::getDebugBonesEnabled () const { return _debugBones; } +void SkeletonRenderer::onEnter () { + Node::onEnter(); + scheduleUpdate(); +} + +void SkeletonRenderer::onExit () { + Node::onExit(); + unscheduleUpdate(); +} + // --- CCBlendProtocol const BlendFunc& SkeletonRenderer::getBlendFunc () const { diff --git a/spine-cocos2dx/3/src/spine/SkeletonRenderer.h b/spine-cocos2dx/3/src/spine/SkeletonRenderer.h index 13ea00f87..575203746 100644 --- a/spine-cocos2dx/3/src/spine/SkeletonRenderer.h +++ b/spine-cocos2dx/3/src/spine/SkeletonRenderer.h @@ -49,6 +49,8 @@ public: virtual void draw (cocos2d::Renderer* renderer, const cocos2d::Mat4& transform, uint32_t transformFlags) override; virtual void drawSkeleton (const cocos2d::Mat4& transform, uint32_t transformFlags); virtual cocos2d::Rect getBoundingBox () const override; + virtual void onEnter () override; + virtual void onExit () override; spSkeleton* getSkeleton(); diff --git a/spine-corona/examples/dragon/dragon.atlas b/spine-corona/examples/dragon/dragon.atlas deleted file mode 100644 index 089eba72e..000000000 --- a/spine-corona/examples/dragon/dragon.atlas +++ /dev/null @@ -1,290 +0,0 @@ - -dragon.png -format: RGBA4444 -filter: Nearest,Nearest -repeat: none -L_rear_thigh - rotate: false - xy: 895, 20 - size: 91, 148 - orig: 91, 149 - offset: 0, 0 - index: -1 -L_wing01 - rotate: false - xy: 814, 672 - size: 191, 256 - orig: 191, 256 - offset: 0, 0 - index: -1 -L_wing02 - rotate: false - xy: 714, 189 - size: 179, 269 - orig: 179, 269 - offset: 0, 0 - index: -1 -L_wing03 - rotate: false - xy: 785, 463 - size: 186, 207 - orig: 186, 207 - offset: 0, 0 - index: -1 -L_wing05 - rotate: true - xy: 2, 9 - size: 218, 213 - orig: 218, 213 - offset: 0, 0 - index: -1 -L_wing06 - rotate: false - xy: 2, 229 - size: 192, 331 - orig: 192, 331 - offset: 0, 0 - index: -1 -R_wing01 - rotate: true - xy: 502, 709 - size: 219, 310 - orig: 219, 310 - offset: 0, 0 - index: -1 -R_wing02 - rotate: true - xy: 204, 463 - size: 203, 305 - orig: 203, 305 - offset: 0, 0 - index: -1 -R_wing03 - rotate: false - xy: 511, 460 - size: 272, 247 - orig: 272, 247 - offset: 0, 0 - index: -1 -R_wing05 - rotate: false - xy: 196, 232 - size: 251, 229 - orig: 251, 229 - offset: 0, 0 - index: -1 -R_wing06 - rotate: false - xy: 2, 562 - size: 200, 366 - orig: 200, 366 - offset: 0, 0 - index: -1 -R_wing07 - rotate: true - xy: 449, 258 - size: 200, 263 - orig: 200, 263 - offset: 0, 0 - index: -1 -R_wing08 - rotate: false - xy: 467, 2 - size: 234, 254 - orig: 234, 254 - offset: 0, 0 - index: -1 -R_wing09 - rotate: false - xy: 217, 26 - size: 248, 204 - orig: 248, 204 - offset: 0, 0 - index: -1 -back - rotate: false - xy: 703, 2 - size: 190, 185 - orig: 190, 185 - offset: 0, 0 - index: -1 -chest - rotate: true - xy: 895, 170 - size: 136, 122 - orig: 136, 122 - offset: 0, 0 - index: -1 -front_toeA - rotate: false - xy: 976, 972 - size: 29, 50 - orig: 29, 50 - offset: 0, 0 - index: -1 -head - rotate: false - xy: 204, 668 - size: 296, 260 - orig: 296, 260 - offset: 0, 0 - index: -1 -logo - rotate: false - xy: 2, 930 - size: 897, 92 - orig: 897, 92 - offset: 0, 0 - index: -1 -tail01 - rotate: false - xy: 895, 308 - size: 120, 153 - orig: 120, 153 - offset: 0, 0 - index: -1 -tail03 - rotate: false - xy: 901, 930 - size: 73, 92 - orig: 73, 92 - offset: 0, 0 - index: -1 - -dragon2.png -format: RGBA4444 -filter: Nearest,Nearest -repeat: none -L_front_leg - rotate: true - xy: 391, 141 - size: 84, 57 - orig: 84, 57 - offset: 0, 0 - index: -1 -L_front_thigh - rotate: false - xy: 446, 269 - size: 84, 72 - orig: 84, 72 - offset: 0, 0 - index: -1 -L_rear_leg - rotate: true - xy: 888, 342 - size: 168, 132 - orig: 206, 177 - offset: 19, 20 - index: -1 -L_wing04 - rotate: false - xy: 256, 227 - size: 188, 135 - orig: 188, 135 - offset: 0, 0 - index: -1 -L_wing07 - rotate: false - xy: 2, 109 - size: 159, 255 - orig: 159, 255 - offset: 0, 0 - index: -1 -L_wing08 - rotate: true - xy: 705, 346 - size: 164, 181 - orig: 164, 181 - offset: 0, 0 - index: -1 -L_wing09 - rotate: false - xy: 499, 343 - size: 204, 167 - orig: 204, 167 - offset: 0, 0 - index: -1 -R_front_leg - rotate: false - xy: 273, 34 - size: 101, 89 - orig: 101, 89 - offset: 0, 0 - index: -1 -R_front_thigh - rotate: false - xy: 163, 106 - size: 108, 108 - orig: 108, 108 - offset: 0, 0 - index: -1 -R_rear_leg - rotate: false - xy: 273, 125 - size: 116, 100 - orig: 116, 100 - offset: 0, 0 - index: -1 -R_rear_thigh - rotate: false - xy: 163, 216 - size: 91, 148 - orig: 91, 149 - offset: 0, 0 - index: -1 -R_wing04 - rotate: false - xy: 2, 366 - size: 279, 144 - orig: 279, 144 - offset: 0, 0 - index: -1 -chin - rotate: false - xy: 283, 364 - size: 214, 146 - orig: 214, 146 - offset: 0, 0 - index: -1 -front_toeB - rotate: false - xy: 590, 284 - size: 56, 57 - orig: 56, 57 - offset: 0, 0 - index: -1 -rear-toe - rotate: true - xy: 2, 2 - size: 105, 77 - orig: 109, 77 - offset: 0, 0 - index: -1 -tail02 - rotate: true - xy: 151, 9 - size: 95, 120 - orig: 95, 120 - offset: 0, 0 - index: -1 -tail04 - rotate: false - xy: 532, 270 - size: 56, 71 - orig: 56, 71 - offset: 0, 0 - index: -1 -tail05 - rotate: false - xy: 648, 282 - size: 52, 59 - orig: 52, 59 - offset: 0, 0 - index: -1 -tail06 - rotate: true - xy: 81, 12 - size: 95, 68 - orig: 95, 68 - offset: 0, 0 - index: -1 diff --git a/spine-corona/examples/dragon.lua b/spine-corona/examples/dragon/dragon.lua similarity index 99% rename from spine-corona/examples/dragon.lua rename to spine-corona/examples/dragon/dragon.lua index 0e2c468fe..e5eec84a8 100644 --- a/spine-corona/examples/dragon.lua +++ b/spine-corona/examples/dragon/dragon.lua @@ -38,4 +38,3 @@ Runtime:addEventListener("enterFrame", function (event) state:apply(skeleton) skeleton:updateWorldTransform() end) - diff --git a/spine-corona/examples/goblins.lua b/spine-corona/examples/goblins/goblins.lua similarity index 100% rename from spine-corona/examples/goblins.lua rename to spine-corona/examples/goblins/goblins.lua diff --git a/spine-corona/examples/hero/hero.json b/spine-corona/examples/hero/hero.json new file mode 100644 index 000000000..5ceec665d --- /dev/null +++ b/spine-corona/examples/hero/hero.json @@ -0,0 +1 @@ +{"skeleton":{"hash":"/c595Zn6OYuZT0GEQ7y1piry/xk","spine":"Dev","width":319.29,"height":337.01},"bones":[{"name":"root"},{"name":"Hip","parent":"root","y":94.88},{"name":"L_Ground","parent":"root","x":-31.28,"y":0.26},{"name":"LookTarget","parent":"root","x":112.83,"y":218.2},{"name":"R_Ground","parent":"root","x":28.11,"y":0.26},{"name":"L_Ankle","parent":"L_Ground","x":0.26,"y":33.05},{"name":"LookConstraintGoal","parent":"LookTarget","y":-43.82},{"name":"R_Ankle","parent":"R_Ground","y":31.79},{"name":"body","parent":"Hip","length":60.79,"x":4.09,"y":3.17,"rotation":96.39},{"name":"thigh1","parent":"Hip","length":23.94,"x":-17.51,"y":-5.22,"rotation":-107.07},{"name":"thigh2","parent":"Hip","length":23.65,"x":21.85,"y":-5.86,"rotation":-85.46},{"name":"head","parent":"body","length":24.35,"x":74.55,"y":-4.84,"rotation":-92.69},{"name":"mantles","parent":"body","x":48.47,"y":-9,"rotation":-2.25},{"name":"shin1","parent":"thigh1","length":28.23,"x":29.76,"y":-0.91,"rotation":10.26},{"name":"shin2","parent":"thigh2","length":25.35,"x":31.99,"y":2.96,"rotation":-2.25},{"name":"upperarm1","parent":"body","length":19.35,"x":52.49,"y":41.84,"rotation":130.11},{"name":"upperarm2","parent":"body","length":25.98,"x":57.94,"y":-38.93,"rotation":-178.95},{"name":"foot1","parent":"shin1","length":27.07,"x":28.17,"y":-0.48,"rotation":-90.96,"inheritRotation":false},{"name":"foot2","parent":"shin2","length":22.28,"x":25.54,"y":0.27,"rotation":-90.42,"inheritRotation":false},{"name":"forearm1","parent":"upperarm1","length":22.06,"x":23.97,"y":5.16,"rotation":30.56},{"name":"forearm2","parent":"upperarm2","length":15.3,"x":28.74,"y":-0.9,"rotation":6.79},{"name":"hand1","parent":"forearm1","length":28.01,"x":27.54,"y":0.44,"rotation":16.24},{"name":"hand2","parent":"forearm2","length":23.76,"x":22.8,"y":-0.21,"rotation":1.35},{"name":"weapon","parent":"hand2","length":157.4,"x":15.97,"y":1.43,"rotation":77.9}],"ik":[{"name":"L_Leg","bones":["thigh1","shin1"],"target":"L_Ankle","bendPositive":false},{"name":"R_Leg","bones":["thigh2","shin2"],"target":"R_Ankle","bendPositive":false},{"name":"LookConstraint","bones":["head"],"target":"LookConstraintGoal","mix":0}],"slots":[{"name":"upperarm2","bone":"upperarm2","attachment":"upperarm2"},{"name":"sword","bone":"root"},{"name":"hand2","bone":"hand2","attachment":"hand2"},{"name":"weapon","bone":"weapon","attachment":"sword"},{"name":"fingers","bone":"hand2","attachment":"fingers"},{"name":"forearm2","bone":"forearm2","attachment":"forearm2"},{"name":"thigh2","bone":"thigh2","attachment":"thigh2"},{"name":"foot2","bone":"foot2","attachment":"foot2"},{"name":"shin2","bone":"shin2","attachment":"shin2"},{"name":"thigh1","bone":"thigh1","attachment":"thigh1"},{"name":"foot1","bone":"foot1","attachment":"foot1"},{"name":"body","bone":"body","attachment":"body"},{"name":"shin1","bone":"shin1","attachment":"shin1"},{"name":"upperarm1","bone":"upperarm1","attachment":"upperarm1"},{"name":"mantles","bone":"mantles","attachment":"mantles"},{"name":"head","bone":"head","attachment":"head"},{"name":"mouth","bone":"head","attachment":"mouth"},{"name":"eyes","bone":"head","attachment":"eyes"},{"name":"forearm1","bone":"forearm1","attachment":"forearm1"},{"name":"hand1","bone":"hand1","attachment":"hand1"}],"skins":{"default":{"body":{"body":{"x":33.81,"y":2.59,"rotation":-92.7,"width":97,"height":95}},"eyes":{"eyes":{"x":6.48,"y":50.75,"rotation":0.12,"width":82,"height":31}},"fingers":{"fingers":{"x":16.21,"y":1.37,"rotation":82.36,"width":31,"height":33}},"foot1":{"foot1":{"x":12.55,"y":0.12,"rotation":90.96,"width":50,"height":42}},"foot2":{"foot2":{"x":8.83,"y":2.92,"rotation":90.42,"width":53,"height":38}},"forearm1":{"forearm1":{"x":11.88,"y":-5.04,"rotation":106.61,"width":41,"height":49}},"forearm2":{"forearm2":{"x":13.08,"y":-0.63,"rotation":83.71,"width":31,"height":32}},"hand1":{"hand1":{"x":11.92,"y":-0.7,"rotation":90.37,"width":37,"height":48}},"hand2":{"hand2":{"x":14.23,"y":1.64,"rotation":82.36,"width":31,"height":37}},"head":{"head":{"x":7.79,"y":71.87,"rotation":0.12,"width":172,"height":173}},"mantles":{"mantles":{"x":15.57,"y":11.76,"rotation":-90.45,"width":136,"height":55}},"mouth":{"mouth":{"x":12.07,"y":10.76,"rotation":0.12,"width":61,"height":13}},"shin1":{"shin1":{"x":8.95,"y":0.67,"rotation":96.8,"width":53,"height":57}},"shin2":{"shin2":{"x":2.25,"y":-2.94,"rotation":87.71,"width":51,"height":54}},"thigh1":{"thigh1":{"x":11.98,"y":-1.01,"rotation":107.07,"width":60,"height":63}},"thigh2":{"thigh2":{"x":15.7,"y":-4.61,"rotation":85.46,"width":57,"height":64}},"upperarm1":{"upperarm1":{"x":6.6,"y":0.05,"rotation":137.18,"width":50,"height":56}},"upperarm2":{"upperarm2":{"x":13.32,"y":-2.21,"rotation":90.45,"width":39,"height":59}},"weapon":{"sword":{"x":71.38,"y":0.2,"rotation":0.19,"width":216,"height":69}}}},"events":{"Footstep":{}},"animations":{"Attack":{"bones":{"root":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":-12.6,"y":-11.34},{"time":0.0666,"x":-20.75,"y":-23.08},{"time":0.1333,"x":-15.51,"y":-16.91},{"time":0.2,"x":-5.88,"y":-21.85},{"time":0.2666,"x":-7.08,"y":-25.29},{"time":0.4,"x":-12.6,"y":-11.34}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":51.94,"y":0,"curve":"stepped"},{"time":0.4,"x":51.94,"y":0}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":-67.98,"y":0,"curve":"stepped"},{"time":0.4,"x":-67.98,"y":0}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":2.2},{"time":0.0666,"angle":13.21},{"time":0.1333,"angle":-9.58},{"time":0.2,"angle":-23.58},{"time":0.2666,"angle":-32.14},{"time":0.4,"angle":2.2}],"translate":[{"time":0,"x":-0.76,"y":-1.89},{"time":0.1333,"x":4.86,"y":-0.24},{"time":0.2,"x":8.05,"y":-2.43},{"time":0.4,"x":-0.76,"y":-1.89}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":14.5,"y":-3.78,"curve":"stepped"},{"time":0.4,"x":14.5,"y":-3.78}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":-22.57,"y":1.51},{"time":0.2,"x":-13.26,"y":-2.4},{"time":0.4,"x":-22.57,"y":1.51}]},"head":{"rotate":[{"time":0,"angle":-19.21},{"time":0.0666,"angle":-19.17},{"time":0.1333,"angle":4.76},{"time":0.2,"angle":12.46},{"time":0.2666,"angle":12.57},{"time":0.4,"angle":-19.21}],"translate":[{"time":0,"x":0,"y":0},{"time":0.0666,"x":3.47,"y":5.7},{"time":0.2,"x":-4.55,"y":-12.27},{"time":0.4,"x":0,"y":0}]},"mantles":{"rotate":[{"time":0,"angle":-8.27},{"time":0.0666,"angle":5.32},{"time":0.1333,"angle":4.8},{"time":0.2,"angle":-2.43},{"time":0.2666,"angle":-12.35},{"time":0.4,"angle":-8.27}],"translate":[{"time":0,"x":0,"y":0},{"time":0.0666,"x":5.51,"y":-5.45},{"time":0.1333,"x":1.53,"y":-5.87},{"time":0.2,"x":0.46,"y":-6.11},{"time":0.2666,"x":-6.55,"y":-4.72},{"time":0.4,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":-4.05},{"time":0.0666,"angle":33.65},{"time":0.1333,"angle":-3.75},{"time":0.2666,"angle":-49.64},{"time":0.3333,"angle":-42.31},{"time":0.4,"angle":-4.05}],"translate":[{"time":0,"x":0,"y":0},{"time":0.2,"x":-2.5,"y":-6.51},{"time":0.4,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":324.46},{"time":0.0666,"angle":101.05},{"time":0.1333,"angle":49.05},{"time":0.2,"angle":15.11},{"time":0.2666,"angle":313.18},{"time":0.4,"angle":324.46}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":-2.1,"y":-8.13},{"time":0.2,"x":-10.56,"y":1.25},{"time":0.4,"x":0,"y":0}]},"foot1":{"rotate":[{"time":0,"angle":8.9,"curve":"stepped"},{"time":0.4,"angle":8.9}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":-13.11,"curve":"stepped"},{"time":0.4,"angle":-13.11}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":7.93},{"time":0.0666,"angle":42.3},{"time":0.1333,"angle":21.87},{"time":0.3333,"angle":43.27},{"time":0.4,"angle":7.93}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":56.31},{"time":0.0666,"angle":87.62},{"time":0.1333,"angle":6.51},{"time":0.2,"angle":1},{"time":0.2666,"angle":45.14},{"time":0.4,"angle":56.31}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":0},{"time":0.1333,"angle":-8.94},{"time":0.2666,"angle":-20.79},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":17.89},{"time":0.0666,"angle":-12.89},{"time":0.1333,"angle":-11.39},{"time":0.2,"angle":6.2},{"time":0.2666,"angle":18.96},{"time":0.4,"angle":17.89}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]}}},"Crouch":{"bones":{"upperarm2":{"rotate":[{"time":0,"angle":38.03},{"time":0.5,"angle":30.8},{"time":1,"angle":38.03}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":-15.51,"curve":[0.25,0,0.75,1]},{"time":0.5,"angle":-11.54,"curve":[0.25,0,0.75,1]},{"time":1,"angle":-15.51}],"translate":[{"time":0,"x":-0.41,"y":-2.32,"curve":[0.25,0,0.75,1]},{"time":0.5,"x":-2.2,"y":-0.53,"curve":[0.25,0,0.75,1]},{"time":1,"x":-0.41,"y":-2.32}]},"head":{"rotate":[{"time":0,"angle":8.72},{"time":0.5,"angle":3.24},{"time":1,"angle":8.72}],"translate":[{"time":0,"x":-4.42,"y":-2.85,"curve":[0.361,0.63,0.697,1]},{"time":0.1666,"x":-4.84,"y":-3.05,"curve":[0.25,0,0.75,1]},{"time":0.6666,"x":-2.35,"y":-1.86,"curve":[0.36,0.43,0.701,0.8]},{"time":1,"x":-4.42,"y":-2.85}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-11.22,"y":-42.01,"curve":"stepped"},{"time":1,"x":-11.22,"y":-42.01}]},"mantles":{"rotate":[{"time":0,"angle":9.04},{"time":0.5,"angle":7.13},{"time":1,"angle":9.04}],"translate":[{"time":0,"x":-0.09,"y":0,"curve":"stepped"},{"time":1,"x":-0.09,"y":0}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-29.07,"y":1.18,"curve":"stepped"},{"time":1,"x":-29.07,"y":1.18}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":16.23,"y":0,"curve":"stepped"},{"time":1,"x":16.23,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":-5.42},{"time":0.5,"angle":-11.1},{"time":1,"angle":-5.42}],"translate":[{"time":0,"x":-6.94,"y":5.85,"curve":"stepped"},{"time":1,"x":-6.94,"y":5.85}]},"forearm1":{"rotate":[{"time":0,"angle":25.38},{"time":0.5,"angle":32.07},{"time":1,"angle":25.38}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":18.6},{"time":0.5,"angle":26.15},{"time":1,"angle":18.6}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-2.75,"y":0,"curve":"stepped"},{"time":1,"x":-2.75,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-0.92,"y":6.67,"curve":"stepped"},{"time":1,"x":-0.92,"y":6.67}]},"foot1":{"rotate":[{"time":0,"angle":270.13,"curve":"stepped"},{"time":1,"angle":270.13}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":-13.39},{"time":0.5,"angle":-17.28},{"time":1,"angle":-13.39}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":-9.29},{"time":0.5,"angle":-1.97},{"time":1,"angle":-9.29}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":-4.92,"curve":"stepped"},{"time":1,"x":0,"y":-4.92}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":-12.22,"curve":"stepped"},{"time":1,"x":0,"y":-12.22}]}}},"Fall":{"bones":{"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":13.15,"y":7.94,"curve":"stepped"},{"time":1,"x":13.15,"y":7.94}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":35.34,"y":4.14,"curve":"stepped"},{"time":1,"x":35.34,"y":4.14}]},"foot1":{"rotate":[{"time":0,"angle":19.62,"curve":"stepped"},{"time":1,"angle":19.62}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":39.16,"curve":"stepped"},{"time":1,"angle":39.16}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":14.13,"curve":"stepped"},{"time":1,"angle":14.13}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"head":{"rotate":[{"time":0,"angle":-17.81,"curve":"stepped"},{"time":1,"angle":-17.81}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":-25.71,"curve":"stepped"},{"time":1,"angle":-25.71}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":26.18,"curve":"stepped"},{"time":1,"angle":26.18}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":37.75,"curve":"stepped"},{"time":1,"angle":37.75}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":12.3,"curve":"stepped"},{"time":1,"angle":12.3}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"mantles":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]}}},"Idle":{"bones":{"upperarm2":{"rotate":[{"time":0,"angle":0.46},{"time":0.5,"angle":358.79},{"time":1,"angle":0.46}],"translate":[{"time":0,"x":0,"y":0},{"time":0.5,"x":-3.12,"y":8.02},{"time":1,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":0},{"time":0.5,"angle":1.66},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":[0.25,0,0.75,1]},{"time":0.5,"x":0,"y":-3.7,"curve":[0.25,0,0.75,1]},{"time":1,"x":0,"y":0}]},"head":{"rotate":[{"time":0,"angle":-4.18},{"time":0.5,"angle":-8.25},{"time":1,"angle":-4.18}],"translate":[{"time":0,"x":-1.06,"y":0,"curve":[0.382,0.57,0.735,1]},{"time":0.1666,"x":0,"y":0,"curve":[0.25,0,0.75,1]},{"time":0.6666,"x":-3.74,"y":0,"curve":[0.243,0,0.648,0.6]},{"time":1,"x":-1.06,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":-2.92,"curve":[0.25,0,0.75,1]},{"time":0.5,"x":-3.18,"y":-4.03,"curve":[0.25,0,0.75,1]},{"time":1,"x":0,"y":-2.92}]},"mantles":{"rotate":[{"time":0,"angle":0},{"time":0.4333,"angle":-4.83,"curve":[0.25,0,0.75,1]},{"time":1,"angle":0}],"translate":[{"time":0,"x":-0.09,"y":0,"curve":[0.3,0.21,0.755,1]},{"time":0.4333,"x":-1.41,"y":0,"curve":[0.25,0,0.75,1]},{"time":0.9333,"x":0,"y":0},{"time":1,"x":-0.09,"y":0}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-7.15,"y":0,"curve":"stepped"},{"time":1,"x":-7.15,"y":0}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":5.94,"y":0,"curve":"stepped"},{"time":1,"x":5.94,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":0,"curve":[0.404,0,0.75,1]},{"time":0.5,"angle":-15.4,"curve":[0.516,0,0.75,1]},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":[0.404,0,0.75,1]},{"time":0.5,"x":1.84,"y":-5,"curve":[0.516,0,0.75,1]},{"time":1,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":0,"curve":[0.404,0,0.75,1]},{"time":0.5,"angle":9.63,"curve":[0.516,0,0.75,1]},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":0},{"time":0.5,"angle":13.63},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":0},{"time":0.5,"angle":-8.65},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":0,"curve":[0.404,0,0.75,1]},{"time":0.5,"angle":12.36,"curve":[0.516,0,0.75,1]},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]}}},"Jump":{"bones":{"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-6.83,"y":12.06,"curve":"stepped"},{"time":1,"x":-6.83,"y":12.06}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":2.41,"y":1.2,"curve":"stepped"},{"time":1,"x":2.41,"y":1.2}]},"foot1":{"rotate":[{"time":0,"angle":-32.23,"curve":"stepped"},{"time":1,"angle":-32.23}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":-33.3,"curve":"stepped"},{"time":1,"angle":-33.3}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":-10.4,"curve":"stepped"},{"time":1,"angle":-10.4}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"head":{"rotate":[{"time":0,"angle":4.89,"curve":"stepped"},{"time":1,"angle":4.89}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":22.69,"curve":"stepped"},{"time":1,"angle":22.69}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":56.41,"curve":"stepped"},{"time":1,"angle":56.41}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":23.71,"curve":"stepped"},{"time":1,"angle":23.71}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":20.06,"curve":"stepped"},{"time":1,"angle":20.06}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"mantles":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]}}},"Run":{"bones":{"upperarm1":{"rotate":[{"time":0,"angle":-40.45},{"time":0.044,"angle":-34.97},{"time":0.0881,"angle":1.79},{"time":0.1322,"angle":42.58},{"time":0.3117,"angle":-282.55},{"time":0.3525,"angle":48.21},{"time":0.3966,"angle":26.17},{"time":0.4407,"angle":-22.81},{"time":0.5333,"angle":-40.45}],"translate":[{"time":0,"x":0,"y":0},{"time":0.044,"x":1.33,"y":0.56},{"time":0.1762,"x":-2.74,"y":-5.58},{"time":0.3117,"x":-3.1,"y":-2.45},{"time":0.4407,"x":-0.75,"y":4.05},{"time":0.5333,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":27.41},{"time":0.044,"angle":21.5},{"time":0.0881,"angle":16.71},{"time":0.1322,"angle":30.61},{"time":0.3117,"angle":38.33},{"time":0.3525,"angle":37.81},{"time":0.3966,"angle":16.47},{"time":0.4407,"angle":17.71},{"time":0.5333,"angle":27.41}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":-20.19},{"time":0.044,"angle":-24.82},{"time":0.1762,"angle":-14.29},{"time":0.3525,"angle":21.84},{"time":0.3966,"angle":9.46},{"time":0.4407,"angle":12.08},{"time":0.5333,"angle":-20.19}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":49.53,"y":-0.29},{"time":0.044,"x":39.66,"y":-0.29},{"time":0.0881,"x":-3.63,"y":-0.29},{"time":0.1322,"x":-10.76,"y":-0.29},{"time":0.1762,"x":-16.65,"y":22.09},{"time":0.2203,"x":-10,"y":27.07},{"time":0.2666,"x":-11.26,"y":16.63},{"time":0.3117,"x":12.41,"y":7.75},{"time":0.3525,"x":37.47,"y":7.29},{"time":0.3966,"x":52.33,"y":5.52},{"time":0.4407,"x":68.69,"y":19.42},{"time":0.4848,"x":68.69,"y":7.96},{"time":0.5333,"x":49.53,"y":-0.29}]},"foot1":{"rotate":[{"time":0,"angle":20.27},{"time":0.044,"angle":-0.6},{"time":0.1322,"angle":-31.14},{"time":0.1762,"angle":262.34},{"time":0.2203,"angle":-71.2},{"time":0.2666,"angle":-84.95},{"time":0.3117,"angle":-63.21},{"time":0.3525,"angle":-8.37},{"time":0.3966,"angle":-18.33},{"time":0.4407,"angle":34.08},{"time":0.5333,"angle":20.27}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":-58.44,"y":26.01},{"time":0.044,"x":-42,"y":21.08},{"time":0.0881,"x":-5.28,"y":9.57},{"time":0.1322,"x":11.16,"y":11.76},{"time":0.1762,"x":19.38,"y":26.56},{"time":0.2203,"x":23.89,"y":16.89},{"time":0.2666,"x":21.52,"y":-0.14},{"time":0.3117,"x":-19.32,"y":-0.14},{"time":0.3525,"x":-53.26,"y":0.13},{"time":0.3966,"x":-65.63,"y":6.46},{"time":0.4407,"x":-75.71,"y":39.48},{"time":0.5333,"x":-58.44,"y":26.01}]},"foot2":{"rotate":[{"time":0,"angle":262.95},{"time":0.0881,"angle":-74.33},{"time":0.1322,"angle":-4.26},{"time":0.1762,"angle":13.38},{"time":0.2203,"angle":28.95},{"time":0.2666,"angle":35.05},{"time":0.3117,"angle":7.53},{"time":0.3525,"angle":-31.42},{"time":0.4407,"angle":260.06},{"time":0.5333,"angle":262.95}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"root":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":-8.39},{"time":0.044,"x":1.64,"y":-12.87},{"time":0.0881,"x":1.64,"y":-11.23,"curve":[0.25,0,0.75,1]},{"time":0.1762,"x":1.64,"y":8.97},{"time":0.2203,"x":1.64,"y":-1.1},{"time":0.2666,"x":0,"y":-8.39},{"time":0.3117,"x":0,"y":-10.17},{"time":0.3525,"x":0,"y":-9.45,"curve":[0.25,0,0.75,1]},{"time":0.4407,"x":0,"y":5.78},{"time":0.4848,"x":1.64,"y":-1.1},{"time":0.5333,"x":0,"y":-8.39}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1762,"x":-1.45,"y":9.68},{"time":0.5333,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":-11.15},{"time":0.044,"angle":-16.76},{"time":0.1762,"angle":-8.61},{"time":0.3117,"angle":-20.17},{"time":0.4407,"angle":-8.61},{"time":0.5333,"angle":-11.15}],"translate":[{"time":0,"x":3.36,"y":-2.52},{"time":0.044,"x":4.98,"y":0.87},{"time":0.1762,"x":2.6,"y":4.02},{"time":0.3117,"x":5.73,"y":0.46},{"time":0.4407,"x":2.7,"y":5.1},{"time":0.5333,"x":3.36,"y":-2.52}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":6.02,"y":0},{"time":0.1322,"x":-3.58,"y":1.43},{"time":0.1762,"x":0.23,"y":2.72},{"time":0.2666,"x":6.13,"y":-0.59},{"time":0.3305,"x":8.81,"y":5.77},{"time":0.3966,"x":31,"y":0.35},{"time":0.4848,"x":22.13,"y":0.17},{"time":0.5333,"x":6.02,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":-8.31,"y":-2.37},{"time":0.1322,"x":-3.93,"y":-2.37},{"time":0.2666,"x":3.22,"y":-1.52},{"time":0.3525,"x":-18.12,"y":0.17},{"time":0.3966,"x":-28.38,"y":0.17},{"time":0.5333,"x":-8.31,"y":-2.37}]},"head":{"rotate":[{"time":0,"angle":8.08},{"time":0.044,"angle":1.34,"curve":[0.25,0,0.851,0.81]},{"time":0.1762,"angle":6.45},{"time":0.2666,"angle":10.37},{"time":0.3117,"angle":3.57,"curve":[0.25,0,0.842,0.77]},{"time":0.4407,"angle":7.81},{"time":0.5333,"angle":8.08}],"translate":[{"time":0,"x":2.87,"y":0.23},{"time":0.044,"x":-3.5,"y":-1.82},{"time":0.1762,"x":4.6,"y":0.76},{"time":0.2666,"x":1.55,"y":-6.16},{"time":0.3117,"x":-7.07,"y":-8.66},{"time":0.4407,"x":7.03,"y":0.05},{"time":0.5333,"x":2.87,"y":0.23}]},"mantles":{"rotate":[{"time":0,"angle":0},{"time":0.044,"angle":-2.17},{"time":0.2666,"angle":2.9},{"time":0.3117,"angle":-0.95},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0},{"time":0.044,"x":-2.6,"y":-0.65},{"time":0.2666,"x":1.39,"y":-0.59},{"time":0.3117,"x":-2.6,"y":-0.65},{"time":0.5333,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":30.8},{"time":0.044,"angle":38.3},{"time":0.1322,"angle":5.43},{"time":0.2203,"angle":334.6,"curve":[0.25,0,0.75,1]},{"time":0.3117,"angle":328.38},{"time":0.4407,"angle":21.28},{"time":0.5333,"angle":30.8}],"translate":[{"time":0,"x":-5.33,"y":-1.55},{"time":0.1762,"x":-6.43,"y":2.12},{"time":0.5333,"x":-5.33,"y":-1.55}]},"forearm2":{"rotate":[{"time":0,"angle":35.89},{"time":0.0881,"angle":25.71},{"time":0.1762,"angle":29.3},{"time":0.2203,"angle":34.63,"curve":[0.25,0,0.75,1]},{"time":0.3117,"angle":38.94},{"time":0.4407,"angle":30.09},{"time":0.5333,"angle":35.89}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":8.06},{"time":0.044,"angle":12.45},{"time":0.1762,"angle":33.85},{"time":0.4407,"angle":22.92},{"time":0.5333,"angle":8.06}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]}},"events":[{"time":0.2666,"name":"Footstep"},{"time":0.5333,"name":"Footstep"}]},"Walk":{"bones":{"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":68.76,"y":0},{"time":0.1333,"x":57.43,"y":0},{"time":0.2666,"x":41.05,"y":0},{"time":0.4,"x":21.33,"y":0},{"time":0.5333,"x":5.89,"y":0},{"time":0.6666,"x":4.91,"y":0},{"time":0.8,"x":5.89,"y":10.31},{"time":0.9333,"x":44.68,"y":10.8},{"time":1.0666,"x":68.76,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":24.92,"y":0},{"time":0.2666,"x":22.2,"y":0},{"time":0.4,"x":21.75,"y":-1.01},{"time":0.5333,"x":21.29,"y":0},{"time":0.6666,"x":16.1,"y":1},{"time":0.9333,"x":21.7,"y":-3.92},{"time":1.0666,"x":24.92,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":0,"y":-7.39},{"time":0.1333,"x":0,"y":-6.32},{"time":0.2666,"x":0,"y":-1.44},{"time":0.3333,"x":0,"y":1.49},{"time":0.4,"x":0,"y":0.87},{"time":0.5333,"x":0,"y":-9.59},{"time":0.6666,"x":0,"y":-8.44},{"time":0.8,"x":0,"y":-1.44},{"time":0.8666,"x":0,"y":1.49},{"time":0.9333,"x":0,"y":0.87},{"time":1.0666,"x":0,"y":-7.39}]},"foot1":{"rotate":[{"time":0,"angle":17.4},{"time":0.1333,"angle":-0.28},{"time":0.4,"angle":-10.63},{"time":0.5333,"angle":-8.71},{"time":0.6666,"angle":-24.7},{"time":0.8,"angle":-43.24},{"time":0.9333,"angle":-35.2},{"time":1.0666,"angle":17.4}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":-25.09,"y":0},{"time":0.2,"x":-16.15,"y":-4.51},{"time":0.4,"x":-9.43,"y":-3.48},{"time":0.5333,"x":-4.25,"y":-1.41},{"time":0.6666,"x":-6.64,"y":0.04},{"time":0.8,"x":-11.55,"y":-2.12},{"time":0.9333,"x":-22.84,"y":-3.88},{"time":1.0666,"x":-25.09,"y":0}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":-53.9,"y":0},{"time":0.1333,"x":-55,"y":2.56},{"time":0.2666,"x":-56,"y":14.27},{"time":0.4,"x":-9.55,"y":9.63},{"time":0.5333,"x":18.47,"y":-0.26},{"time":0.6666,"x":6.23,"y":-0.26},{"time":0.8,"x":-20.75,"y":-0.26},{"time":0.9333,"x":-36.46,"y":-3.45},{"time":1.0666,"x":-53.9,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":-20},{"time":0.1333,"angle":-36.58},{"time":0.2666,"angle":-69.51},{"time":0.4,"angle":-13.92},{"time":0.5333,"angle":33.26},{"time":0.6666,"angle":0.41},{"time":0.9333,"angle":-1.16},{"time":1.0666,"angle":-20}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":13.97},{"time":0.1333,"angle":2.64},{"time":0.5333,"angle":-293.8},{"time":0.6666,"angle":-302.37},{"time":0.8,"angle":41.55},{"time":0.9333,"angle":14.48},{"time":1.0666,"angle":13.97}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":4.42,"y":3.57},{"time":0.5333,"x":-0.22,"y":-4.77},{"time":0.6666,"x":0.24,"y":-2.39},{"time":1.0666,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":-11.7},{"time":0.1333,"angle":-5.73},{"time":0.5333,"angle":24.76},{"time":0.6666,"angle":33.27,"curve":[0.25,0,0.75,1]},{"time":0.8,"angle":3.08},{"time":0.9333,"angle":5.39},{"time":1.0666,"angle":-11.7}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":-19.62},{"time":0.1333,"angle":-25.06},{"time":0.2666,"angle":-27.67},{"time":0.4,"angle":-34.31},{"time":0.5333,"angle":-24.05},{"time":0.8,"angle":16.76},{"time":0.9333,"angle":7.44},{"time":1.0666,"angle":-19.62}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":2.18},{"time":0.1333,"angle":-2.56,"curve":[0.464,0,0.75,1]},{"time":0.3333,"angle":4.73},{"time":0.5333,"angle":0.29},{"time":0.6666,"angle":-2.56,"curve":[0.464,0,0.75,1]},{"time":0.8666,"angle":3.59},{"time":1.0666,"angle":2.18}],"translate":[{"time":0,"x":10.86,"y":-1.14},{"time":0.1333,"x":10.48,"y":-2.93},{"time":0.3333,"x":1.78,"y":5.09},{"time":0.5333,"x":12.04,"y":-2.64},{"time":0.6666,"x":10.48,"y":-2.93},{"time":0.8666,"x":1.78,"y":6.43},{"time":1.0666,"x":10.86,"y":-1.14}]},"head":{"rotate":[{"time":0,"angle":-11.7},{"time":0.1333,"angle":-2.87},{"time":0.3333,"angle":-10.46},{"time":0.5333,"angle":-6.46},{"time":0.6666,"angle":-2.85},{"time":0.8666,"angle":-8.52},{"time":1.0666,"angle":-11.7}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":-2.96,"y":-3.42},{"time":0.3333,"x":1.04,"y":0.33},{"time":0.5333,"x":0,"y":0},{"time":0.6666,"x":-2.96,"y":-3.42},{"time":0.8666,"x":1.04,"y":0.33},{"time":1.0666,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":349.66},{"time":0.1333,"angle":349.79},{"time":0.2666,"angle":343.53},{"time":0.4,"angle":334.09},{"time":0.5333,"angle":327.79},{"time":0.8,"angle":338.53},{"time":0.9333,"angle":354.68},{"time":1.0666,"angle":349.66}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":-0.76,"y":-1.44},{"time":0.5333,"x":-0.19,"y":8.7},{"time":1.0666,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":21.04},{"time":0.1333,"angle":24.41},{"time":0.2666,"angle":-0.81},{"time":0.4,"angle":23.68},{"time":0.5333,"angle":23.61},{"time":0.6666,"angle":25.56},{"time":0.8,"angle":12.55},{"time":0.9333,"angle":-0.27},{"time":1.0666,"angle":21.04}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":-12.1},{"time":0.1333,"angle":-8.87},{"time":0.2666,"angle":13.76},{"time":0.4,"angle":-3.02},{"time":0.5333,"angle":11.48},{"time":0.6666,"angle":5.24},{"time":0.8,"angle":3.93},{"time":0.9333,"angle":0.31},{"time":1.0666,"angle":-12.1}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"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}]},"L_Ankle":{"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}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":0,"y":-1.35,"curve":"stepped"},{"time":1.0666,"x":0,"y":-1.35}]},"mantles":{"rotate":[{"time":0,"angle":-3.56},{"time":0.3333,"angle":-8.55},{"time":0.5333,"angle":-6.73},{"time":0.8666,"angle":-8.55},{"time":1.0666,"angle":-3.56}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":-1.9,"y":-1.47},{"time":0.3333,"x":-0.66,"y":-0.2},{"time":0.6666,"x":-1.9,"y":-1.47},{"time":0.8666,"x":-0.66,"y":-0.2},{"time":1.0666,"x":0,"y":0}]},"shin1":{"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}]},"shin2":{"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}]},"weapon":{"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}]},"LookConstraintGoal":{"rotate":[{"time":0.9333,"angle":0}]}},"events":[{"time":0.5333,"name":"Footstep"},{"time":1.0666,"name":"Footstep"}]}}} \ No newline at end of file diff --git a/spine-corona/examples/hero/hero.lua b/spine-corona/examples/hero/hero.lua new file mode 100644 index 000000000..2ba535771 --- /dev/null +++ b/spine-corona/examples/hero/hero.lua @@ -0,0 +1,55 @@ + +-- This skeleton uses IK for the feet. + +local spine = require "spine-corona.spine" + +local json = spine.SkeletonJson.new() +local skeletonData = json:readSkeletonDataFile("examples/hero/hero.json") + +local skeleton = spine.Skeleton.new(skeletonData) +function skeleton:createImage (attachment) + return display.newImage("examples/hero/images/" .. attachment.name .. ".png") +end +skeleton.group.x = 95 +skeleton.group.y = 385 +skeleton.flipX = false +skeleton.flipY = false +skeleton.debug = true -- Omit or set to false to not draw debug lines on top of the images. +skeleton:setToSetupPose() + +-- AnimationStateData defines crossfade durations between animations. +local stateData = spine.AnimationStateData.new(skeletonData) +stateData.defaultMix = 0.2; +stateData:setMix("Walk", "Attack", 0) +stateData:setMix("Attack", "Run", 0) +stateData:setMix("Run", "Attack", 0) +-- AnimationState has a queue of animations and can apply them with crossfading. +local state = spine.AnimationState.new(stateData) +state:setAnimationByName(0, "Idle", true) + +local lastTime = 0 +local animationTime = 0 +Runtime:addEventListener("enterFrame", function (event) + -- Compute time in seconds since last frame. + local currentTime = event.time / 1000 + local delta = currentTime - lastTime + lastTime = currentTime + + -- Update the state with the delta time, apply it, and update the world transforms. + state:update(delta) + state:apply(skeleton) + skeleton:updateWorldTransform() +end) + +Runtime:addEventListener("touch", function (event) + if event.phase ~= "ended" and event.phase ~= "cancelled" then return end + local name = state:getCurrent(0).animation.name + if name == "Idle" then + state:setAnimationByName(0, "Crouch", true) + elseif name == "Crouch" then + state:setAnimationByName(0, "Walk", true) + else + state:setAnimationByName(0, "Attack", false) + state:addAnimationByName(0, "Run", true, 0) + end +end) diff --git a/spine-corona/examples/hero/images/body.png b/spine-corona/examples/hero/images/body.png new file mode 100644 index 000000000..0ad1fa813 Binary files /dev/null and b/spine-corona/examples/hero/images/body.png differ diff --git a/spine-corona/examples/hero/images/cape.png b/spine-corona/examples/hero/images/cape.png new file mode 100644 index 000000000..2a0b9c4d6 Binary files /dev/null and b/spine-corona/examples/hero/images/cape.png differ diff --git a/spine-corona/examples/hero/images/eyes.png b/spine-corona/examples/hero/images/eyes.png new file mode 100644 index 000000000..81faaa629 Binary files /dev/null and b/spine-corona/examples/hero/images/eyes.png differ diff --git a/spine-corona/examples/hero/images/fingers.png b/spine-corona/examples/hero/images/fingers.png new file mode 100644 index 000000000..241e889c4 Binary files /dev/null and b/spine-corona/examples/hero/images/fingers.png differ diff --git a/spine-corona/examples/hero/images/foot1.png b/spine-corona/examples/hero/images/foot1.png new file mode 100644 index 000000000..2c14a8864 Binary files /dev/null and b/spine-corona/examples/hero/images/foot1.png differ diff --git a/spine-corona/examples/hero/images/foot2.png b/spine-corona/examples/hero/images/foot2.png new file mode 100644 index 000000000..5f4323ea8 Binary files /dev/null and b/spine-corona/examples/hero/images/foot2.png differ diff --git a/spine-corona/examples/hero/images/forearm1.png b/spine-corona/examples/hero/images/forearm1.png new file mode 100644 index 000000000..442577ca7 Binary files /dev/null and b/spine-corona/examples/hero/images/forearm1.png differ diff --git a/spine-corona/examples/hero/images/forearm2.png b/spine-corona/examples/hero/images/forearm2.png new file mode 100644 index 000000000..aee03c528 Binary files /dev/null and b/spine-corona/examples/hero/images/forearm2.png differ diff --git a/spine-corona/examples/hero/images/hand1.png b/spine-corona/examples/hero/images/hand1.png new file mode 100644 index 000000000..61be4568b Binary files /dev/null and b/spine-corona/examples/hero/images/hand1.png differ diff --git a/spine-corona/examples/hero/images/hand2.png b/spine-corona/examples/hero/images/hand2.png new file mode 100644 index 000000000..b8d1c0008 Binary files /dev/null and b/spine-corona/examples/hero/images/hand2.png differ diff --git a/spine-corona/examples/hero/images/head.png b/spine-corona/examples/hero/images/head.png new file mode 100644 index 000000000..f61076441 Binary files /dev/null and b/spine-corona/examples/hero/images/head.png differ diff --git a/spine-corona/examples/hero/images/license.txt b/spine-corona/examples/hero/images/license.txt new file mode 100644 index 000000000..86fb7fa08 --- /dev/null +++ b/spine-corona/examples/hero/images/license.txt @@ -0,0 +1,5 @@ +Copyright (c) 2014, XDTech + +The project file and images in this "Hero" project are provided for +demonstration purposes only and may not be redistributed for any reason nor +used as the basis for derivative work. \ No newline at end of file diff --git a/spine-corona/examples/hero/images/mantles.png b/spine-corona/examples/hero/images/mantles.png new file mode 100644 index 000000000..64951c97e Binary files /dev/null and b/spine-corona/examples/hero/images/mantles.png differ diff --git a/spine-corona/examples/hero/images/mouth.png b/spine-corona/examples/hero/images/mouth.png new file mode 100644 index 000000000..18ea237f0 Binary files /dev/null and b/spine-corona/examples/hero/images/mouth.png differ diff --git a/spine-corona/examples/hero/images/shin1.png b/spine-corona/examples/hero/images/shin1.png new file mode 100644 index 000000000..0f8dcca5b Binary files /dev/null and b/spine-corona/examples/hero/images/shin1.png differ diff --git a/spine-corona/examples/hero/images/shin2.png b/spine-corona/examples/hero/images/shin2.png new file mode 100644 index 000000000..21febdd27 Binary files /dev/null and b/spine-corona/examples/hero/images/shin2.png differ diff --git a/spine-corona/examples/hero/images/sword.png b/spine-corona/examples/hero/images/sword.png new file mode 100644 index 000000000..64cf16bba Binary files /dev/null and b/spine-corona/examples/hero/images/sword.png differ diff --git a/spine-corona/examples/hero/images/thigh1.png b/spine-corona/examples/hero/images/thigh1.png new file mode 100644 index 000000000..cd5e7ff6b Binary files /dev/null and b/spine-corona/examples/hero/images/thigh1.png differ diff --git a/spine-corona/examples/hero/images/thigh2.png b/spine-corona/examples/hero/images/thigh2.png new file mode 100644 index 000000000..11415d861 Binary files /dev/null and b/spine-corona/examples/hero/images/thigh2.png differ diff --git a/spine-corona/examples/hero/images/upperarm1.png b/spine-corona/examples/hero/images/upperarm1.png new file mode 100644 index 000000000..b0e00ac3e Binary files /dev/null and b/spine-corona/examples/hero/images/upperarm1.png differ diff --git a/spine-corona/examples/hero/images/upperarm2.png b/spine-corona/examples/hero/images/upperarm2.png new file mode 100644 index 000000000..d3f098ee1 Binary files /dev/null and b/spine-corona/examples/hero/images/upperarm2.png differ diff --git a/spine-corona/examples/spineboy/images/eye_indifferent.png b/spine-corona/examples/spineboy/images/eye_indifferent.png new file mode 100644 index 000000000..1d29940ff Binary files /dev/null and b/spine-corona/examples/spineboy/images/eye_indifferent.png differ diff --git a/spine-corona/examples/spineboy/images/eye_surprised.png b/spine-corona/examples/spineboy/images/eye_surprised.png new file mode 100644 index 000000000..f411f9432 Binary files /dev/null and b/spine-corona/examples/spineboy/images/eye_surprised.png differ diff --git a/spine-corona/examples/spineboy/images/front_bracer.png b/spine-corona/examples/spineboy/images/front_bracer.png new file mode 100644 index 000000000..aa0fca6fd Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_bracer.png differ diff --git a/spine-corona/examples/spineboy/images/front_fist_closed.png b/spine-corona/examples/spineboy/images/front_fist_closed.png new file mode 100644 index 000000000..eb8b24217 Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_fist_closed.png differ diff --git a/spine-corona/examples/spineboy/images/front_fist_open.png b/spine-corona/examples/spineboy/images/front_fist_open.png new file mode 100644 index 000000000..c950492d7 Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_fist_open.png differ diff --git a/spine-corona/examples/spineboy/images/front_foot.png b/spine-corona/examples/spineboy/images/front_foot.png new file mode 100644 index 000000000..69ea494c3 Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_foot.png differ diff --git a/spine-corona/examples/spineboy/images/front_foot_bend1.png b/spine-corona/examples/spineboy/images/front_foot_bend1.png new file mode 100644 index 000000000..6cbc1ffcc Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_foot_bend1.png differ diff --git a/spine-corona/examples/spineboy/images/front_foot_bend2.png b/spine-corona/examples/spineboy/images/front_foot_bend2.png new file mode 100644 index 000000000..e6b3942c7 Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_foot_bend2.png differ diff --git a/spine-corona/examples/spineboy/images/front_shin.png b/spine-corona/examples/spineboy/images/front_shin.png new file mode 100644 index 000000000..e63bef05b Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_shin.png differ diff --git a/spine-corona/examples/spineboy/images/front_thigh.png b/spine-corona/examples/spineboy/images/front_thigh.png new file mode 100644 index 000000000..91dbd8df5 Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_thigh.png differ diff --git a/spine-corona/examples/spineboy/images/front_upper_arm.png b/spine-corona/examples/spineboy/images/front_upper_arm.png new file mode 100644 index 000000000..49d16d286 Binary files /dev/null and b/spine-corona/examples/spineboy/images/front_upper_arm.png differ diff --git a/spine-corona/examples/spineboy/images/goggles.png b/spine-corona/examples/spineboy/images/goggles.png new file mode 100644 index 000000000..7eb52b9db Binary files /dev/null and b/spine-corona/examples/spineboy/images/goggles.png differ diff --git a/spine-corona/examples/spineboy/images/gun.png b/spine-corona/examples/spineboy/images/gun.png new file mode 100644 index 000000000..2ba05f556 Binary files /dev/null and b/spine-corona/examples/spineboy/images/gun.png differ diff --git a/spine-corona/examples/spineboy/images/head.png b/spine-corona/examples/spineboy/images/head.png index 5a98aa37a..2d7f66abf 100644 Binary files a/spine-corona/examples/spineboy/images/head.png and b/spine-corona/examples/spineboy/images/head.png differ diff --git a/spine-corona/examples/spineboy/images/mouth_grind.png b/spine-corona/examples/spineboy/images/mouth_grind.png new file mode 100644 index 000000000..60046ab92 Binary files /dev/null and b/spine-corona/examples/spineboy/images/mouth_grind.png differ diff --git a/spine-corona/examples/spineboy/images/mouth_oooo.png b/spine-corona/examples/spineboy/images/mouth_oooo.png new file mode 100644 index 000000000..e3dc2b1e2 Binary files /dev/null and b/spine-corona/examples/spineboy/images/mouth_oooo.png differ diff --git a/spine-corona/examples/spineboy/images/mouth_smile.png b/spine-corona/examples/spineboy/images/mouth_smile.png new file mode 100644 index 000000000..7a2276ee5 Binary files /dev/null and b/spine-corona/examples/spineboy/images/mouth_smile.png differ diff --git a/spine-corona/examples/spineboy/images/muzzle.png b/spine-corona/examples/spineboy/images/muzzle.png new file mode 100644 index 000000000..6d53f3ad8 Binary files /dev/null and b/spine-corona/examples/spineboy/images/muzzle.png differ diff --git a/spine-corona/examples/spineboy/images/neck.png b/spine-corona/examples/spineboy/images/neck.png index c7b938863..544ea1ed2 100644 Binary files a/spine-corona/examples/spineboy/images/neck.png and b/spine-corona/examples/spineboy/images/neck.png differ diff --git a/spine-corona/examples/spineboy/images/rear_bracer.png b/spine-corona/examples/spineboy/images/rear_bracer.png new file mode 100644 index 000000000..06b9c9cd7 Binary files /dev/null and b/spine-corona/examples/spineboy/images/rear_bracer.png differ diff --git a/spine-corona/examples/spineboy/images/rear_foot.png b/spine-corona/examples/spineboy/images/rear_foot.png new file mode 100644 index 000000000..6fdf9ad60 Binary files /dev/null and b/spine-corona/examples/spineboy/images/rear_foot.png differ diff --git a/spine-corona/examples/spineboy/images/rear_foot_bend1.png b/spine-corona/examples/spineboy/images/rear_foot_bend1.png new file mode 100644 index 000000000..10f2a72e9 Binary files /dev/null and b/spine-corona/examples/spineboy/images/rear_foot_bend1.png differ diff --git a/spine-corona/examples/spineboy/images/rear_foot_bend2.png b/spine-corona/examples/spineboy/images/rear_foot_bend2.png new file mode 100644 index 000000000..01dff6265 Binary files /dev/null and b/spine-corona/examples/spineboy/images/rear_foot_bend2.png differ diff --git a/spine-corona/examples/spineboy/images/rear_shin.png b/spine-corona/examples/spineboy/images/rear_shin.png new file mode 100644 index 000000000..02335c263 Binary files /dev/null and b/spine-corona/examples/spineboy/images/rear_shin.png differ diff --git a/spine-corona/examples/spineboy/images/rear_thigh.png b/spine-corona/examples/spineboy/images/rear_thigh.png new file mode 100644 index 000000000..d5da9f15d Binary files /dev/null and b/spine-corona/examples/spineboy/images/rear_thigh.png differ diff --git a/spine-corona/examples/spineboy/images/rear_upper_arm.png b/spine-corona/examples/spineboy/images/rear_upper_arm.png new file mode 100644 index 000000000..52d3a9ef5 Binary files /dev/null and b/spine-corona/examples/spineboy/images/rear_upper_arm.png differ diff --git a/spine-corona/examples/spineboy/images/torso.png b/spine-corona/examples/spineboy/images/torso.png index d5a318e72..c38b2ef45 100644 Binary files a/spine-corona/examples/spineboy/images/torso.png and b/spine-corona/examples/spineboy/images/torso.png differ diff --git a/spine-corona/examples/spineboy/spineboy.json b/spine-corona/examples/spineboy/spineboy.json index 113e72c33..408b1d87e 100644 --- a/spine-corona/examples/spineboy/spineboy.json +++ b/spine-corona/examples/spineboy/spineboy.json @@ -1,1002 +1 @@ -{ -"bones": [ - { "name": "root" }, - { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, - { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, - { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, - { "name": "right upper leg", "parent": "hip", "length": 45.76, "x": -18.27, "rotation": -101.13 }, - { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 94.95 }, - { "name": "left lower leg", "parent": "left upper leg", "length": 56.45, "x": 51.78, "y": 3.46, "rotation": -16.65 }, - { "name": "left shoulder", "parent": "torso", "length": 44.19, "x": 78.96, "y": -15.75, "rotation": -156.96 }, - { "name": "neck", "parent": "torso", "length": 18.38, "x": 83.64, "y": -1.78, "rotation": 0.9 }, - { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 50.21, "y": 0.6, "rotation": -10.7 }, - { "name": "right shoulder", "parent": "torso", "length": 49.95, "x": 81.9, "y": 6.79, "rotation": 130.6 }, - { "name": "head", "parent": "neck", "length": 68.28, "x": 19.09, "y": 6.97, "rotation": -8.94 }, - { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 44.19, "y": -0.01, "rotation": 28.16 }, - { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 64.02, "y": -8.67, "rotation": 102.43 }, - { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 49.95, "y": -0.12, "rotation": 40.12 }, - { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, - { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, - { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } -], -"slots": [ - { "name": "left shoulder", "bone": "left shoulder", "attachment": "left-shoulder" }, - { "name": "left arm", "bone": "left arm", "attachment": "left-arm" }, - { "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": "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": "right upper leg", "bone": "right upper leg", "attachment": "right-upper-leg" }, - { "name": "torso", "bone": "torso", "attachment": "torso" }, - { "name": "neck", "bone": "neck", "attachment": "neck" }, - { "name": "head", "bone": "head", "attachment": "head" }, - { "name": "eyes", "bone": "head", "attachment": "eyes" }, - { "name": "right shoulder", "bone": "right shoulder", "attachment": "right-shoulder", "additive": true }, - { "name": "right arm", "bone": "right arm", "attachment": "right-arm" }, - { "name": "right hand", "bone": "right hand", "attachment": "right-hand" }, - { "name": "bb-head", "bone": "head", "attachment": "bb-head" } -], -"skins": { - "default": { - "bb-head": { - "bb-head": { - "type": "boundingbox", - "vertices": [ - 55.69696, - -44.60648, - 8.2226715, - -47.609646, - -11.244263, - -32.942703, - -0.05206299, - 35.835804, - 61.018433, - 43.227512, - 90.35846, - -16.054127, - 115.41275, - -32.817406, - 78.29431, - -56.05409 - ] - } - }, - "eyes": { - "eyes": { "x": 28.94, "y": -32.92, "rotation": -86.9, "width": 34, "height": 27 }, - "eyes-closed": { "x": 28.77, "y": -32.86, "rotation": -86.9, "width": 34, "height": 27 } - }, - "head": { - "head": { "x": 53.94, "y": -5.75, "rotation": -86.9, "width": 121, "height": 132 } - }, - "left arm": { - "left-arm": { "x": 15.11, "y": -0.44, "rotation": 33.84, "width": 35, "height": 29 } - }, - "left foot": { - "left-foot": { "x": 24.35, "y": 8.88, "rotation": 3.32, "width": 65, "height": 30 } - }, - "left hand": { - "left-hand": { "x": 0.75, "y": 1.86, "rotation": 31.14, "width": 35, "height": 38 } - }, - "left lower leg": { - "left-lower-leg": { "x": 24.55, "y": -1.92, "rotation": 105.75, "width": 49, "height": 64 } - }, - "left shoulder": { - "left-shoulder": { "x": 23.74, "y": 0.11, "rotation": 62.01, "width": 34, "height": 53 } - }, - "left upper leg": { - "left-upper-leg": { "x": 26.12, "y": -1.85, "rotation": 89.09, "width": 33, "height": 67 } - }, - "neck": { - "neck": { "x": 9.42, "y": -3.66, "rotation": -100.15, "width": 34, "height": 28 } - }, - "pelvis": { - "pelvis": { "x": -4.83, "y": 10.62, "width": 63, "height": 47 } - }, - "right arm": { - "right-arm": { "x": 18.34, "y": -2.64, "rotation": 94.32, "width": 21, "height": 45 } - }, - "right foot": { - "right-foot": { "x": 19.02, "y": 8.47, "rotation": 1.52, "width": 67, "height": 30 } - }, - "right hand": { - "right-hand": { "x": 6.82, "y": 1.25, "rotation": 91.96, "width": 32, "height": 32 } - }, - "right lower leg": { - "right-lower-leg": { "x": 23.28, "y": -2.59, "rotation": 111.83, "width": 51, "height": 64 } - }, - "right shoulder": { - "right-shoulder": { "x": 25.86, "y": 0.03, "rotation": 134.44, "width": 52, "height": 51 } - }, - "right upper leg": { - "right-upper-leg": { "x": 23.03, "y": 0.25, "rotation": 101.13, "width": 44, "height": 70 } - }, - "torso": { - "torso": { "x": 44.57, "y": -7.08, "rotation": -94.95, "width": 68, "height": 92 } - } - } -}, -"events": { - "behind": {}, - "headAttach": {}, - "headPop": {} -}, -"animations": { - "drawOrder": { - "bones": { - "head": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4827, "angle": -23.11 }, - { "time": 0.8965, "angle": -56.45 }, - { "time": 1.3103, "angle": 1.38 }, - { "time": 1.7931, "angle": 36.12 }, - { "time": 2.1379, "angle": 1.24 }, - { "time": 2.6206, "angle": -37.12 }, - { "time": 2.9666, "angle": 2.07 }, - { "time": 3.4666, "angle": 34.72 }, - { "time": 3.9, "angle": 359.99 } - ], - "translate": [ - { - "time": 0, - "x": 0, - "y": 0, - "curve": [ 0.19, 0.4, 0.586, 0.75 ] - }, - { - "time": 0.2758, - "x": 57.88, - "y": -35.72, - "curve": [ 0.39, 0.54, 0.632, 0.72 ] - }, - { - "time": 0.4827, - "x": 87.26, - "y": -87.89, - "curve": [ 0.325, 0.23, 0.587, 0.36 ] - }, - { - "time": 0.6896, - "x": 28.89, - "y": -114.62, - "curve": [ 0.383, 0.23, 0.736, 0.55 ] - }, - { - "time": 0.8965, - "x": -76.58, - "y": -124.98, - "curve": [ 0.129, 0.21, 0.547, 0.64 ] - }, - { - "time": 1.1034, - "x": -154.37, - "y": -77.13, - "curve": [ 0.354, 0.48, 0.729, 0.9 ] - }, - { - "time": 1.3103, - "x": -181.02, - "y": 18.56, - "curve": [ 0.063, 0.15, 0.52, 0.62 ] - }, - { - "time": 1.5862, - "x": -150.38, - "y": 128.67, - "curve": [ 0.381, 0.54, 0.778, 1 ] - }, - { - "time": 1.7931, - "x": -112.08, - "y": 146.28, - "curve": [ 0.242, 0, 0.626, 0.45 ] - }, - { - "time": 1.931, - "x": -63.7, - "y": 111.22, - "curve": [ 0.398, 0.35, 0.786, 0.76 ] - }, - { - "time": 2.1379, - "x": -48.94, - "y": -1.55, - "curve": [ 0.188, 0.21, 0.575, 0.61 ] - }, - { - "time": 2.3448, - "x": -91.69, - "y": -91.93, - "curve": [ 0.362, 0.51, 0.766, 1 ] - }, - { - "time": 2.6206, - "x": -142.79, - "y": -126.83, - "curve": [ 0.227, 0.34, 0.593, 0.75 ] - }, - { - "time": 2.7586, - "x": -176.7, - "y": -98.32, - "curve": [ 0.26, 0.4, 0.612, 0.71 ] - }, - { - "time": 2.8965, - "x": -163.95, - "y": -24.04, - "curve": [ 0.338, 0.37, 0.676, 0.71 ] - }, - { - "time": 2.9655, - "x": -150.17, - "y": 10.71, - "curve": [ 0.387, 0.61, 0.741, 1 ] - }, - { - "time": 3.1034, - "x": -102.44, - "y": 45.92, - "curve": [ 0.31, 0.24, 0.648, 0.58 ] - }, - { - "time": 3.2413, - "x": -53.99, - "y": 70.39, - "curve": [ 0.325, 0.29, 0.663, 0.63 ] - }, - { - "time": 3.3793, - "x": 1.88, - "y": 55.54, - "curve": [ 0.387, 0.33, 0.769, 0.73 ] - }, - { - "time": 3.5862, - "x": 34.26, - "y": 36.13, - "curve": [ 0.206, 0.28, 0.596, 0.67 ] - }, - { - "time": 3.7931, - "x": 23.94, - "y": 1.01, - "curve": [ 0.373, 0.56, 0.759, 1 ] - }, - { "time": 4, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0.8275, "x": 1, "y": 1 }, - { "time": 1.3103, "x": 0.742, "y": 0.742 }, - { "time": 1.7931, "x": 1, "y": 1 }, - { "time": 2.1379, "x": 1.502, "y": 1.502 }, - { "time": 2.6206, "x": 1, "y": 1 }, - { "time": 2.9655, "x": 0.707, "y": 0.707 }, - { "time": 3.3793, "x": 1, "y": 1 } - ] - } - }, - "events": [ - { "time": 0, "name": "headPop", "string": "pop.wav" }, - { "time": 1.3103, "name": "behind" }, - { "time": 2.9655, "name": "behind" }, - { "time": 4, "name": "headAttach", "string": "attach.wav" } - ], - "draworder": [ - { - "time": 0.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { - "time": 1.7931, - "offsets": [ - { "slot": "head", "offset": 3 }, - { "slot": "eyes", "offset": 3 } - ] - }, - { - "time": 2.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { "time": 3.5862 } - ] - }, - "jump": { - "bones": { - "hip": { - "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 0.9333, "angle": 0, "curve": "stepped" }, - { "time": 1.3666, "angle": 0 } - ], - "translate": [ - { "time": 0, "x": -11.57, "y": -3 }, - { "time": 0.2333, "x": -16.2, "y": -19.43 }, - { - "time": 0.3333, - "x": 7.66, - "y": -8.48, - "curve": [ 0.057, 0.06, 0.712, 1 ] - }, - { "time": 0.3666, "x": 15.38, "y": 5.01 }, - { "time": 0.4666, "x": -7.84, "y": 57.22 }, - { - "time": 0.6, - "x": -10.81, - "y": 96.34, - "curve": [ 0.241, 0, 1, 1 ] - }, - { "time": 0.7333, "x": -7.01, "y": 54.7 }, - { "time": 0.8, "x": -10.58, "y": 32.2 }, - { "time": 0.9333, "x": -31.99, "y": 0.45 }, - { "time": 1.0666, "x": -12.48, "y": -29.47 }, - { "time": 1.3666, "x": -11.57, "y": -3 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left upper leg": { - "rotate": [ - { "time": 0, "angle": 17.13 }, - { "time": 0.2333, "angle": 44.35 }, - { "time": 0.3333, "angle": 16.46 }, - { "time": 0.4, "angle": -9.88 }, - { "time": 0.4666, "angle": -11.42 }, - { "time": 0.5666, "angle": 23.46 }, - { "time": 0.7666, "angle": 71.82 }, - { "time": 0.9333, "angle": 65.53 }, - { "time": 1.0666, "angle": 51.01 }, - { "time": 1.3666, "angle": 17.13 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 0.9333, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 1.3666, "x": -3, "y": -2.25 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -16.25 }, - { "time": 0.2333, "angle": -52.21 }, - { "time": 0.4, "angle": 15.04 }, - { "time": 0.4666, "angle": -8.95 }, - { "time": 0.5666, "angle": -39.53 }, - { "time": 0.7666, "angle": -27.27 }, - { "time": 0.9333, "angle": -3.52 }, - { "time": 1.0666, "angle": -61.92 }, - { "time": 1.3666, "angle": -16.25 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": 0.33 }, - { "time": 0.2333, "angle": 6.2 }, - { "time": 0.3333, "angle": 14.73 }, - { "time": 0.4, "angle": -15.54 }, - { "time": 0.4333, "angle": -21.2 }, - { "time": 0.5666, "angle": -7.55 }, - { "time": 0.7666, "angle": -0.67 }, - { "time": 0.9333, "angle": -0.58 }, - { "time": 1.0666, "angle": 14.64 }, - { "time": 1.3666, "angle": 0.33 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 25.97 }, - { "time": 0.2333, "angle": 46.43 }, - { "time": 0.3333, "angle": 22.61 }, - { "time": 0.4, "angle": 2.13 }, - { - "time": 0.4666, - "angle": 0.04, - "curve": [ 0, 0, 0.637, 0.98 ] - }, - { "time": 0.6, "angle": 65.55 }, - { "time": 0.7666, "angle": 64.93 }, - { "time": 0.9333, "angle": 41.08 }, - { "time": 1.0666, "angle": 66.25 }, - { "time": 1.3666, "angle": 25.97 } - ], - "translate": [ - { "time": 0, "x": 5.74, "y": 0.61 }, - { "time": 0.2333, "x": 4.79, "y": 1.79 }, - { "time": 0.3333, "x": 6.05, "y": -4.55 }, - { "time": 0.9333, "x": 4.79, "y": 1.79, "curve": "stepped" }, - { "time": 1.0666, "x": 4.79, "y": 1.79 }, - { "time": 1.3666, "x": 5.74, "y": 0.61 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -27.46 }, - { "time": 0.2333, "angle": -64.03 }, - { "time": 0.4, "angle": -48.36 }, - { "time": 0.5666, "angle": -76.86 }, - { "time": 0.7666, "angle": -26.89 }, - { "time": 0.9, "angle": -18.97 }, - { "time": 0.9333, "angle": -14.18 }, - { "time": 1.0666, "angle": -80.45 }, - { "time": 1.3666, "angle": -27.46 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": 1.08 }, - { "time": 0.2333, "angle": 16.02 }, - { "time": 0.3, "angle": 12.94 }, - { "time": 0.3333, "angle": 15.16 }, - { "time": 0.4, "angle": -14.7 }, - { "time": 0.4333, "angle": -12.85 }, - { "time": 0.4666, "angle": -19.18 }, - { "time": 0.5666, "angle": -15.82 }, - { "time": 0.6, "angle": -3.59 }, - { "time": 0.7666, "angle": -3.56 }, - { "time": 0.9333, "angle": 1.86 }, - { "time": 1.0666, "angle": 16.02 }, - { "time": 1.3666, "angle": 1.08 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -13.35 }, - { "time": 0.2333, "angle": -48.95 }, - { "time": 0.4333, "angle": -35.77 }, - { "time": 0.6, "angle": -4.59 }, - { "time": 0.7666, "angle": 14.61 }, - { "time": 0.9333, "angle": 15.74 }, - { "time": 1.0666, "angle": -32.44 }, - { "time": 1.3666, "angle": -13.35 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 0.9333, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 1.3666, "x": -3.67, "y": 1.68 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 12.78 }, - { "time": 0.2333, "angle": 16.46 }, - { "time": 0.4, "angle": 26.49 }, - { "time": 0.6, "angle": 15.51 }, - { "time": 0.7666, "angle": 1.34 }, - { "time": 0.9333, "angle": 2.35 }, - { "time": 1.0666, "angle": 6.08 }, - { "time": 1.3, "angle": 21.23 }, - { "time": 1.3666, "angle": 12.78 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "head": { - "rotate": [ - { "time": 0, "angle": 5.19 }, - { "time": 0.2333, "angle": 20.27 }, - { "time": 0.4, "angle": 15.27 }, - { "time": 0.6, "angle": -24.69 }, - { "time": 0.7666, "angle": -11.02 }, - { "time": 0.9333, "angle": -24.38 }, - { "time": 1.0666, "angle": 11.99 }, - { "time": 1.3, "angle": 4.86 }, - { "time": 1.3666, "angle": 5.19 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left shoulder": { - "rotate": [ - { - "time": 0, - "angle": 0.05, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": 279.66, - "curve": [ 0.218, 0.67, 0.66, 0.99 ] - }, - { - "time": 0.5, - "angle": 62.27, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": 28.91 }, - { "time": 1.0666, "angle": -8.62 }, - { "time": 1.1666, "angle": -18.43 }, - { "time": 1.3666, "angle": 0.05 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 0.9333, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 1.3666, "x": -1.76, "y": 0.56 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left hand": { - "rotate": [ - { "time": 0, "angle": 11.58, "curve": "stepped" }, - { "time": 0.9333, "angle": 11.58, "curve": "stepped" }, - { "time": 1.3666, "angle": 11.58 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": 0.51 }, - { "time": 0.4333, "angle": 12.82 }, - { "time": 0.6, "angle": 47.55 }, - { "time": 0.9333, "angle": 12.82 }, - { "time": 1.1666, "angle": -6.5 }, - { "time": 1.3666, "angle": 0.51 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 43.82, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": -8.74, - "curve": [ 0.304, 0.58, 0.709, 0.97 ] - }, - { - "time": 0.5333, - "angle": -208.02, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": -246.72 }, - { "time": 1.0666, "angle": -307.13 }, - { "time": 1.1666, "angle": 37.15 }, - { "time": 1.3666, "angle": 43.82 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 0.9333, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 1.3666, "x": -7.84, "y": 7.19 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right arm": { - "rotate": [ - { "time": 0, "angle": -4.02 }, - { "time": 0.6, "angle": 17.5 }, - { "time": 0.9333, "angle": -4.02 }, - { "time": 1.1666, "angle": -16.72 }, - { "time": 1.3666, "angle": -4.02 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92, "curve": "stepped" }, - { "time": 0.9333, "angle": 22.92, "curve": "stepped" }, - { "time": 1.3666, "angle": 22.92 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "root": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4333, "angle": -14.52 }, - { "time": 0.8, "angle": 9.86 }, - { "time": 1.3666, "angle": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - } - } - }, - "walk": { - "bones": { - "left upper leg": { - "rotate": [ - { "time": 0, "angle": -26.55 }, - { "time": 0.1333, "angle": -8.78 }, - { "time": 0.2666, "angle": 9.51 }, - { "time": 0.4, "angle": 30.74 }, - { "time": 0.5333, "angle": 25.33 }, - { "time": 0.6666, "angle": 26.11 }, - { "time": 0.8, "angle": -7.7 }, - { "time": 0.9333, "angle": -21.19 }, - { "time": 1.0666, "angle": -26.55 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25 }, - { "time": 0.4, "x": -2.18, "y": -2.25 }, - { "time": 1.0666, "x": -3, "y": -2.25 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 42.45 }, - { "time": 0.1333, "angle": 52.1 }, - { "time": 0.2666, "angle": 5.96 }, - { "time": 0.5333, "angle": -16.93 }, - { "time": 0.6666, "angle": 1.89 }, - { - "time": 0.8, - "angle": 28.06, - "curve": [ 0.462, 0.11, 1, 1 ] - }, - { - "time": 0.9333, - "angle": 58.68, - "curve": [ 0.5, 0.02, 1, 1 ] - }, - { "time": 1.0666, "angle": 42.45 } - ], - "translate": [ - { "time": 0, "x": 8.11, "y": -2.36 }, - { "time": 0.1333, "x": 10.03, "y": -2.56 }, - { "time": 0.4, "x": 2.76, "y": -2.97 }, - { "time": 0.5333, "x": 2.76, "y": -2.81 }, - { "time": 0.9333, "x": 8.67, "y": -2.54 }, - { "time": 1.0666, "x": 8.11, "y": -2.36 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -10.21 }, - { "time": 0.1333, "angle": -55.64 }, - { "time": 0.2666, "angle": -68.12 }, - { "time": 0.5333, "angle": 5.11 }, - { "time": 0.6666, "angle": -28.29 }, - { "time": 0.8, "angle": 4.08 }, - { "time": 0.9333, "angle": 3.53 }, - { "time": 1.0666, "angle": -10.21 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": -3.69 }, - { "time": 0.1333, "angle": -10.42 }, - { "time": 0.2666, "angle": -17.14 }, - { "time": 0.4, "angle": -2.83 }, - { "time": 0.5333, "angle": -3.87 }, - { "time": 0.6666, "angle": 2.78 }, - { "time": 0.8, "angle": 1.68 }, - { "time": 0.9333, "angle": -8.54 }, - { "time": 1.0666, "angle": -3.69 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 20.89, - "curve": [ 0.264, 0, 0.75, 1 ] - }, - { - "time": 0.1333, - "angle": 3.72, - "curve": [ 0.272, 0, 0.841, 1 ] - }, - { "time": 0.6666, "angle": -278.28 }, - { "time": 1.0666, "angle": 20.89 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19 }, - { "time": 0.1333, "x": -6.36, "y": 6.42 }, - { "time": 0.6666, "x": -11.07, "y": 5.25 }, - { "time": 1.0666, "x": -7.84, "y": 7.19 } - ] - }, - "right arm": { - "rotate": [ - { - "time": 0, - "angle": -4.02, - "curve": [ 0.267, 0, 0.804, 0.99 ] - }, - { - "time": 0.1333, - "angle": -13.99, - "curve": [ 0.341, 0, 1, 1 ] - }, - { - "time": 0.6666, - "angle": 36.54, - "curve": [ 0.307, 0, 0.787, 0.99 ] - }, - { "time": 1.0666, "angle": -4.02 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92 }, - { "time": 0.4, "angle": -8.97 }, - { "time": 0.6666, "angle": 0.51 }, - { "time": 1.0666, "angle": 22.92 } - ] - }, - "left shoulder": { - "rotate": [ - { "time": 0, "angle": -1.47 }, - { "time": 0.1333, "angle": 13.6 }, - { "time": 0.6666, "angle": 280.74 }, - { "time": 1.0666, "angle": -1.47 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56 }, - { "time": 0.6666, "x": -2.47, "y": 8.14 }, - { "time": 1.0666, "x": -1.76, "y": 0.56 } - ] - }, - "left hand": { - "rotate": [ - { - "time": 0, - "angle": 11.58, - "curve": [ 0.169, 0.37, 0.632, 1.55 ] - }, - { - "time": 0.1333, - "angle": 28.13, - "curve": [ 0.692, 0, 0.692, 0.99 ] - }, - { - "time": 0.6666, - "angle": -27.42, - "curve": [ 0.117, 0.41, 0.738, 1.76 ] - }, - { "time": 0.8, "angle": -36.32 }, - { "time": 1.0666, "angle": 11.58 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": -8.27 }, - { "time": 0.1333, "angle": 18.43 }, - { "time": 0.6666, "angle": 0.88 }, - { "time": 1.0666, "angle": -8.27 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -10.28 }, - { - "time": 0.1333, - "angle": -15.38, - "curve": [ 0.545, 0, 1, 1 ] - }, - { - "time": 0.4, - "angle": -9.78, - "curve": [ 0.58, 0.17, 1, 1 ] - }, - { "time": 0.6666, "angle": -15.75 }, - { "time": 0.9333, "angle": -7.06 }, - { "time": 1.0666, "angle": -10.28 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68 }, - { "time": 0.1333, "x": -3.67, "y": 0.68 }, - { "time": 0.4, "x": -3.67, "y": 1.97 }, - { "time": 0.6666, "x": -3.67, "y": -0.14 }, - { "time": 1.0666, "x": -3.67, "y": 1.68 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": -5.25 }, - { "time": 0.2666, "angle": -4.08 }, - { "time": 0.4, "angle": -6.45 }, - { "time": 0.5333, "angle": -5.39 }, - { "time": 0.8, "angle": -11.68 }, - { "time": 0.9333, "angle": 0.46 }, - { "time": 1.0666, "angle": -5.25 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -3.39 }, - { "time": 0.1333, "angle": -45.53 }, - { "time": 0.2666, "angle": -2.59 }, - { "time": 0.5333, "angle": -19.53 }, - { "time": 0.6666, "angle": -64.8 }, - { - "time": 0.8, - "angle": -82.56, - "curve": [ 0.557, 0.18, 1, 1 ] - }, - { "time": 1.0666, "angle": -3.39 } - ] - }, - "hip": { - "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 1.0666, "angle": 0 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0 }, - { - "time": 0.1333, - "x": 0, - "y": -7.61, - "curve": [ 0.272, 0.86, 1, 1 ] - }, - { "time": 0.4, "x": 0, "y": 8.7 }, - { "time": 0.5333, "x": 0, "y": -0.41 }, - { - "time": 0.6666, - "x": 0, - "y": -7.05, - "curve": [ 0.235, 0.89, 1, 1 ] - }, - { "time": 0.8, "x": 0, "y": 2.92 }, - { "time": 0.9333, "x": 0, "y": 6.78 }, - { "time": 1.0666, "x": 0, "y": 0 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 3.6 }, - { "time": 0.1333, "angle": 17.49 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { "time": 0.5333, "angle": 5.17 }, - { "time": 0.6666, "angle": 18.36 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } - ] - }, - "head": { - "rotate": [ - { - "time": 0, - "angle": 3.6, - "curve": [ 0, 0, 0.704, 1.61 ] - }, - { "time": 0.1666, "angle": -0.2 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { - "time": 0.5333, - "angle": 5.17, - "curve": [ 0, 0, 0.704, 1.61 ] - }, - { "time": 0.7, "angle": 1.1 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } - ] - } - } - } -} -} \ No newline at end of file +{"skeleton":{"hash":"K7WPVqF4PZ8L4jRHQe10IDN6xJI","spine":"2.1.03","width":470.64,"height":731.52},"bones":[{"name":"hip","y":247.47},{"name":"front_thigh","parent":"hip","length":74.8,"x":-17.45,"y":-11.64,"rotation":-95.51},{"name":"rear_thigh","parent":"hip","length":85.71,"x":8.91,"y":-5.62,"rotation":-72.54},{"name":"torso","parent":"hip","length":127.55,"x":-1.61,"y":4.9,"rotation":103.82},{"name":"front_shin","parent":"front_thigh","length":128.76,"x":78.69,"y":1.6,"rotation":-2.21,"inheritScale":false},{"name":"front_upper_arm","parent":"torso","length":69.45,"x":103.75,"y":19.32,"rotation":168.37},{"name":"neck","parent":"torso","length":25.45,"x":127.49,"y":-0.3,"rotation":-31.53},{"name":"rear_shin","parent":"rear_thigh","length":121.87,"x":86.1,"y":-1.32,"rotation":-19.83},{"name":"rear_upper_arm","parent":"torso","length":51.93,"x":92.35,"y":-19.22,"rotation":-169.55},{"name":"front_bracer","parent":"front_upper_arm","length":40.57,"x":68.8,"y":-0.68,"rotation":18.29},{"name":"front_foot","parent":"front_shin","length":91.34,"x":128.75,"y":-0.33,"rotation":77.9},{"name":"head","parent":"neck","length":263.57,"x":27.66,"y":-0.25,"rotation":23.18},{"name":"rear_bracer","parent":"rear_upper_arm","length":34.55,"x":51.35,"rotation":23.15},{"name":"rear_foot","parent":"rear_shin","length":82.57,"x":121.45,"y":-0.75,"rotation":69.3},{"name":"front_fist","parent":"front_bracer","length":65.38,"x":40.56,"y":0.19,"rotation":12.43},{"name":"gun","parent":"rear_bracer","length":43.1,"x":34.42,"y":-0.45,"rotation":5.34},{"name":"gunTip","parent":"gun","x":201.04,"y":52.13,"rotation":6.83}],"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","additive":true},{"name":"head-bb","bone":"head"},{"name":"headbb","bone":"head","attachment":"headbb"}],"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","vertices":[-19.143097,-70.30209,40.80313,-118.074234,257.77155,-115.61827,285.16193,57.18005,120.77191,164.95125,-5.067627,76.94907]}},"headbb":{"headbb":{"type":"boundingbox","vertices":[-12.554413,-54.026264,23.48825,-101.27528,231.95355,-109.845566,274.80518,49.916832,181.1228,122.143875,83.208466,133.12569,2.8721924,56.44203]}},"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":{"attachment":[{"time":0.1333,"name":"muzzle"},{"time":0.2666,"name":null}],"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"}]}},"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-corona/examples/spineboy.lua b/spine-corona/examples/spineboy/spineboy.lua similarity index 92% rename from spine-corona/examples/spineboy.lua rename to spine-corona/examples/spineboy/spineboy.lua index 2df365143..f8bf7f221 100644 --- a/spine-corona/examples/spineboy.lua +++ b/spine-corona/examples/spineboy/spineboy.lua @@ -4,7 +4,7 @@ local spine = require "spine-corona.spine" local json = spine.SkeletonJson.new() -json.scale = 1 +json.scale = 0.6 local skeletonData = json:readSkeletonDataFile("examples/spineboy/spineboy.json") local skeleton = spine.Skeleton.new(skeletonData) @@ -25,13 +25,14 @@ local bounds = spine.SkeletonBounds.new() -- AnimationStateData defines crossfade durations between animations. local stateData = spine.AnimationStateData.new(skeletonData) stateData:setMix("walk", "jump", 0.2) -stateData:setMix("jump", "walk", 0.4) +stateData:setMix("jump", "run", 0.2) -- AnimationState has a queue of animations and can apply them with crossfading. local state = spine.AnimationState.new(stateData) -state:setAnimationByName(0, "drawOrder") -state:addAnimationByName(0, "jump", false, 0) -state:addAnimationByName(0, "walk", true, 0) +-- state:setAnimationByName(0, "test") +state:setAnimationByName(0, "walk", true) +state:addAnimationByName(0, "jump", false, 3) +state:addAnimationByName(0, "run", true, 0) state.onStart = function (trackIndex) print(trackIndex.." start: "..state:getCurrent(trackIndex).animation.name) diff --git a/spine-corona/main.lua b/spine-corona/main.lua index 0672c2682..e279f778e 100644 --- a/spine-corona/main.lua +++ b/spine-corona/main.lua @@ -1,4 +1,5 @@ -require "examples.spineboy" --- require "examples.goblins" --- require "examples.dragon" +require "examples.spineboy.spineboy" +-- require "examples.goblins.goblins" +-- require "examples.dragon.dragon" +-- require "examples.hero.hero" diff --git a/spine-corona/spine-corona/spine.lua b/spine-corona/spine-corona/spine.lua index da29acaa5..9231f6f50 100644 --- a/spine-corona/spine-corona/spine.lua +++ b/spine-corona/spine-corona/spine.lua @@ -35,6 +35,7 @@ spine.SkeletonJson = require "spine-lua.SkeletonJson" spine.SkeletonData = require "spine-lua.SkeletonData" spine.BoneData = require "spine-lua.BoneData" spine.SlotData = require "spine-lua.SlotData" +spine.IkConstraintData = require "spine-lua.IkConstraintData" spine.Skin = require "spine-lua.Skin" spine.RegionAttachment = require "spine-lua.RegionAttachment" spine.MeshAttachment = require "spine-lua.MeshAttachment" @@ -42,6 +43,7 @@ spine.SkinnedMeshAttachment = require "spine-lua.SkinnedMeshAttachment" spine.Skeleton = require "spine-lua.Skeleton" spine.Bone = require "spine-lua.Bone" spine.Slot = require "spine-lua.Slot" +spine.IkConstraint = require "spine-lua.IkConstraint" spine.AttachmentType = require "spine-lua.AttachmentType" spine.AttachmentLoader = require "spine-lua.AttachmentLoader" spine.Animation = require "spine-lua.Animation" @@ -128,10 +130,11 @@ function spine.Skeleton.new (skeletonData, group) end -- Position image based on attachment and bone. if image ~= spine.Skeleton.failed then - local flipX, flipY = ((self.flipX and -1) or 1), ((self.flipY and -1) or 1) + local bone = slot.bone + local flipX, flipY = ((bone.worldFlipX and -1) or 1), ((bone.worldFlipY and -1) or 1) - local x = slot.bone.worldX + attachment.x * slot.bone.m00 + attachment.y * slot.bone.m01 - local y = -(slot.bone.worldY + attachment.x * slot.bone.m10 + attachment.y * slot.bone.m11) + local x = bone.worldX + attachment.x * bone.m00 + attachment.y * bone.m01 + local y = -(bone.worldY + attachment.x * bone.m10 + attachment.y * bone.m11) if not image.lastX then image.x, image.y = x, y image.lastX, image.lastY = x, y @@ -145,16 +148,16 @@ function spine.Skeleton.new (skeletonData, group) -- Fix scaling when attachment is rotated 90 or -90. local rotation = math.abs(attachment.rotation) % 180 if (rotation == 90) then - xScale = xScale * slot.bone.worldScaleY - yScale = yScale * slot.bone.worldScaleX + xScale = xScale * bone.worldScaleY + yScale = yScale * bone.worldScaleX else - xScale = xScale * slot.bone.worldScaleX - yScale = yScale * slot.bone.worldScaleY + xScale = xScale * bone.worldScaleX + yScale = yScale * bone.worldScaleY if rotation ~= 0 and xScale ~= yScale and not image.rotationWarning then image.rotationWarning = true print("WARNING: Non-uniform bone scaling with attachments not rotated to\n" .." cardinal angles will not work as expected with Corona.\n" - .." Bone: "..slot.bone.data.name..", slot: "..slot.data.name..", attachment: "..attachment.name) + .." Bone: "..bone.data.name..", slot: "..slot.data.name..", attachment: "..attachment.name) end end if not image.lastScaleX then @@ -165,7 +168,7 @@ function spine.Skeleton.new (skeletonData, group) image.lastScaleX, image.lastScaleY = xScale, yScale end - rotation = -(slot.bone.worldRotation + attachment.rotation) * flipX * flipY + rotation = -(bone.worldRotation + attachment.rotation) * flipX * flipY if not image.lastRotation then image.rotation = rotation image.lastRotation = rotation @@ -199,13 +202,13 @@ function spine.Skeleton.new (skeletonData, group) bone.line.x = bone.worldX bone.line.y = -bone.worldY bone.line.rotation = -bone.worldRotation - if self.flipX then + if bone.worldFlipX then bone.line.xScale = -1 bone.line.rotation = -bone.line.rotation else bone.line.xScale = 1 end - if self.flipY then + if bone.worldFlipY then bone.line.yScale = -1 bone.line.rotation = -bone.line.rotation else diff --git a/spine-csharp/spine-csharp.csproj b/spine-csharp/spine-csharp.csproj index 1f7dc948a..9cbdb5373 100644 --- a/spine-csharp/spine-csharp.csproj +++ b/spine-csharp/spine-csharp.csproj @@ -69,6 +69,8 @@ + + diff --git a/spine-csharp/src/Animation.cs b/spine-csharp/src/Animation.cs index cb824f0df..0cb0a4eaf 100644 --- a/spine-csharp/src/Animation.cs +++ b/spine-csharp/src/Animation.cs @@ -216,7 +216,7 @@ namespace Spine { public RotateTimeline (int frameCount) : base(frameCount) { - frames = new float[frameCount * 2]; + frames = new float[frameCount << 1]; } /// Sets the time and value of the specified keyframe. @@ -443,7 +443,7 @@ namespace Spine { } else if (lastTime > time) // lastTime = -1; - int frameIndex = time >= frames[frames.Length - 1] ? frames.Length - 1 : Animation.binarySearch(frames, time) - 1; + int frameIndex = (time >= frames[frames.Length - 1] ? frames.Length : Animation.binarySearch(frames, time)) - 1; if (frames[frameIndex] < lastTime) return; String attachmentName = attachmentNames[frameIndex]; @@ -571,27 +571,26 @@ namespace Spine { if (slot.attachment != attachment) return; float[] frames = this.frames; - if (time < frames[0]) { - slot.attachmentVerticesCount = 0; - return; // Time is before first frame. - } + if (time < frames[0]) return; // Time is before first frame. float[][] frameVertices = this.frameVertices; int vertexCount = frameVertices[0].Length; float[] vertices = slot.attachmentVertices; - if (vertices.Length != vertexCount) alpha = 1; if (vertices.Length < vertexCount) { vertices = new float[vertexCount]; slot.attachmentVertices = vertices; - } + } else if (vertices.Length > vertexCount) + alpha = 1; // Don't mix from uninitialized slot vertices. slot.attachmentVerticesCount = vertexCount; if (time >= frames[frames.Length - 1]) { // Time is after last frame. float[] lastVertices = frameVertices[frames.Length - 1]; if (alpha < 1) { - for (int i = 0; i < vertexCount; i++) - vertices[i] += (lastVertices[i] - vertices[i]) * alpha; + for (int i = 0; i < vertexCount; i++) { + float vertex = vertices[i]; + vertices[i] = vertex + (lastVertices[i] - vertex) * alpha; + } } else Array.Copy(lastVertices, 0, vertices, 0, vertexCount); return; @@ -609,7 +608,8 @@ namespace Spine { if (alpha < 1) { for (int i = 0; i < vertexCount; i++) { float prev = prevVertices[i]; - vertices[i] += (prev + (nextVertices[i] - prev) * percent - vertices[i]) * alpha; + float vertex = vertices[i]; + vertices[i] = vertex + (prev + (nextVertices[i] - prev) * percent - vertex) * alpha; } } else { for (int i = 0; i < vertexCount; i++) { @@ -637,10 +637,6 @@ namespace Spine { frames = new float[frameCount * 3]; } - public float[] getFrames () { - return frames; - } - /** Sets the time, mix and bend direction of the specified keyframe. */ public void setFrame (int frameIndex, float time, float mix, int bendDirection) { frameIndex *= 3; @@ -673,4 +669,52 @@ namespace Spine { ikConstraint.bendDirection = (int)frames[frameIndex + PREV_FRAME_BEND_DIRECTION]; } } + + public class FlipXTimeline : Timeline { + internal int boneIndex; + internal float[] frames; + + public int BoneIndex { get { return boneIndex; } set { boneIndex = value; } } + public float[] Frames { get { return frames; } set { frames = value; } } // time, flip, ... + public int FrameCount { get { return frames.Length >> 1; } } + + public FlipXTimeline (int frameCount) { + frames = new float[frameCount << 1]; + } + + /// Sets the time and value of the specified keyframe. + public void SetFrame (int frameIndex, float time, bool flip) { + frameIndex *= 2; + frames[frameIndex] = time; + frames[frameIndex + 1] = flip ? 1 : 0; + } + + public void Apply (Skeleton skeleton, float lastTime, float time, List firedEvents, float alpha) { + float[] frames = this.frames; + if (time < frames[0]) { + if (lastTime > time) Apply(skeleton, lastTime, int.MaxValue, null, 0); + return; + } else if (lastTime > time) // + lastTime = -1; + + int frameIndex = (time >= frames[frames.Length - 2] ? frames.Length : Animation.binarySearch(frames, time, 2)) - 2; + if (frames[frameIndex] < lastTime) return; + + SetFlip(skeleton.bones[boneIndex], frames[frameIndex + 1] != 0); + } + + virtual protected void SetFlip (Bone bone, bool flip) { + bone.flipX = flip; + } + } + + public class FlipYTimeline : FlipXTimeline { + public FlipYTimeline (int frameCount) + : base(frameCount) { + } + + override protected void SetFlip (Bone bone, bool flip) { + bone.flipY = flip; + } + } } diff --git a/spine-csharp/src/AnimationState.cs b/spine-csharp/src/AnimationState.cs index 91711afc3..3a774b330 100644 --- a/spine-csharp/src/AnimationState.cs +++ b/spine-csharp/src/AnimationState.cs @@ -191,6 +191,7 @@ namespace Spine { /// Set the current animation. Any queued animations are cleared. public TrackEntry SetAnimation (int trackIndex, Animation animation, bool loop) { + if (animation == null) throw new ArgumentException("animation cannot be null."); TrackEntry entry = new TrackEntry(); entry.animation = animation; entry.loop = loop; @@ -209,6 +210,7 @@ namespace Spine { /// Adds an animation to be played delay seconds after the current or last queued animation. /// May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. public TrackEntry AddAnimation (int trackIndex, Animation animation, bool loop, float delay) { + if (animation == null) throw new ArgumentException("animation cannot be null."); TrackEntry entry = new TrackEntry(); entry.animation = animation; entry.loop = loop; diff --git a/spine-csharp/src/Bone.cs b/spine-csharp/src/Bone.cs index fdad97882..86546b2cd 100644 --- a/spine-csharp/src/Bone.cs +++ b/spine-csharp/src/Bone.cs @@ -38,10 +38,12 @@ namespace Spine { internal BoneData data; internal Skeleton skeleton; internal Bone parent; - internal List children; + internal List children = new List(); internal float x, y, rotation, rotationIK, scaleX, scaleY; + internal bool flipX, flipY; internal float m00, m01, m10, m11; internal float worldX, worldY, worldRotation, worldScaleX, worldScaleY; + internal bool worldFlipX, worldFlipY; public BoneData Data { get { return data; } } public Skeleton Skeleton { get { return skeleton; } } @@ -55,6 +57,8 @@ namespace Spine { public float RotationIK { get { return rotationIK; } set { rotationIK = value; } } public float ScaleX { get { return scaleX; } set { scaleX = value; } } public float ScaleY { get { return scaleY; } set { scaleY = value; } } + public bool FlipX { get { return flipX; } set { flipX = value; } } + public bool FlipY { get { return flipY; } set { flipY = value; } } public float M00 { get { return m00; } } public float M01 { get { return m01; } } @@ -65,6 +69,8 @@ namespace Spine { public float WorldRotation { get { return worldRotation; } } public float WorldScaleX { get { return worldScaleX; } } public float WorldScaleY { get { return worldScaleY; } } + public bool WorldFlipX { get { return worldFlipX; } set { worldFlipX = value; } } + public bool WorldFlipY { get { return worldFlipY; } set { worldFlipY = value; } } /// May be null. public Bone (BoneData data, Skeleton skeleton, Bone parent) { @@ -73,14 +79,12 @@ namespace Spine { this.data = data; this.skeleton = skeleton; this.parent = parent; - this.children = new List(); SetToSetupPose(); } /// Computes the world SRT using the parent bone and the local SRT. public void UpdateWorldTransform () { Bone parent = this.parent; - Skeleton skeleton = this.skeleton; float x = this.x, y = this.y; if (parent != null) { worldX = x * parent.m00 + y * parent.m01 + parent.worldX; @@ -93,24 +97,30 @@ namespace Spine { worldScaleY = scaleY; } worldRotation = data.inheritRotation ? parent.worldRotation + rotationIK : rotationIK; + worldFlipX = parent.worldFlipX != flipX; + worldFlipY = parent.worldFlipY != flipY; } else { - worldX = skeleton.flipX ? -x : x; - worldY = skeleton.flipY != yDown ? -y : y; + Skeleton skeleton = this.skeleton; + bool skeletonFlipX = skeleton.flipX, skeletonFlipY = skeleton.flipY; + worldX = skeletonFlipX ? -x : x; + worldY = skeletonFlipY != yDown ? -y : y; worldScaleX = scaleX; worldScaleY = scaleY; worldRotation = rotationIK; + worldFlipX = skeletonFlipX != flipX; + worldFlipY = skeletonFlipY != flipY; } float radians = worldRotation * (float)Math.PI / 180; float cos = (float)Math.Cos(radians); float sin = (float)Math.Sin(radians); - if (skeleton.flipX) { + if (worldFlipX) { m00 = -cos * worldScaleX; m01 = sin * worldScaleY; } else { m00 = cos * worldScaleX; m01 = -sin * worldScaleY; } - if (skeleton.flipY != yDown) { + if (worldFlipY != yDown) { m10 = -sin * worldScaleX; m11 = -cos * worldScaleY; } else { @@ -127,15 +137,16 @@ namespace Spine { rotationIK = rotation; scaleX = data.scaleX; scaleY = data.scaleY; + flipX = data.flipX; + flipY = data.flipY; } public void worldToLocal (float worldX, float worldY, out float localX, out float localY) { float dx = worldX - this.worldX, dy = worldY - this.worldY; float m00 = this.m00, m10 = this.m10, m01 = this.m01, m11 = this.m11; - Skeleton skeleton = this.skeleton; - if (skeleton.flipX != (skeleton.flipY != yDown)) { - m00 *= -1; - m11 *= -1; + if (worldFlipX != (worldFlipY != yDown)) { + m00 = -m00; + m11 = -m11; } float invDet = 1 / (m00 * m11 - m01 * m10); localX = (dx * m00 * invDet - dy * m01 * invDet); diff --git a/spine-csharp/src/BoneData.cs b/spine-csharp/src/BoneData.cs index 5d19b266e..7ab9f7fe9 100644 --- a/spine-csharp/src/BoneData.cs +++ b/spine-csharp/src/BoneData.cs @@ -35,6 +35,7 @@ namespace Spine { internal BoneData parent; internal String name; internal float length, x, y, rotation, scaleX = 1, scaleY = 1; + internal bool flipX, flipY; internal bool inheritScale = true, inheritRotation = true; /// May be null. @@ -46,6 +47,8 @@ namespace Spine { public float Rotation { get { return rotation; } set { rotation = value; } } public float ScaleX { get { return scaleX; } set { scaleX = value; } } public float ScaleY { get { return scaleY; } set { scaleY = value; } } + public bool FlipX { get { return flipX; } set { flipX = value; } } + public bool FlipY { get { return flipY; } set { flipY = value; } } public bool InheritScale { get { return inheritScale; } set { inheritScale = value; } } public bool InheritRotation { get { return inheritRotation; } set { inheritRotation = value; } } diff --git a/spine-csharp/src/IkConstraint.cs b/spine-csharp/src/IkConstraint.cs index 5a6160842..6261e083a 100644 --- a/spine-csharp/src/IkConstraint.cs +++ b/spine-csharp/src/IkConstraint.cs @@ -38,8 +38,8 @@ namespace Spine { internal IkConstraintData data; internal List bones = new List(); internal Bone target; - internal int bendDirection = 1; - internal float mix = 1; + internal int bendDirection; + internal float mix; public IkConstraintData Data { get { return data; } } public List Bones { get { return bones; } } @@ -48,6 +48,8 @@ namespace Spine { public float Mix { get { return mix; } set { mix = value; } } public IkConstraint (IkConstraintData data, Skeleton skeleton) { + if (data == null) throw new ArgumentNullException("data cannot be null."); + if (skeleton == null) throw new ArgumentNullException("skeleton cannot be null."); this.data = data; mix = data.mix; bendDirection = data.bendDirection; diff --git a/spine-csharp/src/Skeleton.cs b/spine-csharp/src/Skeleton.cs index 02aa9653f..0e032dba5 100644 --- a/spine-csharp/src/Skeleton.cs +++ b/spine-csharp/src/Skeleton.cs @@ -37,7 +37,7 @@ namespace Spine { internal List bones; internal List slots; internal List drawOrder; - internal List ikConstraints = new List(); + internal List ikConstraints; private List> boneCache = new List>(); internal Skin skin; internal float r = 1, g = 1, b = 1, a = 1; @@ -74,12 +74,9 @@ namespace Spine { bones = new List(data.bones.Count); foreach (BoneData boneData in data.bones) { Bone parent = boneData.parent == null ? null : bones[data.bones.IndexOf(boneData.parent)]; - bones.Add(new Bone(boneData, this, parent)); - } - - foreach(Bone b in bones){ - if(b.Parent != null) - b.Parent.children.Add(b); + Bone bone = new Bone(boneData, this, parent); + if (parent != null) parent.children.Add(bone); + bones.Add(bone); } slots = new List(data.slots.Count); @@ -233,9 +230,9 @@ namespace Spine { SetSkin(skin); } - /// Sets the skin used to look up attachments not found 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. + /// Sets the skin used to look up attachments before looking in the {@link SkeletonData#getDefaultSkin() default + /// skin}. Attachmentsfrom 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. /// May be null. public void SetSkin (Skin newSkin) { if (newSkin != null) { diff --git a/spine-csharp/src/SkeletonData.cs b/spine-csharp/src/SkeletonData.cs index edc5d648b..48b500363 100644 --- a/spine-csharp/src/SkeletonData.cs +++ b/spine-csharp/src/SkeletonData.cs @@ -136,7 +136,7 @@ namespace Spine { return null; } - // --- IK + // --- IK constraints. /// May be null. public IkConstraintData FindIkConstraint (String ikConstraintName) { diff --git a/spine-csharp/src/SkeletonJson.cs b/spine-csharp/src/SkeletonJson.cs index 8ad08bb6e..77b3d7350 100644 --- a/spine-csharp/src/SkeletonJson.cs +++ b/spine-csharp/src/SkeletonJson.cs @@ -96,9 +96,9 @@ namespace Spine { skeletonData.hash = (String)skeletonMap["hash"]; skeletonData.version = (String)skeletonMap["spine"]; skeletonData.width = GetFloat(skeletonMap, "width", 0); - skeletonData.height = GetFloat(skeletonMap, "width", 1); + skeletonData.height = GetFloat(skeletonMap, "height", 0); } - + // Bones. foreach (Dictionary boneMap in (List)root["bones"]) { BoneData parent = null; @@ -114,6 +114,8 @@ namespace Spine { boneData.rotation = GetFloat(boneMap, "rotation", 0); boneData.scaleX = GetFloat(boneMap, "scaleX", 1); boneData.scaleY = GetFloat(boneMap, "scaleY", 1); + boneData.flipX = GetBoolean(boneMap, "flipX", false); + boneData.flipY = GetBoolean(boneMap, "flipY", false); boneData.inheritScale = GetBoolean(boneMap, "inheritScale", true); boneData.inheritRotation = GetBoolean(boneMap, "inheritRotation", true); skeletonData.bones.Add(boneData); @@ -387,7 +389,7 @@ namespace Spine { foreach (KeyValuePair timelineEntry in timelineMap) { var values = (List)timelineEntry.Value; var timelineName = (String)timelineEntry.Key; - if (timelineName.Equals("color")) { + if (timelineName == "color") { var timeline = new ColorTimeline(values.Count); timeline.slotIndex = slotIndex; @@ -402,7 +404,7 @@ namespace Spine { timelines.Add(timeline); duration = Math.Max(duration, timeline.frames[timeline.FrameCount * 5 - 5]); - } else if (timelineName.Equals("attachment")) { + } else if (timelineName == "attachment") { var timeline = new AttachmentTimeline(values.Count); timeline.slotIndex = slotIndex; @@ -431,7 +433,7 @@ namespace Spine { foreach (KeyValuePair timelineEntry in timelineMap) { var values = (List)timelineEntry.Value; var timelineName = (String)timelineEntry.Key; - if (timelineName.Equals("rotate")) { + if (timelineName == "rotate") { var timeline = new RotateTimeline(values.Count); timeline.boneIndex = boneIndex; @@ -445,10 +447,10 @@ namespace Spine { timelines.Add(timeline); duration = Math.Max(duration, timeline.frames[timeline.FrameCount * 2 - 2]); - } else if (timelineName.Equals("translate") || timelineName.Equals("scale")) { + } else if (timelineName == "translate" || timelineName == "scale") { TranslateTimeline timeline; float timelineScale = 1; - if (timelineName.Equals("scale")) + if (timelineName == "scale") timeline = new ScaleTimeline(values.Count); else { timeline = new TranslateTimeline(values.Count); @@ -468,6 +470,21 @@ namespace Spine { timelines.Add(timeline); duration = Math.Max(duration, timeline.frames[timeline.FrameCount * 3 - 3]); + } else if (timelineName == "flipX" || timelineName == "flipY") { + bool x = timelineName == "flipX"; + var timeline = x ? new FlipXTimeline(values.Count) : new FlipYTimeline(values.Count); + timeline.boneIndex = boneIndex; + + String field = x ? "x" : "y"; + int frameIndex = 0; + foreach (Dictionary valueMap in values) { + float time = (float)valueMap["time"]; + timeline.SetFrame(frameIndex, time, valueMap.ContainsKey(field) ? (bool)valueMap[field] : false); + frameIndex++; + } + timelines.Add(timeline); + duration = Math.Max(duration, timeline.frames[timeline.FrameCount * 2 - 2]); + } else throw new Exception("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); } @@ -550,8 +567,8 @@ namespace Spine { } } - if (map.ContainsKey("draworder")) { - var values = (List)map["draworder"]; + if (map.ContainsKey("drawOrder") || map.ContainsKey("draworder")) { + var values = (List)map[map.ContainsKey("drawOrder") ? "drawOrder" : "draworder"]; var timeline = new DrawOrderTimeline(values.Count); int slotCount = skeletonData.slots.Count; int frameIndex = 0; diff --git a/spine-js/spine.js b/spine-js/spine.js index 22b71d654..d17c546a1 100644 --- a/spine-js/spine.js +++ b/spine-js/spine.js @@ -28,7 +28,11 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -var spine = {}; +var spine = { + radDeg: 180 / Math.PI, + degRad: Math.PI / 180, + temp: [] +}; spine.BoneData = function (name, parent) { this.name = name; @@ -40,7 +44,8 @@ spine.BoneData.prototype = { rotation: 0, scaleX: 1, scaleY: 1, inheritScale: true, - inheritRotation: true + inheritRotation: true, + flipX: false, flipY: false }; spine.SlotData = function (name, boneData) { @@ -53,23 +58,36 @@ spine.SlotData.prototype = { additiveBlending: false }; -spine.Bone = function (boneData, parent) { +spine.IkConstraintData = function (name) { + this.name = name; + this.bones = []; +}; +spine.IkConstraintData.prototype = { + target: null, + bendDirection: 1, + mix: 1 +}; + +spine.Bone = function (boneData, skeleton, parent) { this.data = boneData; + this.skeleton = skeleton; this.parent = parent; this.setToSetupPose(); }; spine.Bone.yDown = false; spine.Bone.prototype = { x: 0, y: 0, - rotation: 0, + rotation: 0, rotationIK: 0, scaleX: 1, scaleY: 1, + flipX: false, flipY: false, m00: 0, m01: 0, worldX: 0, // a b x m10: 0, m11: 0, worldY: 0, // c d y worldRotation: 0, worldScaleX: 1, worldScaleY: 1, - updateWorldTransform: function (flipX, flipY) { + worldFlipX: false, worldFlipY: false, + updateWorldTransform: function () { var parent = this.parent; - if (parent != null) { + if (parent) { this.worldX = this.x * parent.m00 + this.y * parent.m01 + parent.worldX; this.worldY = this.x * parent.m10 + this.y * parent.m11 + parent.worldY; if (this.data.inheritScale) { @@ -79,28 +97,35 @@ spine.Bone.prototype = { this.worldScaleX = this.scaleX; this.worldScaleY = this.scaleY; } - this.worldRotation = this.data.inheritRotation ? parent.worldRotation + this.rotation : this.rotation; + this.worldRotation = this.data.inheritRotation ? (parent.worldRotation + this.rotationIK) : this.rotationIK; + this.worldFlipX = parent.worldFlipX != this.flipX; + this.worldFlipY = parent.worldFlipY != this.flipY; } else { - this.worldX = flipX ? -this.x : this.x; - this.worldY = flipY != spine.Bone.yDown ? -this.y : this.y; + var skeletonFlipX = this.skeleton.flipX, skeletonFlipY = this.skeleton.flipY; + this.worldX = skeletonFlipX ? -this.x : this.x; + this.worldY = (skeletonFlipY != spine.Bone.yDown) ? -this.y : this.y; this.worldScaleX = this.scaleX; this.worldScaleY = this.scaleY; - this.worldRotation = this.rotation; + this.worldRotation = this.rotationIK; + this.worldFlipX = skeletonFlipX != this.flipX; + this.worldFlipY = skeletonFlipY != this.flipY; } - var radians = this.worldRotation * Math.PI / 180; + var radians = this.worldRotation * spine.degRad; var cos = Math.cos(radians); var sin = Math.sin(radians); - this.m00 = cos * this.worldScaleX; - this.m10 = sin * this.worldScaleX; - this.m01 = -sin * this.worldScaleY; - this.m11 = cos * this.worldScaleY; - if (flipX) { - this.m00 = -this.m00; - this.m01 = -this.m01; + if (this.worldFlipX) { + this.m00 = -cos * this.worldScaleX; + this.m01 = sin * this.worldScaleY; + } else { + this.m00 = cos * this.worldScaleX; + this.m01 = -sin * this.worldScaleY; } - if (flipY != spine.Bone.yDown) { - this.m10 = -this.m10; - this.m11 = -this.m11; + if (this.worldFlipY != spine.Bone.yDown) { + this.m10 = -sin * this.worldScaleX; + this.m11 = -cos * this.worldScaleY; + } else { + this.m10 = sin * this.worldScaleX; + this.m11 = cos * this.worldScaleY; } }, setToSetupPose: function () { @@ -108,14 +133,32 @@ spine.Bone.prototype = { this.x = data.x; this.y = data.y; this.rotation = data.rotation; + this.rotationIK = this.rotation; this.scaleX = data.scaleX; this.scaleY = data.scaleY; + this.flipX = data.flipX; + this.flipY = data.flipY; + }, + worldToLocal: function (world) { + var dx = world[0] - this.worldX, dy = world[1] - this.worldY; + var m00 = this.m00, m10 = this.m10, m01 = this.m01, m11 = this.m11; + if (this.worldFlipX != (this.worldFlipY != spine.Bone.yDown)) { + m00 = -m00; + m11 = -m11; + } + var invDet = 1 / (m00 * m11 - m01 * m10); + world[0] = dx * m00 * invDet - dy * m01 * invDet; + world[1] = dy * m11 * invDet - dx * m10 * invDet; + }, + localToWorld: function (local) { + var localX = local[0], localY = local[1]; + local[0] = localX * this.m00 + localY * this.m01 + this.worldX; + local[1] = localX * this.m10 + localY * this.m11 + this.worldY; } }; -spine.Slot = function (slotData, skeleton, bone) { +spine.Slot = function (slotData, bone) { this.data = slotData; - this.skeleton = skeleton; this.bone = bone; this.setToSetupPose(); }; @@ -126,14 +169,14 @@ spine.Slot.prototype = { attachmentVertices: [], setAttachment: function (attachment) { this.attachment = attachment; - this._attachmentTime = this.skeleton.time; + this._attachmentTime = this.bone.skeleton.time; this.attachmentVertices.length = 0; }, setAttachmentTime: function (time) { - this._attachmentTime = this.skeleton.time - time; + this._attachmentTime = this.bone.skeleton.time - time; }, getAttachmentTime: function () { - return this.skeleton.time - this._attachmentTime; + return this.bone.skeleton.time - this._attachmentTime; }, setToSetupPose: function () { var data = this.data; @@ -142,16 +185,112 @@ spine.Slot.prototype = { this.b = data.b; this.a = data.a; - var slotDatas = this.skeleton.data.slots; + var slotDatas = this.bone.skeleton.data.slots; for (var i = 0, n = slotDatas.length; i < n; i++) { if (slotDatas[i] == data) { - this.setAttachment(!data.attachmentName ? null : this.skeleton.getAttachmentBySlotIndex(i, data.attachmentName)); + this.setAttachment(!data.attachmentName ? null : this.bone.skeleton.getAttachmentBySlotIndex(i, data.attachmentName)); break; } } } }; +spine.IkConstraint = function (data, skeleton) { + this.data = data; + this.mix = data.mix; + this.bendDirection = data.bendDirection; + + this.bones = []; + for (var i = 0, n = data.bones.length; i < n; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findBone(data.target.name); +}; +spine.IkConstraint.prototype = { + apply: function () { + var target = this.target; + var bones = this.bones; + switch (bones.length) { + case 1: + spine.IkConstraint.apply1(bones[0], target.worldX, target.worldY, this.mix); + break; + case 2: + spine.IkConstraint.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. */ +spine.IkConstraint.apply1 = function (bone, targetX, targetY, alpha) { + var parentRotation = (!bone.data.inheritRotation || !bone.parent) ? 0 : bone.parent.worldRotation; + var rotation = bone.rotation; + var rotationIK = Math.atan2(targetY - bone.worldY, targetX - bone.worldX) * spine.radDeg - parentRotation; + bone.rotationIK = rotation + (rotationIK - rotation) * alpha; +}; +/** 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 Any descendant bone of the parent. */ +spine.IkConstraint.apply2 = function (parent, child, targetX, targetY, bendDirection, alpha) { + var childRotation = child.rotation, parentRotation = parent.rotation; + if (!alpha) { + child.rotationIK = childRotation; + parent.rotationIK = parentRotation; + return; + } + var positionX, positionY, tempPosition = spine.temp; + var parentParent = parent.parent; + if (parentParent) { + tempPosition[0] = targetX; + tempPosition[1] = targetY; + parentParent.worldToLocal(tempPosition); + targetX = (tempPosition[0] - parent.x) * parentParent.worldScaleX; + targetY = (tempPosition[1] - parent.y) * parentParent.worldScaleY; + } else { + targetX -= parent.x; + targetY -= parent.y; + } + if (child.parent == parent) { + positionX = child.x; + positionY = child.y; + } else { + tempPosition[0] = child.x; + tempPosition[1] = child.y; + child.parent.localToWorld(tempPosition); + parent.worldToLocal(tempPosition); + positionX = tempPosition[0]; + positionY = tempPosition[1]; + } + var childX = positionX * parent.worldScaleX, childY = positionY * parent.worldScaleY; + var offset = Math.atan2(childY, childX); + var len1 = Math.sqrt(childX * childX + childY * childY), len2 = child.data.length * child.worldScaleX; + // Based on code by Ryan Juckett with permission: Copyright (c) 2008-2009 Ryan Juckett, http://www.ryanjuckett.com/ + var cosDenom = 2 * len1 * len2; + if (cosDenom < 0.0001) { + child.rotationIK = childRotation + (Math.atan2(targetY, targetX) * spine.radDeg - parentRotation - childRotation) * alpha; + return; + } + var cos = (targetX * targetX + targetY * targetY - len1 * len1 - len2 * len2) / cosDenom; + if (cos < -1) + cos = -1; + else if (cos > 1) + cos = 1; + var childAngle = Math.acos(cos) * bendDirection; + var adjacent = len1 + len2 * cos, opposite = len2 * Math.sin(childAngle); + var parentAngle = Math.atan2(targetY * adjacent - targetX * opposite, targetX * adjacent + targetY * opposite); + var rotation = (parentAngle - offset) * spine.radDeg - parentRotation; + if (rotation > 180) + rotation -= 360; + else if (rotation < -180) // + rotation += 360; + parent.rotationIK = parentRotation + rotation * alpha; + rotation = (childAngle + offset) * spine.radDeg - childRotation; + if (rotation > 180) + rotation -= 360; + else if (rotation < -180) // + rotation += 360; + child.rotationIK = childRotation + (rotation + parent.worldRotation - child.parent.worldRotation) * alpha; +}; + spine.Skin = function (name) { this.name = name; this.attachments = {}; @@ -202,11 +341,10 @@ spine.Animation.prototype = { timelines[i].apply(skeleton, lastTime, time, events, alpha); } }; - -spine.binarySearch = function (values, target, step) { +spine.Animation.binarySearch = function (values, target, step) { var low = 0; var high = Math.floor(values.length / step) - 2; - if (high == 0) return step; + if (!high) return step; var current = high >>> 1; while (true) { if (values[(current + 1) * step] <= target) @@ -217,69 +355,56 @@ spine.binarySearch = function (values, target, step) { current = (low + high) >>> 1; } }; -spine.linearSearch = function (values, target, step) { +spine.Animation.binarySearch1 = function (values, target) { + var low = 0; + var high = values.length - 2; + if (!high) return 1; + var current = high >>> 1; + while (true) { + if (values[current + 1] <= target) + low = current + 1; + else + high = current; + if (low == high) return low + 1; + current = (low + high) >>> 1; + } +}; +spine.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; }; spine.Curves = function (frameCount) { - this.curves = []; // dfx, dfy, ddfx, ddfy, dddfx, dddfy, ... - this.curves.length = (frameCount - 1) * 6; + this.curves = []; // type, x, y, ... + //this.curves.length = (frameCount - 1) * 19/*BEZIER_SIZE*/; }; spine.Curves.prototype = { setLinear: function (frameIndex) { - this.curves[frameIndex * 6] = 0/*LINEAR*/; + this.curves[frameIndex * 19/*BEZIER_SIZE*/] = 0/*LINEAR*/; }, setStepped: function (frameIndex) { - this.curves[frameIndex * 6] = -1/*STEPPED*/; + this.curves[frameIndex * 19/*BEZIER_SIZE*/] = 1/*STEPPED*/; }, /** 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: function (frameIndex, cx1, cy1, cx2, cy2) { - var subdiv_step = 1 / 10/*BEZIER_SEGMENTS*/; - var subdiv_step2 = subdiv_step * subdiv_step; - var subdiv_step3 = subdiv_step2 * subdiv_step; - var pre1 = 3 * subdiv_step; - var pre2 = 3 * subdiv_step2; - var pre4 = 6 * subdiv_step2; - var pre5 = 6 * subdiv_step3; - var tmp1x = -cx1 * 2 + cx2; - var tmp1y = -cy1 * 2 + cy2; - var tmp2x = (cx1 - cx2) * 3 + 1; - var tmp2y = (cy1 - cy2) * 3 + 1; - var i = frameIndex * 6; + var subdiv1 = 1 / 10/*BEZIER_SEGMENTS*/, subdiv2 = subdiv1 * subdiv1, subdiv3 = subdiv2 * subdiv1; + var pre1 = 3 * subdiv1, pre2 = 3 * subdiv2, pre4 = 6 * subdiv2, pre5 = 6 * subdiv3; + var tmp1x = -cx1 * 2 + cx2, tmp1y = -cy1 * 2 + cy2, tmp2x = (cx1 - cx2) * 3 + 1, tmp2y = (cy1 - cy2) * 3 + 1; + var dfx = cx1 * pre1 + tmp1x * pre2 + tmp2x * subdiv3, dfy = cy1 * pre1 + tmp1y * pre2 + tmp2y * subdiv3; + var ddfx = tmp1x * pre4 + tmp2x * pre5, ddfy = tmp1y * pre4 + tmp2y * pre5; + var dddfx = tmp2x * pre5, dddfy = tmp2y * pre5; + + var i = frameIndex * 19/*BEZIER_SIZE*/; var curves = this.curves; - curves[i] = cx1 * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3; - curves[i + 1] = cy1 * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3; - curves[i + 2] = tmp1x * pre4 + tmp2x * pre5; - curves[i + 3] = tmp1y * pre4 + tmp2y * pre5; - curves[i + 4] = tmp2x * pre5; - curves[i + 5] = tmp2y * pre5; - }, - getCurvePercent: function (frameIndex, percent) { - percent = percent < 0 ? 0 : (percent > 1 ? 1 : percent); - var curveIndex = frameIndex * 6; - var curves = this.curves; - var dfx = curves[curveIndex]; - if (!dfx/*LINEAR*/) return percent; - if (dfx == -1/*STEPPED*/) return 0; - var dfy = curves[curveIndex + 1]; - var ddfx = curves[curveIndex + 2]; - var ddfy = curves[curveIndex + 3]; - var dddfx = curves[curveIndex + 4]; - var dddfy = curves[curveIndex + 5]; + curves[i++] = 2/*BEZIER*/; + var x = dfx, y = dfy; - var i = 10/*BEZIER_SEGMENTS*/ - 2; - while (true) { - if (x >= percent) { - var lastX = x - dfx; - var lastY = y - dfy; - return lastY + (y - lastY) * (percent - lastX) / (x - lastX); - } - if (i == 0) break; - i--; + for (var n = i + 19/*BEZIER_SIZE*/ - 1; i < n; i += 2) { + curves[i] = x; + curves[i + 1] = y; dfx += ddfx; dfy += ddfy; ddfx += dddfx; @@ -287,6 +412,31 @@ spine.Curves.prototype = { x += dfx; y += dfy; } + }, + getCurvePercent: function (frameIndex, percent) { + percent = percent < 0 ? 0 : (percent > 1 ? 1 : percent); + var curves = this.curves; + var i = frameIndex * 19/*BEZIER_SIZE*/; + var type = curves[i]; + if (type === 0/*LINEAR*/) return percent; + if (type == 1/*STEPPED*/) return 0; + i++; + var x = 0; + for (var start = i, n = i + 19/*BEZIER_SIZE*/ - 1; i < n; i += 2) { + x = curves[i]; + if (x >= percent) { + var prevX, prevY; + 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. } }; @@ -322,19 +472,19 @@ spine.RotateTimeline.prototype = { return; } - // Interpolate between the last frame and the current frame. - var frameIndex = spine.binarySearch(frames, time, 2); - var lastFrameValue = frames[frameIndex - 1]; + // Interpolate between the previous frame and the current frame. + var frameIndex = spine.Animation.binarySearch(frames, time, 2); + var prevFrameValue = frames[frameIndex - 1]; var frameTime = frames[frameIndex]; - var percent = 1 - (time - frameTime) / (frames[frameIndex - 2/*LAST_FRAME_TIME*/] - frameTime); + var percent = 1 - (time - frameTime) / (frames[frameIndex - 2/*PREV_FRAME_TIME*/] - frameTime); percent = this.curves.getCurvePercent(frameIndex / 2 - 1, percent); - var amount = frames[frameIndex + 1/*FRAME_VALUE*/] - lastFrameValue; + var amount = frames[frameIndex + 1/*FRAME_VALUE*/] - prevFrameValue; while (amount > 180) amount -= 360; while (amount < -180) amount += 360; - amount = bone.data.rotation + (lastFrameValue + amount * percent) - bone.rotation; + amount = bone.data.rotation + (prevFrameValue + amount * percent) - bone.rotation; while (amount > 180) amount -= 360; while (amount < -180) @@ -371,16 +521,16 @@ spine.TranslateTimeline.prototype = { return; } - // Interpolate between the last frame and the current frame. - var frameIndex = spine.binarySearch(frames, time, 3); - var lastFrameX = frames[frameIndex - 2]; - var lastFrameY = frames[frameIndex - 1]; + // Interpolate between the previous frame and the current frame. + var frameIndex = spine.Animation.binarySearch(frames, time, 3); + var prevFrameX = frames[frameIndex - 2]; + var prevFrameY = frames[frameIndex - 1]; var frameTime = frames[frameIndex]; - var percent = 1 - (time - frameTime) / (frames[frameIndex + -3/*LAST_FRAME_TIME*/] - frameTime); + var percent = 1 - (time - frameTime) / (frames[frameIndex + -3/*PREV_FRAME_TIME*/] - frameTime); percent = this.curves.getCurvePercent(frameIndex / 3 - 1, percent); - bone.x += (bone.data.x + lastFrameX + (frames[frameIndex + 1/*FRAME_X*/] - lastFrameX) * percent - bone.x) * alpha; - bone.y += (bone.data.y + lastFrameY + (frames[frameIndex + 2/*FRAME_Y*/] - lastFrameY) * percent - bone.y) * alpha; + bone.x += (bone.data.x + prevFrameX + (frames[frameIndex + 1/*FRAME_X*/] - prevFrameX) * percent - bone.x) * alpha; + bone.y += (bone.data.y + prevFrameY + (frames[frameIndex + 2/*FRAME_Y*/] - prevFrameY) * percent - bone.y) * alpha; } }; @@ -412,16 +562,16 @@ spine.ScaleTimeline.prototype = { return; } - // Interpolate between the last frame and the current frame. - var frameIndex = spine.binarySearch(frames, time, 3); - var lastFrameX = frames[frameIndex - 2]; - var lastFrameY = frames[frameIndex - 1]; + // Interpolate between the previous frame and the current frame. + var frameIndex = spine.Animation.binarySearch(frames, time, 3); + var prevFrameX = frames[frameIndex - 2]; + var prevFrameY = frames[frameIndex - 1]; var frameTime = frames[frameIndex]; - var percent = 1 - (time - frameTime) / (frames[frameIndex + -3/*LAST_FRAME_TIME*/] - frameTime); + var percent = 1 - (time - frameTime) / (frames[frameIndex + -3/*PREV_FRAME_TIME*/] - frameTime); percent = this.curves.getCurvePercent(frameIndex / 3 - 1, percent); - bone.scaleX += (bone.data.scaleX * (lastFrameX + (frames[frameIndex + 1/*FRAME_X*/] - lastFrameX) * percent) - bone.scaleX) * alpha; - bone.scaleY += (bone.data.scaleY * (lastFrameY + (frames[frameIndex + 2/*FRAME_Y*/] - lastFrameY) * percent) - bone.scaleY) * alpha; + bone.scaleX += (bone.data.scaleX * (prevFrameX + (frames[frameIndex + 1/*FRAME_X*/] - prevFrameX) * percent) - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY * (prevFrameY + (frames[frameIndex + 2/*FRAME_Y*/] - prevFrameY) * percent) - bone.scaleY) * alpha; } }; @@ -456,20 +606,20 @@ spine.ColorTimeline.prototype = { b = frames[i - 1]; a = frames[i]; } else { - // Interpolate between the last frame and the current frame. - var frameIndex = spine.binarySearch(frames, time, 5); - var lastFrameR = frames[frameIndex - 4]; - var lastFrameG = frames[frameIndex - 3]; - var lastFrameB = frames[frameIndex - 2]; - var lastFrameA = frames[frameIndex - 1]; + // Interpolate between the previous frame and the current frame. + var frameIndex = spine.Animation.binarySearch(frames, time, 5); + var prevFrameR = frames[frameIndex - 4]; + var prevFrameG = frames[frameIndex - 3]; + var prevFrameB = frames[frameIndex - 2]; + var prevFrameA = frames[frameIndex - 1]; var frameTime = frames[frameIndex]; - var percent = 1 - (time - frameTime) / (frames[frameIndex - 5/*LAST_FRAME_TIME*/] - frameTime); + var percent = 1 - (time - frameTime) / (frames[frameIndex - 5/*PREV_FRAME_TIME*/] - frameTime); percent = this.curves.getCurvePercent(frameIndex / 5 - 1, percent); - r = lastFrameR + (frames[frameIndex + 1/*FRAME_R*/] - lastFrameR) * percent; - g = lastFrameG + (frames[frameIndex + 2/*FRAME_G*/] - lastFrameG) * percent; - b = lastFrameB + (frames[frameIndex + 3/*FRAME_B*/] - lastFrameB) * percent; - a = lastFrameA + (frames[frameIndex + 4/*FRAME_A*/] - lastFrameA) * percent; + r = prevFrameR + (frames[frameIndex + 1/*FRAME_R*/] - prevFrameR) * percent; + g = prevFrameG + (frames[frameIndex + 2/*FRAME_G*/] - prevFrameG) * percent; + b = prevFrameB + (frames[frameIndex + 3/*FRAME_B*/] - prevFrameB) * percent; + a = prevFrameA + (frames[frameIndex + 4/*FRAME_A*/] - prevFrameA) * percent; } var slot = skeleton.slots[this.slotIndex]; if (alpha < 1) { @@ -504,16 +654,18 @@ spine.AttachmentTimeline.prototype = { }, apply: function (skeleton, lastTime, time, firedEvents, alpha) { var frames = this.frames; - if (time < frames[0]) return; // Time is before first frame. + if (time < frames[0]) { + if (lastTime > time) this.apply(skeleton, lastTime, Number.MAX_VALUE, null, 0); + return; + } else if (lastTime > time) // + lastTime = -1; - var frameIndex; - if (time >= frames[frames.length - 1]) // Time is after last frame. - frameIndex = frames.length - 1; - else - frameIndex = spine.binarySearch(frames, time, 1) - 1; + var frameIndex = time >= frames[frames.length - 1] ? frames.length - 1 : spine.Animation.binarySearch1(frames, time) - 1; + if (frames[frameIndex] < lastTime) return; var attachmentName = this.attachmentNames[frameIndex]; - skeleton.slots[this.slotIndex].setAttachment(!attachmentName ? null : skeleton.getAttachmentBySlotIndex(this.slotIndex, attachmentName)); + skeleton.slots[this.slotIndex].setAttachment( + !attachmentName ? null : skeleton.getAttachmentBySlotIndex(this.slotIndex, attachmentName)); } }; @@ -549,7 +701,7 @@ spine.EventTimeline.prototype = { if (lastTime < frames[0]) frameIndex = 0; else { - frameIndex = spine.binarySearch(frames, lastTime, 1); + frameIndex = spine.Animation.binarySearch1(frames, lastTime); var frame = frames[frameIndex]; while (frameIndex > 0) { // Fire multiple events with the same frame. if (frames[frameIndex - 1] != frame) break; @@ -584,7 +736,7 @@ spine.DrawOrderTimeline.prototype = { if (time >= frames[frames.length - 1]) // Time is after last frame. frameIndex = frames.length - 1; else - frameIndex = spine.binarySearch(frames, time, 1) - 1; + frameIndex = spine.Animation.binarySearch1(frames, time) - 1; var drawOrder = skeleton.drawOrder; var slots = skeleton.slots; @@ -622,10 +774,7 @@ spine.FfdTimeline.prototype = { if (slot.attachment != attachment) return; var frames = this.frames; - if (time < frames[0]) { - slot.attachmentVertices.length = 0; - return; // Time is before first frame. - } + if (time < frames[0]) return; // Time is before first frame. var frameVertices = this.frameVertices; var vertexCount = frameVertices[0].length; @@ -647,7 +796,7 @@ spine.FfdTimeline.prototype = { } // Interpolate between the previous frame and the current frame. - var frameIndex = spine.binarySearch(frames, time, 1); + var frameIndex = spine.Animation.binarySearch1(frames, time); var frameTime = frames[frameIndex]; var percent = 1 - (time - frameTime) / (frames[frameIndex - 1] - frameTime); percent = this.curves.getCurvePercent(frameIndex - 1, percent < 0 ? 0 : (percent > 1 ? 1 : percent)); @@ -669,15 +818,116 @@ spine.FfdTimeline.prototype = { } }; +spine.IkConstraintTimeline = function (frameCount) { + this.curves = new spine.Curves(frameCount); + this.frames = []; // time, mix, bendDirection, ... + this.frames.length = frameCount * 3; +}; +spine.IkConstraintTimeline.prototype = { + ikConstraintIndex: 0, + getFrameCount: function () { + return this.frames.length / 3; + }, + setFrame: function (frameIndex, time, mix, bendDirection) { + frameIndex *= 3; + this.frames[frameIndex] = time; + this.frames[frameIndex + 1] = mix; + this.frames[frameIndex + 2] = bendDirection; + }, + apply: function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) return; // Time is before first frame. + + var ikConstraint = skeleton.ikConstraints[this.ikConstraintIndex]; + + if (time >= frames[frames.length - 3]) { // Time is after last frame. + ikConstraint.mix += (frames[frames.length - 2] - ikConstraint.mix) * alpha; + ikConstraint.bendDirection = frames[frames.length - 1]; + return; + } + + // Interpolate between the previous frame and the current frame. + var frameIndex = spine.Animation.binarySearch(frames, time, 3); + var prevFrameMix = frames[frameIndex + -2/*PREV_FRAME_MIX*/]; + var frameTime = frames[frameIndex]; + var percent = 1 - (time - frameTime) / (frames[frameIndex + -3/*PREV_FRAME_TIME*/] - frameTime); + percent = this.curves.getCurvePercent(frameIndex / 3 - 1, percent); + + var mix = prevFrameMix + (frames[frameIndex + 1/*FRAME_MIX*/] - prevFrameMix) * percent; + ikConstraint.mix += (mix - ikConstraint.mix) * alpha; + ikConstraint.bendDirection = frames[frameIndex + -1/*PREV_FRAME_BEND_DIRECTION*/]; + } +}; + +spine.FlipXTimeline = function (frameCount) { + this.curves = new spine.Curves(frameCount); + this.frames = []; // time, flip, ... + this.frames.length = frameCount * 2; +}; +spine.FlipXTimeline.prototype = { + boneIndex: 0, + getFrameCount: function () { + return this.frames.length / 2; + }, + setFrame: function (frameIndex, time, flip) { + frameIndex *= 2; + this.frames[frameIndex] = time; + this.frames[frameIndex + 1] = flip ? 1 : 0; + }, + apply: function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) { + if (lastTime > time) this.apply(skeleton, lastTime, Number.MAX_VALUE, null, 0); + return; + } else if (lastTime > time) // + lastTime = -1; + var frameIndex = (time >= frames[frames.length - 2] ? frames.length : spine.Animation.binarySearch(frames, time, 2)) - 2; + if (frames[frameIndex] < lastTime) return; + skeleton.bones[boneIndex].flipX = frames[frameIndex + 1] != 0; + } +}; + +spine.FlipYTimeline = function (frameCount) { + this.curves = new spine.Curves(frameCount); + this.frames = []; // time, flip, ... + this.frames.length = frameCount * 2; +}; +spine.FlipYTimeline.prototype = { + boneIndex: 0, + getFrameCount: function () { + return this.frames.length / 2; + }, + setFrame: function (frameIndex, time, flip) { + frameIndex *= 2; + this.frames[frameIndex] = time; + this.frames[frameIndex + 1] = flip ? 1 : 0; + }, + apply: function (skeleton, lastTime, time, firedEvents, alpha) { + var frames = this.frames; + if (time < frames[0]) { + if (lastTime > time) this.apply(skeleton, lastTime, Number.MAX_VALUE, null, 0); + return; + } else if (lastTime > time) // + lastTime = -1; + var frameIndex = (time >= frames[frames.length - 2] ? frames.length : spine.Animation.binarySearch(frames, time, 2)) - 2; + if (frames[frameIndex] < lastTime) return; + skeleton.bones[boneIndex].flipY = frames[frameIndex + 1] != 0; + } +}; + spine.SkeletonData = function () { this.bones = []; this.slots = []; this.skins = []; this.events = []; this.animations = []; + this.ikConstraints = []; }; spine.SkeletonData.prototype = { + name: null, defaultSkin: null, + width: 0, height: 0, + version: null, hash: null, /** @return May be null. */ findBone: function (boneName) { var bones = this.bones; @@ -727,6 +977,13 @@ spine.SkeletonData.prototype = { for (var i = 0, n = animations.length; i < n; i++) if (animations[i].name == animationName) return animations[i]; return null; + }, + /** @return May be null. */ + findIkConstraint: function (ikConstraintName) { + var ikConstraints = this.ikConstraints; + for (var i = 0, n = ikConstraints.length; i < n; i++) + if (ikConstraints[i].name == ikConstraintName) return ikConstraints[i]; + return null; } }; @@ -737,7 +994,7 @@ spine.Skeleton = function (skeletonData) { for (var i = 0, n = skeletonData.bones.length; i < n; i++) { var boneData = skeletonData.bones[i]; var parent = !boneData.parent ? null : this.bones[skeletonData.bones.indexOf(boneData.parent)]; - this.bones.push(new spine.Bone(boneData, parent)); + this.bones.push(new spine.Bone(boneData, this, parent)); } this.slots = []; @@ -745,10 +1002,17 @@ spine.Skeleton = function (skeletonData) { for (var i = 0, n = skeletonData.slots.length; i < n; i++) { var slotData = skeletonData.slots[i]; var bone = this.bones[skeletonData.bones.indexOf(slotData.boneData)]; - var slot = new spine.Slot(slotData, this, bone); + var slot = new spine.Slot(slotData, bone); this.slots.push(slot); this.drawOrder.push(slot); } + + this.ikConstraints = []; + for (var i = 0, n = skeletonData.ikConstraints.length; i < n; i++) + this.ikConstraints.push(new spine.IkConstraint(skeletonData.ikConstraints[i], this)); + + this.boneCache = []; + this.updateCache(); }; spine.Skeleton.prototype = { x: 0, y: 0, @@ -756,13 +1020,62 @@ spine.Skeleton.prototype = { r: 1, g: 1, b: 1, a: 1, time: 0, flipX: false, flipY: false, + /** Caches information about bones and IK constraints. Must be called if bones or IK constraints are added or removed. */ + updateCache: function () { + var ikConstraints = this.ikConstraints; + var ikConstraintsCount = ikConstraints.length; + + var arrayCount = ikConstraintsCount + 1; + var boneCache = this.boneCache; + if (boneCache.length > arrayCount) boneCache.length = arrayCount; + for (var i = 0, n = boneCache.length; i < n; i++) + boneCache[i].length = 0; + while (boneCache.length < arrayCount) + boneCache[boneCache.length] = []; + + var nonIkBones = boneCache[0]; + var bones = this.bones; + + outer: + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + var current = bone; + do { + for (var ii = 0; ii < ikConstraintsCount; ii++) { + var ikConstraint = ikConstraints[ii]; + var parent = ikConstraint.bones[0]; + var child= ikConstraint.bones[ikConstraint.bones.length - 1]; + while (true) { + if (current == child) { + boneCache[ii].push(bone); + boneCache[ii + 1].push(bone); + continue outer; + } + if (child == parent) break; + child = child.parent; + } + } + current = current.parent; + } while (current); + nonIkBones[nonIkBones.length] = bone; + } + }, /** Updates the world transform for each bone. */ updateWorldTransform: function () { - var flipX = this.flipX; - var flipY = this.flipY; var bones = this.bones; - for (var i = 0, n = bones.length; i < n; i++) - bones[i].updateWorldTransform(flipX, flipY); + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + bone.rotationIK = bone.rotation; + } + var i = 0, last = this.boneCache.length - 1; + while (true) { + var cacheBones = this.boneCache[i]; + for (var ii = 0, nn = cacheBones.length; ii < nn; ii++) + cacheBones[ii].updateWorldTransform(); + if (i == last) break; + this.ikConstraints[i].apply(); + i++; + } }, /** Sets the bones and slots to their setup pose values. */ setToSetupPose: function () { @@ -773,6 +1086,13 @@ spine.Skeleton.prototype = { 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 ikConstraint = ikConstraints[i]; + ikConstraint.bendDirection = ikConstraint.data.bendDirection; + ikConstraint.mix = ikConstraint.data.mix; + } }, setSlotsToSetupPose: function () { var slots = this.slots; @@ -784,7 +1104,7 @@ spine.Skeleton.prototype = { }, /** @return May return null. */ getRootBone: function () { - return this.bones.length == 0 ? null : this.bones[0]; + return this.bones.length ? this.bones[0] : null; }, /** @return May be null. */ findBone: function (boneName) { @@ -819,9 +1139,9 @@ spine.Skeleton.prototype = { if (!skin) throw "Skin not found: " + skinName; this.setSkin(skin); }, - /** Sets the skin used to look up attachments not found 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. + /** 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: function (newSkin) { if (newSkin) { @@ -871,6 +1191,13 @@ spine.Skeleton.prototype = { } throw "Slot not found: " + slotName; }, + /** @return May be null. */ + findIkConstraint: function (ikConstraintName) { + var ikConstraints = this.ikConstraints; + for (var i = 0, n = ikConstraints.length; i < n; i++) + if (ikConstraints[i].data.name == ikConstraintName) return ikConstraints[i]; + return null; + }, update: function (delta) { this.time += delta; } @@ -949,7 +1276,7 @@ spine.RegionAttachment.prototype = { var localY = -this.height / 2 * this.scaleY + this.regionOffsetY * regionScaleY; var localX2 = localX + this.regionWidth * regionScaleX; var localY2 = localY + this.regionHeight * regionScaleY; - var radians = this.rotation * Math.PI / 180; + var radians = this.rotation * spine.degRad; var cos = Math.cos(radians); var sin = Math.sin(radians); var localXCos = localX * cos + this.x; @@ -1081,13 +1408,13 @@ spine.SkinnedMeshAttachment.prototype = { } }, computeWorldVertices: function (x, y, slot, worldVertices) { - var skeletonBones = slot.skeleton.bones; + var skeletonBones = slot.bone.skeleton.bones; var weights = this.weights; var bones = this.bones; var w = 0, v = 0, b = 0, f = 0, n = bones.length, nn; var wx, wy, bone, vx, vy, weight; - if (slot.attachmentVertices.length == 0) { + if (!slot.attachmentVertices.length) { for (; v < n; w += 2) { wx = 0; wy = 0; @@ -1161,8 +1488,8 @@ spine.AnimationStateData.prototype = { this.animationToMixTime[from.name + ":" + to.name] = duration; }, getMix: function (from, to) { - var time = this.animationToMixTime[from.name + ":" + to.name]; - return time ? time : this.defaultMix; + var key = from.name + ":" + to.name; + return this.animationToMixTime.hasOwnProperty(key) ? this.animationToMixTime[key] : this.defaultMix; } }; @@ -1245,8 +1572,8 @@ spine.AnimationState.prototype = { for (var ii = 0, nn = this.events.length; ii < nn; ii++) { var event = this.events[ii]; - if (current.onEvent != null) current.onEvent(i, event); - if (this.onEvent != null) this.onEvent(i, event); + if (current.onEvent) current.onEvent(i, event); + if (this.onEvent) this.onEvent(i, event); } // Check if completed the animation or a loop iteration. @@ -1269,8 +1596,8 @@ spine.AnimationState.prototype = { var current = this.tracks[trackIndex]; if (!current) return; - if (current.onEnd != null) current.onEnd(trackIndex); - if (this.onEnd != null) this.onEnd(trackIndex); + if (current.onEnd) current.onEnd(trackIndex); + if (this.onEnd) this.onEnd(trackIndex); this.tracks[trackIndex] = null; }, @@ -1286,8 +1613,8 @@ spine.AnimationState.prototype = { var previous = current.previous; current.previous = null; - if (current.onEnd != null) current.onEnd(index); - if (this.onEnd != null) this.onEnd(index); + if (current.onEnd) current.onEnd(index); + if (this.onEnd) this.onEnd(index); entry.mixDuration = this.data.getMix(current.animation, entry.animation); if (entry.mixDuration > 0) { @@ -1302,8 +1629,8 @@ spine.AnimationState.prototype = { this.tracks[index] = entry; - if (entry.onStart != null) entry.onStart(index); - if (this.onStart != null) this.onStart(index); + if (entry.onStart) entry.onStart(index); + if (this.onStart) this.onStart(index); }, setAnimationByName: function (trackIndex, animationName, loop) { var animation = this.data.skeletonData.findAnimation(animationName); @@ -1362,8 +1689,18 @@ spine.SkeletonJson = function (attachmentLoader) { }; spine.SkeletonJson.prototype = { scale: 1, - readSkeletonData: function (root) { + readSkeletonData: function (root, name) { var skeletonData = new spine.SkeletonData(); + skeletonData.name = name; + + // Skeleton. + var skeletonMap = root["skeleton"]; + if (skeletonMap) { + skeletonData.hash = skeletonMap["hash"]; + skeletonData.version = skeletonMap["spine"]; + skeletonData.width = skeletonMap["width"] || 0; + skeletonData.height = skeletonMap["height"] || 0; + } // Bones. var bones = root["bones"]; @@ -1381,11 +1718,35 @@ spine.SkeletonJson.prototype = { boneData.rotation = (boneMap["rotation"] || 0); boneData.scaleX = boneMap.hasOwnProperty("scaleX") ? boneMap["scaleX"] : 1; boneData.scaleY = boneMap.hasOwnProperty("scaleY") ? boneMap["scaleY"] : 1; - boneData.inheritScale = !boneMap["inheritScale"] || boneMap["inheritScale"] == "true"; - boneData.inheritRotation = !boneMap["inheritRotation"] || boneMap["inheritRotation"] == "true"; + boneData.inheritScale = boneMap.hasOwnProperty("inheritScale") ? boneMap["inheritScale"] : true; + boneData.inheritRotation = boneMap.hasOwnProperty("inheritRotation") ? boneMap["inheritRotation"] : true; skeletonData.bones.push(boneData); } + // IK constraints. + var ik = root["ik"]; + if (ik) { + for (var i = 0, n = ik.length; i < n; i++) { + var ikMap = ik[i]; + var ikConstraintData = new spine.IkConstraintData(ikMap["name"]); + + var bones = ikMap["bones"]; + for (var ii = 0, nn = bones.length; ii < nn; ii++) { + var bone = skeletonData.findBone(bones[ii]); + if (!bone) throw "IK bone not found: " + bones[ii]; + ikConstraintData.bones.push(bone); + } + + ikConstraintData.target = skeletonData.findBone(ikMap["target"]); + if (!ikConstraintData.target) throw "Target bone not found: " + ikMap["target"]; + + ikConstraintData.bendDirection = (!ikMap.hasOwnProperty("bendPositive") || ikMap["bendPositive"]) ? 1 : -1; + ikConstraintData.mix = ikMap.hasOwnProperty("mix") ? ikMap["mix"] : 1; + + skeletonData.ikConstraints.push(ikConstraintData); + } + } + // Slots. var slots = root["slots"]; for (var i = 0, n = slots.length; i < n; i++) { @@ -1421,7 +1782,7 @@ spine.SkeletonJson.prototype = { for (var attachmentName in slotEntry) { if (!slotEntry.hasOwnProperty(attachmentName)) continue; var attachment = this.readAttachment(skin, attachmentName, slotEntry[attachmentName]); - if (attachment != null) skin.addAttachment(slotIndex, attachmentName, attachment); + if (attachment) skin.addAttachment(slotIndex, attachmentName, attachment); } } skeletonData.skins.push(skin); @@ -1644,11 +2005,45 @@ spine.SkeletonJson.prototype = { timelines.push(timeline); duration = Math.max(duration, timeline.frames[timeline.getFrameCount() * 3 - 3]); + } else if (timelineName == "flipX" || timelineName == "flipY") { + var x = timelineName == "flipX"; + var timeline = x ? new spine.FlipXTimeline(values.length) : new spine.FlipYTimeline(values.length); + timeline.boneIndex = boneIndex; + + var field = x ? "x" : "y"; + var frameIndex = 0; + for (var i = 0, n = values.length; i < n; i++) { + var valueMap = values[i]; + timeline.setFrame(frameIndex, valueMap["time"], valueMap[field] || false); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() * 2 - 2]); } else throw "Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"; } } + var ikMap = map["ik"]; + for (var ikConstraintName in ikMap) { + if (!ikMap.hasOwnProperty(ikConstraintName)) continue; + var ikConstraint = skeletonData.findIkConstraint(ikConstraintName); + var values = ikMap[ikConstraintName]; + var timeline = new spine.IkConstraintTimeline(values.length); + timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(ikConstraint); + var frameIndex = 0; + for (var i = 0, n = values.length; i < n; i++) { + var valueMap = values[i]; + var mix = valueMap.hasOwnProperty("mix") ? valueMap["mix"] : 1; + var bendDirection = (!valueMap.hasOwnProperty("bendPositive") || valueMap["bendPositive"]) ? 1 : -1; + timeline.setFrame(frameIndex, valueMap["time"], mix, bendDirection); + this.readCurve(timeline, frameIndex, valueMap); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.frameCount * 3 - 3]); + } + var ffd = map["ffd"]; for (var skinName in ffd) { var skin = skeletonData.findSkin(skinName); @@ -1712,7 +2107,8 @@ spine.SkeletonJson.prototype = { } } - var drawOrderValues = map["draworder"]; + var drawOrderValues = map["drawOrder"]; + if (!drawOrderValues) drawOrderValues = map["draworder"]; if (drawOrderValues) { var timeline = new spine.DrawOrderTimeline(drawOrderValues.length); var slotCount = skeletonData.slots.length; @@ -1774,8 +2170,9 @@ spine.SkeletonJson.prototype = { }, readCurve: function (timeline, frameIndex, valueMap) { var curve = valueMap["curve"]; - if (!curve) return; - if (curve == "stepped") + if (!curve) + timeline.curves.setLinear(frameIndex); + else if (curve == "stepped") timeline.curves.setStepped(frameIndex); else if (curve instanceof Array) timeline.curves.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]); @@ -1819,9 +2216,9 @@ spine.Atlas = function (atlasText, textureLoader) { var page = null; while (true) { var line = reader.readLine(); - if (line == null) break; + if (line === null) break; line = reader.trim(line); - if (line.length == 0) + if (!line.length) page = null; else if (!page) { page = new spine.AtlasPage(); diff --git a/spine-libgdx/README.md b/spine-libgdx/README.md index f936f306d..9435d5fcf 100644 --- a/spine-libgdx/README.md +++ b/spine-libgdx/README.md @@ -21,3 +21,4 @@ Alternatively, the contents of the `spine-libgdx/src` directory can be copied in * [Box2D Example](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-libgdx/test/com/esotericsoftware/spine/Box2DExample.java#L56) (written before bounding boxes were available) * [Mix Example](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-libgdx/test/com/esotericsoftware/spine/MixTest.java#L39) * [Skeleton Example](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-libgdx/test/com/esotericsoftware/spine/SkeletonTest.java#L47) +* [Super Spineboy](https://github.com/EsotericSoftware/spine-superspineboy) Full game example done with Spine Essential. diff --git a/spine-libgdx/.classpath b/spine-libgdx/spine-libgdx-tests/.classpath similarity index 88% rename from spine-libgdx/.classpath rename to spine-libgdx/spine-libgdx-tests/.classpath index 4a5479599..7bfaa23b1 100644 --- a/spine-libgdx/.classpath +++ b/spine-libgdx/spine-libgdx-tests/.classpath @@ -2,10 +2,10 @@ - + diff --git a/spine-libgdx/spine-libgdx-tests/.project b/spine-libgdx/spine-libgdx-tests/.project new file mode 100644 index 000000000..263966f61 --- /dev/null +++ b/spine-libgdx/spine-libgdx-tests/.project @@ -0,0 +1,17 @@ + + + spine-libgdx-tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/spine-libgdx/.settings/org.eclipse.jdt.core.prefs b/spine-libgdx/spine-libgdx-tests/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from spine-libgdx/.settings/org.eclipse.jdt.core.prefs rename to spine-libgdx/spine-libgdx-tests/.settings/org.eclipse.jdt.core.prefs diff --git a/spine-libgdx/assets/goblins/goblins-ffd.atlas b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.atlas similarity index 99% rename from spine-libgdx/assets/goblins/goblins-ffd.atlas rename to spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.atlas index b977b07f6..b928522f8 100644 --- a/spine-libgdx/assets/goblins/goblins-ffd.atlas +++ b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.atlas @@ -1,5 +1,5 @@ -goblins-ffd.png +goblins-mesh.png format: RGBA8888 filter: Linear,Linear repeat: none diff --git a/spine-libgdx/assets/goblins/goblins-ffd.json b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.json similarity index 100% rename from spine-libgdx/assets/goblins/goblins-ffd.json rename to spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.json diff --git a/spine-libgdx/assets/goblins/goblins-ffd.png b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.png similarity index 100% rename from spine-libgdx/assets/goblins/goblins-ffd.png rename to spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.png diff --git a/spine-libgdx/assets/goblins/goblins-ffd.skel b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.skel similarity index 100% rename from spine-libgdx/assets/goblins/goblins-ffd.skel rename to spine-libgdx/spine-libgdx-tests/assets/goblins/goblins-mesh.skel diff --git a/spine-libgdx/assets/goblins/goblins.atlas b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins.atlas similarity index 100% rename from spine-libgdx/assets/goblins/goblins.atlas rename to spine-libgdx/spine-libgdx-tests/assets/goblins/goblins.atlas diff --git a/spine-libgdx/assets/goblins/goblins.json b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins.json similarity index 100% rename from spine-libgdx/assets/goblins/goblins.json rename to spine-libgdx/spine-libgdx-tests/assets/goblins/goblins.json diff --git a/spine-libgdx/assets/goblins/goblins.png b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins.png similarity index 100% rename from spine-libgdx/assets/goblins/goblins.png rename to spine-libgdx/spine-libgdx-tests/assets/goblins/goblins.png diff --git a/spine-libgdx/assets/goblins/goblins.skel b/spine-libgdx/spine-libgdx-tests/assets/goblins/goblins.skel similarity index 100% rename from spine-libgdx/assets/goblins/goblins.skel rename to spine-libgdx/spine-libgdx-tests/assets/goblins/goblins.skel diff --git a/spine-libgdx/assets/raptor/raptor.atlas b/spine-libgdx/spine-libgdx-tests/assets/raptor/raptor.atlas similarity index 100% rename from spine-libgdx/assets/raptor/raptor.atlas rename to spine-libgdx/spine-libgdx-tests/assets/raptor/raptor.atlas diff --git a/spine-libgdx/assets/raptor/raptor.json b/spine-libgdx/spine-libgdx-tests/assets/raptor/raptor.json similarity index 100% rename from spine-libgdx/assets/raptor/raptor.json rename to spine-libgdx/spine-libgdx-tests/assets/raptor/raptor.json diff --git a/spine-libgdx/assets/raptor/raptor.png b/spine-libgdx/spine-libgdx-tests/assets/raptor/raptor.png similarity index 100% rename from spine-libgdx/assets/raptor/raptor.png rename to spine-libgdx/spine-libgdx-tests/assets/raptor/raptor.png diff --git a/spine-libgdx/assets/raptor/raptor.skel b/spine-libgdx/spine-libgdx-tests/assets/raptor/raptor.skel similarity index 100% rename from spine-libgdx/assets/raptor/raptor.skel rename to spine-libgdx/spine-libgdx-tests/assets/raptor/raptor.skel diff --git a/spine-libgdx/assets/spineboy/spineboy-old-diffuse.atlas b/spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy-old-diffuse.atlas similarity index 100% rename from spine-libgdx/assets/spineboy/spineboy-old-diffuse.atlas rename to spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy-old-diffuse.atlas diff --git a/spine-libgdx/assets/spineboy/spineboy-old-diffuse.png b/spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy-old-diffuse.png similarity index 100% rename from spine-libgdx/assets/spineboy/spineboy-old-diffuse.png rename to spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy-old-diffuse.png diff --git a/spine-libgdx/assets/spineboy/spineboy-old-normal.png b/spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy-old-normal.png similarity index 100% rename from spine-libgdx/assets/spineboy/spineboy-old-normal.png rename to spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy-old-normal.png diff --git a/spine-libgdx/assets/spineboy/spineboy-old.json b/spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy-old.json similarity index 100% rename from spine-libgdx/assets/spineboy/spineboy-old.json rename to spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy-old.json diff --git a/spine-libgdx/assets/spineboy/spineboy.atlas b/spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy.atlas similarity index 100% rename from spine-libgdx/assets/spineboy/spineboy.atlas rename to spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy.atlas diff --git a/spine-libgdx/assets/spineboy/spineboy.json b/spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy.json similarity index 100% rename from spine-libgdx/assets/spineboy/spineboy.json rename to spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy.json diff --git a/spine-libgdx/assets/spineboy/spineboy.png b/spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy.png similarity index 100% rename from spine-libgdx/assets/spineboy/spineboy.png rename to spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy.png diff --git a/spine-libgdx/assets/spineboy/spineboy.skel b/spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy.skel similarity index 100% rename from spine-libgdx/assets/spineboy/spineboy.skel rename to spine-libgdx/spine-libgdx-tests/assets/spineboy/spineboy.skel diff --git a/spine-libgdx/test/com/esotericsoftware/spine/AttachmentTimelineTests.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/AttachmentTimelineTests.java similarity index 100% rename from spine-libgdx/test/com/esotericsoftware/spine/AttachmentTimelineTests.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/AttachmentTimelineTests.java diff --git a/spine-libgdx/test/com/esotericsoftware/spine/Box2DExample.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/Box2DExample.java similarity index 99% rename from spine-libgdx/test/com/esotericsoftware/spine/Box2DExample.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/Box2DExample.java index 3d258d35c..d73c92502 100644 --- a/spine-libgdx/test/com/esotericsoftware/spine/Box2DExample.java +++ b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/Box2DExample.java @@ -211,7 +211,7 @@ public class Box2DExample extends ApplicationAdapter { // Next we create the 50 box bodies using the PolygonShape we just // defined. This process is similar to the one we used for the ground // body. Note that we reuse the polygon for each body fixture. - for (int i = 0; i < 20; i++) { + for (int i = 0; i < 45; i++) { // Create the BodyDef, set a random position above the // ground and create a new body BodyDef boxBodyDef = new BodyDef(); diff --git a/spine-libgdx/test/com/esotericsoftware/spine/EventTimelineTests.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/EventTimelineTests.java similarity index 100% rename from spine-libgdx/test/com/esotericsoftware/spine/EventTimelineTests.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/EventTimelineTests.java diff --git a/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/IkTest.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/IkTest.java new file mode 100644 index 000000000..7b5b189dd --- /dev/null +++ b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/IkTest.java @@ -0,0 +1,170 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +package com.esotericsoftware.spine; + +import com.badlogic.gdx.ApplicationAdapter; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.backends.lwjgl.LwjglApplication; +import com.badlogic.gdx.graphics.GL20; +import com.badlogic.gdx.graphics.OrthographicCamera; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.graphics.g2d.TextureAtlas; +import com.badlogic.gdx.math.Vector2; + +public class IkTest extends ApplicationAdapter { + OrthographicCamera camera; + SpriteBatch batch; + SkeletonRenderer renderer; + SkeletonRendererDebug debugRenderer; + + TextureAtlas atlas; + Skeleton skeleton; + AnimationState state; + + public void create () { + camera = new OrthographicCamera(); + batch = new SpriteBatch(); + renderer = new SkeletonRenderer(); + renderer.setPremultipliedAlpha(true); + debugRenderer = new SkeletonRendererDebug(); + debugRenderer.setBoundingBoxes(false); + debugRenderer.setRegionAttachments(false); + + atlas = new TextureAtlas(Gdx.files.internal("spineboy/spineboy.atlas")); + SkeletonJson json = new SkeletonJson(atlas); // This loads skeleton JSON data, which is stateless. + json.setScale(0.6f); // Load the skeleton at 60% the size it was in Spine. + SkeletonData skeletonData = json.readSkeletonData(Gdx.files.internal("spineboy/spineboy.json")); + + skeleton = new Skeleton(skeletonData); // Skeleton holds skeleton state (bone positions, slot attachments, etc). + skeleton.setPosition(250, 20); + + AnimationStateData stateData = new AnimationStateData(skeletonData); // Defines mixing (crossfading) between animations. + stateData.setMix("run", "jump", 0.2f); + stateData.setMix("jump", "run", 0.2f); + + state = new AnimationState(stateData); // Holds the animation state for a skeleton (current animation, time, etc). + state.setTimeScale(0.5f); // Slow all animations down to 50% speed. + state.setAnimation(0, "run", true); + state.addAnimation(0, "jump", false, 2); // Jump after 2 seconds. + state.addAnimation(0, "run", true, 0); // Run after the jump. + + // skeleton.findBone("front_foot").parent = skeleton.findBone("hip"); + + IkConstraintData data; + + data = new IkConstraintData("head"); + data.getBones().add(skeletonData.findBone("torso")); + data.getBones().add(skeletonData.findBone("head")); + data.target = skeletonData.findBone("front_foot"); + data.setBendDirection(-1); + skeleton.getIkConstraints().add(new IkConstraint(data, skeleton)); + +// data = new IkConstraintData("arm"); +// data.getBones().add(skeletonData.findBone("front_upper_arm")); +// data.getBones().add(skeletonData.findBone("front_bracer")); +// data.setTarget(skeletonData.findBone("front_foot")); +// skeleton.getIkConstraints().add(new IkConstraint(data, skeleton)); +// +// data = new IkConstraintData("leg"); +// data.getBones().add(skeletonData.findBone("front_thigh")); +// data.getBones().add(skeletonData.findBone("front_shin")); +// data.target = skeletonData.findBone("front_foot"); +// data.setBendDirection(-1); +// skeleton.getIkConstraints().add(new IkConstraint(data, skeleton)); +// //skeleton.getIkConstraints().peek().setMix(0.5f); + + skeleton.updateCache(); + skeleton.updateWorldTransform(); + } + + public void render () { + state.update(Gdx.graphics.getDeltaTime()); // Update the animation time. + + Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); + + // state.apply(skeleton); // Poses skeleton using current animations. This sets the bones' local SRT. + +// skeleton.findBone("front_shin").y = 40; +// skeleton.findBone("front_shin").scaleX = 2; +// skeleton.findBone("front_thigh").scaleX = 2; +// skeleton.findBone("front_bracer").y = 40; +// skeleton.findBone("front_bracer").scaleX = 2; +// skeleton.findBone("front_upper_arm").scaleX = 2; +// skeleton.getRootBone().setScale(1.3f, 0.6f); + + // skeleton.findBone("front_upper_arm").parent = skeleton.findBone("front_shin"); +// skeleton.findBone("head").scaleX = 2; +// skeleton.findBone("head").x = 100; +// skeleton.findBone("head").y = 100; +// skeleton.findBone("head").rotation = 0; +// skeleton.findBone("neck").x = 100; +// skeleton.findBone("neck").y = 100; +// skeleton.findBone("neck").rotation = 45; + + skeleton.setPosition(250, 20); +// skeleton.setFlip(false, false); + skeleton.setPosition(250, 20); +// skeleton.setFlipX(true); +// skeleton.setFlipY(false); + +// skeleton.findBone("torso").setFlipX(true); +// skeleton.findBone("torso").setFlipY(true); + + Vector2 p = skeleton.findBone("front_foot").parent.worldToLocal(new Vector2(Gdx.input.getX() - skeleton.getX(), + Gdx.graphics.getHeight() - Gdx.input.getY() - skeleton.getY())); + skeleton.findBone("front_foot").setPosition(p.x, p.y); + + skeleton.updateWorldTransform(); // Uses the bones' local SRT to compute their world SRT. + + // Configure the camera, SpriteBatch, and SkeletonRendererDebug. + camera.update(); + batch.getProjectionMatrix().set(camera.combined); + debugRenderer.getShapeRenderer().setProjectionMatrix(camera.combined); + + batch.begin(); + renderer.draw(batch, skeleton); // Draw the skeleton images. + batch.end(); + + debugRenderer.draw(skeleton); // Draw debug lines. + } + + public void resize (int width, int height) { + camera.setToOrtho(false); // Update camera with new size. + } + + public void dispose () { + atlas.dispose(); + } + + public static void main (String[] args) throws Exception { + new LwjglApplication(new IkTest()); + } +} diff --git a/spine-libgdx/test/com/esotericsoftware/spine/MixTest.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/MixTest.java similarity index 100% rename from spine-libgdx/test/com/esotericsoftware/spine/MixTest.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/MixTest.java diff --git a/spine-libgdx/test/com/esotericsoftware/spine/NormalMapTest.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/NormalMapTest.java similarity index 100% rename from spine-libgdx/test/com/esotericsoftware/spine/NormalMapTest.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/NormalMapTest.java diff --git a/spine-libgdx/test/com/esotericsoftware/spine/SimpleTest1.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/SimpleTest1.java similarity index 100% rename from spine-libgdx/test/com/esotericsoftware/spine/SimpleTest1.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/SimpleTest1.java diff --git a/spine-libgdx/test/com/esotericsoftware/spine/SimpleTest2.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/SimpleTest2.java similarity index 100% rename from spine-libgdx/test/com/esotericsoftware/spine/SimpleTest2.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/SimpleTest2.java diff --git a/spine-libgdx/test/com/esotericsoftware/spine/SimpleTest3.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/SimpleTest3.java similarity index 100% rename from spine-libgdx/test/com/esotericsoftware/spine/SimpleTest3.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/SimpleTest3.java diff --git a/spine-libgdx/test/com/esotericsoftware/spine/SkeletonAttachmentTest.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/SkeletonAttachmentTest.java similarity index 100% rename from spine-libgdx/test/com/esotericsoftware/spine/SkeletonAttachmentTest.java rename to spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/SkeletonAttachmentTest.java diff --git a/spine-libgdx/spine-libgdx/.classpath b/spine-libgdx/spine-libgdx/.classpath new file mode 100644 index 000000000..ee6f3e443 --- /dev/null +++ b/spine-libgdx/spine-libgdx/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/spine-libgdx/.project b/spine-libgdx/spine-libgdx/.project similarity index 100% rename from spine-libgdx/.project rename to spine-libgdx/spine-libgdx/.project diff --git a/spine-libgdx/spine-libgdx/.settings/org.eclipse.jdt.core.prefs b/spine-libgdx/spine-libgdx/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..6a57c0f46 --- /dev/null +++ b/spine-libgdx/spine-libgdx/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,99 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=ignore +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/spine-libgdx/src/com/esotericsoftware/spine.gwt.xml b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine.gwt.xml similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine.gwt.xml rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine.gwt.xml diff --git a/spine-libgdx/src/com/esotericsoftware/spine/Animation.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java similarity index 97% rename from spine-libgdx/src/com/esotericsoftware/spine/Animation.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java index ae330ca46..0a0571dac 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/Animation.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java @@ -157,6 +157,7 @@ public class Animation { private final float[] curves; // type, x, y, ... public CurveTimeline (int frameCount) { + if (frameCount <= 0) throw new IllegalArgumentException("frameCount must be > 0: " + frameCount); curves = new float[(frameCount - 1) * BEZIER_SIZE]; } @@ -777,12 +778,21 @@ public class Animation { } static public class FlipXTimeline implements Timeline { - private final float[] frames; // time, flip, ... + int boneIndex; + final float[] frames; // time, flip, ... public FlipXTimeline (int frameCount) { frames = new float[frameCount << 1]; } + public void setBoneIndex (int boneIndex) { + this.boneIndex = boneIndex; + } + + public int getBoneIndex () { + return boneIndex; + } + public int getFrameCount () { return frames.length >> 1; } @@ -805,15 +815,13 @@ public class Animation { return; } else if (lastTime > time) // lastTime = -1; - int frameIndex = (time >= frames[frames.length - 2] ? frames.length : binarySearch(frames, time, 2)) - 2; - if (frames[frameIndex] <= lastTime) return; - - flip(skeleton, frames[frameIndex + 1] != 0); + if (frames[frameIndex] < lastTime) return; + setFlip(skeleton.bones.get(boneIndex), frames[frameIndex + 1] != 0); } - protected void flip (Skeleton skeleton, boolean flip) { - skeleton.setFlipX(flip); + protected void setFlip (Bone bone, boolean flip) { + bone.setFlipX(flip); } } @@ -822,8 +830,8 @@ public class Animation { super(frameCount); } - protected void flip (Skeleton skeleton, boolean flip) { - skeleton.setFlipY(flip); + protected void setFlip (Bone bone, boolean flip) { + bone.setFlipY(flip); } } } diff --git a/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java similarity index 99% rename from spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java index a298b2982..6872822f1 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java @@ -304,7 +304,7 @@ public class AnimationState { TrackEntry next, previous; Animation animation; boolean loop; - float delay, time, lastTime = -1, endTime, timeScale = 1; + float delay, time, lastTime = 0, endTime, timeScale = 1; float mixTime, mixDuration; AnimationStateListener listener; float mix = 1; diff --git a/spine-libgdx/src/com/esotericsoftware/spine/AnimationStateData.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationStateData.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/AnimationStateData.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationStateData.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/AnimationStatePR.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationStatePR.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/AnimationStatePR.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationStatePR.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/Bone.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java similarity index 88% rename from spine-libgdx/src/com/esotericsoftware/spine/Bone.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java index 6022a6fc3..46f672b05 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/Bone.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java @@ -43,11 +43,13 @@ public class Bone { float x, y; float rotation, rotationIK; float scaleX, scaleY; + boolean flipX, flipY; float m00, m01, worldX; // a b x float m10, m11, worldY; // c d y float worldRotation; float worldScaleX, worldScaleY; + boolean worldFlipX, worldFlipY; Bone (BoneData data) { this.data = data; @@ -78,6 +80,8 @@ public class Bone { rotationIK = bone.rotationIK; scaleX = bone.scaleX; scaleY = bone.scaleY; + flipX = bone.flipX; + flipY = bone.flipY; } /** Computes the world SRT using the parent bone and the local SRT. */ @@ -96,23 +100,28 @@ public class Bone { worldScaleY = scaleY; } worldRotation = data.inheritRotation ? parent.worldRotation + rotationIK : rotationIK; + worldFlipX = parent.worldFlipX ^ flipX; + worldFlipY = parent.worldFlipY ^ flipY; } else { - worldX = skeleton.flipX ? -x : x; - worldY = skeleton.flipY ? -y : y; + boolean skeletonFlipX = skeleton.flipX, skeletonFlipY = skeleton.flipY; + worldX = skeletonFlipX ? -x : x; + worldY = skeletonFlipY ? -y : y; worldScaleX = scaleX; worldScaleY = scaleY; worldRotation = rotationIK; + worldFlipX = skeletonFlipX ^ flipX; + worldFlipY = skeletonFlipY ^ flipY; } float cos = MathUtils.cosDeg(worldRotation); float sin = MathUtils.sinDeg(worldRotation); - if (skeleton.flipX) { + if (worldFlipX) { m00 = -cos * worldScaleX; m01 = sin * worldScaleY; } else { m00 = cos * worldScaleX; m01 = -sin * worldScaleY; } - if (skeleton.flipY) { + if (worldFlipY) { m10 = -sin * worldScaleX; m11 = -cos * worldScaleY; } else { @@ -129,6 +138,8 @@ public class Bone { rotationIK = rotation; scaleX = data.scaleX; scaleY = data.scaleY; + flipX = data.flipX; + flipY = data.flipY; } public BoneData getData () { @@ -208,6 +219,22 @@ public class Bone { scaleY = scale; } + public boolean getFlipX () { + return flipX; + } + + public void setFlipX (boolean flipX) { + this.flipX = flipX; + } + + public boolean getFlipY () { + return flipY; + } + + public void setFlipY (boolean flipY) { + this.flipY = flipY; + } + public float getM00 () { return m00; } @@ -244,6 +271,14 @@ public class Bone { return worldScaleY; } + public boolean getWorldFlipX () { + return worldFlipX; + } + + public boolean getWorldFlipY () { + return worldFlipY; + } + public Matrix3 getWorldTransform (Matrix3 worldTransform) { if (worldTransform == null) throw new IllegalArgumentException("worldTransform cannot be null."); float[] val = worldTransform.val; @@ -262,10 +297,9 @@ public class Bone { public Vector2 worldToLocal (Vector2 world) { float x = world.x - worldX, y = world.y - worldY; float m00 = this.m00, m10 = this.m10, m01 = this.m01, m11 = this.m11; - Skeleton skeleton = this.skeleton; - if (skeleton.flipX != skeleton.flipY) { - m00 *= -1; - m11 *= -1; + if (worldFlipX != worldFlipY) { + m00 = -m00; + m11 = -m11; } float invDet = 1 / (m00 * m11 - m01 * m10); world.x = (x * m00 * invDet - y * m01 * invDet); diff --git a/spine-libgdx/src/com/esotericsoftware/spine/BoneData.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/BoneData.java similarity index 93% rename from spine-libgdx/src/com/esotericsoftware/spine/BoneData.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/BoneData.java index 7ace0df16..37c5a5e6c 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/BoneData.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/BoneData.java @@ -39,6 +39,7 @@ public class BoneData { float x, y; float rotation; float scaleX = 1, scaleY = 1; + boolean flipX, flipY; boolean inheritScale = true, inheritRotation = true; // Nonessential. @@ -63,6 +64,8 @@ public class BoneData { rotation = bone.rotation; scaleX = bone.scaleX; scaleY = bone.scaleY; + flipX = bone.flipX; + flipY = bone.flipY; } /** @return May be null. */ @@ -132,6 +135,22 @@ public class BoneData { this.scaleY = scaleY; } + public boolean getFlipX () { + return flipX; + } + + public void setFlipX (boolean flipX) { + this.flipX = flipX; + } + + public boolean getFlipY () { + return flipY; + } + + public void setFlipY (boolean flipY) { + this.flipY = flipY; + } + public boolean getInheritScale () { return inheritScale; } diff --git a/spine-libgdx/src/com/esotericsoftware/spine/Event.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Event.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/Event.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Event.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/EventData.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/EventData.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/EventData.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/EventData.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/IkConstraint.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/IkConstraint.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/IkConstraint.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/IkConstraint.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/IkConstraintData.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/IkConstraintData.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/IkConstraintData.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/IkConstraintData.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java similarity index 96% rename from spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java index 1961d7e9b..c15b13bc8 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java @@ -117,16 +117,16 @@ public class Skeleton { /** Caches information about bones and IK constraints. Must be called if bones or IK constraints are added or removed. */ public void updateCache () { + Array bones = this.bones; Array> boneCache = this.boneCache; Array ikConstraints = this.ikConstraints; int ikConstraintsCount = ikConstraints.size; int arrayCount = ikConstraintsCount + 1; - boneCache.truncate(arrayCount); - for (int i = 0, n = boneCache.size; i < n; i++) - boneCache.get(i).clear(); while (boneCache.size < arrayCount) boneCache.add(new Array()); + for (int i = 0; i < arrayCount; i++) + boneCache.get(i).clear(); Array nonIkBones = boneCache.first(); @@ -164,7 +164,7 @@ public class Skeleton { } Array> boneCache = this.boneCache; Array ikConstraints = this.ikConstraints; - int i = 0, last = boneCache.size - 1; + int i = 0, last = ikConstraints.size; while (true) { Array updateBones = boneCache.get(i); for (int ii = 0, nn = updateBones.size; ii < nn; ii++) @@ -282,9 +282,9 @@ public class Skeleton { setSkin(skin); } - /** Sets the skin used to look up attachments not found 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. + /** 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. */ public void setSkin (Skin newSkin) { if (newSkin != null) { diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java similarity index 92% rename from spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java index e42849a9b..a7834d50a 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java @@ -46,6 +46,8 @@ import com.esotericsoftware.spine.Animation.CurveTimeline; import com.esotericsoftware.spine.Animation.DrawOrderTimeline; import com.esotericsoftware.spine.Animation.EventTimeline; import com.esotericsoftware.spine.Animation.FfdTimeline; +import com.esotericsoftware.spine.Animation.FlipXTimeline; +import com.esotericsoftware.spine.Animation.FlipYTimeline; import com.esotericsoftware.spine.Animation.IkConstraintTimeline; import com.esotericsoftware.spine.Animation.RotateTimeline; import com.esotericsoftware.spine.Animation.ScaleTimeline; @@ -66,10 +68,8 @@ public class SkeletonBinary { static public final int TIMELINE_TRANSLATE = 2; static public final int TIMELINE_ATTACHMENT = 3; static public final int TIMELINE_COLOR = 4; - static public final int TIMELINE_EVENT = 5; - static public final int TIMELINE_DRAWORDER = 6; - static public final int TIMELINE_FFD = 7; - static public final int TIMELINE_IK = 8; + static public final int TIMELINE_FLIPX = 5; + static public final int TIMELINE_FLIPY = 6; static public final int CURVE_LINEAR = 0; static public final int CURVE_STEPPED = 1; @@ -108,11 +108,19 @@ public class SkeletonBinary { DataInput input = new DataInput(file.read(512)); try { skeletonData.hash = input.readString(); + if (skeletonData.hash.isEmpty()) skeletonData.hash = null; skeletonData.version = input.readString(); + if (skeletonData.version.isEmpty()) skeletonData.version = null; skeletonData.width = input.readFloat(); skeletonData.height = input.readFloat(); boolean nonessential = input.readBoolean(); + + if (nonessential) { + skeletonData.imagesPath = input.readString(); + if (skeletonData.imagesPath.isEmpty()) skeletonData.imagesPath = null; + } + // Bones. for (int i = 0, n = input.readInt(true); i < n; i++) { String name = input.readString(); @@ -126,6 +134,8 @@ public class SkeletonBinary { boneData.scaleY = input.readFloat(); boneData.rotation = input.readFloat(); boneData.length = input.readFloat() * scale; + boneData.flipX = input.readBoolean(); + boneData.flipY = input.readBoolean(); boneData.inheritScale = input.readBoolean(); boneData.inheritRotation = input.readBoolean(); if (nonessential) Color.rgba8888ToColor(boneData.color, input.readInt()); @@ -134,13 +144,13 @@ public class SkeletonBinary { // IK constraints. for (int i = 0, n = input.readInt(true); i < n; i++) { - IkConstraintData ikConstraint = new IkConstraintData(input.readString()); + IkConstraintData ikConstraintData = new IkConstraintData(input.readString()); for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) - ikConstraint.bones.add(skeletonData.bones.get(input.readInt(true))); - ikConstraint.target = skeletonData.bones.get(input.readInt(true)); - ikConstraint.mix = input.readFloat(); - ikConstraint.bendDirection = input.readByte(); - skeletonData.ikConstraints.add(ikConstraint); + ikConstraintData.bones.add(skeletonData.bones.get(input.readInt(true))); + ikConstraintData.target = skeletonData.bones.get(input.readInt(true)); + ikConstraintData.mix = input.readFloat(); + ikConstraintData.bendDirection = input.readByte(); + skeletonData.ikConstraints.add(ikConstraintData); } // Slots. @@ -193,6 +203,7 @@ public class SkeletonBinary { return skeletonData; } + /** @return May be null. */ private Skin readSkin (DataInput input, String skinName, boolean nonessential) throws IOException { int slotCount = input.readInt(true); if (slotCount == 0) return null; @@ -385,7 +396,7 @@ public class SkeletonBinary { break; } case TIMELINE_TRANSLATE: - case TIMELINE_SCALE: + case TIMELINE_SCALE: { TranslateTimeline timeline; float timelineScale = 1; if (timelineType == TIMELINE_SCALE) @@ -404,12 +415,24 @@ public class SkeletonBinary { duration = Math.max(duration, timeline.getFrames()[frameCount * 3 - 3]); break; } + case TIMELINE_FLIPX: + case TIMELINE_FLIPY: { + FlipXTimeline timeline = timelineType == TIMELINE_FLIPX ? new FlipXTimeline(frameCount) : new FlipYTimeline( + frameCount); + timeline.boneIndex = boneIndex; + for (int frameIndex = 0; frameIndex < frameCount; frameIndex++) + timeline.setFrame(frameIndex, input.readFloat(), input.readBoolean()); + timelines.add(timeline); + duration = Math.max(duration, timeline.getFrames()[frameCount * 2 - 2]); + break; + } + } } } // IK timelines. for (int i = 0, n = input.readInt(true); i < n; i++) { - IkConstraintData ikConstraint = skeletonData.findIkConstraint(input.readString()); + IkConstraintData ikConstraint = skeletonData.ikConstraints.get(input.readInt(true)); int frameCount = input.readInt(true); IkConstraintTimeline timeline = new IkConstraintTimeline(frameCount); timeline.ikConstraintIndex = skeletonData.getIkConstraints().indexOf(ikConstraint, true); @@ -423,7 +446,7 @@ public class SkeletonBinary { // FFD timelines. for (int i = 0, n = input.readInt(true); i < n; i++) { - Skin skin = skeletonData.getSkins().get(input.readInt(true) + 1); + Skin skin = skeletonData.skins.get(input.readInt(true)); for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) { int slotIndex = input.readInt(true); for (int iii = 0, nnn = input.readInt(true); iii < nnn; iii++) { diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBounds.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBounds.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/SkeletonBounds.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBounds.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java similarity index 94% rename from spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java index 12026e133..a845e8ab6 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java @@ -42,7 +42,7 @@ public class SkeletonData { final Array animations = new Array(); final Array ikConstraints = new Array(); float width, height; - String version, hash; + String version, hash, imagesPath; // --- Bones. @@ -197,23 +197,36 @@ public class SkeletonData { this.height = height; } - /** Returns the Spine version used to export this data. */ + /** Returns the Spine version used to export this data, or null. */ public String getVersion () { return version; } + /** @param version May be null. */ public void setVersion (String version) { this.version = version; } + /** @return May be null. */ public String getHash () { return hash; } + /** @param hash May be null. */ public void setHash (String hash) { this.hash = hash; } + /** @return May be null. */ + public String getImagesPath () { + return imagesPath; + } + + /** @param imagesPath May be null. */ + public void setImagesPath (String imagesPath) { + this.imagesPath = imagesPath; + } + public String toString () { return name != null ? name : super.toString(); } diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java similarity index 94% rename from spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java index 985e3a62e..1bf073fae 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java @@ -30,12 +30,23 @@ package com.esotericsoftware.spine; +import com.badlogic.gdx.files.FileHandle; +import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.g2d.TextureAtlas; +import com.badlogic.gdx.utils.Array; +import com.badlogic.gdx.utils.FloatArray; +import com.badlogic.gdx.utils.IntArray; +import com.badlogic.gdx.utils.JsonReader; +import com.badlogic.gdx.utils.JsonValue; +import com.badlogic.gdx.utils.SerializationException; import com.esotericsoftware.spine.Animation.AttachmentTimeline; import com.esotericsoftware.spine.Animation.ColorTimeline; import com.esotericsoftware.spine.Animation.CurveTimeline; import com.esotericsoftware.spine.Animation.DrawOrderTimeline; import com.esotericsoftware.spine.Animation.EventTimeline; import com.esotericsoftware.spine.Animation.FfdTimeline; +import com.esotericsoftware.spine.Animation.FlipXTimeline; +import com.esotericsoftware.spine.Animation.FlipYTimeline; import com.esotericsoftware.spine.Animation.IkConstraintTimeline; import com.esotericsoftware.spine.Animation.RotateTimeline; import com.esotericsoftware.spine.Animation.ScaleTimeline; @@ -49,15 +60,6 @@ import com.esotericsoftware.spine.attachments.BoundingBoxAttachment; import com.esotericsoftware.spine.attachments.MeshAttachment; import com.esotericsoftware.spine.attachments.RegionAttachment; import com.esotericsoftware.spine.attachments.SkinnedMeshAttachment; -import com.badlogic.gdx.files.FileHandle; -import com.badlogic.gdx.graphics.Color; -import com.badlogic.gdx.graphics.g2d.TextureAtlas; -import com.badlogic.gdx.utils.Array; -import com.badlogic.gdx.utils.FloatArray; -import com.badlogic.gdx.utils.IntArray; -import com.badlogic.gdx.utils.JsonReader; -import com.badlogic.gdx.utils.JsonValue; -import com.badlogic.gdx.utils.SerializationException; public class SkeletonJson { private final AttachmentLoader attachmentLoader; @@ -93,10 +95,11 @@ public class SkeletonJson { // Skeleton. JsonValue skeletonMap = root.get("skeleton"); if (skeletonMap != null) { - skeletonData.hash = skeletonMap.getString("hash"); - skeletonData.version = skeletonMap.getString("spine"); - skeletonData.width = skeletonMap.getFloat("width"); - skeletonData.height = skeletonMap.getFloat("height"); + skeletonData.hash = skeletonMap.getString("hash", null); + skeletonData.version = skeletonMap.getString("spine", null); + skeletonData.width = skeletonMap.getFloat("width", 0); + skeletonData.height = skeletonMap.getFloat("height", 0); + skeletonData.imagesPath = skeletonMap.getString("images", null); } // Bones. @@ -114,6 +117,8 @@ public class SkeletonJson { boneData.rotation = boneMap.getFloat("rotation", 0); boneData.scaleX = boneMap.getFloat("scaleX", 1); boneData.scaleY = boneMap.getFloat("scaleY", 1); + boneData.flipX = boneMap.getBoolean("flipX", false); + boneData.flipY = boneMap.getBoolean("flipY", false); boneData.inheritScale = boneMap.getBoolean("inheritScale", true); boneData.inheritRotation = boneMap.getBoolean("inheritRotation", true); @@ -383,6 +388,20 @@ public class SkeletonJson { timelines.add(timeline); duration = Math.max(duration, timeline.getFrames()[timeline.getFrameCount() * 3 - 3]); + } else if (timelineName.equals("flipX") || timelineName.equals("flipY")) { + boolean x = timelineName.equals("flipX"); + FlipXTimeline timeline = x ? new FlipXTimeline(timelineMap.size) : new FlipYTimeline(timelineMap.size); + timeline.boneIndex = boneIndex; + + String field = x ? "x" : "y"; + int frameIndex = 0; + for (JsonValue valueMap = timelineMap.child; valueMap != null; valueMap = valueMap.next) { + timeline.setFrame(frameIndex, valueMap.getFloat("time"), valueMap.getBoolean(field, false)); + frameIndex++; + } + timelines.add(timeline); + duration = Math.max(duration, timeline.getFrames()[timeline.getFrameCount() * 2 - 2]); + } else throw new RuntimeException("Invalid timeline type for a bone: " + timelineName + " (" + boneMap.name + ")"); } @@ -459,7 +478,8 @@ public class SkeletonJson { } // Draw order timeline. - JsonValue drawOrdersMap = map.get("draworder"); + JsonValue drawOrdersMap = map.get("drawOrder"); + if (drawOrdersMap == null) drawOrdersMap = map.get("draworder"); if (drawOrdersMap != null) { DrawOrderTimeline timeline = new DrawOrderTimeline(drawOrdersMap.size); int slotCount = skeletonData.slots.size; diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRendererDebug.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRendererDebug.java similarity index 93% rename from spine-libgdx/src/com/esotericsoftware/spine/SkeletonRendererDebug.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRendererDebug.java index 1abaeac10..14083c5b0 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRendererDebug.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRendererDebug.java @@ -58,6 +58,8 @@ public class SkeletonRendererDebug { private boolean drawMeshHull = true, drawMeshTriangles = true; private final SkeletonBounds bounds = new SkeletonBounds(); private float scale = 1; + private float boneWidth = 2; + private boolean premultipliedAlpha; public SkeletonRendererDebug () { shapes = new ShapeRenderer(); @@ -72,21 +74,27 @@ public class SkeletonRendererDebug { float skeletonY = skeleton.getY(); Gdx.gl.glEnable(GL20.GL_BLEND); + int srcFunc = premultipliedAlpha ? GL20.GL_ONE : GL20.GL_SRC_ALPHA; + Gdx.gl.glBlendFunc(srcFunc, GL20.GL_ONE_MINUS_SRC_ALPHA); + ShapeRenderer shapes = this.shapes; - shapes.begin(ShapeType.Line); Array bones = skeleton.getBones(); if (drawBones) { shapes.setColor(boneLineColor); + shapes.begin(ShapeType.Filled); for (int i = 0, n = bones.size; i < n; i++) { Bone bone = bones.get(i); if (bone.parent == null) continue; float x = skeletonX + bone.data.length * bone.m00 + bone.worldX; float y = skeletonY + bone.data.length * bone.m10 + bone.worldY; - shapes.line(skeletonX + bone.worldX, skeletonY + bone.worldY, x, y); + shapes.rectLine(skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, boneWidth * scale); } + shapes.end(); + shapes.begin(ShapeType.Line); shapes.x(skeletonX, skeletonY, 4 * scale); - } + } else + shapes.begin(ShapeType.Line); if (drawRegionAttachments) { shapes.setColor(attachmentLineColor); @@ -207,4 +215,8 @@ public class SkeletonRendererDebug { public void setMeshTriangles (boolean meshTriangles) { this.drawMeshTriangles = meshTriangles; } + + public void setPremultipliedAlpha (boolean premultipliedAlpha) { + this.premultipliedAlpha = premultipliedAlpha; + } } diff --git a/spine-libgdx/src/com/esotericsoftware/spine/Skin.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java similarity index 94% rename from spine-libgdx/src/com/esotericsoftware/spine/Skin.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java index 77ce354d7..3fdc10980 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/Skin.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java @@ -30,11 +30,11 @@ package com.esotericsoftware.spine; -import com.esotericsoftware.spine.attachments.Attachment; - import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.ObjectMap; import com.badlogic.gdx.utils.ObjectMap.Entry; +import com.badlogic.gdx.utils.Pool; +import com.esotericsoftware.spine.attachments.Attachment; /** Stores attachments by slot index and attachment name. */ public class Skin { @@ -42,6 +42,11 @@ public class Skin { final String name; final ObjectMap attachments = new ObjectMap(); + final Pool keyPool = new Pool(64) { + protected Object newObject () { + return new Key(); + } + }; public Skin (String name) { if (name == null) throw new IllegalArgumentException("name cannot be null."); @@ -51,7 +56,7 @@ public class Skin { public void addAttachment (int slotIndex, String name, Attachment attachment) { if (attachment == null) throw new IllegalArgumentException("attachment cannot be null."); if (slotIndex < 0) throw new IllegalArgumentException("slotIndex must be >= 0."); - Key key = new Key(); + Key key = keyPool.obtain(); key.set(slotIndex, name); attachments.put(key, attachment); } @@ -78,6 +83,8 @@ public class Skin { } public void clear () { + for (Key key : attachments.keys()) + keyPool.free(key); attachments.clear(); } @@ -106,9 +113,9 @@ public class Skin { String name; int hashCode; - public void set (int slotName, String name) { + public void set (int slotIndex, String name) { if (name == null) throw new IllegalArgumentException("name cannot be null."); - this.slotIndex = slotName; + this.slotIndex = slotIndex; this.name = name; hashCode = 31 * (31 + name.hashCode()) + slotIndex; } diff --git a/spine-libgdx/src/com/esotericsoftware/spine/Slot.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Slot.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/Slot.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Slot.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SlotData.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SlotData.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/SlotData.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SlotData.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/AtlasAttachmentLoader.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/AtlasAttachmentLoader.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/AtlasAttachmentLoader.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/AtlasAttachmentLoader.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/Attachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/Attachment.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/Attachment.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/Attachment.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/AttachmentLoader.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/AttachmentLoader.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/AttachmentLoader.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/AttachmentLoader.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/AttachmentType.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/AttachmentType.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/AttachmentType.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/AttachmentType.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/BoundingBoxAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/BoundingBoxAttachment.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/BoundingBoxAttachment.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/BoundingBoxAttachment.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/MeshAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/MeshAttachment.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/MeshAttachment.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/MeshAttachment.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionAttachment.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionAttachment.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionAttachment.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionSequenceAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionSequenceAttachment.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionSequenceAttachment.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/RegionSequenceAttachment.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/SkeletonAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/SkeletonAttachment.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/SkeletonAttachment.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/SkeletonAttachment.java diff --git a/spine-libgdx/src/com/esotericsoftware/spine/attachments/SkinnedMeshAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/SkinnedMeshAttachment.java similarity index 100% rename from spine-libgdx/src/com/esotericsoftware/spine/attachments/SkinnedMeshAttachment.java rename to spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/SkinnedMeshAttachment.java diff --git a/spine-libgdx/spine-skeletonviewer/.classpath b/spine-libgdx/spine-skeletonviewer/.classpath new file mode 100644 index 000000000..22cde12f4 --- /dev/null +++ b/spine-libgdx/spine-skeletonviewer/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/spine-libgdx/spine-skeletonviewer/.project b/spine-libgdx/spine-skeletonviewer/.project new file mode 100644 index 000000000..7d23d2a34 --- /dev/null +++ b/spine-libgdx/spine-skeletonviewer/.project @@ -0,0 +1,17 @@ + + + spine-skeletonviewer + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/spine-libgdx/spine-skeletonviewer/.settings/org.eclipse.jdt.core.prefs b/spine-libgdx/spine-skeletonviewer/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..6a57c0f46 --- /dev/null +++ b/spine-libgdx/spine-skeletonviewer/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,99 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=ignore +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/spine-libgdx/spine-skeletonviewer/README.md b/spine-libgdx/spine-skeletonviewer/README.md new file mode 100644 index 000000000..06d84e042 --- /dev/null +++ b/spine-libgdx/spine-skeletonviewer/README.md @@ -0,0 +1,3 @@ +# spine-skeletonviewer + +Please see the [Skeleton Viewer documentation](http://esotericsoftware.com/spine-skeleton-viewer). \ No newline at end of file diff --git a/spine-libgdx/assets/skin/skin.atlas b/spine-libgdx/spine-skeletonviewer/assets/skin/skin.atlas similarity index 100% rename from spine-libgdx/assets/skin/skin.atlas rename to spine-libgdx/spine-skeletonviewer/assets/skin/skin.atlas diff --git a/spine-libgdx/assets/skin/skin.json b/spine-libgdx/spine-skeletonviewer/assets/skin/skin.json similarity index 100% rename from spine-libgdx/assets/skin/skin.json rename to spine-libgdx/spine-skeletonviewer/assets/skin/skin.json diff --git a/spine-libgdx/assets/skin/skin.png b/spine-libgdx/spine-skeletonviewer/assets/skin/skin.png similarity index 100% rename from spine-libgdx/assets/skin/skin.png rename to spine-libgdx/spine-skeletonviewer/assets/skin/skin.png diff --git a/spine-libgdx/test/com/esotericsoftware/spine/SkeletonViewer.java b/spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java similarity index 95% rename from spine-libgdx/test/com/esotericsoftware/spine/SkeletonViewer.java rename to spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java index 52a4d6e99..551cd91f6 100644 --- a/spine-libgdx/test/com/esotericsoftware/spine/SkeletonViewer.java +++ b/spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java @@ -53,6 +53,8 @@ import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion; import com.badlogic.gdx.graphics.g2d.TextureAtlas.TextureAtlasData; +import com.badlogic.gdx.graphics.glutils.ShapeRenderer; +import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.InputListener; @@ -71,6 +73,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.viewport.ScreenViewport; +import com.esotericsoftware.spine.AnimationState.TrackEntry; public class SkeletonViewer extends ApplicationAdapter { static final float checkModifiedInterval = 0.250f; @@ -202,6 +205,7 @@ public class SkeletonViewer extends ApplicationAdapter { delta = Math.min(delta, 0.032f) * ui.speedSlider.getValue(); skeleton.update(delta); + skeleton.setFlip(ui.flipXCheckbox.isChecked(), ui.flipYCheckbox.isChecked()); if (!ui.pauseButton.isChecked()) { state.update(delta); state.apply(skeleton); @@ -210,8 +214,6 @@ public class SkeletonViewer extends ApplicationAdapter { // skeleton.setPosition(0, 0); // skeleton.getRootBone().setX(skeletonX); // skeleton.getRootBone().setY(skeletonY); - skeleton.setFlipX(ui.flipXCheckbox.isChecked()); - skeleton.setFlipY(ui.flipYCheckbox.isChecked()); skeleton.updateWorldTransform(); batch.begin(); @@ -228,6 +230,21 @@ public class SkeletonViewer extends ApplicationAdapter { ui.stage.act(); ui.stage.draw(); + + // Draw indicator for timeline position. + if (state != null) { + ShapeRenderer shapes = debugRenderer.getShapeRenderer(); + TrackEntry entry = state.getCurrent(0); + if (entry != null) { + float percent = entry.getTime() / entry.getEndTime(); + if (entry.getLoop()) percent %= 1; + float x = ui.window.getRight() + (Gdx.graphics.getWidth() - ui.window.getRight()) * percent; + shapes.setColor(Color.CYAN); + shapes.begin(ShapeType.Line); + shapes.line(x, 0, x, 20); + shapes.end(); + } + } } public void resize (int width, int height) { diff --git a/spine-love/data/goblins.json b/spine-love/data/goblins.json deleted file mode 100644 index f1dcc96a0..000000000 --- a/spine-love/data/goblins.json +++ /dev/null @@ -1,499 +0,0 @@ -{ -"bones": [ - { "name": "root" }, - { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, - { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, - { "name": "left lower leg", "parent": "left upper leg", "length": 49.89, "x": 56.34, "y": 0.98, "rotation": -16.65 }, - { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 58.94, "y": -7.61, "rotation": 102.43 }, - { "name": "right upper leg", "parent": "hip", "length": 42.45, "x": -20.07, "y": -6.83, "rotation": -97.49 }, - { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 42.99, "y": -0.61, "rotation": -14.34 }, - { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, - { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 93.92 }, - { "name": "neck", "parent": "torso", "length": 18.38, "x": 81.67, "y": -6.34, "rotation": -1.51 }, - { "name": "head", "parent": "neck", "length": 68.28, "x": 20.93, "y": 11.59, "rotation": -13.92 }, - { "name": "right shoulder", "parent": "torso", "length": 37.24, "x": 76.02, "y": 18.14, "rotation": 133.88 }, - { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 37.6, "y": 0.31, "rotation": 36.32 }, - { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 }, - { "name": "left shoulder", "parent": "torso", "length": 35.43, "x": 74.04, "y": -20.38, "rotation": -156.96 }, - { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 37.85, "y": -2.34, "rotation": 28.16 }, - { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, - { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.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 item", "bone": "right hand", "attachment": "dagger" }, - { "name": "right hand", "bone": "right hand", "attachment": "right hand" } -], -"skins": { - "default": { - "left hand item": { - "dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 }, - "spear": { "x": -4.55, "y": 39.2, "rotation": 13.04, "width": 22, "height": 368 } - }, - "right hand item": { - "dagger": { "x": 6.51, "y": -24.15, "rotation": -8.06, "width": 26, "height": 108 } - } - }, - "goblin": { - "neck": { - "neck": { "name": "goblin/neck", "x": 10.1, "y": 0.42, "rotation": -93.69, "width": 36, "height": 41 } - }, - "undies": { - "undies": { "name": "goblin/undies", "x": 6.3, "y": 0.12, "rotation": 0.91, "width": 36, "height": 29 } - }, - "right hand": { - "right hand": { "name": "goblin/right-hand", "x": 7.88, "y": 2.78, "rotation": 91.96, "width": 36, "height": 37 } - }, - "right arm": { - "right arm": { "name": "goblin/right-arm", "x": 16.44, "y": -1.04, "rotation": 94.32, "width": 23, "height": 50 } - }, - "head": { - "head": { "name": "goblin/head", "x": 25.73, "y": 2.33, "rotation": -92.29, "width": 103, "height": 66 } - }, - "left shoulder": { - "left shoulder": { "name": "goblin/left-shoulder", "x": 15.56, "y": -2.26, "rotation": 62.01, "width": 29, "height": 44 } - }, - "left arm": { - "left arm": { - "name": "goblin/left-arm", - "x": 16.7, - "y": -1.69, - "scaleX": 1.057, - "scaleY": 1.057, - "rotation": 33.84, - "width": 37, - "height": 35 - } - }, - "left hand": { - "left hand": { - "name": "goblin/left-hand", - "x": 3.47, - "y": 3.41, - "scaleX": 0.892, - "scaleY": 0.892, - "rotation": 31.14, - "width": 36, - "height": 41 - } - }, - "right lower leg": { - "right lower leg": { "name": "goblin/right-lower-leg", "x": 25.68, "y": -3.15, "rotation": 111.83, "width": 36, "height": 76 } - }, - "right upper leg": { - "right upper leg": { "name": "goblin/right-upper-leg", "x": 20.35, "y": 1.47, "rotation": 97.49, "width": 34, "height": 63 } - }, - "pelvis": { - "pelvis": { "name": "goblin/pelvis", "x": -5.61, "y": 0.76, "width": 62, "height": 43 } - }, - "left lower leg": { - "left lower leg": { "name": "goblin/left-lower-leg", "x": 23.58, "y": -2.06, "rotation": 105.75, "width": 33, "height": 70 } - }, - "left upper leg": { - "left upper leg": { "name": "goblin/left-upper-leg", "x": 29.68, "y": -3.87, "rotation": 89.09, "width": 33, "height": 73 } - }, - "torso": { - "torso": { "name": "goblin/torso", "x": 38.09, "y": -3.87, "rotation": -94.95, "width": 68, "height": 96 } - }, - "right shoulder": { - "right shoulder": { "name": "goblin/right-shoulder", "x": 15.68, "y": -1.03, "rotation": 130.65, "width": 39, "height": 45 } - }, - "right foot": { - "right foot": { "name": "goblin/right-foot", "x": 23.56, "y": 9.8, "rotation": 1.52, "width": 63, "height": 33 } - }, - "left foot": { - "left foot": { "name": "goblin/left-foot", "x": 24.85, "y": 8.74, "rotation": 3.32, "width": 65, "height": 31 } - }, - "undie straps": { - "undie straps": { "name": "goblin/undie-straps", "x": -3.87, "y": 13.1, "scaleX": 1.089, "width": 55, "height": 19 } - }, - "eyes": { - "eyes closed": { "name": "goblin/eyes-closed", "x": 32.21, "y": -21.27, "rotation": -88.92, "width": 34, "height": 12 } - } - }, - "goblingirl": { - "left upper leg": { - "left upper leg": { "name": "goblingirl/left-upper-leg", "x": 30.21, "y": -2.95, "rotation": 89.09, "width": 33, "height": 70 } - }, - "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 foot": { - "left foot": { "name": "goblingirl/left-foot", "x": 25.17, "y": 7.92, "rotation": 3.32, "width": 65, "height": 31 } - }, - "right upper leg": { - "right upper leg": { "name": "goblingirl/right-upper-leg", "x": 19.69, "y": 2.13, "rotation": 97.49, "width": 34, "height": 63 } - }, - "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 foot": { - "right foot": { "name": "goblingirl/right-foot", "x": 23.46, "y": 9.66, "rotation": 1.52, "width": 63, "height": 33 } - }, - "torso": { - "torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.74, "width": 68, "height": 96 } - }, - "left shoulder": { - "left shoulder": { "name": "goblingirl/left-shoulder", "x": 19.8, "y": -0.42, "rotation": 61.21, "width": 28, "height": 46 } - }, - "left arm": { - "left arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.42, "rotation": 33.05, "width": 37, "height": 35 } - }, - "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 - } - }, - "neck": { - "neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.14, "rotation": -98.86, "width": 35, "height": 41 } - }, - "head": { - "head": { "name": "goblingirl/head", "x": 27.71, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 } - }, - "right shoulder": { - "right shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.45, "rotation": 129.85, "width": 39, "height": 45 } - }, - "right arm": { - "right arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.52, "width": 28, "height": 50 } - }, - "right hand": { - "right hand": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } - }, - "pelvis": { - "pelvis": { "name": "goblingirl/pelvis", "x": -3.87, "y": 3.18, "width": 62, "height": 43 } - }, - "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 } - }, - "eyes": { - "eyes closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.54, "rotation": -87.04, "width": 37, "height": 21 } - } - } -}, -"animations": { - "walk": { - "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.7 }, - { "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": 52.1 }, - { "time": 0.2333, "angle": 8.53 }, - { "time": 0.5, "angle": -16.93 }, - { "time": 0.6333, "angle": 1.89 }, - { - "time": 0.7333, - "angle": 28.06, - "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": -22.98 }, - { "time": 0.1333, "angle": -63.5 }, - { "time": 0.2333, "angle": -73.76 }, - { "time": 0.5, "angle": 5.11 }, - { "time": 0.6333, "angle": -28.29 }, - { "time": 0.7333, "angle": 4.08 }, - { "time": 0.8666, "angle": 3.53 }, - { "time": 1, "angle": -22.98 } - ], - "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": -3.69 }, - { "time": 0.1333, "angle": -10.42 }, - { "time": 0.2333, "angle": -5.01 }, - { "time": 0.3666, "angle": 3.87 }, - { "time": 0.5, "angle": -3.87 }, - { "time": 0.6333, "angle": 2.78 }, - { "time": 0.7333, "angle": 1.68 }, - { "time": 0.8666, "angle": -8.54 }, - { "time": 1, "angle": -3.69 } - ] - }, - "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": -1.29, "y": 1.68 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": -5.25 }, - { "time": 0.2333, "angle": -1.91 }, - { "time": 0.3666, "angle": -6.45 }, - { "time": 0.5, "angle": -5.39 }, - { "time": 0.7333, "angle": -11.68 }, - { "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": -45.53, - "curve": [ 0.229, 0, 0.738, 0.97 ] - }, - { "time": 0.2333, "angle": -4.83 }, - { "time": 0.5, "angle": -19.53 }, - { "time": 0.6333, "angle": -64.8 }, - { - "time": 0.7333, - "angle": -82.56, - "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": -4.16 }, - { - "time": 0.1333, - "x": 0, - "y": -7.05, - "curve": [ 0.359, 0.47, 0.646, 0.74 ] - }, - { "time": 0.3666, "x": 0, "y": 6.78 }, - { "time": 0.5, "x": 0, "y": -6.13 }, - { - "time": 0.6333, - "x": 0, - "y": -7.05, - "curve": [ 0.359, 0.47, 0.646, 0.74 ] - }, - { "time": 0.8666, "x": 0, "y": 6.78 }, - { "time": 1, "x": 0, "y": -4.16 } - ] - }, - "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 } - ] - } - }, - "slots": { - "eyes": { - "attachment": [ - { "time": 0.7, "name": "eyes closed" }, - { "time": 0.8, "name": null } - ] - } - } - } -} -} \ No newline at end of file diff --git a/spine-love/data/head.png b/spine-love/data/head.png deleted file mode 100644 index 5a98aa37a..000000000 Binary files a/spine-love/data/head.png and /dev/null differ diff --git a/spine-love/data/images/eye_indifferent.png b/spine-love/data/images/eye_indifferent.png new file mode 100644 index 000000000..1d29940ff Binary files /dev/null and b/spine-love/data/images/eye_indifferent.png differ diff --git a/spine-love/data/images/eye_surprised.png b/spine-love/data/images/eye_surprised.png new file mode 100644 index 000000000..f411f9432 Binary files /dev/null and b/spine-love/data/images/eye_surprised.png differ diff --git a/spine-love/data/eyes-closed.png b/spine-love/data/images/eyes-closed.png similarity index 100% rename from spine-love/data/eyes-closed.png rename to spine-love/data/images/eyes-closed.png diff --git a/spine-love/data/eyes.png b/spine-love/data/images/eyes.png similarity index 100% rename from spine-love/data/eyes.png rename to spine-love/data/images/eyes.png diff --git a/spine-love/data/images/front_bracer.png b/spine-love/data/images/front_bracer.png new file mode 100644 index 000000000..aa0fca6fd Binary files /dev/null and b/spine-love/data/images/front_bracer.png differ diff --git a/spine-love/data/images/front_fist_closed.png b/spine-love/data/images/front_fist_closed.png new file mode 100644 index 000000000..eb8b24217 Binary files /dev/null and b/spine-love/data/images/front_fist_closed.png differ diff --git a/spine-love/data/images/front_fist_open.png b/spine-love/data/images/front_fist_open.png new file mode 100644 index 000000000..c950492d7 Binary files /dev/null and b/spine-love/data/images/front_fist_open.png differ diff --git a/spine-love/data/images/front_foot.png b/spine-love/data/images/front_foot.png new file mode 100644 index 000000000..69ea494c3 Binary files /dev/null and b/spine-love/data/images/front_foot.png differ diff --git a/spine-love/data/images/front_foot_bend1.png b/spine-love/data/images/front_foot_bend1.png new file mode 100644 index 000000000..6cbc1ffcc Binary files /dev/null and b/spine-love/data/images/front_foot_bend1.png differ diff --git a/spine-love/data/images/front_foot_bend2.png b/spine-love/data/images/front_foot_bend2.png new file mode 100644 index 000000000..e6b3942c7 Binary files /dev/null and b/spine-love/data/images/front_foot_bend2.png differ diff --git a/spine-love/data/images/front_shin.png b/spine-love/data/images/front_shin.png new file mode 100644 index 000000000..e63bef05b Binary files /dev/null and b/spine-love/data/images/front_shin.png differ diff --git a/spine-love/data/images/front_thigh.png b/spine-love/data/images/front_thigh.png new file mode 100644 index 000000000..91dbd8df5 Binary files /dev/null and b/spine-love/data/images/front_thigh.png differ diff --git a/spine-love/data/images/front_upper_arm.png b/spine-love/data/images/front_upper_arm.png new file mode 100644 index 000000000..49d16d286 Binary files /dev/null and b/spine-love/data/images/front_upper_arm.png differ diff --git a/spine-love/data/images/goggles.png b/spine-love/data/images/goggles.png new file mode 100644 index 000000000..7eb52b9db Binary files /dev/null and b/spine-love/data/images/goggles.png differ diff --git a/spine-love/data/images/gun.png b/spine-love/data/images/gun.png new file mode 100644 index 000000000..2ba05f556 Binary files /dev/null and b/spine-love/data/images/gun.png differ diff --git a/spine-love/data/images/head.png b/spine-love/data/images/head.png new file mode 100644 index 000000000..2d7f66abf Binary files /dev/null and b/spine-love/data/images/head.png differ diff --git a/spine-love/data/left-ankle.png b/spine-love/data/images/left-ankle.png similarity index 100% rename from spine-love/data/left-ankle.png rename to spine-love/data/images/left-ankle.png diff --git a/spine-love/data/left-arm.png b/spine-love/data/images/left-arm.png similarity index 100% rename from spine-love/data/left-arm.png rename to spine-love/data/images/left-arm.png diff --git a/spine-love/data/left-foot.png b/spine-love/data/images/left-foot.png similarity index 100% rename from spine-love/data/left-foot.png rename to spine-love/data/images/left-foot.png diff --git a/spine-love/data/left-hand.png b/spine-love/data/images/left-hand.png similarity index 100% rename from spine-love/data/left-hand.png rename to spine-love/data/images/left-hand.png diff --git a/spine-love/data/left-lower-leg.png b/spine-love/data/images/left-lower-leg.png similarity index 100% rename from spine-love/data/left-lower-leg.png rename to spine-love/data/images/left-lower-leg.png diff --git a/spine-love/data/left-pant-bottom.png b/spine-love/data/images/left-pant-bottom.png similarity index 100% rename from spine-love/data/left-pant-bottom.png rename to spine-love/data/images/left-pant-bottom.png diff --git a/spine-love/data/left-shoulder.png b/spine-love/data/images/left-shoulder.png similarity index 100% rename from spine-love/data/left-shoulder.png rename to spine-love/data/images/left-shoulder.png diff --git a/spine-love/data/left-upper-leg.png b/spine-love/data/images/left-upper-leg.png similarity index 100% rename from spine-love/data/left-upper-leg.png rename to spine-love/data/images/left-upper-leg.png diff --git a/spine-love/data/images/mouth_grind.png b/spine-love/data/images/mouth_grind.png new file mode 100644 index 000000000..60046ab92 Binary files /dev/null and b/spine-love/data/images/mouth_grind.png differ diff --git a/spine-love/data/images/mouth_oooo.png b/spine-love/data/images/mouth_oooo.png new file mode 100644 index 000000000..e3dc2b1e2 Binary files /dev/null and b/spine-love/data/images/mouth_oooo.png differ diff --git a/spine-love/data/images/mouth_smile.png b/spine-love/data/images/mouth_smile.png new file mode 100644 index 000000000..7a2276ee5 Binary files /dev/null and b/spine-love/data/images/mouth_smile.png differ diff --git a/spine-love/data/images/muzzle.png b/spine-love/data/images/muzzle.png new file mode 100644 index 000000000..6d53f3ad8 Binary files /dev/null and b/spine-love/data/images/muzzle.png differ diff --git a/spine-love/data/images/neck.png b/spine-love/data/images/neck.png new file mode 100644 index 000000000..544ea1ed2 Binary files /dev/null and b/spine-love/data/images/neck.png differ diff --git a/spine-love/data/pelvis.png b/spine-love/data/images/pelvis.png similarity index 100% rename from spine-love/data/pelvis.png rename to spine-love/data/images/pelvis.png diff --git a/spine-love/data/images/rear_bracer.png b/spine-love/data/images/rear_bracer.png new file mode 100644 index 000000000..06b9c9cd7 Binary files /dev/null and b/spine-love/data/images/rear_bracer.png differ diff --git a/spine-love/data/images/rear_foot.png b/spine-love/data/images/rear_foot.png new file mode 100644 index 000000000..6fdf9ad60 Binary files /dev/null and b/spine-love/data/images/rear_foot.png differ diff --git a/spine-love/data/images/rear_foot_bend1.png b/spine-love/data/images/rear_foot_bend1.png new file mode 100644 index 000000000..10f2a72e9 Binary files /dev/null and b/spine-love/data/images/rear_foot_bend1.png differ diff --git a/spine-love/data/images/rear_foot_bend2.png b/spine-love/data/images/rear_foot_bend2.png new file mode 100644 index 000000000..01dff6265 Binary files /dev/null and b/spine-love/data/images/rear_foot_bend2.png differ diff --git a/spine-love/data/images/rear_shin.png b/spine-love/data/images/rear_shin.png new file mode 100644 index 000000000..02335c263 Binary files /dev/null and b/spine-love/data/images/rear_shin.png differ diff --git a/spine-love/data/images/rear_thigh.png b/spine-love/data/images/rear_thigh.png new file mode 100644 index 000000000..d5da9f15d Binary files /dev/null and b/spine-love/data/images/rear_thigh.png differ diff --git a/spine-love/data/images/rear_upper_arm.png b/spine-love/data/images/rear_upper_arm.png new file mode 100644 index 000000000..52d3a9ef5 Binary files /dev/null and b/spine-love/data/images/rear_upper_arm.png differ diff --git a/spine-love/data/right-ankle.png b/spine-love/data/images/right-ankle.png similarity index 100% rename from spine-love/data/right-ankle.png rename to spine-love/data/images/right-ankle.png diff --git a/spine-love/data/right-arm.png b/spine-love/data/images/right-arm.png similarity index 100% rename from spine-love/data/right-arm.png rename to spine-love/data/images/right-arm.png diff --git a/spine-love/data/right-foot-idle.png b/spine-love/data/images/right-foot-idle.png similarity index 100% rename from spine-love/data/right-foot-idle.png rename to spine-love/data/images/right-foot-idle.png diff --git a/spine-love/data/right-foot.png b/spine-love/data/images/right-foot.png similarity index 100% rename from spine-love/data/right-foot.png rename to spine-love/data/images/right-foot.png diff --git a/spine-love/data/right-hand.png b/spine-love/data/images/right-hand.png similarity index 100% rename from spine-love/data/right-hand.png rename to spine-love/data/images/right-hand.png diff --git a/spine-love/data/right-lower-leg.png b/spine-love/data/images/right-lower-leg.png similarity index 100% rename from spine-love/data/right-lower-leg.png rename to spine-love/data/images/right-lower-leg.png diff --git a/spine-love/data/right-pant-bottom.png b/spine-love/data/images/right-pant-bottom.png similarity index 100% rename from spine-love/data/right-pant-bottom.png rename to spine-love/data/images/right-pant-bottom.png diff --git a/spine-love/data/right-shoulder.png b/spine-love/data/images/right-shoulder.png similarity index 100% rename from spine-love/data/right-shoulder.png rename to spine-love/data/images/right-shoulder.png diff --git a/spine-love/data/right-upper-leg.png b/spine-love/data/images/right-upper-leg.png similarity index 100% rename from spine-love/data/right-upper-leg.png rename to spine-love/data/images/right-upper-leg.png diff --git a/spine-love/data/images/torso.png b/spine-love/data/images/torso.png new file mode 100644 index 000000000..c38b2ef45 Binary files /dev/null and b/spine-love/data/images/torso.png differ diff --git a/spine-love/data/neck.png b/spine-love/data/neck.png deleted file mode 100644 index c7b938863..000000000 Binary files a/spine-love/data/neck.png and /dev/null differ diff --git a/spine-love/data/spineboy.json b/spine-love/data/spineboy.json index 113e72c33..408b1d87e 100644 --- a/spine-love/data/spineboy.json +++ b/spine-love/data/spineboy.json @@ -1,1002 +1 @@ -{ -"bones": [ - { "name": "root" }, - { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, - { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, - { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, - { "name": "right upper leg", "parent": "hip", "length": 45.76, "x": -18.27, "rotation": -101.13 }, - { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 94.95 }, - { "name": "left lower leg", "parent": "left upper leg", "length": 56.45, "x": 51.78, "y": 3.46, "rotation": -16.65 }, - { "name": "left shoulder", "parent": "torso", "length": 44.19, "x": 78.96, "y": -15.75, "rotation": -156.96 }, - { "name": "neck", "parent": "torso", "length": 18.38, "x": 83.64, "y": -1.78, "rotation": 0.9 }, - { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 50.21, "y": 0.6, "rotation": -10.7 }, - { "name": "right shoulder", "parent": "torso", "length": 49.95, "x": 81.9, "y": 6.79, "rotation": 130.6 }, - { "name": "head", "parent": "neck", "length": 68.28, "x": 19.09, "y": 6.97, "rotation": -8.94 }, - { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 44.19, "y": -0.01, "rotation": 28.16 }, - { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 64.02, "y": -8.67, "rotation": 102.43 }, - { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 49.95, "y": -0.12, "rotation": 40.12 }, - { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, - { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, - { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } -], -"slots": [ - { "name": "left shoulder", "bone": "left shoulder", "attachment": "left-shoulder" }, - { "name": "left arm", "bone": "left arm", "attachment": "left-arm" }, - { "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": "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": "right upper leg", "bone": "right upper leg", "attachment": "right-upper-leg" }, - { "name": "torso", "bone": "torso", "attachment": "torso" }, - { "name": "neck", "bone": "neck", "attachment": "neck" }, - { "name": "head", "bone": "head", "attachment": "head" }, - { "name": "eyes", "bone": "head", "attachment": "eyes" }, - { "name": "right shoulder", "bone": "right shoulder", "attachment": "right-shoulder", "additive": true }, - { "name": "right arm", "bone": "right arm", "attachment": "right-arm" }, - { "name": "right hand", "bone": "right hand", "attachment": "right-hand" }, - { "name": "bb-head", "bone": "head", "attachment": "bb-head" } -], -"skins": { - "default": { - "bb-head": { - "bb-head": { - "type": "boundingbox", - "vertices": [ - 55.69696, - -44.60648, - 8.2226715, - -47.609646, - -11.244263, - -32.942703, - -0.05206299, - 35.835804, - 61.018433, - 43.227512, - 90.35846, - -16.054127, - 115.41275, - -32.817406, - 78.29431, - -56.05409 - ] - } - }, - "eyes": { - "eyes": { "x": 28.94, "y": -32.92, "rotation": -86.9, "width": 34, "height": 27 }, - "eyes-closed": { "x": 28.77, "y": -32.86, "rotation": -86.9, "width": 34, "height": 27 } - }, - "head": { - "head": { "x": 53.94, "y": -5.75, "rotation": -86.9, "width": 121, "height": 132 } - }, - "left arm": { - "left-arm": { "x": 15.11, "y": -0.44, "rotation": 33.84, "width": 35, "height": 29 } - }, - "left foot": { - "left-foot": { "x": 24.35, "y": 8.88, "rotation": 3.32, "width": 65, "height": 30 } - }, - "left hand": { - "left-hand": { "x": 0.75, "y": 1.86, "rotation": 31.14, "width": 35, "height": 38 } - }, - "left lower leg": { - "left-lower-leg": { "x": 24.55, "y": -1.92, "rotation": 105.75, "width": 49, "height": 64 } - }, - "left shoulder": { - "left-shoulder": { "x": 23.74, "y": 0.11, "rotation": 62.01, "width": 34, "height": 53 } - }, - "left upper leg": { - "left-upper-leg": { "x": 26.12, "y": -1.85, "rotation": 89.09, "width": 33, "height": 67 } - }, - "neck": { - "neck": { "x": 9.42, "y": -3.66, "rotation": -100.15, "width": 34, "height": 28 } - }, - "pelvis": { - "pelvis": { "x": -4.83, "y": 10.62, "width": 63, "height": 47 } - }, - "right arm": { - "right-arm": { "x": 18.34, "y": -2.64, "rotation": 94.32, "width": 21, "height": 45 } - }, - "right foot": { - "right-foot": { "x": 19.02, "y": 8.47, "rotation": 1.52, "width": 67, "height": 30 } - }, - "right hand": { - "right-hand": { "x": 6.82, "y": 1.25, "rotation": 91.96, "width": 32, "height": 32 } - }, - "right lower leg": { - "right-lower-leg": { "x": 23.28, "y": -2.59, "rotation": 111.83, "width": 51, "height": 64 } - }, - "right shoulder": { - "right-shoulder": { "x": 25.86, "y": 0.03, "rotation": 134.44, "width": 52, "height": 51 } - }, - "right upper leg": { - "right-upper-leg": { "x": 23.03, "y": 0.25, "rotation": 101.13, "width": 44, "height": 70 } - }, - "torso": { - "torso": { "x": 44.57, "y": -7.08, "rotation": -94.95, "width": 68, "height": 92 } - } - } -}, -"events": { - "behind": {}, - "headAttach": {}, - "headPop": {} -}, -"animations": { - "drawOrder": { - "bones": { - "head": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4827, "angle": -23.11 }, - { "time": 0.8965, "angle": -56.45 }, - { "time": 1.3103, "angle": 1.38 }, - { "time": 1.7931, "angle": 36.12 }, - { "time": 2.1379, "angle": 1.24 }, - { "time": 2.6206, "angle": -37.12 }, - { "time": 2.9666, "angle": 2.07 }, - { "time": 3.4666, "angle": 34.72 }, - { "time": 3.9, "angle": 359.99 } - ], - "translate": [ - { - "time": 0, - "x": 0, - "y": 0, - "curve": [ 0.19, 0.4, 0.586, 0.75 ] - }, - { - "time": 0.2758, - "x": 57.88, - "y": -35.72, - "curve": [ 0.39, 0.54, 0.632, 0.72 ] - }, - { - "time": 0.4827, - "x": 87.26, - "y": -87.89, - "curve": [ 0.325, 0.23, 0.587, 0.36 ] - }, - { - "time": 0.6896, - "x": 28.89, - "y": -114.62, - "curve": [ 0.383, 0.23, 0.736, 0.55 ] - }, - { - "time": 0.8965, - "x": -76.58, - "y": -124.98, - "curve": [ 0.129, 0.21, 0.547, 0.64 ] - }, - { - "time": 1.1034, - "x": -154.37, - "y": -77.13, - "curve": [ 0.354, 0.48, 0.729, 0.9 ] - }, - { - "time": 1.3103, - "x": -181.02, - "y": 18.56, - "curve": [ 0.063, 0.15, 0.52, 0.62 ] - }, - { - "time": 1.5862, - "x": -150.38, - "y": 128.67, - "curve": [ 0.381, 0.54, 0.778, 1 ] - }, - { - "time": 1.7931, - "x": -112.08, - "y": 146.28, - "curve": [ 0.242, 0, 0.626, 0.45 ] - }, - { - "time": 1.931, - "x": -63.7, - "y": 111.22, - "curve": [ 0.398, 0.35, 0.786, 0.76 ] - }, - { - "time": 2.1379, - "x": -48.94, - "y": -1.55, - "curve": [ 0.188, 0.21, 0.575, 0.61 ] - }, - { - "time": 2.3448, - "x": -91.69, - "y": -91.93, - "curve": [ 0.362, 0.51, 0.766, 1 ] - }, - { - "time": 2.6206, - "x": -142.79, - "y": -126.83, - "curve": [ 0.227, 0.34, 0.593, 0.75 ] - }, - { - "time": 2.7586, - "x": -176.7, - "y": -98.32, - "curve": [ 0.26, 0.4, 0.612, 0.71 ] - }, - { - "time": 2.8965, - "x": -163.95, - "y": -24.04, - "curve": [ 0.338, 0.37, 0.676, 0.71 ] - }, - { - "time": 2.9655, - "x": -150.17, - "y": 10.71, - "curve": [ 0.387, 0.61, 0.741, 1 ] - }, - { - "time": 3.1034, - "x": -102.44, - "y": 45.92, - "curve": [ 0.31, 0.24, 0.648, 0.58 ] - }, - { - "time": 3.2413, - "x": -53.99, - "y": 70.39, - "curve": [ 0.325, 0.29, 0.663, 0.63 ] - }, - { - "time": 3.3793, - "x": 1.88, - "y": 55.54, - "curve": [ 0.387, 0.33, 0.769, 0.73 ] - }, - { - "time": 3.5862, - "x": 34.26, - "y": 36.13, - "curve": [ 0.206, 0.28, 0.596, 0.67 ] - }, - { - "time": 3.7931, - "x": 23.94, - "y": 1.01, - "curve": [ 0.373, 0.56, 0.759, 1 ] - }, - { "time": 4, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0.8275, "x": 1, "y": 1 }, - { "time": 1.3103, "x": 0.742, "y": 0.742 }, - { "time": 1.7931, "x": 1, "y": 1 }, - { "time": 2.1379, "x": 1.502, "y": 1.502 }, - { "time": 2.6206, "x": 1, "y": 1 }, - { "time": 2.9655, "x": 0.707, "y": 0.707 }, - { "time": 3.3793, "x": 1, "y": 1 } - ] - } - }, - "events": [ - { "time": 0, "name": "headPop", "string": "pop.wav" }, - { "time": 1.3103, "name": "behind" }, - { "time": 2.9655, "name": "behind" }, - { "time": 4, "name": "headAttach", "string": "attach.wav" } - ], - "draworder": [ - { - "time": 0.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { - "time": 1.7931, - "offsets": [ - { "slot": "head", "offset": 3 }, - { "slot": "eyes", "offset": 3 } - ] - }, - { - "time": 2.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { "time": 3.5862 } - ] - }, - "jump": { - "bones": { - "hip": { - "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 0.9333, "angle": 0, "curve": "stepped" }, - { "time": 1.3666, "angle": 0 } - ], - "translate": [ - { "time": 0, "x": -11.57, "y": -3 }, - { "time": 0.2333, "x": -16.2, "y": -19.43 }, - { - "time": 0.3333, - "x": 7.66, - "y": -8.48, - "curve": [ 0.057, 0.06, 0.712, 1 ] - }, - { "time": 0.3666, "x": 15.38, "y": 5.01 }, - { "time": 0.4666, "x": -7.84, "y": 57.22 }, - { - "time": 0.6, - "x": -10.81, - "y": 96.34, - "curve": [ 0.241, 0, 1, 1 ] - }, - { "time": 0.7333, "x": -7.01, "y": 54.7 }, - { "time": 0.8, "x": -10.58, "y": 32.2 }, - { "time": 0.9333, "x": -31.99, "y": 0.45 }, - { "time": 1.0666, "x": -12.48, "y": -29.47 }, - { "time": 1.3666, "x": -11.57, "y": -3 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left upper leg": { - "rotate": [ - { "time": 0, "angle": 17.13 }, - { "time": 0.2333, "angle": 44.35 }, - { "time": 0.3333, "angle": 16.46 }, - { "time": 0.4, "angle": -9.88 }, - { "time": 0.4666, "angle": -11.42 }, - { "time": 0.5666, "angle": 23.46 }, - { "time": 0.7666, "angle": 71.82 }, - { "time": 0.9333, "angle": 65.53 }, - { "time": 1.0666, "angle": 51.01 }, - { "time": 1.3666, "angle": 17.13 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 0.9333, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 1.3666, "x": -3, "y": -2.25 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -16.25 }, - { "time": 0.2333, "angle": -52.21 }, - { "time": 0.4, "angle": 15.04 }, - { "time": 0.4666, "angle": -8.95 }, - { "time": 0.5666, "angle": -39.53 }, - { "time": 0.7666, "angle": -27.27 }, - { "time": 0.9333, "angle": -3.52 }, - { "time": 1.0666, "angle": -61.92 }, - { "time": 1.3666, "angle": -16.25 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": 0.33 }, - { "time": 0.2333, "angle": 6.2 }, - { "time": 0.3333, "angle": 14.73 }, - { "time": 0.4, "angle": -15.54 }, - { "time": 0.4333, "angle": -21.2 }, - { "time": 0.5666, "angle": -7.55 }, - { "time": 0.7666, "angle": -0.67 }, - { "time": 0.9333, "angle": -0.58 }, - { "time": 1.0666, "angle": 14.64 }, - { "time": 1.3666, "angle": 0.33 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 25.97 }, - { "time": 0.2333, "angle": 46.43 }, - { "time": 0.3333, "angle": 22.61 }, - { "time": 0.4, "angle": 2.13 }, - { - "time": 0.4666, - "angle": 0.04, - "curve": [ 0, 0, 0.637, 0.98 ] - }, - { "time": 0.6, "angle": 65.55 }, - { "time": 0.7666, "angle": 64.93 }, - { "time": 0.9333, "angle": 41.08 }, - { "time": 1.0666, "angle": 66.25 }, - { "time": 1.3666, "angle": 25.97 } - ], - "translate": [ - { "time": 0, "x": 5.74, "y": 0.61 }, - { "time": 0.2333, "x": 4.79, "y": 1.79 }, - { "time": 0.3333, "x": 6.05, "y": -4.55 }, - { "time": 0.9333, "x": 4.79, "y": 1.79, "curve": "stepped" }, - { "time": 1.0666, "x": 4.79, "y": 1.79 }, - { "time": 1.3666, "x": 5.74, "y": 0.61 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -27.46 }, - { "time": 0.2333, "angle": -64.03 }, - { "time": 0.4, "angle": -48.36 }, - { "time": 0.5666, "angle": -76.86 }, - { "time": 0.7666, "angle": -26.89 }, - { "time": 0.9, "angle": -18.97 }, - { "time": 0.9333, "angle": -14.18 }, - { "time": 1.0666, "angle": -80.45 }, - { "time": 1.3666, "angle": -27.46 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": 1.08 }, - { "time": 0.2333, "angle": 16.02 }, - { "time": 0.3, "angle": 12.94 }, - { "time": 0.3333, "angle": 15.16 }, - { "time": 0.4, "angle": -14.7 }, - { "time": 0.4333, "angle": -12.85 }, - { "time": 0.4666, "angle": -19.18 }, - { "time": 0.5666, "angle": -15.82 }, - { "time": 0.6, "angle": -3.59 }, - { "time": 0.7666, "angle": -3.56 }, - { "time": 0.9333, "angle": 1.86 }, - { "time": 1.0666, "angle": 16.02 }, - { "time": 1.3666, "angle": 1.08 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -13.35 }, - { "time": 0.2333, "angle": -48.95 }, - { "time": 0.4333, "angle": -35.77 }, - { "time": 0.6, "angle": -4.59 }, - { "time": 0.7666, "angle": 14.61 }, - { "time": 0.9333, "angle": 15.74 }, - { "time": 1.0666, "angle": -32.44 }, - { "time": 1.3666, "angle": -13.35 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 0.9333, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 1.3666, "x": -3.67, "y": 1.68 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 12.78 }, - { "time": 0.2333, "angle": 16.46 }, - { "time": 0.4, "angle": 26.49 }, - { "time": 0.6, "angle": 15.51 }, - { "time": 0.7666, "angle": 1.34 }, - { "time": 0.9333, "angle": 2.35 }, - { "time": 1.0666, "angle": 6.08 }, - { "time": 1.3, "angle": 21.23 }, - { "time": 1.3666, "angle": 12.78 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "head": { - "rotate": [ - { "time": 0, "angle": 5.19 }, - { "time": 0.2333, "angle": 20.27 }, - { "time": 0.4, "angle": 15.27 }, - { "time": 0.6, "angle": -24.69 }, - { "time": 0.7666, "angle": -11.02 }, - { "time": 0.9333, "angle": -24.38 }, - { "time": 1.0666, "angle": 11.99 }, - { "time": 1.3, "angle": 4.86 }, - { "time": 1.3666, "angle": 5.19 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left shoulder": { - "rotate": [ - { - "time": 0, - "angle": 0.05, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": 279.66, - "curve": [ 0.218, 0.67, 0.66, 0.99 ] - }, - { - "time": 0.5, - "angle": 62.27, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": 28.91 }, - { "time": 1.0666, "angle": -8.62 }, - { "time": 1.1666, "angle": -18.43 }, - { "time": 1.3666, "angle": 0.05 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 0.9333, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 1.3666, "x": -1.76, "y": 0.56 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left hand": { - "rotate": [ - { "time": 0, "angle": 11.58, "curve": "stepped" }, - { "time": 0.9333, "angle": 11.58, "curve": "stepped" }, - { "time": 1.3666, "angle": 11.58 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": 0.51 }, - { "time": 0.4333, "angle": 12.82 }, - { "time": 0.6, "angle": 47.55 }, - { "time": 0.9333, "angle": 12.82 }, - { "time": 1.1666, "angle": -6.5 }, - { "time": 1.3666, "angle": 0.51 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 43.82, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": -8.74, - "curve": [ 0.304, 0.58, 0.709, 0.97 ] - }, - { - "time": 0.5333, - "angle": -208.02, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": -246.72 }, - { "time": 1.0666, "angle": -307.13 }, - { "time": 1.1666, "angle": 37.15 }, - { "time": 1.3666, "angle": 43.82 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 0.9333, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 1.3666, "x": -7.84, "y": 7.19 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right arm": { - "rotate": [ - { "time": 0, "angle": -4.02 }, - { "time": 0.6, "angle": 17.5 }, - { "time": 0.9333, "angle": -4.02 }, - { "time": 1.1666, "angle": -16.72 }, - { "time": 1.3666, "angle": -4.02 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92, "curve": "stepped" }, - { "time": 0.9333, "angle": 22.92, "curve": "stepped" }, - { "time": 1.3666, "angle": 22.92 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "root": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4333, "angle": -14.52 }, - { "time": 0.8, "angle": 9.86 }, - { "time": 1.3666, "angle": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - } - } - }, - "walk": { - "bones": { - "left upper leg": { - "rotate": [ - { "time": 0, "angle": -26.55 }, - { "time": 0.1333, "angle": -8.78 }, - { "time": 0.2666, "angle": 9.51 }, - { "time": 0.4, "angle": 30.74 }, - { "time": 0.5333, "angle": 25.33 }, - { "time": 0.6666, "angle": 26.11 }, - { "time": 0.8, "angle": -7.7 }, - { "time": 0.9333, "angle": -21.19 }, - { "time": 1.0666, "angle": -26.55 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25 }, - { "time": 0.4, "x": -2.18, "y": -2.25 }, - { "time": 1.0666, "x": -3, "y": -2.25 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 42.45 }, - { "time": 0.1333, "angle": 52.1 }, - { "time": 0.2666, "angle": 5.96 }, - { "time": 0.5333, "angle": -16.93 }, - { "time": 0.6666, "angle": 1.89 }, - { - "time": 0.8, - "angle": 28.06, - "curve": [ 0.462, 0.11, 1, 1 ] - }, - { - "time": 0.9333, - "angle": 58.68, - "curve": [ 0.5, 0.02, 1, 1 ] - }, - { "time": 1.0666, "angle": 42.45 } - ], - "translate": [ - { "time": 0, "x": 8.11, "y": -2.36 }, - { "time": 0.1333, "x": 10.03, "y": -2.56 }, - { "time": 0.4, "x": 2.76, "y": -2.97 }, - { "time": 0.5333, "x": 2.76, "y": -2.81 }, - { "time": 0.9333, "x": 8.67, "y": -2.54 }, - { "time": 1.0666, "x": 8.11, "y": -2.36 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -10.21 }, - { "time": 0.1333, "angle": -55.64 }, - { "time": 0.2666, "angle": -68.12 }, - { "time": 0.5333, "angle": 5.11 }, - { "time": 0.6666, "angle": -28.29 }, - { "time": 0.8, "angle": 4.08 }, - { "time": 0.9333, "angle": 3.53 }, - { "time": 1.0666, "angle": -10.21 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": -3.69 }, - { "time": 0.1333, "angle": -10.42 }, - { "time": 0.2666, "angle": -17.14 }, - { "time": 0.4, "angle": -2.83 }, - { "time": 0.5333, "angle": -3.87 }, - { "time": 0.6666, "angle": 2.78 }, - { "time": 0.8, "angle": 1.68 }, - { "time": 0.9333, "angle": -8.54 }, - { "time": 1.0666, "angle": -3.69 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 20.89, - "curve": [ 0.264, 0, 0.75, 1 ] - }, - { - "time": 0.1333, - "angle": 3.72, - "curve": [ 0.272, 0, 0.841, 1 ] - }, - { "time": 0.6666, "angle": -278.28 }, - { "time": 1.0666, "angle": 20.89 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19 }, - { "time": 0.1333, "x": -6.36, "y": 6.42 }, - { "time": 0.6666, "x": -11.07, "y": 5.25 }, - { "time": 1.0666, "x": -7.84, "y": 7.19 } - ] - }, - "right arm": { - "rotate": [ - { - "time": 0, - "angle": -4.02, - "curve": [ 0.267, 0, 0.804, 0.99 ] - }, - { - "time": 0.1333, - "angle": -13.99, - "curve": [ 0.341, 0, 1, 1 ] - }, - { - "time": 0.6666, - "angle": 36.54, - "curve": [ 0.307, 0, 0.787, 0.99 ] - }, - { "time": 1.0666, "angle": -4.02 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92 }, - { "time": 0.4, "angle": -8.97 }, - { "time": 0.6666, "angle": 0.51 }, - { "time": 1.0666, "angle": 22.92 } - ] - }, - "left shoulder": { - "rotate": [ - { "time": 0, "angle": -1.47 }, - { "time": 0.1333, "angle": 13.6 }, - { "time": 0.6666, "angle": 280.74 }, - { "time": 1.0666, "angle": -1.47 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56 }, - { "time": 0.6666, "x": -2.47, "y": 8.14 }, - { "time": 1.0666, "x": -1.76, "y": 0.56 } - ] - }, - "left hand": { - "rotate": [ - { - "time": 0, - "angle": 11.58, - "curve": [ 0.169, 0.37, 0.632, 1.55 ] - }, - { - "time": 0.1333, - "angle": 28.13, - "curve": [ 0.692, 0, 0.692, 0.99 ] - }, - { - "time": 0.6666, - "angle": -27.42, - "curve": [ 0.117, 0.41, 0.738, 1.76 ] - }, - { "time": 0.8, "angle": -36.32 }, - { "time": 1.0666, "angle": 11.58 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": -8.27 }, - { "time": 0.1333, "angle": 18.43 }, - { "time": 0.6666, "angle": 0.88 }, - { "time": 1.0666, "angle": -8.27 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -10.28 }, - { - "time": 0.1333, - "angle": -15.38, - "curve": [ 0.545, 0, 1, 1 ] - }, - { - "time": 0.4, - "angle": -9.78, - "curve": [ 0.58, 0.17, 1, 1 ] - }, - { "time": 0.6666, "angle": -15.75 }, - { "time": 0.9333, "angle": -7.06 }, - { "time": 1.0666, "angle": -10.28 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68 }, - { "time": 0.1333, "x": -3.67, "y": 0.68 }, - { "time": 0.4, "x": -3.67, "y": 1.97 }, - { "time": 0.6666, "x": -3.67, "y": -0.14 }, - { "time": 1.0666, "x": -3.67, "y": 1.68 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": -5.25 }, - { "time": 0.2666, "angle": -4.08 }, - { "time": 0.4, "angle": -6.45 }, - { "time": 0.5333, "angle": -5.39 }, - { "time": 0.8, "angle": -11.68 }, - { "time": 0.9333, "angle": 0.46 }, - { "time": 1.0666, "angle": -5.25 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -3.39 }, - { "time": 0.1333, "angle": -45.53 }, - { "time": 0.2666, "angle": -2.59 }, - { "time": 0.5333, "angle": -19.53 }, - { "time": 0.6666, "angle": -64.8 }, - { - "time": 0.8, - "angle": -82.56, - "curve": [ 0.557, 0.18, 1, 1 ] - }, - { "time": 1.0666, "angle": -3.39 } - ] - }, - "hip": { - "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 1.0666, "angle": 0 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0 }, - { - "time": 0.1333, - "x": 0, - "y": -7.61, - "curve": [ 0.272, 0.86, 1, 1 ] - }, - { "time": 0.4, "x": 0, "y": 8.7 }, - { "time": 0.5333, "x": 0, "y": -0.41 }, - { - "time": 0.6666, - "x": 0, - "y": -7.05, - "curve": [ 0.235, 0.89, 1, 1 ] - }, - { "time": 0.8, "x": 0, "y": 2.92 }, - { "time": 0.9333, "x": 0, "y": 6.78 }, - { "time": 1.0666, "x": 0, "y": 0 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 3.6 }, - { "time": 0.1333, "angle": 17.49 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { "time": 0.5333, "angle": 5.17 }, - { "time": 0.6666, "angle": 18.36 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } - ] - }, - "head": { - "rotate": [ - { - "time": 0, - "angle": 3.6, - "curve": [ 0, 0, 0.704, 1.61 ] - }, - { "time": 0.1666, "angle": -0.2 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { - "time": 0.5333, - "angle": 5.17, - "curve": [ 0, 0, 0.704, 1.61 ] - }, - { "time": 0.7, "angle": 1.1 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } - ] - } - } - } -} -} \ No newline at end of file +{"skeleton":{"hash":"K7WPVqF4PZ8L4jRHQe10IDN6xJI","spine":"2.1.03","width":470.64,"height":731.52},"bones":[{"name":"hip","y":247.47},{"name":"front_thigh","parent":"hip","length":74.8,"x":-17.45,"y":-11.64,"rotation":-95.51},{"name":"rear_thigh","parent":"hip","length":85.71,"x":8.91,"y":-5.62,"rotation":-72.54},{"name":"torso","parent":"hip","length":127.55,"x":-1.61,"y":4.9,"rotation":103.82},{"name":"front_shin","parent":"front_thigh","length":128.76,"x":78.69,"y":1.6,"rotation":-2.21,"inheritScale":false},{"name":"front_upper_arm","parent":"torso","length":69.45,"x":103.75,"y":19.32,"rotation":168.37},{"name":"neck","parent":"torso","length":25.45,"x":127.49,"y":-0.3,"rotation":-31.53},{"name":"rear_shin","parent":"rear_thigh","length":121.87,"x":86.1,"y":-1.32,"rotation":-19.83},{"name":"rear_upper_arm","parent":"torso","length":51.93,"x":92.35,"y":-19.22,"rotation":-169.55},{"name":"front_bracer","parent":"front_upper_arm","length":40.57,"x":68.8,"y":-0.68,"rotation":18.29},{"name":"front_foot","parent":"front_shin","length":91.34,"x":128.75,"y":-0.33,"rotation":77.9},{"name":"head","parent":"neck","length":263.57,"x":27.66,"y":-0.25,"rotation":23.18},{"name":"rear_bracer","parent":"rear_upper_arm","length":34.55,"x":51.35,"rotation":23.15},{"name":"rear_foot","parent":"rear_shin","length":82.57,"x":121.45,"y":-0.75,"rotation":69.3},{"name":"front_fist","parent":"front_bracer","length":65.38,"x":40.56,"y":0.19,"rotation":12.43},{"name":"gun","parent":"rear_bracer","length":43.1,"x":34.42,"y":-0.45,"rotation":5.34},{"name":"gunTip","parent":"gun","x":201.04,"y":52.13,"rotation":6.83}],"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","additive":true},{"name":"head-bb","bone":"head"},{"name":"headbb","bone":"head","attachment":"headbb"}],"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","vertices":[-19.143097,-70.30209,40.80313,-118.074234,257.77155,-115.61827,285.16193,57.18005,120.77191,164.95125,-5.067627,76.94907]}},"headbb":{"headbb":{"type":"boundingbox","vertices":[-12.554413,-54.026264,23.48825,-101.27528,231.95355,-109.845566,274.80518,49.916832,181.1228,122.143875,83.208466,133.12569,2.8721924,56.44203]}},"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":{"attachment":[{"time":0.1333,"name":"muzzle"},{"time":0.2666,"name":null}],"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"}]}},"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-love/data/torso.png b/spine-love/data/torso.png deleted file mode 100644 index d5a318e72..000000000 Binary files a/spine-love/data/torso.png and /dev/null differ diff --git a/spine-love/main.lua b/spine-love/main.lua index 8da69e065..e28bee4e7 100644 --- a/spine-love/main.lua +++ b/spine-love/main.lua @@ -31,16 +31,16 @@ local spine = require "spine-love.spine" local json = spine.SkeletonJson.new() -json.scale = 1 +json.scale = 0.6 local skeletonData = json:readSkeletonDataFile("data/spineboy.json") local skeleton = spine.Skeleton.new(skeletonData) function skeleton:createImage (attachment) -- Customize where images are loaded. - return love.graphics.newImage("data/" .. attachment.name .. ".png") + return love.graphics.newImage("data/images/" .. attachment.name .. ".png") end skeleton.x = love.graphics.getWidth() / 2 -skeleton.y = love.graphics.getHeight() / 2 + 150 +skeleton.y = love.graphics.getHeight() / 2 + 250 skeleton.flipX = false skeleton.flipY = false skeleton.debugBones = true -- Omit or set to false to not draw debug lines on top of the images. @@ -50,13 +50,14 @@ skeleton:setToSetupPose() -- AnimationStateData defines crossfade durations between animations. local stateData = spine.AnimationStateData.new(skeletonData) stateData:setMix("walk", "jump", 0.2) -stateData:setMix("jump", "walk", 0.4) +stateData:setMix("jump", "run", 0.2) -- AnimationState has a queue of animations and can apply them with crossfading. local state = spine.AnimationState.new(stateData) -state:setAnimationByName(0, "drawOrder") -state:addAnimationByName(0, "jump", false, 0) -state:addAnimationByName(0, "walk", true, 0) +-- state:setAnimationByName(0, "test") +state:setAnimationByName(0, "walk", true) +state:addAnimationByName(0, "jump", true, 3) +state:addAnimationByName(0, "run", true, 0) state.onStart = function (trackIndex) print(trackIndex.." start: "..state:getCurrent(trackIndex).animation.name) diff --git a/spine-love/spine-love/spine.lua b/spine-love/spine-love/spine.lua index b577b609a..894355d0e 100644 --- a/spine-love/spine-love/spine.lua +++ b/spine-love/spine-love/spine.lua @@ -35,11 +35,15 @@ spine.SkeletonJson = require "spine-lua.SkeletonJson" spine.SkeletonData = require "spine-lua.SkeletonData" spine.BoneData = require "spine-lua.BoneData" spine.SlotData = require "spine-lua.SlotData" +spine.IkConstraintData = require "spine-lua.IkConstraintData" spine.Skin = require "spine-lua.Skin" spine.RegionAttachment = require "spine-lua.RegionAttachment" +spine.MeshAttachment = require "spine-lua.MeshAttachment" +spine.SkinnedMeshAttachment = require "spine-lua.SkinnedMeshAttachment" spine.Skeleton = require "spine-lua.Skeleton" spine.Bone = require "spine-lua.Bone" spine.Slot = require "spine-lua.Slot" +spine.IkConstraint = require "spine-lua.IkConstraint" spine.AttachmentType = require "spine-lua.AttachmentType" spine.AttachmentLoader = require "spine-lua.AttachmentLoader" spine.Animation = require "spine-lua.Animation" diff --git a/spine-lua/Animation.lua b/spine-lua/Animation.lua index 3e23b3a8c..3c6b2ed23 100644 --- a/spine-lua/Animation.lua +++ b/spine-lua/Animation.lua @@ -83,6 +83,22 @@ local function binarySearch (values, target, step) end end +local function binarySearch1 (values, target) + local low = 0 + local high = math.floor(#values - 1) + if high == 0 then return 1 end + local current = math.floor(high / 2) + while true do + if values[current + 1] <= target then + low = current + 1 + else + high = current + end + if low == high then return low + 1 end + current = math.floor((low + high) / 2) + end +end + local function linearSearch (values, target, step) for i = 0, #values, step do if (values[i] > target) then return i end @@ -93,72 +109,89 @@ end Animation.CurveTimeline = {} function Animation.CurveTimeline.new () local LINEAR = 0 - local STEPPED = -1 + local STEPPED = 1 + local BEZIER = 2; local BEZIER_SEGMENTS = 10 + local BEZIER_SIZE = BEZIER_SEGMENTS * 2 - 1 local self = { - curves = {} + curves = {} -- type, x, y, ... } function self:setLinear (frameIndex) - self.curves[frameIndex * 6] = LINEAR + self.curves[frameIndex * BEZIER_SIZE] = LINEAR end function self:setStepped (frameIndex) - self.curves[frameIndex * 6] = STEPPED + self.curves[frameIndex * BEZIER_SIZE] = STEPPED end function self:setCurve (frameIndex, cx1, cy1, cx2, cy2) - local subdiv_step = 1 / BEZIER_SEGMENTS - local subdiv_step2 = subdiv_step * subdiv_step - local subdiv_step3 = subdiv_step2 * subdiv_step - local pre1 = 3 * subdiv_step - local pre2 = 3 * subdiv_step2 - local pre4 = 6 * subdiv_step2 - local pre5 = 6 * subdiv_step3 + local subdiv1 = 1 / BEZIER_SEGMENTS + local subdiv2 = subdiv1 * subdiv1 + local subdiv3 = subdiv2 * subdiv1; + local pre1 = 3 * subdiv1 + local pre2 = 3 * subdiv2 + local pre4 = 6 * subdiv2 + local pre5 = 6 * subdiv3 local tmp1x = -cx1 * 2 + cx2 local tmp1y = -cy1 * 2 + cy2 local tmp2x = (cx1 - cx2) * 3 + 1 local tmp2y = (cy1 - cy2) * 3 + 1 - local i = frameIndex * 6 - local curves = self.curves - curves[i] = cx1 * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3 - curves[i + 1] = cy1 * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3 - curves[i + 2] = tmp1x * pre4 + tmp2x * pre5 - curves[i + 3] = tmp1y * pre4 + tmp2y * pre5 - curves[i + 4] = tmp2x * pre5 - curves[i + 5] = tmp2y * pre5 - end + local dfx = cx1 * pre1 + tmp1x * pre2 + tmp2x * subdiv3 + local dfy = cy1 * pre1 + tmp1y * pre2 + tmp2y * subdiv3 + local ddfx = tmp1x * pre4 + tmp2x * pre5 + local ddfy = tmp1y * pre4 + tmp2y * pre5; + local dddfx = tmp2x * pre5 + local dddfy = tmp2y * pre5 - function self:getCurvePercent (frameIndex, percent) - local curveIndex = frameIndex * 6 + local i = frameIndex * BEZIER_SIZE local curves = self.curves - local dfx = curves[curveIndex] - if not dfx then return percent end -- linear - if dfx == STEPPED then return 0 end - local dfy = curves[curveIndex + 1] - local ddfx = curves[curveIndex + 2] - local ddfy = curves[curveIndex + 3] - local dddfx = curves[curveIndex + 4] - local dddfy = curves[curveIndex + 5] + curves[i] = BEZIER + i = i + 1 + local x = dfx local y = dfy - local i = BEZIER_SEGMENTS - 2 - while true do - if x >= percent then - local lastX = x - dfx - local lastY = y - dfy - return lastY + (y - lastY) * (percent - lastX) / (x - lastX) - end - if i == 0 then break end - i = i - 1 + local n = i + BEZIER_SIZE - 1 + while i < n do + curves[i] = x + curves[i + 1] = y dfx = dfx + ddfx dfy = dfy + ddfy ddfx = ddfx + dddfx ddfy = ddfy + dddfy x = x + dfx y = y + dfy + i = i + 2 end + end + + function self:getCurvePercent (frameIndex, percent) + local curves = self.curves + local i = frameIndex * BEZIER_SIZE + local type = curves[i] + if type == LINEAR then return percent end + if type == STEPPED then return 0 end + i = i + 1 + local x + local n = i + BEZIER_SIZE - 1 + local start = i + while i < n do + x = curves[i] + if x >= percent then + local prevX, prevY + if i == start then + prevX = 0 + prevY = 0 + else + prevX = curves[i - 2] + prevY = curves[i - 1] + end + return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX) + end + i = i + 2 + end + local y = curves[i - 1] return y + (1 - y) * (percent - x) / (1 - x) -- Last point is 1,1. end @@ -167,7 +200,7 @@ end Animation.RotateTimeline = {} function Animation.RotateTimeline.new () - local LAST_FRAME_TIME = -2 + local PREV_FRAME_TIME = -2 local FRAME_VALUE = 1 local self = Animation.CurveTimeline.new() @@ -208,20 +241,20 @@ function Animation.RotateTimeline.new () -- Interpolate between the last frame and the current frame. local frameIndex = binarySearch(frames, time, 2) - local lastFrameValue = frames[frameIndex - 1] + local prevFrameValue = frames[frameIndex - 1] local frameTime = frames[frameIndex] - local percent = 1 - (time - frameTime) / (frames[frameIndex + LAST_FRAME_TIME] - frameTime) + local percent = 1 - (time - frameTime) / (frames[frameIndex + PREV_FRAME_TIME] - frameTime) if percent < 0 then percent = 0 elseif percent > 1 then percent = 1 end percent = self:getCurvePercent(frameIndex / 2 - 1, percent) - local amount = frames[frameIndex + FRAME_VALUE] - lastFrameValue + local amount = frames[frameIndex + FRAME_VALUE] - prevFrameValue while amount > 180 do amount = amount - 360 end while amount < -180 do amount = amount + 360 end - amount = bone.data.rotation + (lastFrameValue + amount * percent) - bone.rotation + amount = bone.data.rotation + (prevFrameValue + amount * percent) - bone.rotation while amount > 180 do amount = amount - 360 end @@ -236,7 +269,7 @@ end Animation.TranslateTimeline = {} function Animation.TranslateTimeline.new () - local LAST_FRAME_TIME = -3 + local PREV_FRAME_TIME = -3 local FRAME_X = 1 local FRAME_Y = 2 @@ -273,15 +306,15 @@ function Animation.TranslateTimeline.new () -- Interpolate between the last frame and the current frame. local frameIndex = binarySearch(frames, time, 3) - local lastFrameX = frames[frameIndex - 2] - local lastFrameY = frames[frameIndex - 1] + local prevFrameX = frames[frameIndex - 2] + local prevFrameY = frames[frameIndex - 1] local frameTime = frames[frameIndex] - local percent = 1 - (time - frameTime) / (frames[frameIndex + LAST_FRAME_TIME] - frameTime) + local percent = 1 - (time - frameTime) / (frames[frameIndex + PREV_FRAME_TIME] - frameTime) if percent < 0 then percent = 0 elseif percent > 1 then percent = 1 end percent = self:getCurvePercent(frameIndex / 3 - 1, percent) - bone.x = bone.x + (bone.data.x + lastFrameX + (frames[frameIndex + FRAME_X] - lastFrameX) * percent - bone.x) * alpha - bone.y = bone.y + (bone.data.y + lastFrameY + (frames[frameIndex + FRAME_Y] - lastFrameY) * percent - bone.y) * alpha + bone.x = bone.x + (bone.data.x + prevFrameX + (frames[frameIndex + FRAME_X] - prevFrameX) * percent - bone.x) * alpha + bone.y = bone.y + (bone.data.y + prevFrameY + (frames[frameIndex + FRAME_Y] - prevFrameY) * percent - bone.y) * alpha end return self @@ -289,7 +322,7 @@ end Animation.ScaleTimeline = {} function Animation.ScaleTimeline.new () - local LAST_FRAME_TIME = -3 + local PREV_FRAME_TIME = -3 local FRAME_X = 1 local FRAME_Y = 2 @@ -309,15 +342,15 @@ function Animation.ScaleTimeline.new () -- Interpolate between the last frame and the current frame. local frameIndex = binarySearch(frames, time, 3) - local lastFrameX = frames[frameIndex - 2] - local lastFrameY = frames[frameIndex - 1] + local prevFrameX = frames[frameIndex - 2] + local prevFrameY = frames[frameIndex - 1] local frameTime = frames[frameIndex] - local percent = 1 - (time - frameTime) / (frames[frameIndex + LAST_FRAME_TIME] - frameTime) + local percent = 1 - (time - frameTime) / (frames[frameIndex + PREV_FRAME_TIME] - frameTime) if percent < 0 then percent = 0 elseif percent > 1 then percent = 1 end percent = self:getCurvePercent(frameIndex / 3 - 1, percent) - bone.scaleX = bone.scaleX + (bone.data.scaleX * (lastFrameX + (frames[frameIndex + FRAME_X] - lastFrameX) * percent) - bone.scaleX) * alpha - bone.scaleY = bone.scaleY + (bone.data.scaleY * (lastFrameY + (frames[frameIndex + FRAME_Y] - lastFrameY) * percent) - bone.scaleY) * alpha + bone.scaleX = bone.scaleX + (bone.data.scaleX * (prevFrameX + (frames[frameIndex + FRAME_X] - prevFrameX) * percent) - bone.scaleX) * alpha + bone.scaleY = bone.scaleY + (bone.data.scaleY * (prevFrameY + (frames[frameIndex + FRAME_Y] - prevFrameY) * percent) - bone.scaleY) * alpha end return self @@ -325,7 +358,7 @@ end Animation.ColorTimeline = {} function Animation.ColorTimeline.new () - local LAST_FRAME_TIME = -5 + local PREV_FRAME_TIME = -5 local FRAME_R = 1 local FRAME_G = 2 local FRAME_B = 3 @@ -365,19 +398,19 @@ function Animation.ColorTimeline.new () else -- Interpolate between the last frame and the current frame. local frameIndex = binarySearch(frames, time, 5) - local lastFrameR = frames[frameIndex - 4] - local lastFrameG = frames[frameIndex - 3] - local lastFrameB = frames[frameIndex - 2] - local lastFrameA = frames[frameIndex - 1] + local prevFrameR = frames[frameIndex - 4] + local prevFrameG = frames[frameIndex - 3] + local prevFrameB = frames[frameIndex - 2] + local prevFrameA = frames[frameIndex - 1] local frameTime = frames[frameIndex] - local percent = 1 - (time - frameTime) / (frames[frameIndex + LAST_FRAME_TIME] - frameTime) + local percent = 1 - (time - frameTime) / (frames[frameIndex + PREV_FRAME_TIME] - frameTime) if percent < 0 then percent = 0 elseif percent > 255 then percent = 255 end percent = self:getCurvePercent(frameIndex / 5 - 1, percent) - r = lastFrameR + (frames[frameIndex + FRAME_R] - lastFrameR) * percent - g = lastFrameG + (frames[frameIndex + FRAME_G] - lastFrameG) * percent - b = lastFrameB + (frames[frameIndex + FRAME_B] - lastFrameB) * percent - a = lastFrameA + (frames[frameIndex + FRAME_A] - lastFrameA) * percent + r = prevFrameR + (frames[frameIndex + FRAME_R] - prevFrameR) * percent + g = prevFrameG + (frames[frameIndex + FRAME_G] - prevFrameG) * percent + b = prevFrameB + (frames[frameIndex + FRAME_B] - prevFrameB) * percent + a = prevFrameA + (frames[frameIndex + FRAME_A] - prevFrameA) * percent end local slot = skeleton.slots[self.slotIndex] if alpha < 1 then @@ -393,7 +426,7 @@ end Animation.AttachmentTimeline = {} function Animation.AttachmentTimeline.new () local self = { - frames = {}, + frames = {}, -- time, ... attachmentNames = {}, slotName = nil } @@ -413,14 +446,20 @@ function Animation.AttachmentTimeline.new () function self:apply (skeleton, lastTime, time, firedEvents, alpha) local frames = self.frames - if time < frames[0] then return end -- Time is before first frame. + if time < frames[0] then + if lastTime > time then self:apply(skeleton, lastTime, 999999, nil, 0) end + return + elseif lastTime > time then + lastTime = -1 + end local frameIndex - if time >= frames[#frames] then -- Time is after last frame. + if time >= frames[#frames] then frameIndex = #frames else - frameIndex = binarySearch(frames, time, 1) - 1 + frameIndex = binarySearch1(frames, time) - 1 end + if frames[frameIndex] < lastTime then return end local attachmentName = self.attachmentNames[frameIndex] local slot = skeleton.slotsByName[self.slotName] @@ -463,7 +502,7 @@ function Animation.EventTimeline.new () if not firedEvents then return end local frames = self.frames - local frameCount = #frames + local frameCount = #frames + 1 if lastTime > time then -- Fire events after last time for looped animations. self:apply(skeleton, lastTime, 999999, firedEvents, alpha) @@ -477,7 +516,7 @@ function Animation.EventTimeline.new () if lastTime < frames[0] then frameIndex = 0 else - frameIndex = binarySearch(frames, lastTime, 1) + frameIndex = binarySearch1(frames, lastTime) local frame = frames[frameIndex] while frameIndex > 0 do -- Fire multiple events with the same frame. if frames[frameIndex - 1] ~= frame then break end @@ -522,7 +561,7 @@ function Animation.DrawOrderTimeline.new () if time >= frames[#frames] then -- Time is after last frame. frameIndex = #frames else - frameIndex = binarySearch(frames, time, 1) - 1 + frameIndex = binarySearch1(frames, time) - 1 end local drawOrder = skeleton.drawOrder @@ -542,4 +581,197 @@ function Animation.DrawOrderTimeline.new () return self end +Animation.FfdTimeline = {} +function Animation.FfdTimeline.new () + local self = Animation.CurveTimeline.new() + self.frames = {} -- time, ... + self.frameVertices = {} + self.slotIndex = -1 + + function self:getDuration () + return self.frames[#self.frames] + end + + function self:getFrameCount () + return #self.frames + 1 + end + + function self:setFrame (frameIndex, time, vertices) + self.frames[frameIndex] = time + self.frameVertices[frameIndex] = vertices + end + + function self:apply (skeleton, lastTime, time, firedEvents, alpha) + local slot = skeleton.slots[self.slotIndex] + if slot.attachment ~= attachment then return end + + local frames = self.frames + if time < frames[0] then return end -- Time is before first frame. + + local frameVertices = self.frameVertices + local vertexCount = #frameVertices[0] + local vertices = slot.attachmentVertices + if #vertices < vertexCount then + vertices = {} + slot.attachmentVertices = vertices + elseif #vertices < vertexCount then + alpha = 1 -- Don't mix from uninitialized slot vertices. + end + slot.attachmentVerticesCount = vertexCount + + if time >= frames[#frames] then -- Time is after last frame. + local lastVertices = frameVertices[#frames] + if alpha < 1 then + for i = 0, vertexCount do + local vertex = vertices[i] + vertices[i] = vertex + (lastVertices[i] - vertex) * alpha + end + else + for i = 0, vertexCount do + vertices[i] = lastVertices[i] + end + end + return + end + + -- Interpolate between the previous frame and the current frame. + local frameIndex = binarySearch1(frames, time) + local frameTime = frames[frameIndex] + local percent = 1 - (time - frameTime) / (frames[frameIndex - 1] - frameTime) + if percent < 0 then percent = 0 elseif percent > 1 then percent = 1 end + percent = self:getCurvePercent(frameIndex - 1, percent) + + local prevVertices = frameVertices[frameIndex - 1] + local nextVertices = frameVertices[frameIndex] + + if alpha < 1 then + for i = 0, vertexCount do + local prev = prevVertices[i] + local vertices = vertices[i] + vertices[i] = vertices + (prev + (nextVertices[i] - prev) * percent - vertices) * alpha + end + else + for i = 0, vertexCount do + local prev = prevVertices[i] + vertices[i] = prev + (nextVertices[i] - prev) * percent + end + end + end + + return self +end + +Animation.IkConstraintTimeline = {} +function Animation.IkConstraintTimeline.new () + local PREV_FRAME_TIME = -3 + local PREV_FRAME_MIX = -2 + local PREV_FRAME_BEND_DIRECTION = -1 + local FRAME_MIX = 1 + + local self = Animation.CurveTimeline.new() + self.frames = {} -- time, mix, bendDirection, ... + self.ikConstraintIndex = -1 + + function self:getDuration () + return self.frames[#self.frames - 2] + end + + function self:getFrameCount () + return (#self.frames + 1) / 3 + end + + function self:setFrame (frameIndex, time, mix, bendDirection) + frameIndex = frameIndex * 3 + self.frames[frameIndex] = time + self.frames[frameIndex + 1] = mix + self.frames[frameIndex + 2] = bendDirection + end + + function self:apply (skeleton, lastTime, time, firedEvents, alpha) + local frames = self.frames + if time < frames[0] then return end -- Time is before first frame. + + local ikConstraint = skeleton.ikConstraints[self.ikConstraintIndex] + + if time >= frames[#frames - 2] then -- Time is after last frame. + ikConstraint.mix = ikConstraint.mix + (frames[#frames - 1] - ikConstraint.mix) * alpha + ikConstraint.bendDirection = frames[#frames] + return + end + + -- Interpolate between the previous frame and the current frame. + local frameIndex = binarySearch(frames, time, 3); + local prevFrameMix = frames[frameIndex + PREV_FRAME_MIX] + local frameTime = frames[frameIndex] + local percent = 1 - (time - frameTime) / (frames[frameIndex + PREV_FRAME_TIME] - frameTime) + if percent < 0 then percent = 0 elseif percent > 1 then percent = 1 end + percent = self:getCurvePercent(frameIndex / 3 - 1, percent) + + local mix = prevFrameMix + (frames[frameIndex + FRAME_MIX] - prevFrameMix) * percent + ikConstraint.mix = ikConstraint.mix + (mix - ikConstraint.mix) * alpha + ikConstraint.bendDirection = frames[frameIndex + PREV_FRAME_BEND_DIRECTION] + end + + return self +end + +Animation.FlipXTimeline = {} +function Animation.FlipXTimeline.new () + local self = { + frames = {}, -- time, flip, ... + boneIndex = -1 + } + + function self:getDuration () + return self.frames[#self.frames - 1] + end + + function self:getFrameCount () + return (#self.frames + 1) / 2 + end + + function self:setFrame (frameIndex, time, flip) + frameIndex = frameIndex * 2 + self.frames[frameIndex] = time + self.frames[frameIndex + 1] = flip + end + + function self:apply (skeleton, lastTime, time, firedEvents, alpha) + local frames = self.frames + if time < frames[0] then + if lastTime > time then self:apply(skeleton, lastTime, 999999, nil, 0) end + return + elseif lastTime > time then + lastTime = -1 + end + + local frameIndex + if time >= frames[#frames - 1] then + frameIndex = #frames - 1 + else + frameIndex = binarySearch(frames, time, 2) - 2 + end + if frames[frameIndex] < lastTime then return end + + self:setFlip(skeleton.bones[self.boneIndex], frames[frameIndex + 1]) + end + + function self:setFlip (bone, flip) + bone.flipX = flip + end + + return self +end + +Animation.FlipYTimeline = {} +function Animation.FlipYTimeline.new () + local self = Animation.FlipXTimeline.new() + + function self:setFlip (bone, flip) + bone.flipY = flip + end + + return self +end + return Animation diff --git a/spine-lua/Bone.lua b/spine-lua/Bone.lua index 270a61781..6c1f1555f 100644 --- a/spine-lua/Bone.lua +++ b/spine-lua/Bone.lua @@ -30,19 +30,23 @@ local Bone = {} -function Bone.new (data, parent) +function Bone.new (data, skeleton, parent) if not data then error("data cannot be nil", 2) end - + if not skeleton then error("skeleton cannot be nil", 2) end + local self = { data = data, + skeleton = skeleton, parent = parent, x = 0, y = 0, - rotation = 0, + rotation = 0, rotationIK = 0, scaleX = 1, scaleY = 1, + flipX = false, flipY = false, m00 = 0, m01 = 0, worldX = 0, -- a b x m10 = 0, m11 = 0, worldY = 0, -- c d y worldRotation = 0, worldScaleX = 1, worldScaleY = 1, + worldFlipX = false, worldFlipY = false, } function self:updateWorldTransform (flipX, flipY) @@ -58,39 +62,46 @@ function Bone.new (data, parent) self.worldScaleY = self.scaleY end if (self.data.inheritRotation) then - self.worldRotation = parent.worldRotation + self.rotation + self.worldRotation = parent.worldRotation + self.rotationIK else - self.worldRotation = self.rotation + self.worldRotation = self.rotationIK end + self.worldFlipX = parent.worldFlipX ~= self.flipX + self.worldFlipY = parent.worldFlipY ~= self.flipY else - if flipX then + local skeletonFlipX, skeletonFlipY = self.skeleton.flipX, self.skeleton.flipY + if skeletonFlipX then self.worldX = -self.x else self.worldX = self.x end - if flipY then + if skeletonFlipY then self.worldY = -self.y else self.worldY = self.y end self.worldScaleX = self.scaleX self.worldScaleY = self.scaleY - self.worldRotation = self.rotation + self.worldRotation = self.rotationIK + self.worldFlipX = skeletonFlipX ~= self.flipX + self.worldFlipY = skeletonFlipY ~= self.flipY end local radians = math.rad(self.worldRotation) local cos = math.cos(radians) local sin = math.sin(radians) - self.m00 = cos * self.worldScaleX - self.m10 = sin * self.worldScaleX - self.m01 = -sin * self.worldScaleY - self.m11 = cos * self.worldScaleY - if flipX then - self.m00 = -self.m00 - self.m01 = -self.m01 + if self.worldFlipX then + self.m00 = -cos * self.worldScaleX + self.m01 = sin * self.worldScaleY + else + self.m00 = cos * self.worldScaleX + self.m01 = -sin * self.worldScaleY end - if flipY then - self.m10 = -self.m10 - self.m11 = -self.m11 + if self.worldFlipY then + self.m10 = -sin * self.worldScaleX + self.m11 = -cos * self.worldScaleY + else + self.m10 = sin * self.worldScaleX + self.m11 = cos * self.worldScaleY end end @@ -99,8 +110,34 @@ function Bone.new (data, parent) self.x = data.x self.y = data.y self.rotation = data.rotation + self.rotationIK = self.rotation self.scaleX = data.scaleX self.scaleY = data.scaleY + self.flipX = data.flipX + self.flipY = data.flipY + end + + function self:worldToLocal (worldCoords) + local dx = worldCoords[1] - self.worldX + local dy = worldCoords[2] - self.worldY + local m00 = self.m00 + local m10 = self.m10 + local m01 = self.m01 + local m11 = self.m11 + if self.worldFlipX ~= self.worldFlipY then + m00 = -m00 + m11 = -m11 + end + local invDet = 1 / (m00 * m11 - m01 * m10) + worldCoords[1] = dx * m00 * invDet - dy * m01 * invDet + worldCoords[2] = dy * m11 * invDet - dx * m10 * invDet + end + + function self:localToWorld (localCoords) + local localX = localCoords[1] + local localY = localCoords[2] + localCoords[1] = localX * self.m00 + localY * self.m01 + self.worldX + localCoords[2] = localX * self.m10 + localY * self.m11 + self.worldY end self:setToSetupPose() diff --git a/spine-lua/IkConstraint.lua b/spine-lua/IkConstraint.lua new file mode 100644 index 000000000..7a23187b5 --- /dev/null +++ b/spine-lua/IkConstraint.lua @@ -0,0 +1,150 @@ +------------------------------------------------------------------------------- +-- Spine Runtimes Software License +-- Version 2.1 +-- +-- Copyright (c) 2013, Esoteric Software +-- All rights reserved. +-- +-- You are granted a perpetual, non-exclusive, non-sublicensable and +-- non-transferable license to install, execute and perform the Spine Runtimes +-- Software (the "Software") solely for internal use. Without the written +-- permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights +-- notices on or in the Software, including any copy thereof. Redistributions +-- in binary or source form must include this license and terms. +-- +-- THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR +-- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +-- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +-- EVENT SHALL ESOTERIC SOFTARE 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. +------------------------------------------------------------------------------- + +local IkConstraint = {} +function IkConstraint.new (data, skeleton) + if not data then error("data cannot be nil", 2) end + if not skeleton then error("skeleton cannot be nil", 2) end + + local self = { + data = data, + skeleton = skeleton, + bones = {}, + target = nil, + bendDirection = data.bendDirection, + mix = data.mix + } + + function self:apply () + local target = self.target + local bones = self.bones + local boneCount = #bones + if boneCount == 1 then + IkConstraint.apply1(bones[1], target.worldX, target.worldY, self.mix) + elseif boneCount == 2 then + IkConstraint.apply2(bones[1], bones[2], target.worldX, target.worldY, self.bendDirection, self.mix) + end + end + + for i,boneData in ipairs(data.bones) do + table.insert(self.bones, skeleton:findBone(boneData.name)) + end + self.target = skeleton:findBone(data.target.name) + + return self +end + +local radDeg = 180 / math.pi +local degRad = math.pi / 180 + +function IkConstraint.apply1 (bone, targetX, targetY, alpha) + local parentRotation + if not bone.data.inheritRotation or not bone.parent then + parentRotation = 0 + else + parentRotation = bone.parent.worldRotation + end + local rotation = bone.rotation + local rotationIK = math.atan2(targetY - bone.worldY, targetX - bone.worldX) * radDeg - parentRotation + bone.rotationIK = rotation + (rotationIK - rotation) * alpha +end + +local temp = {} + +function IkConstraint.apply2 (parent, child, targetX, targetY, bendDirection, alpha) + local childRotation = child.rotation + local parentRotation = parent.rotation + if not alpha then + child.rotationIK = childRotation + parent.rotationIK = parentRotation + return + end + local positionX, positionY + local tempPosition = temp + local parentParent = parent.parent + if parentParent then + tempPosition[1] = targetX + tempPosition[2] = targetY + parentParent:worldToLocal(tempPosition) + targetX = (tempPosition[1] - parent.x) * parentParent.worldScaleX + targetY = (tempPosition[2] - parent.y) * parentParent.worldScaleY + else + targetX = targetX - parent.x + targetY = targetY - parent.y + end + if child.parent == parent then + positionX = child.x + positionY = child.y + else + tempPosition[1] = child.x + tempPosition[2] = child.y + child.parent:localToWorld(tempPosition) + parent:worldToLocal(tempPosition) + positionX = tempPosition[1] + positionY = tempPosition[2] + end + local childX = positionX * parent.worldScaleX + local childY = positionY * parent.worldScaleY + local offset = math.atan2(childY, childX) + local len1 = math.sqrt(childX * childX + childY * childY) + local len2 = child.data.length * child.worldScaleX + -- Based on code by Ryan Juckett with permission: Copyright (c) 2008-2009 Ryan Juckett, http://www.ryanjuckett.com/ + local cosDenom = 2 * len1 * len2 + if cosDenom < 0.0001 then + child.rotationIK = childRotation + (math.atan2(targetY, targetX) * radDeg - parentRotation - childRotation) * alpha + return + end + local cos = (targetX * targetX + targetY * targetY - len1 * len1 - len2 * len2) / cosDenom + if cos < -1 then + cos = -1 + elseif cos > 1 then + cos = 1 + end + local childAngle = math.acos(cos) * bendDirection + local adjacent = len1 + len2 * cos + local opposite = len2 * math.sin(childAngle) + local parentAngle = math.atan2(targetY * adjacent - targetX * opposite, targetX * adjacent + targetY * opposite) + local rotation = (parentAngle - offset) * radDeg - parentRotation + if rotation > 180 then + rotation = rotation - 360 + elseif rotation < -180 then + rotation = rotation + 360 + end + parent.rotationIK = parentRotation + rotation * alpha + rotation = (childAngle + offset) * radDeg - childRotation + if rotation > 180 then + rotation = rotation - 360 + elseif rotation < -180 then + rotation = rotation + 360 + end + child.rotationIK = childRotation + (rotation + parent.worldRotation - child.parent.worldRotation) * alpha +end + +return IkConstraint diff --git a/spine-lua/IkConstraintData.lua b/spine-lua/IkConstraintData.lua new file mode 100644 index 000000000..589b67f53 --- /dev/null +++ b/spine-lua/IkConstraintData.lua @@ -0,0 +1,45 @@ +------------------------------------------------------------------------------- +-- Spine Runtimes Software License +-- Version 2.1 +-- +-- Copyright (c) 2013, Esoteric Software +-- All rights reserved. +-- +-- You are granted a perpetual, non-exclusive, non-sublicensable and +-- non-transferable license to install, execute and perform the Spine Runtimes +-- Software (the "Software") solely for internal use. Without the written +-- permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights +-- notices on or in the Software, including any copy thereof. Redistributions +-- in binary or source form must include this license and terms. +-- +-- THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR +-- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +-- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +-- EVENT SHALL ESOTERIC SOFTARE 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. +------------------------------------------------------------------------------- + +local IkConstraintData = {} +function IkConstraintData.new (name) + if not name then error("name cannot be nil", 2) end + + local self = { + name = name, + bones = {}, + target = nil, + bendDirection = 1, + mix = 1 + } + + return self +end +return IkConstraintData diff --git a/spine-lua/Skeleton.lua b/spine-lua/Skeleton.lua index 1e30a5f86..5c8ade791 100644 --- a/spine-lua/Skeleton.lua +++ b/spine-lua/Skeleton.lua @@ -30,6 +30,7 @@ local Bone = require "spine-lua.Bone" local Slot = require "spine-lua.Slot" +local IkConstraint = require "spine-lua.IkConstraint" local AttachmentLoader = require "spine-lua.AttachmentLoader" local Skeleton = {} @@ -42,16 +43,71 @@ function Skeleton.new (skeletonData) slots = {}, slotsByName = {}, drawOrder = {}, + ikConstraints = {}, r = 1, g = 1, b = 1, a = 1, - x = 0, y = 0, skin = nil, flipX = false, flipY = false, - time = 0 + time = 0, + x = 0, y = 0 } - function self:updateWorldTransform () + -- Caches information about bones and IK constraints. Must be called if bones or IK constraints are added or removed. + function self:updateCache () + self.boneCache = {} + local boneCache = self.boneCache + local ikConstraints = self.ikConstraints + local ikConstraintsCount = #ikConstraints + + local arrayCount = ikConstraintsCount + 1 + while #boneCache < arrayCount do + table.insert(boneCache, {}) + end + + local nonIkBones = boneCache[1] + for i,bone in ipairs(self.bones) do - bone:updateWorldTransform(self.flipX, self.flipY) + local current = bone + local continueOuter + repeat + for ii,ikConstraint in ipairs(ikConstraints) do + local parent = ikConstraint.bones[0] + local child = ikConstraint.bones[#ikConstraint.bones - 1] + while true do + if current == child then + table.insert(boneCache[ii], bone) + table.insert(boneCache[ii + 1], bone) + ii = ikConstraintsCount + continueOuter = true + break + end + if child == parent then break end + child = child.parent + end + end + if continueOuter then break end + current = current.parent + until not current + table.insert(nonIkBones, bone) + end + end + + -- Updates the world transform for each bone and applies IK constraints. + function self:updateWorldTransform () + local bones = self.bones + for i,bone in ipairs(self.bones) do + bone.rotationIK = bone.rotation + end + local boneCache = self.boneCache + local ikConstraints = self.ikConstraints + local i = 1 + local last = #boneCache + while true do + for ii,bone in ipairs(boneCache[i]) do + bone:updateWorldTransform() + end + if i == last then break end + ikConstraints[i]:apply() + i = i + 1 end end @@ -64,6 +120,11 @@ function Skeleton.new (skeletonData) for i,bone in ipairs(self.bones) do bone:setToSetupPose() end + + for i,ikConstraint in ipairs(self.ikConstraints) do + ikConstraint.bendDirection = ikConstraint.data.bendDirection + ikConstraint.mix = ikConstraint.data.mix + end end function self:setSlotsToSetupPose () @@ -90,6 +151,9 @@ function Skeleton.new (skeletonData) return self.slotsByName[slotName] end + -- 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. function self:setSkin (skinName) local newSkin if skinName then @@ -165,17 +229,23 @@ function Skeleton.new (skeletonData) for i,boneData in ipairs(skeletonData.bones) do local parent if boneData.parent then parent = self.bones[spine.utils.indexOf(skeletonData.bones, boneData.parent)] end - table.insert(self.bones, Bone.new(boneData, parent)) + table.insert(self.bones, Bone.new(boneData, self, parent)) end for i,slotData in ipairs(skeletonData.slots) do local bone = self.bones[spine.utils.indexOf(skeletonData.bones, slotData.boneData)] - local slot = Slot.new(slotData, self, bone) + local slot = Slot.new(slotData, bone) table.insert(self.slots, slot) self.slotsByName[slot.data.name] = slot table.insert(self.drawOrder, slot) end + for i,ikConstraintData in ipairs(skeletonData.ikConstraints) do + table.insert(self.ikConstraints, IkConstraint.new(ikConstraintData, self)) + end + + self:updateCache() + return self end return Skeleton diff --git a/spine-lua/SkeletonData.lua b/spine-lua/SkeletonData.lua index ddff41548..7ca4010b7 100644 --- a/spine-lua/SkeletonData.lua +++ b/spine-lua/SkeletonData.lua @@ -31,12 +31,15 @@ local SkeletonData = {} function SkeletonData.new () local self = { + version = 0, hash = 0, + width = 0, height = 0, bones = {}, slots = {}, slotNameIndices = {}, skins = {}, events = {}, animations = {}, + ikConstraints = {}, defaultSkin = nil } @@ -93,6 +96,14 @@ function SkeletonData.new () return nil end + function self:findIkConstraint (ikConstraintName) + if not ikConstraintName then error("ikConstraintName cannot be nil.", 2) end + for i,ikConstraint in ipairs(self.ikConstraints) do + if ikConstraint.name == ikConstraintName then return ikConstraint end + end + return nil + end + return self end return SkeletonData diff --git a/spine-lua/SkeletonJson.lua b/spine-lua/SkeletonJson.lua index cd99f5f5d..c1dd265f4 100755 --- a/spine-lua/SkeletonJson.lua +++ b/spine-lua/SkeletonJson.lua @@ -34,6 +34,8 @@ local SlotData = require "spine-lua.SlotData" local Skin = require "spine-lua.Skin" local AttachmentLoader = require "spine-lua.AttachmentLoader" local Animation = require "spine-lua.Animation" +local IkConstraintData = require "spine-lua.IkConstraintData" +local IkConstraint = require "spine-lua.IkConstraint" local EventData = require "spine-lua.EventData" local Event = require "spine-lua.Event" local AttachmentType = require "spine-lua.AttachmentType" @@ -62,6 +64,15 @@ function SkeletonJson.new (attachmentLoader) local root = spine.utils.readJSON(jsonText) if not root then error("Invalid JSON: " .. jsonText, 2) end + -- Skeleton. + if root["skeleton"] then + local skeletonMap = root["skeleton"] + skeletonData.hash = skeletonMap["hash"] + skeletonData.version = skeletonMap["spine"] + skeletonData.width = skeletonMap["width"] or 0 + skeletonData.height = skeletonMap["height"] or 0 + end + -- Bones. for i,boneMap in ipairs(root["bones"]) do local boneName = boneMap["name"] @@ -86,6 +97,8 @@ function SkeletonJson.new (attachmentLoader) else boneData.scaleY = 1 end + boneData.flipX = boneMap["flipX"] or false + boneData.flipY = boneMap["flipY"] or false if boneMap["inheritScale"] == false then boneData.inheritScale = false else @@ -99,6 +112,28 @@ function SkeletonJson.new (attachmentLoader) table.insert(skeletonData.bones, boneData) end + -- IK constraints. + if root["ik"] then + for i,ikMap in ipairs(root["ik"]) do + local ikConstraintData = IkConstraintData.new(ikMap["name"]) + + for i,boneName in ipairs(ikMap["bones"]) do + local bone = skeletonData:findBone(boneName) + if not bone then error("IK bone not found: " .. boneName) end + table.insert(ikConstraintData.bones, bone) + end + + local targetName = ikMap["target"] + ikConstraintData.target = skeletonData:findBone(targetName) + if not ikConstraintData.target then error("Target bone not found: " .. targetName) end + + if ikMap["bendPositive"] == false then ikConstraintData.bendDirection = -1 end + if ikMap["mix"] ~= nil then ikConstraintData.mix = ikMap["mix"] end + + table.insert(skeletonData.ikConstraints, ikConstraintData) + end + end + -- Slots. if root["slots"] then for i,slotMap in ipairs(root["slots"]) do @@ -375,6 +410,26 @@ function SkeletonJson.new (attachmentLoader) table.insert(timelines, timeline) duration = math.max(duration, timeline:getDuration()) + elseif timelineName == "flipX" or timelineName == "flipY" then + local x = timelineName == "flipX" + local timeline, field + if x then + timeline = Animation.FlipXTimeline.new() + field = "x" + else + timeline = Animation.FlipYTimeline.new(); + field = "y" + end + timeline.boneIndex = boneIndex + + local frameIndex = 0 + for i,valueMap in ipairs(values) do + timeline:setFrame(frameIndex, valueMap["time"], valueMap[field] or false) + frameIndex = frameIndex + 1 + end + table.insert(timelines, timeline) + duration = math.max(duration, timeline:getDuration()) + else error("Invalid timeline type for a bone: " .. timelineName .. " (" .. boneName .. ")") end @@ -382,6 +437,32 @@ function SkeletonJson.new (attachmentLoader) end end + local ik = map["ik"] + if ik then + for ikConstraintName,values in pairs(ik) do + local ikConstraint = skeletonData:findIkConstraint(ikConstraintName) + local timeline = Animation.IkConstraintTimeline.new() + for i,other in pairs(skeletonData.ikConstraints) do + if other == ikConstraint then + timeline.ikConstraintIndex = i + break + end + end + local frameIndex = 0 + for i,valueMap in ipairs(values) do + local mix = 1 + if valueMap["mix"] ~= nil then mix = valueMap["mix"] end + local bendPositive = 1 + if valueMap["bendPositive"] == false then bendPositive = -1 end + timeline:setFrame(frameIndex, valueMap["time"], mix, bendPositive) + readCurve(timeline, frameIndex, valueMap) + frameIndex = frameIndex + 1 + end + table.insert(timelines, timeline) + duration = math.max(duration, timeline:getDuration()) + end + end + local ffd = map["ffd"] if ffd then for skinName,slotMap in pairs(ffd) do @@ -447,7 +528,8 @@ function SkeletonJson.new (attachmentLoader) end end - local drawOrderValues = map["draworder"] + local drawOrderValues = map["drawOrder"] + if not drawOrderValues then drawOrderValues = map["draworder"] end if drawOrderValues then local timeline = Animation.DrawOrderTimeline.new(#drawOrderValues) local slotCount = #skeletonData.slots @@ -529,8 +611,9 @@ function SkeletonJson.new (attachmentLoader) readCurve = function (timeline, frameIndex, valueMap) local curve = valueMap["curve"] - if not curve then return end - if curve == "stepped" then + if not curve then + timeline:setLinear(frameIndex) + elseif curve == "stepped" then timeline:setStepped(frameIndex) else timeline:setCurve(frameIndex, curve[1], curve[2], curve[3], curve[4]) diff --git a/spine-lua/Slot.lua b/spine-lua/Slot.lua index c8c993760..bc3722313 100644 --- a/spine-lua/Slot.lua +++ b/spine-lua/Slot.lua @@ -29,19 +29,18 @@ ------------------------------------------------------------------------------- local Slot = {} -function Slot.new (slotData, skeleton, bone) +function Slot.new (slotData, bone) if not slotData then error("slotData cannot be nil", 2) end - if not skeleton then error("skeleton cannot be nil", 2) end if not bone then error("bone cannot be nil", 2) end local self = { data = slotData, - skeleton = skeleton, bone = bone, r = 1, g = 1, b = 1, a = 1, attachment = nil, attachmentTime = 0, - attachmentVertices = nil + attachmentVertices = nil, + attachmentVerticesCount = 0 } function self:setColor (r, g, b, a) @@ -53,15 +52,16 @@ function Slot.new (slotData, skeleton, bone) function self:setAttachment (attachment) self.attachment = attachment - self.attachmentTime = self.skeleton.time + self.attachmentTime = self.bone.skeleton.time + self.attachmentVerticesCount = 0 end function self:setAttachmentTime (time) - self.attachmentTime = self.skeleton.time - time + self.attachmentTime = self.bone.skeleton.time - time end function self:getAttachmentTime () - return self.skeleton.time - self.attachmentTime + return self.bone.skeleton.time - self.attachmentTime end function self:setToSetupPose () @@ -71,7 +71,7 @@ function Slot.new (slotData, skeleton, bone) local attachment if data.attachmentName then - attachment = self.skeleton:getAttachment(data.name, data.attachmentName) + attachment = self.bone.skeleton:getAttachment(data.name, data.attachmentName) end self:setAttachment(attachment) end diff --git a/spine-sfml/README.md b/spine-sfml/README.md index 5958b2a29..6876c56f7 100644 --- a/spine-sfml/README.md +++ b/spine-sfml/README.md @@ -13,3 +13,7 @@ Alternatively, the contents of the `spine-c/src`, `spine-c/include` and `spine-s ## Examples - [Simple example](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-sfml/example/main.cpp#L61) + +## Notes + +- Atlas images should not use premultiplied alpha. diff --git a/spine-sfml/data/goblins-ffd.atlas b/spine-sfml/data/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-sfml/data/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-sfml/data/goblins-mesh.atlas b/spine-sfml/data/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-sfml/data/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-sfml/data/goblins-ffd.json b/spine-sfml/data/goblins-mesh.json similarity index 100% rename from spine-sfml/data/goblins-ffd.json rename to spine-sfml/data/goblins-mesh.json diff --git a/spine-sfml/data/goblins-ffd.png b/spine-sfml/data/goblins-mesh.png similarity index 100% rename from spine-sfml/data/goblins-ffd.png rename to spine-sfml/data/goblins-mesh.png diff --git a/spine-starling/spine-starling-example/.actionScriptProperties b/spine-starling/spine-starling-example/.actionScriptProperties index b692f0508..774d465a2 100644 --- a/spine-starling/spine-starling-example/.actionScriptProperties +++ b/spine-starling/spine-starling-example/.actionScriptProperties @@ -1,6 +1,6 @@ - - + + @@ -34,10 +34,9 @@ - + - diff --git a/spine-starling/spine-starling-example/src/goblins-ffd.atlas b/spine-starling/spine-starling-example/src/goblins-ffd.atlas deleted file mode 100644 index 5fefae2bb..000000000 --- a/spine-starling/spine-starling-example/src/goblins-ffd.atlas +++ /dev/null @@ -1,292 +0,0 @@ - -goblins-ffd.png -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-starling/spine-starling-example/src/goblins-ffd-starling.png b/spine-starling/spine-starling-example/src/goblins-mesh-starling.png similarity index 100% rename from spine-starling/spine-starling-example/src/goblins-ffd-starling.png rename to spine-starling/spine-starling-example/src/goblins-mesh-starling.png diff --git a/spine-starling/spine-starling-example/src/goblins-ffd-starling.xml b/spine-starling/spine-starling-example/src/goblins-mesh-starling.xml similarity index 98% rename from spine-starling/spine-starling-example/src/goblins-ffd-starling.xml rename to spine-starling/spine-starling-example/src/goblins-mesh-starling.xml index 1d3f676a0..7fb7e3488 100644 --- a/spine-starling/spine-starling-example/src/goblins-ffd-starling.xml +++ b/spine-starling/spine-starling-example/src/goblins-mesh-starling.xml @@ -1,7 +1,7 @@ - + diff --git a/spine-starling/spine-starling-example/src/goblins-mesh.atlas b/spine-starling/spine-starling-example/src/goblins-mesh.atlas new file mode 100644 index 000000000..d0ddb80c6 --- /dev/null +++ b/spine-starling/spine-starling-example/src/goblins-mesh.atlas @@ -0,0 +1,292 @@ + +goblins-mesh.png +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-starling/spine-starling-example/src/goblins-ffd.json b/spine-starling/spine-starling-example/src/goblins-mesh.json similarity index 100% rename from spine-starling/spine-starling-example/src/goblins-ffd.json rename to spine-starling/spine-starling-example/src/goblins-mesh.json diff --git a/spine-starling/spine-starling-example/src/goblins-ffd.png b/spine-starling/spine-starling-example/src/goblins-mesh.png similarity index 100% rename from spine-starling/spine-starling-example/src/goblins-ffd.png rename to spine-starling/spine-starling-example/src/goblins-mesh.png diff --git a/spine-starling/spine-starling-example/src/raptor.atlas b/spine-starling/spine-starling-example/src/raptor.atlas new file mode 100644 index 000000000..c90da0078 --- /dev/null +++ b/spine-starling/spine-starling-example/src/raptor.atlas @@ -0,0 +1,251 @@ + +raptor.png +size: 1022,1022 +format: RGBA8888 +filter: Linear,Linear +repeat: none +back_arm + rotate: false + xy: 410, 545 + size: 46, 29 + orig: 46, 29 + offset: 0, 0 + index: -1 +back_bracer + rotate: false + xy: 540, 548 + size: 39, 28 + orig: 39, 28 + offset: 0, 0 + index: -1 +back_hand + rotate: true + xy: 504, 538 + 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: 140, 247 + size: 39, 24 + orig: 39, 24 + offset: 0, 0 + index: -1 +eyes_open + rotate: true + xy: 2, 2 + size: 47, 45 + orig: 47, 45 + offset: 0, 0 + index: -1 +front_arm + rotate: false + xy: 360, 544 + size: 48, 30 + orig: 48, 30 + offset: 0, 0 + index: -1 +front_bracer + rotate: false + xy: 538, 578 + size: 41, 29 + orig: 41, 29 + offset: 0, 0 + index: -1 +front_hand + rotate: false + xy: 538, 609 + size: 41, 38 + orig: 41, 38 + offset: 0, 0 + index: -1 +front_open_hand + rotate: false + xy: 894, 782 + size: 43, 44 + orig: 43, 44 + offset: 0, 0 + index: -1 +front_thigh + rotate: false + xy: 942, 849 + 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_smile + rotate: true + xy: 49, 2 + size: 47, 30 + orig: 47, 30 + offset: 0, 0 + index: -1 +neck + rotate: true + xy: 1001, 860 + 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: false + xy: 458, 539 + size: 44, 35 + orig: 44, 35 + offset: 0, 0 + index: -1 +stirrup_front + rotate: true + xy: 81, 4 + size: 45, 50 + orig: 45, 50 + offset: 0, 0 + index: -1 +stirrup_strap + rotate: true + xy: 894, 828 + 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-starling/spine-starling-example/src/raptor.json b/spine-starling/spine-starling-example/src/raptor.json new file mode 100644 index 000000000..df9892de6 --- /dev/null +++ b/spine-starling/spine-starling-example/src/raptor.json @@ -0,0 +1,1333 @@ +{ +"skeleton": { "hash": "r3IJRaLbaxgEoW1YBAOrYT69jB4", "spine": "Dev", "width": 1224.2, "height": 1052.38 }, +"bones": [ + { "name": "root" }, + { "name": "front_foot_goal", "parent": "root", "x": -45.79, "y": -28.67, "rotation": -0.94 }, + { "name": "hip", "parent": "root", "x": -136.78, "y": 415.47, "rotation": 3.15 }, + { "name": "rear_foot_goal", "parent": "root", "x": 33.43, "y": 30.81 }, + { "name": "front_leg1", "parent": "hip", "length": 251.74, "x": 27.36, "y": -28.27, "rotation": -51.5 }, + { "name": "front_leg_goal", "parent": "front_foot_goal", "x": -106.06, "y": 115.58 }, + { "name": "rear_leg1", "parent": "hip", "length": 226.27, "x": 55.19, "y": -71.25, "rotation": -54.76 }, + { "name": "rear_leg_goal", "parent": "rear_foot_goal", "x": -127.51, "y": 75.99 }, + { "name": "tail1", "parent": "hip", "length": 162.53, "x": -20.86, "y": 6.87, "rotation": 162.92 }, + { "name": "torso1", "parent": "hip", "length": 126.25, "x": 30.03, "y": -0.4, "rotation": -4.97 }, + { "name": "front_leg2", "parent": "front_leg1", "length": 208.54, "x": 251.03, "y": 0.16, "rotation": 261.93 }, + { "name": "rear_leg2", "parent": "rear_leg1", "length": 172.58, "x": 226.32, "y": 0.23, "rotation": -92.25 }, + { "name": "saddle", "parent": "torso1", "length": 50.91, "x": 4.56, "y": 71.86, "rotation": 91.8 }, + { "name": "tail2", "parent": "tail1", "length": 130.02, "x": 162.53, "y": -0.82, "rotation": 30.3 }, + { "name": "torso2", "parent": "torso1", "length": 121.2, "x": 126.25, "y": -0.37, "rotation": 39.84 }, + { "name": "front_arm1", "parent": "torso2", "length": 109.99, "x": 46.37, "y": -84.61, "rotation": 224.54 }, + { "name": "front_leg3", "parent": "front_leg2", "length": 118.18, "x": 208.5, "y": -1.63, "rotation": 85.46 }, + { "name": "neck", "parent": "torso2", "length": 70.59, "x": 121.19, "y": 0.34, "rotation": 41.37 }, + { "name": "rear_arm1", "parent": "torso2", "length": 109.56, "x": 57.05, "y": -95.38, "rotation": -124.71 }, + { "name": "rear_leg3", "parent": "rear_leg2", "length": 103.05, "x": 172.31, "y": 2.21, "rotation": 82.81 }, + { "name": "saddle_strap_front1", "parent": "saddle", "length": 97.27, "x": -27.36, "y": -73.38, "rotation": -148.11 }, + { "name": "saddle_strap_rear1", "parent": "saddle", "length": 38.62, "x": -33.34, "y": 87.32, "rotation": 151.13 }, + { "name": "spineboy_front_arm_goal", "parent": "saddle", "x": -50.7, "y": -96.93 }, + { "name": "spineboy_hip", "parent": "saddle", "length": 0.52, "x": 81.88, "y": 2.68, "rotation": 90.01 }, + { "name": "spineboy_rear_arm_goal", "parent": "saddle", "x": -30.43, "y": -100.08 }, + { "name": "stirrup", "parent": "saddle", "length": 78.17, "x": -81.94, "y": -103.38, "rotation": -68.85 }, + { "name": "stirrup_strap1", "parent": "saddle", "length": 43.69, "x": -20.38, "y": -29.37, "rotation": -135 }, + { "name": "tail3", "parent": "tail2", "length": 141.06, "x": 130.02, "y": 0.1, "rotation": 6.88 }, + { "name": "back_thigh", "parent": "spineboy_hip", "length": 71.15, "x": -9.57, "y": 2.31, "rotation": 160.75 }, + { "name": "front_arm2", "parent": "front_arm1", "length": 86.33, "x": 109.99, "y": 0.2, "rotation": 105.23 }, + { "name": "front_foot1", "parent": "front_leg3", "length": 57.79, "x": 118.19, "y": -0.79, "scaleX": 1.126, "rotation": 54.46 }, + { "name": "front_thigh", "parent": "spineboy_hip", "length": 77.79, "x": 15.51, "y": 17.01, "rotation": 163.34 }, + { + "name": "gun", + "parent": "spineboy_hip", + "length": 181.35, + "x": 16.86, + "y": -7.89, + "scaleX": 0.816, + "scaleY": 0.816, + "rotation": 107.11 + }, + { "name": "head", "parent": "neck", "length": 105.5, "x": 70.59, "y": 0.03, "rotation": 9.82 }, + { "name": "rear_arm2", "parent": "rear_arm1", "length": 85.8, "x": 109.56, "rotation": 123.56 }, + { "name": "rear_foot1", "parent": "rear_leg3", "length": 84.51, "x": 102.37, "y": -0.02, "rotation": 75.43 }, + { "name": "saddle_strap_front2", "parent": "saddle_strap_front1", "length": 102.74, "x": 97.29, "y": 0.3, "rotation": -11.13 }, + { "name": "saddle_strap_rear2", "parent": "saddle_strap_rear1", "length": 54.36, "x": 38.63, "y": -0.02 }, + { "name": "spineboy_torso", "parent": "spineboy_hip", "length": 122.45, "x": 1.05, "y": -2.1, "rotation": -75.85 }, + { "name": "stirrup_strap2", "parent": "stirrup_strap1", "length": 51.62, "x": 43.7, "rotation": 9.38 }, + { "name": "tail4", "parent": "tail3", "length": 126.25, "x": 141.05, "y": 0.64, "rotation": -18.86 }, + { "name": "back_arm", "parent": "spineboy_torso", "length": 67.21, "x": 96.33, "y": -38.46, "rotation": -120.89 }, + { "name": "back_knee", "parent": "back_thigh", "length": 97.17, "x": 71.15, "y": -0.28, "rotation": -54.97 }, + { "name": "front_arm", "parent": "spineboy_torso", "length": 74.51, "x": 101.37, "y": 9.78, "rotation": -118.16 }, + { + "name": "front_foot2", + "parent": "front_foot1", + "length": 56.19, + "x": 57.78, + "y": -0.02, + "scaleX": 0.73, + "scaleY": 0.823, + "rotation": -0.46, + "inheritRotation": false + }, + { "name": "front_hand", "parent": "front_arm2", "length": 47.55, "x": 86.33, "y": 0.06, "rotation": -56.83 }, + { "name": "horn_front", "parent": "head", "length": 87.48, "x": 82.09, "y": -221.36, "rotation": 49.36 }, + { "name": "horn_rear", "parent": "head", "length": 73.78, "x": 99.27, "y": -226.79, "rotation": 44.31 }, + { "name": "jaw", "parent": "head", "length": 203.76, "x": 29.36, "y": -40.15, "rotation": -140.14, "inheritScale": false }, + { "name": "lower_leg", "parent": "front_thigh", "length": 111.5, "x": 77.92, "y": -0.1, "rotation": -49.62 }, + { "name": "neck2", "parent": "spineboy_torso", "length": 32.04, "x": 113.44, "y": -15.21, "rotation": -45.22 }, + { + "name": "rear_foot2", + "parent": "rear_foot1", + "length": 102.31, + "x": 84.49, + "y": -0.34, + "rotation": -6.13, + "inheritRotation": false + }, + { "name": "rear_hand", "parent": "rear_arm2", "length": 45.8, "x": 85.8, "y": 0.1, "rotation": -76.28 }, + { "name": "saddle_strap_rear3", "parent": "saddle_strap_rear2", "length": 44.04, "x": 54.86, "y": 0.19, "rotation": 3.63 }, + { "name": "tail5", "parent": "tail4", "length": 91.06, "x": 126.25, "y": -0.47, "rotation": -22.34 }, + { "name": "tongue1", "parent": "head", "length": 55.11, "x": 20.81, "y": -104.75, "rotation": -129.04 }, + { "name": "back_bracer", "parent": "back_arm", "length": 43.68, "x": 67.21, "y": -0.31, "rotation": 17.48 }, + { "name": "bone", "parent": "horn_front", "x": 294.58, "y": 234.17, "rotation": -138.59 }, + { "name": "bone2", "parent": "horn_rear", "x": 232.68, "y": 245.84, "rotation": -133.55 }, + { "name": "front_bracer", "parent": "front_arm", "length": 39.85, "x": 74.52, "y": -0.41, "rotation": 20.3 }, + { + "name": "front_foot3", + "parent": "front_foot2", + "length": 129.88, + "x": 49.71, + "y": 20.65, + "scaleX": 1.154, + "rotation": -3.16, + "inheritRotation": false + }, + { "name": "head2", "parent": "neck2", "length": 249.64, "x": 23.01, "y": 3.47, "rotation": 11.65 }, + { "name": "tongue2", "parent": "tongue1", "length": 44.66, "x": 55.59, "y": 0.93, "rotation": 8.93 }, + { "name": "back_hand", "parent": "back_bracer", "length": 41.97, "x": 43.68, "y": 0.06, "rotation": 9.2, "inheritRotation": false }, + { + "name": "front_hand2", + "parent": "front_bracer", + "length": 58.18, + "x": 39.98, + "y": -0.89, + "rotation": 13.9, + "inheritRotation": false + }, + { "name": "tongue3", "parent": "tongue2", "length": 43.64, "x": 44.26, "y": -0.2, "rotation": 12.86 } +], +"ik": [ + { + "name": "front_leg_goal", + "bones": [ "front_leg1", "front_leg2" ], + "target": "front_leg_goal", + "bendPositive": false + }, + { + "name": "rear_leg_goal", + "bones": [ "rear_leg1", "rear_leg2" ], + "target": "rear_leg_goal", + "bendPositive": false + }, + { + "name": "front_foot_goal", + "bones": [ "front_leg3", "front_foot1" ], + "target": "front_foot_goal" + }, + { + "name": "rear_foot_goal", + "bones": [ "rear_leg3", "rear_foot1" ], + "target": "rear_foot_goal" + }, + { + "name": "stirrup", + "bones": [ "stirrup_strap1", "stirrup_strap2" ], + "target": "stirrup" + }, + { + "name": "spineboy_rear_leg_goal", + "bones": [ "back_thigh", "back_knee" ], + "target": "spineboy_rear_arm_goal", + "bendPositive": false + }, + { + "name": "spineboy_front_leg_goal", + "bones": [ "front_thigh", "lower_leg" ], + "target": "spineboy_front_arm_goal", + "bendPositive": false + }, + { + "name": "rear_arm_goal", + "bones": [ "back_arm", "back_bracer" ], + "target": "bone2" + }, + { + "name": "front_arm_goal", + "bones": [ "front_arm", "front_bracer" ], + "target": "bone" + } +], +"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" } +], +"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": [ 9, 10, 11, 14, 11, 12, 14, 12, 0, 9, 11, 14, 6, 9, 14, 14, 0, 1, 13, 14, 1, 6, 7, 8, 6, 8, 9, 13, 1, 2, 13, 5, 6, 13, 6, 14, 3, 4, 13, 5, 13, 4, 3, 13, 2 ], + "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 + } + }, + "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": "skinnedmesh", + "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, 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, 0.94947, 0.60129 ], + "triangles": [ 6, 14, 15, 5, 6, 15, 5, 15, 4, 6, 7, 14, 24, 7, 8, 24, 14, 7, 13, 14, 24, 11, 13, 24, 11, 24, 8, 11, 8, 9, 10, 11, 9, 12, 13, 11, 15, 16, 4, 18, 19, 2, 16, 3, 4, 17, 18, 2, 17, 2, 3, 17, 3, 16, 20, 21, 22, 23, 20, 22, 0, 20, 23, 1, 20, 0, 1, 19, 20, 2, 19, 1 ], + "vertices": [ 2, 18, 36.95, 33.31, 0.91666, 34, 68.53, 41.05, 0.08333, 2, 18, 66.02, 20.35, 0.76813, 34, 41.41, 24.39, 0.23186, 2, 18, 74.51, 16.57, 0.64468, 34, 33.49, 19.53, 0.35531, 3, 18, 70.89, 21.97, 0.27669, 34, 39.99, 19.46, 0.67508, 52, -29.67, -39.91, 0.04822, 3, 18, 42.77, 63.89, 0.11483, 34, 90.47, 18.95, 0.60854, 52, -17.2, 9, 0.27661, 2, 34, 101.86, 18.83, 0.45955, 52, -14.38, 20.04, 0.54044, 2, 34, 106.47, 2.08, 0.0625, 52, 2.98, 20.56, 0.9375, 1, 52, 51.32, 21.98, 1, 1, 52, 72.39, 9.61, 1, 1, 52, 100.37, -23.87, 1, 1, 52, 104.96, -40.9, 1, 1, 52, 78.37, -25.61, 1, 1, 52, 86.05, -56.84, 1, 1, 52, 52.92, -30.04, 1, 2, 34, 62.24, -43.92, 0.0625, 52, 37.19, -33.33, 0.9375, 2, 34, 64.89, -28.65, 0.3125, 52, 22.98, -27.14, 0.6875, 2, 34, 57.69, -27.17, 0.30612, 52, 19.83, -33.78, 0.69387, 2, 18, 124.19, 3.83, 0.19395, 34, -5.09, -14.23, 0.80604, 2, 18, 110.77, -19.65, 0.3125, 34, -16.88, 10.1, 0.6875, 2, 18, 99.14, -19.2, 0.51613, 34, -9.93, 19.44, 0.48386, 2, 18, 43.73, -17.03, 0.9375, 34, 23.17, 63.92, 0.0625, 1, 18, 35.41, -29.77, 1, 1, 18, -15.68, -28.02, 1, 1, 18, -13.87, 24.65, 1, 1, 52, 60.41, 11.1, 1 ], + "hull": 24 + } + }, + "raptor_body": { + "raptor_body": { + "type": "skinnedmesh", + "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.27515, 0.71028, 0.25301, 0.71948, 0.22568, 0.73082, 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 ], + "triangles": [ 10, 11, 45, 45, 11, 44, 11, 12, 44, 44, 68, 45, 12, 69, 44, 12, 58, 52, 21, 22, 55, 22, 61, 55, 22, 23, 61, 55, 61, 27, 23, 56, 61, 23, 24, 56, 61, 56, 26, 61, 26, 27, 26, 56, 25, 56, 24, 25, 19, 60, 89, 19, 20, 60, 60, 20, 90, 20, 21, 90, 90, 21, 55, 89, 60, 29, 90, 28, 60, 60, 28, 29, 55, 27, 90, 90, 27, 28, 16, 17, 54, 91, 15, 16, 18, 54, 17, 54, 18, 89, 16, 54, 91, 18, 19, 89, 15, 91, 59, 31, 91, 54, 89, 30, 54, 89, 29, 30, 32, 59, 91, 30, 31, 54, 32, 91, 31, 33, 59, 32, 14, 15, 59, 33, 53, 59, 13, 58, 12, 58, 13, 53, 59, 53, 14, 13, 14, 53, 34, 58, 53, 35, 52, 58, 34, 53, 33, 58, 34, 35, 44, 69, 51, 12, 52, 69, 51, 38, 39, 51, 69, 38, 38, 69, 37, 69, 52, 37, 36, 52, 35, 36, 37, 52, 4, 5, 70, 4, 57, 73, 73, 57, 67, 4, 73, 3, 3, 73, 72, 3, 74, 2, 74, 87, 2, 87, 88, 2, 88, 1, 2, 73, 67, 72, 72, 67, 66, 67, 57, 66, 57, 49, 66, 57, 41, 49, 3, 72, 74, 72, 62, 74, 72, 66, 62, 74, 85, 87, 85, 74, 84, 49, 65, 66, 66, 65, 62, 84, 74, 62, 63, 62, 65, 84, 62, 63, 41, 42, 49, 85, 86, 87, 88, 86, 81, 88, 87, 86, 85, 84, 80, 85, 80, 79, 80, 84, 75, 79, 80, 78, 49, 64, 65, 64, 49, 43, 1, 88, 82, 80, 75, 78, 82, 88, 81, 75, 77, 78, 82, 81, 77, 81, 78, 77, 65, 64, 63, 75, 76, 77, 75, 84, 76, 76, 84, 83, 76, 83, 82, 83, 0, 1, 0, 83, 84, 63, 0, 84, 63, 64, 0, 1, 82, 83, 49, 42, 43, 64, 43, 0, 57, 4, 70, 45, 50, 46, 46, 47, 8, 46, 50, 47, 8, 47, 7, 50, 71, 47, 47, 71, 7, 7, 71, 6, 71, 50, 48, 48, 50, 40, 50, 68, 40, 71, 48, 6, 6, 48, 5, 5, 48, 70, 48, 40, 70, 70, 40, 57, 57, 40, 41, 10, 45, 9, 45, 46, 9, 9, 46, 8, 45, 68, 50, 44, 51, 68, 68, 39, 40, 68, 51, 39 ], + "vertices": [ 1, 33, 147.48, -145.48, 1, 1, 33, 89.4, -281.62, 1, 1, 33, -28.24, -285.93, 1, 1, 33, -14.58, -194.68, 1, 5, 9, 363.21, 87.73, 0.02179, 14, 238.39, -84.13, 0.20397, 17, 32.1, -140.85, 0.18915, 33, -61.96, -132.26, 0.41197, 48, 129.57, 6.39, 0.1731, 5, 9, 332.7, 63.71, 0.06905, 14, 199.57, -83.03, 0.29424, 17, 3.69, -114.37, 0.2194, 33, -85.43, -101.32, 0.30859, 48, 127.34, -26.64, 0.1087, 5, 9, 307.08, 43.5, 0.11018, 14, 166.95, -82.13, 0.37282, 17, -20.18, -92.14, 0.24572, 33, -105.18, -75.34, 0.21862, 48, 123.08, -64.79, 0.05264, 5, 9, 307.75, 5.7, 0.18146, 14, 143.25, -111.59, 0.56512, 17, -57.43, -98.57, 0.12044, 33, -142.98, -75.33, 0.10715, 48, 154.85, -83.49, 0.0258, 2, 9, 308.7, -30.55, 0.25, 14, 120.75, -140.04, 0.75, 2, 9, 213.94, -142.7, 0.75, 14, -23.83, -165.45, 0.25, 3, 9, 64.45, -187.34, 0.31139, 8, -158.45, 158.33, 0.10379, 2, 84.16, -190.98, 0.5848, 1, 2, -61.47, -178.84, 1, 1, 2, -166.91, -67.95, 1, 6, 9, -246.26, -74, 0.04136, 8, 170.4, 123.13, 0.2858, 13, 66.71, 104.77, 0.57052, 27, -53.08, 110.21, 0.10163, 40, -220.11, 35.3, 5.1E-4, 54, -331.4, -106.89, 1.5E-4, 6, 9, -297.45, -69.74, 0.01855, 8, 221.11, 131.31, 0.14592, 13, 115.07, 87.47, 0.47026, 27, -6.58, 88.39, 0.30085, 40, -168.92, 31, 0.06162, 54, -282.82, -90.19, 0.00276, 6, 9, -359.24, -85.1, 0.00915, 8, 277.38, 161.09, 0.07914, 13, 178.73, 86.41, 0.35008, 27, 56.68, 81.29, 0.38638, 40, -107.13, 46.31, 0.15555, 54, -232.44, -51.26, 0.01966, 6, 9, -376.16, -107.83, 0.0043, 8, 294.31, 176.47, 0.03904, 13, 203.26, 86.51, 0.25323, 27, 83.06, 77.02, 0.42283, 40, -79.56, 53.53, 0.23684, 54, -210.89, -28.3, 0.04374, 6, 9, -416.83, -99.41, 0.00211, 8, 329.83, 188.85, 0.0196, 13, 238.06, 85.41, 0.18217, 27, 115.65, 74.66, 0.41374, 40, -49.53, 60.58, 0.30031, 54, -185.49, -14.98, 0.08205, 6, 9, -449.42, -116.23, 0.00122, 8, 364.17, 200.07, 0.01106, 13, 275.48, 71.62, 0.13243, 27, 152.97, 53.58, 0.37336, 40, -5.82, 53.94, 0.34144, 54, -142.85, 0.11, 0.14047, 6, 9, -498.22, -88.19, 7.8E-4, 8, 411.52, 197.55, 0.00669, 13, 313.81, 53.61, 0.09623, 27, 188.04, 35.82, 0.32105, 40, 31.84, 49.3, 0.36432, 54, -106.46, 7.49, 0.21089, 6, 9, -524.31, -113.4, 5.8E-4, 8, 437.98, 213.03, 0.00423, 13, 345.74, 45.54, 0.06864, 27, 219.6, 19.28, 0.26387, 40, 68.31, 43.02, 0.36996, 54, -70.13, 18.19, 0.2927, 6, 9, -580.94, -76.79, 4.7E-4, 8, 494.56, 206.4, 0.00237, 13, 390.81, 21.3, 0.0452, 27, 261.62, -3.66, 0.20066, 40, 114.55, 37.83, 0.35931, 54, -26.15, 30.34, 0.39196, 6, 9, -621.23, -53.98, 4.4E-4, 8, 539.16, 193.96, 0.00115, 13, 423.87, -11.11, 0.02629, 27, 291.46, -39.06, 0.13478, 40, 154.83, 14.99, 0.33453, 54, 19.91, 25.67, 0.50278, 6, 9, -661.22, -31.34, 4.6E-4, 8, 583.41, 181.62, 5.6E-4, 13, 456.68, -43.27, 0.01512, 27, 321.06, -74.2, 0.08778, 40, 194.79, -7.66, 0.31014, 54, 65.62, 21.04, 0.58591, 6, 9, -698.76, 17.64, 4.7E-4, 8, 631.64, 143.1, 4.0E-4, 13, 480.34, -100.28, 0.01183, 27, 339.2, -133.2, 0.07247, 40, 232.3, -56.69, 0.30126, 54, 119.7, -8.69, 0.61353, 6, 9, -636.21, 0.4, 4.5E-4, 8, 566.79, 144.78, 5.5E-4, 13, 424.34, -67.52, 0.01513, 27, 286.57, -95.27, 0.08778, 40, 169.77, -39.4, 0.31045, 54, 55.51, -18.08, 0.5856, 6, 9, -596.68, -3.21, 4.2E-4, 8, 527.55, 138.78, 0.00111, 13, 387.08, -53.84, 0.02607, 27, 250.77, -78.11, 0.13421, 40, 130.24, -35.75, 0.33502, 54, 17.87, -30.67, 0.50314, 6, 9, -553.14, -7.2, 4.2E-4, 8, 484.33, 132.17, 0.00229, 13, 346.04, -38.78, 0.04477, 27, 211.34, -59.22, 0.19954, 40, 86.7, -31.72, 0.3598, 54, -23.59, -44.54, 0.39316, 6, 9, -516.96, -25.93, 4.7E-4, 8, 449.17, 125.97, 0.00408, 13, 311.45, -35.25, 0.06808, 27, 175.89, -56.83, 0.26228, 40, 51.53, -43.14, 0.37032, 54, -52.88, -67.87, 0.29473, 6, 9, -479.88, 14.24, 6.0E-4, 8, 418.38, 93.72, 0.00651, 13, 269.72, -40.64, 0.09608, 27, 135.19, -53.82, 0.32015, 40, 13.42, -53.11, 0.36453, 54, -82.03, -93.66, 0.21211, 6, 9, -451.64, 0.32, 8.3E-4, 8, 390.82, 86.58, 0.01046, 13, 241.19, -39.8, 0.13162, 27, 105.59, -52.93, 0.37317, 40, -16.25, -62.16, 0.34265, 54, -108.34, -111.24, 0.14123, 6, 9, -420.35, 31.66, 0.00137, 8, 364.8, 62.48, 0.01849, 13, 207.71, -42.14, 0.18078, 27, 73.33, -49.43, 0.41415, 40, -46.11, -70.49, 0.30264, 54, -129.51, -133.56, 0.08254, 6, 9, -399.11, 28.98, 0.00258, 8, 345.49, 47.53, 0.03705, 13, 182.34, -50.62, 0.25183, 27, 45.87, -56.62, 0.4234, 40, -71.57, -84.96, 0.24035, 54, -150.85, -153.35, 0.04477, 6, 9, -365.43, 66.79, 0.00485, 8, 319.95, 15.15, 0.07594, 13, 145.6, -61.95, 0.35325, 27, 9.61, -63.26, 0.38742, 40, -101.06, -105.58, 0.15807, 54, -165.65, -187.83, 0.02044, 6, 9, -312.31, 100.78, 0.00731, 8, 276.58, -30.61, 0.13928, 13, 85.52, -81.11, 0.48508, 27, -52.01, -76.62, 0.30338, 40, -154.2, -139.52, 0.06214, 54, -200.6, -240.31, 0.00279, 6, 9, -242.48, 124.41, 0.00974, 8, 214.5, -70.36, 0.27055, 13, 11.97, -85.98, 0.61489, 27, -125.69, -74.48, 0.10409, 40, -224.04, -163.1, 5.4E-4, 54, -255.01, -290.05, 1.5E-4, 6, 9, -166.71, 150.07, 0.02469, 8, 147.14, -113.5, 0.57033, 13, -67.84, -91.26, 0.38714, 27, -205.65, -72.16, 0.01755, 40, -299.83, -188.7, 2.0E-4, 54, -314.05, -344.03, 5.0E-5, 2, 9, -113.14, 135.84, 0.24192, 8, 91.72, -112.59, 0.75807, 2, 9, -42.12, 116.77, 0.14515, 8, 18.2, -111.17, 0.85484, 1, 9, 44.2, 107.1, 1, 2, 9, 140.09, 96.35, 0.22579, 14, 72.59, 65.41, 0.7742, 4, 9, 137.69, 169.35, 0.05644, 14, 117.5, 123, 0.24355, 17, 78.3, 94.48, 0.2125, 33, 23.7, 91.74, 0.4875, 2, 17, 171.15, 111.98, 0.25, 33, 118.17, 93.15, 0.75, 1, 33, 158.96, -25.58, 1, 1, 2, -40.63, -86.01, 1, 3, 9, 67.34, -86.66, 0.33215, 8, -137.02, 59.92, 0.08303, 2, 92.54, -90.61, 0.5848, 2, 9, 170.13, -66.29, 0.75, 14, -8.53, -78.72, 0.25, 2, 9, 231.74, -8.12, 0.4, 14, 76.03, -73.52, 0.6, 5, 9, 222.04, 70.41, 0.16894, 14, 118.9, -7, 0.5373, 17, -6.58, -3.99, 0.17075, 33, -76.73, 9.18, 0.08551, 48, 45.05, -108.02, 0.03748, 1, 33, 50.43, -46.56, 1, 1, 14, -9.88, 20.65, 1, 2, 9, -53.22, 20.53, 0.2, 8, 5.8, -15.09, 0.8, 6, 9, -180.71, 32.22, 0.0849, 8, 132.35, 4.24, 0.55723, 13, -23.98, 19.01, 0.34911, 27, -151.51, 33.44, 0.0085, 40, -285.75, -70.86, 1.8E-4, 54, -348.66, -230.51, 5.0E-5, 6, 9, -304.22, 7.95, 0.01243, 8, 246.39, 57.53, 0.13635, 13, 101.61, 10.65, 0.48532, 27, -27.28, 13.2, 0.30559, 40, -162.22, -46.69, 0.05823, 54, -245.36, -158.59, 0.00205, 6, 9, -418.56, -35.1, 0.00168, 8, 346.99, 126.85, 0.01839, 13, 223.17, 22.83, 0.18014, 27, 94.88, 13.77, 0.41602, 40, -47.85, -3.72, 0.30281, 54, -158.02, -73.16, 0.08093, 6, 9, -566.47, -40.57, 4.4E-4, 8, 489.24, 167.77, 0.00225, 13, 367.51, -9.96, 0.04446, 27, 235.45, -32.57, 0.20024, 40, 100.06, 1.62, 0.36103, 54, -24.81, -8.63, 0.39156, 6, 9, -648.5, -15.19, 4.5E-4, 8, 574.96, 162.88, 5.5E-4, 13, 440.24, -55.6, 0.01566, 27, 303.52, -84.91, 0.09149, 40, 182.07, -23.8, 0.3135, 54, 60.48, 1.14, 0.57832, 3, 14, 174.99, 22.22, 0.2, 17, 54.82, -19.14, 0.6, 33, -18.8, -16.2, 0.2, 6, 9, -242.34, 20.11, 0.02478, 8, 189.25, 30.83, 0.26443, 13, 38.68, 14.84, 0.61556, 27, -89.52, 23.34, 0.09454, 40, -224.1, -58.8, 5.1E-4, 54, -297.11, -194.62, 1.4E-4, 6, 9, -359.57, -12.88, 0.00674, 8, 295.08, 91.08, 0.07453, 13, 160.45, 16.54, 0.35139, 27, 31.85, 13.48, 0.39116, 40, -106.86, -25.89, 0.15674, 54, -203.08, -117.24, 0.01941, 6, 9, -488.69, -37.69, 6.7E-4, 8, 414.43, 146.25, 0.00642, 13, 291.61, 7.27, 0.09534, 27, 161.53, -8.2, 0.32068, 40, 22.27, -1.18, 0.36568, 54, -94.86, -42.56, 0.21117, 6, 9, -607.64, -27.83, 4.3E-4, 8, 532.26, 165.32, 0.00108, 13, 404.01, -32.87, 0.02584, 27, 269.61, -58.84, 0.13469, 40, 141.21, -11.13, 0.33582, 54, 17.98, -3.72, 0.50211, 1, 33, 26.4, -166.06, 1, 1, 33, 87.21, -106.12, 1, 1, 33, 108.19, -49.62, 1, 2, 33, 61.73, -82.13, 0.50021, 48, 4.42, 52.83, 0.49978, 2, 33, 22.84, -109.4, 0.50021, 48, 51.52, 46.73, 0.49978, 5, 9, 348.39, 119.13, 0.00694, 14, 247.12, -50.52, 0.065, 17, 60.86, -121.4, 0.06027, 33, -30.3, -118, 0.48738, 48, 96.58, 17.22, 0.38039, 1, 9, 26.73, 14.8, 1, 2, 9, -107.97, 25.67, 0.24192, 8, 60.17, -6.91, 0.75807, 5, 9, 235.53, 102.96, 0.07484, 14, 150.1, 9.35, 0.34943, 17, 27.64, -12.34, 0.40983, 33, -44.43, -4.87, 0.14928, 48, 34.03, -74.39, 0.0166, 5, 9, 227.15, 28.49, 0.29239, 14, 95.96, -42.46, 0.5708, 17, -47.23, -15.44, 0.07952, 33, -118.74, 4.84, 0.03982, 48, 84.85, -129.5, 0.01745, 2, 33, 5.19, -153.1, 0.87618, 48, 90.96, 71.21, 0.12381, 5, 9, 351.78, 108.85, 0.01127, 14, 243.13, -60.59, 0.10548, 17, 51.21, -126.33, 0.09782, 33, -40.65, -121.21, 0.46541, 48, 105.71, 17.33, 0.32, 1, 33, 23.69, -185.21, 1, 1, 33, 79.64, -175.94, 1, 1, 33, 93.96, -187.56, 1, 1, 33, 87.07, -206.55, 1, 1, 33, 64.2, -216.74, 1, 1, 33, 52.23, -203.68, 1, 1, 33, 59.24, -187.03, 1, 1, 33, 64.26, -223.8, 1, 1, 33, 89.44, -211.41, 1, 1, 33, 102.04, -186.95, 1, 1, 33, 83.1, -166.14, 1, 1, 33, 46.84, -186.41, 1, 1, 33, 50.32, -204.36, 1, 1, 33, 41.7, -206.59, 1, 1, 33, 61.87, -230.97, 1, 6, 9, -448.12, -58.75, 9.7E-4, 8, 374.97, 143.6, 0.01016, 13, 256.29, 17.42, 0.13074, 27, 127.43, 2.07, 0.37548, 40, -13.35, -3.05, 0.34387, 54, -128.14, -55.46, 0.13875, 6, 9, -519.55, -68.54, 5.1E-4, 8, 442.75, 168.18, 0.00402, 13, 327.21, 4.42, 0.06791, 27, 196.28, -19.32, 0.26429, 40, 58.71, -1.05, 0.3719, 54, -62.24, -26.21, 0.29134, 6, 9, -386.43, -41.35, 0.00321, 8, 318.32, 113.62, 0.03567, 13, 192.26, 20.14, 0.25008, 27, 64.19, 12.44, 0.42824, 40, -76.55, -13.67, 0.24036, 54, -182.56, -89.31, 0.0424 ], + "hull": 44 + } + }, + "raptor_front_arm": { + "raptor_front_arm": { + "type": "skinnedmesh", + "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, 15, 3.06, 31.88, 0.51075, 14, 66.56, -109.48, 0.48924, 1, 15, 35.87, 35.62, 1, 2, 15, 60.94, 27.12, 0.8464, 29, 46.49, 31.12, 0.15359, 3, 15, 74.05, 22.67, 0.34375, 29, 36.5, 21.53, 0.64062, 45, -45.25, -29.96, 0.01562, 3, 15, 67, 31.58, 0.10937, 29, 47.66, 23.68, 0.78125, 45, -40.93, -19.44, 0.10937, 3, 15, 42.17, 62.99, 0.01562, 29, 86.98, 31.24, 0.64062, 45, -25.75, 17.61, 0.34375, 2, 29, 103.83, 34.49, 0.34375, 45, -19.24, 33.49, 0.65625, 2, 29, 114.04, 19.51, 0.10937, 45, -1.11, 33.84, 0.89062, 2, 29, 144.85, -25.73, 0.02083, 45, 53.62, 34.88, 0.97916, 1, 45, 96.03, -19.16, 1, 1, 45, 104.2, -47.31, 1, 1, 45, 71.34, -23.98, 1, 1, 45, 81.39, -64.61, 1, 1, 45, 76.8, -68.81, 1, 2, 29, 83.18, -57.72, 0.02083, 45, 46.65, -34.25, 0.97916, 2, 29, 73.13, -45.76, 0.10937, 45, 31.14, -36.12, 0.89062, 2, 29, 73.98, -26.9, 0.34375, 45, 15.82, -25.09, 0.65625, 3, 15, 103.67, 70.28, 0.01562, 29, 65.1, -26.69, 0.64062, 45, 10.78, -32.41, 0.34375, 3, 15, 133.56, 9.13, 0.10937, 29, -2.94, -25.03, 0.78125, 45, -27.84, -88.47, 0.10937, 3, 15, 123.67, -14.42, 0.34375, 29, -19.29, -5.39, 0.64062, 45, -53.23, -91.41, 0.01562, 2, 15, 97.41, -15.43, 0.8464, 29, -8.08, 18.37, 0.15359, 1, 15, 45.46, -17.43, 1, 2, 15, 40.69, -27.17, 0.45035, 14, -1.69, -93.8, 0.54964, 2, 15, -2.74, -29.63, 0.44352, 14, 18.99, -72.93, 0.55647, 1, 14, 32.11, -48.45, 1, 1, 14, 57.56, -67.43, 1, 1, 14, 84.38, -87.42, 1, 2, 15, 16.44, 5.21, 0.7182, 14, 46.31, -101.86, 0.28179, 2, 15, -4.51, 5.32, 0.48851, 14, 52.82, -81.94, 0.51148 ], + "hull": 27 + } + }, + "raptor_front_leg": { + "raptor_front_leg": { + "type": "skinnedmesh", + "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, 43, 9, 10, 42, 43, 10, 41, 43, 42, 13, 44, 42, 10, 13, 42, 11, 13, 10, 13, 11, 12, 45, 8, 9, 45, 9, 43, 40, 8, 45, 41, 42, 44, 45, 43, 41, 45, 41, 44, 16, 40, 45, 17, 40, 16, 15, 45, 44, 16, 45, 15, 14, 15, 44, 13, 14, 44, 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, 23, 51, 36, 22, 23, 36, 36, 47, 35, 4, 35, 3, 36, 35, 4, 37, 22, 36, 21, 22, 37, 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, 28, 46, 32, 32, 27, 28, 50, 27, 32, 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": [ 3, 4, 128.03, 88.47, 0.83908, 10, -70.2, -134.13, 0.01331, 2, 158.83, -71.91, 0.1476, 2, 4, 219.55, 53.15, 0.77988, 10, -48.04, -38.58, 0.22011, 3, 4, 266.3, 35.1, 0.53531, 10, -36.73, 10.22, 0.46443, 30, 127.25, 245.46, 2.4E-4, 4, 4, 286.89, 9.79, 0.35076, 10, -14.56, 34.14, 0.64667, 30, 125.69, 212.88, 0.0023, 44, 101.39, 199.13, 2.5E-4, 4, 4, 281.54, -41.24, 0.09169, 10, 36.71, 36, 0.90196, 30, 87.64, 178.44, 0.00513, 44, 58.29, 171.29, 0.00119, 5, 4, 271.53, -136.86, 0.05608, 10, 132.77, 39.48, 0.69232, 16, 34.99, 78.76, 0.22087, 30, 16.38, 113.93, 0.0224, 44, -22.45, 119.13, 0.0083, 5, 4, 283.51, -164.25, 0.01987, 10, 158.21, 55.17, 0.50334, 16, 52.65, 54.63, 0.3617, 30, 7.01, 85.54, 0.08322, 44, -36.28, 92.63, 0.03184, 6, 4, 326.15, -179.3, 0.00798, 10, 167.14, 99.49, 0.21327, 16, 97.55, 49.25, 0.35075, 30, 28.72, 45.87, 0.14107, 44, -21.26, 49.99, 0.22311, 60, -72.29, 25.96, 0.0638, 6, 4, 333.96, -167.35, 0.00242, 10, 154.22, 105.55, 0.07519, 16, 102.57, 62.6, 0.22995, 30, 42.51, 49.55, 0.2831, 44, -7.06, 51.39, 0.2694, 60, -58.17, 28.03, 0.13992, 6, 4, 344.19, -149.68, 4.9E-4, 10, 134.24, 114.44, 0.0176, 16, 109.72, 83.39, 0.11397, 30, 64.09, 55.23, 0.07976, 44, 15.12, 53.51, 0.36292, 60, -36.09, 31.19, 0.42523, 1, 60, 35.8, 41.81, 1, 1, 60, 128.11, 17.93, 1, 1, 60, 188.72, -29.42, 1, 1, 60, 44.86, -26.17, 1, 1, 44, 133.17, -49.83, 1, 1, 44, 78.78, -50.15, 1, 5, 4, 399.32, -220.02, 2.2E-4, 10, 195.56, 179.43, 0.01703, 16, 179.46, 27.52, 0.2372, 30, 58.34, -33.93, 0.2023, 44, -4.91, -33.55, 0.54324, 5, 4, 370.41, -244.91, 3.2E-4, 10, 225.9, 152.49, 0.02513, 16, 155.04, -5.13, 0.35003, 30, 17.88, -32.5, 0.29852, 44, -44.62, -25.61, 0.32598, 5, 4, 340.37, -270.04, 0.00251, 10, 254.98, 126.27, 0.10129, 16, 131.21, -36.2, 0.54075, 30, -21.24, -31.17, 0.2082, 44, -83.02, -17.97, 0.14723, 5, 4, 225.1, -238.94, 0.01529, 10, 240.33, 7.81, 0.24036, 16, 11.94, -30.98, 0.57881, 30, -86.31, 68.9, 0.12023, 44, -131.06, 91.29, 0.04528, 5, 4, 194.64, -233.55, 0.04819, 10, 239.26, -23.1, 0.40427, 16, -18.96, -32.37, 0.48451, 30, -105.4, 93.25, 0.04604, 44, -145.97, 118.4, 0.01697, 5, 4, 187.65, -209.73, 0.09565, 10, 216.66, -33.35, 0.57617, 16, -30.97, -10.65, 0.30651, 30, -94.71, 115.65, 0.01788, 44, -131.8, 138.78, 0.00376, 4, 4, 163.85, -128.67, 0.19533, 10, 139.75, -68.26, 0.8011, 30, -58.32, 191.88, 0.00327, 44, -83.58, 208.13, 2.9E-4, 4, 4, 165.74, -94.49, 0.31921, 10, 105.59, -71.26, 0.6795, 30, -5.04, 220.72, 0.00117, 44, -56.32, 275.96, 1.0E-4, 4, 4, 166.39, -79.07, 0.46205, 10, 90.23, -72.76, 0.53752, 30, 5.55, 230.48, 3.9E-4, 44, -40.61, 286.16, 2.0E-5, 3, 4, 166.49, -74.17, 0.53779, 10, 85.42, -73.28, 0.46208, 30, -19.99, 230.7, 1.2E-4, 2, 4, 141.54, -82.46, 0.73138, 10, 97.13, -96.82, 0.26861, 3, 4, 99.76, -97.08, 0.81379, 10, 117.34, -136.23, 0.13997, 2, -2.56, -164.19, 0.04623, 3, 4, 45.01, -114.56, 0.8186, 10, 142.41, -187.89, 0.02098, 2, -51.09, -135.29, 0.1604, 3, 4, -16.2, -74.76, 0.62389, 10, 113.82, -253.08, 0.00952, 2, -42.95, -58.38, 0.36658, 2, 4, -74.73, -19.33, 0.31468, 2, -52.66, 17.55, 0.68531, 2, 4, 1.67, 76.75, 0.25576, 2, 70.07, 18.78, 0.74423, 1, 4, 93.54, 4.13, 1, 2, 4, 185.14, -6.66, 0.75461, 10, 15.98, -64.27, 0.24538, 2, 4, 217.11, -18.75, 0.50845, 10, 23.47, -30.93, 0.49154, 3, 4, 225.63, -32.92, 0.32512, 10, 36.3, -20.5, 0.6744, 30, 51.57, 221.95, 4.7E-4, 4, 4, 223, -84.73, 0.20061, 10, 87.96, -15.86, 0.79287, 30, 15.03, 185.13, 0.00581, 44, -12.28, 189.61, 6.9E-4, 5, 4, 235.61, -168.06, 0.07777, 10, 168.69, 8.29, 0.54931, 16, 6.74, 40.47, 0.33413, 30, -31.18, 114.66, 0.0321, 44, -69.27, 127.55, 0.00667, 5, 4, 259.63, -194.79, 0.01921, 10, 191.79, 35.8, 0.30498, 16, 36, 19.62, 0.53642, 30, -31.14, 78.74, 0.09568, 44, -75.03, 92.09, 0.04369, 5, 4, 332.55, -220.1, 0.00292, 10, 206.64, 111.53, 0.10776, 16, 112.69, 10.82, 0.51915, 30, 6.25, 11.23, 0.23449, 44, -49.03, 19.43, 0.13566, 4, 10, 192.51, 130.62, 0.03213, 16, 130.6, 26.41, 0.33941, 30, 29.35, 5.71, 0.27333, 44, -27.12, 10.25, 0.35511, 1, 44, 67.46, 3.16, 1, 1, 60, 19.07, -14.51, 1, 6, 4, 381.55, -150.4, 3.0E-4, 10, 130.71, 150.34, 0.00811, 16, 145.36, 89.53, 0.04102, 30, 89.29, 30.41, 0.02558, 44, 36, 24.95, 0.37636, 60, -13.89, 3.64, 0.54861, 1, 44, 86.23, -6.55, 1, 4, 10, 164.9, 153.55, 0.02263, 16, 151.18, 56, 0.23908, 30, 65.44, 5.55, 0.19254, 44, 8.45, 4.27, 0.54574, 2, 4, -9.28, -17.5, 0.59606, 2, 7.72, -30.85, 0.40393, 3, 4, 195.9, -53.81, 0.42356, 10, 61.11, -47.06, 0.57613, 30, 39.7, 225.21, 2.9E-4, 3, 4, 190.1, -48.45, 0.53227, 10, 56.61, -53.56, 0.46765, 30, 39.83, 233.12, 6.0E-5, 2, 4, 161.26, -48.26, 0.79873, 10, 60.44, -82.13, 0.20126, 3, 4, 120.37, -58.54, 0.8485, 10, 76.31, -121.18, 0.14441, 2, 41.04, -161.4, 0.00707, 4, 4, 197.37, -69.23, 0.33487, 10, 76.17, -43.46, 0.66324, 30, 30.34, 213.88, 0.0017, 44, -9.09, 262.42, 1.8E-4 ], + "hull": 32 + } + }, + "raptor_hindleg_back": { + "raptor_hindleg_back": { + "type": "skinnedmesh", + "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": [ 16, 47, 15, 15, 12, 13, 15, 13, 14, 15, 47, 12, 47, 10, 11, 17, 46, 47, 47, 46, 10, 18, 46, 17, 17, 47, 16, 18, 45, 46, 47, 11, 12, 22, 23, 24, 43, 42, 7, 43, 22, 42, 21, 22, 43, 44, 43, 7, 44, 7, 8, 44, 8, 9, 21, 43, 44, 45, 44, 9, 46, 45, 9, 20, 21, 44, 20, 45, 19, 44, 45, 20, 45, 18, 19, 46, 9, 10, 41, 27, 28, 26, 27, 41, 41, 28, 40, 5, 41, 40, 5, 40, 4, 24, 25, 26, 42, 26, 41, 24, 26, 42, 6, 41, 5, 42, 41, 6, 28, 29, 40, 40, 39, 4, 7, 42, 6, 24, 42, 22, 40, 29, 39, 36, 34, 35, 36, 35, 0, 33, 34, 36, 37, 36, 0, 37, 0, 1, 32, 33, 36, 31, 32, 36, 31, 36, 37, 30, 31, 37, 38, 37, 1, 30, 37, 38, 38, 1, 2, 39, 30, 38, 39, 38, 2, 29, 30, 39, 39, 2, 3, 4, 39, 3 ], + "vertices": [ 1, 6, 53.94, 69.15, 1, 1, 6, 126.23, 67.31, 1, 2, 6, 226.42, 31.13, 0.9375, 11, -30.87, -1.11, 0.0625, 2, 6, 240.84, 25.33, 0.7, 11, -25.64, 13.52, 0.3, 2, 6, 246.67, 8.05, 0.3, 11, -8.61, 20.02, 0.7, 3, 6, 240.81, -115.25, 0.0625, 11, 114.8, 19.01, 0.875, 19, 9.48, 59.16, 0.0625, 2, 11, 131.07, 29.69, 0.7, 19, 22.11, 44.35, 0.3, 2, 11, 146.06, 39.54, 0.3, 19, 33.76, 30.71, 0.7, 4, 11, 152.6, 65.01, 0.12438, 19, 59.85, 27.41, 0.74434, 35, 15.85, 48.05, 0.12104, 51, -80.52, 23.87, 0.01022, 4, 11, 154.28, 71.59, 0.0519, 19, 66.59, 26.56, 0.74749, 35, 16.72, 41.31, 0.15401, 51, -77.54, 17.76, 0.04658, 4, 11, 145.73, 77.3, 0.02193, 19, 71.19, 35.76, 0.63296, 35, 26.78, 39.17, 0.1288, 51, -67.32, 18.96, 0.21628, 3, 19, 87.93, 69.21, 0.0625, 35, 63.37, 31.39, 0.675, 51, -30.17, 23.3, 0.26249, 2, 35, 113.82, 35.72, 0.1038, 51, 16.23, 43.56, 0.89619, 1, 51, 128.14, 12.02, 1, 1, 51, 161.85, -15.81, 1, 2, 35, 90.98, -23.36, 0.0138, 51, 13.52, -19.72, 0.98619, 2, 35, 62.97, -25.81, 0.7, 51, -12.23, -31.02, 0.3, 3, 19, 115.12, -1.33, 0.08333, 35, 1.93, -12.66, 0.83333, 51, -74.26, -38.1, 0.08333, 2, 19, 106.11, -23.53, 0.3, 35, -21.8, -9.52, 0.7, 2, 19, 97.43, -44.9, 0.7, 35, -44.67, -6.51, 0.3, 2, 19, 84.26, -40.69, 0.9375, 35, -43.9, 7.29, 0.0625, 1, 19, 49.18, -29.46, 1, 2, 11, 206.75, 5.37, 0.13333, 19, 7.44, -33.77, 0.86666, 2, 11, 219.64, -20.52, 0.36111, 19, -16.64, -49.8, 0.63888, 2, 11, 208.4, -37.82, 0.72083, 19, -35.22, -40.82, 0.27916, 2, 11, 200.49, -50.02, 0.91666, 19, -48.31, -34.48, 0.08333, 1, 11, 161.1, -36.97, 1, 2, 6, 150.1, -116.76, 0.08333, 11, 119.88, -71.55, 0.91666, 2, 6, 154.99, -70.71, 0.42846, 11, 73.68, -68.47, 0.57153, 2, 6, 150.3, -65.27, 0.35604, 11, 68.42, -73.36, 0.64395, 2, 6, 146.51, -60.87, 0.59147, 11, 64.17, -77.32, 0.40852, 2, 6, 115.12, -75.08, 0.8446, 11, 79.61, -108.13, 0.15539, 1, 6, 63.33, -98.53, 1, 1, 6, 21.78, -94.55, 1, 1, 6, -66.69, -32.04, 1, 1, 6, -6.62, 52.97, 1, 1, 6, 58.14, -6, 1, 1, 6, 121.17, 2.44, 1, 2, 6, 188.87, -12.1, 0.96, 11, 13.79, -36.92, 0.04, 2, 6, 197.11, -18.42, 0.7, 11, 19.79, -28.44, 0.3, 2, 6, 203.98, -28.61, 0.3, 11, 29.69, -21.17, 0.7, 3, 6, 213.53, -136.06, 0.04, 11, 136.67, -7.42, 0.91999, 19, -14.02, 34.16, 0.04, 2, 11, 164.32, 0.66, 0.7, 19, -2.53, 7.73, 0.3, 2, 11, 177.97, 21.57, 0.25, 19, 19.92, -3.19, 0.75, 3, 11, 187.55, 72.78, 0.04, 19, 71.93, -6.29, 0.91999, 35, -13.72, 27.87, 0.04, 2, 19, 79.66, -3.72, 0.7, 35, -9.28, 21.04, 0.3, 3, 19, 87.98, 7.25, 0.3, 35, 3.42, 15.76, 0.66, 51, -81.96, -10.7, 0.04, 3, 19, 114.16, 61.85, 0.04, 35, 62.84, 4.15, 0.7, 51, -21.95, -2.66, 0.26 ], + "hull": 36 + } + }, + "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": "skinnedmesh", + "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, 0.31758, 0.50047 ], + "triangles": [ 14, 13, 0, 10, 11, 15, 15, 14, 1, 2, 7, 8, 8, 9, 10, 15, 2, 8, 15, 8, 10, 7, 3, 6, 7, 2, 3, 2, 15, 1, 6, 3, 5, 5, 3, 4, 14, 0, 1, 11, 14, 15, 11, 12, 14, 14, 12, 13 ], + "vertices": [ 1, 48, 28.6, 68.85, 1, 1, 48, 69.65, 38.95, 1, 1, 48, 150.72, 72.88, 1, 1, 48, 186.16, 74.79, 1, 1, 48, 199.76, 159.69, 1, 1, 48, 213.35, 148.16, 1, 1, 48, 242.43, 74.42, 1, 1, 48, 230.31, -13.08, 1, 1, 48, 189.56, -71.99, 1, 1, 48, 132.76, -105.6, 1, 1, 48, 83.71, -55.39, 1, 2, 33, -18.31, 12.1, 0.67732, 48, -0.04, -70.76, 0.32267, 1, 33, 113.44, 16.95, 1, 1, 33, 116.36, -62.48, 1, 1, 48, 1.86, 5.43, 1, 1, 48, 71.19, -4.17, 1 ], + "hull": 14 + } + }, + "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": "skinnedmesh", + "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": [ 19, 14, 22, 13, 14, 19, 19, 22, 6, 13, 10, 11, 9, 13, 19, 8, 9, 19, 6, 8, 19, 13, 11, 12, 9, 10, 13, 7, 8, 6, 22, 15, 20, 14, 15, 22, 5, 20, 4, 22, 20, 5, 15, 16, 20, 20, 21, 4, 6, 22, 5, 21, 18, 0, 16, 17, 18, 21, 16, 18, 0, 1, 2, 3, 21, 0, 2, 3, 0, 20, 16, 21, 4, 21, 3 ], + "vertices": [ 1, 21, 3.9, -3.27, 1, 1, 21, 4.25, 15.05, 1, 1, 21, 13.24, 20.28, 1, 2, 21, 23.42, 21.2, 0.7, 37, -15.2, 21.22, 0.3, 3, 21, 41.11, 22.87, 0.3, 37, 2.48, 22.89, 0.6375, 53, -33.83, 24.96, 0.0625, 3, 21, 52.07, 21.72, 0.0625, 37, 13.43, 21.74, 0.6375, 53, -22.97, 23.11, 0.3, 2, 37, 18.39, 20.76, 0.25, 53, -18.09, 21.82, 0.75, 1, 53, -18.76, 33.09, 1, 1, 53, 49.92, 31.57, 1, 1, 53, 53.21, 25, 1, 1, 53, 53.11, -27.48, 1, 1, 53, 49.74, -31.27, 1, 1, 53, -20.73, -36.76, 1, 1, 53, -23.82, -22.28, 1, 3, 21, 53.48, -24.61, 0.0625, 37, 14.84, -24.59, 0.575, 53, -24.51, -23.21, 0.3625, 3, 21, 41.44, -26.12, 0.3, 37, 2.81, -26.09, 0.6375, 53, -36.62, -23.95, 0.0625, 2, 21, 24.38, -26.12, 0.7, 37, -14.24, -26.1, 0.3, 1, 21, 5.57, -26.12, 1, 1, 21, 3.54, -22.64, 1, 1, 53, -23.08, -0.04, 1, 3, 21, 41.66, -1.72, 0.3, 37, 3.03, -1.7, 0.66, 53, -34.85, 0.38, 0.04, 2, 21, 23.85, -2.46, 0.7, 37, -14.77, -2.44, 0.3, 3, 21, 52.58, -1.52, 0.04, 37, 13.95, -1.5, 0.62, 53, -23.94, -0.11, 0.34 ], + "hull": 19 + } + }, + "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": "skinnedmesh", + "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, 55, 3.63, 27.04, 0.6875, 62, -47.26, 33.87, 0.3125, 3, 55, 39.09, 19.45, 0.3125, 62, -13.41, 20.86, 0.625, 65, -51.54, 33.37, 0.0625, 3, 55, 71.56, 19.02, 0.0625, 62, 18.58, 15.39, 0.625, 65, -21.56, 20.92, 0.3125, 2, 62, 55.03, 16.85, 0.3125, 65, 14.29, 14.23, 0.6875, 2, 62, 93.34, 18.39, 0.08333, 65, 51.98, 7.21, 0.91666, 1, 65, 56.09, -4.5, 1, 2, 62, 85.06, -1.49, 0.08333, 65, 39.48, -10.33, 0.91666, 2, 62, 54.22, -9.18, 0.3125, 65, 7.71, -10.96, 0.6875, 3, 55, 75.14, -14.72, 0.0625, 62, 16.87, -18.5, 0.625, 65, -30.77, -11.73, 0.3125, 3, 55, 38.8, -25.8, 0.3125, 62, -20.74, -23.8, 0.625, 65, -68.62, -8.53, 0.0625, 2, 55, 2.4, -35.77, 0.6875, 62, -58.25, -27.99, 0.3125, 2, 55, -17.28, -40.62, 0.91666, 62, -78.45, -29.71, 0.08333, 1, 55, -59.91, 8.18, 1, 2, 55, -26.13, 37.69, 0.91666, 62, -75.02, 49.02, 0.08333 ], + "hull": 14 + } + }, + "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": "skinnedmesh", + "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, 26, 24.71, 8.03, 0.80344, 39, -17.42, 11.02, 0.19655, 2, 26, 37.95, 8.04, 0.59978, 39, -4.36, 8.87, 0.40021, 2, 26, 50.88, 8.04, 0.36895, 39, 8.39, 6.77, 0.63104, 2, 26, 65.92, 12.27, 0.17748, 39, 23.91, 8.48, 0.82251, 2, 26, 81.72, 16.7, 0.05943, 39, 40.23, 10.28, 0.94056, 2, 26, 98.82, 25.04, 0.01209, 39, 58.46, 15.71, 0.9879, 2, 26, 114.44, 11.57, 0.00191, 39, 71.67, -0.11, 0.99808, 2, 26, 100.47, -4.61, 0.01817, 39, 55.25, -13.81, 0.98182, 2, 26, 78.79, -4.14, 0.07487, 39, 33.94, -9.81, 0.92512, 2, 26, 65.83, -6.24, 0.2028, 39, 20.81, -9.76, 0.79719, 2, 26, 49.78, -8.83, 0.39971, 39, 4.55, -9.7, 0.60028, 2, 26, 37.93, -10.97, 0.62658, 39, -7.48, -9.88, 0.37341, 2, 26, 25.85, -13.15, 0.82034, 39, -19.75, -10.06, 0.17965, 2, 26, 0.25, -18.03, 0.95288, 39, -45.81, -10.7, 0.04711, 2, 26, -17.83, -2.43, 0.97709, 39, -61.11, 7.63, 0.0229, 2, 26, 1.57, 20.07, 0.94774, 39, -38.29, 26.67, 0.05225, 2, 26, 10.84, -1.23, 0.97709, 39, -32.62, 4.14, 0.0229 ], + "hull": 16 + } + }, + "visor": { + "visor": { "x": 99.13, "y": 6.51, "rotation": -70.57, "width": 261, "height": 168 } + } + } +}, +"animations": { + "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": 1, + "bendPositive": true, + "curve": [ 0.317, 0.13, 0.781, 0.56 ] + }, + { "time": 0.1333, "mix": 0, "bendPositive": true } + ] + } + }, + "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": 0.5333, "angle": -41.93 }, + { "time": 0.6333, "angle": -16.71 }, + { "time": 0.7333, "angle": 16.92 }, + { "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": 0.1, "angle": -45.79 }, + { "time": 0.1666, "angle": -19.95 }, + { "time": 0.4, "angle": 35.36 }, + { "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": 0.5333, "angle": -346.78 }, + { "time": 0.6333, "angle": -398.52 }, + { "time": 0.7333, "angle": -393.21 }, + { "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": 0.0666, "angle": -14.99 }, + { "time": 0.1, "angle": -28.87 }, + { "time": 0.1666, "angle": -49.87 }, + { "time": 0.4, "angle": -14.45 }, + { "time": 0.4666, "angle": 11.42 }, + { "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": -6.57 }, + { "time": 0.0666, "angle": -1.96 }, + { "time": 0.3333, "angle": -18.09 }, + { "time": 0.6333, "angle": -1.96 }, + { "time": 0.9, "angle": -18.09 }, + { "time": 1.0666, "angle": -6.57 } + ], + "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 } + ], + "scale": [ + { "time": 0, "x": 1.024, "y": 1 }, + { "time": 0.0666, "x": 1.072, "y": 1 }, + { "time": 0.3333, "x": 0.947, "y": 1 }, + { "time": 0.6333, "x": 1.072, "y": 1 }, + { "time": 0.9, "x": 0.903, "y": 1 }, + { "time": 1.0666, "x": 1.024, "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": -14.83 }, + { "time": 0.0666, "angle": -24.31 }, + { "time": 0.3333, "angle": 8.86 }, + { "time": 0.6333, "angle": -24.31 }, + { "time": 0.9, "angle": 8.86 }, + { "time": 1.0666, "angle": -14.83 } + ], + "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 } + ], + "scale": [ + { "time": 0, "x": 0.995, "y": 1 }, + { "time": 0.0666, "x": 1, "y": 1 }, + { "time": 0.3333, "x": 0.947, "y": 1 }, + { "time": 1.0666, "x": 0.995, "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": 16.99 }, + { "time": 0.0666, "angle": 7.36 }, + { "time": 0.3333, "angle": 41.06 }, + { "time": 0.6333, "angle": 7.36 }, + { "time": 0.9, "angle": 41.06 }, + { "time": 1.0666, "angle": 16.99 } + ], + "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 } + ], + "scale": [ + { "time": 0, "x": 0.995, "y": 1 }, + { "time": 0.0666, "x": 1, "y": 1 }, + { "time": 0.3333, "x": 0.947, "y": 1 }, + { "time": 1.0666, "x": 0.995, "y": 1 } + ] + }, + "front_foot2": { + "rotate": [ + { "time": 0, "angle": 44.18 }, + { "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": 42.33 }, + { "time": 1.0666, "angle": 44.18 } + ], + "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": -15.7 }, + { "time": 0.0666, "angle": -38.39 }, + { "time": 0.3333, "angle": 41.03 }, + { "time": 0.6333, "angle": -38.39 }, + { "time": 0.9, "angle": 41.03 }, + { "time": 1.0666, "angle": -15.7 } + ], + "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 } + ], + "scale": [ + { "time": 0, "x": 0.995, "y": 1 }, + { "time": 0.0666, "x": 1, "y": 1 }, + { "time": 0.3333, "x": 0.947, "y": 1 }, + { "time": 1.0666, "x": 0.995, "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": 27.59 }, + { "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": 27.59 }, + { "time": 1.0666, "angle": 27.59 } + ], + "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 } + ] + } + }, + "ffd": { + "default": { + "raptor_body": { + "raptor_body": [ + { "time": 0 }, + { + "time": 0.2666, + "offset": 368, + "vertices": [ -16.78, 15.47, -0.63, 22.82, 18.11, 13.89, 19.32, 12.15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.24, 0.81, -3.24, 0.81, -3.24, 0.81, -3.24, 0.81, -3.24, 0.81, -3.24, 0.81, 0, 0, 0, 0, 0, 0, -3.24, 0.81, 0, 0, -3.24, 0.81 ] + }, + { "time": 0.5333 }, + { + "time": 0.8, + "offset": 368, + "vertices": [ -16.78, 15.47, -0.63, 22.82, 18.11, 13.89, 19.32, 12.15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.24, 0.81, -3.24, 0.81, -3.24, 0.81, -3.24, 0.81, -3.24, 0.81, -3.24, 0.81, 0, 0, 0, 0, 0, 0, -3.24, 0.81, 0, 0, -3.24, 0.81 ] + }, + { "time": 1.0666 } + ] + }, + "raptor_front_leg": { + "raptor_front_leg": [ + { "time": 0, "curve": "stepped" }, + { "time": 0.2666 }, + { + "time": 0.5333, + "offset": 216, + "vertices": [ -2.23, 21.95, 21.54, -4.75 ] + }, + { + "time": 0.6, + "offset": 216, + "vertices": [ 7.17, 15.14, 15.26, -6.91 ] + }, + { + "time": 0.7333, + "offset": 176, + "vertices": [ -0.82, 0.73, -0.01, -1.1, -0.27, 1.06, -1.28, 0.39, 0, 0, 0, 0, 0, 0, 1.48, -2.59, 0.98, 2.82, 2.73, -10.49, 6.12, 8.95, -3.72, -10.18, -2.6, -2.28, 3.43, -0.47, -3.44, -0.39, -2.28, -4.76, 5.08, 1.4, -4.58, -2.61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.37, -1.75, 2.22, 0.1, -1.86, -0.75, -2.86, -0.77, 2.45, -1.65 ] + }, + { "time": 0.8, "curve": "stepped" }, + { "time": 0.9666, "curve": "stepped" }, + { "time": 1.0666 } + ] + } + } + } + } +} +} \ No newline at end of file diff --git a/spine-starling/spine-starling-example/src/raptor.png b/spine-starling/spine-starling-example/src/raptor.png new file mode 100644 index 000000000..861dbce1a Binary files /dev/null and b/spine-starling/spine-starling-example/src/raptor.png differ diff --git a/spine-starling/spine-starling-example/src/GoblinsExample.as b/spine-starling/spine-starling-example/src/spine/GoblinsExample.as similarity index 84% rename from spine-starling/spine-starling-example/src/GoblinsExample.as rename to spine-starling/spine-starling-example/src/spine/GoblinsExample.as index 34b386c43..8aafcdd78 100644 --- a/spine-starling/spine-starling-example/src/GoblinsExample.as +++ b/spine-starling/spine-starling-example/src/spine/GoblinsExample.as @@ -1,7 +1,5 @@ -package { +package spine { -import spine.SkeletonData; -import spine.SkeletonJson; import spine.atlas.Atlas; import spine.attachments.AtlasAttachmentLoader; import spine.attachments.AttachmentLoader; @@ -18,26 +16,28 @@ import starling.textures.Texture; import starling.textures.TextureAtlas; public class GoblinsExample extends Sprite { - [Embed(source = "goblins-ffd.json", mimeType = "application/octet-stream")] + [Embed(source = "goblins-mesh.json", mimeType = "application/octet-stream")] static public const GoblinsJson:Class; - [Embed(source = "goblins-ffd.atlas", mimeType = "application/octet-stream")] + [Embed(source = "goblins-mesh.atlas", mimeType = "application/octet-stream")] static public const GoblinsAtlas:Class; - [Embed(source = "goblins-ffd.png")] + [Embed(source = "goblins-mesh.png")] static public const GoblinsAtlasTexture:Class; - [Embed(source = "goblins-ffd-starling.xml", mimeType = "application/octet-stream")] + [Embed(source = "goblins-mesh-starling.xml", mimeType = "application/octet-stream")] static public const GoblinsStarlingAtlas:Class; - [Embed(source = "goblins-ffd-starling.png")] + [Embed(source = "goblins-mesh-starling.png")] static public const GoblinsStarlingAtlasTexture:Class; private var skeleton:SkeletonAnimation; public function GoblinsExample () { + var useStarlingAtlas:Boolean = true; + var attachmentLoader:AttachmentLoader; - if (Main.useStarlingAtlas) { + if (useStarlingAtlas) { var texture:Texture = Texture.fromBitmap(new GoblinsStarlingAtlasTexture()); var xml:XML = XML(new GoblinsStarlingAtlas()); var starlingAtlas:TextureAtlas = new TextureAtlas(texture, xml); diff --git a/spine-starling/spine-starling-example/src/Main.as b/spine-starling/spine-starling-example/src/spine/Main.as similarity index 68% rename from spine-starling/spine-starling-example/src/Main.as rename to spine-starling/spine-starling-example/src/spine/Main.as index cdd007183..057c9e0af 100644 --- a/spine-starling/spine-starling-example/src/Main.as +++ b/spine-starling/spine-starling-example/src/spine/Main.as @@ -1,20 +1,19 @@ -package { +package spine { import flash.display.Sprite; import starling.core.Starling; -[SWF(width = "640", height = "480", frameRate = "60", backgroundColor = "#dddddd")] +[SWF(width = "800", height = "600", frameRate = "60", backgroundColor = "#dddddd")] public class Main extends Sprite { private var _starling:Starling; - static public var useStarlingAtlas:Boolean; public function Main () { var example:Class; //example = SpineboyExample; - example = GoblinsExample; - useStarlingAtlas = true; + //example = GoblinsExample; + example = RaptorExample; _starling = new Starling(example, stage); _starling.enableErrorChecking = true; diff --git a/spine-starling/spine-starling-example/src/spine/RaptorExample.as b/spine-starling/spine-starling-example/src/spine/RaptorExample.as new file mode 100644 index 000000000..706d33713 --- /dev/null +++ b/spine-starling/spine-starling-example/src/spine/RaptorExample.as @@ -0,0 +1,62 @@ +package spine { + +import spine.atlas.Atlas; +import spine.attachments.AtlasAttachmentLoader; +import spine.attachments.AttachmentLoader; +import spine.starling.SkeletonAnimation; +import spine.starling.StarlingAtlasAttachmentLoader; +import spine.starling.StarlingTextureLoader; + +import starling.core.Starling; +import starling.display.Sprite; +import starling.events.Touch; +import starling.events.TouchEvent; +import starling.events.TouchPhase; +import starling.textures.Texture; +import starling.textures.TextureAtlas; + +public class RaptorExample extends Sprite { + [Embed(source = "raptor.json", mimeType = "application/octet-stream")] + static public const RaptorJson:Class; + + [Embed(source = "raptor.atlas", mimeType = "application/octet-stream")] + static public const RaptorAtlas:Class; + + [Embed(source = "raptor.png")] + static public const RaptorAtlasTexture:Class; + + private var skeleton:SkeletonAnimation; + private var gunGrabbed:Boolean; + + public function RaptorExample () { + var attachmentLoader:AttachmentLoader; + var spineAtlas:Atlas = new Atlas(new RaptorAtlas(), new StarlingTextureLoader(new RaptorAtlasTexture())); + attachmentLoader = new AtlasAttachmentLoader(spineAtlas); + + var json:SkeletonJson = new SkeletonJson(attachmentLoader); + json.scale = 0.5; + var skeletonData:SkeletonData = json.readSkeletonData(new RaptorJson()); + + skeleton = new SkeletonAnimation(skeletonData, true); + skeleton.x = 400; + skeleton.y = 560; + skeleton.state.setAnimationByName(0, "walk", true); + + addChild(skeleton); + Starling.juggler.add(skeleton); + + addEventListener(TouchEvent.TOUCH, onClick); + } + + private function onClick (event:TouchEvent) : void { + var touch:Touch = event.getTouch(this); + if (touch && touch.phase == TouchPhase.BEGAN) { + if (gunGrabbed) + skeleton.skeleton.setToSetupPose(); + else + skeleton.state.setAnimationByName(1, "gungrab", false); + gunGrabbed = !gunGrabbed; + } + } +} +} diff --git a/spine-starling/spine-starling-example/src/SpineboyExample.as b/spine-starling/spine-starling-example/src/spine/SpineboyExample.as similarity index 75% rename from spine-starling/spine-starling-example/src/SpineboyExample.as rename to spine-starling/spine-starling-example/src/spine/SpineboyExample.as index 514f45e2e..29142c1fa 100644 --- a/spine-starling/spine-starling-example/src/SpineboyExample.as +++ b/spine-starling/spine-starling-example/src/spine/SpineboyExample.as @@ -1,8 +1,5 @@ -package { +package spine { -import spine.Event; -import spine.SkeletonData; -import spine.SkeletonJson; import spine.animation.AnimationStateData; import spine.atlas.Atlas; import spine.attachments.AtlasAttachmentLoader; @@ -29,26 +26,11 @@ public class SpineboyExample extends Sprite { [Embed(source = "spineboy.png")] static public const SpineboyAtlasTexture:Class; - [Embed(source = "spineboy-starling.xml", mimeType = "application/octet-stream")] - static public const SpineboyStarlingAtlas:Class; - - [Embed(source = "spineboy-starling.png")] - static public const SpineboyStarlingAtlasTexture:Class; - private var skeleton:SkeletonAnimation; public function SpineboyExample () { - var attachmentLoader:AttachmentLoader; - if (Main.useStarlingAtlas) { - var texture:Texture = Texture.fromBitmap(new SpineboyAtlasTexture()); - var xml:XML = XML(new SpineboyStarlingAtlas()); - var starlingAtlas:TextureAtlas = new TextureAtlas(texture, xml); - attachmentLoader = new StarlingAtlasAttachmentLoader(starlingAtlas); - } else { - var spineAtlas:Atlas = new Atlas(new SpineboyAtlas(), new StarlingTextureLoader(new SpineboyAtlasTexture())); - attachmentLoader = new AtlasAttachmentLoader(spineAtlas); - } - + var spineAtlas:Atlas = new Atlas(new SpineboyAtlas(), new StarlingTextureLoader(new SpineboyAtlasTexture())); + var attachmentLoader:AttachmentLoader = new AtlasAttachmentLoader(spineAtlas); var json:SkeletonJson = new SkeletonJson(attachmentLoader); json.scale = 0.6; var skeletonData:SkeletonData = json.readSkeletonData(new SpineboyJson()); @@ -59,8 +41,8 @@ public class SpineboyExample extends Sprite { stateData.setMixByName("jump", "jump", 0.2); skeleton = new SkeletonAnimation(skeletonData, false, stateData); - skeleton.x = 320; - skeleton.y = 420; + skeleton.x = 400; + skeleton.y = 560; skeleton.state.onStart.add(function (trackIndex:int) : void { trace(trackIndex + " start: " + skeleton.state.getCurrent(trackIndex)); diff --git a/spine-starling/spine-starling-example/src/spineboy-starling.json b/spine-starling/spine-starling-example/src/spineboy-starling.json deleted file mode 100644 index 113e72c33..000000000 --- a/spine-starling/spine-starling-example/src/spineboy-starling.json +++ /dev/null @@ -1,1002 +0,0 @@ -{ -"bones": [ - { "name": "root" }, - { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, - { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, - { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, - { "name": "right upper leg", "parent": "hip", "length": 45.76, "x": -18.27, "rotation": -101.13 }, - { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 94.95 }, - { "name": "left lower leg", "parent": "left upper leg", "length": 56.45, "x": 51.78, "y": 3.46, "rotation": -16.65 }, - { "name": "left shoulder", "parent": "torso", "length": 44.19, "x": 78.96, "y": -15.75, "rotation": -156.96 }, - { "name": "neck", "parent": "torso", "length": 18.38, "x": 83.64, "y": -1.78, "rotation": 0.9 }, - { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 50.21, "y": 0.6, "rotation": -10.7 }, - { "name": "right shoulder", "parent": "torso", "length": 49.95, "x": 81.9, "y": 6.79, "rotation": 130.6 }, - { "name": "head", "parent": "neck", "length": 68.28, "x": 19.09, "y": 6.97, "rotation": -8.94 }, - { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 44.19, "y": -0.01, "rotation": 28.16 }, - { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 64.02, "y": -8.67, "rotation": 102.43 }, - { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 49.95, "y": -0.12, "rotation": 40.12 }, - { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, - { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, - { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } -], -"slots": [ - { "name": "left shoulder", "bone": "left shoulder", "attachment": "left-shoulder" }, - { "name": "left arm", "bone": "left arm", "attachment": "left-arm" }, - { "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": "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": "right upper leg", "bone": "right upper leg", "attachment": "right-upper-leg" }, - { "name": "torso", "bone": "torso", "attachment": "torso" }, - { "name": "neck", "bone": "neck", "attachment": "neck" }, - { "name": "head", "bone": "head", "attachment": "head" }, - { "name": "eyes", "bone": "head", "attachment": "eyes" }, - { "name": "right shoulder", "bone": "right shoulder", "attachment": "right-shoulder", "additive": true }, - { "name": "right arm", "bone": "right arm", "attachment": "right-arm" }, - { "name": "right hand", "bone": "right hand", "attachment": "right-hand" }, - { "name": "bb-head", "bone": "head", "attachment": "bb-head" } -], -"skins": { - "default": { - "bb-head": { - "bb-head": { - "type": "boundingbox", - "vertices": [ - 55.69696, - -44.60648, - 8.2226715, - -47.609646, - -11.244263, - -32.942703, - -0.05206299, - 35.835804, - 61.018433, - 43.227512, - 90.35846, - -16.054127, - 115.41275, - -32.817406, - 78.29431, - -56.05409 - ] - } - }, - "eyes": { - "eyes": { "x": 28.94, "y": -32.92, "rotation": -86.9, "width": 34, "height": 27 }, - "eyes-closed": { "x": 28.77, "y": -32.86, "rotation": -86.9, "width": 34, "height": 27 } - }, - "head": { - "head": { "x": 53.94, "y": -5.75, "rotation": -86.9, "width": 121, "height": 132 } - }, - "left arm": { - "left-arm": { "x": 15.11, "y": -0.44, "rotation": 33.84, "width": 35, "height": 29 } - }, - "left foot": { - "left-foot": { "x": 24.35, "y": 8.88, "rotation": 3.32, "width": 65, "height": 30 } - }, - "left hand": { - "left-hand": { "x": 0.75, "y": 1.86, "rotation": 31.14, "width": 35, "height": 38 } - }, - "left lower leg": { - "left-lower-leg": { "x": 24.55, "y": -1.92, "rotation": 105.75, "width": 49, "height": 64 } - }, - "left shoulder": { - "left-shoulder": { "x": 23.74, "y": 0.11, "rotation": 62.01, "width": 34, "height": 53 } - }, - "left upper leg": { - "left-upper-leg": { "x": 26.12, "y": -1.85, "rotation": 89.09, "width": 33, "height": 67 } - }, - "neck": { - "neck": { "x": 9.42, "y": -3.66, "rotation": -100.15, "width": 34, "height": 28 } - }, - "pelvis": { - "pelvis": { "x": -4.83, "y": 10.62, "width": 63, "height": 47 } - }, - "right arm": { - "right-arm": { "x": 18.34, "y": -2.64, "rotation": 94.32, "width": 21, "height": 45 } - }, - "right foot": { - "right-foot": { "x": 19.02, "y": 8.47, "rotation": 1.52, "width": 67, "height": 30 } - }, - "right hand": { - "right-hand": { "x": 6.82, "y": 1.25, "rotation": 91.96, "width": 32, "height": 32 } - }, - "right lower leg": { - "right-lower-leg": { "x": 23.28, "y": -2.59, "rotation": 111.83, "width": 51, "height": 64 } - }, - "right shoulder": { - "right-shoulder": { "x": 25.86, "y": 0.03, "rotation": 134.44, "width": 52, "height": 51 } - }, - "right upper leg": { - "right-upper-leg": { "x": 23.03, "y": 0.25, "rotation": 101.13, "width": 44, "height": 70 } - }, - "torso": { - "torso": { "x": 44.57, "y": -7.08, "rotation": -94.95, "width": 68, "height": 92 } - } - } -}, -"events": { - "behind": {}, - "headAttach": {}, - "headPop": {} -}, -"animations": { - "drawOrder": { - "bones": { - "head": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4827, "angle": -23.11 }, - { "time": 0.8965, "angle": -56.45 }, - { "time": 1.3103, "angle": 1.38 }, - { "time": 1.7931, "angle": 36.12 }, - { "time": 2.1379, "angle": 1.24 }, - { "time": 2.6206, "angle": -37.12 }, - { "time": 2.9666, "angle": 2.07 }, - { "time": 3.4666, "angle": 34.72 }, - { "time": 3.9, "angle": 359.99 } - ], - "translate": [ - { - "time": 0, - "x": 0, - "y": 0, - "curve": [ 0.19, 0.4, 0.586, 0.75 ] - }, - { - "time": 0.2758, - "x": 57.88, - "y": -35.72, - "curve": [ 0.39, 0.54, 0.632, 0.72 ] - }, - { - "time": 0.4827, - "x": 87.26, - "y": -87.89, - "curve": [ 0.325, 0.23, 0.587, 0.36 ] - }, - { - "time": 0.6896, - "x": 28.89, - "y": -114.62, - "curve": [ 0.383, 0.23, 0.736, 0.55 ] - }, - { - "time": 0.8965, - "x": -76.58, - "y": -124.98, - "curve": [ 0.129, 0.21, 0.547, 0.64 ] - }, - { - "time": 1.1034, - "x": -154.37, - "y": -77.13, - "curve": [ 0.354, 0.48, 0.729, 0.9 ] - }, - { - "time": 1.3103, - "x": -181.02, - "y": 18.56, - "curve": [ 0.063, 0.15, 0.52, 0.62 ] - }, - { - "time": 1.5862, - "x": -150.38, - "y": 128.67, - "curve": [ 0.381, 0.54, 0.778, 1 ] - }, - { - "time": 1.7931, - "x": -112.08, - "y": 146.28, - "curve": [ 0.242, 0, 0.626, 0.45 ] - }, - { - "time": 1.931, - "x": -63.7, - "y": 111.22, - "curve": [ 0.398, 0.35, 0.786, 0.76 ] - }, - { - "time": 2.1379, - "x": -48.94, - "y": -1.55, - "curve": [ 0.188, 0.21, 0.575, 0.61 ] - }, - { - "time": 2.3448, - "x": -91.69, - "y": -91.93, - "curve": [ 0.362, 0.51, 0.766, 1 ] - }, - { - "time": 2.6206, - "x": -142.79, - "y": -126.83, - "curve": [ 0.227, 0.34, 0.593, 0.75 ] - }, - { - "time": 2.7586, - "x": -176.7, - "y": -98.32, - "curve": [ 0.26, 0.4, 0.612, 0.71 ] - }, - { - "time": 2.8965, - "x": -163.95, - "y": -24.04, - "curve": [ 0.338, 0.37, 0.676, 0.71 ] - }, - { - "time": 2.9655, - "x": -150.17, - "y": 10.71, - "curve": [ 0.387, 0.61, 0.741, 1 ] - }, - { - "time": 3.1034, - "x": -102.44, - "y": 45.92, - "curve": [ 0.31, 0.24, 0.648, 0.58 ] - }, - { - "time": 3.2413, - "x": -53.99, - "y": 70.39, - "curve": [ 0.325, 0.29, 0.663, 0.63 ] - }, - { - "time": 3.3793, - "x": 1.88, - "y": 55.54, - "curve": [ 0.387, 0.33, 0.769, 0.73 ] - }, - { - "time": 3.5862, - "x": 34.26, - "y": 36.13, - "curve": [ 0.206, 0.28, 0.596, 0.67 ] - }, - { - "time": 3.7931, - "x": 23.94, - "y": 1.01, - "curve": [ 0.373, 0.56, 0.759, 1 ] - }, - { "time": 4, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0.8275, "x": 1, "y": 1 }, - { "time": 1.3103, "x": 0.742, "y": 0.742 }, - { "time": 1.7931, "x": 1, "y": 1 }, - { "time": 2.1379, "x": 1.502, "y": 1.502 }, - { "time": 2.6206, "x": 1, "y": 1 }, - { "time": 2.9655, "x": 0.707, "y": 0.707 }, - { "time": 3.3793, "x": 1, "y": 1 } - ] - } - }, - "events": [ - { "time": 0, "name": "headPop", "string": "pop.wav" }, - { "time": 1.3103, "name": "behind" }, - { "time": 2.9655, "name": "behind" }, - { "time": 4, "name": "headAttach", "string": "attach.wav" } - ], - "draworder": [ - { - "time": 0.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { - "time": 1.7931, - "offsets": [ - { "slot": "head", "offset": 3 }, - { "slot": "eyes", "offset": 3 } - ] - }, - { - "time": 2.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { "time": 3.5862 } - ] - }, - "jump": { - "bones": { - "hip": { - "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 0.9333, "angle": 0, "curve": "stepped" }, - { "time": 1.3666, "angle": 0 } - ], - "translate": [ - { "time": 0, "x": -11.57, "y": -3 }, - { "time": 0.2333, "x": -16.2, "y": -19.43 }, - { - "time": 0.3333, - "x": 7.66, - "y": -8.48, - "curve": [ 0.057, 0.06, 0.712, 1 ] - }, - { "time": 0.3666, "x": 15.38, "y": 5.01 }, - { "time": 0.4666, "x": -7.84, "y": 57.22 }, - { - "time": 0.6, - "x": -10.81, - "y": 96.34, - "curve": [ 0.241, 0, 1, 1 ] - }, - { "time": 0.7333, "x": -7.01, "y": 54.7 }, - { "time": 0.8, "x": -10.58, "y": 32.2 }, - { "time": 0.9333, "x": -31.99, "y": 0.45 }, - { "time": 1.0666, "x": -12.48, "y": -29.47 }, - { "time": 1.3666, "x": -11.57, "y": -3 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left upper leg": { - "rotate": [ - { "time": 0, "angle": 17.13 }, - { "time": 0.2333, "angle": 44.35 }, - { "time": 0.3333, "angle": 16.46 }, - { "time": 0.4, "angle": -9.88 }, - { "time": 0.4666, "angle": -11.42 }, - { "time": 0.5666, "angle": 23.46 }, - { "time": 0.7666, "angle": 71.82 }, - { "time": 0.9333, "angle": 65.53 }, - { "time": 1.0666, "angle": 51.01 }, - { "time": 1.3666, "angle": 17.13 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 0.9333, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 1.3666, "x": -3, "y": -2.25 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -16.25 }, - { "time": 0.2333, "angle": -52.21 }, - { "time": 0.4, "angle": 15.04 }, - { "time": 0.4666, "angle": -8.95 }, - { "time": 0.5666, "angle": -39.53 }, - { "time": 0.7666, "angle": -27.27 }, - { "time": 0.9333, "angle": -3.52 }, - { "time": 1.0666, "angle": -61.92 }, - { "time": 1.3666, "angle": -16.25 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": 0.33 }, - { "time": 0.2333, "angle": 6.2 }, - { "time": 0.3333, "angle": 14.73 }, - { "time": 0.4, "angle": -15.54 }, - { "time": 0.4333, "angle": -21.2 }, - { "time": 0.5666, "angle": -7.55 }, - { "time": 0.7666, "angle": -0.67 }, - { "time": 0.9333, "angle": -0.58 }, - { "time": 1.0666, "angle": 14.64 }, - { "time": 1.3666, "angle": 0.33 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 25.97 }, - { "time": 0.2333, "angle": 46.43 }, - { "time": 0.3333, "angle": 22.61 }, - { "time": 0.4, "angle": 2.13 }, - { - "time": 0.4666, - "angle": 0.04, - "curve": [ 0, 0, 0.637, 0.98 ] - }, - { "time": 0.6, "angle": 65.55 }, - { "time": 0.7666, "angle": 64.93 }, - { "time": 0.9333, "angle": 41.08 }, - { "time": 1.0666, "angle": 66.25 }, - { "time": 1.3666, "angle": 25.97 } - ], - "translate": [ - { "time": 0, "x": 5.74, "y": 0.61 }, - { "time": 0.2333, "x": 4.79, "y": 1.79 }, - { "time": 0.3333, "x": 6.05, "y": -4.55 }, - { "time": 0.9333, "x": 4.79, "y": 1.79, "curve": "stepped" }, - { "time": 1.0666, "x": 4.79, "y": 1.79 }, - { "time": 1.3666, "x": 5.74, "y": 0.61 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -27.46 }, - { "time": 0.2333, "angle": -64.03 }, - { "time": 0.4, "angle": -48.36 }, - { "time": 0.5666, "angle": -76.86 }, - { "time": 0.7666, "angle": -26.89 }, - { "time": 0.9, "angle": -18.97 }, - { "time": 0.9333, "angle": -14.18 }, - { "time": 1.0666, "angle": -80.45 }, - { "time": 1.3666, "angle": -27.46 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": 1.08 }, - { "time": 0.2333, "angle": 16.02 }, - { "time": 0.3, "angle": 12.94 }, - { "time": 0.3333, "angle": 15.16 }, - { "time": 0.4, "angle": -14.7 }, - { "time": 0.4333, "angle": -12.85 }, - { "time": 0.4666, "angle": -19.18 }, - { "time": 0.5666, "angle": -15.82 }, - { "time": 0.6, "angle": -3.59 }, - { "time": 0.7666, "angle": -3.56 }, - { "time": 0.9333, "angle": 1.86 }, - { "time": 1.0666, "angle": 16.02 }, - { "time": 1.3666, "angle": 1.08 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -13.35 }, - { "time": 0.2333, "angle": -48.95 }, - { "time": 0.4333, "angle": -35.77 }, - { "time": 0.6, "angle": -4.59 }, - { "time": 0.7666, "angle": 14.61 }, - { "time": 0.9333, "angle": 15.74 }, - { "time": 1.0666, "angle": -32.44 }, - { "time": 1.3666, "angle": -13.35 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 0.9333, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 1.3666, "x": -3.67, "y": 1.68 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 12.78 }, - { "time": 0.2333, "angle": 16.46 }, - { "time": 0.4, "angle": 26.49 }, - { "time": 0.6, "angle": 15.51 }, - { "time": 0.7666, "angle": 1.34 }, - { "time": 0.9333, "angle": 2.35 }, - { "time": 1.0666, "angle": 6.08 }, - { "time": 1.3, "angle": 21.23 }, - { "time": 1.3666, "angle": 12.78 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "head": { - "rotate": [ - { "time": 0, "angle": 5.19 }, - { "time": 0.2333, "angle": 20.27 }, - { "time": 0.4, "angle": 15.27 }, - { "time": 0.6, "angle": -24.69 }, - { "time": 0.7666, "angle": -11.02 }, - { "time": 0.9333, "angle": -24.38 }, - { "time": 1.0666, "angle": 11.99 }, - { "time": 1.3, "angle": 4.86 }, - { "time": 1.3666, "angle": 5.19 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left shoulder": { - "rotate": [ - { - "time": 0, - "angle": 0.05, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": 279.66, - "curve": [ 0.218, 0.67, 0.66, 0.99 ] - }, - { - "time": 0.5, - "angle": 62.27, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": 28.91 }, - { "time": 1.0666, "angle": -8.62 }, - { "time": 1.1666, "angle": -18.43 }, - { "time": 1.3666, "angle": 0.05 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 0.9333, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 1.3666, "x": -1.76, "y": 0.56 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left hand": { - "rotate": [ - { "time": 0, "angle": 11.58, "curve": "stepped" }, - { "time": 0.9333, "angle": 11.58, "curve": "stepped" }, - { "time": 1.3666, "angle": 11.58 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": 0.51 }, - { "time": 0.4333, "angle": 12.82 }, - { "time": 0.6, "angle": 47.55 }, - { "time": 0.9333, "angle": 12.82 }, - { "time": 1.1666, "angle": -6.5 }, - { "time": 1.3666, "angle": 0.51 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 43.82, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": -8.74, - "curve": [ 0.304, 0.58, 0.709, 0.97 ] - }, - { - "time": 0.5333, - "angle": -208.02, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": -246.72 }, - { "time": 1.0666, "angle": -307.13 }, - { "time": 1.1666, "angle": 37.15 }, - { "time": 1.3666, "angle": 43.82 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 0.9333, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 1.3666, "x": -7.84, "y": 7.19 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right arm": { - "rotate": [ - { "time": 0, "angle": -4.02 }, - { "time": 0.6, "angle": 17.5 }, - { "time": 0.9333, "angle": -4.02 }, - { "time": 1.1666, "angle": -16.72 }, - { "time": 1.3666, "angle": -4.02 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92, "curve": "stepped" }, - { "time": 0.9333, "angle": 22.92, "curve": "stepped" }, - { "time": 1.3666, "angle": 22.92 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "root": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4333, "angle": -14.52 }, - { "time": 0.8, "angle": 9.86 }, - { "time": 1.3666, "angle": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - } - } - }, - "walk": { - "bones": { - "left upper leg": { - "rotate": [ - { "time": 0, "angle": -26.55 }, - { "time": 0.1333, "angle": -8.78 }, - { "time": 0.2666, "angle": 9.51 }, - { "time": 0.4, "angle": 30.74 }, - { "time": 0.5333, "angle": 25.33 }, - { "time": 0.6666, "angle": 26.11 }, - { "time": 0.8, "angle": -7.7 }, - { "time": 0.9333, "angle": -21.19 }, - { "time": 1.0666, "angle": -26.55 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25 }, - { "time": 0.4, "x": -2.18, "y": -2.25 }, - { "time": 1.0666, "x": -3, "y": -2.25 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 42.45 }, - { "time": 0.1333, "angle": 52.1 }, - { "time": 0.2666, "angle": 5.96 }, - { "time": 0.5333, "angle": -16.93 }, - { "time": 0.6666, "angle": 1.89 }, - { - "time": 0.8, - "angle": 28.06, - "curve": [ 0.462, 0.11, 1, 1 ] - }, - { - "time": 0.9333, - "angle": 58.68, - "curve": [ 0.5, 0.02, 1, 1 ] - }, - { "time": 1.0666, "angle": 42.45 } - ], - "translate": [ - { "time": 0, "x": 8.11, "y": -2.36 }, - { "time": 0.1333, "x": 10.03, "y": -2.56 }, - { "time": 0.4, "x": 2.76, "y": -2.97 }, - { "time": 0.5333, "x": 2.76, "y": -2.81 }, - { "time": 0.9333, "x": 8.67, "y": -2.54 }, - { "time": 1.0666, "x": 8.11, "y": -2.36 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -10.21 }, - { "time": 0.1333, "angle": -55.64 }, - { "time": 0.2666, "angle": -68.12 }, - { "time": 0.5333, "angle": 5.11 }, - { "time": 0.6666, "angle": -28.29 }, - { "time": 0.8, "angle": 4.08 }, - { "time": 0.9333, "angle": 3.53 }, - { "time": 1.0666, "angle": -10.21 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": -3.69 }, - { "time": 0.1333, "angle": -10.42 }, - { "time": 0.2666, "angle": -17.14 }, - { "time": 0.4, "angle": -2.83 }, - { "time": 0.5333, "angle": -3.87 }, - { "time": 0.6666, "angle": 2.78 }, - { "time": 0.8, "angle": 1.68 }, - { "time": 0.9333, "angle": -8.54 }, - { "time": 1.0666, "angle": -3.69 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 20.89, - "curve": [ 0.264, 0, 0.75, 1 ] - }, - { - "time": 0.1333, - "angle": 3.72, - "curve": [ 0.272, 0, 0.841, 1 ] - }, - { "time": 0.6666, "angle": -278.28 }, - { "time": 1.0666, "angle": 20.89 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19 }, - { "time": 0.1333, "x": -6.36, "y": 6.42 }, - { "time": 0.6666, "x": -11.07, "y": 5.25 }, - { "time": 1.0666, "x": -7.84, "y": 7.19 } - ] - }, - "right arm": { - "rotate": [ - { - "time": 0, - "angle": -4.02, - "curve": [ 0.267, 0, 0.804, 0.99 ] - }, - { - "time": 0.1333, - "angle": -13.99, - "curve": [ 0.341, 0, 1, 1 ] - }, - { - "time": 0.6666, - "angle": 36.54, - "curve": [ 0.307, 0, 0.787, 0.99 ] - }, - { "time": 1.0666, "angle": -4.02 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92 }, - { "time": 0.4, "angle": -8.97 }, - { "time": 0.6666, "angle": 0.51 }, - { "time": 1.0666, "angle": 22.92 } - ] - }, - "left shoulder": { - "rotate": [ - { "time": 0, "angle": -1.47 }, - { "time": 0.1333, "angle": 13.6 }, - { "time": 0.6666, "angle": 280.74 }, - { "time": 1.0666, "angle": -1.47 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56 }, - { "time": 0.6666, "x": -2.47, "y": 8.14 }, - { "time": 1.0666, "x": -1.76, "y": 0.56 } - ] - }, - "left hand": { - "rotate": [ - { - "time": 0, - "angle": 11.58, - "curve": [ 0.169, 0.37, 0.632, 1.55 ] - }, - { - "time": 0.1333, - "angle": 28.13, - "curve": [ 0.692, 0, 0.692, 0.99 ] - }, - { - "time": 0.6666, - "angle": -27.42, - "curve": [ 0.117, 0.41, 0.738, 1.76 ] - }, - { "time": 0.8, "angle": -36.32 }, - { "time": 1.0666, "angle": 11.58 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": -8.27 }, - { "time": 0.1333, "angle": 18.43 }, - { "time": 0.6666, "angle": 0.88 }, - { "time": 1.0666, "angle": -8.27 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -10.28 }, - { - "time": 0.1333, - "angle": -15.38, - "curve": [ 0.545, 0, 1, 1 ] - }, - { - "time": 0.4, - "angle": -9.78, - "curve": [ 0.58, 0.17, 1, 1 ] - }, - { "time": 0.6666, "angle": -15.75 }, - { "time": 0.9333, "angle": -7.06 }, - { "time": 1.0666, "angle": -10.28 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68 }, - { "time": 0.1333, "x": -3.67, "y": 0.68 }, - { "time": 0.4, "x": -3.67, "y": 1.97 }, - { "time": 0.6666, "x": -3.67, "y": -0.14 }, - { "time": 1.0666, "x": -3.67, "y": 1.68 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": -5.25 }, - { "time": 0.2666, "angle": -4.08 }, - { "time": 0.4, "angle": -6.45 }, - { "time": 0.5333, "angle": -5.39 }, - { "time": 0.8, "angle": -11.68 }, - { "time": 0.9333, "angle": 0.46 }, - { "time": 1.0666, "angle": -5.25 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -3.39 }, - { "time": 0.1333, "angle": -45.53 }, - { "time": 0.2666, "angle": -2.59 }, - { "time": 0.5333, "angle": -19.53 }, - { "time": 0.6666, "angle": -64.8 }, - { - "time": 0.8, - "angle": -82.56, - "curve": [ 0.557, 0.18, 1, 1 ] - }, - { "time": 1.0666, "angle": -3.39 } - ] - }, - "hip": { - "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 1.0666, "angle": 0 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0 }, - { - "time": 0.1333, - "x": 0, - "y": -7.61, - "curve": [ 0.272, 0.86, 1, 1 ] - }, - { "time": 0.4, "x": 0, "y": 8.7 }, - { "time": 0.5333, "x": 0, "y": -0.41 }, - { - "time": 0.6666, - "x": 0, - "y": -7.05, - "curve": [ 0.235, 0.89, 1, 1 ] - }, - { "time": 0.8, "x": 0, "y": 2.92 }, - { "time": 0.9333, "x": 0, "y": 6.78 }, - { "time": 1.0666, "x": 0, "y": 0 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 3.6 }, - { "time": 0.1333, "angle": 17.49 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { "time": 0.5333, "angle": 5.17 }, - { "time": 0.6666, "angle": 18.36 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } - ] - }, - "head": { - "rotate": [ - { - "time": 0, - "angle": 3.6, - "curve": [ 0, 0, 0.704, 1.61 ] - }, - { "time": 0.1666, "angle": -0.2 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { - "time": 0.5333, - "angle": 5.17, - "curve": [ 0, 0, 0.704, 1.61 ] - }, - { "time": 0.7, "angle": 1.1 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } - ] - } - } - } -} -} \ No newline at end of file diff --git a/spine-starling/spine-starling-example/src/spineboy-starling.png b/spine-starling/spine-starling-example/src/spineboy-starling.png deleted file mode 100644 index a34d38af0..000000000 Binary files a/spine-starling/spine-starling-example/src/spineboy-starling.png and /dev/null differ diff --git a/spine-starling/spine-starling-example/src/spineboy-starling.xml b/spine-starling/spine-starling-example/src/spineboy-starling.xml deleted file mode 100644 index 3025fa60c..000000000 --- a/spine-starling/spine-starling-example/src/spineboy-starling.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spine-starling/spine-starling-example/src/spineboy.png b/spine-starling/spine-starling-example/src/spineboy.png index 6c17e1786..dce2fe3e2 100644 Binary files a/spine-starling/spine-starling-example/src/spineboy.png and b/spine-starling/spine-starling-example/src/spineboy.png differ diff --git a/spine-starling/spine-starling/src/spine/starling/PolygonBatch.as b/spine-starling/spine-starling/src/spine/starling/PolygonBatch.as index 74553ab49..9085f03b9 100644 --- a/spine-starling/spine-starling/src/spine/starling/PolygonBatch.as +++ b/spine-starling/spine-starling/src/spine/starling/PolygonBatch.as @@ -63,6 +63,7 @@ internal class PolygonBatch { private var _programBits:uint; private var _blendMode:String; private var _additive:Boolean; + private var _alpha:Number; private var _verticesCount:int; private var _vertices:Vector. = new []; @@ -85,18 +86,15 @@ internal class PolygonBatch { public function begin (support:RenderSupport, alpha:Number, blendMode:String) : void { _support = support; - _renderAlpha[3] = alpha; + _alpha = alpha; _programBits = 0xffffffff; - - support.finishQuadBatch(); - - support.blendMode = blendMode; - support.applyBlendMode(true); - _blendMode = support.blendMode; _additive = false; + support.finishQuadBatch(); + support.blendMode = blendMode; + _blendMode = support.blendMode; + var context:Context3D = Starling.context; - context.setProgramConstantsFromVector(Context3DProgramType.VERTEX, 0, _renderAlpha, 1); context.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, 1, support.mvpMatrix3D, true); var verticesBuffer:VertexBuffer3D = _verticesBuffer; @@ -125,7 +123,7 @@ internal class PolygonBatch { _support.applyBlendMode(true); } - if (texture != _texture) { + if (!_texture || texture.base != _texture.base) { flush(); _texture = texture; } @@ -217,6 +215,13 @@ internal class PolygonBatch { _trianglesBuffer.uploadFromVector(_triangles, 0, _trianglesCount); } + var pma:Boolean = _texture ? _texture.premultipliedAlpha : true; + _renderAlpha[0] = _renderAlpha[1] = _renderAlpha[2] = pma ? _alpha : 1.0; + _renderAlpha[3] = _alpha; + + _support.applyBlendMode(pma); + context.setProgramConstantsFromVector(Context3DProgramType.VERTEX, 0, _renderAlpha, 1); + setProgram(context); context.setTextureAt(0, _texture.base); context.drawTriangles(_trianglesBuffer, 0, _trianglesCount / 3); diff --git a/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as b/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as index 7868c0bfe..aeec9bde9 100644 --- a/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as +++ b/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as @@ -243,10 +243,10 @@ public class SkeletonSprite extends DisplayObject { continue; for (var ii:int = 0; ii < verticesLength; ii += 2) { var x:Number = worldVertices[ii], y:Number = worldVertices[ii + 1]; - minX = Math.min(minX, x); - minY = Math.min(minY, y); - maxX = Math.max(maxX, x); - maxY = Math.max(maxY, y); + minX = minX < x ? minX : x; + minY = minY < y ? minY : y; + maxX = maxX > x ? maxX : x; + maxY = maxY > y ? maxY : y; } } diff --git a/spine-tk2d/Assets/Gizmos.meta b/spine-tk2d/Assets/Gizmos.meta new file mode 100644 index 000000000..a7b083b0c --- /dev/null +++ b/spine-tk2d/Assets/Gizmos.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a260a1ff5965c2c4f88aea3e7d433965 +folderAsset: yes +DefaultImporter: + userData: diff --git a/spine-tk2d/Assets/Gizmos/SkeletonDataAsset Icon.png b/spine-tk2d/Assets/Gizmos/SkeletonDataAsset Icon.png new file mode 100644 index 000000000..7fd5473c1 Binary files /dev/null and b/spine-tk2d/Assets/Gizmos/SkeletonDataAsset Icon.png differ diff --git a/spine-tk2d/Assets/Gizmos/SkeletonDataAsset Icon.png.meta b/spine-tk2d/Assets/Gizmos/SkeletonDataAsset Icon.png.meta new file mode 100644 index 000000000..22239ca4b --- /dev/null +++ b/spine-tk2d/Assets/Gizmos/SkeletonDataAsset Icon.png.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 68defdbc95b30a74a9ad396bfc9a2277 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/examples/goblins/Goblins.cs b/spine-tk2d/Assets/examples/goblins/Goblins.cs index c30e677b0..bf3a78079 100644 --- a/spine-tk2d/Assets/examples/goblins/Goblins.cs +++ b/spine-tk2d/Assets/examples/goblins/Goblins.cs @@ -40,11 +40,11 @@ public class Goblins : MonoBehaviour { public void Start () { skeletonAnimation = GetComponent(); headBone = skeletonAnimation.skeleton.FindBone("head"); - skeletonAnimation.UpdateBones += UpdateBones; + skeletonAnimation.UpdateLocal += UpdateLocal; } // This is called after the animation is applied to the skeleton and can be used to adjust the bones dynamically. - public void UpdateBones (SkeletonAnimation skeletonAnimation) { + public void UpdateLocal (SkeletonAnimation skeletonAnimation) { headBone.Rotation += 15; } diff --git a/spine-tk2d/Assets/examples/goblins/goblins-ffd.json.txt b/spine-tk2d/Assets/examples/goblins/goblins-mesh.json.txt similarity index 100% rename from spine-tk2d/Assets/examples/goblins/goblins-ffd.json.txt rename to spine-tk2d/Assets/examples/goblins/goblins-mesh.json.txt diff --git a/spine-tk2d/Assets/examples/goblins/goblins-ffd.json.txt.meta b/spine-tk2d/Assets/examples/goblins/goblins-mesh.json.txt.meta similarity index 100% rename from spine-tk2d/Assets/examples/goblins/goblins-ffd.json.txt.meta rename to spine-tk2d/Assets/examples/goblins/goblins-mesh.json.txt.meta diff --git a/spine-tk2d/Assets/spine-tk2d/BoneComponent.cs b/spine-tk2d/Assets/spine-tk2d/BoneFollower.cs similarity index 80% rename from spine-tk2d/Assets/spine-tk2d/BoneComponent.cs rename to spine-tk2d/Assets/spine-tk2d/BoneFollower.cs index acfe183cb..e900ba8ee 100644 --- a/spine-tk2d/Assets/spine-tk2d/BoneComponent.cs +++ b/spine-tk2d/Assets/spine-tk2d/BoneFollower.cs @@ -36,14 +36,14 @@ using Spine; /// Sets a GameObject's transform to match a bone on a Spine skeleton. [ExecuteInEditMode] -[AddComponentMenu("Spine/BoneComponent")] -public class BoneComponent : MonoBehaviour { - [System.NonSerialized] - public bool valid; +[AddComponentMenu("Spine/BoneFollower")] +public class BoneFollower : MonoBehaviour { + [System.NonSerialized] + public bool + valid; public SkeletonRenderer skeletonRenderer; public Bone bone; - public bool followZPosition = true; public bool followBoneRotation = true; @@ -51,46 +51,66 @@ public class BoneComponent : MonoBehaviour { get { return skeletonRenderer; } set { skeletonRenderer = value; - Reset (); + Reset(); } } - // TODO: Make the rotation behavior more customizable - // public bool followTransformRotation = false; - - // TODO: Make transform follow bone scale? too specific? This is really useful for shared shadow assets. - //public bool followBoneScale = false; /// If a bone isn't set, boneName is used to find the bone. public String boneName; - + public bool resetOnAwake = true; protected Transform cachedTransform; protected Transform skeletonTransform; - + + public void HandleResetRenderer (SkeletonRenderer skeletonRenderer) { + Reset(); + } + public void Reset () { bone = null; cachedTransform = transform; valid = skeletonRenderer != null && skeletonRenderer.valid; - if (!valid) return; + if (!valid) + return; skeletonTransform = skeletonRenderer.transform; + + skeletonRenderer.OnReset -= HandleResetRenderer; + skeletonRenderer.OnReset += HandleResetRenderer; + + if (Application.isEditor) + DoUpdate(); + } + + void OnDestroy () { + //cleanup + if (skeletonRenderer != null) + skeletonRenderer.OnReset -= HandleResetRenderer; } public void Awake () { - Reset(); + if (resetOnAwake) + Reset(); } - public void LateUpdate () { + void LateUpdate () { + DoUpdate(); + } + + public void DoUpdate () { if (!valid) { Reset(); return; } if (bone == null) { - if (boneName == null || boneName.Length == 0) return; + if (boneName == null || boneName.Length == 0) + return; bone = skeletonRenderer.skeleton.FindBone(boneName); if (bone == null) { Debug.LogError("Bone not found: " + boneName, this); return; + } else { + } } @@ -100,22 +120,24 @@ public class BoneComponent : MonoBehaviour { if (cachedTransform.parent == skeletonTransform) { cachedTransform.localPosition = new Vector3(bone.worldX, bone.worldY, followZPosition ? 0f : cachedTransform.localPosition.z); - if(followBoneRotation) { + if (followBoneRotation) { Vector3 rotation = cachedTransform.localRotation.eulerAngles; cachedTransform.localRotation = Quaternion.Euler(rotation.x, rotation.y, bone.worldRotation * flipRotation); } } else { Vector3 targetWorldPosition = skeletonTransform.TransformPoint(new Vector3(bone.worldX, bone.worldY, 0f)); - if(!followZPosition) targetWorldPosition.z = cachedTransform.position.z; + if (!followZPosition) + targetWorldPosition.z = cachedTransform.position.z; cachedTransform.position = targetWorldPosition; - if(followBoneRotation) { + if (followBoneRotation) { Vector3 rotation = skeletonTransform.rotation.eulerAngles; - cachedTransform.rotation = Quaternion.Euler(rotation.x, rotation.y, - skeletonTransform.rotation.eulerAngles.z + (bone.worldRotation * flipRotation) ); + + cachedTransform.rotation = Quaternion.Euler(rotation.x, rotation.y, skeletonTransform.rotation.eulerAngles.z + (bone.worldRotation * flipRotation)); } } + } } \ No newline at end of file diff --git a/spine-tk2d/Assets/spine-tk2d/BoneComponent.cs.meta b/spine-tk2d/Assets/spine-tk2d/BoneFollower.cs.meta similarity index 78% rename from spine-tk2d/Assets/spine-tk2d/BoneComponent.cs.meta rename to spine-tk2d/Assets/spine-tk2d/BoneFollower.cs.meta index f2c537209..29dabc13e 100644 --- a/spine-tk2d/Assets/spine-tk2d/BoneComponent.cs.meta +++ b/spine-tk2d/Assets/spine-tk2d/BoneFollower.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d08aa5caf52eae44ba81cc81ca1dad5d +guid: a1fd8daaed7b64148a34acb96ba14ce1 MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/BoneComponentInspector.cs b/spine-tk2d/Assets/spine-tk2d/Editor/BoneFollowerInspector.cs similarity index 76% rename from spine-tk2d/Assets/spine-tk2d/Editor/BoneComponentInspector.cs rename to spine-tk2d/Assets/spine-tk2d/Editor/BoneFollowerInspector.cs index b7373393c..943a98715 100644 --- a/spine-tk2d/Assets/spine-tk2d/Editor/BoneComponentInspector.cs +++ b/spine-tk2d/Assets/spine-tk2d/Editor/BoneFollowerInspector.cs @@ -27,30 +27,57 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ - using System; using UnityEditor; using UnityEngine; -[CustomEditor(typeof(BoneComponent))] -public class BoneComponentInspector : Editor { +[CustomEditor(typeof(BoneFollower))] +public class BoneFollowerInspector : Editor { private SerializedProperty boneName, skeletonRenderer, followZPosition, followBoneRotation; + BoneFollower component; void OnEnable () { skeletonRenderer = serializedObject.FindProperty("skeletonRenderer"); boneName = serializedObject.FindProperty("boneName"); followBoneRotation = serializedObject.FindProperty("followBoneRotation"); followZPosition = serializedObject.FindProperty("followZPosition"); + component = (BoneFollower)target; + ForceReload(); + } + + void FindRenderer () { + if (skeletonRenderer.objectReferenceValue == null) { + SkeletonRenderer parentRenderer = SkeletonUtility.GetInParent(component.transform); + + if (parentRenderer != null) { + skeletonRenderer.objectReferenceValue = (UnityEngine.Object)parentRenderer; + } + + } + } + + void ForceReload () { + if (component.skeletonRenderer != null) { + if (component.skeletonRenderer.valid == false) + component.skeletonRenderer.Reset(); + } } override public void OnInspectorGUI () { serializedObject.Update(); - BoneComponent component = (BoneComponent)target; + + FindRenderer(); EditorGUILayout.PropertyField(skeletonRenderer); if (component.valid) { - String[] bones = new String[component.skeletonRenderer.skeleton.Data.Bones.Count + 1]; + String[] bones = new String[1]; + try { + bones = new String[component.skeletonRenderer.skeleton.Data.Bones.Count + 1]; + } catch { + + } + bones[0] = ""; for (int i = 0; i < bones.Length - 1; i++) bones[i + 1] = component.skeletonRenderer.skeleton.Data.Bones[i].Name; @@ -64,13 +91,14 @@ public class BoneComponentInspector : Editor { EditorGUILayout.EndHorizontal(); boneName.stringValue = boneIndex == 0 ? null : bones[boneIndex]; - EditorGUILayout.PropertyField(followBoneRotation); EditorGUILayout.PropertyField(followZPosition); + } else { + GUILayout.Label("INVALID"); } if (serializedObject.ApplyModifiedProperties() || - (Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed") + (Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed") ) { component.Reset(); } diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/BoneComponentInspector.cs.meta b/spine-tk2d/Assets/spine-tk2d/Editor/BoneFollowerInspector.cs.meta similarity index 78% rename from spine-tk2d/Assets/spine-tk2d/Editor/BoneComponentInspector.cs.meta rename to spine-tk2d/Assets/spine-tk2d/Editor/BoneFollowerInspector.cs.meta index 7a90e80a3..a5cf9ae89 100644 --- a/spine-tk2d/Assets/spine-tk2d/Editor/BoneComponentInspector.cs.meta +++ b/spine-tk2d/Assets/spine-tk2d/Editor/BoneFollowerInspector.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 99e3e8311529bbc48a5c3a5b9714e162 +guid: c71ca35fd6241cb49a0b0756a664fcf7 MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI.meta new file mode 100644 index 000000000..d730a5573 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: bfaea6b7e7f52bc46b8d1c3cb5e9eaa1 +folderAsset: yes +DefaultImporter: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animation.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animation.png new file mode 100644 index 000000000..f44d38e90 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animation.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animation.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animation.png.meta new file mode 100644 index 000000000..6d9bc41dd --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animation.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 52b12ec801461494185a4d3dc66f3d1d +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animationRoot.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animationRoot.png new file mode 100644 index 000000000..610754689 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animationRoot.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animationRoot.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animationRoot.png.meta new file mode 100644 index 000000000..4bcf433e8 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-animationRoot.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 3d1be4ea889f3a14b864352fe49a1bde +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-bone.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-bone.png new file mode 100644 index 000000000..ec66a6a85 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-bone.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-bone.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-bone.png.meta new file mode 100644 index 000000000..9c59ed87d --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-bone.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8322793223a533a4ca8be6f430256dfc +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boneNib.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boneNib.png new file mode 100644 index 000000000..87373b8f0 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boneNib.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boneNib.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boneNib.png.meta new file mode 100644 index 000000000..955598a84 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boneNib.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 97a43f11e00735147a9dc3dff6d68191 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boundingBox.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boundingBox.png new file mode 100644 index 000000000..82beedfce Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boundingBox.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boundingBox.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boundingBox.png.meta new file mode 100644 index 000000000..c90f54d3c --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-boundingBox.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 955aed20030d0504b8a9c6934a5cb47a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-constraintNib.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-constraintNib.png new file mode 100644 index 000000000..175bcb047 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-constraintNib.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-constraintNib.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-constraintNib.png.meta new file mode 100644 index 000000000..e7ab7aca3 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-constraintNib.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: de1a4f5ad4bdf1a4ea072c4d59ba87d8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-event.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-event.png new file mode 100644 index 000000000..4547f254c Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-event.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-event.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-event.png.meta new file mode 100644 index 000000000..2ab786189 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-event.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d226a80acc775714aa78b85e16a00e9b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-hingeChain.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-hingeChain.png new file mode 100644 index 000000000..a27af1c7c Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-hingeChain.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-hingeChain.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-hingeChain.png.meta new file mode 100644 index 000000000..6f346e072 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-hingeChain.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 2c2c6d283dcf3654baf40001c982891c +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-image.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-image.png new file mode 100644 index 000000000..663d11350 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-image.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-image.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-image.png.meta new file mode 100644 index 000000000..24d78a242 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-image.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 2b3a6f35bbaa8414eb51a344743ee641 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-mesh.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-mesh.png new file mode 100644 index 000000000..1035553b7 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-mesh.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-mesh.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-mesh.png.meta new file mode 100644 index 000000000..a98b0e9c8 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-mesh.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: a309a2e14638a204091b915126910f45 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-null.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-null.png new file mode 100644 index 000000000..9a6d738eb Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-null.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-null.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-null.png.meta new file mode 100644 index 000000000..a949f63a6 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-null.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: d1de1604dfe4cb64c9d31246a8e43c78 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-poseBones.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-poseBones.png new file mode 100644 index 000000000..102700af0 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-poseBones.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-poseBones.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-poseBones.png.meta new file mode 100644 index 000000000..c3748ea88 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-poseBones.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: da6f6d414e43aac46a57cc5a87208db4 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeleton.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeleton.png new file mode 100644 index 000000000..b5d5adf28 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeleton.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeleton.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeleton.png.meta new file mode 100644 index 000000000..f607575fb --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeleton.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: f2216037084d99d4481810cb521ed96f +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeletonUtility.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeletonUtility.png new file mode 100644 index 000000000..ce4d937b2 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeletonUtility.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeletonUtility.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeletonUtility.png.meta new file mode 100644 index 000000000..9d3c22794 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skeletonUtility.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 5bb0631368b462047869d8788673cb48 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skin.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skin.png new file mode 100644 index 000000000..3d9bddeb4 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skin.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skin.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skin.png.meta new file mode 100644 index 000000000..3be7a6e69 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skin.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: bfd9f3d2607e9e44c97384d7575a17dc +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinPlaceholder.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinPlaceholder.png new file mode 100644 index 000000000..3b11d379e Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinPlaceholder.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinPlaceholder.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinPlaceholder.png.meta new file mode 100644 index 000000000..e6ebc95cc --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinPlaceholder.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 04c82a4acf7b5244e947f2709ec3a6cf +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinsRoot.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinsRoot.png new file mode 100644 index 000000000..289871e41 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinsRoot.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinsRoot.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinsRoot.png.meta new file mode 100644 index 000000000..e332380e8 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-skinsRoot.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 8bd14c7643597a74ba2edc10a5e4c4ed +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-slot.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-slot.png new file mode 100644 index 000000000..ca938722d Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-slot.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-slot.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-slot.png.meta new file mode 100644 index 000000000..89224b580 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-slot.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 0338faf3e7d93e2478fcbc022d13e081 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-spine.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-spine.png new file mode 100644 index 000000000..7fd5473c1 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-spine.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-spine.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-spine.png.meta new file mode 100644 index 000000000..c0ec65ca2 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-spine.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 4e7c964fa5e07024c8bf1debecc3b7c8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-subMeshRenderer.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-subMeshRenderer.png new file mode 100644 index 000000000..ec7c9e64b Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-subMeshRenderer.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-subMeshRenderer.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-subMeshRenderer.png.meta new file mode 100644 index 000000000..35500c50d --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-subMeshRenderer.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: f31c0c0d608e8ba4f9a1afb032092287 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-warning.png b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-warning.png new file mode 100644 index 000000000..05e3f4cdc Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-warning.png differ diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-warning.png.meta b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-warning.png.meta new file mode 100644 index 000000000..e32950ca4 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/GUI/icon-warning.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 754d724c1bd750048852e8cf3d4a05ee +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonAnimationInspector.cs b/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonAnimationInspector.cs index bc6d6b19c..f338626b2 100644 --- a/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonAnimationInspector.cs +++ b/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonAnimationInspector.cs @@ -27,28 +27,47 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ - using System; using UnityEditor; using UnityEngine; +using Spine; [CustomEditor(typeof(SkeletonAnimation))] public class SkeletonAnimationInspector : SkeletonRendererInspector { protected SerializedProperty animationName, loop, timeScale; + protected bool isPrefab; protected override void OnEnable () { base.OnEnable(); animationName = serializedObject.FindProperty("_animationName"); loop = serializedObject.FindProperty("loop"); timeScale = serializedObject.FindProperty("timeScale"); + + if (PrefabUtility.GetPrefabType(this.target) == PrefabType.Prefab) + isPrefab = true; + + } protected override void gui () { base.gui(); SkeletonAnimation component = (SkeletonAnimation)target; - if (!component.valid) return; + if (!component.valid) + return; + //catch case where SetAnimation was used to set track 0 without using AnimationName + if (Application.isPlaying) { + TrackEntry currentState = component.state.GetCurrent(0); + if (currentState != null) { + if (component.AnimationName != animationName.stringValue) { + animationName.stringValue = currentState.Animation.Name; + } + } + } + + + //TODO: Refactor this to use GenericMenu and callbacks to avoid interfering with control by other behaviours. // Animation name. { String[] animations = new String[component.skeleton.Data.Animations.Count + 1]; @@ -67,12 +86,26 @@ public class SkeletonAnimationInspector : SkeletonRendererInspector { EditorGUILayout.EndHorizontal(); String selectedAnimationName = animationIndex == 0 ? null : animations[animationIndex]; - component.AnimationName = selectedAnimationName; - animationName.stringValue = selectedAnimationName; + if (component.AnimationName != selectedAnimationName) { + component.AnimationName = selectedAnimationName; + animationName.stringValue = selectedAnimationName; + } + + } EditorGUILayout.PropertyField(loop); EditorGUILayout.PropertyField(timeScale); component.timeScale = Math.Max(component.timeScale, 0); + + EditorGUILayout.Space(); + + if (!isPrefab) { + if (component.GetComponent() == null) { + if (GUILayout.Button(new GUIContent("Add Skeleton Utility", SpineEditorUtilities.Icons.skeletonUtility), GUILayout.Height(30))) { + component.gameObject.AddComponent(); + } + } + } } } diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonDataAssetInspector.cs b/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonDataAssetInspector.cs index 2642d4d46..97fb6715c 100644 --- a/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonDataAssetInspector.cs +++ b/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonDataAssetInspector.cs @@ -28,8 +28,17 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ +/***************************************************************************** + * Automatic import and advanced preview added by Mitch Thompson + * Full irrevocable rights and permissions granted to Esoteric Software +*****************************************************************************/ using System; +using System.Collections.Generic; using UnityEditor; + +#if !UNITY_4_3 +using UnityEditor.AnimatedValues; +#endif using UnityEngine; using Spine; @@ -37,39 +46,89 @@ using Spine; public class SkeletonDataAssetInspector : Editor { private SerializedProperty spriteCollection, skeletonJSON, scale, fromAnimation, toAnimation, duration, defaultMix; private bool showAnimationStateData = true; + + #if UNITY_4_3 + private bool m_showAnimationList = true; + #else + private AnimBool m_showAnimationList = new AnimBool(true); + #endif + + private bool m_initialized = false; + private SkeletonDataAsset m_skeletonDataAsset; + private string m_skeletonDataAssetGUID; + bool failedSkeletonDataLatch = false; void OnEnable () { - spriteCollection = serializedObject.FindProperty("spriteCollection"); - skeletonJSON = serializedObject.FindProperty("skeletonJSON"); - scale = serializedObject.FindProperty("scale"); - fromAnimation = serializedObject.FindProperty("fromAnimation"); - toAnimation = serializedObject.FindProperty("toAnimation"); - duration = serializedObject.FindProperty("duration"); - defaultMix = serializedObject.FindProperty("defaultMix"); - } + try { + spriteCollection = serializedObject.FindProperty("spriteCollection"); + skeletonJSON = serializedObject.FindProperty("skeletonJSON"); + scale = serializedObject.FindProperty("scale"); + fromAnimation = serializedObject.FindProperty("fromAnimation"); + toAnimation = serializedObject.FindProperty("toAnimation"); + duration = serializedObject.FindProperty("duration"); + defaultMix = serializedObject.FindProperty("defaultMix"); + + m_skeletonDataAsset = (SkeletonDataAsset)target; + m_skeletonDataAssetGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_skeletonDataAsset)); + + EditorApplication.update += Update; + + } catch { + + + } + } + + void OnDestroy () { + m_initialized = false; + EditorApplication.update -= Update; + this.DestroyPreviewInstances(); + if (this.m_previewUtility != null) { + this.m_previewUtility.Cleanup(); + this.m_previewUtility = null; + } + } + override public void OnInspectorGUI () { serializedObject.Update(); SkeletonDataAsset asset = (SkeletonDataAsset)target; - - tk2dSpriteCollection sprites = EditorGUILayout.ObjectField("Sprite Collection", asset.spriteCollection, typeof(tk2dSpriteCollection), false) as tk2dSpriteCollection; - if (sprites != null) - spriteCollection.objectReferenceValue = sprites.spriteCollection; - + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(spriteCollection); EditorGUILayout.PropertyField(skeletonJSON); EditorGUILayout.PropertyField(scale); - + if (EditorGUI.EndChangeCheck()) { + + if(failedSkeletonDataLatch){ + failedSkeletonDataLatch = false; + } + + if (m_previewUtility != null) { + m_previewUtility.Cleanup(); + m_previewUtility = null; + } + + serializedObject.ApplyModifiedProperties(); + } + + if(failedSkeletonDataLatch){ + GUI.color = Color.red; + GUILayout.Label("WARNING: Skeleton JSON and Sprite Collection Mismatch"); + return; + } + SkeletonData skeletonData = asset.GetSkeletonData(asset.spriteCollection == null || asset.skeletonJSON == null); if (skeletonData != null) { showAnimationStateData = EditorGUILayout.Foldout(showAnimationStateData, "Animation State Data"); if (showAnimationStateData) { EditorGUILayout.PropertyField(defaultMix); - - // Animation names. + + // Animation names String[] animations = new String[skeletonData.Animations.Count]; for (int i = 0; i < animations.Length; i++) animations[i] = skeletonData.Animations[i].Name; - + for (int i = 0; i < fromAnimation.arraySize; i++) { SerializedProperty from = fromAnimation.GetArrayElementAtIndex(i); SerializedProperty to = toAnimation.GetArrayElementAtIndex(i); @@ -95,14 +154,483 @@ public class SkeletonDataAssetInspector : Editor { EditorGUILayout.Space(); EditorGUILayout.EndHorizontal(); } + + if (GUILayout.Button(new GUIContent("Setup Pose", SpineEditorUtilities.Icons.skeleton), GUILayout.Width(105), GUILayout.Height(18))) { + StopAnimation(); + m_skeletonAnimation.skeleton.SetToSetupPose(); + m_requireRefresh = true; + } + + #if UNITY_4_3 + m_showAnimationList = EditorGUILayout.Foldout(m_showAnimationList, new GUIContent("Animations", SpineEditorUtilities.Icons.animationRoot)); + if(m_showAnimationList){ + #else + m_showAnimationList.target = EditorGUILayout.Foldout(m_showAnimationList.target, new GUIContent("Animations", SpineEditorUtilities.Icons.animationRoot)); + if (EditorGUILayout.BeginFadeGroup(m_showAnimationList.faded)) { + #endif + + + + + EditorGUILayout.LabelField("Name", "Duration"); + foreach (Spine.Animation a in skeletonData.Animations) { + GUILayout.BeginHorizontal(); + + if (m_skeletonAnimation != null && m_skeletonAnimation.state != null) { + if (m_skeletonAnimation.state.GetCurrent(0) != null && m_skeletonAnimation.state.GetCurrent(0).Animation == a) { + GUI.contentColor = Color.black; + if (GUILayout.Button("\u25BA", GUILayout.Width(24))) { + StopAnimation(); + } + GUI.contentColor = Color.white; + } else { + if (GUILayout.Button("\u25BA", GUILayout.Width(24))) { + PlayAnimation(a.Name, true); + } + } + } else { + GUILayout.Label("?", GUILayout.Width(24)); + } + EditorGUILayout.LabelField(new GUIContent(a.Name, SpineEditorUtilities.Icons.animation), new GUIContent(a.Duration.ToString("f3") + "s" + ("(" + (Mathf.RoundToInt(a.Duration * 30)) + ")").PadLeft(12, ' '))); + GUILayout.EndHorizontal(); + } + } + #if !UNITY_4_3 + EditorGUILayout.EndFadeGroup(); + #endif } - + if (!Application.isPlaying) { if (serializedObject.ApplyModifiedProperties() || (UnityEngine.Event.current.type == EventType.ValidateCommand && UnityEngine.Event.current.commandName == "UndoRedoPerformed") - ) { + ) { asset.Reset(); } } } -} + + //preview window stuff + private PreviewRenderUtility m_previewUtility; + private GameObject m_previewInstance; + private Vector2 previewDir; + private SkeletonAnimation m_skeletonAnimation; + private SkeletonData m_skeletonData; + private static int sliderHash = "Slider".GetHashCode(); + private float m_lastTime; + private bool m_playing; + private bool m_requireRefresh; + private Color m_originColor = new Color(0.3f, 0.3f, 0.3f, 1); + + private void StopAnimation () { + m_skeletonAnimation.state.ClearTrack(0); + m_playing = false; + } + + List m_animEvents = new List(); + List m_animEventFrames = new List(); + + private void PlayAnimation (string animName, bool loop) { + m_animEvents.Clear(); + m_animEventFrames.Clear(); + + m_skeletonAnimation.state.SetAnimation(0, animName, loop); + + Spine.Animation a = m_skeletonAnimation.state.GetCurrent(0).Animation; + foreach (Timeline t in a.Timelines) { + if (t.GetType() == typeof(EventTimeline)) { + EventTimeline et = (EventTimeline)t; + + for (int i = 0; i < et.Events.Length; i++) { + m_animEvents.Add(et.Events[i]); + m_animEventFrames.Add(et.Frames[i]); + } + + } + } + + m_playing = true; + } + + private void InitPreview () { + if (this.m_previewUtility == null && m_skeletonDataAsset.spriteCollection != null && !failedSkeletonDataLatch) { + this.m_lastTime = Time.realtimeSinceStartup; + this.m_previewUtility = new PreviewRenderUtility(true); + this.m_previewUtility.m_Camera.isOrthoGraphic = true; + this.m_previewUtility.m_Camera.orthographicSize = (scale.floatValue * (m_skeletonDataAsset.spriteCollection.invOrthoSize * m_skeletonDataAsset.spriteCollection.halfTargetHeight)) / 100; + this.m_previewUtility.m_Camera.cullingMask = -2147483648; + this.CreatePreviewInstances(); + } + } + + private void CreatePreviewInstances () { + this.DestroyPreviewInstances(); + if (this.m_previewInstance == null) { + string skinName = EditorPrefs.GetString(m_skeletonDataAssetGUID + "_lastSkin", ""); + SkeletonAnimation skelAnim = SpineEditorUtilities.SpawnAnimatedSkeleton((SkeletonDataAsset)target, skinName); + if(skelAnim == null){ + failedSkeletonDataLatch = true; + //EditorUtility.DisplayDialog("Skeleton / SpriteCollection Mismatch", "GetSkeletonData failed, make sure JSON and SpriteCollection match.\nSprite Collection must contain all attachments referenced in SkeletonJSON", "OK"); + return; //failed + } + + m_previewInstance = skelAnim.gameObject; + //m_previewInstance.transform.localScale = Vector3.one * 0.01f; + m_previewInstance.hideFlags = HideFlags.HideAndDontSave; + m_previewInstance.layer = 0x1f; + + + m_skeletonAnimation = m_previewInstance.GetComponent(); + m_skeletonAnimation.initialSkinName = skinName; + m_skeletonAnimation.LateUpdate(); + m_skeletonData = m_skeletonAnimation.skeletonDataAsset.GetSkeletonData(true); + + m_previewInstance.renderer.enabled = false; + + m_initialized = true; + AdjustCameraGoals(true); + } + } + + private void DestroyPreviewInstances () { + if (this.m_previewInstance != null) { + DestroyImmediate(this.m_previewInstance); + m_previewInstance = null; + } + m_initialized = false; + } + + public override bool HasPreviewGUI () { + //TODO: validate json data + + return skeletonJSON.objectReferenceValue != null && spriteCollection.objectReferenceValue != null && !failedSkeletonDataLatch; + } + + Texture m_previewTex = new Texture(); + + public override void OnInteractivePreviewGUI (Rect r, GUIStyle background) { + if(m_skeletonDataAsset.spriteCollection == null) + return; + + this.InitPreview(); + + if (UnityEngine.Event.current.type == EventType.Repaint) { + if (m_requireRefresh) { + this.m_previewUtility.BeginPreview(r, background); + this.DoRenderPreview(true); + this.m_previewTex = this.m_previewUtility.EndPreview(); + m_requireRefresh = false; + } + if (this.m_previewTex != null) + GUI.DrawTexture(r, m_previewTex, ScaleMode.StretchToFill, false); + } + + DrawSkinToolbar(r); + NormalizedTimeBar(r); + //TODO: implement panning + // this.previewDir = Drag2D(this.previewDir, r); + MouseScroll(r); + } + + float m_orthoGoal = 1; + Vector3 m_posGoal = new Vector3(0, 0, -10); + double m_adjustFrameEndTime = 0; + + private void AdjustCameraGoals (bool calculateMixTime) { + if (calculateMixTime) { + if (m_skeletonAnimation.state.GetCurrent(0) != null) { + m_adjustFrameEndTime = EditorApplication.timeSinceStartup + m_skeletonAnimation.state.GetCurrent(0).Mix; + } + } + + GameObject go = this.m_previewInstance; + Bounds bounds = go.renderer.bounds; + m_orthoGoal = bounds.size.y; + m_posGoal = bounds.center + new Vector3(0, 0, -10); + } + + private void AdjustCameraGoals () { + AdjustCameraGoals(false); + } + + private void AdjustCamera () { + if (m_previewUtility == null) + return; + + + if (EditorApplication.timeSinceStartup < m_adjustFrameEndTime) { + AdjustCameraGoals(); + } + + float orthoSet = Mathf.Lerp(this.m_previewUtility.m_Camera.orthographicSize, m_orthoGoal, 0.1f); + + this.m_previewUtility.m_Camera.orthographicSize = orthoSet; + + + float dist = Vector3.Distance(m_previewUtility.m_Camera.transform.position, m_posGoal); + if (dist > m_skeletonDataAsset.scale) { + Vector3 pos = Vector3.Lerp(this.m_previewUtility.m_Camera.transform.position, m_posGoal, 0.1f); + pos.x = 0; + this.m_previewUtility.m_Camera.transform.position = pos; + this.m_previewUtility.m_Camera.transform.rotation = Quaternion.identity; + m_requireRefresh = true; + } + } + + private void DoRenderPreview (bool drawHandles) { + GameObject go = this.m_previewInstance; + + if (m_requireRefresh && go != null) { + go.renderer.enabled = true; + + if (EditorApplication.isPlaying) { + //do nothing + } else { + m_skeletonAnimation.Update((Time.realtimeSinceStartup - m_lastTime)); + } + + m_lastTime = Time.realtimeSinceStartup; + + if (!EditorApplication.isPlaying) + m_skeletonAnimation.LateUpdate(); + + if (drawHandles) { + Handles.SetCamera(m_previewUtility.m_Camera); + Handles.color = m_originColor; + + Handles.DrawLine(new Vector3(-1000 * m_skeletonDataAsset.scale, 0, 0), new Vector3(1000 * m_skeletonDataAsset.scale, 0, 0)); + Handles.DrawLine(new Vector3(0, 1000 * m_skeletonDataAsset.scale, 0), new Vector3(0, -1000 * m_skeletonDataAsset.scale, 0)); + } + + this.m_previewUtility.m_Camera.Render(); + go.renderer.enabled = false; + } + + + } + + void Update () { + AdjustCamera(); + + if (m_playing) { + m_requireRefresh = true; + Repaint(); + } else if (m_requireRefresh) { + Repaint(); + } else { + #if !UNITY_4_3 + if (m_showAnimationList.isAnimating) + Repaint(); + #endif + } + } + + void DrawSkinToolbar (Rect r) { + if (m_skeletonAnimation == null) + return; + + if (m_skeletonAnimation.skeleton != null) { + string label = (m_skeletonAnimation.skeleton != null && m_skeletonAnimation.skeleton.Skin != null) ? m_skeletonAnimation.skeleton.Skin.Name : "default"; + + Rect popRect = new Rect(r); + popRect.y += 32; + popRect.x += 4; + popRect.height = 24; + popRect.width = 40; + EditorGUI.DropShadowLabel(popRect, new GUIContent("Skin", SpineEditorUtilities.Icons.skinsRoot)); + + popRect.y += 11; + popRect.width = 150; + popRect.x += 44; + + if (GUI.Button(popRect, label, EditorStyles.popup)) { + SelectSkinContext(); + } + } + } + + void SelectSkinContext () { + GenericMenu menu = new GenericMenu(); + + foreach (Skin s in m_skeletonData.Skins) { + menu.AddItem(new GUIContent(s.Name), this.m_skeletonAnimation.skeleton.Skin == s, SetSkin, (object)s); + } + + menu.ShowAsContext(); + } + + void SetSkin (object o) { + Skin skin = (Skin)o; + + m_skeletonAnimation.initialSkinName = skin.Name; + m_skeletonAnimation.Reset(); + m_requireRefresh = true; + + EditorPrefs.SetString(m_skeletonDataAssetGUID + "_lastSkin", skin.Name); + } + + void NormalizedTimeBar (Rect r) { + Rect barRect = new Rect(r); + barRect.height = 32; + barRect.x += 4; + barRect.width -= 4; + + GUI.Box(barRect, ""); + + Rect lineRect = new Rect(barRect); + float width = lineRect.width; + TrackEntry t = m_skeletonAnimation.state.GetCurrent(0); + + if (t != null) { + int loopCount = (int)(t.Time / t.EndTime); + float currentTime = t.Time - (t.EndTime * loopCount); + + float normalizedTime = currentTime / t.Animation.Duration; + + lineRect.x = barRect.x + (width * normalizedTime) - 0.5f; + lineRect.width = 2; + + GUI.color = Color.red; + GUI.DrawTexture(lineRect, EditorGUIUtility.whiteTexture); + GUI.color = Color.white; + + for (int i = 0; i < m_animEvents.Count; i++) { + //TODO: Tooltip + //Spine.Event spev = animEvents[i]; + + float fr = m_animEventFrames[i]; + + Rect evRect = new Rect(barRect); + evRect.x = Mathf.Clamp(((fr / t.Animation.Duration) * width) - (SpineEditorUtilities.Icons._event.width / 2), barRect.x, float.MaxValue); + evRect.width = SpineEditorUtilities.Icons._event.width; + evRect.height = SpineEditorUtilities.Icons._event.height; + evRect.y += SpineEditorUtilities.Icons._event.height; + GUI.DrawTexture(evRect, SpineEditorUtilities.Icons._event); + + + //TODO: Tooltip + /* + UnityEngine.Event ev = UnityEngine.Event.current; + if(ev.isMouse){ + if(evRect.Contains(ev.mousePosition)){ + Rect tooltipRect = new Rect(evRect); + tooltipRect.width = 500; + tooltipRect.y -= 4; + tooltipRect.x += 4; + GUI.Label(tooltipRect, spev.Data.Name); + } + } + */ + } + } + } + + void MouseScroll (Rect position) { + UnityEngine.Event current = UnityEngine.Event.current; + int controlID = GUIUtility.GetControlID(sliderHash, FocusType.Passive); + + switch (current.GetTypeForControl(controlID)) { + case EventType.ScrollWheel: + if (position.Contains(current.mousePosition)) { + + m_orthoGoal += current.delta.y * ((SkeletonDataAsset)target).scale * 10; + GUIUtility.hotControl = controlID; + current.Use(); + } + break; + } + + } + + //TODO: Implement preview panning + /* + static Vector2 Drag2D(Vector2 scrollPosition, Rect position) + { + int controlID = GUIUtility.GetControlID(sliderHash, FocusType.Passive); + UnityEngine.Event current = UnityEngine.Event.current; + switch (current.GetTypeForControl(controlID)) + { + case EventType.MouseDown: + if (position.Contains(current.mousePosition) && (position.width > 50f)) + { + GUIUtility.hotControl = controlID; + current.Use(); + EditorGUIUtility.SetWantsMouseJumping(1); + } + return scrollPosition; + + case EventType.MouseUp: + if (GUIUtility.hotControl == controlID) + { + GUIUtility.hotControl = 0; + } + EditorGUIUtility.SetWantsMouseJumping(0); + return scrollPosition; + + case EventType.MouseMove: + return scrollPosition; + + case EventType.MouseDrag: + if (GUIUtility.hotControl == controlID) + { + scrollPosition -= (Vector2) (((current.delta * (!current.shift ? ((float) 1) : ((float) 3))) / Mathf.Min(position.width, position.height)) * 140f); + scrollPosition.y = Mathf.Clamp(scrollPosition.y, -90f, 90f); + current.Use(); + GUI.changed = true; + } + return scrollPosition; + } + return scrollPosition; + } + */ + + public override GUIContent GetPreviewTitle () { + return new GUIContent("Preview"); + } + + public override void OnPreviewSettings () { + if (!m_initialized) { + GUILayout.HorizontalSlider(0, 0, 2, GUILayout.MaxWidth(64)); + } else { + float speed = GUILayout.HorizontalSlider(m_skeletonAnimation.timeScale, 0, 2, GUILayout.MaxWidth(64)); + + //snap to nearest 0.25 + float y = speed / 0.25f; + int q = Mathf.RoundToInt(y); + speed = q * 0.25f; + + m_skeletonAnimation.timeScale = speed; + } + } + + //TODO: Fix first-import error + //TODO: Update preview without thumbnail + public override Texture2D RenderStaticPreview (string assetPath, UnityEngine.Object[] subAssets, int width, int height) { + if(m_skeletonDataAsset.spriteCollection == null) + return null; + Texture2D tex = new Texture2D(width, height, TextureFormat.ARGB32, false); + + this.InitPreview(); + + if (this.m_previewUtility.m_Camera == null) + return null; + + m_requireRefresh = true; + this.DoRenderPreview(false); + AdjustCameraGoals(false); + + this.m_previewUtility.m_Camera.orthographicSize = m_orthoGoal / 2; + this.m_previewUtility.m_Camera.transform.position = m_posGoal; + this.m_previewUtility.BeginStaticPreview(new Rect(0, 0, width, height)); + this.DoRenderPreview(false); + + //TODO: Figure out why this is throwing errors on first attempt + // if(m_previewUtility != null){ + // Handles.SetCamera(this.m_previewUtility.m_Camera); + // Handles.BeginGUI(); + // GUI.DrawTexture(new Rect(40,60,width,height), SpineEditorUtilities.Icons.spine, ScaleMode.StretchToFill); + // Handles.EndGUI(); + // } + tex = this.m_previewUtility.EndStaticPreview(); + return tex; + } +} \ No newline at end of file diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonDataAssetInspector.cs.meta b/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonDataAssetInspector.cs.meta index e7eaac24c..fba64b6e3 100644 --- a/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonDataAssetInspector.cs.meta +++ b/spine-tk2d/Assets/spine-tk2d/Editor/SkeletonDataAssetInspector.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cffb121e3cd80644d84c585b9c7448e8 +guid: 01cbef8f24d105f4bafa9668d669e040 MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/SpineEditorUtilities.cs b/spine-tk2d/Assets/spine-tk2d/Editor/SpineEditorUtilities.cs new file mode 100644 index 000000000..94102d866 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/SpineEditorUtilities.cs @@ -0,0 +1,376 @@ +#pragma warning disable 0219 +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +/***************************************************************************** + * Spine Editor Utilities created by Mitch Thompson + * Full irrevocable rights and permissions granted to Esoteric Software +*****************************************************************************/ +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Spine; + +[InitializeOnLoad] +public class SpineEditorUtilities : AssetPostprocessor { + + public static class Icons { + public static Texture2D skeleton; + public static Texture2D nullBone; + public static Texture2D bone; + public static Texture2D poseBones; + public static Texture2D boneNib; + public static Texture2D slot; + public static Texture2D skinPlaceholder; + public static Texture2D image; + public static Texture2D boundingBox; + public static Texture2D mesh; + public static Texture2D skin; + public static Texture2D skinsRoot; + public static Texture2D animation; + public static Texture2D animationRoot; + public static Texture2D spine; + public static Texture2D _event; + public static Texture2D constraintNib; + public static Texture2D warning; + public static Texture2D skeletonUtility; + public static Texture2D hingeChain; + public static Texture2D subMeshRenderer; + + public static Mesh boneMesh { + get { + if (_boneMesh == null) { + _boneMesh = new Mesh(); + _boneMesh.vertices = new Vector3[4] { + Vector3.zero, + new Vector3(-0.1f, 0.1f, 0), + Vector3.up, + new Vector3(0.1f, 0.1f, 0) + }; + _boneMesh.uv = new Vector2[4]; + _boneMesh.triangles = new int[6]{0,1,2,2,3,0}; + _boneMesh.RecalculateBounds(); + _boneMesh.RecalculateNormals(); + } + + return _boneMesh; + } + } + + internal static Mesh _boneMesh; + + public static Material boneMaterial { + get { + if (_boneMaterial == null) { +#if UNITY_4_3 + _boneMaterial = new Material(Shader.Find("Particles/Alpha Blended")); + _boneMaterial.SetColor("_TintColor", new Color(0.4f, 0.4f, 0.4f, 0.25f)); +#else + _boneMaterial = new Material(Shader.Find("Spine/Bones")); + _boneMaterial.SetColor("_Color", new Color(0.4f, 0.4f, 0.4f, 0.25f)); +#endif + + } + + return _boneMaterial; + } + } + + internal static Material _boneMaterial; + + public static void Initialize () { + skeleton = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skeleton.png"); + nullBone = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-null.png"); + bone = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-bone.png"); + poseBones = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-poseBones.png"); + boneNib = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-boneNib.png"); + slot = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-slot.png"); + skinPlaceholder = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skinPlaceholder.png"); + image = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-image.png"); + boundingBox = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-boundingBox.png"); + mesh = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-mesh.png"); + skin = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skinPlaceholder.png"); + skinsRoot = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skinsRoot.png"); + animation = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-animation.png"); + animationRoot = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-animationRoot.png"); + spine = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-spine.png"); + _event = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-event.png"); + constraintNib = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-constraintNib.png"); + warning = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-warning.png"); + skeletonUtility = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skeletonUtility.png"); + hingeChain = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-hingeChain.png"); + subMeshRenderer = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-subMeshRenderer.png"); + } + } + + public static string editorPath = ""; + public static string editorGUIPath = ""; + static Dictionary skeletonRendererTable; + static Dictionary skeletonUtilityBoneTable; + public static float defaultScale = 0.01f; + public static float defaultMix = 0.2f; + public static string defaultShader = "Spine/Skeleton"; + + static SpineEditorUtilities () { + DirectoryInfo rootDir = new DirectoryInfo(Application.dataPath); + FileInfo[] files = rootDir.GetFiles("SpineEditorUtilities.cs", SearchOption.AllDirectories); + editorPath = Path.GetDirectoryName(files[0].FullName.Replace("\\", "/").Replace(Application.dataPath, "Assets")); + editorGUIPath = editorPath + "/GUI"; + + Icons.Initialize(); + + skeletonRendererTable = new Dictionary(); + skeletonUtilityBoneTable = new Dictionary(); + + EditorApplication.hierarchyWindowChanged += HierarchyWindowChanged; + EditorApplication.hierarchyWindowItemOnGUI += HierarchyWindowItemOnGUI; + + HierarchyWindowChanged(); + } + + static void HierarchyWindowChanged () { + skeletonRendererTable.Clear(); + skeletonUtilityBoneTable.Clear(); + + SkeletonRenderer[] arr = Object.FindObjectsOfType(); + + foreach (SkeletonRenderer r in arr) + skeletonRendererTable.Add(r.gameObject.GetInstanceID(), r.gameObject); + + SkeletonUtilityBone[] boneArr = Object.FindObjectsOfType(); + foreach (SkeletonUtilityBone b in boneArr) + skeletonUtilityBoneTable.Add(b.gameObject.GetInstanceID(), b); + } + + static void HierarchyWindowItemOnGUI (int instanceId, Rect selectionRect) { + if (skeletonRendererTable.ContainsKey(instanceId)) { + Rect r = new Rect(selectionRect); + r.x = r.width - 15; + r.width = 15; + + GUI.Label(r, Icons.spine); + } else if (skeletonUtilityBoneTable.ContainsKey(instanceId)) { + Rect r = new Rect(selectionRect); + r.x -= 26; + + if (skeletonUtilityBoneTable[instanceId] != null) { + if (skeletonUtilityBoneTable[instanceId].transform.childCount == 0) + r.x += 13; + + r.y += 2; + + r.width = 13; + r.height = 13; + + if (skeletonUtilityBoneTable[instanceId].mode == SkeletonUtilityBone.Mode.Follow) { + GUI.DrawTexture(r, Icons.bone); + } else { + GUI.DrawTexture(r, Icons.poseBones); + } + } + + } + + } + + [MenuItem("Assets/Spine/Spawn")] + static void SpawnAnimatedSkeleton () { + Object[] arr = Selection.objects; + foreach (Object o in arr) { + string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(o)); + string skinName = EditorPrefs.GetString(guid + "_lastSkin", ""); + + SpawnAnimatedSkeleton((SkeletonDataAsset)o, skinName); + SceneView.RepaintAll(); + } + } + + [MenuItem("Assets/Spine/Spawn", true)] + static bool ValidateSpawnAnimatedSkeleton () { + Object[] arr = Selection.objects; + + if (arr.Length == 0) + return false; + + foreach (Object o in arr) { + if (o.GetType() != typeof(SkeletonDataAsset)) + return false; + } + + return true; + } + + public static SkeletonAnimation SpawnAnimatedSkeleton (SkeletonDataAsset skeletonDataAsset, string skinName) { + SkeletonData skelData = skeletonDataAsset.GetSkeletonData(false); + if(skelData == null){ + return null; + } + return SpawnAnimatedSkeleton(skeletonDataAsset, skelData.FindSkin(skinName)); + } + + public static SkeletonAnimation SpawnAnimatedSkeleton (SkeletonDataAsset skeletonDataAsset, Skin skin = null) { + GameObject go = new GameObject(skeletonDataAsset.name.Replace("_SkeletonData", ""), typeof(MeshFilter), typeof(MeshRenderer), typeof(SkeletonAnimation)); + SkeletonAnimation anim = go.GetComponent(); + anim.skeletonDataAsset = skeletonDataAsset; + + + + SkeletonData data = skeletonDataAsset.GetSkeletonData(false); + + if (data == null) { + return null; + } + + if (skin == null) + skin = data.DefaultSkin; + + if (skin == null) + skin = data.Skins[0]; + + anim.Reset(); + + anim.skeleton.SetSkin(skin); + anim.initialSkinName = skin.Name; + + anim.skeleton.Update(1); + anim.state.Update(1); + anim.state.Apply(anim.skeleton); + anim.skeleton.UpdateWorldTransform(); + + return anim; + } + + static bool IsSpineJSON (TextAsset asset) { + object obj = Json.Deserialize(new StringReader(asset.text)); + if (obj == null) { + Debug.LogError("Is not valid JSON"); + return false; + } + + Dictionary root = (Dictionary)obj; + + if (!root.ContainsKey("skeleton")) + return false; + + Dictionary skeletonInfo = (Dictionary)root["skeleton"]; + + string spineVersion = (string)skeletonInfo["spine"]; + //TODO: reject old versions + + return true; + } + + //TK2D helpers + + [MenuItem("Assets/Create/Spine/SkeletonData From Selection", true)] + static bool CreateSkeletonDataFromSelectionValidate(){ + int spineJsonCount = 0; + int collectionCount = 0; + + foreach(Object obj in Selection.objects){ + if(obj is TextAsset){ + TextAsset t = obj as TextAsset; + if(IsSpineJSON(t)) + spineJsonCount++; + } + else if(obj is GameObject){ + GameObject go = obj as GameObject; + var spriteCollection = go.GetComponent(); + if(spriteCollection != null){ + if(spriteCollection.spriteCollection != null){ + collectionCount++; + if(collectionCount > 1){ + Debug.LogWarning("SkeletonData From Selection only works when 1 Collection is selected."); + return false; + } + } + } + } + } + + if(spineJsonCount > 0 && collectionCount == 1){ + return true; + } + + return false; + } + + [MenuItem("Assets/Create/Spine/SkeletonData From Selection")] + static void CreateSkeletonDataFromSelection(){ + + List jsonList = new List(); + tk2dSpriteCollectionData collectionData = null; + + foreach(Object obj in Selection.objects){ + if(obj is TextAsset){ + TextAsset t = obj as TextAsset; + if(IsSpineJSON(t)) + jsonList.Add(t); + } + else if(obj is GameObject){ + GameObject go = obj as GameObject; + var spriteCollection = go.GetComponent(); + if(spriteCollection != null){ + if(spriteCollection.spriteCollection != null){ + collectionData = spriteCollection.spriteCollection; + } + } + } + } + + if(collectionData == null) + return; + + foreach(TextAsset t in jsonList){ + string path = Path.GetDirectoryName(AssetDatabase.GetAssetPath(t)) + "/" + t.name + "_SkeletonData.asset"; + + SkeletonDataAsset skeletonDataAsset = (SkeletonDataAsset)AssetDatabase.LoadAssetAtPath(path, typeof(SkeletonDataAsset)); + if(skeletonDataAsset == null){ + skeletonDataAsset = SkeletonDataAsset.CreateInstance(); + AssetDatabase.CreateAsset(skeletonDataAsset, path); + } + + skeletonDataAsset.skeletonJSON = t; + skeletonDataAsset.spriteCollection = collectionData; + skeletonDataAsset.defaultMix = 0.2f; + skeletonDataAsset.fromAnimation = new string[0]; + skeletonDataAsset.toAnimation = new string[0]; + skeletonDataAsset.duration = new float[0]; + + EditorUtility.SetDirty(skeletonDataAsset); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + } + + } +} diff --git a/spine-tk2d/Assets/spine-tk2d/Editor/SpineEditorUtilities.cs.meta b/spine-tk2d/Assets/spine-tk2d/Editor/SpineEditorUtilities.cs.meta new file mode 100644 index 000000000..544e47769 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Editor/SpineEditorUtilities.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f834d5cd806ec4645915ac315edbdc60 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Shaders/Bones.shader b/spine-tk2d/Assets/spine-tk2d/Shaders/Bones.shader new file mode 100644 index 000000000..61fc977e5 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Shaders/Bones.shader @@ -0,0 +1,69 @@ +Shader "Spine/Bones" { +Properties { + _Color ("Color", Color) = (0.5,0.5,0.5,0.5) + _MainTex ("Particle Texture", 2D) = "white" {} +} + +Category { + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Blend SrcAlpha OneMinusSrcAlpha + AlphaTest Greater .01 + ColorMask RGB + + Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off } + + SubShader { + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_particles + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _Color; + + struct appdata_t { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f { + float4 vertex : SV_POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + #ifdef SOFTPARTICLES_ON + float4 projPos : TEXCOORD1; + #endif + }; + + float4 _MainTex_ST; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + #ifdef SOFTPARTICLES_ON + o.projPos = ComputeScreenPos (o.vertex); + COMPUTE_EYEDEPTH(o.projPos.z); + #endif + o.color = v.color; + o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); + return o; + } + + sampler2D_float _CameraDepthTexture; + + + fixed4 frag (v2f i) : SV_Target + { + return 2.0f * i.color * _Color * tex2D(_MainTex, i.texcoord); + } + ENDCG + } + } +} +} diff --git a/spine-tk2d/Assets/spine-tk2d/Shaders/Bones.shader.meta b/spine-tk2d/Assets/spine-tk2d/Shaders/Bones.shader.meta new file mode 100644 index 000000000..d01814ef9 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Shaders/Bones.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 66988de88a15abd4e8846c6805485f57 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.mat b/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.mat new file mode 100644 index 000000000..31cf39d99 Binary files /dev/null and b/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.mat differ diff --git a/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.mat.meta b/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.mat.meta new file mode 100644 index 000000000..ef267ef07 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 43227e5adadc6f24bb4bf74b92a56fb4 +NativeFormatImporter: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.shader b/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.shader new file mode 100644 index 000000000..3a0de6756 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.shader @@ -0,0 +1,21 @@ +Shader "Spine/HiddenPass" { + SubShader + + { + + Tags {"Queue" = "Geometry-1" } + + Lighting Off + + Pass + + { + + ZWrite Off + + ColorMask 0 + + } + + } +} diff --git a/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.shader.meta b/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.shader.meta new file mode 100644 index 000000000..bcc031d30 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/Shaders/HiddenPass.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 913475501bf19374c84390868a9d6d3d +ShaderImporter: + defaultTextures: [] + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonAnimation.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonAnimation.cs index 8810a5383..0c4c9a44f 100644 --- a/spine-tk2d/Assets/spine-tk2d/SkeletonAnimation.cs +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonAnimation.cs @@ -41,18 +41,23 @@ public class SkeletonAnimation : SkeletonRenderer { public bool loop; public Spine.AnimationState state; - public delegate void UpdateBonesDelegate(SkeletonAnimation skeleton); - public UpdateBonesDelegate UpdateBones; + public delegate void UpdateBonesDelegate (SkeletonAnimation skeleton); + public UpdateBonesDelegate UpdateLocal; + public UpdateBonesDelegate UpdateWorld; + public UpdateBonesDelegate UpdateComplete; [SerializeField] - private String _animationName; + private String + _animationName; + public String AnimationName { get { TrackEntry entry = state.GetCurrent(0); return entry == null ? null : entry.Animation.Name; } set { - if (_animationName == value) return; + if (_animationName == value) + return; _animationName = value; if (value == null || value.Length == 0) state.ClearTrack(0); @@ -63,7 +68,8 @@ public class SkeletonAnimation : SkeletonRenderer { public override void Reset () { base.Reset(); - if (!valid) return; + if (!valid) + return; state = new Spine.AnimationState(skeletonDataAsset.GetAnimationStateData()); if (_animationName != null && _animationName.Length > 0) { @@ -77,13 +83,26 @@ public class SkeletonAnimation : SkeletonRenderer { } public virtual void Update (float deltaTime) { - if (!valid) return; + if (!valid) + return; deltaTime *= timeScale; skeleton.Update(deltaTime); state.Update(deltaTime); state.Apply(skeleton); - if (UpdateBones != null) UpdateBones(this); + + if (UpdateLocal != null) + UpdateLocal(this); + skeleton.UpdateWorldTransform(); + + if (UpdateWorld != null) { + UpdateWorld(this); + skeleton.UpdateWorldTransform(); + } + + if (UpdateComplete != null) { + UpdateComplete(this); + } } } diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonDataAsset.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonDataAsset.cs index 9323a2d31..3e760787e 100644 --- a/spine-tk2d/Assets/spine-tk2d/SkeletonDataAsset.cs +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonDataAsset.cs @@ -53,14 +53,14 @@ public class SkeletonDataAsset : ScriptableObject { public SkeletonData GetSkeletonData (bool quiet) { if (spriteCollection == null) { if (!quiet) - Debug.LogError("Sprite collection not set for skeleton data asset: " + name, this); + Debug.LogError("SpriteCollection not set for SkeletonData asset: " + name, this); Reset(); return null; } - + if (skeletonJSON == null) { if (!quiet) - Debug.LogError("Skeleton JSON file not set for skeleton data asset: " + name, this); + Debug.LogError("Skeleton JSON file not set for SkeletonData asset: " + name, this); Reset(); return null; } @@ -81,7 +81,8 @@ public class SkeletonDataAsset : ScriptableObject { stateData = new AnimationStateData(skeletonData); stateData.DefaultMix = defaultMix; for (int i = 0, n = fromAnimation.Length; i < n; i++) { - if (fromAnimation[i].Length == 0 || toAnimation[i].Length == 0) continue; + if (fromAnimation[i].Length == 0 || toAnimation[i].Length == 0) + continue; stateData.SetMix(fromAnimation[i], toAnimation[i], duration[i]); } diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonExtensions.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonExtensions.cs new file mode 100644 index 000000000..a483e47e6 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonExtensions.cs @@ -0,0 +1,108 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +/***************************************************************************** + * Spine Extensions created by Mitch Thompson + * Full irrevocable rights and permissions granted to Esoteric Software +*****************************************************************************/ + +using UnityEngine; +using System.Collections; +using Spine; + +public static class SkeletonExtensions { + + public static void SetColor (this Slot slot, Color color) { + slot.A = color.a; + slot.R = color.r; + slot.G = color.g; + slot.B = color.b; + } + + public static void SetColor (this Slot slot, Color32 color) { + slot.A = color.a / 255f; + slot.R = color.r / 255f; + slot.G = color.g / 255f; + slot.B = color.b / 255f; + } + + public static void SetColor (this RegionAttachment attachment, Color color) { + attachment.A = color.a; + attachment.R = color.r; + attachment.G = color.g; + attachment.B = color.b; + } + + public static void SetColor (this RegionAttachment attachment, Color32 color) { + attachment.A = color.a / 255f; + attachment.R = color.r / 255f; + attachment.G = color.g / 255f; + attachment.B = color.b / 255f; + } + + public static void SetColor (this MeshAttachment attachment, Color color) { + attachment.A = color.a; + attachment.R = color.r; + attachment.G = color.g; + attachment.B = color.b; + } + + public static void SetColor (this MeshAttachment attachment, Color32 color) { + attachment.A = color.a / 255f; + attachment.R = color.r / 255f; + attachment.G = color.g / 255f; + attachment.B = color.b / 255f; + } + + public static void SetColor (this SkinnedMeshAttachment attachment, Color color) { + attachment.A = color.a; + attachment.R = color.r; + attachment.G = color.g; + attachment.B = color.b; + } + + public static void SetColor (this SkinnedMeshAttachment attachment, Color32 color) { + attachment.A = color.a / 255f; + attachment.R = color.r / 255f; + attachment.G = color.g / 255f; + attachment.B = color.b / 255f; + } + + public static void SetPosition (this Bone bone, Vector2 position) { + bone.X = position.x; + bone.Y = position.y; + } + + public static void SetPosition (this Bone bone, Vector3 position) { + bone.X = position.x; + bone.Y = position.y; + } + +} diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonExtensions.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonExtensions.cs.meta new file mode 100644 index 000000000..427cdd10a --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonExtensions.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea85c8f6a91a6ab45881b0dbdaabb7d0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonRenderer.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonRenderer.cs index 355ac0e46..5f4da3adb 100644 --- a/spine-tk2d/Assets/spine-tk2d/SkeletonRenderer.cs +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonRenderer.cs @@ -37,17 +37,20 @@ using Spine; /// Renders a skeleton. [ExecuteInEditMode, RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] public class SkeletonRenderer : MonoBehaviour { + + public delegate void SkeletonRendererDelegate (SkeletonRenderer skeletonRenderer); + + public SkeletonRendererDelegate OnReset; [System.NonSerialized] public bool valid; [System.NonSerialized] public Skeleton skeleton; - public SkeletonDataAsset skeletonDataAsset; public String initialSkinName; public bool calculateNormals, calculateTangents; public float zSpacing; public bool renderMeshes = true, immutableTriangles; - + public bool logErrors = false; private MeshFilter meshFilter; private Mesh mesh, mesh1, mesh2; private bool useMesh1; @@ -61,9 +64,12 @@ public class SkeletonRenderer : MonoBehaviour { private readonly List submeshes = new List(); public virtual void Reset () { - if (meshFilter != null) meshFilter.sharedMesh = null; - if (mesh != null) DestroyImmediate(mesh); - if (renderer != null) renderer.sharedMaterial = null; + if (meshFilter != null) + meshFilter.sharedMesh = null; + if (mesh != null) + DestroyImmediate(mesh); + if (renderer != null) + renderer.sharedMaterial = null; mesh = null; mesh1 = null; mesh2 = null; @@ -78,11 +84,14 @@ public class SkeletonRenderer : MonoBehaviour { valid = false; if (!skeletonDataAsset) { - Debug.LogError("Missing SkeletonData asset.", this); + if (logErrors) + Debug.LogError("Missing SkeletonData asset.", this); + return; } SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(false); - if (skeletonData == null) return; + if (skeletonData == null) + return; valid = true; meshFilter = GetComponent(); @@ -93,6 +102,8 @@ public class SkeletonRenderer : MonoBehaviour { skeleton = new Skeleton(skeletonData); if (initialSkinName != null && initialSkinName.Length > 0 && initialSkinName != "default") skeleton.SetSkin(initialSkinName); + if (OnReset != null) + OnReset(this); } public void Awake () { @@ -108,8 +119,8 @@ public class SkeletonRenderer : MonoBehaviour { } public virtual void LateUpdate () { - if (!valid) return; - + if (!valid) + return; // Count vertices and submesh triangles. int vertexCount = 0; int submeshTriangleCount = 0, submeshFirstVertex = 0, submeshStartSlotIndex = 0; @@ -119,7 +130,8 @@ public class SkeletonRenderer : MonoBehaviour { int drawOrderCount = drawOrder.Count; bool renderMeshes = this.renderMeshes; for (int i = 0; i < drawOrderCount; i++) { - Attachment attachment = drawOrder[i].attachment; + Slot slot = drawOrder[i]; + Attachment attachment = slot.attachment; object rendererObject; int attachmentVertexCount, attachmentTriangleCount; @@ -129,24 +141,25 @@ public class SkeletonRenderer : MonoBehaviour { attachmentVertexCount = 4; attachmentTriangleCount = 6; } else { - if (!renderMeshes) continue; + if (!renderMeshes) + continue; if (attachment is MeshAttachment) { MeshAttachment meshAttachment = (MeshAttachment)attachment; rendererObject = meshAttachment.RendererObject; attachmentVertexCount = meshAttachment.vertices.Length >> 1; attachmentTriangleCount = meshAttachment.triangles.Length; } else if (attachment is SkinnedMeshAttachment) { - SkinnedMeshAttachment meshAttachment = (SkinnedMeshAttachment)attachment; - rendererObject = meshAttachment.RendererObject; - attachmentVertexCount = meshAttachment.uvs.Length >> 1; - attachmentTriangleCount = meshAttachment.triangles.Length; - } else - continue; + SkinnedMeshAttachment meshAttachment = (SkinnedMeshAttachment)attachment; + rendererObject = meshAttachment.RendererObject; + attachmentVertexCount = meshAttachment.uvs.Length >> 1; + attachmentTriangleCount = meshAttachment.triangles.Length; + } else + continue; } // Populate submesh when material changes. Material material = (Material)rendererObject; - if (lastMaterial != material && lastMaterial != null) { + if ((lastMaterial != material && lastMaterial != null) || slot.Data.name[0] == '*') { AddSubmesh(lastMaterial, submeshStartSlotIndex, i, submeshTriangleCount, submeshFirstVertex, false); submeshTriangleCount = 0; submeshFirstVertex = vertexCount; @@ -209,7 +222,8 @@ public class SkeletonRenderer : MonoBehaviour { color.r = (byte)(r * slot.r * regionAttachment.r * color.a); color.g = (byte)(g * slot.g * regionAttachment.g * color.a); color.b = (byte)(b * slot.b * regionAttachment.b * color.a); - if (slot.data.additiveBlending) color.a = 0; + if (slot.data.additiveBlending) + color.a = 0; colors[vertexIndex] = color; colors[vertexIndex + 1] = color; colors[vertexIndex + 2] = color; @@ -223,18 +237,21 @@ public class SkeletonRenderer : MonoBehaviour { vertexIndex += 4; } else { - if (!renderMeshes) continue; + if (!renderMeshes) + continue; if (attachment is MeshAttachment) { MeshAttachment meshAttachment = (MeshAttachment)attachment; int meshVertexCount = meshAttachment.vertices.Length; - if (tempVertices.Length < meshVertexCount) tempVertices = new float[meshVertexCount]; + if (tempVertices.Length < meshVertexCount) + tempVertices = new float[meshVertexCount]; meshAttachment.ComputeWorldVertices(slot, tempVertices); color.a = (byte)(a * slot.a * meshAttachment.a); color.r = (byte)(r * slot.r * meshAttachment.r * color.a); color.g = (byte)(g * slot.g * meshAttachment.g * color.a); color.b = (byte)(b * slot.b * meshAttachment.b * color.a); - if (slot.data.additiveBlending) color.a = 0; + if (slot.data.additiveBlending) + color.a = 0; float[] meshUVs = meshAttachment.uvs; float z = i * zSpacing; @@ -244,25 +261,27 @@ public class SkeletonRenderer : MonoBehaviour { uvs[vertexIndex] = new Vector2(meshUVs[ii], meshUVs[ii + 1]); } } else if (attachment is SkinnedMeshAttachment) { - SkinnedMeshAttachment meshAttachment = (SkinnedMeshAttachment)attachment; - int meshVertexCount = meshAttachment.uvs.Length; - if (tempVertices.Length < meshVertexCount) tempVertices = new float[meshVertexCount]; - meshAttachment.ComputeWorldVertices(slot, tempVertices); + SkinnedMeshAttachment meshAttachment = (SkinnedMeshAttachment)attachment; + int meshVertexCount = meshAttachment.uvs.Length; + if (tempVertices.Length < meshVertexCount) + tempVertices = new float[meshVertexCount]; + meshAttachment.ComputeWorldVertices(slot, tempVertices); - color.a = (byte)(a * slot.a * meshAttachment.a); - color.r = (byte)(r * slot.r * meshAttachment.r * color.a); - color.g = (byte)(g * slot.g * meshAttachment.g * color.a); - color.b = (byte)(b * slot.b * meshAttachment.b * color.a); - if (slot.data.additiveBlending) color.a = 0; + color.a = (byte)(a * slot.a * meshAttachment.a); + color.r = (byte)(r * slot.r * meshAttachment.r * color.a); + color.g = (byte)(g * slot.g * meshAttachment.g * color.a); + color.b = (byte)(b * slot.b * meshAttachment.b * color.a); + if (slot.data.additiveBlending) + color.a = 0; - float[] meshUVs = meshAttachment.uvs; - float z = i * zSpacing; - for (int ii = 0; ii < meshVertexCount; ii += 2, vertexIndex++) { - vertices[vertexIndex] = new Vector3(tempVertices[ii], tempVertices[ii + 1], z); - colors[vertexIndex] = color; - uvs[vertexIndex] = new Vector2(meshUVs[ii], meshUVs[ii + 1]); + float[] meshUVs = meshAttachment.uvs; + float z = i * zSpacing; + for (int ii = 0; ii < meshVertexCount; ii += 2, vertexIndex++) { + vertices[vertexIndex] = new Vector3(tempVertices[ii], tempVertices[ii + 1], z); + colors[vertexIndex] = color; + uvs[vertexIndex] = new Vector2(meshUVs[ii], meshUVs[ii + 1]); + } } - } } } @@ -310,7 +329,7 @@ public class SkeletonRenderer : MonoBehaviour { if (submeshes.Count <= submeshIndex) submeshes.Add(new Submesh()); else if (immutableTriangles) - return; + return; Submesh submesh = submeshes[submeshIndex]; @@ -322,10 +341,10 @@ public class SkeletonRenderer : MonoBehaviour { triangles[i] = 0; submesh.triangleCount = triangleCount; } else if (trianglesCapacity != triangleCount) { - // Reallocate triangles when not the exact size needed. - submesh.triangles = triangles = new int[triangleCount]; - submesh.triangleCount = 0; - } + // Reallocate triangles when not the exact size needed. + submesh.triangles = triangles = new int[triangleCount]; + submesh.triangleCount = 0; + } if (!renderMeshes) { // Use stored triangles if possible. @@ -366,18 +385,18 @@ public class SkeletonRenderer : MonoBehaviour { attachmentVertexCount = meshAttachment.vertices.Length >> 1; attachmentTriangles = meshAttachment.triangles; } else if (attachment is SkinnedMeshAttachment) { - SkinnedMeshAttachment meshAttachment = (SkinnedMeshAttachment)attachment; - attachmentVertexCount = meshAttachment.uvs.Length >> 1; - attachmentTriangles = meshAttachment.triangles; - } else - continue; + SkinnedMeshAttachment meshAttachment = (SkinnedMeshAttachment)attachment; + attachmentVertexCount = meshAttachment.uvs.Length >> 1; + attachmentTriangles = meshAttachment.triangles; + } else + continue; for (int ii = 0, nn = attachmentTriangles.Length; ii < nn; ii++, triangleIndex++) triangles[triangleIndex] = firstVertex + attachmentTriangles[ii]; firstVertex += attachmentVertexCount; } } - #if UNITY_EDITOR +#if UNITY_EDITOR void OnDrawGizmos() { // Make selection easier by drawing a clear gizmo over the skeleton. if (vertices == null) return; @@ -397,7 +416,7 @@ public class SkeletonRenderer : MonoBehaviour { Gizmos.matrix = transform.localToWorldMatrix; Gizmos.DrawCube(gizmosCenter, gizmosSize); } - #endif +#endif } class Submesh { diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility.meta new file mode 100644 index 000000000..d690c94de --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f6e0caaafe294de48af468a6a9321473 +folderAsset: yes +DefaultImporter: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor.meta new file mode 100644 index 000000000..386e1e90b --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a751a9d1e3e26d64d997b66a781df8e9 +folderAsset: yes +DefaultImporter: + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityBoneInspector.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityBoneInspector.cs new file mode 100644 index 000000000..a6950aa84 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityBoneInspector.cs @@ -0,0 +1,304 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +/***************************************************************************** + * Skeleton Utility created by Mitch Thompson + * Full irrevocable rights and permissions granted to Esoteric Software +*****************************************************************************/ +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; +using Spine; + +[CustomEditor(typeof(SkeletonUtilityBone)), CanEditMultipleObjects] +public class SkeletonUtilityBoneInspector : Editor { + SerializedProperty mode, boneName, zPosition, position, rotation, scale, overrideAlpha, parentReference, flip, flipX; + + //multi selected flags + bool containsFollows, containsOverrides, multiObject; + + //single selected helpers + SkeletonUtilityBone utilityBone; + SkeletonUtility skeletonUtility; + bool canCreateHingeChain = false; + + void OnEnable () { + mode = this.serializedObject.FindProperty("mode"); + boneName = this.serializedObject.FindProperty("boneName"); + zPosition = this.serializedObject.FindProperty("zPosition"); + position = this.serializedObject.FindProperty("position"); + rotation = this.serializedObject.FindProperty("rotation"); + scale = this.serializedObject.FindProperty("scale"); + overrideAlpha = this.serializedObject.FindProperty("overrideAlpha"); + parentReference = this.serializedObject.FindProperty("parentReference"); + flip = this.serializedObject.FindProperty("flip"); + flipX = this.serializedObject.FindProperty("flipX"); + + EvaluateFlags(); + + if (utilityBone.valid == false && skeletonUtility != null && skeletonUtility.skeletonRenderer != null) { + skeletonUtility.skeletonRenderer.Reset(); + } + + canCreateHingeChain = CanCreateHingeChain(); + } + + void EvaluateFlags () { + utilityBone = (SkeletonUtilityBone)target; + skeletonUtility = utilityBone.skeletonUtility; + + if (Selection.objects.Length == 1) { + containsFollows = utilityBone.mode == SkeletonUtilityBone.Mode.Follow; + containsOverrides = utilityBone.mode == SkeletonUtilityBone.Mode.Override; + } else { + int boneCount = 0; + foreach (Object o in Selection.objects) { + if (o is GameObject) { + GameObject go = (GameObject)o; + SkeletonUtilityBone sub = go.GetComponent(); + if (sub != null) { + boneCount++; + if (sub.mode == SkeletonUtilityBone.Mode.Follow) + containsFollows = true; + if (sub.mode == SkeletonUtilityBone.Mode.Override) + containsOverrides = true; + } + } + } + + if (boneCount > 1) + multiObject = true; + } + } + + public override void OnInspectorGUI () { + serializedObject.Update(); + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(mode); + if (EditorGUI.EndChangeCheck()) { + containsOverrides = mode.enumValueIndex == 1; + containsFollows = mode.enumValueIndex == 0; + } + + EditorGUI.BeginDisabledGroup(multiObject); + { + string str = boneName.stringValue; + if (str == "") + str = ""; + if (multiObject) + str = ""; + + GUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel("Bone"); + + if (GUILayout.Button(str, EditorStyles.popup)) { + BoneSelectorContextMenu(str, ((SkeletonUtilityBone)target).skeletonUtility.skeletonRenderer.skeleton.Bones, "", TargetBoneSelected); + } + + GUILayout.EndHorizontal(); + } + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.PropertyField(zPosition); + EditorGUILayout.PropertyField(position); + EditorGUILayout.PropertyField(rotation); + EditorGUILayout.PropertyField(scale); + EditorGUILayout.PropertyField(flip); + + EditorGUI.BeginDisabledGroup(containsFollows); + { + EditorGUILayout.PropertyField(overrideAlpha); + EditorGUILayout.PropertyField(parentReference); + + EditorGUI.BeginDisabledGroup(multiObject || !flip.boolValue); + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(flipX); + if (EditorGUI.EndChangeCheck()) { + FlipX(flipX.boolValue); + } + } + EditorGUI.EndDisabledGroup(); + + } + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.Space(); + + GUILayout.BeginHorizontal(); + { + EditorGUI.BeginDisabledGroup(multiObject || !utilityBone.valid || utilityBone.bone == null || utilityBone.bone.Children.Count == 0); + { + if (GUILayout.Button(new GUIContent("Add Child", SpineEditorUtilities.Icons.bone), GUILayout.Width(150), GUILayout.Height(24))) + BoneSelectorContextMenu("", utilityBone.bone.Children, "", SpawnChildBoneSelected); + } + EditorGUI.EndDisabledGroup(); + + EditorGUI.BeginDisabledGroup(multiObject || !utilityBone.valid || utilityBone.bone == null || containsOverrides); + { + if (GUILayout.Button(new GUIContent("Add Override", SpineEditorUtilities.Icons.poseBones), GUILayout.Width(150), GUILayout.Height(24))) + SpawnOverride(); + } + EditorGUI.EndDisabledGroup(); + + EditorGUI.BeginDisabledGroup(multiObject || !utilityBone.valid || !canCreateHingeChain); + { + if (GUILayout.Button(new GUIContent("Create Hinge Chain", SpineEditorUtilities.Icons.hingeChain), GUILayout.Width(150), GUILayout.Height(24))) + CreateHingeChain(); + } + EditorGUI.EndDisabledGroup(); + + } + GUILayout.EndHorizontal(); + + serializedObject.ApplyModifiedProperties(); + } + + void FlipX (bool state) { + utilityBone.FlipX(state); + if (Application.isPlaying == false) { + skeletonUtility.skeletonAnimation.LateUpdate(); + } + } + + void BoneSelectorContextMenu (string current, List bones, string topValue, GenericMenu.MenuFunction2 callback) { + GenericMenu menu = new GenericMenu(); + + if (topValue != "") + menu.AddItem(new GUIContent(topValue), current == topValue, callback, null); + + for (int i = 0; i < bones.Count; i++) { + menu.AddItem(new GUIContent(bones[i].Data.Name), bones[i].Data.Name == current, callback, bones[i]); + } + + menu.ShowAsContext(); + + } + + void TargetBoneSelected (object obj) { + if (obj == null) { + boneName.stringValue = ""; + serializedObject.ApplyModifiedProperties(); + } else { + Bone bone = (Bone)obj; + boneName.stringValue = bone.Data.Name; + serializedObject.ApplyModifiedProperties(); + + utilityBone.Reset(); + } + } + + void SpawnChildBoneSelected (object obj) { + if (obj == null) { + //add recursively + foreach (var bone in utilityBone.bone.Children) { + GameObject go = skeletonUtility.SpawnBoneRecursively(bone, utilityBone.transform, utilityBone.mode, utilityBone.position, utilityBone.rotation, utilityBone.scale); + SkeletonUtilityBone[] newUtilityBones = go.GetComponentsInChildren(); + foreach (SkeletonUtilityBone utilBone in newUtilityBones) + SkeletonUtilityInspector.AttachIcon(utilBone); + } + } else { + Bone bone = (Bone)obj; + GameObject go = skeletonUtility.SpawnBone(bone, utilityBone.transform, utilityBone.mode, utilityBone.position, utilityBone.rotation, utilityBone.scale); + SkeletonUtilityInspector.AttachIcon(go.GetComponent()); + Selection.activeGameObject = go; + EditorGUIUtility.PingObject(go); + } + } + + void SpawnOverride () { + GameObject go = skeletonUtility.SpawnBone(utilityBone.bone, utilityBone.transform.parent, SkeletonUtilityBone.Mode.Override, utilityBone.position, utilityBone.rotation, utilityBone.scale); + go.name = go.name + " [Override]"; + SkeletonUtilityInspector.AttachIcon(go.GetComponent()); + Selection.activeGameObject = go; + EditorGUIUtility.PingObject(go); + } + + bool CanCreateHingeChain () { + if (utilityBone == null) + return false; + if (utilityBone.rigidbody != null) + return false; + if (utilityBone.bone != null && utilityBone.bone.Children.Count == 0) + return false; + + Rigidbody[] rigidbodies = utilityBone.GetComponentsInChildren(); + + if (rigidbodies.Length > 0) + return false; + + return true; + } + + void CreateHingeChain () { + var utilBoneArr = utilityBone.GetComponentsInChildren(); + + foreach (var utilBone in utilBoneArr) { + AttachRigidbody(utilBone); + } + + utilityBone.rigidbody.isKinematic = true; + + foreach (var utilBone in utilBoneArr) { + if (utilBone == utilityBone) + continue; + + utilBone.mode = SkeletonUtilityBone.Mode.Override; + + HingeJoint joint = utilBone.gameObject.AddComponent(); + joint.axis = Vector3.forward; + joint.connectedBody = utilBone.transform.parent.rigidbody; + joint.useLimits = true; + JointLimits limits = new JointLimits(); + limits.min = -20; + limits.max = 20; + joint.limits = limits; + utilBone.rigidbody.mass = utilBone.transform.parent.rigidbody.mass * 0.75f; + } + } + + void AttachRigidbody (SkeletonUtilityBone utilBone) { + if (utilBone.GetComponent() == null) { + if (utilBone.bone.Data.Length == 0) { + SphereCollider sphere = utilBone.gameObject.AddComponent(); + sphere.radius = 0.1f; + } else { + float length = utilBone.bone.Data.Length; + BoxCollider box = utilBone.gameObject.AddComponent(); + box.size = new Vector3(length, length / 3, 0.2f); + box.center = new Vector3(length / 2, 0, 0); + } + } + + utilBone.gameObject.AddComponent(); + } +} diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityBoneInspector.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityBoneInspector.cs.meta new file mode 100644 index 000000000..340d6e2eb --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityBoneInspector.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b3ae20b4bcc31f645afd6f5b64f82473 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityInspector.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityInspector.cs new file mode 100644 index 000000000..4c6d02d09 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityInspector.cs @@ -0,0 +1,311 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +/***************************************************************************** + * Skeleton Utility created by Mitch Thompson + * Full irrevocable rights and permissions granted to Esoteric Software +*****************************************************************************/ +using UnityEngine; +using UnityEditor; + +#if UNITY_4_3 +//nothing +#else +using UnityEditor.AnimatedValues; +#endif +using System.Collections; +using System.Collections.Generic; +using Spine; + +using System.Reflection; + +[CustomEditor(typeof(SkeletonUtility))] +public class SkeletonUtilityInspector : Editor { + + public static void AttachIcon (SkeletonUtilityBone utilityBone) { + Skeleton skeleton = utilityBone.skeletonUtility.skeletonRenderer.skeleton; + Texture2D icon; + if (utilityBone.bone.Data.Length == 0) + icon = SpineEditorUtilities.Icons.nullBone; + else + icon = SpineEditorUtilities.Icons.boneNib; + + foreach (IkConstraint c in skeleton.IkConstraints) { + if (c.Target == utilityBone.bone) { + icon = SpineEditorUtilities.Icons.constraintNib; + break; + } + } + + + + typeof(EditorGUIUtility).InvokeMember("SetIconForObject", BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.NonPublic, null, null, new object[2] { + utilityBone.gameObject, + icon + }); + } + + static void AttachIconsToChildren (Transform root) { + if (root != null) { + var utilityBones = root.GetComponentsInChildren(); + foreach (var utilBone in utilityBones) { + AttachIcon(utilBone); + } + } + } + + static SkeletonUtilityInspector () { + #if UNITY_4_3 + showSlots = false; + #else + showSlots = new AnimBool(false); + #endif + } + + SkeletonUtility skeletonUtility; + Skeleton skeleton; + SkeletonRenderer skeletonRenderer; + Transform transform; + bool isPrefab; + Dictionary> attachmentTable = new Dictionary>(); + + + //GUI stuff +#if UNITY_4_3 + static bool showSlots; +#else + static AnimBool showSlots; +#endif + + void OnEnable () { + skeletonUtility = (SkeletonUtility)target; + skeletonRenderer = skeletonUtility.GetComponent(); + skeleton = skeletonRenderer.skeleton; + transform = skeletonRenderer.transform; + + if (skeleton == null) { + skeletonRenderer.Reset(); + skeletonRenderer.LateUpdate(); + + skeleton = skeletonRenderer.skeleton; + } + + UpdateAttachments(); + + if (PrefabUtility.GetPrefabType(this.target) == PrefabType.Prefab) + isPrefab = true; + + } + + void OnDestroy () { + + } + + void OnSceneGUI () { + if (skeleton == null) { + OnEnable(); + return; + } + + float flipRotation = skeleton.FlipX ? -1 : 1; + + foreach (Bone b in skeleton.Bones) { + Vector3 vec = transform.TransformPoint(new Vector3(b.WorldX, b.WorldY, 0)); + + Quaternion rot = Quaternion.Euler(0, 0, b.WorldRotation * flipRotation); + Vector3 forward = transform.TransformDirection(rot * Vector3.right); + forward *= flipRotation; + + SpineEditorUtilities.Icons.boneMaterial.SetPass(0); + Graphics.DrawMeshNow(SpineEditorUtilities.Icons.boneMesh, Matrix4x4.TRS(vec, Quaternion.LookRotation(transform.forward, forward), Vector3.one * b.Data.Length * b.WorldScaleX)); + } + } + + void UpdateAttachments () { + attachmentTable = new Dictionary>(); + Skin skin = skeleton.Skin; + + if (skin == null) { + skin = skeletonRenderer.skeletonDataAsset.GetSkeletonData(true).DefaultSkin; + } + + for (int i = skeleton.Slots.Count-1; i >= 0; i--) { + List attachments = new List(); + skin.FindAttachmentsForSlot(i, attachments); + + attachmentTable.Add(skeleton.Slots[i], attachments); + } + } + + void SpawnHierarchyButton (string label, string tooltip, SkeletonUtilityBone.Mode mode, bool pos, bool rot, bool sca, params GUILayoutOption[] options) { + GUIContent content = new GUIContent(label, tooltip); + if (GUILayout.Button(content, options)) { + if (skeletonUtility.skeletonRenderer == null) + skeletonUtility.skeletonRenderer = skeletonUtility.GetComponent(); + + if (skeletonUtility.boneRoot != null) { + return; + } + + skeletonUtility.SpawnHierarchy(mode, pos, rot, sca); + + SkeletonUtilityBone[] boneComps = skeletonUtility.GetComponentsInChildren(); + foreach (SkeletonUtilityBone b in boneComps) + AttachIcon(b); + } + } + + public override void OnInspectorGUI () { + if (isPrefab) { + GUILayout.Label(new GUIContent("Cannot edit Prefabs", SpineEditorUtilities.Icons.warning)); + return; + } + + skeletonUtility.boneRoot = (Transform)EditorGUILayout.ObjectField("Bone Root", skeletonUtility.boneRoot, typeof(Transform), true); + + GUILayout.BeginHorizontal(); + EditorGUI.BeginDisabledGroup(skeletonUtility.boneRoot != null); + { + if (GUILayout.Button(new GUIContent("Spawn Hierarchy", SpineEditorUtilities.Icons.skeleton), GUILayout.Width(150), GUILayout.Height(24))) + SpawnHierarchyContextMenu(); + } + EditorGUI.EndDisabledGroup(); + + if (GUILayout.Button(new GUIContent("Spawn Submeshes", SpineEditorUtilities.Icons.subMeshRenderer), GUILayout.Width(150), GUILayout.Height(24))) + skeletonUtility.SpawnSubRenderers(true); + GUILayout.EndHorizontal(); + + EditorGUI.BeginChangeCheck(); + skeleton.FlipX = EditorGUILayout.ToggleLeft("Flip X", skeleton.FlipX); + skeleton.FlipY = EditorGUILayout.ToggleLeft("Flip Y", skeleton.FlipY); + if (EditorGUI.EndChangeCheck()) { + skeletonRenderer.LateUpdate(); + SceneView.RepaintAll(); + } + +#if UNITY_4_3 + showSlots = EditorGUILayout.Foldout(showSlots, "Slots"); +#else + showSlots.target = EditorGUILayout.Foldout(showSlots.target, "Slots"); + if (EditorGUILayout.BeginFadeGroup(showSlots.faded)) { +#endif + foreach (KeyValuePair> pair in attachmentTable) { + + Slot slot = pair.Key; + + EditorGUILayout.BeginHorizontal(); + EditorGUI.indentLevel = 1; + EditorGUILayout.LabelField(new GUIContent(slot.Data.Name, SpineEditorUtilities.Icons.slot), GUILayout.ExpandWidth(false)); + + EditorGUI.BeginChangeCheck(); + Color c = EditorGUILayout.ColorField(new Color(slot.R, slot.G, slot.B, slot.A), GUILayout.Width(60)); + + if (EditorGUI.EndChangeCheck()) { + slot.SetColor(c); + skeletonRenderer.LateUpdate(); + } + + EditorGUILayout.EndHorizontal(); + + + + foreach (Attachment attachment in pair.Value) { + + if (slot.Attachment == attachment) { + GUI.contentColor = Color.white; + } else { + GUI.contentColor = Color.grey; + } + + EditorGUI.indentLevel = 2; + bool isAttached = attachment == slot.Attachment; + + Texture2D icon = null; + + if (attachment is MeshAttachment || attachment is SkinnedMeshAttachment) + icon = SpineEditorUtilities.Icons.mesh; + else + icon = SpineEditorUtilities.Icons.image; + + bool swap = EditorGUILayout.ToggleLeft(new GUIContent(attachment.Name, icon), attachment == slot.Attachment); + + if (!isAttached && swap) { + slot.Attachment = attachment; + skeletonRenderer.LateUpdate(); + } else if (isAttached && !swap) { + slot.Attachment = null; + skeletonRenderer.LateUpdate(); + } + + GUI.contentColor = Color.white; + } + } + #if UNITY_4_3 + +#else + } + EditorGUILayout.EndFadeGroup(); + if (showSlots.isAnimating) + Repaint(); +#endif + } + + void SpawnHierarchyContextMenu () { + GenericMenu menu = new GenericMenu(); + + menu.AddItem(new GUIContent("Follow"), false, SpawnFollowHierarchy); + menu.AddItem(new GUIContent("Follow (Root Only)"), false, SpawnFollowHierarchyRootOnly); + menu.AddSeparator(""); + menu.AddItem(new GUIContent("Override"), false, SpawnOverrideHierarchy); + menu.AddItem(new GUIContent("Override (Root Only)"), false, SpawnOverrideHierarchyRootOnly); + + menu.ShowAsContext(); + } + + void SpawnFollowHierarchy () { + Selection.activeGameObject = skeletonUtility.SpawnHierarchy(SkeletonUtilityBone.Mode.Follow, true, true, true); + AttachIconsToChildren(skeletonUtility.boneRoot); + } + + void SpawnFollowHierarchyRootOnly () { + Selection.activeGameObject = skeletonUtility.SpawnRoot(SkeletonUtilityBone.Mode.Follow, true, true, true); + AttachIconsToChildren(skeletonUtility.boneRoot); + } + + void SpawnOverrideHierarchy () { + Selection.activeGameObject = skeletonUtility.SpawnHierarchy(SkeletonUtilityBone.Mode.Override, true, true, true); + AttachIconsToChildren(skeletonUtility.boneRoot); + } + + void SpawnOverrideHierarchyRootOnly () { + Selection.activeGameObject = skeletonUtility.SpawnRoot(SkeletonUtilityBone.Mode.Override, true, true, true); + AttachIconsToChildren(skeletonUtility.boneRoot); + } +} diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityInspector.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityInspector.cs.meta new file mode 100644 index 000000000..7820cbd6d --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/Editor/SkeletonUtilityInspector.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a5b90df955eb8c2429ac67c8b2de6c5c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtility.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtility.cs new file mode 100644 index 000000000..c274c3db6 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtility.cs @@ -0,0 +1,346 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +/***************************************************************************** + * Skeleton Utility created by Mitch Thompson + * Full irrevocable rights and permissions granted to Esoteric Software +*****************************************************************************/ + +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using Spine; + +[RequireComponent(typeof(SkeletonAnimation))] +[ExecuteInEditMode] +public class SkeletonUtility : MonoBehaviour { + + public static T GetInParent (Transform origin) where T : Component { +#if UNITY_4_3 + Transform parent = origin.parent; + while(parent.GetComponent() == null){ + parent = parent.parent; + if(parent == null) + return default(T); + } + + return parent.GetComponent(); +#else + return origin.GetComponentInParent(); +#endif + } + + + public delegate void SkeletonUtilityDelegate (); + + public event SkeletonUtilityDelegate OnReset; + + public Transform boneRoot; + + void Update () { + if (boneRoot != null && skeletonRenderer.skeleton != null) { + Vector3 flipScale = Vector3.one; + if (skeletonRenderer.skeleton.FlipX) + flipScale.x = -1; + + if (skeletonRenderer.skeleton.FlipY) + flipScale.y = -1; + + boneRoot.localScale = flipScale; + } + } + + [HideInInspector] + public SkeletonRenderer skeletonRenderer; + [HideInInspector] + public SkeletonAnimation skeletonAnimation; + [System.NonSerialized] + public List utilityBones = new List(); + [System.NonSerialized] + public List utilityConstraints = new List(); +// Dictionary utilityBoneTable; + + protected bool hasTransformBones; + protected bool hasUtilityConstraints; + protected bool needToReprocessBones; + + void OnEnable () { + if (skeletonRenderer == null) { + skeletonRenderer = GetComponent(); + } + + if (skeletonAnimation == null) { + skeletonAnimation = GetComponent(); + } + + skeletonRenderer.OnReset -= HandleRendererReset; + skeletonRenderer.OnReset += HandleRendererReset; + + if (skeletonAnimation != null) { + skeletonAnimation.UpdateLocal -= UpdateLocal; + skeletonAnimation.UpdateLocal += UpdateLocal; + } + + + CollectBones(); + } + + void Start () { + //recollect because order of operations failure when switching between game mode and edit mode... +// CollectBones(); + } + + void OnDisable () { + skeletonRenderer.OnReset -= HandleRendererReset; + + if (skeletonAnimation != null) { + skeletonAnimation.UpdateLocal -= UpdateLocal; + skeletonAnimation.UpdateWorld -= UpdateWorld; + skeletonAnimation.UpdateComplete -= UpdateComplete; + } + } + + void HandleRendererReset (SkeletonRenderer r) { + if (OnReset != null) + OnReset(); + + CollectBones(); + } + + public void RegisterBone (SkeletonUtilityBone bone) { + if (utilityBones.Contains(bone)) + return; + else { + utilityBones.Add(bone); + needToReprocessBones = true; + } + } + + public void UnregisterBone (SkeletonUtilityBone bone) { + utilityBones.Remove(bone); + } + + public void RegisterConstraint (SkeletonUtilityConstraint constraint) { + + if (utilityConstraints.Contains(constraint)) + return; + else { + utilityConstraints.Add(constraint); + needToReprocessBones = true; + } + } + + public void UnregisterConstraint (SkeletonUtilityConstraint constraint) { + utilityConstraints.Remove(constraint); + } + + public void CollectBones () { + if (skeletonRenderer.skeleton == null) + return; + + if (boneRoot != null) { + List constraintTargetNames = new List(); + + foreach (IkConstraint c in skeletonRenderer.skeleton.IkConstraints) { + constraintTargetNames.Add(c.Target.Data.Name); + } + + foreach (var b in utilityBones) { + if (b.bone == null) { + return; + } + if (b.mode == SkeletonUtilityBone.Mode.Override) { + hasTransformBones = true; + } + + if (constraintTargetNames.Contains(b.bone.Data.Name)) { + hasUtilityConstraints = true; + } + } + + if (utilityConstraints.Count > 0) + hasUtilityConstraints = true; + + if (skeletonAnimation != null) { + skeletonAnimation.UpdateWorld -= UpdateWorld; + skeletonAnimation.UpdateComplete -= UpdateComplete; + + if (hasTransformBones || hasUtilityConstraints) { + skeletonAnimation.UpdateWorld += UpdateWorld; + } + + if (hasUtilityConstraints) { + skeletonAnimation.UpdateComplete += UpdateComplete; + } + } + + needToReprocessBones = false; + } else { + utilityBones.Clear(); + utilityConstraints.Clear(); + } + + } + + void UpdateLocal (SkeletonAnimation anim) { + + if (needToReprocessBones) + CollectBones(); + + if (utilityBones == null) + return; + + foreach (SkeletonUtilityBone b in utilityBones) { + b.transformLerpComplete = false; + } + + UpdateAllBones(); + } + + void UpdateWorld (SkeletonAnimation anim) { + UpdateAllBones(); + + foreach (SkeletonUtilityConstraint c in utilityConstraints) + c.DoUpdate(); + } + + void UpdateComplete (SkeletonAnimation anim) { + UpdateAllBones(); + } + + void UpdateAllBones () { + if (boneRoot == null) { + CollectBones(); + } + + if (utilityBones == null) + return; + + foreach (SkeletonUtilityBone b in utilityBones) { + b.DoUpdate(); + } + } + + public Transform GetBoneRoot () { + if (boneRoot != null) + return boneRoot; + + boneRoot = new GameObject("SkeletonUtility-Root").transform; + boneRoot.parent = transform; + boneRoot.localPosition = Vector3.zero; + boneRoot.localRotation = Quaternion.identity; + boneRoot.localScale = Vector3.one; + + return boneRoot; + } + + public GameObject SpawnRoot (SkeletonUtilityBone.Mode mode, bool pos, bool rot, bool sca) { + GetBoneRoot(); + Skeleton skeleton = this.skeletonRenderer.skeleton; + + GameObject go = SpawnBone(skeleton.RootBone, boneRoot, mode, pos, rot, sca); + + CollectBones(); + + return go; + } + + public GameObject SpawnHierarchy (SkeletonUtilityBone.Mode mode, bool pos, bool rot, bool sca) { + GetBoneRoot(); + + Skeleton skeleton = this.skeletonRenderer.skeleton; + + GameObject go = SpawnBoneRecursively(skeleton.RootBone, boneRoot, mode, pos, rot, sca); + + CollectBones(); + + return go; + } + + public GameObject SpawnBoneRecursively (Bone bone, Transform parent, SkeletonUtilityBone.Mode mode, bool pos, bool rot, bool sca) { + GameObject go = SpawnBone(bone, parent, mode, pos, rot, sca); + + foreach (Bone child in bone.Children) { + SpawnBoneRecursively(child, go.transform, mode, pos, rot, sca); + } + + return go; + } + + public GameObject SpawnBone (Bone bone, Transform parent, SkeletonUtilityBone.Mode mode, bool pos, bool rot, bool sca) { + GameObject go = new GameObject(bone.Data.Name); + go.transform.parent = parent; + + SkeletonUtilityBone b = go.AddComponent(); + b.skeletonUtility = this; + b.position = pos; + b.rotation = rot; + b.scale = sca; + b.mode = mode; + b.zPosition = true; + b.Reset(); + b.bone = bone; + b.boneName = bone.Data.Name; + b.valid = true; + + if (mode == SkeletonUtilityBone.Mode.Override) { + if (rot) + go.transform.localRotation = Quaternion.Euler(0, 0, b.bone.RotationIK); + + if (pos) + go.transform.localPosition = new Vector3(b.bone.X, b.bone.Y, 0); + + go.transform.localScale = new Vector3(b.bone.scaleX, b.bone.scaleY, 0); + } + + return go; + } + + public void SpawnSubRenderers (bool disablePrimaryRenderer) { + int submeshCount = GetComponent().sharedMesh.subMeshCount; + + for (int i = 0; i < submeshCount; i++) { + GameObject go = new GameObject("Submesh " + i, typeof(MeshFilter), typeof(MeshRenderer)); + go.transform.parent = transform; + go.transform.localPosition = Vector3.zero; + go.transform.localRotation = Quaternion.identity; + go.transform.localScale = Vector3.one; + + SkeletonUtilitySubmeshRenderer s = go.AddComponent(); + s.sortingOrder = i * 10; + s.submeshIndex = i; + s.Initialize(renderer); + s.Update(); + } + + if (disablePrimaryRenderer) + renderer.enabled = false; + } +} diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtility.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtility.cs.meta new file mode 100644 index 000000000..7d3d7a44f --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtility.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7f726fb798ad621458c431cb9966d91d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityBone.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityBone.cs new file mode 100644 index 000000000..99c561499 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityBone.cs @@ -0,0 +1,293 @@ +/****************************************************************************** + * Spine Runtimes Software License + * Version 2.1 + * + * Copyright (c) 2013, Esoteric Software + * All rights reserved. + * + * You are granted a perpetual, non-exclusive, non-sublicensable and + * non-transferable license to install, execute and perform the Spine Runtimes + * Software (the "Software") solely for internal use. Without the written + * permission of Esoteric Software (typically granted by licensing Spine), 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 or other intellectual property or proprietary rights + * notices on or in the Software, including any copy thereof. Redistributions + * in binary or source form must include this license and terms. + * + * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL ESOTERIC SOFTARE 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. + *****************************************************************************/ + +/***************************************************************************** + * Skeleton Utility created by Mitch Thompson + * Full irrevocable rights and permissions granted to Esoteric Software +*****************************************************************************/ + +using System; +using System.IO; +using System.Collections.Generic; +using UnityEngine; +using Spine; + +/// Sets a GameObject's transform to match a bone on a Spine skeleton. +[ExecuteInEditMode] +[AddComponentMenu("Spine/SkeletonUtilityBone")] +public class SkeletonUtilityBone : MonoBehaviour { + + public enum Mode { + Follow, + Override + } + + [System.NonSerialized] + public bool valid; + [System.NonSerialized] + public SkeletonUtility skeletonUtility; + [System.NonSerialized] + public Bone bone; + public Mode mode; + public bool zPosition = true; + public bool position; + public bool rotation; + public bool scale; + public bool flip; + public bool flipX; + [Range(0f,1f)] + public float overrideAlpha = 1; + + /// If a bone isn't set, boneName is used to find the bone. + public String boneName; + public Transform parentReference; + [HideInInspector] + public bool transformLerpComplete; + protected Transform cachedTransform; + protected Transform skeletonTransform; + + public bool NonUniformScaleWarning { + get { + return nonUniformScaleWarning; + } + } + + private bool nonUniformScaleWarning; + + public void Reset () { + bone = null; + cachedTransform = transform; + valid = skeletonUtility != null && skeletonUtility.skeletonRenderer != null && skeletonUtility.skeletonRenderer.valid; + if (!valid) + return; + skeletonTransform = skeletonUtility.transform; + + skeletonUtility.OnReset -= HandleOnReset; + skeletonUtility.OnReset += HandleOnReset; + + DoUpdate(); + } + + void OnEnable () { + skeletonUtility = SkeletonUtility.GetInParent(transform); + + if (skeletonUtility == null) + return; + + skeletonUtility.RegisterBone(this); + + skeletonUtility.OnReset += HandleOnReset; + } + + void HandleOnReset () { + Reset(); + } + + void OnDisable () { + if (skeletonUtility != null) { + skeletonUtility.OnReset -= HandleOnReset; + + skeletonUtility.UnregisterBone(this); + } + } + + public void DoUpdate () { + + if (!valid) { + Reset(); + return; + } + + Spine.Skeleton skeleton = skeletonUtility.skeletonRenderer.skeleton; + + if (bone == null) { + if (boneName == null || boneName.Length == 0) + return; + bone = skeleton.FindBone(boneName); + if (bone == null) { + Debug.LogError("Bone not found: " + boneName, this); + return; + } + } + + + + float skeletonFlipRotation = (skeleton.flipX ^ skeleton.flipY) ? -1f : 1f; + + float flipCompensation = 0; + if (flip && (flipX || (flipX != bone.flipX)) && bone.parent != null) { + flipCompensation = bone.parent.WorldRotation * -2; + } + + if (mode == Mode.Follow) { + if (flip) { + flipX = bone.flipX; + } + + + if (position) { + cachedTransform.localPosition = new Vector3(bone.x, bone.y, 0); + } + + if (rotation) { + + if (bone.Data.InheritRotation) { + if (bone.FlipX) { + cachedTransform.localRotation = Quaternion.Euler(0, 180, bone.rotationIK - flipCompensation); + } else { + cachedTransform.localRotation = Quaternion.Euler(0, 0, bone.rotationIK); + } + } else { + Vector3 euler = skeletonTransform.rotation.eulerAngles; + cachedTransform.rotation = Quaternion.Euler(euler.x, euler.y, skeletonTransform.rotation.eulerAngles.z + (bone.worldRotation * skeletonFlipRotation)); + } + + } + + if (scale) { + cachedTransform.localScale = new Vector3(bone.scaleX, bone.scaleY, 1); + + nonUniformScaleWarning = (bone.scaleX != bone.scaleY); + } + + } else if (mode == Mode.Override) { + + + + if (transformLerpComplete) + return; + + if (parentReference == null) { + if (position) { + bone.x = Mathf.Lerp(bone.x, cachedTransform.localPosition.x, overrideAlpha); + bone.y = Mathf.Lerp(bone.y, cachedTransform.localPosition.y, overrideAlpha); + } + + if (rotation) { + float angle = Mathf.LerpAngle(bone.Rotation, cachedTransform.localRotation.eulerAngles.z, overrideAlpha) + flipCompensation; + + if (flip) { + if ((!flipX && bone.flipX)) { + angle -= flipCompensation; + } + + //TODO fix this... + if (angle >= 360) + angle -= 360; + else if (angle <= -360) + angle += 360; + } + + bone.Rotation = angle; + } + + if (scale) { + bone.scaleX = Mathf.Lerp(bone.scaleX, cachedTransform.localScale.x, overrideAlpha); + bone.scaleY = Mathf.Lerp(bone.scaleY, cachedTransform.localScale.y, overrideAlpha); + + nonUniformScaleWarning = (bone.scaleX != bone.scaleY); + } + + if (flip) { + bone.flipX = flipX; + } + } else { + + if (transformLerpComplete) + return; + + if (position) { + Vector3 pos = parentReference.InverseTransformPoint(cachedTransform.position); + bone.x = Mathf.Lerp(bone.x, pos.x, overrideAlpha); + bone.y = Mathf.Lerp(bone.y, pos.y, overrideAlpha); + } + + if (rotation) { + float angle = Mathf.LerpAngle(bone.Rotation, Quaternion.LookRotation(flipX ? Vector3.forward * -1 : Vector3.forward, parentReference.InverseTransformDirection(cachedTransform.up)).eulerAngles.z, overrideAlpha) + flipCompensation; + + if (flip) { + if ((!flipX && bone.flipX)) { + angle -= flipCompensation; + } + + //TODO fix this... + if (angle >= 360) + angle -= 360; + else if (angle <= -360) + angle += 360; + } + + bone.Rotation = angle; + } + + //TODO: Something about this + if (scale) { + bone.scaleX = Mathf.Lerp(bone.scaleX, cachedTransform.localScale.x, overrideAlpha); + bone.scaleY = Mathf.Lerp(bone.scaleY, cachedTransform.localScale.y, overrideAlpha); + + nonUniformScaleWarning = (bone.scaleX != bone.scaleY); + } + + if (flip) { + bone.flipX = flipX; + } + + } + + transformLerpComplete = true; + } + } + + public void FlipX (bool state) { + if (state != flipX) { + flipX = state; + if (flipX && Mathf.Abs(transform.localRotation.eulerAngles.y) > 90) { + skeletonUtility.skeletonAnimation.LateUpdate(); + return; + } else if (!flipX && Mathf.Abs(transform.localRotation.eulerAngles.y) < 90) { + skeletonUtility.skeletonAnimation.LateUpdate(); + return; + } + } + + bone.FlipX = state; + transform.RotateAround(transform.position, skeletonUtility.transform.up, 180); + Vector3 euler = transform.localRotation.eulerAngles; + euler.x = 0; + euler.y = bone.FlipX ? 180 : 0; + transform.localRotation = Quaternion.Euler(euler); + } + + void OnDrawGizmos () { + if (NonUniformScaleWarning) { + Gizmos.DrawIcon(transform.position + new Vector3(0, 0.128f, 0), "icon-warning"); + } + } +} \ No newline at end of file diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityBone.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityBone.cs.meta new file mode 100644 index 000000000..f66d45053 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityBone.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b238dfcde8209044b97d23f62bcaadf6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityConstraint.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityConstraint.cs new file mode 100644 index 000000000..3be62228c --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityConstraint.cs @@ -0,0 +1,22 @@ +using UnityEngine; +using System.Collections; + +[RequireComponent(typeof(SkeletonUtilityBone)), ExecuteInEditMode] + +public abstract class SkeletonUtilityConstraint : MonoBehaviour { + + protected SkeletonUtilityBone utilBone; + protected SkeletonUtility skeletonUtility; + + protected virtual void OnEnable () { + utilBone = GetComponent(); + skeletonUtility = SkeletonUtility.GetInParent(transform); + skeletonUtility.RegisterConstraint(this); + } + + protected virtual void OnDisable () { + skeletonUtility.UnregisterConstraint(this); + } + + public abstract void DoUpdate (); +} diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityConstraint.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityConstraint.cs.meta new file mode 100644 index 000000000..dad11e0a2 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityConstraint.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 522dbfcc6c916df4396f14f35048d185 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityEyeConstraint.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityEyeConstraint.cs new file mode 100644 index 000000000..6aefded5a --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityEyeConstraint.cs @@ -0,0 +1,56 @@ +using UnityEngine; +using System.Collections; + +public class SkeletonUtilityEyeConstraint : SkeletonUtilityConstraint { + + public Transform[] eyes; + public float radius = 0.5f; + public Transform target; + public Vector3 targetPosition; + public float speed = 10; + Vector3[] origins; + Vector3 centerPoint; + + protected override void OnEnable () { + if (!Application.isPlaying) + return; + + base.OnEnable(); + + Bounds centerBounds = new Bounds(eyes[0].localPosition, Vector3.zero); + origins = new Vector3[eyes.Length]; + for (int i = 0; i < eyes.Length; i++) { + origins[i] = eyes[i].localPosition; + centerBounds.Encapsulate(origins[i]); + } + + centerPoint = centerBounds.center; + } + + protected override void OnDisable () { + if (!Application.isPlaying) + return; + + base.OnDisable(); + } + + public override void DoUpdate () { + + if (target != null) + targetPosition = target.position; + + Vector3 goal = targetPosition; + + Vector3 center = transform.TransformPoint(centerPoint); + Vector3 dir = goal - center; + + if (dir.magnitude > 1) + dir.Normalize(); + + for (int i = 0; i < eyes.Length; i++) { + center = transform.TransformPoint(origins[i]); + eyes[i].position = Vector3.MoveTowards(eyes[i].position, center + (dir * radius), speed * Time.deltaTime); + } + + } +} \ No newline at end of file diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityEyeConstraint.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityEyeConstraint.cs.meta new file mode 100644 index 000000000..3e82746da --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityEyeConstraint.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d994c65b6daec64f80ae2ae04e9d999 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityGroundConstraint.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityGroundConstraint.cs new file mode 100644 index 000000000..b9608e9bc --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityGroundConstraint.cs @@ -0,0 +1,120 @@ +using UnityEngine; +using System.Collections; + +[RequireComponent(typeof(SkeletonUtilityBone)), ExecuteInEditMode] +public class SkeletonUtilityGroundConstraint : SkeletonUtilityConstraint { + +#if UNITY_4_3 + public LayerMask groundMask; + public bool use2D = false; + public bool useRadius = false; + public float castRadius = 0.1f; + public float castDistance = 5f; + public float castOffset = 0; + public float groundOffset = 0; + public float adjustSpeed = 5; +#else + [Tooltip("LayerMask for what objects to raycast against")] + public LayerMask groundMask; + [Tooltip("The 2D")] + public bool use2D = false; + [Tooltip("Uses SphereCast for 3D mode and CircleCast for 2D mode")] + public bool useRadius = false; + [Tooltip("The Radius")] + public float castRadius = 0.1f; + [Tooltip("How high above the target bone to begin casting from")] + public float castDistance = 5f; + [Tooltip("X-Axis adjustment")] + public float castOffset = 0; + [Tooltip("Y-Axis adjustment")] + public float groundOffset = 0; + [Tooltip("How fast the target IK position adjusts to the ground. Use smaller values to prevent snapping")] + public float adjustSpeed = 5; +#endif + + + Vector3 rayOrigin; + Vector3 rayDir = new Vector3(0, -1, 0); + float hitY; + float lastHitY; + + protected override void OnEnable () { + base.OnEnable(); + } + + protected override void OnDisable () { + base.OnDisable(); + } + + public override void DoUpdate () { + rayOrigin = transform.position + new Vector3(castOffset, castDistance, 0); + + hitY = float.MinValue; + if (use2D) { + RaycastHit2D hit; + + if (useRadius) { +#if UNITY_4_3 + //NOTE: Unity 4.3.x does not have CircleCast + hit = Physics2D.Raycast(rayOrigin , rayDir, castDistance + groundOffset, groundMask); +#else + hit = Physics2D.CircleCast(rayOrigin, castRadius, rayDir, castDistance + groundOffset, groundMask); +#endif + } else { + hit = Physics2D.Raycast(rayOrigin, rayDir, castDistance + groundOffset, groundMask); + } + + if (hit.collider != null) { + hitY = hit.point.y + groundOffset; + if (Application.isPlaying) { + hitY = Mathf.MoveTowards(lastHitY, hitY, adjustSpeed * Time.deltaTime); + } + } else { + if (Application.isPlaying) + hitY = Mathf.MoveTowards(lastHitY, transform.position.y, adjustSpeed * Time.deltaTime); + } + } else { + RaycastHit hit; + bool validHit = false; + + if (useRadius) { + validHit = Physics.SphereCast(rayOrigin, castRadius, rayDir, out hit, castDistance + groundOffset, groundMask); + } else { + validHit = Physics.Raycast(rayOrigin, rayDir, out hit, castDistance + groundOffset, groundMask); + } + + if (validHit) { + hitY = hit.point.y + groundOffset; + if (Application.isPlaying) { + hitY = Mathf.MoveTowards(lastHitY, hitY, adjustSpeed * Time.deltaTime); + } + } else { + if (Application.isPlaying) + hitY = Mathf.MoveTowards(lastHitY, transform.position.y, adjustSpeed * Time.deltaTime); + } + } + + Vector3 v = transform.position; + v.y = Mathf.Clamp(v.y, Mathf.Min(lastHitY, hitY), float.MaxValue); + transform.position = v; + + utilBone.bone.X = transform.localPosition.x; + utilBone.bone.Y = transform.localPosition.y; + + lastHitY = hitY; + } + + void OnDrawGizmos () { + Vector3 hitEnd = rayOrigin + (rayDir * Mathf.Min(castDistance, rayOrigin.y - hitY)); + Vector3 clearEnd = rayOrigin + (rayDir * castDistance); + Gizmos.DrawLine(rayOrigin, hitEnd); + + if (useRadius) { + Gizmos.DrawLine(new Vector3(hitEnd.x - castRadius, hitEnd.y - groundOffset, hitEnd.z), new Vector3(hitEnd.x + castRadius, hitEnd.y - groundOffset, hitEnd.z)); + Gizmos.DrawLine(new Vector3(clearEnd.x - castRadius, clearEnd.y, clearEnd.z), new Vector3(clearEnd.x + castRadius, clearEnd.y, clearEnd.z)); + } + + Gizmos.color = Color.red; + Gizmos.DrawLine(hitEnd, clearEnd); + } +} diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityGroundConstraint.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityGroundConstraint.cs.meta new file mode 100644 index 000000000..5d9e6920c --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityGroundConstraint.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3662334b99de5fe4396ab24e30c4fd12 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityKinematicShadow.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityKinematicShadow.cs new file mode 100644 index 000000000..c088353f2 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityKinematicShadow.cs @@ -0,0 +1,79 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +public class SkeletonUtilityKinematicShadow : MonoBehaviour { + public bool hideShadow = true; + Dictionary shadowTable; + GameObject shadowRoot; + + void Start () { + shadowRoot = (GameObject)Instantiate(gameObject); + if (hideShadow) + shadowRoot.hideFlags = HideFlags.HideInHierarchy; + + shadowRoot.transform.parent = transform.root; + + shadowTable = new Dictionary(); + + Destroy(shadowRoot.GetComponent()); + + shadowRoot.transform.position = transform.position; + shadowRoot.transform.rotation = transform.rotation; + + Vector3 scaleRef = transform.TransformPoint(Vector3.right); + float scale = Vector3.Distance(transform.position, scaleRef); + shadowRoot.transform.localScale = Vector3.one; + + var shadowJoints = shadowRoot.GetComponentsInChildren(); + foreach (Joint j in shadowJoints) { + j.connectedAnchor *= scale; + } + + var joints = GetComponentsInChildren(); + foreach (var j in joints) + Destroy(j); + + var rbs = GetComponentsInChildren(); + foreach (var rb in rbs) + Destroy(rb); + + var colliders = GetComponentsInChildren(); + foreach (var c in colliders) + Destroy(c); + + + //match by bone name + var shadowBones = shadowRoot.GetComponentsInChildren(); + var bones = GetComponentsInChildren(); + + //build bone lookup + foreach (var b in bones) { + if (b.gameObject == gameObject) + continue; + + foreach (var sb in shadowBones) { + if (sb.rigidbody == null) + continue; + + if (sb.boneName == b.boneName) { + shadowTable.Add(sb.transform, b.transform); + break; + } + } + } + + foreach (var b in shadowBones) + Destroy(b); + } + + void FixedUpdate () { + shadowRoot.rigidbody.MovePosition(transform.position); + shadowRoot.rigidbody.MoveRotation(transform.rotation); + + foreach (var pair in shadowTable) { + pair.Value.localPosition = pair.Key.localPosition; + pair.Value.localRotation = pair.Key.localRotation; + } + } +} \ No newline at end of file diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityKinematicShadow.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityKinematicShadow.cs.meta new file mode 100644 index 000000000..06bcb6f4a --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilityKinematicShadow.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cfeac06b8a6aa1645813700e3e4c0863 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilitySubmeshRenderer.cs b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilitySubmeshRenderer.cs new file mode 100644 index 000000000..fc8867e6b --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilitySubmeshRenderer.cs @@ -0,0 +1,96 @@ +using UnityEngine; +using System.Collections; + +[ExecuteInEditMode] +public class SkeletonUtilitySubmeshRenderer : MonoBehaviour { + public Renderer parentRenderer; + [System.NonSerialized] + public Mesh mesh; + public int submeshIndex = 0; + public int sortingOrder = 0; + public int sortingLayerID = 0; + public Material hiddenPassMaterial; + Renderer cachedRenderer; + MeshFilter filter; + Material[] sharedMaterials; + MeshFilter parentFilter; + + void Awake () { + cachedRenderer = renderer; + sharedMaterials = cachedRenderer.sharedMaterials; + filter = GetComponent(); + + if (parentRenderer != null) + Initialize(parentRenderer); + } + + void OnEnable () { + parentRenderer = transform.parent.GetComponent(); + parentRenderer.GetComponent().OnReset += HandleSkeletonReset; + } + + void OnDisable () { + parentRenderer.GetComponent().OnReset -= HandleSkeletonReset; + } + + void HandleSkeletonReset (SkeletonRenderer r) { + if (parentRenderer != null) + Initialize(parentRenderer); + } + + public void Initialize (Renderer parentRenderer) { + this.parentRenderer = parentRenderer; + parentFilter = parentRenderer.GetComponent(); + mesh = parentFilter.sharedMesh; + filter.sharedMesh = mesh; + Debug.Log("Mesh: " + mesh); + } + + public void Update () { + if (mesh == null || mesh != parentFilter.sharedMesh) { + mesh = parentFilter.sharedMesh; + filter.sharedMesh = mesh; + } + + if (cachedRenderer == null) + cachedRenderer = renderer; + + if (mesh == null || submeshIndex > mesh.subMeshCount - 1) { + cachedRenderer.enabled = false; + return; + } else { + renderer.enabled = true; + } + + bool changed = false; + + if (sharedMaterials.Length != parentRenderer.sharedMaterials.Length) { + sharedMaterials = parentRenderer.sharedMaterials; + changed = true; + } + + + + for (int i = 0; i < renderer.sharedMaterials.Length; i++) { + if (i == submeshIndex) + continue; + + if (sharedMaterials[i] != hiddenPassMaterial) { + sharedMaterials[i] = hiddenPassMaterial; + changed = true; + } + } + + if (sharedMaterials[submeshIndex] != parentRenderer.sharedMaterials[submeshIndex]) { + sharedMaterials[submeshIndex] = parentRenderer.sharedMaterials[submeshIndex]; + changed = true; + } + + if (changed) { + cachedRenderer.sharedMaterials = sharedMaterials; + } + + cachedRenderer.sortingLayerID = sortingLayerID; + cachedRenderer.sortingOrder = sortingOrder; + } +} diff --git a/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilitySubmeshRenderer.cs.meta b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilitySubmeshRenderer.cs.meta new file mode 100644 index 000000000..168ca8811 --- /dev/null +++ b/spine-tk2d/Assets/spine-tk2d/SkeletonUtility/SkeletonUtilitySubmeshRenderer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7820c1c2b0e52c6408de899d6939996e +MonoImporter: + serializedVersion: 2 + defaultReferences: + - parentRenderer: {instanceID: 0} + - mesh: {instanceID: 0} + - hiddenPassMaterial: {fileID: 2100000, guid: 43227e5adadc6f24bb4bf74b92a56fb4, + type: 2} + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/spine-tk2d/README.md b/spine-tk2d/README.md index 67ada4e58..4713b3f73 100644 --- a/spine-tk2d/README.md +++ b/spine-tk2d/README.md @@ -2,9 +2,25 @@ The spine-tk2d runtime provides functionality to load, manipulate and render [Spine](http://esotericsoftware.com) skeletal animation data using [2D Toolkit](http://www.unikronsoftware.com/2dtoolkit/) for [Unity](http://unity3d.com/). spine-tk2d is based on [spine-csharp](https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-csharp) and is very similar to [spine-unity](https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-unity). -A Spine skeleton is a GameObject and can be used throughout Unity like any other GameObject. The `BoneComponent` class allows other GameObjects to follow a bone in a Spine skeleton. +A Spine skeleton is a GameObject and can be used throughout Unity like any other GameObject. It depends only on Unity's `MeshRenderer`, so it is close to the metal. `SkeletonUtility` allows other GameObjects to interact with the Spine skeleton, to control bones in the skeleton, be controlled by the skeleton, attach colliders, etc. -## Setup +spine-tk2d differs from spine-unity in that a TK2D atlas is used instead of a Spine atlas. Also, spine-unity has more tools for automatically importing Spine skeleton data and atlases, while spine-tk2d requires setting up the TK2D manually. spine-unity provides a GameObject that renders a Spine skeleton, so can be used with TK2D (or any other Unity plugin). + +## Documentation + +The [spine-tk2d video](https://www.youtube.com/watch?v=7dg9slk9mxA) shows some differences between spine-tk2d and spine-unity. Except for setting up the texture atlas, everything in spine-tk2d works the same as spine-unity. The [Spine Unity Examples](http://esotericsoftware.com/forum/viewtopic.php?f=3&t=3318) forum thread has many videos on how to use both spine-unity and spine-tk2d features. + +## Quick installation + +Download and run this Unity package: + +[spine-tk2d.unitypackage](http://esotericsoftware.com/files/runtimes/unity/spine-tk2d.unitypackage) + +In the `Assets/examples` folder you will find example scenes that demonstrate various spine-tk2d features. Also see the example scenes in [spine-unity](https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-unity). + +## Manual installation + +To open the spine-tk2d example scenes: 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). 1. Copy the contents of `spine-csharp/src` to `spine-tk2d/Assets/spine-csharp`. @@ -17,11 +33,7 @@ To use spine-tk2d in your own Unity project: 1. Copy the `spine-tk2d/Assets/spine-tk2d` to `Assets/spine-tk2d` in your project. 1. Import 2D Toolkit into your project. -## Examples - -* **spineboy** This shows the spineboy skeleton with shadows. First an animation is played that shows the draw order changing and events firing, then spineboy jumps and walks. Click spineboy to jump again. Notice the walk and jump animations are mixed and transition smoothly. The white cube on spineboy's right hand is a separate GameObject that is positioned using a `BoneComponent`. - ## Notes - Atlas images should use premultiplied alpha when using the shaders that come with spine-tk2d. -- This slightly outdated [spine-tk2d setup video](http://www.youtube.com/watch?v=dnQbS9ap-i8) may still be useful. +- This slightly outdated [spine-tk2d setup video](http://www.youtube.com/watch?v=dnQbS9ap-i8) may still be useful for manual installation. diff --git a/spine-turbulenz/README.md b/spine-turbulenz/README.md index 9501634ea..de2fde28f 100644 --- a/spine-turbulenz/README.md +++ b/spine-turbulenz/README.md @@ -14,3 +14,7 @@ To run the example: - [spine-turbulenz Demo](http://esotericsoftware.com/spine/files/demos/turbulenz/example/index.html) [spine-turbulenz Demo source](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-turbulenz/example/index.html#L21) + +## Notes + +- Atlas images should not use premultiplied alpha or rotation. diff --git a/spine-turbulenz/example/data/hero.atlas b/spine-turbulenz/example/data/hero.atlas new file mode 100644 index 000000000..1c0922303 --- /dev/null +++ b/spine-turbulenz/example/data/hero.atlas @@ -0,0 +1,139 @@ + +hero.png +size: 512,256 +format: RGBA8888 +filter: Linear,Linear +repeat: none +body + rotate: false + xy: 176, 81 + size: 97, 95 + orig: 97, 95 + offset: 0, 0 + index: -1 +eyes + rotate: false + xy: 181, 48 + size: 82, 31 + orig: 82, 31 + offset: 0, 0 + index: -1 +fingers + rotate: false + xy: 458, 155 + size: 31, 33 + orig: 31, 33 + offset: 0, 0 + index: -1 +foot1 + rotate: false + xy: 236, 4 + size: 50, 42 + orig: 50, 42 + offset: 0, 0 + index: -1 +foot2 + rotate: false + xy: 181, 8 + size: 53, 38 + orig: 53, 38 + offset: 0, 0 + index: -1 +forearm1 + rotate: false + xy: 288, 5 + size: 41, 49 + orig: 41, 49 + offset: 0, 0 + index: -1 +forearm2 + rotate: false + xy: 425, 111 + size: 31, 32 + orig: 31, 32 + offset: 0, 0 + index: -1 +hand1 + rotate: false + xy: 386, 128 + size: 37, 48 + orig: 37, 48 + offset: 0, 0 + index: -1 +hand2 + rotate: false + xy: 425, 145 + size: 31, 37 + orig: 31, 37 + offset: 0, 0 + index: -1 +head + rotate: false + xy: 2, 74 + size: 172, 173 + orig: 172, 173 + offset: 0, 0 + index: -1 +mantles + rotate: false + xy: 2, 17 + size: 136, 55 + orig: 136, 55 + offset: 0, 0 + index: -1 +mouth + rotate: false + xy: 2, 2 + size: 61, 13 + orig: 61, 13 + offset: 0, 0 + index: -1 +shin1 + rotate: false + xy: 456, 190 + size: 53, 57 + orig: 53, 57 + offset: 0, 0 + index: -1 +shin2 + rotate: false + xy: 275, 56 + size: 51, 54 + orig: 51, 54 + offset: 0, 0 + index: -1 +sword + rotate: false + xy: 176, 178 + size: 216, 69 + orig: 216, 69 + offset: 0, 0 + index: -1 +thigh1 + rotate: false + xy: 394, 184 + size: 60, 63 + orig: 60, 63 + offset: 0, 0 + index: -1 +thigh2 + rotate: false + xy: 275, 112 + size: 57, 64 + orig: 57, 64 + offset: 0, 0 + index: -1 +upperarm1 + rotate: false + xy: 334, 120 + size: 50, 56 + orig: 50, 56 + offset: 0, 0 + index: -1 +upperarm2 + rotate: false + xy: 140, 13 + size: 39, 59 + orig: 39, 59 + offset: 0, 0 + index: -1 diff --git a/spine-turbulenz/example/data/hero.json b/spine-turbulenz/example/data/hero.json new file mode 100644 index 000000000..5ceec665d --- /dev/null +++ b/spine-turbulenz/example/data/hero.json @@ -0,0 +1 @@ +{"skeleton":{"hash":"/c595Zn6OYuZT0GEQ7y1piry/xk","spine":"Dev","width":319.29,"height":337.01},"bones":[{"name":"root"},{"name":"Hip","parent":"root","y":94.88},{"name":"L_Ground","parent":"root","x":-31.28,"y":0.26},{"name":"LookTarget","parent":"root","x":112.83,"y":218.2},{"name":"R_Ground","parent":"root","x":28.11,"y":0.26},{"name":"L_Ankle","parent":"L_Ground","x":0.26,"y":33.05},{"name":"LookConstraintGoal","parent":"LookTarget","y":-43.82},{"name":"R_Ankle","parent":"R_Ground","y":31.79},{"name":"body","parent":"Hip","length":60.79,"x":4.09,"y":3.17,"rotation":96.39},{"name":"thigh1","parent":"Hip","length":23.94,"x":-17.51,"y":-5.22,"rotation":-107.07},{"name":"thigh2","parent":"Hip","length":23.65,"x":21.85,"y":-5.86,"rotation":-85.46},{"name":"head","parent":"body","length":24.35,"x":74.55,"y":-4.84,"rotation":-92.69},{"name":"mantles","parent":"body","x":48.47,"y":-9,"rotation":-2.25},{"name":"shin1","parent":"thigh1","length":28.23,"x":29.76,"y":-0.91,"rotation":10.26},{"name":"shin2","parent":"thigh2","length":25.35,"x":31.99,"y":2.96,"rotation":-2.25},{"name":"upperarm1","parent":"body","length":19.35,"x":52.49,"y":41.84,"rotation":130.11},{"name":"upperarm2","parent":"body","length":25.98,"x":57.94,"y":-38.93,"rotation":-178.95},{"name":"foot1","parent":"shin1","length":27.07,"x":28.17,"y":-0.48,"rotation":-90.96,"inheritRotation":false},{"name":"foot2","parent":"shin2","length":22.28,"x":25.54,"y":0.27,"rotation":-90.42,"inheritRotation":false},{"name":"forearm1","parent":"upperarm1","length":22.06,"x":23.97,"y":5.16,"rotation":30.56},{"name":"forearm2","parent":"upperarm2","length":15.3,"x":28.74,"y":-0.9,"rotation":6.79},{"name":"hand1","parent":"forearm1","length":28.01,"x":27.54,"y":0.44,"rotation":16.24},{"name":"hand2","parent":"forearm2","length":23.76,"x":22.8,"y":-0.21,"rotation":1.35},{"name":"weapon","parent":"hand2","length":157.4,"x":15.97,"y":1.43,"rotation":77.9}],"ik":[{"name":"L_Leg","bones":["thigh1","shin1"],"target":"L_Ankle","bendPositive":false},{"name":"R_Leg","bones":["thigh2","shin2"],"target":"R_Ankle","bendPositive":false},{"name":"LookConstraint","bones":["head"],"target":"LookConstraintGoal","mix":0}],"slots":[{"name":"upperarm2","bone":"upperarm2","attachment":"upperarm2"},{"name":"sword","bone":"root"},{"name":"hand2","bone":"hand2","attachment":"hand2"},{"name":"weapon","bone":"weapon","attachment":"sword"},{"name":"fingers","bone":"hand2","attachment":"fingers"},{"name":"forearm2","bone":"forearm2","attachment":"forearm2"},{"name":"thigh2","bone":"thigh2","attachment":"thigh2"},{"name":"foot2","bone":"foot2","attachment":"foot2"},{"name":"shin2","bone":"shin2","attachment":"shin2"},{"name":"thigh1","bone":"thigh1","attachment":"thigh1"},{"name":"foot1","bone":"foot1","attachment":"foot1"},{"name":"body","bone":"body","attachment":"body"},{"name":"shin1","bone":"shin1","attachment":"shin1"},{"name":"upperarm1","bone":"upperarm1","attachment":"upperarm1"},{"name":"mantles","bone":"mantles","attachment":"mantles"},{"name":"head","bone":"head","attachment":"head"},{"name":"mouth","bone":"head","attachment":"mouth"},{"name":"eyes","bone":"head","attachment":"eyes"},{"name":"forearm1","bone":"forearm1","attachment":"forearm1"},{"name":"hand1","bone":"hand1","attachment":"hand1"}],"skins":{"default":{"body":{"body":{"x":33.81,"y":2.59,"rotation":-92.7,"width":97,"height":95}},"eyes":{"eyes":{"x":6.48,"y":50.75,"rotation":0.12,"width":82,"height":31}},"fingers":{"fingers":{"x":16.21,"y":1.37,"rotation":82.36,"width":31,"height":33}},"foot1":{"foot1":{"x":12.55,"y":0.12,"rotation":90.96,"width":50,"height":42}},"foot2":{"foot2":{"x":8.83,"y":2.92,"rotation":90.42,"width":53,"height":38}},"forearm1":{"forearm1":{"x":11.88,"y":-5.04,"rotation":106.61,"width":41,"height":49}},"forearm2":{"forearm2":{"x":13.08,"y":-0.63,"rotation":83.71,"width":31,"height":32}},"hand1":{"hand1":{"x":11.92,"y":-0.7,"rotation":90.37,"width":37,"height":48}},"hand2":{"hand2":{"x":14.23,"y":1.64,"rotation":82.36,"width":31,"height":37}},"head":{"head":{"x":7.79,"y":71.87,"rotation":0.12,"width":172,"height":173}},"mantles":{"mantles":{"x":15.57,"y":11.76,"rotation":-90.45,"width":136,"height":55}},"mouth":{"mouth":{"x":12.07,"y":10.76,"rotation":0.12,"width":61,"height":13}},"shin1":{"shin1":{"x":8.95,"y":0.67,"rotation":96.8,"width":53,"height":57}},"shin2":{"shin2":{"x":2.25,"y":-2.94,"rotation":87.71,"width":51,"height":54}},"thigh1":{"thigh1":{"x":11.98,"y":-1.01,"rotation":107.07,"width":60,"height":63}},"thigh2":{"thigh2":{"x":15.7,"y":-4.61,"rotation":85.46,"width":57,"height":64}},"upperarm1":{"upperarm1":{"x":6.6,"y":0.05,"rotation":137.18,"width":50,"height":56}},"upperarm2":{"upperarm2":{"x":13.32,"y":-2.21,"rotation":90.45,"width":39,"height":59}},"weapon":{"sword":{"x":71.38,"y":0.2,"rotation":0.19,"width":216,"height":69}}}},"events":{"Footstep":{}},"animations":{"Attack":{"bones":{"root":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":-12.6,"y":-11.34},{"time":0.0666,"x":-20.75,"y":-23.08},{"time":0.1333,"x":-15.51,"y":-16.91},{"time":0.2,"x":-5.88,"y":-21.85},{"time":0.2666,"x":-7.08,"y":-25.29},{"time":0.4,"x":-12.6,"y":-11.34}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":51.94,"y":0,"curve":"stepped"},{"time":0.4,"x":51.94,"y":0}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":-67.98,"y":0,"curve":"stepped"},{"time":0.4,"x":-67.98,"y":0}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":2.2},{"time":0.0666,"angle":13.21},{"time":0.1333,"angle":-9.58},{"time":0.2,"angle":-23.58},{"time":0.2666,"angle":-32.14},{"time":0.4,"angle":2.2}],"translate":[{"time":0,"x":-0.76,"y":-1.89},{"time":0.1333,"x":4.86,"y":-0.24},{"time":0.2,"x":8.05,"y":-2.43},{"time":0.4,"x":-0.76,"y":-1.89}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":14.5,"y":-3.78,"curve":"stepped"},{"time":0.4,"x":14.5,"y":-3.78}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":-22.57,"y":1.51},{"time":0.2,"x":-13.26,"y":-2.4},{"time":0.4,"x":-22.57,"y":1.51}]},"head":{"rotate":[{"time":0,"angle":-19.21},{"time":0.0666,"angle":-19.17},{"time":0.1333,"angle":4.76},{"time":0.2,"angle":12.46},{"time":0.2666,"angle":12.57},{"time":0.4,"angle":-19.21}],"translate":[{"time":0,"x":0,"y":0},{"time":0.0666,"x":3.47,"y":5.7},{"time":0.2,"x":-4.55,"y":-12.27},{"time":0.4,"x":0,"y":0}]},"mantles":{"rotate":[{"time":0,"angle":-8.27},{"time":0.0666,"angle":5.32},{"time":0.1333,"angle":4.8},{"time":0.2,"angle":-2.43},{"time":0.2666,"angle":-12.35},{"time":0.4,"angle":-8.27}],"translate":[{"time":0,"x":0,"y":0},{"time":0.0666,"x":5.51,"y":-5.45},{"time":0.1333,"x":1.53,"y":-5.87},{"time":0.2,"x":0.46,"y":-6.11},{"time":0.2666,"x":-6.55,"y":-4.72},{"time":0.4,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":-4.05},{"time":0.0666,"angle":33.65},{"time":0.1333,"angle":-3.75},{"time":0.2666,"angle":-49.64},{"time":0.3333,"angle":-42.31},{"time":0.4,"angle":-4.05}],"translate":[{"time":0,"x":0,"y":0},{"time":0.2,"x":-2.5,"y":-6.51},{"time":0.4,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":324.46},{"time":0.0666,"angle":101.05},{"time":0.1333,"angle":49.05},{"time":0.2,"angle":15.11},{"time":0.2666,"angle":313.18},{"time":0.4,"angle":324.46}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":-2.1,"y":-8.13},{"time":0.2,"x":-10.56,"y":1.25},{"time":0.4,"x":0,"y":0}]},"foot1":{"rotate":[{"time":0,"angle":8.9,"curve":"stepped"},{"time":0.4,"angle":8.9}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":-13.11,"curve":"stepped"},{"time":0.4,"angle":-13.11}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":7.93},{"time":0.0666,"angle":42.3},{"time":0.1333,"angle":21.87},{"time":0.3333,"angle":43.27},{"time":0.4,"angle":7.93}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":56.31},{"time":0.0666,"angle":87.62},{"time":0.1333,"angle":6.51},{"time":0.2,"angle":1},{"time":0.2666,"angle":45.14},{"time":0.4,"angle":56.31}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":0},{"time":0.1333,"angle":-8.94},{"time":0.2666,"angle":-20.79},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":17.89},{"time":0.0666,"angle":-12.89},{"time":0.1333,"angle":-11.39},{"time":0.2,"angle":6.2},{"time":0.2666,"angle":18.96},{"time":0.4,"angle":17.89}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.4,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.4,"x":0,"y":0}]}}},"Crouch":{"bones":{"upperarm2":{"rotate":[{"time":0,"angle":38.03},{"time":0.5,"angle":30.8},{"time":1,"angle":38.03}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":-15.51,"curve":[0.25,0,0.75,1]},{"time":0.5,"angle":-11.54,"curve":[0.25,0,0.75,1]},{"time":1,"angle":-15.51}],"translate":[{"time":0,"x":-0.41,"y":-2.32,"curve":[0.25,0,0.75,1]},{"time":0.5,"x":-2.2,"y":-0.53,"curve":[0.25,0,0.75,1]},{"time":1,"x":-0.41,"y":-2.32}]},"head":{"rotate":[{"time":0,"angle":8.72},{"time":0.5,"angle":3.24},{"time":1,"angle":8.72}],"translate":[{"time":0,"x":-4.42,"y":-2.85,"curve":[0.361,0.63,0.697,1]},{"time":0.1666,"x":-4.84,"y":-3.05,"curve":[0.25,0,0.75,1]},{"time":0.6666,"x":-2.35,"y":-1.86,"curve":[0.36,0.43,0.701,0.8]},{"time":1,"x":-4.42,"y":-2.85}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-11.22,"y":-42.01,"curve":"stepped"},{"time":1,"x":-11.22,"y":-42.01}]},"mantles":{"rotate":[{"time":0,"angle":9.04},{"time":0.5,"angle":7.13},{"time":1,"angle":9.04}],"translate":[{"time":0,"x":-0.09,"y":0,"curve":"stepped"},{"time":1,"x":-0.09,"y":0}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-29.07,"y":1.18,"curve":"stepped"},{"time":1,"x":-29.07,"y":1.18}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":16.23,"y":0,"curve":"stepped"},{"time":1,"x":16.23,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":-5.42},{"time":0.5,"angle":-11.1},{"time":1,"angle":-5.42}],"translate":[{"time":0,"x":-6.94,"y":5.85,"curve":"stepped"},{"time":1,"x":-6.94,"y":5.85}]},"forearm1":{"rotate":[{"time":0,"angle":25.38},{"time":0.5,"angle":32.07},{"time":1,"angle":25.38}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":18.6},{"time":0.5,"angle":26.15},{"time":1,"angle":18.6}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-2.75,"y":0,"curve":"stepped"},{"time":1,"x":-2.75,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-0.92,"y":6.67,"curve":"stepped"},{"time":1,"x":-0.92,"y":6.67}]},"foot1":{"rotate":[{"time":0,"angle":270.13,"curve":"stepped"},{"time":1,"angle":270.13}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":-13.39},{"time":0.5,"angle":-17.28},{"time":1,"angle":-13.39}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":-9.29},{"time":0.5,"angle":-1.97},{"time":1,"angle":-9.29}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":-4.92,"curve":"stepped"},{"time":1,"x":0,"y":-4.92}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":-12.22,"curve":"stepped"},{"time":1,"x":0,"y":-12.22}]}}},"Fall":{"bones":{"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":13.15,"y":7.94,"curve":"stepped"},{"time":1,"x":13.15,"y":7.94}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":35.34,"y":4.14,"curve":"stepped"},{"time":1,"x":35.34,"y":4.14}]},"foot1":{"rotate":[{"time":0,"angle":19.62,"curve":"stepped"},{"time":1,"angle":19.62}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":39.16,"curve":"stepped"},{"time":1,"angle":39.16}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":14.13,"curve":"stepped"},{"time":1,"angle":14.13}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"head":{"rotate":[{"time":0,"angle":-17.81,"curve":"stepped"},{"time":1,"angle":-17.81}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":-25.71,"curve":"stepped"},{"time":1,"angle":-25.71}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":26.18,"curve":"stepped"},{"time":1,"angle":26.18}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":37.75,"curve":"stepped"},{"time":1,"angle":37.75}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":12.3,"curve":"stepped"},{"time":1,"angle":12.3}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"mantles":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]}}},"Idle":{"bones":{"upperarm2":{"rotate":[{"time":0,"angle":0.46},{"time":0.5,"angle":358.79},{"time":1,"angle":0.46}],"translate":[{"time":0,"x":0,"y":0},{"time":0.5,"x":-3.12,"y":8.02},{"time":1,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":0},{"time":0.5,"angle":1.66},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":[0.25,0,0.75,1]},{"time":0.5,"x":0,"y":-3.7,"curve":[0.25,0,0.75,1]},{"time":1,"x":0,"y":0}]},"head":{"rotate":[{"time":0,"angle":-4.18},{"time":0.5,"angle":-8.25},{"time":1,"angle":-4.18}],"translate":[{"time":0,"x":-1.06,"y":0,"curve":[0.382,0.57,0.735,1]},{"time":0.1666,"x":0,"y":0,"curve":[0.25,0,0.75,1]},{"time":0.6666,"x":-3.74,"y":0,"curve":[0.243,0,0.648,0.6]},{"time":1,"x":-1.06,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":-2.92,"curve":[0.25,0,0.75,1]},{"time":0.5,"x":-3.18,"y":-4.03,"curve":[0.25,0,0.75,1]},{"time":1,"x":0,"y":-2.92}]},"mantles":{"rotate":[{"time":0,"angle":0},{"time":0.4333,"angle":-4.83,"curve":[0.25,0,0.75,1]},{"time":1,"angle":0}],"translate":[{"time":0,"x":-0.09,"y":0,"curve":[0.3,0.21,0.755,1]},{"time":0.4333,"x":-1.41,"y":0,"curve":[0.25,0,0.75,1]},{"time":0.9333,"x":0,"y":0},{"time":1,"x":-0.09,"y":0}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-7.15,"y":0,"curve":"stepped"},{"time":1,"x":-7.15,"y":0}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":5.94,"y":0,"curve":"stepped"},{"time":1,"x":5.94,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":0,"curve":[0.404,0,0.75,1]},{"time":0.5,"angle":-15.4,"curve":[0.516,0,0.75,1]},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":[0.404,0,0.75,1]},{"time":0.5,"x":1.84,"y":-5,"curve":[0.516,0,0.75,1]},{"time":1,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":0,"curve":[0.404,0,0.75,1]},{"time":0.5,"angle":9.63,"curve":[0.516,0,0.75,1]},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":0},{"time":0.5,"angle":13.63},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":0},{"time":0.5,"angle":-8.65},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":0,"curve":[0.404,0,0.75,1]},{"time":0.5,"angle":12.36,"curve":[0.516,0,0.75,1]},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]}}},"Jump":{"bones":{"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":-6.83,"y":12.06,"curve":"stepped"},{"time":1,"x":-6.83,"y":12.06}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":2.41,"y":1.2,"curve":"stepped"},{"time":1,"x":2.41,"y":1.2}]},"foot1":{"rotate":[{"time":0,"angle":-32.23,"curve":"stepped"},{"time":1,"angle":-32.23}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":-33.3,"curve":"stepped"},{"time":1,"angle":-33.3}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":-10.4,"curve":"stepped"},{"time":1,"angle":-10.4}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"head":{"rotate":[{"time":0,"angle":4.89,"curve":"stepped"},{"time":1,"angle":4.89}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":22.69,"curve":"stepped"},{"time":1,"angle":22.69}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":56.41,"curve":"stepped"},{"time":1,"angle":56.41}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":23.71,"curve":"stepped"},{"time":1,"angle":23.71}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":20.06,"curve":"stepped"},{"time":1,"angle":20.06}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"mantles":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1,"x":0,"y":0}]}}},"Run":{"bones":{"upperarm1":{"rotate":[{"time":0,"angle":-40.45},{"time":0.044,"angle":-34.97},{"time":0.0881,"angle":1.79},{"time":0.1322,"angle":42.58},{"time":0.3117,"angle":-282.55},{"time":0.3525,"angle":48.21},{"time":0.3966,"angle":26.17},{"time":0.4407,"angle":-22.81},{"time":0.5333,"angle":-40.45}],"translate":[{"time":0,"x":0,"y":0},{"time":0.044,"x":1.33,"y":0.56},{"time":0.1762,"x":-2.74,"y":-5.58},{"time":0.3117,"x":-3.1,"y":-2.45},{"time":0.4407,"x":-0.75,"y":4.05},{"time":0.5333,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":27.41},{"time":0.044,"angle":21.5},{"time":0.0881,"angle":16.71},{"time":0.1322,"angle":30.61},{"time":0.3117,"angle":38.33},{"time":0.3525,"angle":37.81},{"time":0.3966,"angle":16.47},{"time":0.4407,"angle":17.71},{"time":0.5333,"angle":27.41}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":-20.19},{"time":0.044,"angle":-24.82},{"time":0.1762,"angle":-14.29},{"time":0.3525,"angle":21.84},{"time":0.3966,"angle":9.46},{"time":0.4407,"angle":12.08},{"time":0.5333,"angle":-20.19}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":49.53,"y":-0.29},{"time":0.044,"x":39.66,"y":-0.29},{"time":0.0881,"x":-3.63,"y":-0.29},{"time":0.1322,"x":-10.76,"y":-0.29},{"time":0.1762,"x":-16.65,"y":22.09},{"time":0.2203,"x":-10,"y":27.07},{"time":0.2666,"x":-11.26,"y":16.63},{"time":0.3117,"x":12.41,"y":7.75},{"time":0.3525,"x":37.47,"y":7.29},{"time":0.3966,"x":52.33,"y":5.52},{"time":0.4407,"x":68.69,"y":19.42},{"time":0.4848,"x":68.69,"y":7.96},{"time":0.5333,"x":49.53,"y":-0.29}]},"foot1":{"rotate":[{"time":0,"angle":20.27},{"time":0.044,"angle":-0.6},{"time":0.1322,"angle":-31.14},{"time":0.1762,"angle":262.34},{"time":0.2203,"angle":-71.2},{"time":0.2666,"angle":-84.95},{"time":0.3117,"angle":-63.21},{"time":0.3525,"angle":-8.37},{"time":0.3966,"angle":-18.33},{"time":0.4407,"angle":34.08},{"time":0.5333,"angle":20.27}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":-58.44,"y":26.01},{"time":0.044,"x":-42,"y":21.08},{"time":0.0881,"x":-5.28,"y":9.57},{"time":0.1322,"x":11.16,"y":11.76},{"time":0.1762,"x":19.38,"y":26.56},{"time":0.2203,"x":23.89,"y":16.89},{"time":0.2666,"x":21.52,"y":-0.14},{"time":0.3117,"x":-19.32,"y":-0.14},{"time":0.3525,"x":-53.26,"y":0.13},{"time":0.3966,"x":-65.63,"y":6.46},{"time":0.4407,"x":-75.71,"y":39.48},{"time":0.5333,"x":-58.44,"y":26.01}]},"foot2":{"rotate":[{"time":0,"angle":262.95},{"time":0.0881,"angle":-74.33},{"time":0.1322,"angle":-4.26},{"time":0.1762,"angle":13.38},{"time":0.2203,"angle":28.95},{"time":0.2666,"angle":35.05},{"time":0.3117,"angle":7.53},{"time":0.3525,"angle":-31.42},{"time":0.4407,"angle":260.06},{"time":0.5333,"angle":262.95}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"root":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":-8.39},{"time":0.044,"x":1.64,"y":-12.87},{"time":0.0881,"x":1.64,"y":-11.23,"curve":[0.25,0,0.75,1]},{"time":0.1762,"x":1.64,"y":8.97},{"time":0.2203,"x":1.64,"y":-1.1},{"time":0.2666,"x":0,"y":-8.39},{"time":0.3117,"x":0,"y":-10.17},{"time":0.3525,"x":0,"y":-9.45,"curve":[0.25,0,0.75,1]},{"time":0.4407,"x":0,"y":5.78},{"time":0.4848,"x":1.64,"y":-1.1},{"time":0.5333,"x":0,"y":-8.39}]},"L_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1762,"x":-1.45,"y":9.68},{"time":0.5333,"x":0,"y":0}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":-11.15},{"time":0.044,"angle":-16.76},{"time":0.1762,"angle":-8.61},{"time":0.3117,"angle":-20.17},{"time":0.4407,"angle":-8.61},{"time":0.5333,"angle":-11.15}],"translate":[{"time":0,"x":3.36,"y":-2.52},{"time":0.044,"x":4.98,"y":0.87},{"time":0.1762,"x":2.6,"y":4.02},{"time":0.3117,"x":5.73,"y":0.46},{"time":0.4407,"x":2.7,"y":5.1},{"time":0.5333,"x":3.36,"y":-2.52}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":6.02,"y":0},{"time":0.1322,"x":-3.58,"y":1.43},{"time":0.1762,"x":0.23,"y":2.72},{"time":0.2666,"x":6.13,"y":-0.59},{"time":0.3305,"x":8.81,"y":5.77},{"time":0.3966,"x":31,"y":0.35},{"time":0.4848,"x":22.13,"y":0.17},{"time":0.5333,"x":6.02,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":-8.31,"y":-2.37},{"time":0.1322,"x":-3.93,"y":-2.37},{"time":0.2666,"x":3.22,"y":-1.52},{"time":0.3525,"x":-18.12,"y":0.17},{"time":0.3966,"x":-28.38,"y":0.17},{"time":0.5333,"x":-8.31,"y":-2.37}]},"head":{"rotate":[{"time":0,"angle":8.08},{"time":0.044,"angle":1.34,"curve":[0.25,0,0.851,0.81]},{"time":0.1762,"angle":6.45},{"time":0.2666,"angle":10.37},{"time":0.3117,"angle":3.57,"curve":[0.25,0,0.842,0.77]},{"time":0.4407,"angle":7.81},{"time":0.5333,"angle":8.08}],"translate":[{"time":0,"x":2.87,"y":0.23},{"time":0.044,"x":-3.5,"y":-1.82},{"time":0.1762,"x":4.6,"y":0.76},{"time":0.2666,"x":1.55,"y":-6.16},{"time":0.3117,"x":-7.07,"y":-8.66},{"time":0.4407,"x":7.03,"y":0.05},{"time":0.5333,"x":2.87,"y":0.23}]},"mantles":{"rotate":[{"time":0,"angle":0},{"time":0.044,"angle":-2.17},{"time":0.2666,"angle":2.9},{"time":0.3117,"angle":-0.95},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0},{"time":0.044,"x":-2.6,"y":-0.65},{"time":0.2666,"x":1.39,"y":-0.59},{"time":0.3117,"x":-2.6,"y":-0.65},{"time":0.5333,"x":0,"y":0}]},"shin1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"shin2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":30.8},{"time":0.044,"angle":38.3},{"time":0.1322,"angle":5.43},{"time":0.2203,"angle":334.6,"curve":[0.25,0,0.75,1]},{"time":0.3117,"angle":328.38},{"time":0.4407,"angle":21.28},{"time":0.5333,"angle":30.8}],"translate":[{"time":0,"x":-5.33,"y":-1.55},{"time":0.1762,"x":-6.43,"y":2.12},{"time":0.5333,"x":-5.33,"y":-1.55}]},"forearm2":{"rotate":[{"time":0,"angle":35.89},{"time":0.0881,"angle":25.71},{"time":0.1762,"angle":29.3},{"time":0.2203,"angle":34.63,"curve":[0.25,0,0.75,1]},{"time":0.3117,"angle":38.94},{"time":0.4407,"angle":30.09},{"time":0.5333,"angle":35.89}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":8.06},{"time":0.044,"angle":12.45},{"time":0.1762,"angle":33.85},{"time":0.4407,"angle":22.92},{"time":0.5333,"angle":8.06}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]},"weapon":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":0.5333,"angle":0}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":0.5333,"x":0,"y":0}]}},"events":[{"time":0.2666,"name":"Footstep"},{"time":0.5333,"name":"Footstep"}]},"Walk":{"bones":{"L_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":68.76,"y":0},{"time":0.1333,"x":57.43,"y":0},{"time":0.2666,"x":41.05,"y":0},{"time":0.4,"x":21.33,"y":0},{"time":0.5333,"x":5.89,"y":0},{"time":0.6666,"x":4.91,"y":0},{"time":0.8,"x":5.89,"y":10.31},{"time":0.9333,"x":44.68,"y":10.8},{"time":1.0666,"x":68.76,"y":0}]},"thigh1":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":24.92,"y":0},{"time":0.2666,"x":22.2,"y":0},{"time":0.4,"x":21.75,"y":-1.01},{"time":0.5333,"x":21.29,"y":0},{"time":0.6666,"x":16.1,"y":1},{"time":0.9333,"x":21.7,"y":-3.92},{"time":1.0666,"x":24.92,"y":0}]},"Hip":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":0,"y":-7.39},{"time":0.1333,"x":0,"y":-6.32},{"time":0.2666,"x":0,"y":-1.44},{"time":0.3333,"x":0,"y":1.49},{"time":0.4,"x":0,"y":0.87},{"time":0.5333,"x":0,"y":-9.59},{"time":0.6666,"x":0,"y":-8.44},{"time":0.8,"x":0,"y":-1.44},{"time":0.8666,"x":0,"y":1.49},{"time":0.9333,"x":0,"y":0.87},{"time":1.0666,"x":0,"y":-7.39}]},"foot1":{"rotate":[{"time":0,"angle":17.4},{"time":0.1333,"angle":-0.28},{"time":0.4,"angle":-10.63},{"time":0.5333,"angle":-8.71},{"time":0.6666,"angle":-24.7},{"time":0.8,"angle":-43.24},{"time":0.9333,"angle":-35.2},{"time":1.0666,"angle":17.4}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"thigh2":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":-25.09,"y":0},{"time":0.2,"x":-16.15,"y":-4.51},{"time":0.4,"x":-9.43,"y":-3.48},{"time":0.5333,"x":-4.25,"y":-1.41},{"time":0.6666,"x":-6.64,"y":0.04},{"time":0.8,"x":-11.55,"y":-2.12},{"time":0.9333,"x":-22.84,"y":-3.88},{"time":1.0666,"x":-25.09,"y":0}]},"R_Ground":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":-53.9,"y":0},{"time":0.1333,"x":-55,"y":2.56},{"time":0.2666,"x":-56,"y":14.27},{"time":0.4,"x":-9.55,"y":9.63},{"time":0.5333,"x":18.47,"y":-0.26},{"time":0.6666,"x":6.23,"y":-0.26},{"time":0.8,"x":-20.75,"y":-0.26},{"time":0.9333,"x":-36.46,"y":-3.45},{"time":1.0666,"x":-53.9,"y":0}]},"foot2":{"rotate":[{"time":0,"angle":-20},{"time":0.1333,"angle":-36.58},{"time":0.2666,"angle":-69.51},{"time":0.4,"angle":-13.92},{"time":0.5333,"angle":33.26},{"time":0.6666,"angle":0.41},{"time":0.9333,"angle":-1.16},{"time":1.0666,"angle":-20}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"upperarm1":{"rotate":[{"time":0,"angle":13.97},{"time":0.1333,"angle":2.64},{"time":0.5333,"angle":-293.8},{"time":0.6666,"angle":-302.37},{"time":0.8,"angle":41.55},{"time":0.9333,"angle":14.48},{"time":1.0666,"angle":13.97}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":4.42,"y":3.57},{"time":0.5333,"x":-0.22,"y":-4.77},{"time":0.6666,"x":0.24,"y":-2.39},{"time":1.0666,"x":0,"y":0}]},"forearm1":{"rotate":[{"time":0,"angle":-11.7},{"time":0.1333,"angle":-5.73},{"time":0.5333,"angle":24.76},{"time":0.6666,"angle":33.27,"curve":[0.25,0,0.75,1]},{"time":0.8,"angle":3.08},{"time":0.9333,"angle":5.39},{"time":1.0666,"angle":-11.7}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"hand1":{"rotate":[{"time":0,"angle":-19.62},{"time":0.1333,"angle":-25.06},{"time":0.2666,"angle":-27.67},{"time":0.4,"angle":-34.31},{"time":0.5333,"angle":-24.05},{"time":0.8,"angle":16.76},{"time":0.9333,"angle":7.44},{"time":1.0666,"angle":-19.62}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"body":{"rotate":[{"time":0,"angle":2.18},{"time":0.1333,"angle":-2.56,"curve":[0.464,0,0.75,1]},{"time":0.3333,"angle":4.73},{"time":0.5333,"angle":0.29},{"time":0.6666,"angle":-2.56,"curve":[0.464,0,0.75,1]},{"time":0.8666,"angle":3.59},{"time":1.0666,"angle":2.18}],"translate":[{"time":0,"x":10.86,"y":-1.14},{"time":0.1333,"x":10.48,"y":-2.93},{"time":0.3333,"x":1.78,"y":5.09},{"time":0.5333,"x":12.04,"y":-2.64},{"time":0.6666,"x":10.48,"y":-2.93},{"time":0.8666,"x":1.78,"y":6.43},{"time":1.0666,"x":10.86,"y":-1.14}]},"head":{"rotate":[{"time":0,"angle":-11.7},{"time":0.1333,"angle":-2.87},{"time":0.3333,"angle":-10.46},{"time":0.5333,"angle":-6.46},{"time":0.6666,"angle":-2.85},{"time":0.8666,"angle":-8.52},{"time":1.0666,"angle":-11.7}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":-2.96,"y":-3.42},{"time":0.3333,"x":1.04,"y":0.33},{"time":0.5333,"x":0,"y":0},{"time":0.6666,"x":-2.96,"y":-3.42},{"time":0.8666,"x":1.04,"y":0.33},{"time":1.0666,"x":0,"y":0}]},"upperarm2":{"rotate":[{"time":0,"angle":349.66},{"time":0.1333,"angle":349.79},{"time":0.2666,"angle":343.53},{"time":0.4,"angle":334.09},{"time":0.5333,"angle":327.79},{"time":0.8,"angle":338.53},{"time":0.9333,"angle":354.68},{"time":1.0666,"angle":349.66}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":-0.76,"y":-1.44},{"time":0.5333,"x":-0.19,"y":8.7},{"time":1.0666,"x":0,"y":0}]},"forearm2":{"rotate":[{"time":0,"angle":21.04},{"time":0.1333,"angle":24.41},{"time":0.2666,"angle":-0.81},{"time":0.4,"angle":23.68},{"time":0.5333,"angle":23.61},{"time":0.6666,"angle":25.56},{"time":0.8,"angle":12.55},{"time":0.9333,"angle":-0.27},{"time":1.0666,"angle":21.04}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"hand2":{"rotate":[{"time":0,"angle":-12.1},{"time":0.1333,"angle":-8.87},{"time":0.2666,"angle":13.76},{"time":0.4,"angle":-3.02},{"time":0.5333,"angle":11.48},{"time":0.6666,"angle":5.24},{"time":0.8,"angle":3.93},{"time":0.9333,"angle":0.31},{"time":1.0666,"angle":-12.1}],"translate":[{"time":0,"x":0,"y":0,"curve":"stepped"},{"time":1.0666,"x":0,"y":0}]},"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}]},"L_Ankle":{"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}]},"R_Ankle":{"rotate":[{"time":0,"angle":0,"curve":"stepped"},{"time":1.0666,"angle":0}],"translate":[{"time":0,"x":0,"y":-1.35,"curve":"stepped"},{"time":1.0666,"x":0,"y":-1.35}]},"mantles":{"rotate":[{"time":0,"angle":-3.56},{"time":0.3333,"angle":-8.55},{"time":0.5333,"angle":-6.73},{"time":0.8666,"angle":-8.55},{"time":1.0666,"angle":-3.56}],"translate":[{"time":0,"x":0,"y":0},{"time":0.1333,"x":-1.9,"y":-1.47},{"time":0.3333,"x":-0.66,"y":-0.2},{"time":0.6666,"x":-1.9,"y":-1.47},{"time":0.8666,"x":-0.66,"y":-0.2},{"time":1.0666,"x":0,"y":0}]},"shin1":{"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}]},"shin2":{"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}]},"weapon":{"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}]},"LookConstraintGoal":{"rotate":[{"time":0.9333,"angle":0}]}},"events":[{"time":0.5333,"name":"Footstep"},{"time":1.0666,"name":"Footstep"}]}}} \ No newline at end of file diff --git a/spine-turbulenz/example/data/hero.png b/spine-turbulenz/example/data/hero.png new file mode 100644 index 000000000..1a4712def Binary files /dev/null and b/spine-turbulenz/example/data/hero.png differ diff --git a/spine-turbulenz/example/data/spineboy.atlas b/spine-turbulenz/example/data/spineboy.atlas index 1f482c0a1..15b598a2e 100644 --- a/spine-turbulenz/example/data/spineboy.atlas +++ b/spine-turbulenz/example/data/spineboy.atlas @@ -1,166 +1,195 @@ spineboy.png +size: 1024,256 format: RGBA8888 filter: Linear,Linear repeat: none +eye_indifferent + rotate: false + xy: 890, 146 + size: 56, 53 + orig: 56, 53 + offset: 0, 0 + index: -1 +eye_surprised + rotate: false + xy: 444, 5 + size: 56, 53 + orig: 56, 53 + offset: 0, 0 + index: -1 +front_bracer + rotate: false + xy: 966, 103 + size: 35, 48 + orig: 35, 48 + offset: 0, 0 + index: -1 +front_fist_closed + rotate: false + xy: 847, 84 + size: 45, 49 + orig: 45, 49 + offset: 0, 0 + index: -1 +front_fist_open + rotate: false + xy: 968, 190 + size: 52, 52 + orig: 52, 52 + offset: 0, 0 + index: -1 +front_foot + rotate: false + xy: 890, 201 + size: 76, 41 + orig: 76, 41 + offset: 0, 0 + index: -1 +front_foot_bend1 + rotate: false + xy: 444, 98 + size: 77, 42 + orig: 77, 42 + offset: 0, 0 + index: -1 +front_foot_bend2 + rotate: false + xy: 279, 5 + size: 65, 56 + orig: 65, 56 + offset: 0, 0 + index: -1 +front_shin + rotate: false + xy: 792, 132 + size: 49, 110 + orig: 49, 110 + offset: 0, 0 + index: -1 +front_thigh + rotate: false + xy: 935, 77 + size: 29, 67 + orig: 29, 67 + offset: 0, 0 + index: -1 +front_upper_arm + rotate: false + xy: 410, 3 + size: 32, 58 + orig: 32, 58 + offset: 0, 0 + index: -1 +goggles + rotate: false + xy: 444, 142 + size: 157, 100 + orig: 157, 100 + offset: 0, 0 + index: -1 +gun + rotate: false + xy: 603, 120 + size: 126, 122 + orig: 126, 122 + offset: 0, 0 + index: -1 head rotate: false - xy: 1, 122 - size: 121, 132 - orig: 121, 132 + xy: 279, 63 + size: 163, 179 + orig: 163, 179 offset: 0, 0 index: -1 -torso +mouth_grind rotate: false - xy: 1, 28 - size: 68, 92 - orig: 68, 92 + xy: 948, 153 + size: 56, 35 + orig: 56, 35 offset: 0, 0 index: -1 -left-pant-bottom +mouth_oooo rotate: false - xy: 1, 4 - size: 44, 22 - orig: 44, 22 + xy: 731, 97 + size: 56, 35 + orig: 56, 35 offset: 0, 0 index: -1 -right-pant-bottom +mouth_smile rotate: false - xy: 47, 8 - size: 46, 18 - orig: 46, 18 + xy: 789, 95 + size: 56, 35 + orig: 56, 35 offset: 0, 0 index: -1 -right-upper-leg +muzzle rotate: false - xy: 71, 50 - size: 44, 70 - orig: 44, 70 - offset: 0, 0 - index: -1 -pelvis - rotate: false - xy: 95, 1 - size: 63, 47 - orig: 63, 47 - offset: 0, 0 - index: -1 -left-upper-leg - rotate: false - xy: 117, 53 - size: 33, 67 - orig: 33, 67 - offset: 0, 0 - index: -1 -right-foot - rotate: false - xy: 160, 224 - size: 67, 30 - orig: 67, 30 - offset: 0, 0 - index: -1 -left-shoulder - rotate: false - xy: 124, 201 - size: 34, 53 - orig: 34, 53 - offset: 0, 0 - index: -1 -left-ankle - rotate: false - xy: 229, 222 - size: 25, 32 - orig: 25, 32 - offset: 0, 0 - index: -1 -left-foot - rotate: false - xy: 160, 192 - size: 65, 30 - orig: 65, 30 + xy: 2, 2 + size: 275, 240 + orig: 277, 240 offset: 0, 0 index: -1 neck rotate: false - xy: 124, 171 - size: 34, 28 - orig: 34, 28 + xy: 595, 93 + size: 22, 25 + orig: 22, 25 offset: 0, 0 index: -1 -right-arm +rear_bracer rotate: false - xy: 124, 124 - size: 21, 45 - orig: 21, 45 + xy: 966, 58 + size: 34, 43 + orig: 34, 43 offset: 0, 0 index: -1 -right-ankle +rear_foot rotate: false - xy: 227, 190 - size: 25, 30 - orig: 25, 30 + xy: 444, 60 + size: 68, 36 + orig: 68, 36 offset: 0, 0 index: -1 -left-hand +rear_foot_bend1 rotate: false - xy: 147, 131 - size: 35, 38 - orig: 35, 38 + xy: 523, 100 + size: 70, 40 + orig: 70, 40 offset: 0, 0 index: -1 -left-arm +rear_foot_bend2 rotate: false - xy: 184, 161 - size: 35, 29 - orig: 35, 29 + xy: 346, 11 + size: 62, 50 + orig: 62, 50 offset: 0, 0 index: -1 -eyes-closed +rear_shin rotate: false - xy: 221, 161 - size: 34, 27 - orig: 34, 27 + xy: 843, 135 + size: 45, 107 + orig: 45, 107 offset: 0, 0 index: -1 -right-lower-leg +rear_thigh rotate: false - xy: 152, 65 - size: 51, 64 - orig: 51, 64 + xy: 894, 82 + size: 39, 62 + orig: 39, 62 offset: 0, 0 index: -1 -right-foot-idle +rear_upper_arm rotate: false - xy: 184, 131 - size: 53, 28 - orig: 53, 28 + xy: 502, 6 + size: 28, 52 + orig: 28, 52 offset: 0, 0 index: -1 -left-lower-leg +torso rotate: false - xy: 205, 65 - size: 49, 64 - orig: 49, 64 - offset: 0, 0 - index: -1 -right-shoulder - rotate: false - xy: 160, 12 - size: 52, 51 - orig: 52, 51 - offset: 0, 0 - index: -1 -eyes - rotate: false - xy: 214, 36 - size: 34, 27 - orig: 34, 27 - offset: 0, 0 - index: -1 -right-hand - rotate: false - xy: 214, 2 - size: 32, 32 - orig: 32, 32 + xy: 731, 134 + size: 59, 108 + orig: 59, 108 offset: 0, 0 index: -1 diff --git a/spine-turbulenz/example/data/spineboy.json b/spine-turbulenz/example/data/spineboy.json index 113e72c33..8a0230a5a 100644 --- a/spine-turbulenz/example/data/spineboy.json +++ b/spine-turbulenz/example/data/spineboy.json @@ -1,1002 +1 @@ -{ -"bones": [ - { "name": "root" }, - { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, - { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, - { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, - { "name": "right upper leg", "parent": "hip", "length": 45.76, "x": -18.27, "rotation": -101.13 }, - { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 94.95 }, - { "name": "left lower leg", "parent": "left upper leg", "length": 56.45, "x": 51.78, "y": 3.46, "rotation": -16.65 }, - { "name": "left shoulder", "parent": "torso", "length": 44.19, "x": 78.96, "y": -15.75, "rotation": -156.96 }, - { "name": "neck", "parent": "torso", "length": 18.38, "x": 83.64, "y": -1.78, "rotation": 0.9 }, - { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 50.21, "y": 0.6, "rotation": -10.7 }, - { "name": "right shoulder", "parent": "torso", "length": 49.95, "x": 81.9, "y": 6.79, "rotation": 130.6 }, - { "name": "head", "parent": "neck", "length": 68.28, "x": 19.09, "y": 6.97, "rotation": -8.94 }, - { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 44.19, "y": -0.01, "rotation": 28.16 }, - { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 64.02, "y": -8.67, "rotation": 102.43 }, - { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 49.95, "y": -0.12, "rotation": 40.12 }, - { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, - { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, - { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } -], -"slots": [ - { "name": "left shoulder", "bone": "left shoulder", "attachment": "left-shoulder" }, - { "name": "left arm", "bone": "left arm", "attachment": "left-arm" }, - { "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": "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": "right upper leg", "bone": "right upper leg", "attachment": "right-upper-leg" }, - { "name": "torso", "bone": "torso", "attachment": "torso" }, - { "name": "neck", "bone": "neck", "attachment": "neck" }, - { "name": "head", "bone": "head", "attachment": "head" }, - { "name": "eyes", "bone": "head", "attachment": "eyes" }, - { "name": "right shoulder", "bone": "right shoulder", "attachment": "right-shoulder", "additive": true }, - { "name": "right arm", "bone": "right arm", "attachment": "right-arm" }, - { "name": "right hand", "bone": "right hand", "attachment": "right-hand" }, - { "name": "bb-head", "bone": "head", "attachment": "bb-head" } -], -"skins": { - "default": { - "bb-head": { - "bb-head": { - "type": "boundingbox", - "vertices": [ - 55.69696, - -44.60648, - 8.2226715, - -47.609646, - -11.244263, - -32.942703, - -0.05206299, - 35.835804, - 61.018433, - 43.227512, - 90.35846, - -16.054127, - 115.41275, - -32.817406, - 78.29431, - -56.05409 - ] - } - }, - "eyes": { - "eyes": { "x": 28.94, "y": -32.92, "rotation": -86.9, "width": 34, "height": 27 }, - "eyes-closed": { "x": 28.77, "y": -32.86, "rotation": -86.9, "width": 34, "height": 27 } - }, - "head": { - "head": { "x": 53.94, "y": -5.75, "rotation": -86.9, "width": 121, "height": 132 } - }, - "left arm": { - "left-arm": { "x": 15.11, "y": -0.44, "rotation": 33.84, "width": 35, "height": 29 } - }, - "left foot": { - "left-foot": { "x": 24.35, "y": 8.88, "rotation": 3.32, "width": 65, "height": 30 } - }, - "left hand": { - "left-hand": { "x": 0.75, "y": 1.86, "rotation": 31.14, "width": 35, "height": 38 } - }, - "left lower leg": { - "left-lower-leg": { "x": 24.55, "y": -1.92, "rotation": 105.75, "width": 49, "height": 64 } - }, - "left shoulder": { - "left-shoulder": { "x": 23.74, "y": 0.11, "rotation": 62.01, "width": 34, "height": 53 } - }, - "left upper leg": { - "left-upper-leg": { "x": 26.12, "y": -1.85, "rotation": 89.09, "width": 33, "height": 67 } - }, - "neck": { - "neck": { "x": 9.42, "y": -3.66, "rotation": -100.15, "width": 34, "height": 28 } - }, - "pelvis": { - "pelvis": { "x": -4.83, "y": 10.62, "width": 63, "height": 47 } - }, - "right arm": { - "right-arm": { "x": 18.34, "y": -2.64, "rotation": 94.32, "width": 21, "height": 45 } - }, - "right foot": { - "right-foot": { "x": 19.02, "y": 8.47, "rotation": 1.52, "width": 67, "height": 30 } - }, - "right hand": { - "right-hand": { "x": 6.82, "y": 1.25, "rotation": 91.96, "width": 32, "height": 32 } - }, - "right lower leg": { - "right-lower-leg": { "x": 23.28, "y": -2.59, "rotation": 111.83, "width": 51, "height": 64 } - }, - "right shoulder": { - "right-shoulder": { "x": 25.86, "y": 0.03, "rotation": 134.44, "width": 52, "height": 51 } - }, - "right upper leg": { - "right-upper-leg": { "x": 23.03, "y": 0.25, "rotation": 101.13, "width": 44, "height": 70 } - }, - "torso": { - "torso": { "x": 44.57, "y": -7.08, "rotation": -94.95, "width": 68, "height": 92 } - } - } -}, -"events": { - "behind": {}, - "headAttach": {}, - "headPop": {} -}, -"animations": { - "drawOrder": { - "bones": { - "head": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4827, "angle": -23.11 }, - { "time": 0.8965, "angle": -56.45 }, - { "time": 1.3103, "angle": 1.38 }, - { "time": 1.7931, "angle": 36.12 }, - { "time": 2.1379, "angle": 1.24 }, - { "time": 2.6206, "angle": -37.12 }, - { "time": 2.9666, "angle": 2.07 }, - { "time": 3.4666, "angle": 34.72 }, - { "time": 3.9, "angle": 359.99 } - ], - "translate": [ - { - "time": 0, - "x": 0, - "y": 0, - "curve": [ 0.19, 0.4, 0.586, 0.75 ] - }, - { - "time": 0.2758, - "x": 57.88, - "y": -35.72, - "curve": [ 0.39, 0.54, 0.632, 0.72 ] - }, - { - "time": 0.4827, - "x": 87.26, - "y": -87.89, - "curve": [ 0.325, 0.23, 0.587, 0.36 ] - }, - { - "time": 0.6896, - "x": 28.89, - "y": -114.62, - "curve": [ 0.383, 0.23, 0.736, 0.55 ] - }, - { - "time": 0.8965, - "x": -76.58, - "y": -124.98, - "curve": [ 0.129, 0.21, 0.547, 0.64 ] - }, - { - "time": 1.1034, - "x": -154.37, - "y": -77.13, - "curve": [ 0.354, 0.48, 0.729, 0.9 ] - }, - { - "time": 1.3103, - "x": -181.02, - "y": 18.56, - "curve": [ 0.063, 0.15, 0.52, 0.62 ] - }, - { - "time": 1.5862, - "x": -150.38, - "y": 128.67, - "curve": [ 0.381, 0.54, 0.778, 1 ] - }, - { - "time": 1.7931, - "x": -112.08, - "y": 146.28, - "curve": [ 0.242, 0, 0.626, 0.45 ] - }, - { - "time": 1.931, - "x": -63.7, - "y": 111.22, - "curve": [ 0.398, 0.35, 0.786, 0.76 ] - }, - { - "time": 2.1379, - "x": -48.94, - "y": -1.55, - "curve": [ 0.188, 0.21, 0.575, 0.61 ] - }, - { - "time": 2.3448, - "x": -91.69, - "y": -91.93, - "curve": [ 0.362, 0.51, 0.766, 1 ] - }, - { - "time": 2.6206, - "x": -142.79, - "y": -126.83, - "curve": [ 0.227, 0.34, 0.593, 0.75 ] - }, - { - "time": 2.7586, - "x": -176.7, - "y": -98.32, - "curve": [ 0.26, 0.4, 0.612, 0.71 ] - }, - { - "time": 2.8965, - "x": -163.95, - "y": -24.04, - "curve": [ 0.338, 0.37, 0.676, 0.71 ] - }, - { - "time": 2.9655, - "x": -150.17, - "y": 10.71, - "curve": [ 0.387, 0.61, 0.741, 1 ] - }, - { - "time": 3.1034, - "x": -102.44, - "y": 45.92, - "curve": [ 0.31, 0.24, 0.648, 0.58 ] - }, - { - "time": 3.2413, - "x": -53.99, - "y": 70.39, - "curve": [ 0.325, 0.29, 0.663, 0.63 ] - }, - { - "time": 3.3793, - "x": 1.88, - "y": 55.54, - "curve": [ 0.387, 0.33, 0.769, 0.73 ] - }, - { - "time": 3.5862, - "x": 34.26, - "y": 36.13, - "curve": [ 0.206, 0.28, 0.596, 0.67 ] - }, - { - "time": 3.7931, - "x": 23.94, - "y": 1.01, - "curve": [ 0.373, 0.56, 0.759, 1 ] - }, - { "time": 4, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0.8275, "x": 1, "y": 1 }, - { "time": 1.3103, "x": 0.742, "y": 0.742 }, - { "time": 1.7931, "x": 1, "y": 1 }, - { "time": 2.1379, "x": 1.502, "y": 1.502 }, - { "time": 2.6206, "x": 1, "y": 1 }, - { "time": 2.9655, "x": 0.707, "y": 0.707 }, - { "time": 3.3793, "x": 1, "y": 1 } - ] - } - }, - "events": [ - { "time": 0, "name": "headPop", "string": "pop.wav" }, - { "time": 1.3103, "name": "behind" }, - { "time": 2.9655, "name": "behind" }, - { "time": 4, "name": "headAttach", "string": "attach.wav" } - ], - "draworder": [ - { - "time": 0.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { - "time": 1.7931, - "offsets": [ - { "slot": "head", "offset": 3 }, - { "slot": "eyes", "offset": 3 } - ] - }, - { - "time": 2.6206, - "offsets": [ - { "slot": "head", "offset": -12 }, - { "slot": "eyes", "offset": -12 } - ] - }, - { "time": 3.5862 } - ] - }, - "jump": { - "bones": { - "hip": { - "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 0.9333, "angle": 0, "curve": "stepped" }, - { "time": 1.3666, "angle": 0 } - ], - "translate": [ - { "time": 0, "x": -11.57, "y": -3 }, - { "time": 0.2333, "x": -16.2, "y": -19.43 }, - { - "time": 0.3333, - "x": 7.66, - "y": -8.48, - "curve": [ 0.057, 0.06, 0.712, 1 ] - }, - { "time": 0.3666, "x": 15.38, "y": 5.01 }, - { "time": 0.4666, "x": -7.84, "y": 57.22 }, - { - "time": 0.6, - "x": -10.81, - "y": 96.34, - "curve": [ 0.241, 0, 1, 1 ] - }, - { "time": 0.7333, "x": -7.01, "y": 54.7 }, - { "time": 0.8, "x": -10.58, "y": 32.2 }, - { "time": 0.9333, "x": -31.99, "y": 0.45 }, - { "time": 1.0666, "x": -12.48, "y": -29.47 }, - { "time": 1.3666, "x": -11.57, "y": -3 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left upper leg": { - "rotate": [ - { "time": 0, "angle": 17.13 }, - { "time": 0.2333, "angle": 44.35 }, - { "time": 0.3333, "angle": 16.46 }, - { "time": 0.4, "angle": -9.88 }, - { "time": 0.4666, "angle": -11.42 }, - { "time": 0.5666, "angle": 23.46 }, - { "time": 0.7666, "angle": 71.82 }, - { "time": 0.9333, "angle": 65.53 }, - { "time": 1.0666, "angle": 51.01 }, - { "time": 1.3666, "angle": 17.13 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 0.9333, "x": -3, "y": -2.25, "curve": "stepped" }, - { "time": 1.3666, "x": -3, "y": -2.25 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -16.25 }, - { "time": 0.2333, "angle": -52.21 }, - { "time": 0.4, "angle": 15.04 }, - { "time": 0.4666, "angle": -8.95 }, - { "time": 0.5666, "angle": -39.53 }, - { "time": 0.7666, "angle": -27.27 }, - { "time": 0.9333, "angle": -3.52 }, - { "time": 1.0666, "angle": -61.92 }, - { "time": 1.3666, "angle": -16.25 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": 0.33 }, - { "time": 0.2333, "angle": 6.2 }, - { "time": 0.3333, "angle": 14.73 }, - { "time": 0.4, "angle": -15.54 }, - { "time": 0.4333, "angle": -21.2 }, - { "time": 0.5666, "angle": -7.55 }, - { "time": 0.7666, "angle": -0.67 }, - { "time": 0.9333, "angle": -0.58 }, - { "time": 1.0666, "angle": 14.64 }, - { "time": 1.3666, "angle": 0.33 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 25.97 }, - { "time": 0.2333, "angle": 46.43 }, - { "time": 0.3333, "angle": 22.61 }, - { "time": 0.4, "angle": 2.13 }, - { - "time": 0.4666, - "angle": 0.04, - "curve": [ 0, 0, 0.637, 0.98 ] - }, - { "time": 0.6, "angle": 65.55 }, - { "time": 0.7666, "angle": 64.93 }, - { "time": 0.9333, "angle": 41.08 }, - { "time": 1.0666, "angle": 66.25 }, - { "time": 1.3666, "angle": 25.97 } - ], - "translate": [ - { "time": 0, "x": 5.74, "y": 0.61 }, - { "time": 0.2333, "x": 4.79, "y": 1.79 }, - { "time": 0.3333, "x": 6.05, "y": -4.55 }, - { "time": 0.9333, "x": 4.79, "y": 1.79, "curve": "stepped" }, - { "time": 1.0666, "x": 4.79, "y": 1.79 }, - { "time": 1.3666, "x": 5.74, "y": 0.61 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -27.46 }, - { "time": 0.2333, "angle": -64.03 }, - { "time": 0.4, "angle": -48.36 }, - { "time": 0.5666, "angle": -76.86 }, - { "time": 0.7666, "angle": -26.89 }, - { "time": 0.9, "angle": -18.97 }, - { "time": 0.9333, "angle": -14.18 }, - { "time": 1.0666, "angle": -80.45 }, - { "time": 1.3666, "angle": -27.46 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": 1.08 }, - { "time": 0.2333, "angle": 16.02 }, - { "time": 0.3, "angle": 12.94 }, - { "time": 0.3333, "angle": 15.16 }, - { "time": 0.4, "angle": -14.7 }, - { "time": 0.4333, "angle": -12.85 }, - { "time": 0.4666, "angle": -19.18 }, - { "time": 0.5666, "angle": -15.82 }, - { "time": 0.6, "angle": -3.59 }, - { "time": 0.7666, "angle": -3.56 }, - { "time": 0.9333, "angle": 1.86 }, - { "time": 1.0666, "angle": 16.02 }, - { "time": 1.3666, "angle": 1.08 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -13.35 }, - { "time": 0.2333, "angle": -48.95 }, - { "time": 0.4333, "angle": -35.77 }, - { "time": 0.6, "angle": -4.59 }, - { "time": 0.7666, "angle": 14.61 }, - { "time": 0.9333, "angle": 15.74 }, - { "time": 1.0666, "angle": -32.44 }, - { "time": 1.3666, "angle": -13.35 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 0.9333, "x": -3.67, "y": 1.68, "curve": "stepped" }, - { "time": 1.3666, "x": -3.67, "y": 1.68 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 12.78 }, - { "time": 0.2333, "angle": 16.46 }, - { "time": 0.4, "angle": 26.49 }, - { "time": 0.6, "angle": 15.51 }, - { "time": 0.7666, "angle": 1.34 }, - { "time": 0.9333, "angle": 2.35 }, - { "time": 1.0666, "angle": 6.08 }, - { "time": 1.3, "angle": 21.23 }, - { "time": 1.3666, "angle": 12.78 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "head": { - "rotate": [ - { "time": 0, "angle": 5.19 }, - { "time": 0.2333, "angle": 20.27 }, - { "time": 0.4, "angle": 15.27 }, - { "time": 0.6, "angle": -24.69 }, - { "time": 0.7666, "angle": -11.02 }, - { "time": 0.9333, "angle": -24.38 }, - { "time": 1.0666, "angle": 11.99 }, - { "time": 1.3, "angle": 4.86 }, - { "time": 1.3666, "angle": 5.19 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left shoulder": { - "rotate": [ - { - "time": 0, - "angle": 0.05, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": 279.66, - "curve": [ 0.218, 0.67, 0.66, 0.99 ] - }, - { - "time": 0.5, - "angle": 62.27, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": 28.91 }, - { "time": 1.0666, "angle": -8.62 }, - { "time": 1.1666, "angle": -18.43 }, - { "time": 1.3666, "angle": 0.05 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 0.9333, "x": -1.76, "y": 0.56, "curve": "stepped" }, - { "time": 1.3666, "x": -1.76, "y": 0.56 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left hand": { - "rotate": [ - { "time": 0, "angle": 11.58, "curve": "stepped" }, - { "time": 0.9333, "angle": 11.58, "curve": "stepped" }, - { "time": 1.3666, "angle": 11.58 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": 0.51 }, - { "time": 0.4333, "angle": 12.82 }, - { "time": 0.6, "angle": 47.55 }, - { "time": 0.9333, "angle": 12.82 }, - { "time": 1.1666, "angle": -6.5 }, - { "time": 1.3666, "angle": 0.51 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 43.82, - "curve": [ 0, 0, 0.62, 1 ] - }, - { - "time": 0.2333, - "angle": -8.74, - "curve": [ 0.304, 0.58, 0.709, 0.97 ] - }, - { - "time": 0.5333, - "angle": -208.02, - "curve": [ 0.462, 0, 0.764, 0.58 ] - }, - { "time": 0.9333, "angle": -246.72 }, - { "time": 1.0666, "angle": -307.13 }, - { "time": 1.1666, "angle": 37.15 }, - { "time": 1.3666, "angle": 43.82 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 0.9333, "x": -7.84, "y": 7.19, "curve": "stepped" }, - { "time": 1.3666, "x": -7.84, "y": 7.19 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right arm": { - "rotate": [ - { "time": 0, "angle": -4.02 }, - { "time": 0.6, "angle": 17.5 }, - { "time": 0.9333, "angle": -4.02 }, - { "time": 1.1666, "angle": -16.72 }, - { "time": 1.3666, "angle": -4.02 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92, "curve": "stepped" }, - { "time": 0.9333, "angle": 22.92, "curve": "stepped" }, - { "time": 1.3666, "angle": 22.92 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 0.9333, "x": 0, "y": 0, "curve": "stepped" }, - { "time": 1.3666, "x": 0, "y": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 0.9333, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - }, - "root": { - "rotate": [ - { "time": 0, "angle": 0 }, - { "time": 0.4333, "angle": -14.52 }, - { "time": 0.8, "angle": 9.86 }, - { "time": 1.3666, "angle": 0 } - ], - "scale": [ - { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, - { "time": 1.3666, "x": 1, "y": 1 } - ] - } - } - }, - "walk": { - "bones": { - "left upper leg": { - "rotate": [ - { "time": 0, "angle": -26.55 }, - { "time": 0.1333, "angle": -8.78 }, - { "time": 0.2666, "angle": 9.51 }, - { "time": 0.4, "angle": 30.74 }, - { "time": 0.5333, "angle": 25.33 }, - { "time": 0.6666, "angle": 26.11 }, - { "time": 0.8, "angle": -7.7 }, - { "time": 0.9333, "angle": -21.19 }, - { "time": 1.0666, "angle": -26.55 } - ], - "translate": [ - { "time": 0, "x": -3, "y": -2.25 }, - { "time": 0.4, "x": -2.18, "y": -2.25 }, - { "time": 1.0666, "x": -3, "y": -2.25 } - ] - }, - "right upper leg": { - "rotate": [ - { "time": 0, "angle": 42.45 }, - { "time": 0.1333, "angle": 52.1 }, - { "time": 0.2666, "angle": 5.96 }, - { "time": 0.5333, "angle": -16.93 }, - { "time": 0.6666, "angle": 1.89 }, - { - "time": 0.8, - "angle": 28.06, - "curve": [ 0.462, 0.11, 1, 1 ] - }, - { - "time": 0.9333, - "angle": 58.68, - "curve": [ 0.5, 0.02, 1, 1 ] - }, - { "time": 1.0666, "angle": 42.45 } - ], - "translate": [ - { "time": 0, "x": 8.11, "y": -2.36 }, - { "time": 0.1333, "x": 10.03, "y": -2.56 }, - { "time": 0.4, "x": 2.76, "y": -2.97 }, - { "time": 0.5333, "x": 2.76, "y": -2.81 }, - { "time": 0.9333, "x": 8.67, "y": -2.54 }, - { "time": 1.0666, "x": 8.11, "y": -2.36 } - ] - }, - "left lower leg": { - "rotate": [ - { "time": 0, "angle": -10.21 }, - { "time": 0.1333, "angle": -55.64 }, - { "time": 0.2666, "angle": -68.12 }, - { "time": 0.5333, "angle": 5.11 }, - { "time": 0.6666, "angle": -28.29 }, - { "time": 0.8, "angle": 4.08 }, - { "time": 0.9333, "angle": 3.53 }, - { "time": 1.0666, "angle": -10.21 } - ] - }, - "left foot": { - "rotate": [ - { "time": 0, "angle": -3.69 }, - { "time": 0.1333, "angle": -10.42 }, - { "time": 0.2666, "angle": -17.14 }, - { "time": 0.4, "angle": -2.83 }, - { "time": 0.5333, "angle": -3.87 }, - { "time": 0.6666, "angle": 2.78 }, - { "time": 0.8, "angle": 1.68 }, - { "time": 0.9333, "angle": -8.54 }, - { "time": 1.0666, "angle": -3.69 } - ] - }, - "right shoulder": { - "rotate": [ - { - "time": 0, - "angle": 20.89, - "curve": [ 0.264, 0, 0.75, 1 ] - }, - { - "time": 0.1333, - "angle": 3.72, - "curve": [ 0.272, 0, 0.841, 1 ] - }, - { "time": 0.6666, "angle": -278.28 }, - { "time": 1.0666, "angle": 20.89 } - ], - "translate": [ - { "time": 0, "x": -7.84, "y": 7.19 }, - { "time": 0.1333, "x": -6.36, "y": 6.42 }, - { "time": 0.6666, "x": -11.07, "y": 5.25 }, - { "time": 1.0666, "x": -7.84, "y": 7.19 } - ] - }, - "right arm": { - "rotate": [ - { - "time": 0, - "angle": -4.02, - "curve": [ 0.267, 0, 0.804, 0.99 ] - }, - { - "time": 0.1333, - "angle": -13.99, - "curve": [ 0.341, 0, 1, 1 ] - }, - { - "time": 0.6666, - "angle": 36.54, - "curve": [ 0.307, 0, 0.787, 0.99 ] - }, - { "time": 1.0666, "angle": -4.02 } - ] - }, - "right hand": { - "rotate": [ - { "time": 0, "angle": 22.92 }, - { "time": 0.4, "angle": -8.97 }, - { "time": 0.6666, "angle": 0.51 }, - { "time": 1.0666, "angle": 22.92 } - ] - }, - "left shoulder": { - "rotate": [ - { "time": 0, "angle": -1.47 }, - { "time": 0.1333, "angle": 13.6 }, - { "time": 0.6666, "angle": 280.74 }, - { "time": 1.0666, "angle": -1.47 } - ], - "translate": [ - { "time": 0, "x": -1.76, "y": 0.56 }, - { "time": 0.6666, "x": -2.47, "y": 8.14 }, - { "time": 1.0666, "x": -1.76, "y": 0.56 } - ] - }, - "left hand": { - "rotate": [ - { - "time": 0, - "angle": 11.58, - "curve": [ 0.169, 0.37, 0.632, 1.55 ] - }, - { - "time": 0.1333, - "angle": 28.13, - "curve": [ 0.692, 0, 0.692, 0.99 ] - }, - { - "time": 0.6666, - "angle": -27.42, - "curve": [ 0.117, 0.41, 0.738, 1.76 ] - }, - { "time": 0.8, "angle": -36.32 }, - { "time": 1.0666, "angle": 11.58 } - ] - }, - "left arm": { - "rotate": [ - { "time": 0, "angle": -8.27 }, - { "time": 0.1333, "angle": 18.43 }, - { "time": 0.6666, "angle": 0.88 }, - { "time": 1.0666, "angle": -8.27 } - ] - }, - "torso": { - "rotate": [ - { "time": 0, "angle": -10.28 }, - { - "time": 0.1333, - "angle": -15.38, - "curve": [ 0.545, 0, 1, 1 ] - }, - { - "time": 0.4, - "angle": -9.78, - "curve": [ 0.58, 0.17, 1, 1 ] - }, - { "time": 0.6666, "angle": -15.75 }, - { "time": 0.9333, "angle": -7.06 }, - { "time": 1.0666, "angle": -10.28 } - ], - "translate": [ - { "time": 0, "x": -3.67, "y": 1.68 }, - { "time": 0.1333, "x": -3.67, "y": 0.68 }, - { "time": 0.4, "x": -3.67, "y": 1.97 }, - { "time": 0.6666, "x": -3.67, "y": -0.14 }, - { "time": 1.0666, "x": -3.67, "y": 1.68 } - ] - }, - "right foot": { - "rotate": [ - { "time": 0, "angle": -5.25 }, - { "time": 0.2666, "angle": -4.08 }, - { "time": 0.4, "angle": -6.45 }, - { "time": 0.5333, "angle": -5.39 }, - { "time": 0.8, "angle": -11.68 }, - { "time": 0.9333, "angle": 0.46 }, - { "time": 1.0666, "angle": -5.25 } - ] - }, - "right lower leg": { - "rotate": [ - { "time": 0, "angle": -3.39 }, - { "time": 0.1333, "angle": -45.53 }, - { "time": 0.2666, "angle": -2.59 }, - { "time": 0.5333, "angle": -19.53 }, - { "time": 0.6666, "angle": -64.8 }, - { - "time": 0.8, - "angle": -82.56, - "curve": [ 0.557, 0.18, 1, 1 ] - }, - { "time": 1.0666, "angle": -3.39 } - ] - }, - "hip": { - "rotate": [ - { "time": 0, "angle": 0, "curve": "stepped" }, - { "time": 1.0666, "angle": 0 } - ], - "translate": [ - { "time": 0, "x": 0, "y": 0 }, - { - "time": 0.1333, - "x": 0, - "y": -7.61, - "curve": [ 0.272, 0.86, 1, 1 ] - }, - { "time": 0.4, "x": 0, "y": 8.7 }, - { "time": 0.5333, "x": 0, "y": -0.41 }, - { - "time": 0.6666, - "x": 0, - "y": -7.05, - "curve": [ 0.235, 0.89, 1, 1 ] - }, - { "time": 0.8, "x": 0, "y": 2.92 }, - { "time": 0.9333, "x": 0, "y": 6.78 }, - { "time": 1.0666, "x": 0, "y": 0 } - ] - }, - "neck": { - "rotate": [ - { "time": 0, "angle": 3.6 }, - { "time": 0.1333, "angle": 17.49 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { "time": 0.5333, "angle": 5.17 }, - { "time": 0.6666, "angle": 18.36 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } - ] - }, - "head": { - "rotate": [ - { - "time": 0, - "angle": 3.6, - "curve": [ 0, 0, 0.704, 1.61 ] - }, - { "time": 0.1666, "angle": -0.2 }, - { "time": 0.2666, "angle": 6.1 }, - { "time": 0.4, "angle": 3.45 }, - { - "time": 0.5333, - "angle": 5.17, - "curve": [ 0, 0, 0.704, 1.61 ] - }, - { "time": 0.7, "angle": 1.1 }, - { "time": 0.8, "angle": 6.09 }, - { "time": 0.9333, "angle": 2.28 }, - { "time": 1.0666, "angle": 3.6 } - ] - } - } - } -} -} \ No newline at end of file +{"skeleton":{"hash":"lJsAlqDM/k/QFOECFqgH7sfcOrk","spine":"Dev","width":470.64,"height":731.52},"bones":[{"name":"hip","y":247.47},{"name":"front_thigh","parent":"hip","length":74.8,"x":-17.45,"y":-11.64,"rotation":-95.51},{"name":"rear_thigh","parent":"hip","length":85.71,"x":8.91,"y":-5.62,"rotation":-72.54},{"name":"torso","parent":"hip","length":127.55,"x":-1.61,"y":4.9,"rotation":103.82},{"name":"front_shin","parent":"front_thigh","length":128.76,"x":78.69,"y":1.6,"rotation":-2.21,"inheritScale":false},{"name":"front_upper_arm","parent":"torso","length":69.45,"x":103.75,"y":19.32,"rotation":168.37},{"name":"neck","parent":"torso","length":25.45,"x":127.49,"y":-0.3,"rotation":-31.53},{"name":"rear_shin","parent":"rear_thigh","length":121.87,"x":86.1,"y":-1.32,"rotation":-19.83},{"name":"rear_upper_arm","parent":"torso","length":51.93,"x":92.35,"y":-19.22,"rotation":-169.55},{"name":"front_bracer","parent":"front_upper_arm","length":40.57,"x":68.8,"y":-0.68,"rotation":18.29},{"name":"front_foot","parent":"front_shin","length":91.34,"x":128.75,"y":-0.33,"rotation":77.9},{"name":"head","parent":"neck","length":263.57,"x":27.66,"y":-0.25,"rotation":23.18},{"name":"rear_bracer","parent":"rear_upper_arm","length":34.55,"x":51.35,"rotation":23.15},{"name":"rear_foot","parent":"rear_shin","length":82.57,"x":121.45,"y":-0.75,"rotation":69.3},{"name":"front_fist","parent":"front_bracer","length":65.38,"x":40.56,"y":0.19,"rotation":12.43},{"name":"gun","parent":"rear_bracer","length":43.1,"x":34.42,"y":-0.45,"rotation":5.34},{"name":"gunTip","parent":"gun","x":201.04,"y":52.13,"rotation":6.83}],"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","additive":true},{"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","vertices":[-19.143097,-70.30209,40.80313,-118.074234,257.77155,-115.61827,285.16193,57.18005,120.77191,164.95125,-5.067627,76.94907]}},"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":{"attachment":[{"time":0.1333,"name":"muzzle"},{"time":0.2666,"name":null}],"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"}]}},"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-turbulenz/example/data/spineboy.png b/spine-turbulenz/example/data/spineboy.png index b8b493dfd..5606a0ce5 100644 Binary files a/spine-turbulenz/example/data/spineboy.png and b/spine-turbulenz/example/data/spineboy.png differ diff --git a/spine-turbulenz/example/index.html b/spine-turbulenz/example/index.html index e4a8eefee..897008170 100644 --- a/spine-turbulenz/example/index.html +++ b/spine-turbulenz/example/index.html @@ -44,9 +44,10 @@

- - -      Click above to change the animation (Spineboy) or skin (Goblins). + + + +     Click to change the animation or skin.