Browse Source

[js] Fixed SkeletonBounds.

NathanSweet 9 years ago
parent
commit
6705dcd02a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      spine-js/spine.js

+ 2 - 2
spine-js/spine.js

@@ -2743,11 +2743,11 @@ spine.SkeletonBounds.prototype = {
 			if (poolCount > 0) {
 				polygon = polygonPool[poolCount - 1];
 				polygonPool.splice(poolCount - 1, 1);
+				polygon.length = boundingBox.vertices.length;
 			} else
-				polygon = new spine.Float32Array();
+				polygon = new Array(boundingBox.vertices.length);
 			polygons[polygons.length] = polygon;
 
-			polygon.length = boundingBox.vertices.length;
 			boundingBox.computeWorldVertices(x, y, slot.bone, polygon);
 		}