Funkin-Packer

Funkin Packer

Funkin Packer is a tool for creating sprite sheets in various formats. With features including rotation, trimming, multipwdasdawdasdawdacking, exporting to various formats (sparrow, json, css, pixi.js, godot, phaser, cocos2d).

Web version: https://KolzeYT.github.io/Funkin-Packer/

Custom templates

Funkin Packer even allows for custom templates using mustache.

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": {
    
    "}": {
      "frame": {
        "x": ,
        "y": ,
        "w": ,
        "h": 
      },
      "rotated": ,
      "trimmed": ,
      "spriteSourceSize": {
        "x": ,
        "y": ,
        "w": ,
        "h": 
      },
      "sourceSize": {
        "w": ,
        "h": 
      },
      "pivot": {
        "x": 0.5,
        "y": 0.5
      }
    },
    
  },
  "meta": {
    "app": "}",
    "version": "",
    "image": "",
    "format": "",
    "size": {
      "w": ,
      "h": 
    },
    "scale": 
  }
}