UNPKG

@awayjs/graphics

Version:
49 lines (48 loc) 1.5 kB
import { __extends } from "tslib"; import { EventBase } from '@awayjs/core'; /** * Dispatched to notify changes in an animator's state. */ var AnimatorEvent = /** @class */ (function (_super) { __extends(AnimatorEvent, _super); /** * Create a new <code>AnimatorEvent</code> object. * * @param type The event type. * @param animator The animator object that is the subject of this event. */ function AnimatorEvent(type, animator) { var _this = _super.call(this, type) || this; _this._animator = animator; return _this; } Object.defineProperty(AnimatorEvent.prototype, "animator", { get: function () { return this._animator; }, enumerable: false, configurable: true }); /** * Clones the event. * * @return An exact duplicate of the current event object. */ AnimatorEvent.prototype.clone = function () { return new AnimatorEvent(this.type, this._animator); }; /** * Defines the value of the type property of a start event object. */ AnimatorEvent.START = 'animatorStart'; /** * Defines the value of the type property of a stop event object. */ AnimatorEvent.STOP = 'animatorStop'; /** * Defines the value of the type property of a cycle complete event object. */ AnimatorEvent.CYCLE_COMPLETE = 'animatorCycleComplete'; return AnimatorEvent; }(EventBase)); export { AnimatorEvent };