Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libgdx atlas showing bug #245

Merged
merged 1 commit into from
Sep 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Editors/TexturePackerAtlas/assets/libgdx/libgdx-packed.atlas
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

libgdx-packed.png
size: 512,128
format: RGBA8888
filter: Nearest,Nearest
repeat: none
0000
rotate: false
xy: 2, 7
size: 87, 101
orig: 120, 175
offset: 11, 13
index: -1
0001
rotate: true
xy: 214, 38
size: 70, 114
orig: 120, 175
offset: 29, 13
index: -1
0002
rotate: true
xy: 91, 44
size: 64, 121
orig: 120, 175
offset: 36, 13
index: -1
0003
rotate: true
xy: 330, 44
size: 64, 113
orig: 120, 175
offset: 36, 13
index: -1
0004
rotate: false
xy: 445, 2
size: 64, 106
orig: 120, 175
offset: 36, 13
index: -1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions Editors/TexturePackerAtlas/source/MenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ class MenuState extends FlxState
x10.frames = tex8;
x10.animation.frameName = "wabbit_alpha";
add(x10);

var tex9 = FlxAtlasFrames.fromLibGdx("assets/libgdx/libgdx-packed.png", "assets/libgdx/libgdx-packed.atlas");

var x11 = new FlxSprite(0, 300);
x11.frames = tex9;
x11.animation.addByPrefix("spin", "", 3);
x11.animation.play("spin");
add(x11);


// Remove atlas bitmaps from memory (useful for targets with hardware acceleration: cpp only atm).
FlxG.bitmap.dumpCache();
Expand Down