diff --git a/spine-c/spine-c/src/spine/Animation.c b/spine-c/spine-c/src/spine/Animation.c index 27c963cd7..b2700e014 100644 --- a/spine-c/spine-c/src/spine/Animation.c +++ b/spine-c/spine-c/src/spine/Animation.c @@ -655,8 +655,8 @@ void _spScaleTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float la bone->scaleY = by + (ABS(y) * SIGNUM(by) - by) * alpha; break; case SP_MIX_BLEND_ADD: - bone->scaleX = (x - bone->data->scaleX) * alpha; - bone->scaleY = (y - bone->data->scaleY) * alpha; + bone->scaleX += (x - bone->data->scaleX) * alpha; + bone->scaleY += (y - bone->data->scaleY) * alpha; } } else { switch (blend) { @@ -748,7 +748,7 @@ void _spScaleXTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float l bone->scaleX = bx + (ABS(x) * SIGNUM(bx) - bx) * alpha; break; case SP_MIX_BLEND_ADD: - bone->scaleX = (x - bone->data->scaleX) * alpha; + bone->scaleX += (x - bone->data->scaleX) * alpha; } } else { switch (blend) { @@ -834,7 +834,7 @@ void _spScaleYTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float l bone->scaleY = by + (ABS(y) * SIGNUM(by) - by) * alpha; break; case SP_MIX_BLEND_ADD: - bone->scaleY = (y - bone->data->scaleY) * alpha; + bone->scaleY += (y - bone->data->scaleY) * alpha; } } else { switch (blend) { @@ -1756,7 +1756,7 @@ void _spDeformTimeline_apply( spTimeline *timeline, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventsCount, float alpha, spMixBlend blend, spMixDirection direction) { int frame, i, vertexCount; - float percent, frameTime; + float percent; const float *prevVertices; const float *nextVertices; float *frames; @@ -1892,7 +1892,6 @@ void _spDeformTimeline_apply( percent = _spDeformTimeline_getCurvePercent(self, time, frame); prevVertices = frameVertices[frame]; nextVertices = frameVertices[frame + 1]; - frameTime = frames[frame]; if (alpha == 1) { if (blend == SP_MIX_BLEND_ADD) { diff --git a/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp b/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp index 0c9b554ce..3e5ac8c61 100644 --- a/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp @@ -131,8 +131,8 @@ void ScaleTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector bone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha; break; case MixBlend_Add: - bone->_scaleX = (x - bone->_data._scaleX) * alpha; - bone->_scaleY = (y - bone->_data._scaleY) * alpha; + bone->_scaleX += (x - bone->_data._scaleX) * alpha; + bone->_scaleY += (y - bone->_data._scaleY) * alpha; } } else { switch (blend) { @@ -210,7 +210,7 @@ void ScaleXTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto bone->_scaleX = bx + (MathUtil::abs(x) * MathUtil::sign(bx) - bx) * alpha; break; case MixBlend_Add: - bone->_scaleX = (x - bone->_data._scaleX) * alpha; + bone->_scaleX += (x - bone->_data._scaleX) * alpha; } } else { switch (blend) { @@ -283,7 +283,7 @@ void ScaleYTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto bone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha; break; case MixBlend_Add: - bone->_scaleY = (y - bone->_data._scaleY) * alpha; + bone->_scaleY += (y - bone->_data._scaleY) * alpha; } } else { switch (blend) { diff --git a/spine-csharp/src/Animation.cs b/spine-csharp/src/Animation.cs index 2492e9dca..ee66aabf4 100644 --- a/spine-csharp/src/Animation.cs +++ b/spine-csharp/src/Animation.cs @@ -774,8 +774,8 @@ namespace Spine { bone.scaleY = by + (Math.Abs(y) * Math.Sign(by) - by) * alpha; break; case MixBlend.Add: - bone.scaleX = (x - bone.data.scaleX) * alpha; - bone.scaleY = (y - bone.data.scaleY) * alpha; + bone.scaleX += (x - bone.data.scaleX) * alpha; + bone.scaleY += (y - bone.data.scaleY) * alpha; break; } } else { @@ -857,7 +857,7 @@ namespace Spine { bone.scaleX = bx + (Math.Abs(x) * Math.Sign(bx) - bx) * alpha; break; case MixBlend.Add: - bone.scaleX = (x - bone.data.scaleX) * alpha; + bone.scaleX += (x - bone.data.scaleX) * alpha; break; } } else { @@ -934,7 +934,7 @@ namespace Spine { bone.scaleY = by + (Math.Abs(y) * Math.Sign(by) - by) * alpha; break; case MixBlend.Add: - bone.scaleY = (y - bone.data.scaleY) * alpha; + bone.scaleY += (y - bone.data.scaleY) * alpha; break; } } else { diff --git a/spine-csharp/src/Skeleton.cs b/spine-csharp/src/Skeleton.cs index b7a454416..175a54101 100644 --- a/spine-csharp/src/Skeleton.cs +++ b/spine-csharp/src/Skeleton.cs @@ -28,7 +28,6 @@ *****************************************************************************/ using System; -using System.Collections.Generic; namespace Spine { public class Skeleton { diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java index f23bc1109..3c4bc14cd 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java @@ -743,8 +743,8 @@ public class Animation { bone.scaleY = by + (Math.abs(y) * Math.signum(by) - by) * alpha; break; case add: - bone.scaleX = (x - bone.data.scaleX) * alpha; - bone.scaleY = (y - bone.data.scaleY) * alpha; + bone.scaleX += (x - bone.data.scaleX) * alpha; + bone.scaleY += (y - bone.data.scaleY) * alpha; } } else { switch (blend) { @@ -822,7 +822,7 @@ public class Animation { bone.scaleX = bx + (Math.abs(x) * Math.signum(bx) - bx) * alpha; break; case add: - bone.scaleX = (x - bone.data.scaleX) * alpha; + bone.scaleX += (x - bone.data.scaleX) * alpha; } } else { switch (blend) { @@ -895,7 +895,7 @@ public class Animation { bone.scaleY = by + (Math.abs(y) * Math.signum(by) - by) * alpha; break; case add: - bone.scaleY = (y - bone.data.scaleY) * alpha; + bone.scaleY += (y - bone.data.scaleY) * alpha; } } else { switch (blend) { diff --git a/spine-ts/README.md b/spine-ts/README.md index a799500d2..9128f9a3b 100644 --- a/spine-ts/README.md +++ b/spine-ts/README.md @@ -54,7 +54,7 @@ You can include a module in your project via a `