Skip to content

tylerzhu/SpriteSheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

ActionScript 3.0 Sprite Sheet render engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published