import { Assets } from "pixi.js";
import { AvatarAnimation } from "./AvatarAnimation";
export class AvatarAnimationManager {
    constructor() {
        this._animations = new Map();
        this._avatarAnimationsLib = Assets.get("figures/animations");
    }
    registerAnimation(action) {
        if (this._avatarAnimationsLib[action] === undefined)
            return;
        this._animations.set(action, new AvatarAnimation(action, this._avatarAnimationsLib[action]));
    }
    getAnimation(action) {
        return this._animations.get(action);
    }
    getLayerData(action, frame, type) {
        const animation = this.getAnimation(action);
        if (animation === undefined)
            return;
        return animation.getFrame(frame, type);
    }
    get animations() {
        return this._avatarAnimationsLib;
    }
}
//# sourceMappingURL=AvatarAnimationManager.js.map