UNPKG

@awayjs/graphics

Version:
57 lines (56 loc) 2.05 kB
import { __extends } from "tslib"; import { AnimationNodeBase } from '@awayjs/renderer'; import { SkeletonNaryLERPState } from '../states/SkeletonNaryLERPState'; /** * A skeleton animation node that uses an n-dimensional array of animation node inputs to blend a lineraly interpolated output of a skeleton pose. */ var SkeletonNaryLERPNode = /** @class */ (function (_super) { __extends(SkeletonNaryLERPNode, _super); /** * Creates a new <code>SkeletonNaryLERPNode</code> object. */ function SkeletonNaryLERPNode() { var _this = _super.call(this) || this; _this._iInputs = new Array(); _this._pStateClass = SkeletonNaryLERPState; return _this; } Object.defineProperty(SkeletonNaryLERPNode.prototype, "numInputs", { get: function () { return this._numInputs; }, enumerable: false, configurable: true }); /** * Returns an integer representing the input index of the given skeleton animation node. * * @param input The skeleton animation node for with the input index is requested. */ SkeletonNaryLERPNode.prototype.getInputIndex = function (input) { return this._iInputs.indexOf(input); }; /** * Returns the skeleton animation node object that resides at the given input index. * * @param index The input index for which the skeleton animation node is requested. */ SkeletonNaryLERPNode.prototype.getInputAt = function (index) { return this._iInputs[index]; }; /** * Adds a new skeleton animation node input to the animation node. */ SkeletonNaryLERPNode.prototype.addInput = function (input) { this._iInputs[this._numInputs++] = input; }; /** * @inheritDoc */ SkeletonNaryLERPNode.prototype.getAnimationState = function (animator) { return animator.getAnimationState(this); }; return SkeletonNaryLERPNode; }(AnimationNodeBase)); export { SkeletonNaryLERPNode }; export default SkeletonNaryLERPNode;