mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
-[JAVASCRIPT][SYNTAX] Fixes various syntax mistakes that prevented some files from loading.
This commit is contained in:
parent
19225fda79
commit
7ec398c4f5
@ -772,8 +772,8 @@ spine.FfdTimeline.prototype = {
|
|||||||
this.frameVertices[frameIndex] = vertices;
|
this.frameVertices[frameIndex] = vertices;
|
||||||
},
|
},
|
||||||
apply: function (skeleton, lastTime, time, firedEvents, alpha) {
|
apply: function (skeleton, lastTime, time, firedEvents, alpha) {
|
||||||
var slot = skeleton.slots[slotIndex];
|
var slot = skeleton.slots[this.slotIndex];
|
||||||
if (slot.attachment != attachment) return;
|
if (slot.attachment != this.attachment) return;
|
||||||
|
|
||||||
var frames = this.frames;
|
var frames = this.frames;
|
||||||
if (time < frames[0]) return; // Time is before first frame.
|
if (time < frames[0]) return; // Time is before first frame.
|
||||||
@ -1030,7 +1030,7 @@ spine.Skeleton.prototype = {
|
|||||||
var arrayCount = ikConstraintsCount + 1;
|
var arrayCount = ikConstraintsCount + 1;
|
||||||
var boneCache = this.boneCache;
|
var boneCache = this.boneCache;
|
||||||
if (boneCache.length > arrayCount) boneCache.length = arrayCount;
|
if (boneCache.length > arrayCount) boneCache.length = arrayCount;
|
||||||
for (var i = 0, n = boneCache.length; i < n; i++)
|
for (var i = 0, n = boneCache.length; i < n; i++)
|
||||||
boneCache[i].length = 0;
|
boneCache[i].length = 0;
|
||||||
while (boneCache.length < arrayCount)
|
while (boneCache.length < arrayCount)
|
||||||
boneCache[boneCache.length] = [];
|
boneCache[boneCache.length] = [];
|
||||||
@ -1821,8 +1821,8 @@ spine.SkeletonJson.prototype = {
|
|||||||
var region = this.attachmentLoader.newRegionAttachment(skin, name, path);
|
var region = this.attachmentLoader.newRegionAttachment(skin, name, path);
|
||||||
if (!region) return null;
|
if (!region) return null;
|
||||||
region.path = path;
|
region.path = path;
|
||||||
region.x = (map["x"] || 0) * this.scale;
|
region.x = (map["x"] || 0) * scale;
|
||||||
region.y = (map["y"] || 0) * this.scale;
|
region.y = (map["y"] || 0) * scale;
|
||||||
region.scaleX = map.hasOwnProperty("scaleX") ? map["scaleX"] : 1;
|
region.scaleX = map.hasOwnProperty("scaleX") ? map["scaleX"] : 1;
|
||||||
region.scaleY = map.hasOwnProperty("scaleY") ? map["scaleY"] : 1;
|
region.scaleY = map.hasOwnProperty("scaleY") ? map["scaleY"] : 1;
|
||||||
region.rotation = map["rotation"] || 0;
|
region.rotation = map["rotation"] || 0;
|
||||||
@ -1904,7 +1904,7 @@ spine.SkeletonJson.prototype = {
|
|||||||
var attachment = this.attachmentLoader.newBoundingBoxAttachment(skin, name);
|
var attachment = this.attachmentLoader.newBoundingBoxAttachment(skin, name);
|
||||||
var vertices = map["vertices"];
|
var vertices = map["vertices"];
|
||||||
for (var i = 0, n = vertices.length; i < n; i++)
|
for (var i = 0, n = vertices.length; i < n; i++)
|
||||||
attachment.vertices.push(vertices[i] * this.scale);
|
attachment.vertices.push(vertices[i] * scale);
|
||||||
return attachment;
|
return attachment;
|
||||||
}
|
}
|
||||||
throw "Unknown attachment type: " + type;
|
throw "Unknown attachment type: " + type;
|
||||||
@ -2083,12 +2083,12 @@ spine.SkeletonJson.prototype = {
|
|||||||
vertices.length = vertexCount;
|
vertices.length = vertexCount;
|
||||||
var start = valueMap["offset"] || 0;
|
var start = valueMap["offset"] || 0;
|
||||||
var nn = verticesValue.length;
|
var nn = verticesValue.length;
|
||||||
if (scale == 1) {
|
if (this.scale == 1) {
|
||||||
for (var ii = 0; ii < nn; ii++)
|
for (var ii = 0; ii < nn; ii++)
|
||||||
vertices[ii + start] = verticesValue[ii];
|
vertices[ii + start] = verticesValue[ii];
|
||||||
} else {
|
} else {
|
||||||
for (var ii = 0; ii < nn; ii++)
|
for (var ii = 0; ii < nn; ii++)
|
||||||
vertices[ii + start] = verticesValue[ii] * scale;
|
vertices[ii + start] = verticesValue[ii] * this.scale;
|
||||||
}
|
}
|
||||||
if (isMesh) {
|
if (isMesh) {
|
||||||
var meshVertices = attachment.vertices;
|
var meshVertices = attachment.vertices;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user