mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
Merge branch '4.0' into 4.1-beta
# Conflicts: # spine-as3/spine-as3/src/spine/animation/ScaleTimeline.as # spine-as3/spine-as3/src/spine/animation/ScaleXTimeline.as # spine-as3/spine-as3/src/spine/animation/ScaleYTimeline.as # spine-lua/spine-lua/Animation.lua # spine-ts/package-lock.json # spine-ts/package.json # spine-ts/spine-canvas/package.json # spine-ts/spine-core/package.json # spine-ts/spine-player/package.json # spine-ts/spine-threejs/package.json # spine-ts/spine-webgl/package.json
This commit is contained in:
commit
504f52a5a7
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -626,8 +626,8 @@ export class ScaleTimeline extends CurveTimeline2 implements BoneTimeline {
|
||||
bone.scaleY = by + (Math.abs(y) * MathUtils.signum(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) {
|
||||
@ -699,7 +699,7 @@ export class ScaleXTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;
|
||||
break;
|
||||
case MixBlend.add:
|
||||
bone.scaleX = (x - bone.data.scaleX) * alpha;
|
||||
bone.scaleX += (x - bone.data.scaleX) * alpha;
|
||||
}
|
||||
} else {
|
||||
switch (blend) {
|
||||
@ -766,7 +766,7 @@ export class ScaleYTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
|
||||
break;
|
||||
case MixBlend.add:
|
||||
bone.scaleY = (y - bone.data.scaleY) * alpha;
|
||||
bone.scaleY += (y - bone.data.scaleY) * alpha;
|
||||
}
|
||||
} else {
|
||||
switch (blend) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user