-
Notifications
You must be signed in to change notification settings - Fork 435
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 support for flipped FlxFrames #1591
Conversation
Good thinking! talking about tighter packing, do you think your MaxRects implementation can work with FlxAtlas? currently it's missing a proper packing algorithm. |
Yeah! I just added a readme: The tool itself is a bit hacky and designed specifically for defender's quest, but you can probably just look at what it's doing and get most of what you need right from there. I set it up to export a sparrow-compatible xml file and then feed it straight into FlxAtlas. It's working in my game right now. |
I'll let @Beeblerox review this one. |
My EntitySprite class in flixel-editors (more like flixel-lars'-weird-experiments, lol) makes use of this if you want more examples https://github.com/HaxeFlixel/flixel-editors/blob/dev/flixel/editors/EntitySprite.hx |
@@ -256,6 +258,8 @@ class FlxAtlasFrames extends FlxFramesCollection | |||
name = texture.att.name; | |||
trimmed = texture.has.frameX; | |||
rotated = (texture.has.rotated && texture.att.rotated == "true") ? true : false; | |||
flipX = (texture.has.flipX && texture.att.flipX == "true") ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the ternaries here, these are already boolean expressions. :)
Add support for flipped FlxFrames
Adding support for flipped FlxFrames. This lets you get your atlases packed even tighter by re-using mirror images.