mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-01 13:19:08 +08:00
[ts] Fix up for compression IK timeline keys.
This commit is contained in:
parent
18f2ccf480
commit
d079555f84
@ -981,11 +981,13 @@ var spine;
|
|||||||
case MixBlend.setup:
|
case MixBlend.setup:
|
||||||
constraint.mix = constraint.data.mix;
|
constraint.mix = constraint.data.mix;
|
||||||
constraint.bendDirection = constraint.data.bendDirection;
|
constraint.bendDirection = constraint.data.bendDirection;
|
||||||
|
constraint.compress = constraint.data.compress;
|
||||||
constraint.stretch = constraint.data.stretch;
|
constraint.stretch = constraint.data.stretch;
|
||||||
return;
|
return;
|
||||||
case MixBlend.first:
|
case MixBlend.first:
|
||||||
constraint.mix += (constraint.data.mix - constraint.mix) * alpha;
|
constraint.mix += (constraint.data.mix - constraint.mix) * alpha;
|
||||||
constraint.bendDirection = constraint.data.bendDirection;
|
constraint.bendDirection = constraint.data.bendDirection;
|
||||||
|
constraint.compress = constraint.data.compress;
|
||||||
constraint.stretch = constraint.data.stretch;
|
constraint.stretch = constraint.data.stretch;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -995,10 +997,12 @@ var spine;
|
|||||||
constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;
|
constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;
|
||||||
if (direction == MixDirection.out) {
|
if (direction == MixDirection.out) {
|
||||||
constraint.bendDirection = constraint.data.bendDirection;
|
constraint.bendDirection = constraint.data.bendDirection;
|
||||||
|
constraint.compress = constraint.data.compress;
|
||||||
constraint.stretch = constraint.data.stretch;
|
constraint.stretch = constraint.data.stretch;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
||||||
|
constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;
|
||||||
constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;
|
constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1006,6 +1010,7 @@ var spine;
|
|||||||
constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;
|
constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;
|
||||||
if (direction == MixDirection["in"]) {
|
if (direction == MixDirection["in"]) {
|
||||||
constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
||||||
|
constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;
|
||||||
constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;
|
constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1019,10 +1024,12 @@ var spine;
|
|||||||
constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;
|
constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;
|
||||||
if (direction == MixDirection.out) {
|
if (direction == MixDirection.out) {
|
||||||
constraint.bendDirection = constraint.data.bendDirection;
|
constraint.bendDirection = constraint.data.bendDirection;
|
||||||
|
constraint.compress = constraint.data.compress;
|
||||||
constraint.stretch = constraint.data.stretch;
|
constraint.stretch = constraint.data.stretch;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
||||||
|
constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;
|
||||||
constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;
|
constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1030,6 +1037,7 @@ var spine;
|
|||||||
constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;
|
constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;
|
||||||
if (direction == MixDirection["in"]) {
|
if (direction == MixDirection["in"]) {
|
||||||
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
||||||
|
constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;
|
||||||
constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;
|
constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1071,11 +1071,13 @@ module spine {
|
|||||||
case MixBlend.setup:
|
case MixBlend.setup:
|
||||||
constraint.mix = constraint.data.mix;
|
constraint.mix = constraint.data.mix;
|
||||||
constraint.bendDirection = constraint.data.bendDirection;
|
constraint.bendDirection = constraint.data.bendDirection;
|
||||||
|
constraint.compress = constraint.data.compress;
|
||||||
constraint.stretch = constraint.data.stretch;
|
constraint.stretch = constraint.data.stretch;
|
||||||
return;
|
return;
|
||||||
case MixBlend.first:
|
case MixBlend.first:
|
||||||
constraint.mix += (constraint.data.mix - constraint.mix) * alpha;
|
constraint.mix += (constraint.data.mix - constraint.mix) * alpha;
|
||||||
constraint.bendDirection = constraint.data.bendDirection;
|
constraint.bendDirection = constraint.data.bendDirection;
|
||||||
|
constraint.compress = constraint.data.compress;
|
||||||
constraint.stretch = constraint.data.stretch;
|
constraint.stretch = constraint.data.stretch;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -1086,15 +1088,18 @@ module spine {
|
|||||||
constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;
|
constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;
|
||||||
if (direction == MixDirection.out) {
|
if (direction == MixDirection.out) {
|
||||||
constraint.bendDirection = constraint.data.bendDirection;
|
constraint.bendDirection = constraint.data.bendDirection;
|
||||||
|
constraint.compress = constraint.data.compress;
|
||||||
constraint.stretch = constraint.data.stretch;
|
constraint.stretch = constraint.data.stretch;
|
||||||
} else {
|
} else {
|
||||||
constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]
|
constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]
|
||||||
|
constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;
|
||||||
constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;
|
constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;
|
constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;
|
||||||
if (direction == MixDirection.in) {
|
if (direction == MixDirection.in) {
|
||||||
constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
||||||
|
constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;
|
||||||
constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;
|
constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1112,15 +1117,18 @@ module spine {
|
|||||||
constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;
|
constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;
|
||||||
if (direction == MixDirection.out) {
|
if (direction == MixDirection.out) {
|
||||||
constraint.bendDirection = constraint.data.bendDirection;
|
constraint.bendDirection = constraint.data.bendDirection;
|
||||||
|
constraint.compress = constraint.data.compress;
|
||||||
constraint.stretch = constraint.data.stretch;
|
constraint.stretch = constraint.data.stretch;
|
||||||
} else {
|
} else {
|
||||||
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
||||||
|
constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;
|
||||||
constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;
|
constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;
|
constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;
|
||||||
if (direction == MixDirection.in) {
|
if (direction == MixDirection.in) {
|
||||||
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
|
||||||
|
constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;
|
||||||
constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;
|
constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user