Skip to content

Commit 19e0ec4

Browse files
committed
Initial commit for fork
1 parent c972c97 commit 19e0ec4

File tree

20 files changed

+217
-43
lines changed

20 files changed

+217
-43
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
# Free texture packer
2-
1+
# Tex-Packer-EX
32
![logo](https://raw.githubusercontent.com/odrick/free-tex-packer/master/electron/build/icons/96x96.png)
4-
53
#
64

7-
## IMPORTANT: I don't have time to imporove this app anymore. Only critical bugs will be fixed.
5+
Tex-Packer-EX is a fork of [Free texture packer](https://github.com/odrick/free-tex-packer) which adds new features and bug fixes, including:
6+
- The ability to repack existing spritesheets
7+
- Splitter for Sparrow/Starling spritesheets (the standard format for FNF)
8+
- Correctly ordered frames when exporting
89

9-
#
10+
This was primarily created with Friday Night Funkin' modding in mind, however it can be used for any other project.
11+
12+
# Free texture packer
1013

11-
Free texture packer creates sprite sheets for you game or site. Rotation, trimming, multipacking, various export formats (json, xml, css, pixi.js, godot, phaser, cocos2d). Zip support. TinyPNG support. Split sheet tool.
14+
Free texture packer creates sprite sheets for your game or site. Rotation, trimming, multipacking, various export formats (json, xml, css, pixi.js, godot, phaser, cocos2d). Zip support. TinyPNG support. Split sheet tool.
1215

1316
![screenshot](https://free-tex-packer.com/wp-content/uploads/2019/01/screenshot.png)
1417

dist/web/static/localization/de.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ CONTEXT_MENU_PASTE;Einfügen
132132
CONTEXT_MENU_DELETE;Löschen
133133
CONTEXT_MENU_SELECT_ALL;Alles markieren
134134
SPLIT;Extrahieren
135+
REPACK;Wieder verpacken
135136
SELECT_TEXTURE;Textur
136137
SELECT_DATA_FILE;Daten-Datei
137-
SPLITTER;Sprites aus Bild extrahieren
138+
SPLITTER;Wieder verpacken/Sprites aus Bild extrahieren
138139
SPLITTER_ERROR_NO_FRAMES;Sprites wurden nicht gefunden. Vermutlich ist das Atlas Format falsch.
139140
HOLD_TRIM;Trim beibehalten:

dist/web/static/localization/en.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ CONTEXT_MENU_PASTE;Paste
133133
CONTEXT_MENU_DELETE;Delete
134134
CONTEXT_MENU_SELECT_ALL;Select all
135135
SPLIT;Split
136+
REPACK;Repack
136137
SELECT_TEXTURE;Texture
137138
SELECT_DATA_FILE;Data file
138-
SPLITTER;Split sheet
139+
SPLITTER;Repack/Split sheet
139140
SPLITTER_ERROR_NO_FRAMES;Sprites not found. Probably, atlas format is incorrect.
140141
HOLD_TRIM;Hold trim:

dist/web/static/localization/es.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ CONTEXT_MENU_PASTE;Pegar
133133
CONTEXT_MENU_DELETE;Borrar
134134
Desembalaje;Selecionar todo
135135
SPLIT;Desembalaje
136+
REPACK;Reempaquetar
136137
SELECT_TEXTURE;Textura
137138
SELECT_DATA_FILE;Datos
138-
SPLITTER;Desembalaje atlas
139+
SPLITTER;Reempaquetar/Desembalaje atlas
139140
SPLITTER_ERROR_NO_FRAMES;No se ha encontrado ningún sprite. Quizás el formato del atlas sea incorrecto.
140141
HOLD_TRIM;Mantener corte:

dist/web/static/localization/ru.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ CONTEXT_MENU_PASTE;Вставить
133133
CONTEXT_MENU_DELETE;Удалить
134134
CONTEXT_MENU_SELECT_ALL;Выделить все
135135
SPLIT;Распаковать
136+
REPACK;Переупаковка
136137
SELECT_TEXTURE;Текстура
137138
SELECT_DATA_FILE;Данные
138-
SPLITTER;Распаковка атласа
139+
SPLITTER;Переупаковка/Распаковка атласа
139140
SPLITTER_ERROR_NO_FRAMES;Не найдено ни одного спрайта. Возможно, формат атласа неверен.
140141
HOLD_TRIM;Обрезать:

dist/web/static/localization/zh-cn.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ CONTEXT_MENU_PASTE;粘贴
133133
CONTEXT_MENU_DELETE;删除
134134
CONTEXT_MENU_SELECT_ALL;选择全部
135135
SPLIT;分割
136+
REPACK;重新包装
136137
SELECT_TEXTURE;纹理图
137138
SELECT_DATA_FILE;数据文件
138-
SPLITTER;分割精灵表
139+
SPLITTER;重新包装/分割精灵表
139140
SPLITTER_ERROR_NO_FRAMES;精灵图没有找到,请检查文件格式是否正确。
140141
HOLD_TRIM;保持整齐(修剪):

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "free-tex-packer",
3-
"displayName": "Free texture packer",
4-
"version": "0.6.7",
2+
"name": "tex-packer-ex",
3+
"displayName": "Tex-Packer-EX",
4+
"version": "0.6.8",
55
"description": "Free online texture packer",
6-
"url": "http://free-tex-packer.com",
7-
"download": "http://free-tex-packer.com/download",
8-
"webApp": "http://free-tex-packer.com/app",
6+
"url": "https://strawberrysage.github.io/tex-packer-ex",
7+
"download": "https://strawberrysage.github.io/tex-packer-ex",
8+
"webApp": "https://strawberrysage.github.io/tex-packer-ex",
99
"main": "src/index.js",
1010
"tinifyUrl": "http://free-tex-packer.com/server/tinify.php",
1111
"localizations": [
@@ -47,6 +47,10 @@
4747
{
4848
"name": "Davide Matta aka DadeKuma",
4949
"homepage": "https://github.com/DadeKuma"
50+
},
51+
{
52+
"name": "StrawberrySage",
53+
"homepage": "https://github.com/StrawberrySage"
5054
}
5155
],
5256
"scripts": {
@@ -108,4 +112,4 @@
108112
"webpack-dev-server": "^3.1.14",
109113
"xml2js": "^0.4.19"
110114
}
111-
}
115+
}

src/client/Observer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ let GLOBAL_EVENT = {
2626
DOWNLOAD_PROGRESS_CHANGED : "DOWNLOAD_PROGRESS_CHANGED",
2727
INSTALL_UPDATE : "INSTALL_UPDATE",
2828
SHOW_SHEET_SPLITTER : "SHOW_SHEET_SPLITTER",
29-
HIDE_SHEET_SPLITTER : "HIDE_SHEET_SPLITTER"
29+
HIDE_SHEET_SPLITTER : "HIDE_SHEET_SPLITTER",
30+
IMAGES_FROM_REPACK : "IMAGES_FROM_REPACK"
3031
};
3132

3233
export {

src/client/exporters/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ function getExporterByType(type) {
5151
return null;
5252
}
5353

54+
function getNum(str){
55+
const s = str.split('').filter((c) => {
56+
return !isNaN(c);
57+
}).join("");
58+
if (s.length){
59+
return parseInt(s);
60+
}
61+
else {
62+
return 0;
63+
}
64+
}
65+
5466
function prepareData(data, options) {
5567

5668
let opt = Object.assign({}, options);
@@ -124,6 +136,13 @@ function prepareData(data, options) {
124136
}
125137

126138
if(ret.length) {
139+
// get the numbers in order first
140+
ret.sort((a, b) => {
141+
return getNum(a.name) - getNum(b.name);
142+
});
143+
// then, sort it again by the contents of the name
144+
ret.sort((a, b) => a.name.localeCompare(b.name));
145+
127146
ret[0].first = true;
128147
ret[ret.length-1].last = true;
129148
}

src/client/exporters/list.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@
112112
"fileExt": "paper2dsprites"
113113
},
114114
{
115-
"type": "Starling",
116-
"description": "Starling format",
115+
"type": "Sparrow/Starling",
116+
"description": "Sparrow/Starling format",
117117
"allowTrim": true,
118118
"allowRotation": true,
119119
"template": "Starling.mst",

0 commit comments

Comments
 (0)