UNPKG

@awayjs/core

Version:
79 lines (78 loc) 1.89 kB
import { __extends } from "tslib"; import { EventBase } from './EventBase'; /** * @export class away.events.AssetEvent */ var AssetEvent = /** @class */ (function (_super) { __extends(AssetEvent, _super); /** * */ function AssetEvent(type, asset, prevName) { if (prevName === void 0) { prevName = null; } var _this = _super.call(this, type) || this; _this._asset = asset; _this._prevName = prevName || _this._asset.name; return _this; } Object.defineProperty(AssetEvent.prototype, "asset", { /** * */ get: function () { return this._asset; }, enumerable: false, configurable: true }); Object.defineProperty(AssetEvent.prototype, "prevName", { /** * */ get: function () { return this._prevName; }, enumerable: false, configurable: true }); /** * */ AssetEvent.prototype.clone = function () { return new AssetEvent(this.type, this._asset, this._prevName); }; /** * Dispatched when the content of an asset is invalidated */ AssetEvent.INVALIDATE = 'invalidate'; /** * Dispatched when an asset is cleared */ AssetEvent.CLEAR = 'clear'; /** * */ AssetEvent.RENAME = 'rename'; /** * */ AssetEvent.ENTER_FRAME = 'enterFrame'; /** * */ AssetEvent.EXIT_FRAME = 'exitFrame'; /** * */ AssetEvent.ASSET_CONFLICT_RESOLVED = 'assetConflictResolved'; /** * Dispatched when the loading of an asset and all of its dependencies is complete. */ AssetEvent.ASSET_COMPLETE = 'assetComplete'; /** * */ AssetEvent.TEXTURE_SIZE_ERROR = 'textureSizeError'; return AssetEvent; }(EventBase)); export { AssetEvent };