mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 06:44:56 +08:00
[libgdx] Skip updateLocalTransform for 1 slider mix. Use updateLocalTransform for slider control bone.
This commit is contained in:
parent
70031018f2
commit
961865cda0
@ -65,6 +65,7 @@ public class Slider extends Constraint<Slider, SliderData, SliderPose> {
|
||||
Animation animation = data.animation;
|
||||
if (bone != null) {
|
||||
if (!bone.active) return;
|
||||
if (data.local) bone.applied.modifyLocal(skeleton);
|
||||
p.time = (data.property.value(bone.applied, data.local, offsets) - data.property.offset) * data.scale;
|
||||
if (data.loop)
|
||||
p.time = animation.duration + (p.time % animation.duration);
|
||||
@ -72,10 +73,12 @@ public class Slider extends Constraint<Slider, SliderData, SliderPose> {
|
||||
p.time = Math.max(0, p.time);
|
||||
}
|
||||
|
||||
Bone[] bones = skeleton.bones.items;
|
||||
Timeline[] timelines = animation.timelines.items;
|
||||
for (int i = 0, n = animation.timelines.size; i < n; i++)
|
||||
if (timelines[i] instanceof BoneTimeline timeline) bones[timeline.getBoneIndex()].applied.modifyLocal(skeleton);
|
||||
if (p.mix != 1) {
|
||||
Bone[] bones = skeleton.bones.items;
|
||||
Timeline[] timelines = animation.timelines.items;
|
||||
for (int i = 0, n = animation.timelines.size; i < n; i++)
|
||||
if (timelines[i] instanceof BoneTimeline timeline) bones[timeline.getBoneIndex()].applied.modifyLocal(skeleton);
|
||||
}
|
||||
|
||||
animation.apply(skeleton, p.time, p.time, data.loop, null, p.mix, data.additive ? MixBlend.add : MixBlend.replace,
|
||||
MixDirection.in, true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user