GitXplorerGitXplorer
p

andross

public
32 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
51af527669cc3a70f4f965a8e75a91d3a1141b37

Change debugDrawBones to accept drawing parameters

ppfirsich committed 7 years ago
Unverified
da0af4487b7f9b72844977ba271b935cc1316541

Reduce memory garbage (somewhat)

ppfirsich committed 7 years ago
Unverified
552a24ca0b706d42d3c4b698812d36b68f5d9786

Add extra targetWeight argument to AnimationManager:fadeIn and add :getAnimation

ppfirsich committed 7 years ago
Unverified
3aa92ada85f1a8924f9785133e58e41cc48f9cc8

Add range and loopPoint for animations and add helper function setDuration

ppfirsich committed 7 years ago
Unverified
29a1869457f4591a6eef6e64fc3bad00f1784397

Fix Animation:getPose for channel = nil

ppfirsich committed 7 years ago
Unverified
7791dc570816c8be86ea3fe8e2cce1053a12f18a

Make skin import optional (i.e. only import skeleton and animations)

ppfirsich committed 7 years ago

README

The README file for this repository.

andross is a Lua library for 2D skeletal/bone animations.

It provides different backends, where a backend for löve is already provided.

There is also the possibility to implement different importers, where an importer for the DragonBones format is already provided as well. Originally it is written as a runtime for the Cutout Animation Tools plugin for Blender, so that there are still quite some compatibility issues with files exported by DragonBones itself.

Usage

The animation can be handled through a low and a high level API. For more expanded upon examples, have a look into the examples folder! A minimal example using the high level api would look like this:

andross = require "andross"
andross.backend = require "andross.love"
dragonBones = require "andross.dragonbones"

function love.load(args)
    local attachmentMgr = andross.backend.AtlasAttachmentManager("media/dude/texture/sprites/dude_atlas.png")
    local skel, anims, skin = dragonBones.import(love.filesystem.read("media/dude/dude.json"), attachmentMgr)

    animMgr = andross.AnimationManager(skel, anims, skin)
    animMgr:play("running")
end

function love.update(dt)
    animMgr:update(dt)
end

function love.draw()
    local lg = love.graphics
    lg.push()
        lg.translate(lg.getWidth()/2, lg.getHeight()/2)
        local scale = 0.5
        lg.scale(scale, scale)

        animMgr:render()
    lg.pop()
end

For more detailed documentation, have a look into the Wiki (coming soon).

License

This project is licensed under the MIT license, excluding the assets. I'd love if you tell me, when you use it in your project and I can be happy about people using my work for cool things.

Also I chose MIT (so it's not mandatory) because I'm nice, but I would really love if you would contribute when you have fixes or feature additions.

Contributing

If you want to contribute, pitch me a mail or open an issue. You may also just pull request any feature/fix. Style-wise etc. I would prefer if it just looked like the rest. That is very vague, I know.

There is a todo.txt in the root of the project, which includes everything that I have in mind for future improvements. I should probably open some issues on these.

Also I'm not very experienced with animation and such, so if you have nice insights on how things I do are usually (hopefully better) done or what kind of functionality is very common and needed, hit me up too!

Libraries

andross makes use of the following awesome libraries:

Thanks a lot for your good work!