MIT License

项目介绍

odrick/free-tex-packer 是一个托管在 GitHub 上的开源项目,主要使用 JavaScript 编写,采用 MIT License 许可证,目前获得 1.3k 个 Star、271 次 Fork。

仓库全名
odrick/free-tex-packer
开源许可证
MIT License
Star 数
1.3k
Fork 数
271
未关闭 Issue
37

README 摘要

Free texture packer 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. Homepage: https://free-tex-packer.com Web version: https://free-tex-packer.com/app…

完整内容见 GitHub 原始 README 或本页 。

常见问题

free-tex-packer 用什么语言开发?

主要使用 JavaScript 编写,采用 MIT License 许可证,目前有 1.3k 个 Star。

free-tex-packer 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 free-tex-packer 的源码?

可以直接克隆仓库:git clone https://github.com/odrick/free-tex-packer.git,默认分支为 master;安装与运行步骤见仓库 README。

free-tex-packer 最近还在维护吗?

仓库最近一次更新为 2024年7月14日,当前有 37 个未关闭 Issue;Star 数为 1.3k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Free texture packer

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
1859
价值分
856
活跃状态
活跃

语言占比

CSS
HTML
JavaScript
PHP

Release

README

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}}
  }
}

评论

暂无评论