Update JS parser

This commit is contained in:
VisualSj 2015-08-17 17:25:17 +08:00
parent 559305646b
commit c52a81a2c2
2 changed files with 14 additions and 4 deletions

View File

@ -260,6 +260,15 @@
return frame; return frame;
} }
},
{
name: "BlendFunc",
handle: function(options){
var frame = new ccs.BlendFuncFrame();
var blendFunc = options["BlendFunc"];
if(blendFunc)
frame.setBlendFunc(new cc.BlendFunc(blendFunc["Src"], blendFunc["Dst"]));
}
} }
]; ];

View File

@ -41,10 +41,11 @@
}, },
getNodeJson: function(json){ getNodeJson: function(json){
var result = json["Content"]["Content"]["ObjectData"]; var content = json["Content"];
if(undefined === result) if(content["ObjectData"])
result = json["Content"]["ObjectData"]; return content["ObjectData"];
return result;
return content["Content"]["ObjectData"];
}, },
getClass: function(json){ getClass: function(json){