Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/rogersanctus/df-loader

DarkFunction Sprites and Animations Loader for Haxe, OpenFL.
https://github.com/rogersanctus/df-loader

Last synced: about 1 month ago
JSON representation

DarkFunction Sprites and Animations Loader for Haxe, OpenFL.

Awesome Lists containing this project

README

        

[DarkFunction Editor](http://darkfunction.com/editor/) - Loader
============================

##Sprites and Animations loader for Haxe and OpenFL.##

This library was developed to load and use sprites and animations generated by [DarkFunction Editor](http://darkfunction.com/editor/) easily.
It depends on OpenFL library: [openfl](http://www.openfl.org).

**To install the dependencies:**
```
haxelib install openfl
```

**To configure OpenFL for Native/Flash/Html5:**
```
openfl setup
```

Installing
----------

Just download and extract this library into your project folder and use it. Or install it via haxelib:

*Last changes on from this repository:*
```
haxelib git df-loader https://github.com/rogersanctus/df-loader.git
```

*Last release from [lib.haxe.org](http://lib.haxe.org):*
```
haxelib install df-loader
```

A simple Spritesheet test:
--------------------------

```as3
var sprs: DfSpritesheet = new DfSpritesheet( Assets.getText("teste.sprites"), "path_to_images" );

var renderer = new DfRenderer( new DfContentDef(sprs) );

// Create sprites with the sprites names on the generated xml file
var spr1 = new DfSprite("/sprite/0");
var spr2 = new DfSprite("/sprite/1");

spr1.x = 64;
spr2.x = 128;

// Add sprites to the renderer
renderer.addChild(spr1);
renderer.addChild(spr2);

// Add the renderer view to the sprite
addChild( renderer.view );

// Render the renderer
renderer.render();
```

*The teste.sprites file:*
```xml









```

_More samples at examples directory._

Known issues
------------

- Rotations on animations will not work as expected when each cell (frame) have more than one sprite
with position different from the animation center point.