-[JAVASCRIPT][SYNTAX] Fixes various syntax mistakes that prevented some files from loading.

This commit is contained in:
Dario Segura 2014-11-24 13:37:36 -05:00
parent 19225fda79
commit 7ec398c4f5

View File

@ -772,8 +772,8 @@ spine.FfdTimeline.prototype = {
this.frameVertices[frameIndex] = vertices;
},
apply: function (skeleton, lastTime, time, firedEvents, alpha) {
var slot = skeleton.slots[slotIndex];
if (slot.attachment != attachment) return;
var slot = skeleton.slots[this.slotIndex];
if (slot.attachment != this.attachment) return;
var frames = this.frames;
if (time < frames[0]) return; // Time is before first frame.
@ -1030,7 +1030,7 @@ spine.Skeleton.prototype = {
var arrayCount = ikConstraintsCount + 1;
var boneCache = this.boneCache;
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;
while (boneCache.length < arrayCount)
boneCache[boneCache.length] = [];
@ -1821,8 +1821,8 @@ spine.SkeletonJson.prototype = {
var region = this.attachmentLoader.newRegionAttachment(skin, name, path);
if (!region) return null;
region.path = path;
region.x = (map["x"] || 0) * this.scale;
region.y = (map["y"] || 0) * this.scale;
region.x = (map["x"] || 0) * scale;
region.y = (map["y"] || 0) * scale;
region.scaleX = map.hasOwnProperty("scaleX") ? map["scaleX"] : 1;
region.scaleY = map.hasOwnProperty("scaleY") ? map["scaleY"] : 1;
region.rotation = map["rotation"] || 0;
@ -1904,7 +1904,7 @@ spine.SkeletonJson.prototype = {
var attachment = this.attachmentLoader.newBoundingBoxAttachment(skin, name);
var vertices = map["vertices"];
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;
}
throw "Unknown attachment type: " + type;
@ -2083,12 +2083,12 @@ spine.SkeletonJson.prototype = {
vertices.length = vertexCount;
var start = valueMap["offset"] || 0;
var nn = verticesValue.length;
if (scale == 1) {
if (this.scale == 1) {
for (var ii = 0; ii < nn; ii++)
vertices[ii + start] = verticesValue[ii];
} else {
for (var ii = 0; ii < nn; ii++)
vertices[ii + start] = verticesValue[ii] * scale;
vertices[ii + start] = verticesValue[ii] * this.scale;
}
if (isMesh) {
var meshVertices = attachment.vertices;