Need help with free-tex-packer?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

odrick
439 Stars 54 Forks MIT License 339 Commits 4 Opened issues

Description

Free texture packer

Services available

!
?

Need anything else?

Contributors list

# 153,309
atlas
PHP
HTML
sprites...
236 commits
# 297,500
atlas
PHP
HTML
sprites...
37 commits
# 397,905
C
TypeScr...
Shell
Firefox
8 commits
# 378,855
TypeScr...
egret
demos
PHP
7 commits
# 464,127
atlas
PHP
HTML
sprites...
6 commits
# 529,688
atlas
PHP
HTML
sprites...
3 commits
# 626,520
atlas
PHP
HTML
sprites...
1 commit
# 225,290
Linux
osx
fpc
lazarus
1 commit

Free texture packer

logo

IMPORTANT: I don't have time to imporove this app anymore. Only critical bugs will be fixed.

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.

screenshot

Homepage: https://free-tex-packer.com

Web version: https://free-tex-packer.com/app

Desktop versions for win, mac, linux: https://github.com/odrick/free-tex-packer/releases

Gulp module: https://github.com/odrick/gulp-free-tex-packer

Grunt plugin: https://github.com/odrick/grunt-free-tex-packer

Webpack plugin: https://github.com/odrick/webpack-free-tex-packer

CLI: https://github.com/odrick/free-tex-packer-cli

Custom templates

Free texture packer uses mustache template engine.

There are 3 objects passed to template:

rects (Array) list of sprites for export

| prop | type | description | | --- | --- | --- | | name | String | sprite name | | frame | Object | frame info (x, y, w, h, hw, hh) | | rotated | Boolean | sprite rotation flag | | trimmed | Boolean | sprite trimmed flag | | spriteSourceSize | Object | sprite source size (x, y, w, h) | | sourceSize | Object | original size (w, h) | | first | Boolean | first element in array flag | | last | Boolean | last element in array flag |

config (Object) current export config

| prop | type | description | | --- | --- | --- | | imageWidth | Number | texture width | | imageHeight | Number | texture height | | scale | Number | texture scale | | format | String | texture format | | imageName | String | texture name | | imageFile | String | texture file (name with extension) | | base64Export | Boolean | base64 export flag | | base64Prefix | String | prefix for base64 string | | imageData | String | base64 image data |

appInfo (Object) application info

| prop | type | description | | --- | --- | --- | | displayName | String | App name | | version | String | App version | | url | String | App url |

Example:

{
  "frames": {
    {{#rects}}
    "{{{name}}}": {
      "frame": {
        "x": {{frame.x}},
        "y": {{frame.y}},
        "w": {{frame.w}},
        "h": {{frame.h}}
      },
      "rotated": {{rotated}},
      "trimmed": {{trimmed}},
      "spriteSourceSize": {
        "x": {{spriteSourceSize.x}},
        "y": {{spriteSourceSize.y}},
        "w": {{spriteSourceSize.w}},
        "h": {{spriteSourceSize.h}}
      },
      "sourceSize": {
        "w": {{sourceSize.w}},
        "h": {{sourceSize.h}}
      },
      "pivot": {
        "x": 0.5,
        "y": 0.5
      }
    }{{^last}},{{/last}}
    {{/rects}}
  },
  "meta": {
    "app": "{{{appInfo.url}}}",
    "version": "{{appInfo.version}}",
    "image": "{{config.imageFile}}",
    "format": "{{config.format}}",
    "size": {
      "w": {{config.imageWidth}},
      "h": {{config.imageHeight}}
    },
    "scale": {{config.scale}}
  }
}

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.