@awayjs/core
Version:
AwayJS core classes
71 lines (70 loc) • 2.25 kB
JavaScript
import { __extends } from "tslib";
import { EventBase } from './EventBase';
var LoaderEvent = /** @class */ (function (_super) {
__extends(LoaderEvent, _super);
/**
* Create a new LoaderEvent object.
*
* @param type The event type.
* @param url The url of the loaded resource.
* @param content The asset of the loaded resource.
* @param assets The assets of the loaded resource.
*/
function LoaderEvent(type, url, content, assets) {
if (url === void 0) { url = null; }
if (content === void 0) { content = null; }
if (assets === void 0) { assets = null; }
var _this = _super.call(this, type) || this;
_this._url = url;
_this._content = content;
_this._assets = assets;
return _this;
}
Object.defineProperty(LoaderEvent.prototype, "content", {
/**
* The content returned if the resource has been loaded inside a <code>Loader</code> object.
*/
get: function () {
return this._content;
},
enumerable: false,
configurable: true
});
Object.defineProperty(LoaderEvent.prototype, "url", {
/**
* The url of the loaded resource.
*/
get: function () {
return this._url;
},
enumerable: false,
configurable: true
});
Object.defineProperty(LoaderEvent.prototype, "assets", {
/**
* The error string on loadError.
*/
get: function () {
return this._assets;
},
enumerable: false,
configurable: true
});
/**
* Clones the current event.
* @return An exact duplicate of the current event.
*/
LoaderEvent.prototype.clone = function () {
return new LoaderEvent(this.type, this._url, this._content, this._assets);
};
/**
* Dispatched when the loading of a session and all of its dependencies is started.
*/
LoaderEvent.LOADER_START = 'loaderStart';
/**
* Dispatched when the loading of a session and all of its dependencies is complete.
*/
LoaderEvent.LOADER_COMPLETE = 'loaderComplete';
return LoaderEvent;
}(EventBase));
export { LoaderEvent };