lol-anm-parser
v0.9.1
Published
A parser for .anm files from League of Legends.
Downloads
30
Maintainers
Readme
lol-anm-parser
A parser for .anm files from League of Legends.
Download
lol-anm-parser is installable via:
Usage example
var AnmParser = require('lol-anm-parser'),
anm = new AnmParser();
anm.read('Lamb_Idle.anm', function (err, data) {
console.log(data);
// {
// duration: 10.066666666666666
// FPS: 30
// bones: [
// {
// hash: 497252,
// frames: [
// {
// position: {...}
// quaternion: {...}
// scale: {...}
// }
// ]
// ...
// }
// ...
// ]
// }
});
Available methods
N.B: All methods act as promises if no callback is passed.
parse(path, cb)
It will roughly parse a .anm file from the given path.
Parameters
- path {string} A path to where the file to parse resides.
- [cb] {Function} A callback called with
(error, parsedData)
as arguments.
read(path, cb)
It will read a .anm file from the given path, creating missing data or removing irrelevant data from the animation file.
Parameters
- path {string} A path to where the file to read resides.
- [cb] {Function} A callback called with
(error, readData)
as arguments.