df-loader 1.2.3

df-loader: Load and use sprites and animations generated by DarkFunction Editor easily.

Released 2014-11-15.

To install, run:

haxelib install df-loader 1.2.3

See using Haxelib in Haxelib documentation for more information.

Current version1.2.3
StatisticsInstalled 86 times
Tags cross, game, openfl


DarkFunction 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 easily. It depends on OpenFL library: openfl.

To install the dependencies:

haxelib install openfl

To configure OpenFL for Native/Flash/Html5:

openfl setup


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:

haxelib install df-loader

A simple Spritesheet test:

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

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

// Render the renderer

The teste.sprites file:

<?xml version="1.0"?>
<!-- Generated by darkFunction Editor (www.darkfunction.com) -->
<img name="teste.png" w="64" h="32">
    <dir name="/">
      <dir name="sprite">
        <spr name="0" x="0" y="0" w="32" h="32"/>
        <spr name="1" x="32" y="0" w="32" h="32"/>

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.