[go: up one dir, main page]

flxanimate

Adobe Animate's texture atlases player for HaxeFlixel.
https://github.com/Dot-Stuff/flxanimate/

To install, run:

haxelib install flxanimate 4.0.0 

See using Haxelib in Haxelib documentation for more information.

README.md

FlxAnimate's logo, constituting of the HaxeFlixel logo sliced into pieces and then 4 arrows pointing where the parts should be to create a result.

FlxAnimate

FlxAnimate is an open source plugin focused on parsing spritesheets and implementing Texture Atlases exported by the computer animation program Adobe Animate (formerly known as Adobe Flash) on HaxeFlixel. More Information

It can be useful when you need to export spritesheets that are not supported by the game engine, such as Cocos 2D, Starling, Sparrow v1, among others. Not to mention the possibility to play efficiently Texture Atlases on runtime, while mimicking Animate's structure as much fidelity as possible.

Questions/Support

In case that you have any questions or problems about the project, you can contact CheemsAndFriends on:

     

(as cheemsnfriends)          (as @CheemsnFriendos)

Limitations

TODO

  • Blend mode support for shader based blends.
  • Support on layer masks.
  • A wiki or website API related + samples to tweak on. Something similar as HaxeFlixel's demos and HaxeFlixel's API.

How to install?

1. Haxelib

The Haxe Library Manager (also known as Haxelib) is the manager that lets you use, download and upload libraries that are inside Haxe's ecosystem.

you can download it by typing haxelib install flxanimate on your terminal or command prompt.

2. Git

Git is an open-sourced version control system designed to handle every type of project in Github, in this case, FlxAnimate. You should check first of all if you have Git installed before typing haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate on your terminal or command prompt.

How to use it?

There are two usages that you can apply to FlxAnimate: One is the Texture Atlas export and the Spritesheet export.

Texture Atlas

WARNING: This repository DOES NOT transform texture atlases into spritesheets! If you wish to use this, It's better to use Smokey555's repo.

In order to use FlxAnimate's texture atlas support, you will need to create a new instance of FlxAnimate, as you would do with FlxSprite.

var character:FlxAnimate = new FlxAnimate(X, Y, "Path/To/Atlas");

Path/To/Atlas has to be from the folder that you exported the atlas texture atlas with, not with any of the contents in there.

Example:

✅ Correct Path:

var ninja_girl:FlxAnimate = new FlxAnimate(X, Y, "assets/images/ninja-girl");

❎ Incorrect Path:

var ninja_girl:FlxAnimate = new FlxAnimate(X, Y, "assets/images/ninja-girl/Animation.json"); // This also applies with spritemaps!

Spritesheet

There are several formats that Adobe Animate offers to use for different kinds of uses, but mostly for storing animations without having to do big calculations, unlike Texture Atlases. To use a spritesheet with the format that Animate offers, you would need to type the name of the Spritesheet, excluding the version if it has several.

For example:

    var sprite:FlxSprite = new FlxSprite(X,Y);
    sprite.frames = FlxAnimateFrames.fromCocos2D(Path);
Contributors
MrCheemsAndFriends
DotWith
Version
4.0.0
Published
7 weeks ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub