Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/excessive/anim9
Animation library for LÖVE3D
https://github.com/excessive/anim9
Last synced: 3 days ago
JSON representation
Animation library for LÖVE3D
- Host: GitHub
- URL: https://github.com/excessive/anim9
- Owner: excessive
- License: other
- Created: 2015-08-27T08:10:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-07T19:47:28.000Z (over 4 years ago)
- Last Synced: 2024-08-02T06:16:03.857Z (3 months ago)
- Language: Lua
- Size: 13.7 KB
- Stars: 29
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-love2d - anim9 - 3D skeletal animation library (design to be used with IQM and IQE). (3D)
README
# anim9
Intended for use with [LÖVE3D](https://github.com/excessive/love3d)
## Usage:
```lua
-- Using IQM...
local anim9 = require "anim9"
local iqm = require "iqm"local file = "foo.iqm"
local model = iqm.load(file)
local anims = iqm.load_anims(file)
model.anim = anim9(anims)-- ...or using IQE
local anim9 = require "anim9"
local iqe = require "iqe"local model = iqe.load("bar.iqe")
local anims = model.anims
model.anim = anim9(anims)-- play an animation normally
local anim1 = model.anim:add_track("AnimationName")
anim1.playing = true-- prevent transition() from affecting this track
anim1.lock = true-- play a second animation on top, mixed in 50% at double speed.
local anim2 = model.anim:add_track("AnimationName2", 0.5, 2.0)
anim2.playing = true-- transition unlocked layers to a new anim over 0.2s
local anim3 = model.anim:add_track("AnimationName3")
model.anim:transition(anim3, 0.2)-- disable the second track (useful for debugging)
anim2.active = falsemodel.anim:update(dt)
-- get the matrix for a given bone...
model.anim.current_matrices["bone_name"]
```