npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fgui-restore

v0.0.2

Published

A tool for fairygui publish file to restore fairygui package.

Downloads

15

Readme

写在前面

本工程仅作学习研究使用,本意用于工程项目不幸破损,通过发布出来的资源文件进行紧急还原,请勿用于资源破解侵权等行为,否则后果自负!!

下载

git clone [email protected]:krapnikkk/fgui-restore.git

安装

npm install

使用方法

node restore inputFile outputFile

参考

node restore ./test/MainMenu.bin ./output 

支持版本 && 还原说明

数据版本 [向下兼容] : buffer.version: 5

编辑器版本:FairyGUI Editor: 2020.3.3

【已测试官方DEMO工程99%高度还原,还原出来的包资源文件推荐使用最新版编辑器打开】

还原程度

  • 将合并的纹理图片还原成碎图【统一png格式】

  • 将碎图和package.xml关联绑定

  • 将组件xml和package.xml关联绑定

  • 将动画Movieclip还原成jta文件【动画设置以帧频:24为基准进行还原】

  • 将位图字体文件还原成fnt文件【二进制格式资源包统一还原成UIBuilder默认格式】

无法还原项

  • 骨骼动画资源还原
  • 项目设置中的默认设置项
  • 不被打包合并的资源或者不支持的资源【比如:swf,仅单纯放置到包内】
  • 设计辅助功能配置【比如:[组件]组件设计图、元件保持比例和背景颜色[装载器]发布时清除等】
  • 普通组元件无法还原
  • 部分数值由于浮点数精度问题会有一位小数上的偏差

资源文件内容一览

  • package.xml
  • sprites.bytes
  • .xml
  • .fnt
  • .jta

xml解析流程

  • 解析发布出来的资源文件
  • 根据文件格式版本分布解析二进制和压缩描述文件
  • 将发布的资源文件解析还原为xml
  • 【image】图片资源根据id还原name 和 文件路径 packageDescription.resources[0].image
  • 【movieclip】packageDescription.resources[0].movieclip
  • 【sound】packageDescription.resources[0].sound

文件解析流程

  • createObject 【UIPackage】
  • constructFromResource【 GComponent | GImage | GMovieClip 】
  • controller.setup【controller】
  • setup_beforeAdd 【component-child-GObject】
  • relations.setup【relations】
  • setup_afterAdd 【component-child-GObject】
  • gear.setup 【GObject】
  • trans.setupp 【transion】
  • constructExtension 【extension】

todo list [maybe]

  • [ ] 【组件】组件自定义属性还原
  • [ ] 【组件】组件出入场音效还原
  • [ ] 【组件】属性控制中对原始属性的判断进行还原
  • [ ] 【标签】标签中的标题为输入文本相关属性还原
  • [ ] branch分支相关逻辑处理
  • [ ] fnt文件初始化完善
  • [ ] 校验需要还原文件的合法性&合理性及异常处理
  • [ ] 浮点数数值精准还原
  • [ ] 属性默认值及属性顺序精准还原
  • [ ] BMFont字体文件还原
  • [ ] and more

License

MIT