UNPKG

starling-framework

Version:

A fast, productive library for 2D cross-platform development.

88 lines (71 loc) 2.89 kB
// Class: starling.assets.AssetReference var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this $global.Object.defineProperty(exports, "__esModule", {value: true}); var __map_reserved = {}; // Imports var $hxClasses = require("./../../hxClasses_stub").default; var $hxEnums = require("./../../hxEnums_stub").default; var $import = require("./../../import_stub").default; function starling_textures_TextureOptions() {return require("./../../starling/textures/TextureOptions");} function Reflect() {return require("./../../Reflect");} // Constructor var AssetReference = function(data) { this._data = data; this._textureOptions = new (starling_textures_TextureOptions().default)(); if(typeof(data) == "string") { this._url = data; } else { var urlProp = (Reflect().default).getProperty(data,"url"); if(urlProp != null) { this._url = urlProp; } } } // Meta AssetReference.__name__ = "starling.assets.AssetReference"; AssetReference.__isInterface__ = false; AssetReference.prototype = { get_name: function() { return this._name; }, set_name: function(value) { return this._name = value; }, get_url: function() { return this._url; }, set_url: function(value) { return this._url = value; }, get_data: function() { return this._data; }, set_data: function(value) { return this._data = value; }, get_mimeType: function() { return this._mimeType; }, set_mimeType: function(value) { return this._mimeType = value; }, get_extension: function() { return this._extension; }, set_extension: function(value) { return this._extension = value; }, get_textureOptions: function() { return this._textureOptions; }, set_textureOptions: function(value) { this._textureOptions.copyFrom(value); return this._textureOptions; } }; AssetReference.prototype.__class__ = AssetReference.prototype.constructor = $hxClasses["starling.assets.AssetReference"] = AssetReference; // Init Object.defineProperties(AssetReference.prototype,{ name : { get : function () { return this.get_name (); }, set : function (v) { return this.set_name (v); }}, url : { get : function () { return this.get_url (); }, set : function (v) { return this.set_url (v); }}, data : { get : function () { return this.get_data (); }, set : function (v) { return this.set_data (v); }}, mimeType : { get : function () { return this.get_mimeType (); }, set : function (v) { return this.set_mimeType (v); }}, extension : { get : function () { return this.get_extension (); }, set : function (v) { return this.set_extension (v); }}, textureOptions : { get : function () { return this.get_textureOptions (); }, set : function (v) { return this.set_textureOptions (v); }}, filename : { get : function () { return this.get_filename (); }}}); // Statics // Export exports.default = AssetReference;