Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tylerzhu/SpriteSheet

ActionScript 3.0 Sprite Sheet render engine
https://github.com/tylerzhu/SpriteSheet

Last synced: 2 months ago
JSON representation

ActionScript 3.0 Sprite Sheet render engine

Awesome Lists containing this project

README

        

SpriteSheet
===========

ActionScript 3.0 Sprite Sheet render engine

实现了SpriteSheet精灵序列图引擎,可以解析Flash Cs6/TexturePacker导出的JSON、JSON-Array、XML格式的SpriteSheet。
相关介绍:http://www.cnblogs.com/skynet/p/3570421.html

SpriteSheet调整中心等功能,参考SpriteSheet编辑工具:https://github.com/saylorzhu/SpriteSheetEdit

Demo
-----------
. 加载SpriteSheet png图片及数据描述文件

>AssetManager.getInstance().getGroupAssets("spritesheets-json", ["data/json/jsonformat.json", "data/json/jsonformat.png"], onAnimLoaded);

. 创建SpriteSheet实例:

>private function onAnimLoaded():void
{
var bitmapData:BitmapData = AssetManager.getInstance().bulkLoader.getBitmapData("data/json/jsonformat.png");
var sheets:* = AssetManager.getInstance().getContent("data/json/jsonformat.json");
var sp:SpriteSheet = new SpriteSheet(bitmapData, sheets, DataFormat.FORMAT_JSON);
sp.setAction("呼吸", 14);
sp.play();
addChild(sp);
}