[ts] Update build artifacts.

This commit is contained in:
Mario Zechner 2021-05-31 11:49:37 +02:00
parent 87b6810675
commit 315ad0e523
18 changed files with 75282 additions and 75318 deletions

View File

@ -447,7 +447,6 @@ declare module spine {
ascaleY: number;
ashearX: number;
ashearY: number;
appliedValid: boolean;
a: number;
b: number;
c: number;

View File

@ -2136,15 +2136,14 @@ var spine;
}
else {
var timelineMode = current.timelineMode;
var firstFrame = current.timelinesRotation.length == 0;
var firstFrame = current.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = current.timelinesRotation;
current.timelinesRotation.length = timelineCount << 1;
for (var ii = 0; ii < timelineCount; ii++) {
var timeline_1 = timelines[ii];
var timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : spine.MixBlend.setup;
if (timeline_1 instanceof spine.RotateTimeline) {
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
}
else if (timeline_1 instanceof spine.AttachmentTimeline) {
this.applyAttachmentTimeline(timeline_1, skeleton, applyTime, blend, true);
@ -2207,10 +2206,9 @@ var spine;
else {
var timelineMode = from.timelineMode;
var timelineHoldMix = from.timelineHoldMix;
var firstFrame = from.timelinesRotation.length == 0;
var firstFrame = from.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = from.timelinesRotation;
from.timelinesRotation.length = timelineCount << 1;
from.totalAlpha = 0;
for (var i = 0; i < timelineCount; i++) {
var timeline = timelines[i];
@ -2244,7 +2242,7 @@ var spine;
}
from.totalAlpha += alpha;
if (timeline instanceof spine.RotateTimeline)
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
else if (timeline instanceof spine.AttachmentTimeline)
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
else {
@ -2557,9 +2555,10 @@ var spine;
var to = entry.mixingTo;
var timelines = entry.animation.timelines;
var timelinesCount = entry.animation.timelines.length;
var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);
entry.timelineHoldMix.length = 0;
var timelineHoldMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);
var timelineMode = entry.timelineMode;
timelineMode.length = timelinesCount;
var timelineHoldMix = entry.timelineHoldMix;
timelineHoldMix.length = 0;
var propertyIDs = this.propertyIDs;
if (to != null && to.holdPrevious) {
for (var i = 0; i < timelinesCount; i++)
@ -3140,7 +3139,6 @@ var spine;
this.ascaleY = 0;
this.ashearX = 0;
this.ashearY = 0;
this.appliedValid = false;
this.a = 0;
this.b = 0;
this.c = 0;
@ -3162,7 +3160,7 @@ var spine;
return this.active;
};
Bone.prototype.update = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);
};
Bone.prototype.updateWorldTransform = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
@ -3175,7 +3173,6 @@ var spine;
this.ascaleY = scaleY;
this.ashearX = shearX;
this.ashearY = shearY;
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
var skeleton = this.skeleton;
@ -3299,7 +3296,6 @@ var spine;
return Math.sqrt(this.b * this.b + this.d * this.d);
};
Bone.prototype.updateAppliedTransform = function () {
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
this.ax = this.worldX;
@ -3368,7 +3364,6 @@ var spine;
this.b = cos * b - sin * d;
this.c = sin * a + cos * c;
this.d = sin * b + cos * d;
this.appliedValid = false;
};
return Bone;
}());
@ -3486,8 +3481,6 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var pa = p.a, pb = p.b, pc = p.c, pd = p.d;
var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;
@ -3535,10 +3528,6 @@ var spine;
bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);
};
IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {
if (!parent.appliedValid)
parent.updateAppliedTransform();
if (!child.appliedValid)
child.updateAppliedTransform();
var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;
var os1 = 0, os2 = 0, s2 = 0;
if (psx < 0) {
@ -3868,7 +3857,7 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents) {
@ -4561,6 +4550,17 @@ var spine;
}
};
Skeleton.prototype.updateWorldTransform = function () {
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
bone.ax = bone.x;
bone.ay = bone.y;
bone.arotation = bone.rotation;
bone.ascaleX = bone.scaleX;
bone.ascaleY = bone.scaleY;
bone.ashearX = bone.shearX;
bone.ashearY = bone.shearY;
}
var updateCache = this._updateCache;
for (var i = 0, n = updateCache.length; i < n; i++)
updateCache[i].update();
@ -7554,9 +7554,12 @@ var spine;
Slot.prototype.setAttachment = function (attachment) {
if (this.attachment == attachment)
return;
if (!(attachment instanceof spine.VertexAttachment) || !(this.attachment instanceof spine.VertexAttachment)
|| attachment.deformAttachment != this.attachment.deformAttachment) {
this.deform.length = 0;
}
this.attachment = attachment;
this.attachmentTime = this.bone.skeleton.time;
this.deform.length = 0;
};
Slot.prototype.setAttachmentTime = function (time) {
this.attachmentTime = this.bone.skeleton.time - time;
@ -7992,7 +7995,7 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyRelativeWorld = function () {
@ -8047,19 +8050,15 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyAbsoluteLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation;
if (mixRotate != 0) {
var r = target.arotation - rotation + this.data.offsetRotation;
@ -8086,13 +8085,9 @@ var spine;
TransformConstraint.prototype.applyRelativeLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;
var x = bone.ax + (target.ax + this.data.offsetX) * mixX;
var y = bone.ay + (target.ay + this.data.offsetY) * mixY;

File diff suppressed because one or more lines are too long

View File

@ -447,7 +447,6 @@ declare module spine {
ascaleY: number;
ashearX: number;
ashearY: number;
appliedValid: boolean;
a: number;
b: number;
c: number;

View File

@ -2136,15 +2136,14 @@ var spine;
}
else {
var timelineMode = current.timelineMode;
var firstFrame = current.timelinesRotation.length == 0;
var firstFrame = current.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = current.timelinesRotation;
current.timelinesRotation.length = timelineCount << 1;
for (var ii = 0; ii < timelineCount; ii++) {
var timeline_1 = timelines[ii];
var timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : spine.MixBlend.setup;
if (timeline_1 instanceof spine.RotateTimeline) {
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
}
else if (timeline_1 instanceof spine.AttachmentTimeline) {
this.applyAttachmentTimeline(timeline_1, skeleton, applyTime, blend, true);
@ -2207,10 +2206,9 @@ var spine;
else {
var timelineMode = from.timelineMode;
var timelineHoldMix = from.timelineHoldMix;
var firstFrame = from.timelinesRotation.length == 0;
var firstFrame = from.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = from.timelinesRotation;
from.timelinesRotation.length = timelineCount << 1;
from.totalAlpha = 0;
for (var i = 0; i < timelineCount; i++) {
var timeline = timelines[i];
@ -2244,7 +2242,7 @@ var spine;
}
from.totalAlpha += alpha;
if (timeline instanceof spine.RotateTimeline)
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
else if (timeline instanceof spine.AttachmentTimeline)
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
else {
@ -2557,9 +2555,10 @@ var spine;
var to = entry.mixingTo;
var timelines = entry.animation.timelines;
var timelinesCount = entry.animation.timelines.length;
var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);
entry.timelineHoldMix.length = 0;
var timelineHoldMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);
var timelineMode = entry.timelineMode;
timelineMode.length = timelinesCount;
var timelineHoldMix = entry.timelineHoldMix;
timelineHoldMix.length = 0;
var propertyIDs = this.propertyIDs;
if (to != null && to.holdPrevious) {
for (var i = 0; i < timelinesCount; i++)
@ -3140,7 +3139,6 @@ var spine;
this.ascaleY = 0;
this.ashearX = 0;
this.ashearY = 0;
this.appliedValid = false;
this.a = 0;
this.b = 0;
this.c = 0;
@ -3162,7 +3160,7 @@ var spine;
return this.active;
};
Bone.prototype.update = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);
};
Bone.prototype.updateWorldTransform = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
@ -3175,7 +3173,6 @@ var spine;
this.ascaleY = scaleY;
this.ashearX = shearX;
this.ashearY = shearY;
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
var skeleton = this.skeleton;
@ -3299,7 +3296,6 @@ var spine;
return Math.sqrt(this.b * this.b + this.d * this.d);
};
Bone.prototype.updateAppliedTransform = function () {
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
this.ax = this.worldX;
@ -3368,7 +3364,6 @@ var spine;
this.b = cos * b - sin * d;
this.c = sin * a + cos * c;
this.d = sin * b + cos * d;
this.appliedValid = false;
};
return Bone;
}());
@ -3486,8 +3481,6 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var pa = p.a, pb = p.b, pc = p.c, pd = p.d;
var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;
@ -3535,10 +3528,6 @@ var spine;
bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);
};
IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {
if (!parent.appliedValid)
parent.updateAppliedTransform();
if (!child.appliedValid)
child.updateAppliedTransform();
var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;
var os1 = 0, os2 = 0, s2 = 0;
if (psx < 0) {
@ -3868,7 +3857,7 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents) {
@ -4561,6 +4550,17 @@ var spine;
}
};
Skeleton.prototype.updateWorldTransform = function () {
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
bone.ax = bone.x;
bone.ay = bone.y;
bone.arotation = bone.rotation;
bone.ascaleX = bone.scaleX;
bone.ascaleY = bone.scaleY;
bone.ashearX = bone.shearX;
bone.ashearY = bone.shearY;
}
var updateCache = this._updateCache;
for (var i = 0, n = updateCache.length; i < n; i++)
updateCache[i].update();
@ -7554,9 +7554,12 @@ var spine;
Slot.prototype.setAttachment = function (attachment) {
if (this.attachment == attachment)
return;
if (!(attachment instanceof spine.VertexAttachment) || !(this.attachment instanceof spine.VertexAttachment)
|| attachment.deformAttachment != this.attachment.deformAttachment) {
this.deform.length = 0;
}
this.attachment = attachment;
this.attachmentTime = this.bone.skeleton.time;
this.deform.length = 0;
};
Slot.prototype.setAttachmentTime = function (time) {
this.attachmentTime = this.bone.skeleton.time - time;
@ -7992,7 +7995,7 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyRelativeWorld = function () {
@ -8047,19 +8050,15 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyAbsoluteLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation;
if (mixRotate != 0) {
var r = target.arotation - rotation + this.data.offsetRotation;
@ -8086,13 +8085,9 @@ var spine;
TransformConstraint.prototype.applyRelativeLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;
var x = bone.ax + (target.ax + this.data.offsetX) * mixX;
var y = bone.ay + (target.ay + this.data.offsetY) * mixY;

File diff suppressed because one or more lines are too long

View File

@ -447,7 +447,6 @@ declare module spine {
ascaleY: number;
ashearX: number;
ashearY: number;
appliedValid: boolean;
a: number;
b: number;
c: number;

View File

@ -2136,15 +2136,14 @@ var spine;
}
else {
var timelineMode = current.timelineMode;
var firstFrame = current.timelinesRotation.length == 0;
var firstFrame = current.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = current.timelinesRotation;
current.timelinesRotation.length = timelineCount << 1;
for (var ii = 0; ii < timelineCount; ii++) {
var timeline_1 = timelines[ii];
var timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : spine.MixBlend.setup;
if (timeline_1 instanceof spine.RotateTimeline) {
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
}
else if (timeline_1 instanceof spine.AttachmentTimeline) {
this.applyAttachmentTimeline(timeline_1, skeleton, applyTime, blend, true);
@ -2207,10 +2206,9 @@ var spine;
else {
var timelineMode = from.timelineMode;
var timelineHoldMix = from.timelineHoldMix;
var firstFrame = from.timelinesRotation.length == 0;
var firstFrame = from.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = from.timelinesRotation;
from.timelinesRotation.length = timelineCount << 1;
from.totalAlpha = 0;
for (var i = 0; i < timelineCount; i++) {
var timeline = timelines[i];
@ -2244,7 +2242,7 @@ var spine;
}
from.totalAlpha += alpha;
if (timeline instanceof spine.RotateTimeline)
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
else if (timeline instanceof spine.AttachmentTimeline)
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
else {
@ -2557,9 +2555,10 @@ var spine;
var to = entry.mixingTo;
var timelines = entry.animation.timelines;
var timelinesCount = entry.animation.timelines.length;
var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);
entry.timelineHoldMix.length = 0;
var timelineHoldMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);
var timelineMode = entry.timelineMode;
timelineMode.length = timelinesCount;
var timelineHoldMix = entry.timelineHoldMix;
timelineHoldMix.length = 0;
var propertyIDs = this.propertyIDs;
if (to != null && to.holdPrevious) {
for (var i = 0; i < timelinesCount; i++)
@ -3140,7 +3139,6 @@ var spine;
this.ascaleY = 0;
this.ashearX = 0;
this.ashearY = 0;
this.appliedValid = false;
this.a = 0;
this.b = 0;
this.c = 0;
@ -3162,7 +3160,7 @@ var spine;
return this.active;
};
Bone.prototype.update = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);
};
Bone.prototype.updateWorldTransform = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
@ -3175,7 +3173,6 @@ var spine;
this.ascaleY = scaleY;
this.ashearX = shearX;
this.ashearY = shearY;
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
var skeleton = this.skeleton;
@ -3299,7 +3296,6 @@ var spine;
return Math.sqrt(this.b * this.b + this.d * this.d);
};
Bone.prototype.updateAppliedTransform = function () {
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
this.ax = this.worldX;
@ -3368,7 +3364,6 @@ var spine;
this.b = cos * b - sin * d;
this.c = sin * a + cos * c;
this.d = sin * b + cos * d;
this.appliedValid = false;
};
return Bone;
}());
@ -3486,8 +3481,6 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var pa = p.a, pb = p.b, pc = p.c, pd = p.d;
var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;
@ -3535,10 +3528,6 @@ var spine;
bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);
};
IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {
if (!parent.appliedValid)
parent.updateAppliedTransform();
if (!child.appliedValid)
child.updateAppliedTransform();
var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;
var os1 = 0, os2 = 0, s2 = 0;
if (psx < 0) {
@ -3868,7 +3857,7 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents) {
@ -4561,6 +4550,17 @@ var spine;
}
};
Skeleton.prototype.updateWorldTransform = function () {
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
bone.ax = bone.x;
bone.ay = bone.y;
bone.arotation = bone.rotation;
bone.ascaleX = bone.scaleX;
bone.ascaleY = bone.scaleY;
bone.ashearX = bone.shearX;
bone.ashearY = bone.shearY;
}
var updateCache = this._updateCache;
for (var i = 0, n = updateCache.length; i < n; i++)
updateCache[i].update();
@ -7554,9 +7554,12 @@ var spine;
Slot.prototype.setAttachment = function (attachment) {
if (this.attachment == attachment)
return;
if (!(attachment instanceof spine.VertexAttachment) || !(this.attachment instanceof spine.VertexAttachment)
|| attachment.deformAttachment != this.attachment.deformAttachment) {
this.deform.length = 0;
}
this.attachment = attachment;
this.attachmentTime = this.bone.skeleton.time;
this.deform.length = 0;
};
Slot.prototype.setAttachmentTime = function (time) {
this.attachmentTime = this.bone.skeleton.time - time;
@ -7992,7 +7995,7 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyRelativeWorld = function () {
@ -8047,19 +8050,15 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyAbsoluteLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation;
if (mixRotate != 0) {
var r = target.arotation - rotation + this.data.offsetRotation;
@ -8086,13 +8085,9 @@ var spine;
TransformConstraint.prototype.applyRelativeLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;
var x = bone.ax + (target.ax + this.data.offsetX) * mixX;
var y = bone.ay + (target.ay + this.data.offsetY) * mixY;

File diff suppressed because one or more lines are too long

View File

@ -447,7 +447,6 @@ declare module spine {
ascaleY: number;
ashearX: number;
ashearY: number;
appliedValid: boolean;
a: number;
b: number;
c: number;

View File

@ -2136,15 +2136,14 @@ var spine;
}
else {
var timelineMode = current.timelineMode;
var firstFrame = current.timelinesRotation.length == 0;
var firstFrame = current.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = current.timelinesRotation;
current.timelinesRotation.length = timelineCount << 1;
for (var ii = 0; ii < timelineCount; ii++) {
var timeline_1 = timelines[ii];
var timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : spine.MixBlend.setup;
if (timeline_1 instanceof spine.RotateTimeline) {
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
}
else if (timeline_1 instanceof spine.AttachmentTimeline) {
this.applyAttachmentTimeline(timeline_1, skeleton, applyTime, blend, true);
@ -2207,10 +2206,9 @@ var spine;
else {
var timelineMode = from.timelineMode;
var timelineHoldMix = from.timelineHoldMix;
var firstFrame = from.timelinesRotation.length == 0;
var firstFrame = from.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = from.timelinesRotation;
from.timelinesRotation.length = timelineCount << 1;
from.totalAlpha = 0;
for (var i = 0; i < timelineCount; i++) {
var timeline = timelines[i];
@ -2244,7 +2242,7 @@ var spine;
}
from.totalAlpha += alpha;
if (timeline instanceof spine.RotateTimeline)
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
else if (timeline instanceof spine.AttachmentTimeline)
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
else {
@ -2557,9 +2555,10 @@ var spine;
var to = entry.mixingTo;
var timelines = entry.animation.timelines;
var timelinesCount = entry.animation.timelines.length;
var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);
entry.timelineHoldMix.length = 0;
var timelineHoldMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);
var timelineMode = entry.timelineMode;
timelineMode.length = timelinesCount;
var timelineHoldMix = entry.timelineHoldMix;
timelineHoldMix.length = 0;
var propertyIDs = this.propertyIDs;
if (to != null && to.holdPrevious) {
for (var i = 0; i < timelinesCount; i++)
@ -3140,7 +3139,6 @@ var spine;
this.ascaleY = 0;
this.ashearX = 0;
this.ashearY = 0;
this.appliedValid = false;
this.a = 0;
this.b = 0;
this.c = 0;
@ -3162,7 +3160,7 @@ var spine;
return this.active;
};
Bone.prototype.update = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);
};
Bone.prototype.updateWorldTransform = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
@ -3175,7 +3173,6 @@ var spine;
this.ascaleY = scaleY;
this.ashearX = shearX;
this.ashearY = shearY;
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
var skeleton = this.skeleton;
@ -3299,7 +3296,6 @@ var spine;
return Math.sqrt(this.b * this.b + this.d * this.d);
};
Bone.prototype.updateAppliedTransform = function () {
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
this.ax = this.worldX;
@ -3368,7 +3364,6 @@ var spine;
this.b = cos * b - sin * d;
this.c = sin * a + cos * c;
this.d = sin * b + cos * d;
this.appliedValid = false;
};
return Bone;
}());
@ -3486,8 +3481,6 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var pa = p.a, pb = p.b, pc = p.c, pd = p.d;
var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;
@ -3535,10 +3528,6 @@ var spine;
bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);
};
IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {
if (!parent.appliedValid)
parent.updateAppliedTransform();
if (!child.appliedValid)
child.updateAppliedTransform();
var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;
var os1 = 0, os2 = 0, s2 = 0;
if (psx < 0) {
@ -3868,7 +3857,7 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents) {
@ -4561,6 +4550,17 @@ var spine;
}
};
Skeleton.prototype.updateWorldTransform = function () {
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
bone.ax = bone.x;
bone.ay = bone.y;
bone.arotation = bone.rotation;
bone.ascaleX = bone.scaleX;
bone.ascaleY = bone.scaleY;
bone.ashearX = bone.shearX;
bone.ashearY = bone.shearY;
}
var updateCache = this._updateCache;
for (var i = 0, n = updateCache.length; i < n; i++)
updateCache[i].update();
@ -7554,9 +7554,12 @@ var spine;
Slot.prototype.setAttachment = function (attachment) {
if (this.attachment == attachment)
return;
if (!(attachment instanceof spine.VertexAttachment) || !(this.attachment instanceof spine.VertexAttachment)
|| attachment.deformAttachment != this.attachment.deformAttachment) {
this.deform.length = 0;
}
this.attachment = attachment;
this.attachmentTime = this.bone.skeleton.time;
this.deform.length = 0;
};
Slot.prototype.setAttachmentTime = function (time) {
this.attachmentTime = this.bone.skeleton.time - time;
@ -7992,7 +7995,7 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyRelativeWorld = function () {
@ -8047,19 +8050,15 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyAbsoluteLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation;
if (mixRotate != 0) {
var r = target.arotation - rotation + this.data.offsetRotation;
@ -8086,13 +8085,9 @@ var spine;
TransformConstraint.prototype.applyRelativeLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;
var x = bone.ax + (target.ax + this.data.offsetX) * mixX;
var y = bone.ay + (target.ay + this.data.offsetY) * mixY;

File diff suppressed because one or more lines are too long

View File

@ -447,7 +447,6 @@ declare module spine {
ascaleY: number;
ashearX: number;
ashearY: number;
appliedValid: boolean;
a: number;
b: number;
c: number;

View File

@ -2136,15 +2136,14 @@ var spine;
}
else {
var timelineMode = current.timelineMode;
var firstFrame = current.timelinesRotation.length == 0;
var firstFrame = current.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = current.timelinesRotation;
current.timelinesRotation.length = timelineCount << 1;
for (var ii = 0; ii < timelineCount; ii++) {
var timeline_1 = timelines[ii];
var timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : spine.MixBlend.setup;
if (timeline_1 instanceof spine.RotateTimeline) {
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
}
else if (timeline_1 instanceof spine.AttachmentTimeline) {
this.applyAttachmentTimeline(timeline_1, skeleton, applyTime, blend, true);
@ -2207,10 +2206,9 @@ var spine;
else {
var timelineMode = from.timelineMode;
var timelineHoldMix = from.timelineHoldMix;
var firstFrame = from.timelinesRotation.length == 0;
var firstFrame = from.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = from.timelinesRotation;
from.timelinesRotation.length = timelineCount << 1;
from.totalAlpha = 0;
for (var i = 0; i < timelineCount; i++) {
var timeline = timelines[i];
@ -2244,7 +2242,7 @@ var spine;
}
from.totalAlpha += alpha;
if (timeline instanceof spine.RotateTimeline)
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
else if (timeline instanceof spine.AttachmentTimeline)
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
else {
@ -2557,9 +2555,10 @@ var spine;
var to = entry.mixingTo;
var timelines = entry.animation.timelines;
var timelinesCount = entry.animation.timelines.length;
var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);
entry.timelineHoldMix.length = 0;
var timelineHoldMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);
var timelineMode = entry.timelineMode;
timelineMode.length = timelinesCount;
var timelineHoldMix = entry.timelineHoldMix;
timelineHoldMix.length = 0;
var propertyIDs = this.propertyIDs;
if (to != null && to.holdPrevious) {
for (var i = 0; i < timelinesCount; i++)
@ -3140,7 +3139,6 @@ var spine;
this.ascaleY = 0;
this.ashearX = 0;
this.ashearY = 0;
this.appliedValid = false;
this.a = 0;
this.b = 0;
this.c = 0;
@ -3162,7 +3160,7 @@ var spine;
return this.active;
};
Bone.prototype.update = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);
};
Bone.prototype.updateWorldTransform = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
@ -3175,7 +3173,6 @@ var spine;
this.ascaleY = scaleY;
this.ashearX = shearX;
this.ashearY = shearY;
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
var skeleton = this.skeleton;
@ -3299,7 +3296,6 @@ var spine;
return Math.sqrt(this.b * this.b + this.d * this.d);
};
Bone.prototype.updateAppliedTransform = function () {
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
this.ax = this.worldX;
@ -3368,7 +3364,6 @@ var spine;
this.b = cos * b - sin * d;
this.c = sin * a + cos * c;
this.d = sin * b + cos * d;
this.appliedValid = false;
};
return Bone;
}());
@ -3486,8 +3481,6 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var pa = p.a, pb = p.b, pc = p.c, pd = p.d;
var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;
@ -3535,10 +3528,6 @@ var spine;
bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);
};
IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {
if (!parent.appliedValid)
parent.updateAppliedTransform();
if (!child.appliedValid)
child.updateAppliedTransform();
var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;
var os1 = 0, os2 = 0, s2 = 0;
if (psx < 0) {
@ -3868,7 +3857,7 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents) {
@ -4561,6 +4550,17 @@ var spine;
}
};
Skeleton.prototype.updateWorldTransform = function () {
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
bone.ax = bone.x;
bone.ay = bone.y;
bone.arotation = bone.rotation;
bone.ascaleX = bone.scaleX;
bone.ascaleY = bone.scaleY;
bone.ashearX = bone.shearX;
bone.ashearY = bone.shearY;
}
var updateCache = this._updateCache;
for (var i = 0, n = updateCache.length; i < n; i++)
updateCache[i].update();
@ -7554,9 +7554,12 @@ var spine;
Slot.prototype.setAttachment = function (attachment) {
if (this.attachment == attachment)
return;
if (!(attachment instanceof spine.VertexAttachment) || !(this.attachment instanceof spine.VertexAttachment)
|| attachment.deformAttachment != this.attachment.deformAttachment) {
this.deform.length = 0;
}
this.attachment = attachment;
this.attachmentTime = this.bone.skeleton.time;
this.deform.length = 0;
};
Slot.prototype.setAttachmentTime = function (time) {
this.attachmentTime = this.bone.skeleton.time - time;
@ -7992,7 +7995,7 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyRelativeWorld = function () {
@ -8047,19 +8050,15 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyAbsoluteLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation;
if (mixRotate != 0) {
var r = target.arotation - rotation + this.data.offsetRotation;
@ -8086,13 +8085,9 @@ var spine;
TransformConstraint.prototype.applyRelativeLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;
var x = bone.ax + (target.ax + this.data.offsetX) * mixX;
var y = bone.ay + (target.ay + this.data.offsetY) * mixY;

File diff suppressed because one or more lines are too long

View File

@ -447,7 +447,6 @@ declare module spine {
ascaleY: number;
ashearX: number;
ashearY: number;
appliedValid: boolean;
a: number;
b: number;
c: number;

View File

@ -2136,15 +2136,14 @@ var spine;
}
else {
var timelineMode = current.timelineMode;
var firstFrame = current.timelinesRotation.length == 0;
var firstFrame = current.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = current.timelinesRotation;
current.timelinesRotation.length = timelineCount << 1;
for (var ii = 0; ii < timelineCount; ii++) {
var timeline_1 = timelines[ii];
var timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : spine.MixBlend.setup;
if (timeline_1 instanceof spine.RotateTimeline) {
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);
this.applyRotateTimeline(timeline_1, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
}
else if (timeline_1 instanceof spine.AttachmentTimeline) {
this.applyAttachmentTimeline(timeline_1, skeleton, applyTime, blend, true);
@ -2207,10 +2206,9 @@ var spine;
else {
var timelineMode = from.timelineMode;
var timelineHoldMix = from.timelineHoldMix;
var firstFrame = from.timelinesRotation.length == 0;
var firstFrame = from.timelinesRotation.length != timelineCount << 1;
if (firstFrame)
spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);
var timelinesRotation = from.timelinesRotation;
from.timelinesRotation.length = timelineCount << 1;
from.totalAlpha = 0;
for (var i = 0; i < timelineCount; i++) {
var timeline = timelines[i];
@ -2244,7 +2242,7 @@ var spine;
}
from.totalAlpha += alpha;
if (timeline instanceof spine.RotateTimeline)
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
else if (timeline instanceof spine.AttachmentTimeline)
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
else {
@ -2557,9 +2555,10 @@ var spine;
var to = entry.mixingTo;
var timelines = entry.animation.timelines;
var timelinesCount = entry.animation.timelines.length;
var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);
entry.timelineHoldMix.length = 0;
var timelineHoldMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);
var timelineMode = entry.timelineMode;
timelineMode.length = timelinesCount;
var timelineHoldMix = entry.timelineHoldMix;
timelineHoldMix.length = 0;
var propertyIDs = this.propertyIDs;
if (to != null && to.holdPrevious) {
for (var i = 0; i < timelinesCount; i++)
@ -3140,7 +3139,6 @@ var spine;
this.ascaleY = 0;
this.ashearX = 0;
this.ashearY = 0;
this.appliedValid = false;
this.a = 0;
this.b = 0;
this.c = 0;
@ -3162,7 +3160,7 @@ var spine;
return this.active;
};
Bone.prototype.update = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);
};
Bone.prototype.updateWorldTransform = function () {
this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);
@ -3175,7 +3173,6 @@ var spine;
this.ascaleY = scaleY;
this.ashearX = shearX;
this.ashearY = shearY;
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
var skeleton = this.skeleton;
@ -3299,7 +3296,6 @@ var spine;
return Math.sqrt(this.b * this.b + this.d * this.d);
};
Bone.prototype.updateAppliedTransform = function () {
this.appliedValid = true;
var parent = this.parent;
if (parent == null) {
this.ax = this.worldX;
@ -3368,7 +3364,6 @@ var spine;
this.b = cos * b - sin * d;
this.c = sin * a + cos * c;
this.d = sin * b + cos * d;
this.appliedValid = false;
};
return Bone;
}());
@ -3486,8 +3481,6 @@ var spine;
}
};
IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {
if (!bone.appliedValid)
bone.updateAppliedTransform();
var p = bone.parent;
var pa = p.a, pb = p.b, pc = p.c, pd = p.d;
var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;
@ -3535,10 +3528,6 @@ var spine;
bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);
};
IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {
if (!parent.appliedValid)
parent.updateAppliedTransform();
if (!child.appliedValid)
child.updateAppliedTransform();
var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;
var os1 = 0, os2 = 0, s2 = 0;
if (psx < 0) {
@ -3868,7 +3857,7 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents) {
@ -4561,6 +4550,17 @@ var spine;
}
};
Skeleton.prototype.updateWorldTransform = function () {
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
bone.ax = bone.x;
bone.ay = bone.y;
bone.arotation = bone.rotation;
bone.ascaleX = bone.scaleX;
bone.ascaleY = bone.scaleY;
bone.ashearX = bone.shearX;
bone.ashearY = bone.shearY;
}
var updateCache = this._updateCache;
for (var i = 0, n = updateCache.length; i < n; i++)
updateCache[i].update();
@ -7554,9 +7554,12 @@ var spine;
Slot.prototype.setAttachment = function (attachment) {
if (this.attachment == attachment)
return;
if (!(attachment instanceof spine.VertexAttachment) || !(this.attachment instanceof spine.VertexAttachment)
|| attachment.deformAttachment != this.attachment.deformAttachment) {
this.deform.length = 0;
}
this.attachment = attachment;
this.attachmentTime = this.bone.skeleton.time;
this.deform.length = 0;
};
Slot.prototype.setAttachmentTime = function (time) {
this.attachmentTime = this.bone.skeleton.time - time;
@ -7992,7 +7995,7 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyRelativeWorld = function () {
@ -8047,19 +8050,15 @@ var spine;
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;
bone.updateAppliedTransform();
}
};
TransformConstraint.prototype.applyAbsoluteLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation;
if (mixRotate != 0) {
var r = target.arotation - rotation + this.data.offsetRotation;
@ -8086,13 +8085,9 @@ var spine;
TransformConstraint.prototype.applyRelativeLocal = function () {
var mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
var target = this.target;
if (!target.appliedValid)
target.updateAppliedTransform();
var bones = this.bones;
for (var i = 0, n = bones.length; i < n; i++) {
var bone = bones[i];
if (!bone.appliedValid)
bone.updateAppliedTransform();
var rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;
var x = bone.ax + (target.ax + this.data.offsetX) * mixX;
var y = bone.ay + (target.ay + this.data.offsetY) * mixY;

File diff suppressed because one or more lines are too long