krzysztof-o / spritesheet.js

Command-line spritesheet generator supporting Starling / Sparrow, PIXI.js, Easel.js and cocos2d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cocos2d-x template is not working correctly

flamepygmy opened this issue · comments

Here is a patched version of the template that works for me:

{{=<% %>=}}

frames <%#files%> <%#trimmed%> <%name%><%extension%> frame {{<%x%>,<%y%>},{<%width%>,<%height%>}} offset {<%trim.offsetX%>,<%trim.offsetY%>} rotated sourceColorRect {{<%trim.x%>,<%trim.y%>},{<%trim.width%>,<%trim.height%>}} sourceSize {<%trim.width%>,<%trim.height%>} <%/trimmed%> <%^trimmed%> <%name%><%extension%> frame {{<%x%>,<%y%>},{<%width%>,<%height%>}} offset {0,0} rotated sourceColorRect {{0,0},{<%width%>,<%height%>}} sourceSize {<%width%>,<%height%>} <%/trimmed%> <%/files%> metadata format 2 realTextureFileName <%name%>.png size {<%width%>,<%height%>} textureFileName <%name%>.png

Seems like the copy paste didn't work that great.

the basic issue is that after the "< k e y><%name%><%extension%>< / k e y>" line
there needs to be "< d i c t >" and "< k e y > frame < / k e y >" lines.

Also, at the end of the block (for the <%name%><%extension%>< / k e y>) there needs to be a ending "< / d i c t >".

Works for me on cocos2d-x JS 3.1 after the changes.

Could you send pull request please?