@awayjs/graphics
Version:
AwayJS graphics classes
68 lines (67 loc) • 2.4 kB
JavaScript
import { __extends } from "tslib";
import { EventBase } from '@awayjs/core';
/**
* Dispatched to notify changes in an animation state's state.
*/
var AnimationStateEvent = /** @class */ (function (_super) {
__extends(AnimationStateEvent, _super);
/**
* Create a new <code>AnimatonStateEvent</code>
*
* @param type The event type.
* @param animator The animation state object that is the subject of this event.
* @param animationNode The animation node inside the animation state from which the event originated.
*/
function AnimationStateEvent(type, animator, animationState, animationNode) {
var _this = _super.call(this, type) || this;
_this._animator = animator;
_this._animationState = animationState;
_this._animationNode = animationNode;
return _this;
}
Object.defineProperty(AnimationStateEvent.prototype, "animator", {
/**
* The animator object that is the subject of this event.
*/
get: function () {
return this._animator;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AnimationStateEvent.prototype, "animationState", {
/**
* The animation state object that is the subject of this event.
*/
get: function () {
return this._animationState;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AnimationStateEvent.prototype, "animationNode", {
/**
* The animation node inside the animation state from which the event originated.
*/
get: function () {
return this._animationNode;
},
enumerable: false,
configurable: true
});
/**
* Clones the event.
*
* @return An exact duplicate of the current object.
*/
AnimationStateEvent.prototype.clone = function () {
return new AnimationStateEvent(this.type, this._animator, this._animationState, this._animationNode);
};
/**
* Dispatched when a non-looping clip node inside an animation state reaches the end of its timeline.
*/
AnimationStateEvent.PLAYBACK_COMPLETE = 'playbackComplete';
AnimationStateEvent.TRANSITION_COMPLETE = 'transitionComplete';
return AnimationStateEvent;
}(EventBase));
export { AnimationStateEvent };