@awayjs/graphics
Version:
AwayJS graphics classes
60 lines (59 loc) • 1.91 kB
JavaScript
import { __extends } from "tslib";
import { AnimationClipState } from './AnimationClipState';
/**
*
*/
var VertexClipState = /** @class */ (function (_super) {
__extends(VertexClipState, _super);
function VertexClipState(animator, vertexClipNode) {
var _this = _super.call(this, animator, vertexClipNode) || this;
_this._vertexClipNode = vertexClipNode;
_this._frames = _this._vertexClipNode.frames;
return _this;
}
Object.defineProperty(VertexClipState.prototype, "currentElements", {
/**
* @inheritDoc
*/
get: function () {
if (this._pFramesDirty)
this._pUpdateFrames();
return this._currentGraphics;
},
enumerable: false,
configurable: true
});
Object.defineProperty(VertexClipState.prototype, "nextElements", {
/**
* @inheritDoc
*/
get: function () {
if (this._pFramesDirty)
this._pUpdateFrames();
return this._nextGraphics;
},
enumerable: false,
configurable: true
});
/**
* @inheritDoc
*/
VertexClipState.prototype._pUpdateFrames = function () {
_super.prototype._pUpdateFrames.call(this);
this._currentGraphics = this._frames[this._pCurrentFrame];
if (this._vertexClipNode.looping && this._pNextFrame >= this._vertexClipNode.lastFrame) {
this._nextGraphics = this._frames[0];
this._pAnimator.dispatchCycleEvent();
}
else
this._nextGraphics = this._frames[this._pNextFrame];
};
/**
* @inheritDoc
*/
VertexClipState.prototype._pUpdatePositionDelta = function () {
//TODO:implement positiondelta functionality for vertex animations
};
return VertexClipState;
}(AnimationClipState));
export { VertexClipState };