diff --git a/spine-as3/spine-as3-example/lib/spine-as3.swc b/spine-as3/spine-as3-example/lib/spine-as3.swc index 73b4f2570..ce264476e 100644 Binary files a/spine-as3/spine-as3-example/lib/spine-as3.swc and b/spine-as3/spine-as3-example/lib/spine-as3.swc differ diff --git a/spine-as3/spine-as3/src/spine/Bone.as b/spine-as3/spine-as3/src/spine/Bone.as index 2e82c17d8..3415284b0 100644 --- a/spine-as3/spine-as3/src/spine/Bone.as +++ b/spine-as3/spine-as3/src/spine/Bone.as @@ -307,7 +307,7 @@ public class Bone implements Updatable { * the applied transform after the world transform has been modified directly (eg, by a constraint). *

* Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. */ - public function updateAppliedTransform () : void { + function updateAppliedTransform () : void { appliedValid = true; var parent:Bone = this.parent; if (parent == null) { diff --git a/spine-as3/spine-as3/src/spine/SkeletonBounds.as b/spine-as3/spine-as3/src/spine/SkeletonBounds.as index 33cc00938..663b44335 100644 --- a/spine-as3/spine-as3/src/spine/SkeletonBounds.as +++ b/spine-as3/spine-as3/src/spine/SkeletonBounds.as @@ -68,7 +68,14 @@ public class SkeletonBounds { boundingBox.computeWorldVertices(slot, polygon.vertices); } - if (updateAabb) aabbCompute(); + if (updateAabb) + aabbCompute(); + else { + minX = Number.MIN_VALUE; + minY = Number.MIN_VALUE; + maxX = Number.MAX_VALUE; + maxY = Number.MAX_VALUE; + } } private function aabbCompute () : void { diff --git a/spine-as3/spine-as3/src/spine/SkeletonJson.as b/spine-as3/spine-as3/src/spine/SkeletonJson.as index 4f9c3aa5f..a91b965b5 100644 --- a/spine-as3/spine-as3/src/spine/SkeletonJson.as +++ b/spine-as3/spine-as3/src/spine/SkeletonJson.as @@ -253,7 +253,7 @@ public class SkeletonJson { var eventData:EventData = new EventData(eventName); eventData.intValue = eventMap["int"] || 0; eventData.floatValue = eventMap["float"] || 0; - eventData.stringValue = eventMap["string"] || null; + eventData.stringValue = eventMap["string"] || ""; skeletonData.events.push(eventData); } } diff --git a/spine-as3/spine-as3/src/spine/animation/AnimationState.as b/spine-as3/spine-as3/src/spine/animation/AnimationState.as index 531e88be3..8ec889651 100644 --- a/spine-as3/spine-as3/src/spine/animation/AnimationState.as +++ b/spine-as3/spine-as3/src/spine/animation/AnimationState.as @@ -149,7 +149,7 @@ public class AnimationState { // Apply mixing from entries first. var mix:Number = current.alpha; - if (current.mixingFrom != null) mix = applyMixingFrom(current, skeleton, mix); + if (current.mixingFrom != null) mix *= applyMixingFrom(current, skeleton); // Apply current entry. var animationLast:Number = current.animationLast, animationTime:Number = current.getAnimationTime(); @@ -182,26 +182,25 @@ public class AnimationState { queue.drain(); } - private function applyMixingFrom (entry:TrackEntry, skeleton:Skeleton, alpha:Number):Number { + private function applyMixingFrom (entry:TrackEntry, skeleton:Skeleton):Number { var from:TrackEntry = entry.mixingFrom; - if (from.mixingFrom != null) applyMixingFrom(from, skeleton, alpha); + if (from.mixingFrom != null) applyMixingFrom(from, skeleton); var mix:Number = 0; if (entry.mixDuration == 0) // Single frame mix to undo mixingFrom changes. mix = 1; else { mix = entry.mixTime / entry.mixDuration; - if (mix > 1) mix = 1; - mix *= alpha; + if (mix > 1) mix = 1; } var events:Vector. = mix < from.eventThreshold ? this.events : null; var attachments:Boolean = mix < from.attachmentThreshold, drawOrder:Boolean = mix < from.drawOrderThreshold; var animationLast:Number = from.animationLast, animationTime:Number = from.getAnimationTime(); - alpha = from.alpha * (1 - mix); var timelineCount:int = from.animation.timelines.length; var timelines:Vector. = from.animation.timelines; var timelinesFirst:Vector. = from.timelinesFirst; + var alpha:Number = from.alpha * entry.mixAlpha * (1 - mix); var firstFrame:Boolean = from.timelinesRotation.length == 0; if (firstFrame) from.timelinesRotation.length = timelineCount << 1; @@ -368,8 +367,8 @@ public class AnimationState { from.timelinesRotation.length = 0; - // If not completely mixed in, set alpha so mixing out happens from current mix to zero. - if (from.mixingFrom != null) from.alpha *= Math.min(from.mixTime / from.mixDuration, 1); + // If not completely mixed in, set mixAlpha so mixing out happens from current mix to zero. + if (from.mixingFrom != null) current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1); } queue.start(current); @@ -490,6 +489,7 @@ public class AnimationState { entry.timeScale = 1; entry.alpha = 1; + entry.mixAlpha = 1; entry.mixTime = 0; entry.mixDuration = last == null ? 0 : data.getMix(last.animation, animation); return entry; diff --git a/spine-as3/spine-as3/src/spine/animation/TrackEntry.as b/spine-as3/spine-as3/src/spine/animation/TrackEntry.as index a1f206135..fd7b1c5c6 100644 --- a/spine-as3/spine-as3/src/spine/animation/TrackEntry.as +++ b/spine-as3/spine-as3/src/spine/animation/TrackEntry.as @@ -71,5 +71,9 @@ public class TrackEntry implements Poolable { timelinesFirst.length = 0; timelinesRotation.length = 0; } + + public function resetRotationDirection ():void { + timelinesRotation.length = 0; + } } } diff --git a/spine-starling/spine-starling-example/lib/spine-as3.swc b/spine-starling/spine-starling-example/lib/spine-as3.swc index 5ca97aa4a..ce264476e 100644 Binary files a/spine-starling/spine-starling-example/lib/spine-as3.swc and b/spine-starling/spine-starling-example/lib/spine-as3.swc differ diff --git a/spine-starling/spine-starling/lib/spine-as3.swc b/spine-starling/spine-starling/lib/spine-as3.swc index 5ca97aa4a..ce264476e 100644 Binary files a/spine-starling/spine-starling/lib/spine-as3.swc and b/spine-starling/spine-starling/lib/spine-as3.swc differ