Skip to content

Commit

Permalink
Merge pull request #37 from DadeKuma/master
Browse files Browse the repository at this point in the history
Feature: Godot Tilesets and Godot Atlas fix
  • Loading branch information
odrick authored Jan 18, 2020
2 parents c4de231 + 51ce450 commit 2e9fff2
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 21 deletions.
14 changes: 4 additions & 10 deletions dist/web/static/exporters/GodotAtlas.mst
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#
# Texture Atlas data for Godot 3.x.
#
# To import the texture atlas into your Godot project, download "TexturePacker Importer":
# https://godotengine.org/asset-library/asset/169
#
{
"textures": [
{
Expand All @@ -23,10 +17,10 @@
"h": {{frame.h}}
},
"margin": {
"x": {{spriteSourceSize.x}},
"y": {{spriteSourceSize.y}},
"w": {{spriteSourceSize.w}},
"h": {{spriteSourceSize.h}}
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
}{{^last}},{{/last}}
{{/rects}}
Expand Down
35 changes: 35 additions & 0 deletions dist/web/static/exporters/GodotTileset.mst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"textures": [
{
"image": "{{config.imageFile}}",
"size": {
"w": {{config.imageWidth}},
"h": {{config.imageHeight}}
},
"sprites": [
{{#rects}}
{
"filename": "{{{name}}}",
"region": {
"x": {{frame.x}},
"y": {{frame.y}},
"w": {{frame.w}},
"h": {{frame.h}}
},
"margin": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
}{{^last}},{{/last}}
{{/rects}}
]
}
],
"meta": {
"app": "{{{appInfo.url}}}",
"version": "{{appInfo.version}}",
"format": "{{config.format}}",
}
}
2 changes: 1 addition & 1 deletion dist/web/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10832,7 +10832,7 @@ module.exports = {
/* 139 */
/***/ (function(module) {

module.exports = [{"type":"JSON (hash)","description":"Json hash","allowTrim":true,"allowRotation":true,"template":"JsonHash.mst","fileExt":"json"},{"type":"JSON (array)","description":"Json array","allowTrim":true,"allowRotation":true,"template":"JsonArray.mst","fileExt":"json"},{"type":"XML","description":"Plain XML format","allowTrim":true,"allowRotation":true,"template":"XML.mst","fileExt":"xml"},{"type":"css (modern)","description":"css format","allowTrim":true,"allowRotation":true,"template":"Css.mst","fileExt":"css"},{"type":"css (old)","description":"old css format","allowTrim":false,"allowRotation":false,"template":"OldCss.mst","fileExt":"css"},{"type":"pixi.js","description":"pixi.js format","allowTrim":true,"allowRotation":true,"template":"JsonHash.mst","fileExt":"json"},{"type":"Godot (atlas)","description":"Godot Atlas format","allowTrim":true,"allowRotation":true,"template":"GodotAtlas.mst","fileExt":"tpsheet"},{"type":"Phaser (hash)","description":"Phaser (json hash)","allowTrim":true,"allowRotation":true,"template":"JsonHash.mst","fileExt":"json"},{"type":"Phaser (array)","description":"Phaser (json array)","allowTrim":true,"allowRotation":true,"template":"JsonArray.mst","fileExt":"json"},{"type":"Phaser 3","description":"Phaser 3","allowTrim":true,"allowRotation":true,"template":"Phaser3.mst","fileExt":"json"},{"type":"Spine","description":"Spine atlas","allowTrim":true,"allowRotation":true,"template":"Spine.mst","fileExt":"atlas"},{"type":"cocos2d","description":"cocos2d format","allowTrim":true,"allowRotation":true,"template":"Cocos2d.mst","fileExt":"plist"},{"type":"UnrealEngine","description":"UnrealEngine - Paper2d","allowTrim":true,"allowRotation":true,"template":"Unreal.mst","fileExt":"paper2dsprites"},{"type":"Starling","description":"Starling format","allowTrim":true,"allowRotation":true,"template":"Starling.mst","fileExt":"xml"},{"type":"UIKit","description":"UIKit sprite sheet","allowTrim":true,"allowRotation":false,"template":"UIKit.mst","fileExt":"plist","predefined":true},{"type":"Unity3D","description":"Unity3D sprite sheet","allowTrim":true,"allowRotation":false,"template":"Unity3D.mst","fileExt":"tpsheet","predefined":true},{"type":"custom","description":"Custom format","allowTrim":true,"allowRotation":true,"template":"","fileExt":""}];
module.exports = [{"type":"JSON (hash)","description":"Json hash","allowTrim":true,"allowRotation":true,"template":"JsonHash.mst","fileExt":"json"},{"type":"JSON (array)","description":"Json array","allowTrim":true,"allowRotation":true,"template":"JsonArray.mst","fileExt":"json"},{"type":"XML","description":"Plain XML format","allowTrim":true,"allowRotation":true,"template":"XML.mst","fileExt":"xml"},{"type":"css (modern)","description":"css format","allowTrim":true,"allowRotation":true,"template":"Css.mst","fileExt":"css"},{"type":"css (old)","description":"old css format","allowTrim":false,"allowRotation":false,"template":"OldCss.mst","fileExt":"css"},{"type":"pixi.js","description":"pixi.js format","allowTrim":true,"allowRotation":true,"template":"JsonHash.mst","fileExt":"json"},{"type":"Godot (atlas)","description":"Godot Atlas format","allowTrim":true,"allowRotation":true,"template":"GodotAtlas.mst","fileExt":"tpsheet"},{"type":"Godot (tileset)","description":"Godot Tileset format","allowTrim":true,"allowRotation":true,"template":"GodotTileset.mst","fileExt":"tpset"},{"type":"Phaser (hash)","description":"Phaser (json hash)","allowTrim":true,"allowRotation":true,"template":"JsonHash.mst","fileExt":"json"},{"type":"Phaser (array)","description":"Phaser (json array)","allowTrim":true,"allowRotation":true,"template":"JsonArray.mst","fileExt":"json"},{"type":"Phaser 3","description":"Phaser 3","allowTrim":true,"allowRotation":true,"template":"Phaser3.mst","fileExt":"json"},{"type":"Spine","description":"Spine atlas","allowTrim":true,"allowRotation":true,"template":"Spine.mst","fileExt":"atlas"},{"type":"cocos2d","description":"cocos2d format","allowTrim":true,"allowRotation":true,"template":"Cocos2d.mst","fileExt":"plist"},{"type":"UnrealEngine","description":"UnrealEngine - Paper2d","allowTrim":true,"allowRotation":true,"template":"Unreal.mst","fileExt":"paper2dsprites"},{"type":"Starling","description":"Starling format","allowTrim":true,"allowRotation":true,"template":"Starling.mst","fileExt":"xml"},{"type":"UIKit","description":"UIKit sprite sheet","allowTrim":true,"allowRotation":false,"template":"UIKit.mst","fileExt":"plist","predefined":true},{"type":"Unity3D","description":"Unity3D sprite sheet","allowTrim":true,"allowRotation":false,"template":"Unity3D.mst","fileExt":"tpsheet","predefined":true},{"type":"custom","description":"Custom format","allowTrim":true,"allowRotation":true,"template":"","fileExt":""}];

/***/ }),
/* 140 */
Expand Down
8 changes: 8 additions & 0 deletions src/client/exporters/list.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@
"template": "GodotAtlas.mst",
"fileExt": "tpsheet"
},
{
"type": "Godot (tileset)",
"description": "Godot Tileset format",
"allowTrim": true,
"allowRotation": true,
"template": "GodotTileset.mst",
"fileExt": "tpset"
},
{
"type": "Phaser (hash)",
"description": "Phaser (json hash)",
Expand Down
14 changes: 4 additions & 10 deletions src/client/resources/static/exporters/GodotAtlas.mst
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#
# Texture Atlas data for Godot 3.x.
#
# To import the texture atlas into your Godot project, download "TexturePacker Importer":
# https://godotengine.org/asset-library/asset/169
#
{
"textures": [
{
Expand All @@ -23,10 +17,10 @@
"h": {{frame.h}}
},
"margin": {
"x": {{spriteSourceSize.x}},
"y": {{spriteSourceSize.y}},
"w": {{spriteSourceSize.w}},
"h": {{spriteSourceSize.h}}
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
}{{^last}},{{/last}}
{{/rects}}
Expand Down
35 changes: 35 additions & 0 deletions src/client/resources/static/exporters/GodotTileset.mst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"textures": [
{
"image": "{{config.imageFile}}",
"size": {
"w": {{config.imageWidth}},
"h": {{config.imageHeight}}
},
"sprites": [
{{#rects}}
{
"filename": "{{{name}}}",
"region": {
"x": {{frame.x}},
"y": {{frame.y}},
"w": {{frame.w}},
"h": {{frame.h}}
},
"margin": {
"x": 0,
"y": 0,
"w": 0,
"h": 0
}
}{{^last}},{{/last}}
{{/rects}}
]
}
],
"meta": {
"app": "{{{appInfo.url}}}",
"version": "{{appInfo.version}}",
"format": "{{config.format}}",
}
}

0 comments on commit 2e9fff2

Please sign in to comment.