import List from '../../../../core/collection/list/List.js';
import { AnimationRule } from "./AnimationRule.js";

class AnimationController {

    /**
     *
     * @type {List<AnimationRule>}
     */
    rules = new List();

    fromJSON(json) {
        this.rules.fromJSON(json, AnimationRule);
    }

    toJSON() {
        return this.rules.toJSON();
    }

    /**
     *
     * @param json
     * @returns {AnimationController}
     */
    static fromJSON(json) {
        const r = new AnimationController();

        r.fromJSON(json);

        return r;
    }
}

AnimationController.typeName = "AnimationController";

export default AnimationController;


