Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/rogersanctus/df-loader
- Owner: rogersanctus
- License: mit
- Created: 2013-04-07T06:33:09.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-14T23:28:14.000Z (about 10 years ago)
- Last Synced: 2023-05-27T21:45:37.989Z (over 1 year ago)
- Language: Haxe
- Homepage:
- Size: 258 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
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.