Skip to content

Commit 8178ce8

Browse files
authored
Support spine binary files (#777)
1 parent 1eb6389 commit 8178ce8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

extensions/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ LuaSkeletonAnimation* LuaSkeletonAnimation::createWithFile(const char* skeletonD
4545
float scale)
4646
{
4747
LuaSkeletonAnimation* node = new LuaSkeletonAnimation();
48-
node->initWithJsonFile(skeletonDataFile, atlasFile, scale);
48+
if (FileUtils::getInstance()->getFileExtension(skeletonDataFile) == ".json")
49+
node->initWithJsonFile(skeletonDataFile, atlasFile, scale);
50+
else
51+
node->initWithBinaryFile(skeletonDataFile, atlasFile, scale);
4952
node->autorelease();
5053
return node;
5154
}

0 commit comments

Comments
 (0)