Skip to content

Commit 8981e49

Browse files
add json support to SpriteFrameCache
1 parent 2e8126c commit 8981e49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cocos2d/sprite_nodes/CCSpriteFrameCache.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cc.SpriteFrameCache = cc.Class.extend(/** @lends cc.SpriteFrameCache# */{
5555
var metadataDict = dictionary["metadata"] || dictionary["meta"];
5656
var framesDict = dictionary["frames"];
5757

58-
var format;
58+
var format = 0;
5959
// get the format
6060
if (metadataDict) {
6161
var tmpFormat = metadataDict["format"];
@@ -68,6 +68,7 @@ cc.SpriteFrameCache = cc.Class.extend(/** @lends cc.SpriteFrameCache# */{
6868
return;
6969
}
7070

71+
console.log(format);
7172

7273
for (var key in framesDict) {
7374
var frameDict = framesDict[key];

0 commit comments

Comments
 (0)