mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ts] Scale IK constraint and timeline data. See #1383.
This commit is contained in:
parent
505719c1f1
commit
9643a27dce
@ -4123,7 +4123,7 @@ var spine;
|
|||||||
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
||||||
data.target = skeletonData.bones[input.readInt(true)];
|
data.target = skeletonData.bones[input.readInt(true)];
|
||||||
data.mix = input.readFloat();
|
data.mix = input.readFloat();
|
||||||
data.softness = input.readFloat();
|
data.softness = input.readFloat() * scale;
|
||||||
data.bendDirection = input.readByte();
|
data.bendDirection = input.readByte();
|
||||||
data.compress = input.readBoolean();
|
data.compress = input.readBoolean();
|
||||||
data.stretch = input.readBoolean();
|
data.stretch = input.readBoolean();
|
||||||
@ -4555,7 +4555,7 @@ var spine;
|
|||||||
var timeline = new spine.IkConstraintTimeline(frameCount);
|
var timeline = new spine.IkConstraintTimeline(frameCount);
|
||||||
timeline.ikConstraintIndex = index;
|
timeline.ikConstraintIndex = index;
|
||||||
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
||||||
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readByte(), input.readBoolean(), input.readBoolean());
|
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());
|
||||||
if (frameIndex < frameCount - 1)
|
if (frameIndex < frameCount - 1)
|
||||||
this.readCurve(input, frameIndex, timeline);
|
this.readCurve(input, frameIndex, timeline);
|
||||||
}
|
}
|
||||||
@ -5539,7 +5539,7 @@ var spine;
|
|||||||
if (data.target == null)
|
if (data.target == null)
|
||||||
throw new Error("IK target bone not found: " + targetName);
|
throw new Error("IK target bone not found: " + targetName);
|
||||||
data.mix = this.getValue(constraintMap, "mix", 1);
|
data.mix = this.getValue(constraintMap, "mix", 1);
|
||||||
data.softness = this.getValue(constraintMap, "softness", 0);
|
data.softness = this.getValue(constraintMap, "softness", 0) * scale;
|
||||||
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
||||||
data.compress = this.getValue(constraintMap, "compress", false);
|
data.compress = this.getValue(constraintMap, "compress", false);
|
||||||
data.stretch = this.getValue(constraintMap, "stretch", false);
|
data.stretch = this.getValue(constraintMap, "stretch", false);
|
||||||
@ -5957,7 +5957,7 @@ var spine;
|
|||||||
var frameIndex = 0;
|
var frameIndex = 0;
|
||||||
for (var i = 0; i < constraintMap.length; i++) {
|
for (var i = 0; i < constraintMap.length; i++) {
|
||||||
var valueMap = constraintMap[i];
|
var valueMap = constraintMap[i];
|
||||||
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0), this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale, this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
||||||
this.readCurve(valueMap, timeline, frameIndex);
|
this.readCurve(valueMap, timeline, frameIndex);
|
||||||
frameIndex++;
|
frameIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -4123,7 +4123,7 @@ var spine;
|
|||||||
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
||||||
data.target = skeletonData.bones[input.readInt(true)];
|
data.target = skeletonData.bones[input.readInt(true)];
|
||||||
data.mix = input.readFloat();
|
data.mix = input.readFloat();
|
||||||
data.softness = input.readFloat();
|
data.softness = input.readFloat() * scale;
|
||||||
data.bendDirection = input.readByte();
|
data.bendDirection = input.readByte();
|
||||||
data.compress = input.readBoolean();
|
data.compress = input.readBoolean();
|
||||||
data.stretch = input.readBoolean();
|
data.stretch = input.readBoolean();
|
||||||
@ -4555,7 +4555,7 @@ var spine;
|
|||||||
var timeline = new spine.IkConstraintTimeline(frameCount);
|
var timeline = new spine.IkConstraintTimeline(frameCount);
|
||||||
timeline.ikConstraintIndex = index;
|
timeline.ikConstraintIndex = index;
|
||||||
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
||||||
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readByte(), input.readBoolean(), input.readBoolean());
|
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());
|
||||||
if (frameIndex < frameCount - 1)
|
if (frameIndex < frameCount - 1)
|
||||||
this.readCurve(input, frameIndex, timeline);
|
this.readCurve(input, frameIndex, timeline);
|
||||||
}
|
}
|
||||||
@ -5539,7 +5539,7 @@ var spine;
|
|||||||
if (data.target == null)
|
if (data.target == null)
|
||||||
throw new Error("IK target bone not found: " + targetName);
|
throw new Error("IK target bone not found: " + targetName);
|
||||||
data.mix = this.getValue(constraintMap, "mix", 1);
|
data.mix = this.getValue(constraintMap, "mix", 1);
|
||||||
data.softness = this.getValue(constraintMap, "softness", 0);
|
data.softness = this.getValue(constraintMap, "softness", 0) * scale;
|
||||||
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
||||||
data.compress = this.getValue(constraintMap, "compress", false);
|
data.compress = this.getValue(constraintMap, "compress", false);
|
||||||
data.stretch = this.getValue(constraintMap, "stretch", false);
|
data.stretch = this.getValue(constraintMap, "stretch", false);
|
||||||
@ -5957,7 +5957,7 @@ var spine;
|
|||||||
var frameIndex = 0;
|
var frameIndex = 0;
|
||||||
for (var i = 0; i < constraintMap.length; i++) {
|
for (var i = 0; i < constraintMap.length; i++) {
|
||||||
var valueMap = constraintMap[i];
|
var valueMap = constraintMap[i];
|
||||||
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0), this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale, this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
||||||
this.readCurve(valueMap, timeline, frameIndex);
|
this.readCurve(valueMap, timeline, frameIndex);
|
||||||
frameIndex++;
|
frameIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -4123,7 +4123,7 @@ var spine;
|
|||||||
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
||||||
data.target = skeletonData.bones[input.readInt(true)];
|
data.target = skeletonData.bones[input.readInt(true)];
|
||||||
data.mix = input.readFloat();
|
data.mix = input.readFloat();
|
||||||
data.softness = input.readFloat();
|
data.softness = input.readFloat() * scale;
|
||||||
data.bendDirection = input.readByte();
|
data.bendDirection = input.readByte();
|
||||||
data.compress = input.readBoolean();
|
data.compress = input.readBoolean();
|
||||||
data.stretch = input.readBoolean();
|
data.stretch = input.readBoolean();
|
||||||
@ -4555,7 +4555,7 @@ var spine;
|
|||||||
var timeline = new spine.IkConstraintTimeline(frameCount);
|
var timeline = new spine.IkConstraintTimeline(frameCount);
|
||||||
timeline.ikConstraintIndex = index;
|
timeline.ikConstraintIndex = index;
|
||||||
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
||||||
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readByte(), input.readBoolean(), input.readBoolean());
|
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());
|
||||||
if (frameIndex < frameCount - 1)
|
if (frameIndex < frameCount - 1)
|
||||||
this.readCurve(input, frameIndex, timeline);
|
this.readCurve(input, frameIndex, timeline);
|
||||||
}
|
}
|
||||||
@ -5539,7 +5539,7 @@ var spine;
|
|||||||
if (data.target == null)
|
if (data.target == null)
|
||||||
throw new Error("IK target bone not found: " + targetName);
|
throw new Error("IK target bone not found: " + targetName);
|
||||||
data.mix = this.getValue(constraintMap, "mix", 1);
|
data.mix = this.getValue(constraintMap, "mix", 1);
|
||||||
data.softness = this.getValue(constraintMap, "softness", 0);
|
data.softness = this.getValue(constraintMap, "softness", 0) * scale;
|
||||||
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
||||||
data.compress = this.getValue(constraintMap, "compress", false);
|
data.compress = this.getValue(constraintMap, "compress", false);
|
||||||
data.stretch = this.getValue(constraintMap, "stretch", false);
|
data.stretch = this.getValue(constraintMap, "stretch", false);
|
||||||
@ -5957,7 +5957,7 @@ var spine;
|
|||||||
var frameIndex = 0;
|
var frameIndex = 0;
|
||||||
for (var i = 0; i < constraintMap.length; i++) {
|
for (var i = 0; i < constraintMap.length; i++) {
|
||||||
var valueMap = constraintMap[i];
|
var valueMap = constraintMap[i];
|
||||||
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0), this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale, this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
||||||
this.readCurve(valueMap, timeline, frameIndex);
|
this.readCurve(valueMap, timeline, frameIndex);
|
||||||
frameIndex++;
|
frameIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -4123,7 +4123,7 @@ var spine;
|
|||||||
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
||||||
data.target = skeletonData.bones[input.readInt(true)];
|
data.target = skeletonData.bones[input.readInt(true)];
|
||||||
data.mix = input.readFloat();
|
data.mix = input.readFloat();
|
||||||
data.softness = input.readFloat();
|
data.softness = input.readFloat() * scale;
|
||||||
data.bendDirection = input.readByte();
|
data.bendDirection = input.readByte();
|
||||||
data.compress = input.readBoolean();
|
data.compress = input.readBoolean();
|
||||||
data.stretch = input.readBoolean();
|
data.stretch = input.readBoolean();
|
||||||
@ -4555,7 +4555,7 @@ var spine;
|
|||||||
var timeline = new spine.IkConstraintTimeline(frameCount);
|
var timeline = new spine.IkConstraintTimeline(frameCount);
|
||||||
timeline.ikConstraintIndex = index;
|
timeline.ikConstraintIndex = index;
|
||||||
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
||||||
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readByte(), input.readBoolean(), input.readBoolean());
|
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());
|
||||||
if (frameIndex < frameCount - 1)
|
if (frameIndex < frameCount - 1)
|
||||||
this.readCurve(input, frameIndex, timeline);
|
this.readCurve(input, frameIndex, timeline);
|
||||||
}
|
}
|
||||||
@ -5539,7 +5539,7 @@ var spine;
|
|||||||
if (data.target == null)
|
if (data.target == null)
|
||||||
throw new Error("IK target bone not found: " + targetName);
|
throw new Error("IK target bone not found: " + targetName);
|
||||||
data.mix = this.getValue(constraintMap, "mix", 1);
|
data.mix = this.getValue(constraintMap, "mix", 1);
|
||||||
data.softness = this.getValue(constraintMap, "softness", 0);
|
data.softness = this.getValue(constraintMap, "softness", 0) * scale;
|
||||||
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
||||||
data.compress = this.getValue(constraintMap, "compress", false);
|
data.compress = this.getValue(constraintMap, "compress", false);
|
||||||
data.stretch = this.getValue(constraintMap, "stretch", false);
|
data.stretch = this.getValue(constraintMap, "stretch", false);
|
||||||
@ -5957,7 +5957,7 @@ var spine;
|
|||||||
var frameIndex = 0;
|
var frameIndex = 0;
|
||||||
for (var i = 0; i < constraintMap.length; i++) {
|
for (var i = 0; i < constraintMap.length; i++) {
|
||||||
var valueMap = constraintMap[i];
|
var valueMap = constraintMap[i];
|
||||||
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0), this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale, this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
||||||
this.readCurve(valueMap, timeline, frameIndex);
|
this.readCurve(valueMap, timeline, frameIndex);
|
||||||
frameIndex++;
|
frameIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -4123,7 +4123,7 @@ var spine;
|
|||||||
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
||||||
data.target = skeletonData.bones[input.readInt(true)];
|
data.target = skeletonData.bones[input.readInt(true)];
|
||||||
data.mix = input.readFloat();
|
data.mix = input.readFloat();
|
||||||
data.softness = input.readFloat();
|
data.softness = input.readFloat() * scale;
|
||||||
data.bendDirection = input.readByte();
|
data.bendDirection = input.readByte();
|
||||||
data.compress = input.readBoolean();
|
data.compress = input.readBoolean();
|
||||||
data.stretch = input.readBoolean();
|
data.stretch = input.readBoolean();
|
||||||
@ -4555,7 +4555,7 @@ var spine;
|
|||||||
var timeline = new spine.IkConstraintTimeline(frameCount);
|
var timeline = new spine.IkConstraintTimeline(frameCount);
|
||||||
timeline.ikConstraintIndex = index;
|
timeline.ikConstraintIndex = index;
|
||||||
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
||||||
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readByte(), input.readBoolean(), input.readBoolean());
|
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());
|
||||||
if (frameIndex < frameCount - 1)
|
if (frameIndex < frameCount - 1)
|
||||||
this.readCurve(input, frameIndex, timeline);
|
this.readCurve(input, frameIndex, timeline);
|
||||||
}
|
}
|
||||||
@ -5539,7 +5539,7 @@ var spine;
|
|||||||
if (data.target == null)
|
if (data.target == null)
|
||||||
throw new Error("IK target bone not found: " + targetName);
|
throw new Error("IK target bone not found: " + targetName);
|
||||||
data.mix = this.getValue(constraintMap, "mix", 1);
|
data.mix = this.getValue(constraintMap, "mix", 1);
|
||||||
data.softness = this.getValue(constraintMap, "softness", 0);
|
data.softness = this.getValue(constraintMap, "softness", 0) * scale;
|
||||||
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
||||||
data.compress = this.getValue(constraintMap, "compress", false);
|
data.compress = this.getValue(constraintMap, "compress", false);
|
||||||
data.stretch = this.getValue(constraintMap, "stretch", false);
|
data.stretch = this.getValue(constraintMap, "stretch", false);
|
||||||
@ -5957,7 +5957,7 @@ var spine;
|
|||||||
var frameIndex = 0;
|
var frameIndex = 0;
|
||||||
for (var i = 0; i < constraintMap.length; i++) {
|
for (var i = 0; i < constraintMap.length; i++) {
|
||||||
var valueMap = constraintMap[i];
|
var valueMap = constraintMap[i];
|
||||||
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0), this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale, this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
||||||
this.readCurve(valueMap, timeline, frameIndex);
|
this.readCurve(valueMap, timeline, frameIndex);
|
||||||
frameIndex++;
|
frameIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -4123,7 +4123,7 @@ var spine;
|
|||||||
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
||||||
data.target = skeletonData.bones[input.readInt(true)];
|
data.target = skeletonData.bones[input.readInt(true)];
|
||||||
data.mix = input.readFloat();
|
data.mix = input.readFloat();
|
||||||
data.softness = input.readFloat();
|
data.softness = input.readFloat() * scale;
|
||||||
data.bendDirection = input.readByte();
|
data.bendDirection = input.readByte();
|
||||||
data.compress = input.readBoolean();
|
data.compress = input.readBoolean();
|
||||||
data.stretch = input.readBoolean();
|
data.stretch = input.readBoolean();
|
||||||
@ -4555,7 +4555,7 @@ var spine;
|
|||||||
var timeline = new spine.IkConstraintTimeline(frameCount);
|
var timeline = new spine.IkConstraintTimeline(frameCount);
|
||||||
timeline.ikConstraintIndex = index;
|
timeline.ikConstraintIndex = index;
|
||||||
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
||||||
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readByte(), input.readBoolean(), input.readBoolean());
|
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());
|
||||||
if (frameIndex < frameCount - 1)
|
if (frameIndex < frameCount - 1)
|
||||||
this.readCurve(input, frameIndex, timeline);
|
this.readCurve(input, frameIndex, timeline);
|
||||||
}
|
}
|
||||||
@ -5539,7 +5539,7 @@ var spine;
|
|||||||
if (data.target == null)
|
if (data.target == null)
|
||||||
throw new Error("IK target bone not found: " + targetName);
|
throw new Error("IK target bone not found: " + targetName);
|
||||||
data.mix = this.getValue(constraintMap, "mix", 1);
|
data.mix = this.getValue(constraintMap, "mix", 1);
|
||||||
data.softness = this.getValue(constraintMap, "softness", 0);
|
data.softness = this.getValue(constraintMap, "softness", 0) * scale;
|
||||||
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
||||||
data.compress = this.getValue(constraintMap, "compress", false);
|
data.compress = this.getValue(constraintMap, "compress", false);
|
||||||
data.stretch = this.getValue(constraintMap, "stretch", false);
|
data.stretch = this.getValue(constraintMap, "stretch", false);
|
||||||
@ -5957,7 +5957,7 @@ var spine;
|
|||||||
var frameIndex = 0;
|
var frameIndex = 0;
|
||||||
for (var i = 0; i < constraintMap.length; i++) {
|
for (var i = 0; i < constraintMap.length; i++) {
|
||||||
var valueMap = constraintMap[i];
|
var valueMap = constraintMap[i];
|
||||||
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0), this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale, this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
||||||
this.readCurve(valueMap, timeline, frameIndex);
|
this.readCurve(valueMap, timeline, frameIndex);
|
||||||
frameIndex++;
|
frameIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -137,7 +137,7 @@ module spine {
|
|||||||
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
data.bones.push(skeletonData.bones[input.readInt(true)]);
|
||||||
data.target = skeletonData.bones[input.readInt(true)];
|
data.target = skeletonData.bones[input.readInt(true)];
|
||||||
data.mix = input.readFloat();
|
data.mix = input.readFloat();
|
||||||
data.softness = input.readFloat();
|
data.softness = input.readFloat() * scale;
|
||||||
data.bendDirection = input.readByte();
|
data.bendDirection = input.readByte();
|
||||||
data.compress = input.readBoolean();
|
data.compress = input.readBoolean();
|
||||||
data.stretch = input.readBoolean();
|
data.stretch = input.readBoolean();
|
||||||
@ -584,7 +584,7 @@ module spine {
|
|||||||
let timeline = new IkConstraintTimeline(frameCount);
|
let timeline = new IkConstraintTimeline(frameCount);
|
||||||
timeline.ikConstraintIndex = index;
|
timeline.ikConstraintIndex = index;
|
||||||
for (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
for (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {
|
||||||
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readByte(), input.readBoolean(),
|
timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(),
|
||||||
input.readBoolean());
|
input.readBoolean());
|
||||||
if (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);
|
if (frameIndex < frameCount - 1) this.readCurve(input, frameIndex, timeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,7 +127,7 @@ module spine {
|
|||||||
if (data.target == null) throw new Error("IK target bone not found: " + targetName);
|
if (data.target == null) throw new Error("IK target bone not found: " + targetName);
|
||||||
|
|
||||||
data.mix = this.getValue(constraintMap, "mix", 1);
|
data.mix = this.getValue(constraintMap, "mix", 1);
|
||||||
data.softness = this.getValue(constraintMap, "softness", 0);
|
data.softness = this.getValue(constraintMap, "softness", 0) * scale;
|
||||||
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
|
||||||
data.compress = this.getValue(constraintMap, "compress", false);
|
data.compress = this.getValue(constraintMap, "compress", false);
|
||||||
data.stretch = this.getValue(constraintMap, "stretch", false);
|
data.stretch = this.getValue(constraintMap, "stretch", false);
|
||||||
@ -571,7 +571,7 @@ module spine {
|
|||||||
let frameIndex = 0;
|
let frameIndex = 0;
|
||||||
for (let i = 0; i < constraintMap.length; i++) {
|
for (let i = 0; i < constraintMap.length; i++) {
|
||||||
let valueMap = constraintMap[i];
|
let valueMap = constraintMap[i];
|
||||||
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0),
|
timeline.setFrame(frameIndex, this.getValue(valueMap, "time", 0), this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "softness", 0) * scale,
|
||||||
this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
this.getValue(valueMap, "bendPositive", true) ? 1 : -1, this.getValue(valueMap, "compress", false), this.getValue(valueMap, "stretch", false));
|
||||||
this.readCurve(valueMap, timeline, frameIndex);
|
this.readCurve(valueMap, timeline, frameIndex);
|
||||||
frameIndex++;
|
frameIndex++;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user