@awayjs/core
Version:
AwayJS core classes
71 lines (70 loc) • 1.68 kB
JavaScript
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);
};
/**
*
*/
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 };