mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
[ts] Fix SkeletonBinary read sequence. Fix Animation ScaleYTimeline.
This commit is contained in:
parent
9b5dcdac1f
commit
dca79e4731
@ -708,7 +708,7 @@ export class ScaleYTimeline extends CurveTimeline1 implements BoneTimeline {
|
|||||||
|
|
||||||
apply (skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection) {
|
apply (skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection) {
|
||||||
let bone = skeleton.bones[this.boneIndex];
|
let bone = skeleton.bones[this.boneIndex];
|
||||||
if (bone.active) bone.scaleY = this.getScaleValue(time, alpha, blend, direction, bone.scaleX, bone.data.scaleY);
|
if (bone.active) bone.scaleY = this.getScaleValue(time, alpha, blend, direction, bone.scaleY, bone.data.scaleY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1694,7 +1694,7 @@ export class DrawOrderTimeline extends Timeline {
|
|||||||
/** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},
|
/** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},
|
||||||
* {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */
|
* {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */
|
||||||
export class IkConstraintTimeline extends CurveTimeline {
|
export class IkConstraintTimeline extends CurveTimeline {
|
||||||
/** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is */
|
/** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
|
||||||
constraintIndex: number = 0;
|
constraintIndex: number = 0;
|
||||||
|
|
||||||
constructor (frameCount: number, bezierCount: number, ikConstraintIndex: number) {
|
constructor (frameCount: number, bezierCount: number, ikConstraintIndex: number) {
|
||||||
|
|||||||
@ -531,7 +531,6 @@ export class SkeletonBinary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private readSequence (input: BinaryInput) {
|
private readSequence (input: BinaryInput) {
|
||||||
if (!input.readBoolean()) return null;
|
|
||||||
let sequence = new Sequence(input.readInt(true));
|
let sequence = new Sequence(input.readInt(true));
|
||||||
sequence.start = input.readInt(true);
|
sequence.start = input.readInt(true);
|
||||||
sequence.digits = input.readInt(true);
|
sequence.digits = input.readInt(true);
|
||||||
|
|||||||
@ -246,8 +246,8 @@ export class SkeletonJson {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root.physics) {
|
|
||||||
// Physics constraints.
|
// Physics constraints.
|
||||||
|
if (root.physics) {
|
||||||
for (let i = 0; i < root.physics.length; i++) {
|
for (let i = 0; i < root.physics.length; i++) {
|
||||||
const constraintMap = root.physics[i];
|
const constraintMap = root.physics[i];
|
||||||
const data = new PhysicsConstraintData(constraintMap.name);
|
const data = new PhysicsConstraintData(constraintMap.name);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user