";
case "string":
return o;
default:
return String(o);
}
};
js_Boot.__interfLoop = function(cc,cl) {
if(cc == null) return false;
if(cc == cl) return true;
var intf = cc.__interfaces__;
if(intf != null) {
var _g1 = 0;
var _g = intf.length;
while(_g1 < _g) {
var i = _g1++;
var i1 = intf[i];
if(i1 == cl || js_Boot.__interfLoop(i1,cl)) return true;
}
}
return js_Boot.__interfLoop(cc.__super__,cl);
};
js_Boot.__instanceof = function(o,cl) {
if(cl == null) return false;
switch(cl) {
case Int:
return (o|0) === o;
case Float:
return typeof(o) == "number";
case Bool:
return typeof(o) == "boolean";
case String:
return typeof(o) == "string";
case Array:
return (o instanceof Array) && o.__enum__ == null;
case Dynamic:
return true;
default:
if(o != null) {
if(typeof(cl) == "function") {
if(o instanceof cl) return true;
if(js_Boot.__interfLoop(js_Boot.getClass(o),cl)) return true;
} else if(typeof(cl) == "object" && js_Boot.__isNativeObj(cl)) {
if(o instanceof cl) return true;
}
} else return false;
if(cl == Class && o.__name__ != null) return true;
if(cl == Enum && o.__ename__ != null) return true;
return o.__enum__ == cl;
}
};
js_Boot.__cast = function(o,t) {
if(js_Boot.__instanceof(o,t)) return o; else throw new js__$Boot_HaxeError("Cannot cast " + Std.string(o) + " to " + Std.string(t));
};
js_Boot.__nativeClassName = function(o) {
var name = js_Boot.__toStr.call(o).slice(8,-1);
if(name == "Object" || name == "Function" || name == "Math" || name == "JSON") return null;
return name;
};
js_Boot.__isNativeObj = function(o) {
return js_Boot.__nativeClassName(o) != null;
};
js_Boot.__resolveNativeClass = function(name) {
return $global[name];
};
var js_Browser = function() { };
$hxClasses["js.Browser"] = js_Browser;
js_Browser.__name__ = ["js","Browser"];
js_Browser.getLocalStorage = function() {
try {
var s = window.localStorage;
s.getItem("");
return s;
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
return null;
}
};
js_Browser.createXMLHttpRequest = function() {
if(typeof XMLHttpRequest != "undefined") return new XMLHttpRequest();
if(typeof ActiveXObject != "undefined") return new ActiveXObject("Microsoft.XMLHTTP");
throw new js__$Boot_HaxeError("Unable to create XMLHttpRequest object.");
};
js_Browser.alert = function(v) {
window.alert(js_Boot.__string_rec(v,""));
};
var js_html__$CanvasElement_CanvasUtil = function() { };
$hxClasses["js.html._CanvasElement.CanvasUtil"] = js_html__$CanvasElement_CanvasUtil;
js_html__$CanvasElement_CanvasUtil.__name__ = ["js","html","_CanvasElement","CanvasUtil"];
js_html__$CanvasElement_CanvasUtil.getContextWebGL = function(canvas,attribs) {
var _g = 0;
var _g1 = ["webgl","experimental-webgl"];
while(_g < _g1.length) {
var name = _g1[_g];
++_g;
var ctx = canvas.getContext(name,attribs);
if(ctx != null) return ctx;
}
return null;
};
var js_html_compat_ArrayBuffer = function(a) {
if((a instanceof Array) && a.__enum__ == null) {
this.a = a;
this.byteLength = a.length;
} else {
var len = a;
this.a = [];
var _g = 0;
while(_g < len) {
var i = _g++;
this.a[i] = 0;
}
this.byteLength = len;
}
};
$hxClasses["js.html.compat.ArrayBuffer"] = js_html_compat_ArrayBuffer;
js_html_compat_ArrayBuffer.__name__ = ["js","html","compat","ArrayBuffer"];
js_html_compat_ArrayBuffer.sliceImpl = function(begin,end) {
var u = new Uint8Array(this,begin,end == null?null:end - begin);
var result = new ArrayBuffer(u.byteLength);
var resultArray = new Uint8Array(result);
resultArray.set(u);
return result;
};
js_html_compat_ArrayBuffer.prototype = {
byteLength: null
,a: null
,slice: function(begin,end) {
return new js_html_compat_ArrayBuffer(this.a.slice(begin,end));
}
,__class__: js_html_compat_ArrayBuffer
};
var js_html_compat_DataView = function(buffer,byteOffset,byteLength) {
this.buf = buffer;
if(byteOffset == null) this.offset = 0; else this.offset = byteOffset;
if(byteLength == null) this.length = buffer.byteLength - this.offset; else this.length = byteLength;
if(this.offset < 0 || this.length < 0 || this.offset + this.length > buffer.byteLength) throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds);
};
$hxClasses["js.html.compat.DataView"] = js_html_compat_DataView;
js_html_compat_DataView.__name__ = ["js","html","compat","DataView"];
js_html_compat_DataView.prototype = {
buf: null
,offset: null
,length: null
,getInt8: function(byteOffset) {
var v = this.buf.a[this.offset + byteOffset];
if(v >= 128) return v - 256; else return v;
}
,getUint8: function(byteOffset) {
return this.buf.a[this.offset + byteOffset];
}
,getInt16: function(byteOffset,littleEndian) {
var v = this.getUint16(byteOffset,littleEndian);
if(v >= 32768) return v - 65536; else return v;
}
,getUint16: function(byteOffset,littleEndian) {
if(littleEndian) return this.buf.a[this.offset + byteOffset] | this.buf.a[this.offset + byteOffset + 1] << 8; else return this.buf.a[this.offset + byteOffset] << 8 | this.buf.a[this.offset + byteOffset + 1];
}
,getInt32: function(byteOffset,littleEndian) {
var p = this.offset + byteOffset;
var a = this.buf.a[p++];
var b = this.buf.a[p++];
var c = this.buf.a[p++];
var d = this.buf.a[p++];
if(littleEndian) return a | b << 8 | c << 16 | d << 24; else return d | c << 8 | b << 16 | a << 24;
}
,getUint32: function(byteOffset,littleEndian) {
var v = this.getInt32(byteOffset,littleEndian);
if(v < 0) return v + 4294967296.; else return v;
}
,getFloat32: function(byteOffset,littleEndian) {
return haxe_io_FPHelper.i32ToFloat(this.getInt32(byteOffset,littleEndian));
}
,getFloat64: function(byteOffset,littleEndian) {
var a = this.getInt32(byteOffset,littleEndian);
var b = this.getInt32(byteOffset + 4,littleEndian);
return haxe_io_FPHelper.i64ToDouble(littleEndian?a:b,littleEndian?b:a);
}
,setInt8: function(byteOffset,value) {
if(value < 0) this.buf.a[byteOffset + this.offset] = value + 128 & 255; else this.buf.a[byteOffset + this.offset] = value & 255;
}
,setUint8: function(byteOffset,value) {
this.buf.a[byteOffset + this.offset] = value & 255;
}
,setInt16: function(byteOffset,value,littleEndian) {
this.setUint16(byteOffset,value < 0?value + 65536:value,littleEndian);
}
,setUint16: function(byteOffset,value,littleEndian) {
var p = byteOffset + this.offset;
if(littleEndian) {
this.buf.a[p] = value & 255;
this.buf.a[p++] = value >> 8 & 255;
} else {
this.buf.a[p++] = value >> 8 & 255;
this.buf.a[p] = value & 255;
}
}
,setInt32: function(byteOffset,value,littleEndian) {
this.setUint32(byteOffset,value,littleEndian);
}
,setUint32: function(byteOffset,value,littleEndian) {
var p = byteOffset + this.offset;
if(littleEndian) {
this.buf.a[p++] = value & 255;
this.buf.a[p++] = value >> 8 & 255;
this.buf.a[p++] = value >> 16 & 255;
this.buf.a[p++] = value >>> 24;
} else {
this.buf.a[p++] = value >>> 24;
this.buf.a[p++] = value >> 16 & 255;
this.buf.a[p++] = value >> 8 & 255;
this.buf.a[p++] = value & 255;
}
}
,setFloat32: function(byteOffset,value,littleEndian) {
this.setUint32(byteOffset,haxe_io_FPHelper.floatToI32(value),littleEndian);
}
,setFloat64: function(byteOffset,value,littleEndian) {
var i64 = haxe_io_FPHelper.doubleToI64(value);
if(littleEndian) {
this.setUint32(byteOffset,i64.low);
this.setUint32(byteOffset,i64.high);
} else {
this.setUint32(byteOffset,i64.high);
this.setUint32(byteOffset,i64.low);
}
}
,__class__: js_html_compat_DataView
};
var js_html_compat_Uint8Array = function() { };
$hxClasses["js.html.compat.Uint8Array"] = js_html_compat_Uint8Array;
js_html_compat_Uint8Array.__name__ = ["js","html","compat","Uint8Array"];
js_html_compat_Uint8Array._new = function(arg1,offset,length) {
var arr;
if(typeof(arg1) == "number") {
arr = [];
var _g = 0;
while(_g < arg1) {
var i = _g++;
arr[i] = 0;
}
arr.byteLength = arr.length;
arr.byteOffset = 0;
arr.buffer = new js_html_compat_ArrayBuffer(arr);
} else if(js_Boot.__instanceof(arg1,js_html_compat_ArrayBuffer)) {
var buffer = arg1;
if(offset == null) offset = 0;
if(length == null) length = buffer.byteLength - offset;
if(offset == 0) arr = buffer.a; else arr = buffer.a.slice(offset,offset + length);
arr.byteLength = arr.length;
arr.byteOffset = offset;
arr.buffer = buffer;
} else if((arg1 instanceof Array) && arg1.__enum__ == null) {
arr = arg1.slice();
arr.byteLength = arr.length;
arr.byteOffset = 0;
arr.buffer = new js_html_compat_ArrayBuffer(arr);
} else throw new js__$Boot_HaxeError("TODO " + Std.string(arg1));
arr.subarray = js_html_compat_Uint8Array._subarray;
arr.set = js_html_compat_Uint8Array._set;
return arr;
};
js_html_compat_Uint8Array._set = function(arg,offset) {
var t = this;
if(js_Boot.__instanceof(arg.buffer,js_html_compat_ArrayBuffer)) {
var a = arg;
if(arg.byteLength + offset > t.byteLength) throw new js__$Boot_HaxeError("set() outside of range");
var _g1 = 0;
var _g = arg.byteLength;
while(_g1 < _g) {
var i = _g1++;
t[i + offset] = a[i];
}
} else if((arg instanceof Array) && arg.__enum__ == null) {
var a1 = arg;
if(a1.length + offset > t.byteLength) throw new js__$Boot_HaxeError("set() outside of range");
var _g11 = 0;
var _g2 = a1.length;
while(_g11 < _g2) {
var i1 = _g11++;
t[i1 + offset] = a1[i1];
}
} else throw new js__$Boot_HaxeError("TODO");
};
js_html_compat_Uint8Array._subarray = function(start,end) {
var t = this;
var a = js_html_compat_Uint8Array._new(t.slice(start,end));
a.byteOffset = start;
return a;
};
var lime__$backend_html5_GameDeviceData = function() {
this.connected = true;
this.buttons = [];
this.axes = [];
};
$hxClasses["lime._backend.html5.GameDeviceData"] = lime__$backend_html5_GameDeviceData;
lime__$backend_html5_GameDeviceData.__name__ = ["lime","_backend","html5","GameDeviceData"];
lime__$backend_html5_GameDeviceData.prototype = {
connected: null
,id: null
,isGamepad: null
,buttons: null
,axes: null
,__class__: lime__$backend_html5_GameDeviceData
};
var lime__$backend_html5_HTML5AudioSource = function(parent) {
this.parent = parent;
this.id = -1;
this.gain = 1;
this.position = new lime_math_Vector4();
};
$hxClasses["lime._backend.html5.HTML5AudioSource"] = lime__$backend_html5_HTML5AudioSource;
lime__$backend_html5_HTML5AudioSource.__name__ = ["lime","_backend","html5","HTML5AudioSource"];
lime__$backend_html5_HTML5AudioSource.prototype = {
completed: null
,gain: null
,id: null
,length: null
,loops: null
,parent: null
,playing: null
,position: null
,dispose: function() {
}
,init: function() {
}
,play: function() {
if(this.playing || this.parent.buffer == null) return;
this.playing = true;
var time = this.getCurrentTime();
this.completed = false;
var cacheVolume = this.parent.buffer.__srcHowl._volume;
this.parent.buffer.__srcHowl._volume = this.parent.get_gain();
this.id = this.parent.buffer.__srcHowl.play();
this.parent.buffer.__srcHowl._volume = cacheVolume;
this.setPosition(this.parent.get_position());
this.parent.buffer.__srcHowl.on("end",$bind(this,this.howl_onEnd),this.id);
this.setCurrentTime(time);
}
,pause: function() {
this.playing = false;
this.parent.buffer.__srcHowl.pause(this.id);
}
,stop: function() {
this.playing = false;
this.parent.buffer.__srcHowl.stop(this.id);
}
,howl_onEnd: function() {
this.playing = false;
if(this.loops > 0) {
this.loops--;
this.stop();
this.play();
return;
} else this.parent.buffer.__srcHowl.stop(this.id);
this.completed = true;
this.parent.onComplete.dispatch();
}
,getCurrentTime: function() {
if(this.id == -1) return 0;
if(this.completed) return this.getLength(); else {
var time = Std["int"](this.parent.buffer.__srcHowl.seek(this.id) * 1000) - this.parent.offset;
if(time < 0) return 0;
return time;
}
}
,setCurrentTime: function(value) {
if(this.parent.buffer != null) {
var pos = (value + this.parent.offset) / 1000;
if(pos < 0) pos = 0;
this.parent.buffer.__srcHowl.seek(pos,this.id);
}
return value;
}
,getGain: function() {
return this.gain;
}
,setGain: function(value) {
if(this.parent.buffer != null) this.parent.buffer.__srcHowl.volume(value,this.id);
return this.gain = value;
}
,getLength: function() {
if(this.length != 0) return this.length;
return Std["int"](this.parent.buffer.__srcHowl.duration() * 1000);
}
,setLength: function(value) {
return this.length = value;
}
,getLoops: function() {
return this.loops;
}
,setLoops: function(value) {
return this.loops = value;
}
,getPosition: function() {
return this.position;
}
,setPosition: function(value) {
this.position.x = value.x;
this.position.y = value.y;
this.position.z = value.z;
this.position.w = value.w;
return this.position;
}
,__class__: lime__$backend_html5_HTML5AudioSource
};
var lime__$backend_html5_HTML5GLRenderContext = function(context) {
this.MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 37447;
this.TIMEOUT_IGNORED = -1;
this.INVALID_INDEX = -1;
this.DEPTH32F_STENCIL8 = 36013;
this.DEPTH_COMPONENT32F = 36012;
this.DYNAMIC_COPY = 35050;
this.DYNAMIC_READ = 35049;
this.STATIC_COPY = 35046;
this.STATIC_READ = 35045;
this.STREAM_COPY = 35042;
this.STREAM_READ = 35041;
this.DEPTH_COMPONENT24 = 33190;
this.MAX = 32776;
this.MIN = 32775;
this.STENCIL = 6146;
this.DEPTH = 6145;
this.COLOR = 6144;
this.SYNC_FLUSH_COMMANDS_BIT = 1;
this.WAIT_FAILED = 37149;
this.CONDITION_SATISFIED = 37148;
this.TIMEOUT_EXPIRED = 37147;
this.ALREADY_SIGNALED = 37146;
this.SIGNALED = 37145;
this.UNSIGNALED = 37144;
this.SYNC_GPU_COMMANDS_COMPLETE = 37143;
this.SYNC_FENCE = 37142;
this.SYNC_FLAGS = 37141;
this.SYNC_STATUS = 37140;
this.SYNC_CONDITION = 37139;
this.OBJECT_TYPE = 37138;
this.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 35398;
this.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 35396;
this.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 35395;
this.UNIFORM_BLOCK_ACTIVE_UNIFORMS = 35394;
this.UNIFORM_BLOCK_DATA_SIZE = 35392;
this.UNIFORM_BLOCK_BINDING = 35391;
this.UNIFORM_IS_ROW_MAJOR = 35390;
this.UNIFORM_MATRIX_STRIDE = 35389;
this.UNIFORM_ARRAY_STRIDE = 35388;
this.UNIFORM_OFFSET = 35387;
this.UNIFORM_BLOCK_INDEX = 35386;
this.UNIFORM_SIZE = 35384;
this.UNIFORM_TYPE = 35383;
this.ACTIVE_UNIFORM_BLOCKS = 35382;
this.UNIFORM_BUFFER_OFFSET_ALIGNMENT = 35380;
this.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 35379;
this.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 35377;
this.MAX_UNIFORM_BLOCK_SIZE = 35376;
this.MAX_UNIFORM_BUFFER_BINDINGS = 35375;
this.MAX_COMBINED_UNIFORM_BLOCKS = 35374;
this.MAX_FRAGMENT_UNIFORM_BLOCKS = 35373;
this.MAX_VERTEX_UNIFORM_BLOCKS = 35371;
this.UNIFORM_BUFFER_SIZE = 35370;
this.UNIFORM_BUFFER_START = 35369;
this.UNIFORM_BUFFER_BINDING = 35368;
this.UNIFORM_BUFFER = 35345;
this.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 36182;
this.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 36052;
this.RENDERBUFFER_SAMPLES = 36011;
this.READ_FRAMEBUFFER_BINDING = 36010;
this.DRAW_FRAMEBUFFER = 36009;
this.READ_FRAMEBUFFER = 36008;
this.DRAW_FRAMEBUFFER_BINDING = 36006;
this.DEPTH24_STENCIL8 = 35056;
this.FRAMEBUFFER_DEFAULT = 33304;
this.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 33303;
this.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 33302;
this.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 33301;
this.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 33300;
this.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 33299;
this.FRAMEBUFFER_ATTACHMENT_RED_SIZE = 33298;
this.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 33297;
this.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 33296;
this.TRANSFORM_FEEDBACK_BINDING = 36389;
this.TRANSFORM_FEEDBACK_ACTIVE = 36388;
this.TRANSFORM_FEEDBACK_PAUSED = 36387;
this.TRANSFORM_FEEDBACK = 36386;
this.TRANSFORM_FEEDBACK_BUFFER_BINDING = 35983;
this.TRANSFORM_FEEDBACK_BUFFER = 35982;
this.SEPARATE_ATTRIBS = 35981;
this.INTERLEAVED_ATTRIBS = 35980;
this.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 35979;
this.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 35978;
this.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 35976;
this.TRANSFORM_FEEDBACK_BUFFER_SIZE = 35973;
this.TRANSFORM_FEEDBACK_BUFFER_START = 35972;
this.TRANSFORM_FEEDBACK_VARYINGS = 35971;
this.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 35968;
this.TRANSFORM_FEEDBACK_BUFFER_MODE = 35967;
this.VERTEX_ATTRIB_ARRAY_DIVISOR = 35070;
this.VERTEX_ATTRIB_ARRAY_INTEGER = 35069;
this.SIGNED_NORMALIZED = 36764;
this.UNSIGNED_NORMALIZED = 35863;
this.UNSIGNED_INT_VEC4 = 36296;
this.UNSIGNED_INT_VEC3 = 36295;
this.UNSIGNED_INT_VEC2 = 36294;
this.FLOAT_MAT4x3 = 35690;
this.FLOAT_MAT4x2 = 35689;
this.FLOAT_MAT3x4 = 35688;
this.FLOAT_MAT3x2 = 35687;
this.FLOAT_MAT2x4 = 35686;
this.FLOAT_MAT2x3 = 35685;
this.COPY_WRITE_BUFFER_BINDING = 36663;
this.COPY_READ_BUFFER_BINDING = 36662;
this.COPY_WRITE_BUFFER = 36663;
this.COPY_READ_BUFFER = 36662;
this.PIXEL_UNPACK_BUFFER_BINDING = 35055;
this.PIXEL_PACK_BUFFER_BINDING = 35053;
this.PIXEL_UNPACK_BUFFER = 35052;
this.PIXEL_PACK_BUFFER = 35051;
this.SAMPLER_BINDING = 35097;
this.MAX_SAMPLES = 36183;
this.UNSIGNED_INT_SAMPLER_2D_ARRAY = 36311;
this.UNSIGNED_INT_SAMPLER_CUBE = 36308;
this.UNSIGNED_INT_SAMPLER_3D = 36307;
this.UNSIGNED_INT_SAMPLER_2D = 36306;
this.INT_SAMPLER_2D_ARRAY = 36303;
this.INT_SAMPLER_CUBE = 36300;
this.INT_SAMPLER_3D = 36299;
this.INT_SAMPLER_2D = 36298;
this.SAMPLER_CUBE_SHADOW = 36293;
this.SAMPLER_2D_ARRAY_SHADOW = 36292;
this.SAMPLER_2D_ARRAY = 36289;
this.SAMPLER_2D_SHADOW = 35682;
this.SAMPLER_3D = 35679;
this.COLOR_ATTACHMENT15 = 36079;
this.COLOR_ATTACHMENT14 = 36078;
this.COLOR_ATTACHMENT13 = 36077;
this.COLOR_ATTACHMENT12 = 36076;
this.COLOR_ATTACHMENT11 = 36075;
this.COLOR_ATTACHMENT10 = 36074;
this.COLOR_ATTACHMENT9 = 36073;
this.COLOR_ATTACHMENT8 = 36072;
this.COLOR_ATTACHMENT7 = 36071;
this.COLOR_ATTACHMENT6 = 36070;
this.COLOR_ATTACHMENT5 = 36069;
this.COLOR_ATTACHMENT4 = 36068;
this.COLOR_ATTACHMENT3 = 36067;
this.COLOR_ATTACHMENT2 = 36066;
this.COLOR_ATTACHMENT1 = 36065;
this.MAX_COLOR_ATTACHMENTS = 36063;
this.DRAW_BUFFER15 = 34868;
this.DRAW_BUFFER14 = 34867;
this.DRAW_BUFFER13 = 34866;
this.DRAW_BUFFER12 = 34865;
this.DRAW_BUFFER11 = 34864;
this.DRAW_BUFFER10 = 34863;
this.DRAW_BUFFER9 = 34862;
this.DRAW_BUFFER8 = 34861;
this.DRAW_BUFFER7 = 34860;
this.DRAW_BUFFER6 = 34859;
this.DRAW_BUFFER5 = 34858;
this.DRAW_BUFFER4 = 34857;
this.DRAW_BUFFER3 = 34856;
this.DRAW_BUFFER2 = 34855;
this.DRAW_BUFFER1 = 34854;
this.DRAW_BUFFER0 = 34853;
this.MAX_DRAW_BUFFERS = 34852;
this.ANY_SAMPLES_PASSED_CONSERVATIVE = 36202;
this.ANY_SAMPLES_PASSED = 35887;
this.QUERY_RESULT_AVAILABLE = 34919;
this.QUERY_RESULT = 34918;
this.CURRENT_QUERY = 34917;
this.INT_2_10_10_10_REV = 36255;
this.RG_INTEGER = 33320;
this.RG = 33319;
this.HALF_FLOAT = 5131;
this.UNSIGNED_INT_24_8 = 34042;
this.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269;
this.UNSIGNED_INT_5_9_9_9_REV = 35902;
this.UNSIGNED_INT_10F_11F_11F_REV = 35899;
this.UNSIGNED_INT_2_10_10_10_REV = 33640;
this.TEXTURE_IMMUTABLE_LEVELS = 33503;
this.TEXTURE_IMMUTABLE_FORMAT = 37167;
this.RGB10_A2UI = 36975;
this.RGBA8_SNORM = 36759;
this.RGB8_SNORM = 36758;
this.RG8_SNORM = 36757;
this.R8_SNORM = 36756;
this.RG32UI = 33340;
this.RG32I = 33339;
this.RG16UI = 33338;
this.RG16I = 33337;
this.RG8UI = 33336;
this.RG8I = 33335;
this.R32UI = 33334;
this.R32I = 33333;
this.R16UI = 33332;
this.R16I = 33331;
this.R8UI = 33330;
this.R8I = 33329;
this.RG32F = 33328;
this.RG16F = 33327;
this.R32F = 33326;
this.R16F = 33325;
this.RG8 = 33323;
this.R8 = 33321;
this.RGBA_INTEGER = 36249;
this.RGB_INTEGER = 36248;
this.RED_INTEGER = 36244;
this.RGB8I = 36239;
this.RGBA8I = 36238;
this.RGB16I = 36233;
this.RGBA16I = 36232;
this.RGB32I = 36227;
this.RGBA32I = 36226;
this.RGB8UI = 36221;
this.RGBA8UI = 36220;
this.RGB16UI = 36215;
this.RGBA16UI = 36214;
this.RGB32UI = 36209;
this.RGBA32UI = 36208;
this.RGB9_E5 = 35901;
this.R11F_G11F_B10F = 35898;
this.TEXTURE_BINDING_2D_ARRAY = 35869;
this.TEXTURE_2D_ARRAY = 35866;
this.RGB16F = 34843;
this.RGBA16F = 34842;
this.RGB32F = 34837;
this.RGBA32F = 34836;
this.COMPARE_REF_TO_TEXTURE = 34894;
this.SRGB8_ALPHA8 = 35907;
this.SRGB8 = 35905;
this.SRGB = 35904;
this.TEXTURE_COMPARE_FUNC = 34893;
this.TEXTURE_COMPARE_MODE = 34892;
this.TEXTURE_MAX_LEVEL = 33085;
this.TEXTURE_BASE_LEVEL = 33084;
this.TEXTURE_MAX_LOD = 33083;
this.TEXTURE_MIN_LOD = 33082;
this.TEXTURE_WRAP_R = 32882;
this.TEXTURE_3D = 32879;
this.RGB10_A2 = 32857;
this.RGBA8 = 32856;
this.RGB8 = 32849;
this.RED = 6403;
this.MAX_ELEMENT_INDEX = 36203;
this.MAX_SERVER_WAIT_TIMEOUT = 37137;
this.MAX_FRAGMENT_INPUT_COMPONENTS = 37157;
this.MAX_VERTEX_OUTPUT_COMPONENTS = 37154;
this.VERTEX_ARRAY_BINDING = 34229;
this.RASTERIZER_DISCARD = 35977;
this.FRAGMENT_SHADER_DERIVATIVE_HINT = 35723;
this.MAX_VARYING_COMPONENTS = 35659;
this.MAX_PROGRAM_TEXEL_OFFSET = 35077;
this.MIN_PROGRAM_TEXEL_OFFSET = 35076;
this.MAX_ARRAY_TEXTURE_LAYERS = 35071;
this.MAX_VERTEX_UNIFORM_COMPONENTS = 35658;
this.MAX_FRAGMENT_UNIFORM_COMPONENTS = 35657;
this.MAX_TEXTURE_LOD_BIAS = 34045;
this.MAX_ELEMENTS_INDICES = 33001;
this.MAX_ELEMENTS_VERTICES = 33000;
this.MAX_3D_TEXTURE_SIZE = 32883;
this.UNPACK_IMAGE_HEIGHT = 32878;
this.UNPACK_SKIP_IMAGES = 32877;
this.TEXTURE_BINDING_3D = 32874;
this.PACK_SKIP_PIXELS = 3332;
this.PACK_SKIP_ROWS = 3331;
this.PACK_ROW_LENGTH = 3330;
this.UNPACK_SKIP_PIXELS = 3316;
this.UNPACK_SKIP_ROWS = 3315;
this.UNPACK_ROW_LENGTH = 3314;
this.READ_BUFFER = 3074;
this.BROWSER_DEFAULT_WEBGL = 37444;
this.UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443;
this.CONTEXT_LOST_WEBGL = 37442;
this.UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441;
this.UNPACK_FLIP_Y_WEBGL = 37440;
this.INVALID_FRAMEBUFFER_OPERATION = 1286;
this.MAX_RENDERBUFFER_SIZE = 34024;
this.RENDERBUFFER_BINDING = 36007;
this.FRAMEBUFFER_BINDING = 36006;
this.FRAMEBUFFER_UNSUPPORTED = 36061;
this.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057;
this.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055;
this.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054;
this.FRAMEBUFFER_COMPLETE = 36053;
this.NONE = 0;
this.DEPTH_STENCIL_ATTACHMENT = 33306;
this.STENCIL_ATTACHMENT = 36128;
this.DEPTH_ATTACHMENT = 36096;
this.COLOR_ATTACHMENT0 = 36064;
this.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051;
this.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050;
this.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049;
this.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048;
this.RENDERBUFFER_STENCIL_SIZE = 36181;
this.RENDERBUFFER_DEPTH_SIZE = 36180;
this.RENDERBUFFER_ALPHA_SIZE = 36179;
this.RENDERBUFFER_BLUE_SIZE = 36178;
this.RENDERBUFFER_GREEN_SIZE = 36177;
this.RENDERBUFFER_RED_SIZE = 36176;
this.RENDERBUFFER_INTERNAL_FORMAT = 36164;
this.RENDERBUFFER_HEIGHT = 36163;
this.RENDERBUFFER_WIDTH = 36162;
this.DEPTH_STENCIL = 34041;
this.STENCIL_INDEX8 = 36168;
this.STENCIL_INDEX = 6401;
this.DEPTH_COMPONENT16 = 33189;
this.RGB565 = 36194;
this.RGB5_A1 = 32855;
this.RGBA4 = 32854;
this.RENDERBUFFER = 36161;
this.FRAMEBUFFER = 36160;
this.HIGH_INT = 36341;
this.MEDIUM_INT = 36340;
this.LOW_INT = 36339;
this.HIGH_FLOAT = 36338;
this.MEDIUM_FLOAT = 36337;
this.LOW_FLOAT = 36336;
this.COMPILE_STATUS = 35713;
this.POINT_SPRITE = 34913;
this.VERTEX_PROGRAM_POINT_SIZE = 34370;
this.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975;
this.VERTEX_ATTRIB_ARRAY_POINTER = 34373;
this.VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922;
this.VERTEX_ATTRIB_ARRAY_TYPE = 34341;
this.VERTEX_ATTRIB_ARRAY_STRIDE = 34340;
this.VERTEX_ATTRIB_ARRAY_SIZE = 34339;
this.VERTEX_ATTRIB_ARRAY_ENABLED = 34338;
this.SAMPLER_CUBE = 35680;
this.SAMPLER_2D = 35678;
this.FLOAT_MAT4 = 35676;
this.FLOAT_MAT3 = 35675;
this.FLOAT_MAT2 = 35674;
this.BOOL_VEC4 = 35673;
this.BOOL_VEC3 = 35672;
this.BOOL_VEC2 = 35671;
this.BOOL = 35670;
this.INT_VEC4 = 35669;
this.INT_VEC3 = 35668;
this.INT_VEC2 = 35667;
this.FLOAT_VEC4 = 35666;
this.FLOAT_VEC3 = 35665;
this.FLOAT_VEC2 = 35664;
this.MIRRORED_REPEAT = 33648;
this.CLAMP_TO_EDGE = 33071;
this.REPEAT = 10497;
this.ACTIVE_TEXTURE = 34016;
this.TEXTURE31 = 34015;
this.TEXTURE30 = 34014;
this.TEXTURE29 = 34013;
this.TEXTURE28 = 34012;
this.TEXTURE27 = 34011;
this.TEXTURE26 = 34010;
this.TEXTURE25 = 34009;
this.TEXTURE24 = 34008;
this.TEXTURE23 = 34007;
this.TEXTURE22 = 34006;
this.TEXTURE21 = 34005;
this.TEXTURE20 = 34004;
this.TEXTURE19 = 34003;
this.TEXTURE18 = 34002;
this.TEXTURE17 = 34001;
this.TEXTURE16 = 34000;
this.TEXTURE15 = 33999;
this.TEXTURE14 = 33998;
this.TEXTURE13 = 33997;
this.TEXTURE12 = 33996;
this.TEXTURE11 = 33995;
this.TEXTURE10 = 33994;
this.TEXTURE9 = 33993;
this.TEXTURE8 = 33992;
this.TEXTURE7 = 33991;
this.TEXTURE6 = 33990;
this.TEXTURE5 = 33989;
this.TEXTURE4 = 33988;
this.TEXTURE3 = 33987;
this.TEXTURE2 = 33986;
this.TEXTURE1 = 33985;
this.TEXTURE0 = 33984;
this.MAX_CUBE_MAP_TEXTURE_SIZE = 34076;
this.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074;
this.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073;
this.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072;
this.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071;
this.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070;
this.TEXTURE_CUBE_MAP_POSITIVE_X = 34069;
this.TEXTURE_BINDING_CUBE_MAP = 34068;
this.TEXTURE_CUBE_MAP = 34067;
this.TEXTURE = 5890;
this.TEXTURE_2D = 3553;
this.TEXTURE_WRAP_T = 10243;
this.TEXTURE_WRAP_S = 10242;
this.TEXTURE_MIN_FILTER = 10241;
this.TEXTURE_MAG_FILTER = 10240;
this.LINEAR_MIPMAP_LINEAR = 9987;
this.NEAREST_MIPMAP_LINEAR = 9986;
this.LINEAR_MIPMAP_NEAREST = 9985;
this.NEAREST_MIPMAP_NEAREST = 9984;
this.LINEAR = 9729;
this.NEAREST = 9728;
this.VERSION = 7938;
this.RENDERER = 7937;
this.VENDOR = 7936;
this.DECR_WRAP = 34056;
this.INCR_WRAP = 34055;
this.INVERT = 5386;
this.DECR = 7683;
this.INCR = 7682;
this.REPLACE = 7681;
this.KEEP = 7680;
this.ALWAYS = 519;
this.GEQUAL = 518;
this.NOTEQUAL = 517;
this.GREATER = 516;
this.LEQUAL = 515;
this.EQUAL = 514;
this.LESS = 513;
this.NEVER = 512;
this.CURRENT_PROGRAM = 35725;
this.SHADING_LANGUAGE_VERSION = 35724;
this.ACTIVE_ATTRIBUTES = 35721;
this.ACTIVE_UNIFORMS = 35718;
this.ATTACHED_SHADERS = 35717;
this.VALIDATE_STATUS = 35715;
this.LINK_STATUS = 35714;
this.DELETE_STATUS = 35712;
this.SHADER_TYPE = 35663;
this.MAX_FRAGMENT_UNIFORM_VECTORS = 36349;
this.MAX_TEXTURE_IMAGE_UNITS = 34930;
this.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660;
this.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661;
this.MAX_VARYING_VECTORS = 36348;
this.MAX_VERTEX_UNIFORM_VECTORS = 36347;
this.MAX_VERTEX_ATTRIBS = 34921;
this.VERTEX_SHADER = 35633;
this.FRAGMENT_SHADER = 35632;
this.UNSIGNED_SHORT_5_6_5 = 33635;
this.UNSIGNED_SHORT_5_5_5_1 = 32820;
this.UNSIGNED_SHORT_4_4_4_4 = 32819;
this.LUMINANCE_ALPHA = 6410;
this.LUMINANCE = 6409;
this.RGBA = 6408;
this.RGB = 6407;
this.ALPHA = 6406;
this.DEPTH_COMPONENT = 6402;
this.FLOAT = 5126;
this.UNSIGNED_INT = 5125;
this.INT = 5124;
this.UNSIGNED_SHORT = 5123;
this.SHORT = 5122;
this.UNSIGNED_BYTE = 5121;
this.BYTE = 5120;
this.GENERATE_MIPMAP_HINT = 33170;
this.NICEST = 4354;
this.FASTEST = 4353;
this.DONT_CARE = 4352;
this.COMPRESSED_TEXTURE_FORMATS = 34467;
this.SAMPLE_COVERAGE_INVERT = 32939;
this.SAMPLE_COVERAGE_VALUE = 32938;
this.SAMPLES = 32937;
this.SAMPLE_BUFFERS = 32936;
this.TEXTURE_BINDING_2D = 32873;
this.POLYGON_OFFSET_FACTOR = 32824;
this.POLYGON_OFFSET_UNITS = 10752;
this.STENCIL_BITS = 3415;
this.DEPTH_BITS = 3414;
this.ALPHA_BITS = 3413;
this.BLUE_BITS = 3412;
this.GREEN_BITS = 3411;
this.RED_BITS = 3410;
this.SUBPIXEL_BITS = 3408;
this.MAX_VIEWPORT_DIMS = 3386;
this.MAX_TEXTURE_SIZE = 3379;
this.PACK_ALIGNMENT = 3333;
this.UNPACK_ALIGNMENT = 3317;
this.COLOR_WRITEMASK = 3107;
this.COLOR_CLEAR_VALUE = 3106;
this.SCISSOR_BOX = 3088;
this.VIEWPORT = 2978;
this.STENCIL_BACK_WRITEMASK = 36005;
this.STENCIL_BACK_VALUE_MASK = 36004;
this.STENCIL_BACK_REF = 36003;
this.STENCIL_BACK_PASS_DEPTH_PASS = 34819;
this.STENCIL_BACK_PASS_DEPTH_FAIL = 34818;
this.STENCIL_BACK_FAIL = 34817;
this.STENCIL_BACK_FUNC = 34816;
this.STENCIL_WRITEMASK = 2968;
this.STENCIL_VALUE_MASK = 2963;
this.STENCIL_REF = 2967;
this.STENCIL_PASS_DEPTH_PASS = 2966;
this.STENCIL_PASS_DEPTH_FAIL = 2965;
this.STENCIL_FAIL = 2964;
this.STENCIL_FUNC = 2962;
this.STENCIL_CLEAR_VALUE = 2961;
this.DEPTH_FUNC = 2932;
this.DEPTH_CLEAR_VALUE = 2931;
this.DEPTH_WRITEMASK = 2930;
this.DEPTH_RANGE = 2928;
this.FRONT_FACE = 2886;
this.CULL_FACE_MODE = 2885;
this.ALIASED_LINE_WIDTH_RANGE = 33902;
this.ALIASED_POINT_SIZE_RANGE = 33901;
this.LINE_WIDTH = 2849;
this.CCW = 2305;
this.CW = 2304;
this.OUT_OF_MEMORY = 1285;
this.INVALID_OPERATION = 1282;
this.INVALID_VALUE = 1281;
this.INVALID_ENUM = 1280;
this.NO_ERROR = 0;
this.SAMPLE_COVERAGE = 32928;
this.SAMPLE_ALPHA_TO_COVERAGE = 32926;
this.POLYGON_OFFSET_FILL = 32823;
this.SCISSOR_TEST = 3089;
this.DEPTH_TEST = 2929;
this.STENCIL_TEST = 2960;
this.DITHER = 3024;
this.BLEND = 3042;
this.CULL_FACE = 2884;
this.FRONT_AND_BACK = 1032;
this.BACK = 1029;
this.FRONT = 1028;
this.CURRENT_VERTEX_ATTRIB = 34342;
this.BUFFER_USAGE = 34661;
this.BUFFER_SIZE = 34660;
this.DYNAMIC_DRAW = 35048;
this.STATIC_DRAW = 35044;
this.STREAM_DRAW = 35040;
this.ELEMENT_ARRAY_BUFFER_BINDING = 34965;
this.ARRAY_BUFFER_BINDING = 34964;
this.ELEMENT_ARRAY_BUFFER = 34963;
this.ARRAY_BUFFER = 34962;
this.BLEND_COLOR = 32773;
this.ONE_MINUS_CONSTANT_ALPHA = 32772;
this.CONSTANT_ALPHA = 32771;
this.ONE_MINUS_CONSTANT_COLOR = 32770;
this.CONSTANT_COLOR = 32769;
this.BLEND_SRC_ALPHA = 32971;
this.BLEND_DST_ALPHA = 32970;
this.BLEND_SRC_RGB = 32969;
this.BLEND_DST_RGB = 32968;
this.FUNC_REVERSE_SUBTRACT = 32779;
this.FUNC_SUBTRACT = 32778;
this.BLEND_EQUATION_ALPHA = 34877;
this.BLEND_EQUATION_RGB = 32777;
this.BLEND_EQUATION = 32777;
this.FUNC_ADD = 32774;
this.SRC_ALPHA_SATURATE = 776;
this.ONE_MINUS_DST_COLOR = 775;
this.DST_COLOR = 774;
this.ONE_MINUS_DST_ALPHA = 773;
this.DST_ALPHA = 772;
this.ONE_MINUS_SRC_ALPHA = 771;
this.SRC_ALPHA = 770;
this.ONE_MINUS_SRC_COLOR = 769;
this.SRC_COLOR = 768;
this.ONE = 1;
this.ZERO = 0;
this.TRIANGLE_FAN = 6;
this.TRIANGLE_STRIP = 5;
this.TRIANGLES = 4;
this.LINE_STRIP = 3;
this.LINE_LOOP = 2;
this.LINES = 1;
this.POINTS = 0;
this.COLOR_BUFFER_BIT = 16384;
this.STENCIL_BUFFER_BIT = 1024;
this.DEPTH_BUFFER_BIT = 256;
this.__context = context;
this.version = 1;
this.type = lime_graphics_opengl_GLContextType.WEBGL;
if(context != null) {
var gl = context;
if(Object.prototype.hasOwnProperty.call(gl,"rawgl")) gl = Reflect.field(context,"rawgl");
if(Reflect.hasField(window,"WebGL2RenderingContext") && js_Boot.__instanceof(gl,WebGL2RenderingContext)) this.version = 2;
}
};
$hxClasses["lime._backend.html5.HTML5GLRenderContext"] = lime__$backend_html5_HTML5GLRenderContext;
lime__$backend_html5_HTML5GLRenderContext.__name__ = ["lime","_backend","html5","HTML5GLRenderContext"];
lime__$backend_html5_HTML5GLRenderContext.prototype = {
DEPTH_BUFFER_BIT: null
,STENCIL_BUFFER_BIT: null
,COLOR_BUFFER_BIT: null
,POINTS: null
,LINES: null
,LINE_LOOP: null
,LINE_STRIP: null
,TRIANGLES: null
,TRIANGLE_STRIP: null
,TRIANGLE_FAN: null
,ZERO: null
,ONE: null
,SRC_COLOR: null
,ONE_MINUS_SRC_COLOR: null
,SRC_ALPHA: null
,ONE_MINUS_SRC_ALPHA: null
,DST_ALPHA: null
,ONE_MINUS_DST_ALPHA: null
,DST_COLOR: null
,ONE_MINUS_DST_COLOR: null
,SRC_ALPHA_SATURATE: null
,FUNC_ADD: null
,BLEND_EQUATION: null
,BLEND_EQUATION_RGB: null
,BLEND_EQUATION_ALPHA: null
,FUNC_SUBTRACT: null
,FUNC_REVERSE_SUBTRACT: null
,BLEND_DST_RGB: null
,BLEND_SRC_RGB: null
,BLEND_DST_ALPHA: null
,BLEND_SRC_ALPHA: null
,CONSTANT_COLOR: null
,ONE_MINUS_CONSTANT_COLOR: null
,CONSTANT_ALPHA: null
,ONE_MINUS_CONSTANT_ALPHA: null
,BLEND_COLOR: null
,ARRAY_BUFFER: null
,ELEMENT_ARRAY_BUFFER: null
,ARRAY_BUFFER_BINDING: null
,ELEMENT_ARRAY_BUFFER_BINDING: null
,STREAM_DRAW: null
,STATIC_DRAW: null
,DYNAMIC_DRAW: null
,BUFFER_SIZE: null
,BUFFER_USAGE: null
,CURRENT_VERTEX_ATTRIB: null
,FRONT: null
,BACK: null
,FRONT_AND_BACK: null
,CULL_FACE: null
,BLEND: null
,DITHER: null
,STENCIL_TEST: null
,DEPTH_TEST: null
,SCISSOR_TEST: null
,POLYGON_OFFSET_FILL: null
,SAMPLE_ALPHA_TO_COVERAGE: null
,SAMPLE_COVERAGE: null
,NO_ERROR: null
,INVALID_ENUM: null
,INVALID_VALUE: null
,INVALID_OPERATION: null
,OUT_OF_MEMORY: null
,CW: null
,CCW: null
,LINE_WIDTH: null
,ALIASED_POINT_SIZE_RANGE: null
,ALIASED_LINE_WIDTH_RANGE: null
,CULL_FACE_MODE: null
,FRONT_FACE: null
,DEPTH_RANGE: null
,DEPTH_WRITEMASK: null
,DEPTH_CLEAR_VALUE: null
,DEPTH_FUNC: null
,STENCIL_CLEAR_VALUE: null
,STENCIL_FUNC: null
,STENCIL_FAIL: null
,STENCIL_PASS_DEPTH_FAIL: null
,STENCIL_PASS_DEPTH_PASS: null
,STENCIL_REF: null
,STENCIL_VALUE_MASK: null
,STENCIL_WRITEMASK: null
,STENCIL_BACK_FUNC: null
,STENCIL_BACK_FAIL: null
,STENCIL_BACK_PASS_DEPTH_FAIL: null
,STENCIL_BACK_PASS_DEPTH_PASS: null
,STENCIL_BACK_REF: null
,STENCIL_BACK_VALUE_MASK: null
,STENCIL_BACK_WRITEMASK: null
,VIEWPORT: null
,SCISSOR_BOX: null
,COLOR_CLEAR_VALUE: null
,COLOR_WRITEMASK: null
,UNPACK_ALIGNMENT: null
,PACK_ALIGNMENT: null
,MAX_TEXTURE_SIZE: null
,MAX_VIEWPORT_DIMS: null
,SUBPIXEL_BITS: null
,RED_BITS: null
,GREEN_BITS: null
,BLUE_BITS: null
,ALPHA_BITS: null
,DEPTH_BITS: null
,STENCIL_BITS: null
,POLYGON_OFFSET_UNITS: null
,POLYGON_OFFSET_FACTOR: null
,TEXTURE_BINDING_2D: null
,SAMPLE_BUFFERS: null
,SAMPLES: null
,SAMPLE_COVERAGE_VALUE: null
,SAMPLE_COVERAGE_INVERT: null
,COMPRESSED_TEXTURE_FORMATS: null
,DONT_CARE: null
,FASTEST: null
,NICEST: null
,GENERATE_MIPMAP_HINT: null
,BYTE: null
,UNSIGNED_BYTE: null
,SHORT: null
,UNSIGNED_SHORT: null
,INT: null
,UNSIGNED_INT: null
,FLOAT: null
,DEPTH_COMPONENT: null
,ALPHA: null
,RGB: null
,RGBA: null
,LUMINANCE: null
,LUMINANCE_ALPHA: null
,UNSIGNED_SHORT_4_4_4_4: null
,UNSIGNED_SHORT_5_5_5_1: null
,UNSIGNED_SHORT_5_6_5: null
,FRAGMENT_SHADER: null
,VERTEX_SHADER: null
,MAX_VERTEX_ATTRIBS: null
,MAX_VERTEX_UNIFORM_VECTORS: null
,MAX_VARYING_VECTORS: null
,MAX_COMBINED_TEXTURE_IMAGE_UNITS: null
,MAX_VERTEX_TEXTURE_IMAGE_UNITS: null
,MAX_TEXTURE_IMAGE_UNITS: null
,MAX_FRAGMENT_UNIFORM_VECTORS: null
,SHADER_TYPE: null
,DELETE_STATUS: null
,LINK_STATUS: null
,VALIDATE_STATUS: null
,ATTACHED_SHADERS: null
,ACTIVE_UNIFORMS: null
,ACTIVE_ATTRIBUTES: null
,SHADING_LANGUAGE_VERSION: null
,CURRENT_PROGRAM: null
,NEVER: null
,LESS: null
,EQUAL: null
,LEQUAL: null
,GREATER: null
,NOTEQUAL: null
,GEQUAL: null
,ALWAYS: null
,KEEP: null
,REPLACE: null
,INCR: null
,DECR: null
,INVERT: null
,INCR_WRAP: null
,DECR_WRAP: null
,VENDOR: null
,RENDERER: null
,VERSION: null
,NEAREST: null
,LINEAR: null
,NEAREST_MIPMAP_NEAREST: null
,LINEAR_MIPMAP_NEAREST: null
,NEAREST_MIPMAP_LINEAR: null
,LINEAR_MIPMAP_LINEAR: null
,TEXTURE_MAG_FILTER: null
,TEXTURE_MIN_FILTER: null
,TEXTURE_WRAP_S: null
,TEXTURE_WRAP_T: null
,TEXTURE_2D: null
,TEXTURE: null
,TEXTURE_CUBE_MAP: null
,TEXTURE_BINDING_CUBE_MAP: null
,TEXTURE_CUBE_MAP_POSITIVE_X: null
,TEXTURE_CUBE_MAP_NEGATIVE_X: null
,TEXTURE_CUBE_MAP_POSITIVE_Y: null
,TEXTURE_CUBE_MAP_NEGATIVE_Y: null
,TEXTURE_CUBE_MAP_POSITIVE_Z: null
,TEXTURE_CUBE_MAP_NEGATIVE_Z: null
,MAX_CUBE_MAP_TEXTURE_SIZE: null
,TEXTURE0: null
,TEXTURE1: null
,TEXTURE2: null
,TEXTURE3: null
,TEXTURE4: null
,TEXTURE5: null
,TEXTURE6: null
,TEXTURE7: null
,TEXTURE8: null
,TEXTURE9: null
,TEXTURE10: null
,TEXTURE11: null
,TEXTURE12: null
,TEXTURE13: null
,TEXTURE14: null
,TEXTURE15: null
,TEXTURE16: null
,TEXTURE17: null
,TEXTURE18: null
,TEXTURE19: null
,TEXTURE20: null
,TEXTURE21: null
,TEXTURE22: null
,TEXTURE23: null
,TEXTURE24: null
,TEXTURE25: null
,TEXTURE26: null
,TEXTURE27: null
,TEXTURE28: null
,TEXTURE29: null
,TEXTURE30: null
,TEXTURE31: null
,ACTIVE_TEXTURE: null
,REPEAT: null
,CLAMP_TO_EDGE: null
,MIRRORED_REPEAT: null
,FLOAT_VEC2: null
,FLOAT_VEC3: null
,FLOAT_VEC4: null
,INT_VEC2: null
,INT_VEC3: null
,INT_VEC4: null
,BOOL: null
,BOOL_VEC2: null
,BOOL_VEC3: null
,BOOL_VEC4: null
,FLOAT_MAT2: null
,FLOAT_MAT3: null
,FLOAT_MAT4: null
,SAMPLER_2D: null
,SAMPLER_CUBE: null
,VERTEX_ATTRIB_ARRAY_ENABLED: null
,VERTEX_ATTRIB_ARRAY_SIZE: null
,VERTEX_ATTRIB_ARRAY_STRIDE: null
,VERTEX_ATTRIB_ARRAY_TYPE: null
,VERTEX_ATTRIB_ARRAY_NORMALIZED: null
,VERTEX_ATTRIB_ARRAY_POINTER: null
,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: null
,VERTEX_PROGRAM_POINT_SIZE: null
,POINT_SPRITE: null
,COMPILE_STATUS: null
,LOW_FLOAT: null
,MEDIUM_FLOAT: null
,HIGH_FLOAT: null
,LOW_INT: null
,MEDIUM_INT: null
,HIGH_INT: null
,FRAMEBUFFER: null
,RENDERBUFFER: null
,RGBA4: null
,RGB5_A1: null
,RGB565: null
,DEPTH_COMPONENT16: null
,STENCIL_INDEX: null
,STENCIL_INDEX8: null
,DEPTH_STENCIL: null
,RENDERBUFFER_WIDTH: null
,RENDERBUFFER_HEIGHT: null
,RENDERBUFFER_INTERNAL_FORMAT: null
,RENDERBUFFER_RED_SIZE: null
,RENDERBUFFER_GREEN_SIZE: null
,RENDERBUFFER_BLUE_SIZE: null
,RENDERBUFFER_ALPHA_SIZE: null
,RENDERBUFFER_DEPTH_SIZE: null
,RENDERBUFFER_STENCIL_SIZE: null
,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: null
,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: null
,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: null
,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: null
,COLOR_ATTACHMENT0: null
,DEPTH_ATTACHMENT: null
,STENCIL_ATTACHMENT: null
,DEPTH_STENCIL_ATTACHMENT: null
,NONE: null
,FRAMEBUFFER_COMPLETE: null
,FRAMEBUFFER_INCOMPLETE_ATTACHMENT: null
,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: null
,FRAMEBUFFER_INCOMPLETE_DIMENSIONS: null
,FRAMEBUFFER_UNSUPPORTED: null
,FRAMEBUFFER_BINDING: null
,RENDERBUFFER_BINDING: null
,MAX_RENDERBUFFER_SIZE: null
,INVALID_FRAMEBUFFER_OPERATION: null
,UNPACK_FLIP_Y_WEBGL: null
,UNPACK_PREMULTIPLY_ALPHA_WEBGL: null
,CONTEXT_LOST_WEBGL: null
,UNPACK_COLORSPACE_CONVERSION_WEBGL: null
,BROWSER_DEFAULT_WEBGL: null
,READ_BUFFER: null
,UNPACK_ROW_LENGTH: null
,UNPACK_SKIP_ROWS: null
,UNPACK_SKIP_PIXELS: null
,PACK_ROW_LENGTH: null
,PACK_SKIP_ROWS: null
,PACK_SKIP_PIXELS: null
,TEXTURE_BINDING_3D: null
,UNPACK_SKIP_IMAGES: null
,UNPACK_IMAGE_HEIGHT: null
,MAX_3D_TEXTURE_SIZE: null
,MAX_ELEMENTS_VERTICES: null
,MAX_ELEMENTS_INDICES: null
,MAX_TEXTURE_LOD_BIAS: null
,MAX_FRAGMENT_UNIFORM_COMPONENTS: null
,MAX_VERTEX_UNIFORM_COMPONENTS: null
,MAX_ARRAY_TEXTURE_LAYERS: null
,MIN_PROGRAM_TEXEL_OFFSET: null
,MAX_PROGRAM_TEXEL_OFFSET: null
,MAX_VARYING_COMPONENTS: null
,FRAGMENT_SHADER_DERIVATIVE_HINT: null
,RASTERIZER_DISCARD: null
,VERTEX_ARRAY_BINDING: null
,MAX_VERTEX_OUTPUT_COMPONENTS: null
,MAX_FRAGMENT_INPUT_COMPONENTS: null
,MAX_SERVER_WAIT_TIMEOUT: null
,MAX_ELEMENT_INDEX: null
,RED: null
,RGB8: null
,RGBA8: null
,RGB10_A2: null
,TEXTURE_3D: null
,TEXTURE_WRAP_R: null
,TEXTURE_MIN_LOD: null
,TEXTURE_MAX_LOD: null
,TEXTURE_BASE_LEVEL: null
,TEXTURE_MAX_LEVEL: null
,TEXTURE_COMPARE_MODE: null
,TEXTURE_COMPARE_FUNC: null
,SRGB: null
,SRGB8: null
,SRGB8_ALPHA8: null
,COMPARE_REF_TO_TEXTURE: null
,RGBA32F: null
,RGB32F: null
,RGBA16F: null
,RGB16F: null
,TEXTURE_2D_ARRAY: null
,TEXTURE_BINDING_2D_ARRAY: null
,R11F_G11F_B10F: null
,RGB9_E5: null
,RGBA32UI: null
,RGB32UI: null
,RGBA16UI: null
,RGB16UI: null
,RGBA8UI: null
,RGB8UI: null
,RGBA32I: null
,RGB32I: null
,RGBA16I: null
,RGB16I: null
,RGBA8I: null
,RGB8I: null
,RED_INTEGER: null
,RGB_INTEGER: null
,RGBA_INTEGER: null
,R8: null
,RG8: null
,R16F: null
,R32F: null
,RG16F: null
,RG32F: null
,R8I: null
,R8UI: null
,R16I: null
,R16UI: null
,R32I: null
,R32UI: null
,RG8I: null
,RG8UI: null
,RG16I: null
,RG16UI: null
,RG32I: null
,RG32UI: null
,R8_SNORM: null
,RG8_SNORM: null
,RGB8_SNORM: null
,RGBA8_SNORM: null
,RGB10_A2UI: null
,TEXTURE_IMMUTABLE_FORMAT: null
,TEXTURE_IMMUTABLE_LEVELS: null
,UNSIGNED_INT_2_10_10_10_REV: null
,UNSIGNED_INT_10F_11F_11F_REV: null
,UNSIGNED_INT_5_9_9_9_REV: null
,FLOAT_32_UNSIGNED_INT_24_8_REV: null
,UNSIGNED_INT_24_8: null
,HALF_FLOAT: null
,RG: null
,RG_INTEGER: null
,INT_2_10_10_10_REV: null
,CURRENT_QUERY: null
,QUERY_RESULT: null
,QUERY_RESULT_AVAILABLE: null
,ANY_SAMPLES_PASSED: null
,ANY_SAMPLES_PASSED_CONSERVATIVE: null
,MAX_DRAW_BUFFERS: null
,DRAW_BUFFER0: null
,DRAW_BUFFER1: null
,DRAW_BUFFER2: null
,DRAW_BUFFER3: null
,DRAW_BUFFER4: null
,DRAW_BUFFER5: null
,DRAW_BUFFER6: null
,DRAW_BUFFER7: null
,DRAW_BUFFER8: null
,DRAW_BUFFER9: null
,DRAW_BUFFER10: null
,DRAW_BUFFER11: null
,DRAW_BUFFER12: null
,DRAW_BUFFER13: null
,DRAW_BUFFER14: null
,DRAW_BUFFER15: null
,MAX_COLOR_ATTACHMENTS: null
,COLOR_ATTACHMENT1: null
,COLOR_ATTACHMENT2: null
,COLOR_ATTACHMENT3: null
,COLOR_ATTACHMENT4: null
,COLOR_ATTACHMENT5: null
,COLOR_ATTACHMENT6: null
,COLOR_ATTACHMENT7: null
,COLOR_ATTACHMENT8: null
,COLOR_ATTACHMENT9: null
,COLOR_ATTACHMENT10: null
,COLOR_ATTACHMENT11: null
,COLOR_ATTACHMENT12: null
,COLOR_ATTACHMENT13: null
,COLOR_ATTACHMENT14: null
,COLOR_ATTACHMENT15: null
,SAMPLER_3D: null
,SAMPLER_2D_SHADOW: null
,SAMPLER_2D_ARRAY: null
,SAMPLER_2D_ARRAY_SHADOW: null
,SAMPLER_CUBE_SHADOW: null
,INT_SAMPLER_2D: null
,INT_SAMPLER_3D: null
,INT_SAMPLER_CUBE: null
,INT_SAMPLER_2D_ARRAY: null
,UNSIGNED_INT_SAMPLER_2D: null
,UNSIGNED_INT_SAMPLER_3D: null
,UNSIGNED_INT_SAMPLER_CUBE: null
,UNSIGNED_INT_SAMPLER_2D_ARRAY: null
,MAX_SAMPLES: null
,SAMPLER_BINDING: null
,PIXEL_PACK_BUFFER: null
,PIXEL_UNPACK_BUFFER: null
,PIXEL_PACK_BUFFER_BINDING: null
,PIXEL_UNPACK_BUFFER_BINDING: null
,COPY_READ_BUFFER: null
,COPY_WRITE_BUFFER: null
,COPY_READ_BUFFER_BINDING: null
,COPY_WRITE_BUFFER_BINDING: null
,FLOAT_MAT2x3: null
,FLOAT_MAT2x4: null
,FLOAT_MAT3x2: null
,FLOAT_MAT3x4: null
,FLOAT_MAT4x2: null
,FLOAT_MAT4x3: null
,UNSIGNED_INT_VEC2: null
,UNSIGNED_INT_VEC3: null
,UNSIGNED_INT_VEC4: null
,UNSIGNED_NORMALIZED: null
,SIGNED_NORMALIZED: null
,VERTEX_ATTRIB_ARRAY_INTEGER: null
,VERTEX_ATTRIB_ARRAY_DIVISOR: null
,TRANSFORM_FEEDBACK_BUFFER_MODE: null
,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: null
,TRANSFORM_FEEDBACK_VARYINGS: null
,TRANSFORM_FEEDBACK_BUFFER_START: null
,TRANSFORM_FEEDBACK_BUFFER_SIZE: null
,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: null
,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: null
,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: null
,INTERLEAVED_ATTRIBS: null
,SEPARATE_ATTRIBS: null
,TRANSFORM_FEEDBACK_BUFFER: null
,TRANSFORM_FEEDBACK_BUFFER_BINDING: null
,TRANSFORM_FEEDBACK: null
,TRANSFORM_FEEDBACK_PAUSED: null
,TRANSFORM_FEEDBACK_ACTIVE: null
,TRANSFORM_FEEDBACK_BINDING: null
,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: null
,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: null
,FRAMEBUFFER_ATTACHMENT_RED_SIZE: null
,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: null
,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: null
,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: null
,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: null
,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: null
,FRAMEBUFFER_DEFAULT: null
,DEPTH24_STENCIL8: null
,DRAW_FRAMEBUFFER_BINDING: null
,READ_FRAMEBUFFER: null
,DRAW_FRAMEBUFFER: null
,READ_FRAMEBUFFER_BINDING: null
,RENDERBUFFER_SAMPLES: null
,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: null
,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: null
,UNIFORM_BUFFER: null
,UNIFORM_BUFFER_BINDING: null
,UNIFORM_BUFFER_START: null
,UNIFORM_BUFFER_SIZE: null
,MAX_VERTEX_UNIFORM_BLOCKS: null
,MAX_FRAGMENT_UNIFORM_BLOCKS: null
,MAX_COMBINED_UNIFORM_BLOCKS: null
,MAX_UNIFORM_BUFFER_BINDINGS: null
,MAX_UNIFORM_BLOCK_SIZE: null
,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: null
,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: null
,UNIFORM_BUFFER_OFFSET_ALIGNMENT: null
,ACTIVE_UNIFORM_BLOCKS: null
,UNIFORM_TYPE: null
,UNIFORM_SIZE: null
,UNIFORM_BLOCK_INDEX: null
,UNIFORM_OFFSET: null
,UNIFORM_ARRAY_STRIDE: null
,UNIFORM_MATRIX_STRIDE: null
,UNIFORM_IS_ROW_MAJOR: null
,UNIFORM_BLOCK_BINDING: null
,UNIFORM_BLOCK_DATA_SIZE: null
,UNIFORM_BLOCK_ACTIVE_UNIFORMS: null
,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: null
,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: null
,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: null
,OBJECT_TYPE: null
,SYNC_CONDITION: null
,SYNC_STATUS: null
,SYNC_FLAGS: null
,SYNC_FENCE: null
,SYNC_GPU_COMMANDS_COMPLETE: null
,UNSIGNALED: null
,SIGNALED: null
,ALREADY_SIGNALED: null
,TIMEOUT_EXPIRED: null
,CONDITION_SATISFIED: null
,WAIT_FAILED: null
,SYNC_FLUSH_COMMANDS_BIT: null
,COLOR: null
,DEPTH: null
,STENCIL: null
,MIN: null
,MAX: null
,DEPTH_COMPONENT24: null
,STREAM_READ: null
,STREAM_COPY: null
,STATIC_READ: null
,STATIC_COPY: null
,DYNAMIC_READ: null
,DYNAMIC_COPY: null
,DEPTH_COMPONENT32F: null
,DEPTH32F_STENCIL8: null
,INVALID_INDEX: null
,TIMEOUT_IGNORED: null
,MAX_CLIENT_WAIT_TIMEOUT_WEBGL: null
,type: null
,version: null
,__context: null
,__contextLost: null
,activeTexture: function(texture) {
this.__context.activeTexture(texture);
}
,attachShader: function(program,shader) {
this.__context.attachShader(program,shader);
}
,beginQuery: function(target,query) {
this.__context.beginQuery(target,query);
}
,beginTransformFeedback: function(primitiveNode) {
this.__context.beginTransformFeedback(primitiveNode);
}
,bindAttribLocation: function(program,index,name) {
this.__context.bindAttribLocation(program,index,name);
}
,bindBuffer: function(target,buffer) {
this.__context.bindBuffer(target,buffer);
}
,bindBufferBase: function(target,index,buffer) {
this.__context.bindBufferBase(target,index,buffer);
}
,bindBufferRange: function(target,index,buffer,offset,size) {
this.__context.bindBufferRange(target,index,buffer,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(size));
}
,bindFramebuffer: function(target,framebuffer) {
this.__context.bindFramebuffer(target,framebuffer);
}
,bindRenderbuffer: function(target,renderbuffer) {
this.__context.bindRenderbuffer(target,renderbuffer);
}
,bindSampler: function(unit,sampler) {
this.__context.bindSampler(unit,sampler);
}
,bindTexture: function(target,texture) {
this.__context.bindTexture(target,texture);
}
,bindTransformFeedback: function(target,transformFeedback) {
this.__context.bindTransformFeedback(target,transformFeedback);
}
,bindVertexArray: function(vertexArray) {
this.__context.bindVertexArray(vertexArray);
}
,blendColor: function(red,green,blue,alpha) {
this.__context.blendColor(red,green,blue,alpha);
}
,blendEquation: function(mode) {
this.__context.blendEquation(mode);
}
,blendEquationSeparate: function(modeRGB,modeAlpha) {
this.__context.blendEquationSeparate(modeRGB,modeAlpha);
}
,blendFunc: function(sfactor,dfactor) {
this.__context.blendFunc(sfactor,dfactor);
}
,blendFuncSeparate: function(srcRGB,dstRGB,srcAlpha,dstAlpha) {
this.__context.blendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
}
,blitFramebuffer: function(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter) {
this.__context.blitFramebuffer(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter);
}
,bufferData: function(target,size,data,usage) {
this.__context.bufferData(target,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,size),usage);
}
,bufferDataWEBGL: function(target,srcData,usage,srcOffset,length) {
if(srcOffset != null) this.__context.bufferData(target,srcData,usage,srcOffset,length); else this.__context.bufferData(target,srcData,usage);
}
,bufferSubData: function(target,dstByteOffset,size,data) {
this.__context.bufferSubData(target,dstByteOffset,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,size));
}
,bufferSubDataWEBGL: function(target,dstByteOffset,srcData,srcOffset,length) {
if(srcOffset != null) this.__context.bufferSubData(target,dstByteOffset,srcData,srcOffset,length); else this.__context.bufferSubData(target,dstByteOffset,srcData);
}
,checkFramebufferStatus: function(target) {
return this.__context.checkFramebufferStatus(target);
}
,clear: function(mask) {
this.__context.clear(mask);
}
,clearBufferfi: function(buffer,drawbuffer,depth,stencil) {
this.__context.clearBufferfi(buffer,drawbuffer,depth,stencil);
}
,clearBufferfv: function(buffer,drawbuffer,values) {
this.__context.clearBufferfv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(values));
}
,clearBufferfvWEBGL: function(buffer,drawbuffer,values,srcOffset) {
this.__context.clearBufferfv(buffer,drawbuffer,values,srcOffset);
}
,clearBufferiv: function(buffer,drawbuffer,values) {
this.__context.clearBufferiv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(values));
}
,clearBufferivWEBGL: function(buffer,drawbuffer,values,srcOffset) {
this.__context.clearBufferiv(buffer,drawbuffer,values,srcOffset);
}
,clearBufferuiv: function(buffer,drawbuffer,values) {
this.__context.clearBufferuiv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(values));
}
,clearBufferuivWEBGL: function(buffer,drawbuffer,values,srcOffset) {
this.__context.clearBufferuiv(buffer,drawbuffer,values,srcOffset);
}
,clearColor: function(red,green,blue,alpha) {
this.__context.clearColor(red,green,blue,alpha);
}
,clearDepth: function(depth) {
this.__context.clearDepth(depth);
}
,clearDepthf: function(depth) {
this.__context.clearDepth(depth);
}
,clearStencil: function(s) {
this.__context.clearStencil(s);
}
,clientWaitSync: function(sync,flags,timeout) {
return this.__context.clientWaitSync(sync,flags,timeout);
}
,copyBufferSubData: function(readTarget,writeTarget,readOffset,writeOffset,size) {
}
,colorMask: function(red,green,blue,alpha) {
this.__context.colorMask(red,green,blue,alpha);
}
,compileShader: function(shader) {
this.__context.compileShader(shader);
}
,compressedTexImage2D: function(target,level,internalformat,width,height,border,imageSize,data) {
this.__context.compressedTexImage2D(target,level,internalformat,width,height,border,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
}
,compressedTexImage2DWEBGL: function(target,level,internalformat,width,height,border,srcData,srcOffset,srcLengthOverride) {
if(srcOffset != null) this.__context.compressedTexImage2D(target,level,internalformat,width,height,border,srcData,srcOffset,srcLengthOverride); else this.__context.compressedTexImage2D(target,level,internalformat,width,height,border,srcData);
}
,compressedTexImage3D: function(target,level,internalformat,width,height,depth,border,imageSize,data) {
this.__context.compressedTexImage3D(target,level,internalformat,width,height,depth,border,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
}
,compressedTexImage3DWEBGL: function(target,level,internalformat,width,height,depth,border,srcData,srcOffset,srcLengthOverride) {
this.__context.compressedTexImage3D(target,level,internalformat,width,height,depth,border,srcData,srcOffset,srcLengthOverride);
}
,compressedTexSubImage2D: function(target,level,xoffset,yoffset,width,height,format,imageSize,data) {
this.__context.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
}
,compressedTexSubImage2DWEBGL: function(target,level,xoffset,yoffset,width,height,format,srcData,srcOffset,srcLengthOverride) {
if(srcOffset != null) this.__context.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,srcData,srcOffset,srcLengthOverride); else this.__context.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,srcData);
}
,compressedTexSubImage3D: function(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data) {
this.__context.compressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
}
,compressedTexSubImage3DWEBGL: function(target,level,xoffset,yoffset,zoffset,width,height,depth,format,srcData,srcOffset,srcLengthOverride) {
this.__context.compressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,srcData,srcOffset,srcLengthOverride);
}
,copySubBufferData: function(readTarget,writeTarget,readOffset,writeOffset,size) {
this.__context.copySubBufferData(readTarget,writeTarget,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(readOffset)),lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(writeOffset)),size);
}
,copyTexImage2D: function(target,level,internalformat,x,y,width,height,border) {
this.__context.copyTexImage2D(target,level,internalformat,x,y,width,height,border);
}
,copyTexSubImage2D: function(target,level,xoffset,yoffset,x,y,width,height) {
this.__context.copyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
}
,copyTexSubImage3D: function(target,level,xoffset,yoffset,zoffset,x,y,width,height) {
this.__context.copyTexSubImage3D(target,level,xoffset,yoffset,zoffset,x,y,width,height);
}
,createBuffer: function() {
return this.__context.createBuffer();
}
,createFramebuffer: function() {
return this.__context.createFramebuffer();
}
,createProgram: function() {
return this.__context.createProgram();
}
,createQuery: function() {
return this.__context.createQuery();
}
,createRenderbuffer: function() {
return this.__context.createRenderbuffer();
}
,createSampler: function() {
return this.__context.createSampler();
}
,createShader: function(type) {
return this.__context.createShader(type);
}
,createTexture: function() {
return this.__context.createTexture();
}
,createTransformFeedback: function() {
return this.__context.createTransformFeedback();
}
,createVertexArray: function() {
return this.__context.createVertexArray();
}
,cullFace: function(mode) {
this.__context.cullFace(mode);
}
,deleteBuffer: function(buffer) {
this.__context.deleteBuffer(buffer);
}
,deleteFramebuffer: function(framebuffer) {
this.__context.deleteFramebuffer(framebuffer);
}
,deleteProgram: function(program) {
this.__context.deleteProgram(program);
}
,deleteQuery: function(query) {
this.__context.deleteQuery(query);
}
,deleteRenderbuffer: function(renderbuffer) {
this.__context.deleteRenderbuffer(renderbuffer);
}
,deleteSampler: function(sampler) {
this.__context.deleteSampler(sampler);
}
,deleteShader: function(shader) {
this.__context.deleteShader(shader);
}
,deleteSync: function(sync) {
this.__context.deleteSync(sync);
}
,deleteTexture: function(texture) {
this.__context.deleteTexture(texture);
}
,deleteTransformFeedback: function(transformFeedback) {
this.__context.deleteTransformFeedback(transformFeedback);
}
,deleteVertexArray: function(vertexArray) {
this.__context.deleteVertexArray(vertexArray);
}
,depthFunc: function(func) {
this.__context.depthFunc(func);
}
,depthMask: function(flag) {
this.__context.depthMask(flag);
}
,depthRange: function(zNear,zFar) {
this.__context.depthRange(zNear,zFar);
}
,depthRangef: function(zNear,zFar) {
this.__context.depthRange(zNear,zFar);
}
,detachShader: function(program,shader) {
this.__context.detachShader(program,shader);
}
,disable: function(cap) {
this.__context.disable(cap);
}
,disableVertexAttribArray: function(index) {
this.__context.disableVertexAttribArray(index);
}
,drawArrays: function(mode,first,count) {
this.__context.drawArrays(mode,first,count);
}
,drawArraysInstanced: function(mode,first,count,instanceCount) {
this.__context.drawArraysInstanced(mode,first,count,instanceCount);
}
,drawBuffers: function(buffers) {
this.__context.drawBuffers(buffers);
}
,drawElements: function(mode,count,type,offset) {
this.__context.drawElements(mode,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset));
}
,drawElementsInstanced: function(mode,count,type,offset,instanceCount) {
this.__context.drawElementsInstanced(mode,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),instanceCount);
}
,drawRangeElements: function(mode,start,end,count,type,offset) {
this.__context.drawRangeElements(mode,start,end,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)));
}
,enable: function(cap) {
this.__context.enable(cap);
}
,enableVertexAttribArray: function(index) {
this.__context.enableVertexAttribArray(index);
}
,endQuery: function(target) {
this.__context.endQuery(target);
}
,endTransformFeedback: function() {
this.__context.endTransformFeedback();
}
,fenceSync: function(condition,flags) {
return this.__context.fenceSync(condition,flags);
}
,finish: function() {
this.__context.finish();
}
,flush: function() {
this.__context.flush();
}
,framebufferRenderbuffer: function(target,attachment,renderbuffertarget,renderbuffer) {
this.__context.framebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
}
,framebufferTexture2D: function(target,attachment,textarget,texture,level) {
this.__context.framebufferTexture2D(target,attachment,textarget,texture,level);
}
,framebufferTextureLayer: function(target,attachment,texture,level,layer) {
this.__context.framebufferTextureLayer(target,attachment,texture,level,layer);
}
,frontFace: function(mode) {
this.__context.frontFace(mode);
}
,generateMipmap: function(target) {
this.__context.generateMipmap(target);
}
,getActiveAttrib: function(program,index) {
return this.__context.getActiveAttrib(program,index);
}
,getActiveUniform: function(program,index) {
return this.__context.getActiveUniform(program,index);
}
,getActiveUniformBlocki: function(program,uniformBlockIndex,pname) {
return this.__context.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);
}
,getActiveUniformBlockiv: function(program,uniformBlockIndex,pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(params);
var val = this.__context.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);
view[0] = val;
}
,getActiveUniformBlockName: function(program,uniformBlockIndex) {
return this.__context.getActiveUniformBlockName(program,uniformBlockIndex);
}
,getActiveUniformBlockParameter: function(program,uniformBlockIndex,pname) {
return this.__context.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);
}
,getActiveUniforms: function(program,uniformIndices,pname) {
return this.__context.getActiveUniforms(program,uniformIndices,pname);
}
,getActiveUniformsiv: function(program,uniformIndices,pname,params) {
}
,getAttachedShaders: function(program) {
return this.__context.getAttachedShaders(program);
}
,getAttribLocation: function(program,name) {
return this.__context.getAttribLocation(program,name);
}
,getBoolean: function(pname) {
return this.__context.getParameter(pname);
}
,getBooleanv: function(pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt8Array(params);
var result = this.__context.getParameter(pname);
if((result instanceof Array) && result.__enum__ == null) {
var data = result;
var _g1 = 0;
var _g = data.length;
while(_g1 < _g) {
var i = _g1++;
if(data[i]) view[i] = 1; else view[i] = 0;
}
} else {
var val;
if(js_Boot.__cast(result , Bool)) val = 1; else val = 0;
view[0] = val;
}
}
,getBufferParameter: function(target,pname) {
return this.__context.getBufferParameter(target,pname);
}
,getBufferParameteri: function(target,pname) {
return this.__context.getBufferParameter(target,pname);
}
,getBufferParameteri64v: function(target,pname,params) {
}
,getBufferParameteriv: function(target,pname,data) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(data);
var val = this.__context.getBufferParameter(target,pname);
view[0] = val;
}
,getBufferPointerv: function(target,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0);
}
,getBufferSubData: function(target,offset,size,data) {
this.__context.getBufferSubData(target,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,size));
}
,getBufferSubDataWEBGL: function(target,srcByteOffset,dstData,srcOffset,length) {
if(srcOffset != null) this.__context.getBufferSubData(target,srcByteOffset,dstData,srcOffset,length); else this.__context.getBufferSubData(target,srcByteOffset,dstData);
}
,getContextAttributes: function() {
return this.__context.getContextAttributes();
}
,getError: function() {
return this.__context.getError();
}
,getExtension: function(name) {
return this.__context.getExtension(name);
}
,getFloat: function(pname) {
return this.__context.getParameter(pname);
}
,getFloatv: function(pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(params);
var result = this.__context.getParameter(pname);
if(js_Boot.__instanceof(result,ArrayBufferView)) {
var data = result;
var _g1 = 0;
var _g = data.length;
while(_g1 < _g) {
var i = _g1++;
view[i] = data[i];
}
} else {
var val;
val = js_Boot.__cast(result , Float);
view[0] = val;
}
}
,getFragDataLocation: function(program,name) {
return this.__context.getFragDataLocation(program,name);
}
,getFramebufferAttachmentParameter: function(target,attachment,pname) {
return this.__context.getFramebufferAttachmentParameter(target,attachment,pname);
}
,getFramebufferAttachmentParameteri: function(target,attachment,pname) {
return this.__context.getFramebufferAttachmentParameter(target,attachment,pname);
}
,getFramebufferAttachmentParameteriv: function(target,attachment,pname,params) {
var value = this.__context.getFramebufferAttachmentParameter(target,attachment,pname);
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(params);
view[0] = value;
}
,getIndexedParameter: function(target,index) {
return this.__context.getIndexedParameter(target,index);
}
,getInteger: function(pname) {
return this.__context.getParameter(pname);
}
,getInteger64: function(pname) {
var x = new haxe__$Int64__$_$_$Int64(0,0);
return x;
}
,getInteger64i: function(pname) {
var x = new haxe__$Int64__$_$_$Int64(0,0);
return x;
}
,getInteger64i_v: function(pname,params) {
}
,getInteger64v: function(pname,params) {
}
,getIntegeri: function(pname) {
return 0;
}
,getIntegeri_v: function(pname,params) {
}
,getIntegerv: function(pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(params);
var result = this.__context.getParameter(pname);
if(js_Boot.__instanceof(result,ArrayBufferView)) {
var data = result;
var _g1 = 0;
var _g = data.length;
while(_g1 < _g) {
var i = _g1++;
view[i] = data[i];
}
} else {
var val;
val = js_Boot.__cast(result , Int);
view[0] = val;
}
}
,getInternalformati: function(target,internalformat,pname) {
return 0;
}
,getInternalformativ: function(target,internalformat,pname,params) {
}
,getInternalformatParameter: function(target,internalformat,pname) {
return this.__context.getInternalformatParameter(target,internalformat,pname);
}
,getParameter: function(pname) {
return this.__context.getParameter(pname);
}
,getProgramBinary: function(program,binaryFormat) {
return null;
}
,getProgrami: function(program,pname) {
return this.__context.getProgramParameter(program,pname);
}
,getProgramiv: function(program,pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(params);
var val = this.__context.getProgramParameter(program,pname);
view[0] = val;
}
,getProgramInfoLog: function(program) {
return this.__context.getProgramInfoLog(program);
}
,getProgramParameter: function(program,pname) {
return this.__context.getProgramParameter(program,pname);
}
,getQuery: function(target,pname) {
return this.__context.getQuery(target,pname);
}
,getQueryi: function(target,pname) {
return 0;
}
,getQueryiv: function(target,pname,params) {
}
,getQueryObjectui: function(query,pname) {
return 0;
}
,getQueryObjectuiv: function(query,pname,params) {
}
,getQueryParameter: function(query,pname) {
return this.__context.getQueryParameter(query,pname);
}
,getRenderbufferParameter: function(target,pname) {
return this.__context.getRenderbufferParameter(target,pname);
}
,getRenderbufferParameteri: function(target,pname) {
return this.__context.getRenderbufferParameter(target,pname);
}
,getRenderbufferParameteriv: function(target,pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(params);
var val = this.__context.getRenderbufferParameter(target,pname);
view[0] = val;
}
,getSamplerParameter: function(sampler,pname) {
return this.__context.getSamplerParameter(sampler,pname);
}
,getSamplerParameterf: function(sampler,pname) {
return 0;
}
,getSamplerParameterfv: function(sampler,pname,params) {
}
,getSamplerParameteri: function(sampler,pname) {
return 0;
}
,getSamplerParameteriv: function(sampler,pname,params) {
}
,getShaderi: function(shader,pname) {
return this.__context.getShaderParameter(shader,pname);
}
,getShaderiv: function(shader,pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(params);
var val = this.__context.getShaderParameter(shader,pname);
view[0] = val;
}
,getShaderInfoLog: function(shader) {
return this.__context.getShaderInfoLog(shader);
}
,getShaderParameter: function(shader,pname) {
return this.__context.getShaderParameter(shader,pname);
}
,getShaderPrecisionFormat: function(shadertype,precisiontype) {
return this.__context.getShaderPrecisionFormat(shadertype,precisiontype);
}
,getShaderSource: function(shader) {
return this.__context.getShaderSource(shader);
}
,getString: function(pname) {
if(pname == 7939) return this.__context.getSupportedExtensions().join(" "); else return this.__context.getParameter(pname);
}
,getStringi: function(name,index) {
return null;
}
,getSupportedExtensions: function() {
return this.__context.getSupportedExtensions();
}
,getSyncParameter: function(sync,pname) {
return this.__context.getSyncParameter(sync,pname);
}
,getSyncParameteri: function(sync,pname) {
return 0;
}
,getSyncParameteriv: function(sync,pname,params) {
}
,getTexParameter: function(target,pname) {
return this.__context.getTexParameter(target,pname);
}
,getTexParameterf: function(target,pname) {
return this.__context.getTexParameter(target,pname);
}
,getTexParameterfv: function(target,pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(params);
var val = this.__context.getTexParameter(target,pname);
view[0] = val;
}
,getTexParameteri: function(target,pname) {
return this.__context.getTexParameter(target,pname);
}
,getTexParameteriv: function(target,pname,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(params);
var val = this.__context.getTexParameter(target,pname);
view[0] = val;
}
,getTransformFeedbackVarying: function(program,index) {
return this.__context.getTransformFeedbackVarying(program,index);
}
,getUniform: function(program,location) {
return this.__context.getUniform(program,location);
}
,getUniformf: function(program,location) {
return this.__context.getUniform(program,location);
}
,getUniformfv: function(program,location,params) {
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(params);
var val = this.__context.getUniform(program,location);
view[0] = val;
}
,getUniformi: function(program,location) {
return this.__context.getUniform(program,location);
}
,getUniformiv: function(program,location,params) {
var value = this.__context.getUniform(program,location);
var view = lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(params);
view[0] = value;
}
,getUniformui: function(program,location) {
return 0;
}
,getUniformuiv: function(program,location,params) {
}
,getUniformBlockIndex: function(program,uniformBlockName) {
return this.__context.getUniformBlockIndex(program,uniformBlockName);
}
,getUniformIndices: function(program,uniformNames) {
return this.__context.getUniformIndices(program,uniformNames);
}
,getUniformLocation: function(program,name) {
return this.__context.getUniformLocation(program,name);
}
,getVertexAttrib: function(index,pname) {
return this.__context.getVertexAttrib(index,pname);
}
,getVertexAttribf: function(index,pname) {
return 0;
}
,getVertexAttribfv: function(index,pname,params) {
}
,getVertexAttribi: function(index,pname) {
return 0;
}
,getVertexAttribIi: function(index,pname) {
return 0;
}
,getVertexAttribIiv: function(index,pname,params) {
}
,getVertexAttribIui: function(index,pname) {
return 0;
}
,getVertexAttribIuiv: function(index,pname,params) {
}
,getVertexAttribiv: function(index,pname,params) {
}
,getVertexAttribOffset: function(index,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(this.__context.getVertexAttribOffset(index,pname));
}
,getVertexAttribPointerv: function(index,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(this.__context.getVertexAttribOffset(index,pname));
}
,hint: function(target,mode) {
this.__context.hint(target,mode);
}
,invalidateFramebuffer: function(target,attachments) {
this.__context.invalidateFramebuffer(target,attachments);
}
,invalidateSubFramebuffer: function(target,attachments,x,y,width,height) {
this.__context.invalidateSubFramebuffer(target,attachments,x,y,width,height);
}
,isBuffer: function(buffer) {
return this.__context.isBuffer(buffer);
}
,isContextLost: function() {
return this.__contextLost || this.__context.isContextLost();
}
,isEnabled: function(cap) {
return this.__context.isEnabled(cap);
}
,isFramebuffer: function(framebuffer) {
return this.__context.isFramebuffer(framebuffer);
}
,isProgram: function(program) {
return this.__context.isProgram(program);
}
,isQuery: function(query) {
return this.__context.isQuery(query);
}
,isRenderbuffer: function(renderbuffer) {
return this.__context.isRenderbuffer(renderbuffer);
}
,isSampler: function(sampler) {
return this.__context.isSampler(sampler);
}
,isShader: function(shader) {
return this.__context.isShader(shader);
}
,isSync: function(sync) {
return this.__context.isSync(sync);
}
,isTexture: function(texture) {
return this.__context.isTexture(texture);
}
,isTransformFeedback: function(transformFeedback) {
return this.__context.isTransformFeedback(transformFeedback);
}
,isVertexArray: function(vertexArray) {
return this.__context.isVertexArray(vertexArray);
}
,lineWidth: function(width) {
this.__context.lineWidth(width);
}
,linkProgram: function(program) {
this.__context.linkProgram(program);
}
,mapBufferRange: function(target,offset,length,access) {
}
,pauseTransformFeedback: function() {
this.__context.pauseTransformFeedback();
}
,pixelStorei: function(pname,param) {
this.__context.pixelStorei(pname,param);
}
,polygonOffset: function(factor,units) {
this.__context.polygonOffset(factor,units);
}
,programBinary: function(program,binaryFormat,binary,length) {
}
,programParameteri: function(program,pname,value) {
}
,readBuffer: function(src) {
this.__context.readBuffer(src);
}
,readPixels: function(x,y,width,height,format,type,pixels) {
this.__context.readPixels(x,y,width,height,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(pixels));
}
,readPixelsWEBGL: function(x,y,width,height,format,type,pixels,dstOffset) {
if(dstOffset != null) this.__context.readPixels(x,y,width,height,format,type,pixels,dstOffset); else this.__context.readPixels(x,y,width,height,format,type,pixels);
}
,releaseShaderCompiler: function() {
}
,renderbufferStorage: function(target,internalformat,width,height) {
this.__context.renderbufferStorage(target,internalformat,width,height);
}
,renderbufferStorageMultisample: function(target,samples,internalFormat,width,height) {
this.__context.renderbufferStorageMultisample(target,samples,internalFormat,width,height);
}
,resumeTransformFeedback: function() {
this.__context.resumeTransformFeedback();
}
,sampleCoverage: function(value,invert) {
this.__context.sampleCoverage(value,invert);
}
,samplerParameterf: function(sampler,pname,param) {
this.__context.samplerParameterf(sampler,pname,param);
}
,samplerParameteri: function(sampler,pname,param) {
this.__context.samplerParameteri(sampler,pname,param);
}
,scissor: function(x,y,width,height) {
this.__context.scissor(x,y,width,height);
}
,shaderBinary: function(shaders,binaryformat,binary,length) {
}
,shaderSource: function(shader,source) {
this.__context.shaderSource(shader,source);
}
,stencilFunc: function(func,ref,mask) {
this.__context.stencilFunc(func,ref,mask);
}
,stencilFuncSeparate: function(face,func,ref,mask) {
this.__context.stencilFuncSeparate(face,func,ref,mask);
}
,stencilMask: function(mask) {
this.__context.stencilMask(mask);
}
,stencilMaskSeparate: function(face,mask) {
this.__context.stencilMaskSeparate(face,mask);
}
,stencilOp: function(fail,zfail,zpass) {
this.__context.stencilOp(fail,zfail,zpass);
}
,stencilOpSeparate: function(face,fail,zfail,zpass) {
this.__context.stencilOpSeparate(face,fail,zfail,zpass);
}
,texImage2D: function(target,level,internalformat,width,height,border,format,type,data) {
this.__context.texImage2D(target,level,internalformat,width,height,border,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
}
,texImage2DWEBGL: function(target,level,internalformat,width,height,border,format,type,srcData,srcOffset) {
if(srcOffset != null) this.__context.texImage2D(target,level,internalformat,width,height,border,format,type,srcData,srcOffset); else if(format != null) this.__context.texImage2D(target,level,internalformat,width,height,border,format,type,srcData); else this.__context.texImage2D(target,level,internalformat,width,height,border);
}
,texImage3D: function(target,level,internalformat,width,height,depth,border,format,type,data) {
this.__context.texImage3D(target,level,internalformat,width,height,depth,border,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
}
,texImage3DWEBGL: function(target,level,internalformat,width,height,depth,border,format,type,srcData,srcOffset) {
this.__context.texImage3D(target,level,internalformat,width,height,depth,border,format,type,srcData,srcOffset);
}
,texStorage2D: function(target,level,internalformat,width,height) {
this.__context.texStorage2D(target,level,internalformat,width,height);
}
,texStorage3D: function(target,level,internalformat,width,height,depth) {
this.__context.texStorage3D(target,level,internalformat,width,height,depth);
}
,texParameterf: function(target,pname,param) {
this.__context.texParameterf(target,pname,param);
}
,texParameteri: function(target,pname,param) {
this.__context.texParameteri(target,pname,param);
}
,texSubImage2D: function(target,level,xoffset,yoffset,width,height,format,type,data) {
this.__context.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
}
,texSubImage2DWEBGL: function(target,level,xoffset,yoffset,width,height,format,type,srcData,srcOffset) {
if(srcOffset != null) this.__context.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,srcData,srcOffset); else if(type != null) this.__context.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,srcData); else this.__context.texSubImage2D(target,level,xoffset,yoffset,width,height,format);
}
,texSubImage3D: function(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,data) {
this.__context.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
}
,texSubImage3DWEBGL: function(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,source,srcOffset) {
this.__context.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,source,srcOffset);
}
,transformFeedbackVaryings: function(program,varyings,bufferMode) {
this.__context.transformFeedbackVaryings(program,varyings,bufferMode);
}
,uniform1f: function(location,v0) {
this.__context.uniform1f(location,v0);
}
,uniform1fv: function(location,count,v) {
this.__context.uniform1fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4));
}
,uniform1fvWEBGL: function(location,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniform1fv(location,data,srcOffset,srcLength); else this.__context.uniform1fv(location,data);
}
,uniform1i: function(location,v0) {
this.__context.uniform1i(location,v0);
}
,uniform1iv: function(location,count,v) {
this.__context.uniform1iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4));
}
,uniform1ivWEBGL: function(location,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniform1iv(location,data,srcOffset,srcLength); else this.__context.uniform1iv(location,data);
}
,uniform1ui: function(location,v0) {
this.__context.uniform1ui(location,v0);
return;
}
,uniform1uiv: function(location,count,v) {
this.__context.uniform1uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4));
}
,uniform1uivWEBGL: function(location,data,srcOffset,srcLength) {
this.__context.uniform1uiv(location,data,srcOffset,srcLength);
}
,uniform2f: function(location,v0,v1) {
this.__context.uniform2f(location,v0,v1);
}
,uniform2fv: function(location,count,v) {
this.__context.uniform2fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 2));
}
,uniform2fvWEBGL: function(location,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniform2fv(location,data,srcOffset,srcLength); else this.__context.uniform2fv(location,data);
}
,uniform2i: function(location,x,y) {
this.__context.uniform2i(location,x,y);
}
,uniform2iv: function(location,count,v) {
this.__context.uniform2iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 2));
}
,uniform2ivWEBGL: function(location,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniform2iv(location,data,srcOffset,srcLength); else this.__context.uniform2iv(location,data);
}
,uniform2ui: function(location,v0,v1) {
this.__context.uniform2ui(location,v0,v1);
}
,uniform2uiv: function(location,count,v) {
this.__context.uniform2uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 2));
}
,uniform2uivWEBGL: function(location,data,srcOffset,srcLength) {
this.__context.uniform2uiv(location,data,srcOffset,srcLength);
}
,uniform3f: function(location,v0,v1,v2) {
this.__context.uniform3f(location,v0,v1,v2);
}
,uniform3fv: function(location,count,v) {
this.__context.uniform3fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 3));
}
,uniform3fvWEBGL: function(location,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniform3fv(location,data,srcOffset,srcLength); else this.__context.uniform3fv(location,data);
}
,uniform3i: function(location,x,y,z) {
this.__context.uniform3i(location,x,y,z);
}
,uniform3iv: function(location,count,v) {
this.__context.uniform3iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 3));
}
,uniform3ivWEBGL: function(location,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniform3iv(location,data,srcOffset,srcLength); else this.__context.uniform3iv(location,data);
}
,uniform3ui: function(location,v0,v1,v2) {
this.__context.uniform3ui(location,v0,v1,v2);
}
,uniform3uiv: function(location,count,v) {
this.__context.uniform3uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 3));
}
,uniform3uivWEBGL: function(location,data,srcOffset,srcLength) {
this.__context.uniform3uiv(location,data,srcOffset,srcLength);
}
,uniform4f: function(location,v0,v1,v2,v3) {
this.__context.uniform4f(location,v0,v1,v2,v3);
}
,uniform4fv: function(location,count,v) {
this.__context.uniform4fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 4));
}
,uniform4fvWEBGL: function(location,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniform4fv(location,data,srcOffset,srcLength); else this.__context.uniform4fv(location,data);
}
,uniform4i: function(location,v0,v1,v2,v3) {
this.__context.uniform4i(location,v0,v1,v2,v3);
}
,uniform4iv: function(location,count,v) {
this.__context.uniform4iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 4));
}
,uniform4ivWEBGL: function(location,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniform4iv(location,data,srcOffset,srcLength); else this.__context.uniform4iv(location,data);
}
,uniform4ui: function(location,v0,v1,v2,v3) {
this.__context.uniform4ui(location,v0,v1,v2,v3);
}
,uniform4uiv: function(location,count,v) {
this.__context.uniform4uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 4));
}
,uniform4uivWEBGL: function(location,data,srcOffset,srcLength) {
this.__context.uniform4uiv(location,data,srcOffset,srcLength);
}
,uniformBlockBinding: function(program,uniformBlockIndex,uniformBlockBinding) {
this.__context.uniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding);
}
,uniformMatrix2fv: function(location,count,transpose,v) {
this.__context.uniformMatrix2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 4));
}
,uniformMatrix2fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniformMatrix2fv(location,transpose,data,srcOffset,srcLength); else this.__context.uniformMatrix2fv(location,transpose,data);
}
,uniformMatrix2x3fv: function(location,count,transpose,v) {
this.__context.uniformMatrix2x3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 6));
}
,uniformMatrix2x3fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
this.__context.uniformMatrix2x3fv(location,transpose,data,srcOffset,srcLength);
}
,uniformMatrix2x4fv: function(location,count,transpose,v) {
this.__context.uniformMatrix2x4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 8));
}
,uniformMatrix2x4fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
this.__context.uniformMatrix2x4fv(location,transpose,data,srcOffset,srcLength);
}
,uniformMatrix3fv: function(location,count,transpose,v) {
this.__context.uniformMatrix3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 9));
}
,uniformMatrix3fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniformMatrix3fv(location,transpose,data,srcOffset,srcLength); else this.__context.uniformMatrix3fv(location,transpose,data);
}
,uniformMatrix3x2fv: function(location,count,transpose,v) {
this.__context.uniformMatrix3x2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 6));
}
,uniformMatrix3x2fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
this.__context.uniformMatrix3x2fv(location,transpose,data,srcOffset,srcLength);
}
,uniformMatrix3x4fv: function(location,count,transpose,v) {
this.__context.uniformMatrix3x4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 12));
}
,uniformMatrix3x4fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
this.__context.uniformMatrix3x4fv(location,transpose,data,srcOffset,srcLength);
}
,uniformMatrix4fv: function(location,count,transpose,v) {
this.__context.uniformMatrix4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 16));
}
,uniformMatrix4fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniformMatrix4fv(location,transpose,data,srcOffset,srcLength); else this.__context.uniformMatrix4fv(location,transpose,data);
}
,uniformMatrix4x2fv: function(location,count,transpose,v) {
this.__context.uniformMatrix4x2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 8));
}
,uniformMatrix4x2fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
if(srcOffset != null) this.__context.uniformMatrix4x2fv(location,transpose,data,srcOffset,srcLength); else this.__context.uniformMatrix4x2fv(location,transpose,data);
}
,uniformMatrix4x3fv: function(location,count,transpose,v) {
this.__context.uniformMatrix4x3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 12));
}
,uniformMatrix4x3fvWEBGL: function(location,transpose,data,srcOffset,srcLength) {
this.__context.uniformMatrix4x3fv(location,transpose,data,srcOffset,srcLength);
}
,unmapBuffer: function(target) {
return false;
}
,useProgram: function(program) {
this.__context.useProgram(program);
}
,validateProgram: function(program) {
this.__context.validateProgram(program);
}
,vertexAttrib1f: function(index,v0) {
this.__context.vertexAttrib1f(index,v0);
}
,vertexAttrib1fv: function(index,v) {
this.__context.vertexAttrib1fv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v));
}
,vertexAttrib1fvWEBGL: function(index,v) {
this.__context.vertexAttrib1fv(index,v);
}
,vertexAttrib2f: function(index,v0,v1) {
this.__context.vertexAttrib2f(index,v0,v1);
}
,vertexAttrib2fv: function(index,v) {
this.__context.vertexAttrib2fv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v));
}
,vertexAttrib2fvWEBGL: function(index,v) {
this.__context.vertexAttrib2fv(index,v);
}
,vertexAttrib3f: function(index,v0,v1,v2) {
this.__context.vertexAttrib3f(index,v0,v1,v2);
}
,vertexAttrib3fv: function(index,v) {
this.__context.vertexAttrib3fv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v));
}
,vertexAttrib3fvWEBGL: function(index,v) {
this.__context.vertexAttrib3fv(index,v);
}
,vertexAttrib4f: function(index,v0,v1,v2,v3) {
this.__context.vertexAttrib4f(index,v0,v1,v2,v3);
}
,vertexAttrib4fv: function(index,v) {
this.__context.vertexAttrib4fv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v));
}
,vertexAttrib4fvWEBGL: function(index,v) {
this.__context.vertexAttrib4fv(index,v);
}
,vertexAttribDivisor: function(index,divisor) {
this.__context.vertexAttribDivisor(index,divisor);
}
,vertexAttribI4i: function(index,v0,v1,v2,v3) {
this.__context.vertexAttribI4i(index,v0,v1,v2,v3);
}
,vertexAttribI4iv: function(index,v) {
this.__context.vertexAttribI4iv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v));
}
,vertexAttribI4ivWEBGL: function(index,v) {
this.__context.vertexAttribI4iv(index,v);
}
,vertexAttribI4ui: function(index,v0,v1,v2,v3) {
this.__context.vertexAttribI4ui(index,v0,v1,v2,v3);
}
,vertexAttribI4uiv: function(index,v) {
this.__context.vertexAttribI4uiv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v));
}
,vertexAttribI4uivWEBGL: function(index,v) {
this.__context.vertexAttribI4uiv(index,v);
}
,vertexAttribIPointer: function(index,size,type,stride,offset) {
this.__context.vertexAttribIPointer(index,size,type,stride,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)));
}
,vertexAttribPointer: function(index,size,type,normalized,stride,offset) {
this.__context.vertexAttribPointer(index,size,type,normalized,stride,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset));
}
,viewport: function(x,y,width,height) {
this.__context.viewport(x,y,width,height);
}
,waitSync: function(sync,flags,timeout) {
this.__context.waitSync(sync,flags,timeout);
}
,get_canvas: function() {
return this.__context.canvas;
}
,get_drawingBufferHeight: function() {
return this.__context.drawingBufferHeight;
}
,get_drawingBufferWidth: function() {
return this.__context.drawingBufferWidth;
}
,__class__: lime__$backend_html5_HTML5GLRenderContext
,__properties__: {get_drawingBufferWidth:"get_drawingBufferWidth",get_drawingBufferHeight:"get_drawingBufferHeight",get_canvas:"get_canvas"}
};
var lime__$backend_html5_HTML5HTTPRequest = function() {
};
$hxClasses["lime._backend.html5.HTML5HTTPRequest"] = lime__$backend_html5_HTML5HTTPRequest;
lime__$backend_html5_HTML5HTTPRequest.__name__ = ["lime","_backend","html5","HTML5HTTPRequest"];
lime__$backend_html5_HTML5HTTPRequest.loadImage = function(uri) {
var promise = new lime_app_Promise();
if(lime__$backend_html5_HTML5HTTPRequest.activeRequests < lime__$backend_html5_HTML5HTTPRequest.requestLimit) {
lime__$backend_html5_HTML5HTTPRequest.activeRequests++;
lime__$backend_html5_HTML5HTTPRequest.__loadImage(uri,promise);
} else lime__$backend_html5_HTML5HTTPRequest.requestQueue.add({ instance : null, uri : uri, promise : promise, type : "IMAGE"});
return promise.future;
};
lime__$backend_html5_HTML5HTTPRequest.processQueue = function() {
if(lime__$backend_html5_HTML5HTTPRequest.activeRequests < lime__$backend_html5_HTML5HTTPRequest.requestLimit && lime__$backend_html5_HTML5HTTPRequest.requestQueue.length > 0) {
lime__$backend_html5_HTML5HTTPRequest.activeRequests++;
var queueItem = lime__$backend_html5_HTML5HTTPRequest.requestQueue.pop();
var _g = queueItem.type;
switch(_g) {
case "IMAGE":
lime__$backend_html5_HTML5HTTPRequest.__loadImage(queueItem.uri,queueItem.promise);
break;
case "TEXT":
queueItem.instance.__loadText(queueItem.uri,queueItem.promise);
break;
case "BINARY":
queueItem.instance.__loadData(queueItem.uri,queueItem.promise);
break;
default:
lime__$backend_html5_HTML5HTTPRequest.activeRequests--;
}
}
};
lime__$backend_html5_HTML5HTTPRequest.__loadImage = function(uri,promise) {
var image = new Image();
image.crossOrigin = "Anonymous";
image.addEventListener("load",function(event) {
var buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
buffer.__srcImage = image;
lime__$backend_html5_HTML5HTTPRequest.activeRequests--;
lime__$backend_html5_HTML5HTTPRequest.processQueue();
promise.complete(new lime_graphics_Image(buffer));
},false);
image.addEventListener("progress",function(event1) {
promise.progress(event1.loaded,event1.total);
},false);
image.addEventListener("error",function(event2) {
lime__$backend_html5_HTML5HTTPRequest.activeRequests--;
lime__$backend_html5_HTML5HTTPRequest.processQueue();
promise.error(event2.detail);
},false);
image.src = uri;
};
lime__$backend_html5_HTML5HTTPRequest.prototype = {
binary: null
,parent: null
,request: null
,cancel: function() {
if(this.request != null) this.request.abort();
}
,init: function(parent) {
this.parent = parent;
}
,load: function(uri,progress,readyStateChange) {
this.request = new XMLHttpRequest();
this.request.addEventListener("progress",progress,false);
this.request.onreadystatechange = readyStateChange;
var query = "";
if(this.parent.data == null) {
var $it0 = this.parent.formData.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
if(query.length > 0) query += "&";
query += encodeURIComponent(key) + "=" + StringTools.urlEncode(Std.string(this.parent.formData.get(key)));
}
if(this.parent.method == "GET" && query != "") {
if(uri.indexOf("?") > -1) uri += "&" + query; else uri += "?" + query;
query = "";
}
}
this.request.open(Std.string(this.parent.method),uri,true);
if(this.parent.timeout > 0) this.request.timeout = this.parent.timeout;
if(this.binary) this.request.responseType = "arraybuffer";
var hasContentType = false;
var _g = 0;
var _g1 = this.parent.headers;
while(_g < _g1.length) {
var header = _g1[_g];
++_g;
if(header.name == "Content-Type") hasContentType = true;
this.request.setRequestHeader(header.name,header.value);
}
if(!hasContentType && this.parent.contentType != null) this.request.setRequestHeader("Content-Type",this.parent.contentType);
if(this.parent.data != null) this.request.send(this.parent.data.b.bufferValue); else this.request.send(query);
}
,loadData: function(uri) {
var promise = new lime_app_Promise();
if(lime__$backend_html5_HTML5HTTPRequest.activeRequests < lime__$backend_html5_HTML5HTTPRequest.requestLimit) {
lime__$backend_html5_HTML5HTTPRequest.activeRequests++;
this.__loadData(uri,promise);
} else lime__$backend_html5_HTML5HTTPRequest.requestQueue.add({ instance : this, uri : uri, promise : promise, type : "BINARY"});
return promise.future;
}
,loadText: function(uri) {
var promise = new lime_app_Promise();
if(lime__$backend_html5_HTML5HTTPRequest.activeRequests < lime__$backend_html5_HTML5HTTPRequest.requestLimit) {
lime__$backend_html5_HTML5HTTPRequest.activeRequests++;
this.__loadText(uri,promise);
} else lime__$backend_html5_HTML5HTTPRequest.requestQueue.add({ instance : this, uri : uri, promise : promise, type : "TEXT"});
return promise.future;
}
,processResponse: function() {
if(this.parent.enableResponseHeaders) {
this.parent.responseHeaders = [];
var name;
var value;
var _g = 0;
var _g1 = this.request.getAllResponseHeaders().split("\n");
while(_g < _g1.length) {
var line = _g1[_g];
++_g;
name = StringTools.trim((function($this) {
var $r;
var len = line.indexOf(":");
$r = HxOverrides.substr(line,0,len);
return $r;
}(this)));
value = StringTools.trim((function($this) {
var $r;
var pos = line.indexOf(":") + 1;
$r = HxOverrides.substr(line,pos,null);
return $r;
}(this)));
if(name != "") this.parent.responseHeaders.push(new lime_net_HTTPRequestHeader(name,value));
}
}
this.parent.responseStatus = this.request.status;
}
,__loadData: function(uri,promise) {
var _g = this;
var progress = function(event) {
promise.progress(event.loaded,event.total);
};
var readyStateChange = function(event1) {
if(_g.request.readyState != 4) return;
if(_g.request.status != null && _g.request.status >= 200 && _g.request.status <= 400) {
var bytes;
if(_g.request.responseType == "") bytes = haxe_io_Bytes.ofString(_g.request.responseText); else bytes = haxe_io_Bytes.ofData(_g.request.response);
_g.processResponse();
promise.complete(bytes);
} else {
_g.processResponse();
promise.error(_g.request.status);
}
_g.request = null;
lime__$backend_html5_HTML5HTTPRequest.activeRequests--;
lime__$backend_html5_HTML5HTTPRequest.processQueue();
};
this.binary = true;
this.load(uri,progress,readyStateChange);
}
,__loadText: function(uri,promise) {
var _g = this;
var progress = function(event) {
promise.progress(event.loaded,event.total);
};
var readyStateChange = function(event1) {
if(_g.request.readyState != 4) return;
if(_g.request.status != null && _g.request.status >= 200 && _g.request.status <= 400) {
_g.processResponse();
promise.complete(_g.request.responseText);
} else {
_g.processResponse();
promise.error(_g.request.status);
}
_g.request = null;
lime__$backend_html5_HTML5HTTPRequest.activeRequests--;
lime__$backend_html5_HTML5HTTPRequest.processQueue();
};
this.binary = false;
this.load(uri,progress,readyStateChange);
}
,__class__: lime__$backend_html5_HTML5HTTPRequest
};
var lime__$backend_html5_HTML5Mouse = function() { };
$hxClasses["lime._backend.html5.HTML5Mouse"] = lime__$backend_html5_HTML5Mouse;
lime__$backend_html5_HTML5Mouse.__name__ = ["lime","_backend","html5","HTML5Mouse"];
lime__$backend_html5_HTML5Mouse.hide = function() {
if(!lime__$backend_html5_HTML5Mouse.__hidden) {
lime__$backend_html5_HTML5Mouse.__hidden = true;
var _g = 0;
var _g1 = lime_app_Application.current.__windows;
while(_g < _g1.length) {
var $window = _g1[_g];
++_g;
$window.backend.element.style.cursor = "none";
}
}
};
lime__$backend_html5_HTML5Mouse.show = function() {
if(lime__$backend_html5_HTML5Mouse.__hidden) {
lime__$backend_html5_HTML5Mouse.__hidden = false;
var cacheValue = lime__$backend_html5_HTML5Mouse.__cursor;
lime__$backend_html5_HTML5Mouse.__cursor = null;
lime__$backend_html5_HTML5Mouse.set_cursor(cacheValue);
}
};
lime__$backend_html5_HTML5Mouse.warp = function(x,y,window) {
};
lime__$backend_html5_HTML5Mouse.get_cursor = function() {
if(lime__$backend_html5_HTML5Mouse.__cursor == null) return lime_ui_MouseCursor.DEFAULT;
return lime__$backend_html5_HTML5Mouse.__cursor;
};
lime__$backend_html5_HTML5Mouse.set_cursor = function(value) {
if(lime__$backend_html5_HTML5Mouse.__cursor != value) {
if(!lime__$backend_html5_HTML5Mouse.__hidden) {
var _g = 0;
var _g1 = lime_app_Application.current.__windows;
while(_g < _g1.length) {
var $window = _g1[_g];
++_g;
switch(value[1]) {
case 0:
$window.backend.element.style.cursor = "default";
break;
case 1:
$window.backend.element.style.cursor = "crosshair";
break;
case 3:
$window.backend.element.style.cursor = "move";
break;
case 4:
$window.backend.element.style.cursor = "pointer";
break;
case 5:
$window.backend.element.style.cursor = "nesw-resize";
break;
case 6:
$window.backend.element.style.cursor = "ns-resize";
break;
case 7:
$window.backend.element.style.cursor = "nwse-resize";
break;
case 8:
$window.backend.element.style.cursor = "ew-resize";
break;
case 9:
$window.backend.element.style.cursor = "text";
break;
case 10:
$window.backend.element.style.cursor = "wait";
break;
case 11:
$window.backend.element.style.cursor = "wait";
break;
default:
$window.backend.element.style.cursor = "auto";
}
}
}
lime__$backend_html5_HTML5Mouse.__cursor = value;
}
return lime__$backend_html5_HTML5Mouse.__cursor;
};
lime__$backend_html5_HTML5Mouse.get_lock = function() {
return false;
};
lime__$backend_html5_HTML5Mouse.set_lock = function(value) {
return value;
};
var lime__$backend_html5_HTML5Renderer = function(parent) {
this.parent = parent;
};
$hxClasses["lime._backend.html5.HTML5Renderer"] = lime__$backend_html5_HTML5Renderer;
lime__$backend_html5_HTML5Renderer.__name__ = ["lime","_backend","html5","HTML5Renderer"];
lime__$backend_html5_HTML5Renderer.prototype = {
parent: null
,create: function() {
this.createContext();
{
var _g = this.parent.context;
switch(_g[1]) {
case 0:
this.parent.window.backend.canvas.addEventListener("webglcontextlost",$bind(this,this.handleEvent),false);
this.parent.window.backend.canvas.addEventListener("webglcontextrestored",$bind(this,this.handleEvent),false);
break;
default:
}
}
}
,createContext: function() {
if(this.parent.window.backend.div != null) {
this.parent.context = lime_graphics_RenderContext.DOM(this.parent.window.backend.div);
this.parent.type = lime_graphics_RendererType.DOM;
} else if(this.parent.window.backend.canvas != null) {
var webgl = null;
if(!Object.prototype.hasOwnProperty.call(this.parent.window.config,"hardware") || this.parent.window.config.hardware) {
var options = { alpha : Object.prototype.hasOwnProperty.call(this.parent.window.config,"background") && this.parent.window.config.background == null?true:false, antialias : Object.prototype.hasOwnProperty.call(this.parent.window.config,"antialiasing")?this.parent.window.config.antialiasing > 0:false, depth : Object.prototype.hasOwnProperty.call(this.parent.window.config,"depthBuffer")?this.parent.window.config.depthBuffer:true, premultipliedAlpha : true, stencil : Object.prototype.hasOwnProperty.call(this.parent.window.config,"stencilBuffer")?this.parent.window.config.stencilBuffer:false, preserveDrawingBuffer : false};
var _g = 0;
var _g1 = ["webgl2","webgl","experimental-webgl"];
while(_g < _g1.length) {
var name = _g1[_g];
++_g;
webgl = this.parent.window.backend.canvas.getContext(name,options);
if(webgl != null) break;
}
}
if(webgl == null) {
this.parent.context = lime_graphics_RenderContext.CANVAS(this.parent.window.backend.canvas.getContext("2d"));
this.parent.type = lime_graphics_RendererType.CANVAS;
} else {
lime_graphics_opengl_GL.context = new lime__$backend_html5_HTML5GLRenderContext(webgl);
this.parent.context = lime_graphics_RenderContext.OPENGL(lime_graphics_opengl_GL.context);
this.parent.type = lime_graphics_RendererType.OPENGL;
}
}
}
,flip: function() {
}
,handleEvent: function(event) {
var _g = event.type;
switch(_g) {
case "webglcontextlost":
event.preventDefault();
if(lime_graphics_opengl_GL.context != null) lime_graphics_opengl_GL.context.__contextLost = true;
this.parent.context = null;
this.parent.onContextLost.dispatch();
break;
case "webglcontextrestored":
this.createContext();
this.parent.onContextRestored.dispatch(this.parent.context);
break;
default:
}
}
,readPixels: function(rect) {
if(this.parent.window.backend.canvas != null) {
if(rect == null) rect = new lime_math_Rectangle(0,0,this.parent.window.backend.canvas.width,this.parent.window.backend.canvas.height); else rect.__contract(0,0,this.parent.window.backend.canvas.width,this.parent.window.backend.canvas.height);
if(rect.width > 0 && rect.height > 0) {
var canvas = window.document.createElement("canvas");
canvas.width = rect.width | 0;
canvas.height = rect.height | 0;
var context = canvas.getContext("2d");
context.drawImage(this.parent.window.backend.canvas,-rect.x,-rect.y);
return lime_graphics_Image.fromCanvas(canvas);
}
}
return null;
}
,render: function() {
}
,__class__: lime__$backend_html5_HTML5Renderer
};
var lime__$backend_html5_HTML5Window = function(parent) {
this.unusedTouchesPool = new List();
this.scale = 1.0;
this.currentTouches = new haxe_ds_IntMap();
this.parent = parent;
if(parent.config != null && Object.prototype.hasOwnProperty.call(parent.config,"element")) this.element = parent.config.element;
if(parent.config != null && Object.prototype.hasOwnProperty.call(parent.config,"allowHighDPI") && parent.config.allowHighDPI) this.scale = window.devicePixelRatio;
parent.__scale = this.scale;
this.cacheMouseX = 0;
this.cacheMouseY = 0;
};
$hxClasses["lime._backend.html5.HTML5Window"] = lime__$backend_html5_HTML5Window;
lime__$backend_html5_HTML5Window.__name__ = ["lime","_backend","html5","HTML5Window"];
lime__$backend_html5_HTML5Window.prototype = {
canvas: null
,div: null
,element: null
,cacheElementHeight: null
,cacheElementWidth: null
,cacheMouseX: null
,cacheMouseY: null
,currentTouches: null
,enableTextEvents: null
,parent: null
,primaryTouch: null
,scale: null
,setHeight: null
,setWidth: null
,unusedTouchesPool: null
,alert: function(message,title) {
if(message != null) js_Browser.alert(message);
}
,close: function() {
this.parent.application.removeWindow(this.parent);
}
,create: function(application) {
this.setWidth = this.parent.__width;
this.setHeight = this.parent.__height;
this.parent.id = lime__$backend_html5_HTML5Window.windowID++;
if(js_Boot.__instanceof(this.element,HTMLCanvasElement)) this.canvas = this.element; else this.canvas = window.document.createElement("canvas");
if(this.canvas != null) {
var style = this.canvas.style;
style.setProperty("-webkit-transform","translateZ(0)",null);
style.setProperty("transform","translateZ(0)",null);
} else if(this.div != null) {
var style1 = this.div.style;
style1.setProperty("-webkit-transform","translate3D(0,0,0)",null);
style1.setProperty("transform","translate3D(0,0,0)",null);
style1.position = "relative";
style1.overflow = "hidden";
style1.setProperty("-webkit-user-select","none",null);
style1.setProperty("-moz-user-select","none",null);
style1.setProperty("-ms-user-select","none",null);
style1.setProperty("-o-user-select","none",null);
}
if(this.parent.__width == 0 && this.parent.__height == 0) {
if(this.element != null) {
this.parent.set_width(this.element.clientWidth);
this.parent.set_height(this.element.clientHeight);
} else {
this.parent.set_width(window.innerWidth);
this.parent.set_height(window.innerHeight);
}
this.cacheElementWidth = this.parent.__width;
this.cacheElementHeight = this.parent.__height;
this.parent.set_fullscreen(true);
}
if(this.canvas != null) {
this.canvas.width = Math.round(this.parent.__width * this.scale);
this.canvas.height = Math.round(this.parent.__height * this.scale);
this.canvas.style.width = this.parent.__width + "px";
this.canvas.style.height = this.parent.__height + "px";
} else {
this.div.style.width = this.parent.__width + "px";
this.div.style.height = this.parent.__height + "px";
}
this.updateSize();
if(this.element != null) {
if(this.canvas != null) {
if(this.element != this.canvas) this.element.appendChild(this.canvas);
} else this.element.appendChild(this.div);
var events = ["mousedown","mouseenter","mouseleave","mousemove","mouseup","wheel"];
var _g = 0;
while(_g < events.length) {
var event = events[_g];
++_g;
this.element.addEventListener(event,$bind(this,this.handleMouseEvent),true);
}
window.document.addEventListener("dragstart",function(e) {
if(e.target.nodeName.toLowerCase() == "img") {
e.preventDefault();
return false;
}
return true;
},false);
this.element.addEventListener("contextmenu",$bind(this,this.handleContextMenuEvent),true);
this.element.addEventListener("touchstart",$bind(this,this.handleTouchEvent),true);
this.element.addEventListener("touchmove",$bind(this,this.handleTouchEvent),true);
this.element.addEventListener("touchend",$bind(this,this.handleTouchEvent),true);
this.element.addEventListener("gamepadconnected",$bind(this,this.handleGamepadEvent),true);
this.element.addEventListener("gamepaddisconnected",$bind(this,this.handleGamepadEvent),true);
}
}
,focus: function() {
}
,getDisplay: function() {
return lime_system_System.getDisplay(0);
}
,getDisplayMode: function() {
return lime_system_System.getDisplay(0).currentMode;
}
,setDisplayMode: function(value) {
return value;
}
,getEnableTextEvents: function() {
return this.enableTextEvents;
}
,handleContextMenuEvent: function(event) {
if(this.parent.onMouseUp.canceled) event.preventDefault();
}
,handleFocusEvent: function(event) {
if(this.enableTextEvents) haxe_Timer.delay(function() {
lime__$backend_html5_HTML5Window.textInput.focus();
},20);
}
,handleGamepadEvent: function(event) {
var _g = event.type;
switch(_g) {
case "gamepadconnected":
lime_ui_Joystick.__connect(event.gamepad.index);
if(event.gamepad.mapping == "standard") lime_ui_Gamepad.__connect(event.gamepad.index);
break;
case "gamepaddisconnected":
lime_ui_Joystick.__disconnect(event.gamepad.index);
lime_ui_Gamepad.__disconnect(event.gamepad.index);
break;
default:
}
}
,handleCutOrCopyEvent: function(event) {
event.clipboardData.setData("text/plain",lime_system_Clipboard.get_text());
event.preventDefault();
}
,handlePasteEvent: function(event) {
if(event.clipboardData.types.indexOf("text/plain") > -1) {
var text = lime_system_Clipboard.set_text(event.clipboardData.getData("text/plain"));
this.parent.onTextInput.dispatch(text);
event.preventDefault();
}
}
,handleInputEvent: function(event) {
if(lime__$backend_html5_HTML5Window.textInput.value != lime__$backend_html5_HTML5Window.dummyCharacter) {
if(lime__$backend_html5_HTML5Window.textInput.value.charAt(0) == lime__$backend_html5_HTML5Window.dummyCharacter) this.parent.onTextInput.dispatch(HxOverrides.substr(lime__$backend_html5_HTML5Window.textInput.value,1,null)); else this.parent.onTextInput.dispatch(lime__$backend_html5_HTML5Window.textInput.value);
lime__$backend_html5_HTML5Window.textInput.value = lime__$backend_html5_HTML5Window.dummyCharacter;
}
}
,handleMouseEvent: function(event) {
var x = 0.0;
var y = 0.0;
if(event.type != "wheel") {
if(this.element != null) {
if(this.canvas != null) {
var rect = this.canvas.getBoundingClientRect();
x = (event.clientX - rect.left) * (this.parent.__width / rect.width);
y = (event.clientY - rect.top) * (this.parent.__height / rect.height);
} else if(this.div != null) {
var rect1 = this.div.getBoundingClientRect();
x = event.clientX - rect1.left;
y = event.clientY - rect1.top;
} else {
var rect2 = this.element.getBoundingClientRect();
x = (event.clientX - rect2.left) * (this.parent.__width / rect2.width);
y = (event.clientY - rect2.top) * (this.parent.__height / rect2.height);
}
} else {
x = event.clientX;
y = event.clientY;
}
var _g = event.type;
switch(_g) {
case "mousedown":
this.parent.onMouseDown.dispatch(x,y,event.button);
if(this.parent.onMouseDown.canceled) event.preventDefault();
break;
case "mouseenter":
if(event.target == this.element) {
this.parent.onEnter.dispatch();
if(this.parent.onEnter.canceled) event.preventDefault();
}
break;
case "mouseleave":
if(event.target == this.element) {
this.parent.onLeave.dispatch();
if(this.parent.onLeave.canceled) event.preventDefault();
}
break;
case "mouseup":
this.parent.onMouseUp.dispatch(x,y,event.button);
if(this.parent.onMouseUp.canceled) event.preventDefault();
break;
case "mousemove":
if(x != this.cacheMouseX || y != this.cacheMouseY) {
this.parent.onMouseMove.dispatch(x,y);
this.parent.onMouseMoveRelative.dispatch(x - this.cacheMouseX,y - this.cacheMouseY);
if(this.parent.onMouseMove.canceled || this.parent.onMouseMoveRelative.canceled) event.preventDefault();
}
break;
default:
}
this.cacheMouseX = x;
this.cacheMouseY = y;
} else {
this.parent.onMouseWheel.dispatch(event.deltaX,-event.deltaY);
if(this.parent.onMouseWheel.canceled) event.preventDefault();
}
}
,handleResizeEvent: function(event) {
this.primaryTouch = null;
this.updateSize();
}
,handleTouchEvent: function(event) {
event.preventDefault();
var rect = null;
if(this.element != null) {
if(this.canvas != null) rect = this.canvas.getBoundingClientRect(); else if(this.div != null) rect = this.div.getBoundingClientRect(); else rect = this.element.getBoundingClientRect();
}
var windowWidth = this.setWidth;
var windowHeight = this.setHeight;
if(windowWidth == 0 || windowHeight == 0) {
if(rect != null) {
windowWidth = rect.width;
windowHeight = rect.height;
} else {
windowWidth = 1;
windowHeight = 1;
}
}
var _g = 0;
var _g1 = event.changedTouches;
while(_g < _g1.length) {
var data = _g1[_g];
++_g;
var x = 0.0;
var y = 0.0;
if(rect != null) {
x = (data.clientX - rect.left) * (windowWidth / rect.width);
y = (data.clientY - rect.top) * (windowHeight / rect.height);
} else {
x = data.clientX;
y = data.clientY;
}
var _g2 = event.type;
switch(_g2) {
case "touchstart":
var touch = this.unusedTouchesPool.pop();
if(touch == null) touch = new lime_ui_Touch(x / windowWidth,y / windowHeight,data.identifier,0,0,data.force,this.parent.id); else {
touch.x = x / windowWidth;
touch.y = y / windowHeight;
touch.id = data.identifier;
touch.dx = 0;
touch.dy = 0;
touch.pressure = data.force;
touch.device = this.parent.id;
}
this.currentTouches.h[data.identifier] = touch;
lime_ui_Touch.onStart.dispatch(touch);
if(this.primaryTouch == null) this.primaryTouch = touch;
if(touch == this.primaryTouch) this.parent.onMouseDown.dispatch(x,y,0);
break;
case "touchend":
var touch1 = this.currentTouches.h[data.identifier];
if(touch1 != null) {
var cacheX = touch1.x;
var cacheY = touch1.y;
touch1.x = x / windowWidth;
touch1.y = y / windowHeight;
touch1.dx = touch1.x - cacheX;
touch1.dy = touch1.y - cacheY;
touch1.pressure = data.force;
lime_ui_Touch.onEnd.dispatch(touch1);
this.currentTouches.remove(data.identifier);
this.unusedTouchesPool.add(touch1);
if(touch1 == this.primaryTouch) {
this.parent.onMouseUp.dispatch(x,y,0);
this.primaryTouch = null;
}
}
break;
case "touchmove":
var touch2 = this.currentTouches.h[data.identifier];
if(touch2 != null) {
var cacheX1 = touch2.x;
var cacheY1 = touch2.y;
touch2.x = x / windowWidth;
touch2.y = y / windowHeight;
touch2.dx = touch2.x - cacheX1;
touch2.dy = touch2.y - cacheY1;
touch2.pressure = data.force;
lime_ui_Touch.onMove.dispatch(touch2);
if(touch2 == this.primaryTouch) this.parent.onMouseMove.dispatch(x,y);
}
break;
default:
}
}
}
,move: function(x,y) {
}
,resize: function(width,height) {
}
,setBorderless: function(value) {
return value;
}
,setClipboard: function(value) {
if(window.document.queryCommandEnabled("copy")) {
var inputEnabled = this.enableTextEvents;
this.setEnableTextEvents(true);
this.setEnableTextEvents(false);
var cacheText = lime__$backend_html5_HTML5Window.textInput.value;
lime__$backend_html5_HTML5Window.textInput.value = value;
window.document.execCommand("copy");
lime__$backend_html5_HTML5Window.textInput.value = cacheText;
this.setEnableTextEvents(inputEnabled);
}
}
,setEnableTextEvents: function(value) {
if(value) {
if(lime__$backend_html5_HTML5Window.textInput == null) {
lime__$backend_html5_HTML5Window.textInput = window.document.createElement("input");
lime__$backend_html5_HTML5Window.textInput.type = "text";
lime__$backend_html5_HTML5Window.textInput.style.position = "absolute";
lime__$backend_html5_HTML5Window.textInput.style.opacity = "0";
lime__$backend_html5_HTML5Window.textInput.style.color = "transparent";
lime__$backend_html5_HTML5Window.textInput.value = lime__$backend_html5_HTML5Window.dummyCharacter;
lime__$backend_html5_HTML5Window.textInput.autocapitalize = "off";
lime__$backend_html5_HTML5Window.textInput.autocorrect = "off";
lime__$backend_html5_HTML5Window.textInput.autocomplete = "off";
lime__$backend_html5_HTML5Window.textInput.style.left = "0px";
lime__$backend_html5_HTML5Window.textInput.style.top = "50%";
if(new EReg("(iPad|iPhone|iPod).*OS 8_","gi").match(window.navigator.userAgent)) {
lime__$backend_html5_HTML5Window.textInput.style.fontSize = "0px";
lime__$backend_html5_HTML5Window.textInput.style.width = "0px";
lime__$backend_html5_HTML5Window.textInput.style.height = "0px";
} else {
lime__$backend_html5_HTML5Window.textInput.style.width = "1px";
lime__$backend_html5_HTML5Window.textInput.style.height = "1px";
}
lime__$backend_html5_HTML5Window.textInput.style.pointerEvents = "none";
lime__$backend_html5_HTML5Window.textInput.style.zIndex = "-10000000";
window.document.body.appendChild(lime__$backend_html5_HTML5Window.textInput);
}
if(!this.enableTextEvents) {
lime__$backend_html5_HTML5Window.textInput.addEventListener("input",$bind(this,this.handleInputEvent),true);
lime__$backend_html5_HTML5Window.textInput.addEventListener("blur",$bind(this,this.handleFocusEvent),true);
lime__$backend_html5_HTML5Window.textInput.addEventListener("cut",$bind(this,this.handleCutOrCopyEvent),true);
lime__$backend_html5_HTML5Window.textInput.addEventListener("copy",$bind(this,this.handleCutOrCopyEvent),true);
lime__$backend_html5_HTML5Window.textInput.addEventListener("paste",$bind(this,this.handlePasteEvent),true);
}
lime__$backend_html5_HTML5Window.textInput.focus();
lime__$backend_html5_HTML5Window.textInput.select();
} else if(lime__$backend_html5_HTML5Window.textInput != null) {
lime__$backend_html5_HTML5Window.textInput.removeEventListener("input",$bind(this,this.handleInputEvent),true);
lime__$backend_html5_HTML5Window.textInput.removeEventListener("blur",$bind(this,this.handleFocusEvent),true);
lime__$backend_html5_HTML5Window.textInput.removeEventListener("cut",$bind(this,this.handleCutOrCopyEvent),true);
lime__$backend_html5_HTML5Window.textInput.removeEventListener("copy",$bind(this,this.handleCutOrCopyEvent),true);
lime__$backend_html5_HTML5Window.textInput.removeEventListener("paste",$bind(this,this.handlePasteEvent),true);
lime__$backend_html5_HTML5Window.textInput.blur();
}
return this.enableTextEvents = value;
}
,setFullscreen: function(value) {
return value;
}
,setIcon: function(image) {
}
,setMaximized: function(value) {
return false;
}
,setMinimized: function(value) {
return false;
}
,setResizable: function(value) {
return value;
}
,setTitle: function(value) {
return value;
}
,updateSize: function() {
var elementWidth;
var elementHeight;
if(this.element != null) {
elementWidth = this.element.clientWidth;
elementHeight = this.element.clientHeight;
} else {
elementWidth = window.innerWidth;
elementHeight = window.innerHeight;
}
if(elementWidth != this.cacheElementWidth || elementHeight != this.cacheElementHeight) {
this.cacheElementWidth = elementWidth;
this.cacheElementHeight = elementHeight;
var stretch = this.parent.__fullscreen || this.setWidth == 0 && this.setHeight == 0;
if(this.element != null && (this.div == null || this.div != null && stretch)) {
if(stretch) {
if(this.parent.__width != elementWidth || this.parent.__height != elementHeight) {
this.parent.set_width(elementWidth);
this.parent.set_height(elementHeight);
if(this.canvas != null) {
if(this.element != this.canvas) {
this.canvas.width = Math.round(elementWidth * this.scale);
this.canvas.height = Math.round(elementHeight * this.scale);
this.canvas.style.width = elementWidth + "px";
this.canvas.style.height = elementHeight + "px";
}
} else {
this.div.style.width = elementWidth + "px";
this.div.style.height = elementHeight + "px";
}
this.parent.onResize.dispatch(elementWidth,elementHeight);
}
} else {
var scaleX;
if(this.setWidth != 0) scaleX = elementWidth / this.setWidth; else scaleX = 1;
var scaleY;
if(this.setHeight != 0) scaleY = elementHeight / this.setHeight; else scaleY = 1;
var targetWidth = elementWidth;
var targetHeight = elementHeight;
var marginLeft = 0;
var marginTop = 0;
if(scaleX < scaleY) {
targetHeight = Math.floor(this.setHeight * scaleX);
marginTop = Math.floor((elementHeight - targetHeight) / 2);
} else {
targetWidth = Math.floor(this.setWidth * scaleY);
marginLeft = Math.floor((elementWidth - targetWidth) / 2);
}
if(this.canvas != null) {
if(this.element != this.canvas) {
this.canvas.style.width = targetWidth + "px";
this.canvas.style.height = targetHeight + "px";
this.canvas.style.marginLeft = marginLeft + "px";
this.canvas.style.marginTop = marginTop + "px";
}
} else {
this.div.style.width = targetWidth + "px";
this.div.style.height = targetHeight + "px";
this.div.style.marginLeft = marginLeft + "px";
this.div.style.marginTop = marginTop + "px";
}
}
}
}
}
,__class__: lime__$backend_html5_HTML5Window
};
var lime__$backend_native_NativeCFFI = function() { };
$hxClasses["lime._backend.native.NativeCFFI"] = lime__$backend_native_NativeCFFI;
lime__$backend_native_NativeCFFI.__name__ = ["lime","_backend","native","NativeCFFI"];
var lime__$macros_AssetsMacro = function() { };
$hxClasses["lime._macros.AssetsMacro"] = lime__$macros_AssetsMacro;
lime__$macros_AssetsMacro.__name__ = ["lime","_macros","AssetsMacro"];
var lime_app_Event = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app.Event"] = lime_app_Event;
lime_app_Event.__name__ = ["lime","app","Event"];
lime_app_Event.prototype = {
canceled: null
,__listeners: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,dispatch: null
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__class__: lime_app_Event
};
var lime_app_Future = function(work,async) {
if(async == null) async = false;
if(work != null) {
if(async) {
var promise = new lime_app_Promise();
promise.future = this;
lime_app__$Future_FutureWork.queue({ promise : promise, work : work});
} else try {
this.value = work();
this.isComplete = true;
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.error = e;
this.isError = true;
}
}
};
$hxClasses["lime.app.Future"] = lime_app_Future;
lime_app_Future.__name__ = ["lime","app","Future"];
lime_app_Future.ofEvents = function(onComplete,onError,onProgress) {
var promise = new lime_app_Promise();
onComplete.add(function(data) {
promise.complete(data);
},true);
if(onError != null) onError.add(function(error) {
promise.error(error);
},true);
if(onProgress != null) onProgress.add(function(progress,total) {
promise.progress(progress,total);
},true);
return promise.future;
};
lime_app_Future.withError = function(error) {
var future = new lime_app_Future();
future.isError = true;
future.error = error;
return future;
};
lime_app_Future.withValue = function(value) {
var future = new lime_app_Future();
future.isComplete = true;
future.value = value;
return future;
};
lime_app_Future.prototype = {
error: null
,isComplete: null
,isError: null
,value: null
,__completeListeners: null
,__errorListeners: null
,__progressListeners: null
,onComplete: function(listener) {
if(listener != null) {
if(this.isComplete) listener(this.value); else if(!this.isError) {
if(this.__completeListeners == null) this.__completeListeners = [];
this.__completeListeners.push(listener);
}
}
return this;
}
,onError: function(listener) {
if(listener != null) {
if(this.isError) listener(this.error); else if(!this.isComplete) {
if(this.__errorListeners == null) this.__errorListeners = [];
this.__errorListeners.push(listener);
}
}
return this;
}
,onProgress: function(listener) {
if(listener != null) {
if(this.__progressListeners == null) this.__progressListeners = [];
this.__progressListeners.push(listener);
}
return this;
}
,ready: function(waitTime) {
if(waitTime == null) waitTime = -1;
if(this.isComplete || this.isError) return this; else {
lime_utils_Log.warn("Cannot block thread in JavaScript",{ fileName : "Future.hx", lineNumber : 157, className : "lime.app.Future", methodName : "ready"});
return this;
}
}
,result: function(waitTime) {
if(waitTime == null) waitTime = -1;
this.ready(waitTime);
if(this.isComplete) return this.value; else return null;
}
,then: function(next) {
if(this.isComplete) return next(this.value); else if(this.isError) {
var future = new lime_app_Future();
future.onError(this.error);
return future;
} else {
var promise = new lime_app_Promise();
this.onError($bind(promise,promise.error));
this.onProgress($bind(promise,promise.progress));
this.onComplete(function(val) {
var future1 = next(val);
future1.onError($bind(promise,promise.error));
future1.onComplete($bind(promise,promise.complete));
});
return promise.future;
}
}
,__class__: lime_app_Future
};
var lime_app__$Future_FutureWork = function() { };
$hxClasses["lime.app._Future.FutureWork"] = lime_app__$Future_FutureWork;
lime_app__$Future_FutureWork.__name__ = ["lime","app","_Future","FutureWork"];
lime_app__$Future_FutureWork.queue = function(state) {
if(lime_app__$Future_FutureWork.threadPool == null) {
lime_app__$Future_FutureWork.threadPool = new lime_system_ThreadPool();
lime_app__$Future_FutureWork.threadPool.doWork.add(lime_app__$Future_FutureWork.threadPool_doWork);
lime_app__$Future_FutureWork.threadPool.onComplete.add(lime_app__$Future_FutureWork.threadPool_onComplete);
lime_app__$Future_FutureWork.threadPool.onError.add(lime_app__$Future_FutureWork.threadPool_onError);
}
lime_app__$Future_FutureWork.threadPool.queue(state);
};
lime_app__$Future_FutureWork.threadPool_doWork = function(state) {
try {
var result = state.work();
lime_app__$Future_FutureWork.threadPool.sendComplete({ promise : state.promise, result : result});
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
lime_app__$Future_FutureWork.threadPool.sendError({ promise : state.promise, error : e});
}
};
lime_app__$Future_FutureWork.threadPool_onComplete = function(state) {
state.promise.complete(state.result);
};
lime_app__$Future_FutureWork.threadPool_onError = function(state) {
state.promise.error(state.error);
};
var lime_app_Preloader = function() {
this.bytesTotalCache = new haxe_ds_StringMap();
this.bytesLoadedCache2 = new haxe_ds_StringMap();
this.bytesLoadedCache = new haxe_ds_ObjectMap();
this.onProgress = new lime_app__$Event_$Int_$Int_$Void();
this.onComplete = new lime_app__$Event_$Void_$Void();
this.bytesLoaded = 0;
this.bytesTotal = 0;
this.libraries = [];
this.libraryNames = [];
this.onProgress.add($bind(this,this.update));
};
$hxClasses["lime.app.Preloader"] = lime_app_Preloader;
lime_app_Preloader.__name__ = ["lime","app","Preloader"];
lime_app_Preloader.prototype = {
complete: null
,onComplete: null
,onProgress: null
,bytesLoaded: null
,bytesLoadedCache: null
,bytesLoadedCache2: null
,bytesTotal: null
,bytesTotalCache: null
,initLibraryNames: null
,libraries: null
,libraryNames: null
,loadedLibraries: null
,loadedStage: null
,preloadComplete: null
,preloadStarted: null
,simulateProgress: null
,addLibrary: function(library) {
this.libraries.push(library);
}
,addLibraryName: function(name) {
if(HxOverrides.indexOf(this.libraryNames,name,0) == -1) this.libraryNames.push(name);
}
,create: function(config) {
}
,load: function() {
var _g2 = this;
var _g = 0;
var _g1 = this.libraries;
while(_g < _g1.length) {
var library = _g1[_g];
++_g;
this.bytesTotal += library.bytesTotal;
}
this.loadedLibraries = -1;
this.preloadStarted = false;
var _g3 = 0;
var _g11 = this.libraries;
while(_g3 < _g11.length) {
var library1 = [_g11[_g3]];
++_g3;
lime_utils_Log.verbose("Preloading asset library",{ fileName : "Preloader.hx", lineNumber : 153, className : "lime.app.Preloader", methodName : "load"});
library1[0].load().onProgress((function(library1) {
return function(loaded,total) {
if(!(_g2.bytesLoadedCache.h.__keys__[library1[0].__id__] != null)) _g2.bytesLoaded += loaded; else _g2.bytesLoaded += loaded - _g2.bytesLoadedCache.h[library1[0].__id__];
_g2.bytesLoadedCache.set(library1[0],loaded);
if(!_g2.simulateProgress) _g2.onProgress.dispatch(_g2.bytesLoaded,_g2.bytesTotal);
};
})(library1)).onComplete((function(library1) {
return function(_) {
if(!(_g2.bytesLoadedCache.h.__keys__[library1[0].__id__] != null)) _g2.bytesLoaded += library1[0].bytesTotal; else _g2.bytesLoaded += library1[0].bytesTotal - _g2.bytesLoadedCache.h[library1[0].__id__];
_g2.loadedAssetLibrary();
};
})(library1)).onError((function() {
return function(e) {
lime_utils_Log.error(e,{ fileName : "Preloader.hx", lineNumber : 191, className : "lime.app.Preloader", methodName : "load"});
};
})());
}
var _g4 = 0;
var _g12 = this.libraryNames;
while(_g4 < _g12.length) {
var name = _g12[_g4];
++_g4;
this.bytesTotal += 200;
}
this.loadedLibraries++;
this.preloadStarted = true;
this.updateProgress();
}
,loadedAssetLibrary: function(name) {
this.loadedLibraries++;
var current = this.loadedLibraries;
if(!this.preloadStarted) current++;
var totalLibraries = this.libraries.length + this.libraryNames.length;
if(name != null) lime_utils_Log.verbose("Loaded asset library: " + name + " [" + current + "/" + totalLibraries + "]",{ fileName : "Preloader.hx", lineNumber : 223, className : "lime.app.Preloader", methodName : "loadedAssetLibrary"}); else lime_utils_Log.verbose("Loaded asset library [" + current + "/" + totalLibraries + "]",{ fileName : "Preloader.hx", lineNumber : 227, className : "lime.app.Preloader", methodName : "loadedAssetLibrary"});
this.updateProgress();
}
,start: function() {
if(this.complete) return;
this.complete = true;
this.onComplete.dispatch();
}
,update: function(loaded,total) {
}
,updateProgress: function() {
var _g2 = this;
if(!this.simulateProgress) this.onProgress.dispatch(this.bytesLoaded,this.bytesTotal);
if(this.loadedLibraries == this.libraries.length && !this.initLibraryNames) {
this.initLibraryNames = true;
var _g = 0;
var _g1 = this.libraryNames;
while(_g < _g1.length) {
var name = [_g1[_g]];
++_g;
lime_utils_Log.verbose("Preloading asset library: " + name[0],{ fileName : "Preloader.hx", lineNumber : 276, className : "lime.app.Preloader", methodName : "updateProgress"});
lime_utils_Assets.loadLibrary(name[0]).onProgress((function(name) {
return function(loaded,total) {
if(total > 0) {
if(!_g2.bytesTotalCache.exists(name[0])) {
_g2.bytesTotalCache.set(name[0],total);
_g2.bytesTotal += total - 200;
}
if(loaded > total) loaded = total;
if(!_g2.bytesLoadedCache2.exists(name[0])) _g2.bytesLoaded += loaded; else _g2.bytesLoaded += loaded - _g2.bytesLoadedCache2.get(name[0]);
_g2.bytesLoadedCache2.set(name[0],loaded);
if(!_g2.simulateProgress) _g2.onProgress.dispatch(_g2.bytesLoaded,_g2.bytesTotal);
}
};
})(name)).onComplete((function(name) {
return function(library) {
var total1 = 200;
if(_g2.bytesTotalCache.exists(name[0])) total1 = _g2.bytesTotalCache.get(name[0]);
if(!_g2.bytesLoadedCache2.exists(name[0])) _g2.bytesLoaded += total1; else _g2.bytesLoaded += total1 - _g2.bytesLoadedCache2.get(name[0]);
_g2.loadedAssetLibrary(name[0]);
};
})(name)).onError((function() {
return function(e) {
lime_utils_Log.error(e,{ fileName : "Preloader.hx", lineNumber : 335, className : "lime.app.Preloader", methodName : "updateProgress"});
};
})());
}
}
if(!this.simulateProgress && this.loadedLibraries == this.libraries.length + this.libraryNames.length) {
if(!this.preloadComplete) {
this.preloadComplete = true;
lime_utils_Log.verbose("Preload complete",{ fileName : "Preloader.hx", lineNumber : 349, className : "lime.app.Preloader", methodName : "updateProgress"});
}
this.start();
}
}
,__class__: lime_app_Preloader
};
var lime_app_Promise = function() {
this.future = new lime_app_Future();
};
$hxClasses["lime.app.Promise"] = lime_app_Promise;
lime_app_Promise.__name__ = ["lime","app","Promise"];
lime_app_Promise.prototype = {
future: null
,isComplete: null
,isError: null
,complete: function(data) {
if(!this.future.isError) {
this.future.isComplete = true;
this.future.value = data;
if(this.future.__completeListeners != null) {
var _g = 0;
var _g1 = this.future.__completeListeners;
while(_g < _g1.length) {
var listener = _g1[_g];
++_g;
listener(data);
}
this.future.__completeListeners = null;
}
}
return this;
}
,completeWith: function(future) {
future.onComplete($bind(this,this.complete));
future.onError($bind(this,this.error));
future.onProgress($bind(this,this.progress));
return this;
}
,error: function(msg) {
if(!this.future.isComplete) {
this.future.isError = true;
this.future.error = msg;
if(this.future.__errorListeners != null) {
var _g = 0;
var _g1 = this.future.__errorListeners;
while(_g < _g1.length) {
var listener = _g1[_g];
++_g;
listener(msg);
}
this.future.__errorListeners = null;
}
}
return this;
}
,progress: function(progress,total) {
if(!this.future.isError && !this.future.isComplete) {
if(this.future.__progressListeners != null) {
var _g = 0;
var _g1 = this.future.__progressListeners;
while(_g < _g1.length) {
var listener = _g1[_g];
++_g;
listener(progress,total);
}
}
}
return this;
}
,get_isComplete: function() {
return this.future.isComplete;
}
,get_isError: function() {
return this.future.isError;
}
,__class__: lime_app_Promise
,__properties__: {get_isError:"get_isError",get_isComplete:"get_isComplete"}
};
var lime_app__$Event_$Dynamic_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Dynamic_Void"] = lime_app__$Event_$Dynamic_$Void;
lime_app__$Event_$Dynamic_$Void.__name__ = ["lime","app","_Event_Dynamic_Void"];
lime_app__$Event_$Dynamic_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Dynamic_$Void
};
var lime_app__$Event_$Float_$Float_$Int_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Float_Float_Int_Void"] = lime_app__$Event_$Float_$Float_$Int_$Void;
lime_app__$Event_$Float_$Float_$Int_$Void.__name__ = ["lime","app","_Event_Float_Float_Int_Void"];
lime_app__$Event_$Float_$Float_$Int_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1,a2) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1,a2);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Float_$Float_$Int_$Void
};
var lime_app__$Event_$Float_$Float_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Float_Float_Void"] = lime_app__$Event_$Float_$Float_$Void;
lime_app__$Event_$Float_$Float_$Void.__name__ = ["lime","app","_Event_Float_Float_Void"];
lime_app__$Event_$Float_$Float_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Float_$Float_$Void
};
var lime_app__$Event_$Int_$Float_$Float_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Int_Float_Float_Void"] = lime_app__$Event_$Int_$Float_$Float_$Void;
lime_app__$Event_$Int_$Float_$Float_$Void.__name__ = ["lime","app","_Event_Int_Float_Float_Void"];
lime_app__$Event_$Int_$Float_$Float_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1,a2) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1,a2);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Int_$Float_$Float_$Void
};
var lime_app__$Event_$Int_$Float_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Int_Float_Void"] = lime_app__$Event_$Int_$Float_$Void;
lime_app__$Event_$Int_$Float_$Void.__name__ = ["lime","app","_Event_Int_Float_Void"];
lime_app__$Event_$Int_$Float_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Int_$Float_$Void
};
var lime_app__$Event_$Int_$Int_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Int_Int_Void"] = lime_app__$Event_$Int_$Int_$Void;
lime_app__$Event_$Int_$Int_$Void.__name__ = ["lime","app","_Event_Int_Int_Void"];
lime_app__$Event_$Int_$Int_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Int_$Int_$Void
};
var lime_app__$Event_$Int_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Int_Void"] = lime_app__$Event_$Int_$Void;
lime_app__$Event_$Int_$Void.__name__ = ["lime","app","_Event_Int_Void"];
lime_app__$Event_$Int_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Int_$Void
};
var lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Int_lime_ui_JoystickHatPosition_Void"] = lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void;
lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void.__name__ = ["lime","app","_Event_Int_lime_ui_JoystickHatPosition_Void"];
lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void
};
var lime_app__$Event_$String_$Int_$Int_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_String_Int_Int_Void"] = lime_app__$Event_$String_$Int_$Int_$Void;
lime_app__$Event_$String_$Int_$Int_$Void.__name__ = ["lime","app","_Event_String_Int_Int_Void"];
lime_app__$Event_$String_$Int_$Int_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1,a2) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1,a2);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$String_$Int_$Int_$Void
};
var lime_app__$Event_$String_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_String_Void"] = lime_app__$Event_$String_$Void;
lime_app__$Event_$String_$Void.__name__ = ["lime","app","_Event_String_Void"];
lime_app__$Event_$String_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$String_$Void
};
var lime_app__$Event_$Void_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_Void_Void"] = lime_app__$Event_$Void_$Void;
lime_app__$Event_$Void_$Void.__name__ = ["lime","app","_Event_Void_Void"];
lime_app__$Event_$Void_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function() {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i]();
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$Void_$Void
};
var lime_app__$Event_$lime_$graphics_$RenderContext_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_lime_graphics_RenderContext_Void"] = lime_app__$Event_$lime_$graphics_$RenderContext_$Void;
lime_app__$Event_$lime_$graphics_$RenderContext_$Void.__name__ = ["lime","app","_Event_lime_graphics_RenderContext_Void"];
lime_app__$Event_$lime_$graphics_$RenderContext_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$lime_$graphics_$RenderContext_$Void
};
var lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_lime_ui_GamepadAxis_Float_Void"] = lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void;
lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void.__name__ = ["lime","app","_Event_lime_ui_GamepadAxis_Float_Void"];
lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void
};
var lime_app__$Event_$lime_$ui_$GamepadButton_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_lime_ui_GamepadButton_Void"] = lime_app__$Event_$lime_$ui_$GamepadButton_$Void;
lime_app__$Event_$lime_$ui_$GamepadButton_$Void.__name__ = ["lime","app","_Event_lime_ui_GamepadButton_Void"];
lime_app__$Event_$lime_$ui_$GamepadButton_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$lime_$ui_$GamepadButton_$Void
};
var lime_app__$Event_$lime_$ui_$Gamepad_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_lime_ui_Gamepad_Void"] = lime_app__$Event_$lime_$ui_$Gamepad_$Void;
lime_app__$Event_$lime_$ui_$Gamepad_$Void.__name__ = ["lime","app","_Event_lime_ui_Gamepad_Void"];
lime_app__$Event_$lime_$ui_$Gamepad_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$lime_$ui_$Gamepad_$Void
};
var lime_app__$Event_$lime_$ui_$Joystick_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_lime_ui_Joystick_Void"] = lime_app__$Event_$lime_$ui_$Joystick_$Void;
lime_app__$Event_$lime_$ui_$Joystick_$Void.__name__ = ["lime","app","_Event_lime_ui_Joystick_Void"];
lime_app__$Event_$lime_$ui_$Joystick_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$lime_$ui_$Joystick_$Void
};
var lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"] = lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void;
lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void.__name__ = ["lime","app","_Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"];
lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a,a1) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a,a1);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void
};
var lime_app__$Event_$lime_$ui_$Touch_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_lime_ui_Touch_Void"] = lime_app__$Event_$lime_$ui_$Touch_$Void;
lime_app__$Event_$lime_$ui_$Touch_$Void.__name__ = ["lime","app","_Event_lime_ui_Touch_Void"];
lime_app__$Event_$lime_$ui_$Touch_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$lime_$ui_$Touch_$Void
};
var lime_app__$Event_$ofEvents_$T_$Void = function() {
this.canceled = false;
this.__listeners = [];
this.__priorities = [];
this.__repeat = [];
};
$hxClasses["lime.app._Event_ofEvents_T_Void"] = lime_app__$Event_$ofEvents_$T_$Void;
lime_app__$Event_$ofEvents_$T_$Void.__name__ = ["lime","app","_Event_ofEvents_T_Void"];
lime_app__$Event_$ofEvents_$T_$Void.prototype = {
canceled: null
,__repeat: null
,__priorities: null
,add: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
var _g1 = 0;
var _g = this.__priorities.length;
while(_g1 < _g) {
var i = _g1++;
if(priority > this.__priorities[i]) {
this.__listeners.splice(i,0,listener);
this.__priorities.splice(i,0,priority);
this.__repeat.splice(i,0,!once);
return;
}
}
this.__listeners.push(listener);
this.__priorities.push(priority);
this.__repeat.push(!once);
}
,cancel: function() {
this.canceled = true;
}
,has: function(listener) {
var _g = 0;
var _g1 = this.__listeners;
while(_g < _g1.length) {
var l = _g1[_g];
++_g;
if(Reflect.compareMethods(l,listener)) return true;
}
return false;
}
,remove: function(listener) {
var i = this.__listeners.length;
while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
this.__listeners.splice(i,1);
this.__priorities.splice(i,1);
this.__repeat.splice(i,1);
}
}
,__listeners: null
,dispatch: function(a) {
this.canceled = false;
var listeners = this.__listeners;
var repeat = this.__repeat;
var i = 0;
while(i < listeners.length) {
listeners[i](a);
if(!repeat[i]) this.remove(listeners[i]); else i++;
if(this.canceled) break;
}
}
,__class__: lime_app__$Event_$ofEvents_$T_$Void
};
var lime_graphics_ConsoleRenderContext = function() {
};
$hxClasses["lime.graphics.ConsoleRenderContext"] = lime_graphics_ConsoleRenderContext;
lime_graphics_ConsoleRenderContext.__name__ = ["lime","graphics","ConsoleRenderContext"];
lime_graphics_ConsoleRenderContext.prototype = {
createIndexBuffer: function(indices,count) {
return new lime_graphics_console_IndexBuffer();
}
,createVertexBuffer: function(decl,count) {
return new lime_graphics_console_VertexBuffer();
}
,lookupShader: function(name) {
return new lime_graphics_console_Shader();
}
,clear: function(r,g,b,a,depth,stencil) {
if(stencil == null) stencil = 0;
if(depth == null) depth = 1.0;
}
,bindShader: function(shader) {
}
,setViewport: function(x,y,width,height,nearPlane,farPlane) {
if(farPlane == null) farPlane = 1.0;
if(nearPlane == null) nearPlane = 0.0;
}
,setVertexShaderConstantF: function(startRegister,vec4,vec4count) {
}
,setVertexSource: function(vb) {
}
,setIndexSource: function(ib) {
}
,draw: function(primitive,startVertex,primitiveCount) {
}
,drawIndexed: function(primitive,vertexCount,startIndex,primitiveCount) {
}
,get_width: function() {
return 0;
}
,get_height: function() {
return 0;
}
,__class__: lime_graphics_ConsoleRenderContext
,__properties__: {get_height:"get_height",get_width:"get_width"}
};
var lime_graphics_FlashRenderContext = function() {
};
$hxClasses["lime.graphics.FlashRenderContext"] = lime_graphics_FlashRenderContext;
lime_graphics_FlashRenderContext.__name__ = ["lime","graphics","FlashRenderContext"];
lime_graphics_FlashRenderContext.prototype = {
accessibilityImplementation: null
,accessibilityProperties: null
,alpha: null
,blendMode: null
,blendShader: null
,buttonMode: null
,cacheAsBitmap: null
,contextMenu: null
,doubleClickEnabled: null
,dropTarget: null
,filters: null
,focusRect: null
,graphics: null
,height: null
,hitArea: null
,loaderInfo: null
,mask: null
,mouseChildren: null
,mouseEnabled: null
,mouseX: null
,mouseY: null
,name: null
,needsSoftKeyboard: null
,numChildren: null
,opaqueBackground: null
,parent: null
,root: null
,rotation: null
,rotationX: null
,rotationY: null
,rotationZ: null
,scale9Grid: null
,scaleX: null
,scaleY: null
,scaleZ: null
,scrollRect: null
,softKeyboardInputAreaOfInterest: null
,soundTransform: null
,stage: null
,tabChildren: null
,tabEnabled: null
,tabIndex: null
,textSnapshot: null
,transform: null
,useHandCursor: null
,visible: null
,width: null
,x: null
,y: null
,z: null
,addChild: function(child) {
return null;
}
,addChildAt: function(child,index) {
return null;
}
,addEventListener: function(type,listener,useCapture,priority,useWeakReference) {
if(useWeakReference == null) useWeakReference = false;
if(priority == null) priority = 0;
if(useCapture == null) useCapture = false;
}
,areInaccessibleObjectsUnderPoint: function(point) {
return false;
}
,contains: function(child) {
return false;
}
,dispatchEvent: function(event) {
return false;
}
,getBounds: function(targetCoordinateSpace) {
return null;
}
,getChildAt: function(index) {
return null;
}
,getChildByName: function(name) {
return null;
}
,getChildIndex: function(child) {
return 0;
}
,getObjectsUnderPoint: function(point) {
return null;
}
,getRect: function(targetCoordinateSpace) {
return null;
}
,globalToLocal: function(point) {
return null;
}
,globalToLocal3D: function(point) {
return null;
}
,hasEventListener: function(type) {
return false;
}
,hitTestObject: function(obj) {
return false;
}
,hitTestPoint: function(x,y,shapeFlag) {
if(shapeFlag == null) shapeFlag = false;
return false;
}
,local3DToGlobal: function(point3d) {
return null;
}
,localToGlobal: function(point) {
return null;
}
,removeChild: function(child) {
return null;
}
,removeChildAt: function(index) {
return null;
}
,removeChildren: function(beginIndex,endIndex) {
if(endIndex == null) endIndex = 2147483647;
if(beginIndex == null) beginIndex = 0;
}
,removeEventListener: function(type,listener,useCapture) {
if(useCapture == null) useCapture = false;
}
,requestSoftKeyboard: function() {
return false;
}
,setChildIndex: function(child,index) {
}
,startDrag: function(lockCenter,bounds) {
if(lockCenter == null) lockCenter = false;
}
,startTouchDrag: function(touchPointID,lockCenter,bounds) {
if(lockCenter == null) lockCenter = false;
}
,stopAllMovieClips: function() {
}
,stopDrag: function() {
}
,stopTouchDrag: function(touchPointID) {
}
,swapChildren: function(child1,child2) {
}
,swapChildrenAt: function(index1,index2) {
}
,toString: function() {
return null;
}
,willTrigger: function(type) {
return false;
}
,__class__: lime_graphics_FlashRenderContext
};
var lime_graphics_Image = function(buffer,offsetX,offsetY,width,height,color,type) {
if(height == null) height = -1;
if(width == null) width = -1;
if(offsetY == null) offsetY = 0;
if(offsetX == null) offsetX = 0;
this.offsetX = offsetX;
this.offsetY = offsetY;
this.width = width;
this.height = height;
this.version = 0;
if(type == null) {
if(lime_app_Application.current != null && lime_app_Application.current.__renderers[0] != null) {
var _g = lime_app_Application.current.__renderers[0].context;
switch(_g[1]) {
case 2:case 1:
this.type = lime_graphics_ImageType.CANVAS;
break;
case 3:
this.type = lime_graphics_ImageType.FLASH;
break;
default:
this.type = lime_graphics_ImageType.DATA;
}
} else this.type = lime_graphics_ImageType.DATA;
} else this.type = type;
if(buffer == null) {
if(width > 0 && height > 0) {
var _g1 = this.type;
switch(_g1[1]) {
case 0:
this.buffer = new lime_graphics_ImageBuffer(null,width,height);
lime_graphics_utils_ImageCanvasUtil.createCanvas(this,width,height);
if(color != null) this.fillRect(new lime_math_Rectangle(0,0,width,height),color);
break;
case 1:
this.buffer = new lime_graphics_ImageBuffer((function($this) {
var $r;
var elements = width * height * 4;
var this1;
if(elements != null) this1 = new Uint8Array(elements); else this1 = null;
$r = this1;
return $r;
}(this)),width,height);
if(color != null) this.fillRect(new lime_math_Rectangle(0,0,width,height),color);
break;
case 2:
break;
default:
}
}
} else this.__fromImageBuffer(buffer);
};
$hxClasses["lime.graphics.Image"] = lime_graphics_Image;
lime_graphics_Image.__name__ = ["lime","graphics","Image"];
lime_graphics_Image.fromBase64 = function(base64,type) {
if(base64 == null) return null;
var image = new lime_graphics_Image();
image.__fromBase64(base64,type);
return image;
};
lime_graphics_Image.fromBitmapData = function(bitmapData) {
if(bitmapData == null) return null;
return bitmapData.image;
};
lime_graphics_Image.fromBytes = function(bytes) {
if(bytes == null) return null;
var image = new lime_graphics_Image();
image.__fromBytes(bytes);
return image;
};
lime_graphics_Image.fromCanvas = function(canvas) {
if(canvas == null) return null;
var buffer = new lime_graphics_ImageBuffer(null,canvas.width,canvas.height);
buffer.set_src(canvas);
var image = new lime_graphics_Image(buffer);
image.type = lime_graphics_ImageType.CANVAS;
return image;
};
lime_graphics_Image.fromFile = function(path) {
if(path == null) return null;
var image = new lime_graphics_Image();
image.__fromFile(path);
return image;
};
lime_graphics_Image.fromImageElement = function(image) {
if(image == null) return null;
var buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
buffer.set_src(image);
var _image = new lime_graphics_Image(buffer);
_image.type = lime_graphics_ImageType.CANVAS;
return _image;
};
lime_graphics_Image.loadFromBase64 = function(base64,type) {
if(base64 == null || type == null) return lime_app_Future.withValue(null);
return lime__$backend_html5_HTML5HTTPRequest.loadImage("data:" + type + ";base64," + base64);
};
lime_graphics_Image.loadFromBytes = function(bytes) {
if(bytes == null) return lime_app_Future.withValue(null);
var type = "";
if(lime_graphics_Image.__isPNG(bytes)) type = "image/png"; else if(lime_graphics_Image.__isJPG(bytes)) type = "image/jpeg"; else if(lime_graphics_Image.__isGIF(bytes)) type = "image/gif"; else if(lime_graphics_Image.__isWebP(bytes)) type = "image/webp"; else return lime_app_Future.withValue(null);
return lime_graphics_Image.loadFromBase64(lime_graphics_Image.__base64Encode(bytes),type);
};
lime_graphics_Image.loadFromFile = function(path) {
if(path == null) return lime_app_Future.withValue(null);
return lime__$backend_html5_HTML5HTTPRequest.loadImage(path);
};
lime_graphics_Image.__base64Encode = function(bytes) {
var extension;
var _g = bytes.length % 3;
switch(_g) {
case 1:
extension = "==";
break;
case 2:
extension = "=";
break;
default:
extension = "";
}
if(lime_graphics_Image.__base64Encoder == null) lime_graphics_Image.__base64Encoder = new haxe_crypto_BaseCode(haxe_io_Bytes.ofString(lime_graphics_Image.__base64Chars));
return lime_graphics_Image.__base64Encoder.encodeBytes(bytes).toString() + extension;
};
lime_graphics_Image.__isGIF = function(bytes) {
if(bytes == null || bytes.length < 6) return false;
var header = bytes.getString(0,6);
return header == "GIF87a" || header == "GIF89a";
};
lime_graphics_Image.__isJPG = function(bytes) {
if(bytes == null || bytes.length < 4) return false;
return bytes.b[0] == 255 && bytes.b[1] == 216 && bytes.b[bytes.length - 2] == 255 && bytes.b[bytes.length - 1] == 217;
};
lime_graphics_Image.__isPNG = function(bytes) {
if(bytes == null || bytes.length < 8) return false;
return bytes.b[0] == 137 && bytes.b[1] == 80 && bytes.b[2] == 78 && bytes.b[3] == 71 && bytes.b[4] == 13 && bytes.b[5] == 10 && bytes.b[6] == 26 && bytes.b[7] == 10;
};
lime_graphics_Image.__isWebP = function(bytes) {
if(bytes == null || bytes.length < 16) return false;
return bytes.getString(0,4) == "RIFF" && bytes.getString(8,4) == "WEBP";
};
lime_graphics_Image.prototype = {
buffer: null
,dirty: null
,height: null
,offsetX: null
,offsetY: null
,rect: null
,type: null
,version: null
,width: null
,x: null
,y: null
,clone: function() {
if(this.buffer != null) {
if(this.type == lime_graphics_ImageType.CANVAS) lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this); else lime_graphics_utils_ImageCanvasUtil.convertToData(this);
var image = new lime_graphics_Image(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);
image.version = this.version;
return image;
} else return new lime_graphics_Image(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type);
}
,colorTransform: function(rect,colorMatrix) {
rect = this.__clipRect(rect);
if(this.buffer == null || rect == null) return;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.colorTransform(this,rect,colorMatrix);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageDataUtil.colorTransform(this,rect,colorMatrix);
break;
case 2:
rect.offset(this.offsetX,this.offsetY);
this.buffer.__srcBitmapData.colorTransform(rect.__toFlashRectangle(),lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform(colorMatrix));
break;
default:
}
}
,copyChannel: function(sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
sourceRect = this.__clipRect(sourceRect);
if(this.buffer == null || sourceRect == null) return;
if(destChannel == lime_graphics_ImageChannel.ALPHA && !this.get_transparent()) return;
if(sourceRect.width <= 0 || sourceRect.height <= 0) return;
if(sourceRect.x + sourceRect.width > sourceImage.width) sourceRect.width = sourceImage.width - sourceRect.x;
if(sourceRect.y + sourceRect.height > sourceImage.height) sourceRect.height = sourceImage.height - sourceRect.y;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.copyChannel(this,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
lime_graphics_utils_ImageDataUtil.copyChannel(this,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
break;
case 2:
var srcChannel;
switch(sourceChannel[1]) {
case 0:
srcChannel = 1;
break;
case 1:
srcChannel = 2;
break;
case 2:
srcChannel = 4;
break;
case 3:
srcChannel = 8;
break;
}
var dstChannel;
switch(destChannel[1]) {
case 0:
dstChannel = 1;
break;
case 1:
dstChannel = 2;
break;
case 2:
dstChannel = 4;
break;
case 3:
dstChannel = 8;
break;
}
sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
destPoint.offset(this.offsetX,this.offsetY);
this.buffer.__srcBitmapData.copyChannel(sourceImage.buffer.get_src(),sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),srcChannel,dstChannel);
break;
default:
}
}
,copyPixels: function(sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
if(mergeAlpha == null) mergeAlpha = false;
if(this.buffer == null || sourceImage == null) return;
if(sourceRect.width <= 0 || sourceRect.height <= 0) return;
if(this.width <= 0 || this.height <= 0) return;
if(sourceRect.x + sourceRect.width > sourceImage.width) sourceRect.width = sourceImage.width - sourceRect.x;
if(sourceRect.y + sourceRect.height > sourceImage.height) sourceRect.height = sourceImage.height - sourceRect.y;
if(sourceRect.x < 0) {
sourceRect.width += sourceRect.x;
sourceRect.x = 0;
}
if(sourceRect.y < 0) {
sourceRect.height += sourceRect.y;
sourceRect.y = 0;
}
if(destPoint.x + sourceRect.width > this.width) sourceRect.width = this.width - destPoint.x;
if(destPoint.y + sourceRect.height > this.height) sourceRect.height = this.height - destPoint.y;
if(destPoint.x < 0) {
sourceRect.width += destPoint.x;
sourceRect.x -= destPoint.x;
destPoint.x = 0;
}
if(destPoint.y < 0) {
sourceRect.height += destPoint.y;
sourceRect.y -= destPoint.y;
destPoint.y = 0;
}
if(sourceImage == this) sourceImage = this.clone();
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
lime_graphics_utils_ImageCanvasUtil.copyPixels(this,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
lime_graphics_utils_ImageDataUtil.copyPixels(this,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha);
break;
case 2:
sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
destPoint.offset(this.offsetX,this.offsetY);
if(alphaImage != null && alphaPoint != null) alphaPoint.offset(alphaImage.offsetX,alphaImage.offsetY);
this.buffer.__srcBitmapData.copyPixels(sourceImage.buffer.__srcBitmapData,sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),alphaImage != null?alphaImage.buffer.get_src():null,alphaPoint != null?alphaPoint.__toFlashPoint():null,mergeAlpha);
break;
default:
}
}
,encode: function(format,quality) {
if(quality == null) quality = 90;
if(format == null) format = "png";
switch(format) {
case "png":
return lime_graphics_format_PNG.encode(this);
case "jpg":case "jpeg":
return lime_graphics_format_JPEG.encode(this,quality);
case "bmp":
return lime_graphics_format_BMP.encode(this);
default:
}
return null;
}
,fillRect: function(rect,color,format) {
rect = this.__clipRect(rect);
if(this.buffer == null || rect == null) return;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.fillRect(this,rect,color,format);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
if(this.buffer.data.length == 0) return;
lime_graphics_utils_ImageDataUtil.fillRect(this,rect,color,format);
break;
case 2:
rect.offset(this.offsetX,this.offsetY);
var argb;
if(format != null) switch(format) {
case 1:
argb = color;
break;
case 2:
{
var bgra = color;
var argb1 = 0;
argb1 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
argb = argb1;
}
break;
default:
{
var rgba = color;
var argb2 = 0;
argb2 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
argb = argb2;
}
} else {
var rgba1 = color;
var argb3 = 0;
argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
argb = argb3;
}
this.buffer.__srcBitmapData.fillRect(rect.__toFlashRectangle(),argb);
break;
default:
}
}
,floodFill: function(x,y,color,format) {
if(this.buffer == null) return;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.floodFill(this,x,y,color,format);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageDataUtil.floodFill(this,x,y,color,format);
break;
case 2:
var argb;
if(format != null) switch(format) {
case 1:
argb = color;
break;
case 2:
{
var bgra = color;
var argb1 = 0;
argb1 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
argb = argb1;
}
break;
default:
{
var rgba = color;
var argb2 = 0;
argb2 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
argb = argb2;
}
} else {
var rgba1 = color;
var argb3 = 0;
argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
argb = argb3;
}
this.buffer.__srcBitmapData.floodFill(x + this.offsetX,y + this.offsetY,argb);
break;
default:
}
}
,getColorBoundsRect: function(mask,color,findColor,format) {
if(findColor == null) findColor = true;
if(this.buffer == null) return null;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
return lime_graphics_utils_ImageDataUtil.getColorBoundsRect(this,mask,color,findColor,format);
case 1:
return lime_graphics_utils_ImageDataUtil.getColorBoundsRect(this,mask,color,findColor,format);
case 2:
var rect = this.buffer.__srcBitmapData.getColorBoundsRect(mask,color,findColor);
return new lime_math_Rectangle(rect.x,rect.y,rect.width,rect.height);
default:
return null;
}
}
,getPixel: function(x,y,format) {
if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) return 0;
var _g = this.type;
switch(_g[1]) {
case 0:
return lime_graphics_utils_ImageCanvasUtil.getPixel(this,x,y,format);
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
return lime_graphics_utils_ImageDataUtil.getPixel(this,x,y,format);
case 2:
var color = this.buffer.__srcBitmapData.getPixel(x + this.offsetX,y + this.offsetY);
if(format != null) switch(format) {
case 1:
return color;
case 2:
var bgra;
{
var bgra1 = 0;
bgra1 = (color & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color >> 16 & 255 & 255) << 8 | color >> 24 & 255 & 255;
bgra = bgra1;
}
return bgra;
default:
var rgba;
{
var rgba1 = 0;
rgba1 = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
rgba = rgba1;
}
return rgba;
} else {
var rgba2;
{
var rgba3 = 0;
rgba3 = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
rgba2 = rgba3;
}
return rgba2;
}
break;
default:
return 0;
}
}
,getPixel32: function(x,y,format) {
if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) return 0;
var _g = this.type;
switch(_g[1]) {
case 0:
return lime_graphics_utils_ImageCanvasUtil.getPixel32(this,x,y,format);
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
return lime_graphics_utils_ImageDataUtil.getPixel32(this,x,y,format);
case 2:
var color = this.buffer.__srcBitmapData.getPixel32(x + this.offsetX,y + this.offsetY);
if(format != null) switch(format) {
case 1:
return color;
case 2:
var bgra;
{
var bgra1 = 0;
bgra1 = (color & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color >> 16 & 255 & 255) << 8 | color >> 24 & 255 & 255;
bgra = bgra1;
}
return bgra;
default:
var rgba;
{
var rgba1 = 0;
rgba1 = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
rgba = rgba1;
}
return rgba;
} else {
var rgba2;
{
var rgba3 = 0;
rgba3 = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
rgba2 = rgba3;
}
return rgba2;
}
break;
default:
return 0;
}
}
,getPixels: function(rect,format) {
if(this.buffer == null) return null;
var _g = this.type;
switch(_g[1]) {
case 0:
return lime_graphics_utils_ImageCanvasUtil.getPixels(this,rect,format);
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
return lime_graphics_utils_ImageDataUtil.getPixels(this,rect,format);
case 2:
return null;
default:
return null;
}
}
,merge: function(sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
if(this.buffer == null || sourceImage == null) return;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
lime_graphics_utils_ImageCanvasUtil.merge(this,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
lime_graphics_utils_ImageDataUtil.merge(this,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
break;
case 2:
sourceRect.offset(this.offsetX,this.offsetY);
this.buffer.__srcBitmapData.merge(sourceImage.buffer.__srcBitmapData,sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
break;
default:
return;
}
}
,resize: function(newWidth,newHeight) {
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.resize(this,newWidth,newHeight);
break;
case 1:
lime_graphics_utils_ImageDataUtil.resize(this,newWidth,newHeight);
break;
case 2:
break;
default:
}
this.buffer.width = newWidth;
this.buffer.height = newHeight;
this.offsetX = 0;
this.offsetY = 0;
this.width = newWidth;
this.height = newHeight;
}
,scroll: function(x,y) {
if(this.buffer == null) return;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.scroll(this,x,y);
break;
case 1:
this.copyPixels(this,this.get_rect(),new lime_math_Vector2(x,y));
break;
case 2:
this.buffer.__srcBitmapData.scroll(x + this.offsetX,y + this.offsetX);
break;
default:
}
}
,setPixel: function(x,y,color,format) {
if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) return;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.setPixel(this,x,y,color,format);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageDataUtil.setPixel(this,x,y,color,format);
break;
case 2:
var argb;
if(format != null) switch(format) {
case 1:
argb = color;
break;
case 2:
{
var bgra = color;
var argb1 = 0;
argb1 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
argb = argb1;
}
break;
default:
{
var rgba = color;
var argb2 = 0;
argb2 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
argb = argb2;
}
} else {
var rgba1 = color;
var argb3 = 0;
argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
argb = argb3;
}
this.buffer.__srcBitmapData.setPixel(x + this.offsetX,y + this.offsetX,argb);
break;
default:
}
}
,setPixel32: function(x,y,color,format) {
if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) return;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.setPixel32(this,x,y,color,format);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageDataUtil.setPixel32(this,x,y,color,format);
break;
case 2:
var argb;
if(format != null) switch(format) {
case 1:
argb = color;
break;
case 2:
{
var bgra = color;
var argb1 = 0;
argb1 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
argb = argb1;
}
break;
default:
{
var rgba = color;
var argb2 = 0;
argb2 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
argb = argb2;
}
} else {
var rgba1 = color;
var argb3 = 0;
argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
argb = argb3;
}
this.buffer.__srcBitmapData.setPixel32(x + this.offsetX,y + this.offsetY,argb);
break;
default:
}
}
,setPixels: function(rect,bytes,format) {
rect = this.__clipRect(rect);
if(this.buffer == null || rect == null) return;
var _g = this.type;
switch(_g[1]) {
case 0:
lime_graphics_utils_ImageCanvasUtil.setPixels(this,rect,bytes,format);
break;
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageDataUtil.setPixels(this,rect,bytes,format);
break;
case 2:
break;
default:
}
}
,threshold: function(sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format) {
if(copySource == null) copySource = false;
if(mask == null) mask = -1;
if(color == null) color = 0;
if(this.buffer == null || sourceImage == null || sourceRect == null) return 0;
var _g = this.type;
switch(_g[1]) {
case 0:case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
return lime_graphics_utils_ImageDataUtil.threshold(this,sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format);
case 2:
var _color;
if(format != null) switch(format) {
case 1:
_color = color;
break;
case 2:
{
var bgra = color;
var argb = 0;
argb = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
_color = argb;
}
break;
default:
{
var rgba = color;
var argb1 = 0;
argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
_color = argb1;
}
} else {
var rgba1 = color;
var argb2 = 0;
argb2 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
_color = argb2;
}
var _mask;
if(format != null) switch(format) {
case 1:
_mask = mask;
break;
case 2:
{
var bgra1 = mask;
var argb3 = 0;
argb3 = (bgra1 & 255 & 255) << 24 | (bgra1 >> 8 & 255 & 255) << 16 | (bgra1 >> 16 & 255 & 255) << 8 | bgra1 >> 24 & 255 & 255;
_mask = argb3;
}
break;
default:
{
var rgba2 = mask;
var argb4 = 0;
argb4 = (rgba2 & 255 & 255) << 24 | (rgba2 >> 24 & 255 & 255) << 16 | (rgba2 >> 16 & 255 & 255) << 8 | rgba2 >> 8 & 255 & 255;
_mask = argb4;
}
} else {
var rgba3 = mask;
var argb5 = 0;
argb5 = (rgba3 & 255 & 255) << 24 | (rgba3 >> 24 & 255 & 255) << 16 | (rgba3 >> 16 & 255 & 255) << 8 | rgba3 >> 8 & 255 & 255;
_mask = argb5;
}
sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
destPoint.offset(this.offsetX,this.offsetY);
return this.buffer.__srcBitmapData.threshold(sourceImage.buffer.get_src(),sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),operation,threshold,_color,_mask,copySource);
default:
}
return 0;
}
,__clipRect: function(r) {
if(r == null) return null;
if(r.x < 0) {
r.width -= -r.x;
r.x = 0;
if(r.x + r.width <= 0) return null;
}
if(r.y < 0) {
r.height -= -r.y;
r.y = 0;
if(r.y + r.height <= 0) return null;
}
if(r.x + r.width >= this.width) {
r.width -= r.x + r.width - this.width;
if(r.width <= 0) return null;
}
if(r.y + r.height >= this.height) {
r.height -= r.y + r.height - this.height;
if(r.height <= 0) return null;
}
return r;
}
,__fromBase64: function(base64,type,onload) {
var _g = this;
var image = new Image();
var image_onLoaded = function(event) {
_g.buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
_g.buffer.__srcImage = image;
_g.offsetX = 0;
_g.offsetY = 0;
_g.width = _g.buffer.width;
_g.height = _g.buffer.height;
if(onload != null) onload(_g);
};
image.addEventListener("load",image_onLoaded,false);
image.src = "data:" + type + ";base64," + base64;
}
,__fromBytes: function(bytes,onload) {
var type = "";
if(lime_graphics_Image.__isPNG(bytes)) type = "image/png"; else if(lime_graphics_Image.__isJPG(bytes)) type = "image/jpeg"; else if(lime_graphics_Image.__isGIF(bytes)) type = "image/gif"; else return;
this.__fromBase64(lime_graphics_Image.__base64Encode(bytes),type,onload);
}
,__fromFile: function(path,onload,onerror) {
var _g = this;
var image = new Image();
image.crossOrigin = "Anonymous";
image.onload = function(_) {
_g.buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
_g.buffer.__srcImage = image;
_g.width = image.width;
_g.height = image.height;
if(onload != null) onload(_g);
};
image.onerror = function(_1) {
if(onerror != null) onerror();
};
image.src = path;
if(image.complete) {
}
}
,__fromImageBuffer: function(buffer) {
this.buffer = buffer;
if(buffer != null) {
if(this.width == -1) this.width = buffer.width;
if(this.height == -1) this.height = buffer.height;
}
}
,get_data: function() {
if(this.buffer.data == null && this.buffer.width > 0 && this.buffer.height > 0) lime_graphics_utils_ImageCanvasUtil.convertToData(this);
return this.buffer.data;
}
,set_data: function(value) {
return this.buffer.data = value;
}
,get_format: function() {
return this.buffer.format;
}
,set_format: function(value) {
if(this.buffer.format != value) {
var _g = this.type;
switch(_g[1]) {
case 1:
lime_graphics_utils_ImageDataUtil.setFormat(this,value);
break;
default:
}
}
return this.buffer.format = value;
}
,get_powerOfTwo: function() {
return this.buffer.width != 0 && (this.buffer.width & ~this.buffer.width + 1) == this.buffer.width && (this.buffer.height != 0 && (this.buffer.height & ~this.buffer.height + 1) == this.buffer.height);
}
,set_powerOfTwo: function(value) {
if(value != this.get_powerOfTwo()) {
var newWidth = 1;
var newHeight = 1;
while(newWidth < this.buffer.width) newWidth <<= 1;
while(newHeight < this.buffer.height) newHeight <<= 1;
var _g = this.type;
switch(_g[1]) {
case 0:
break;
case 1:
lime_graphics_utils_ImageDataUtil.resizeBuffer(this,newWidth,newHeight);
break;
case 2:
break;
default:
}
}
return value;
}
,get_premultiplied: function() {
return this.buffer.premultiplied;
}
,set_premultiplied: function(value) {
if(value && !this.buffer.premultiplied) {
var _g = this.type;
switch(_g[1]) {
case 0:case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageDataUtil.multiplyAlpha(this);
break;
default:
}
} else if(!value && this.buffer.premultiplied) {
var _g1 = this.type;
switch(_g1[1]) {
case 1:
lime_graphics_utils_ImageCanvasUtil.convertToData(this);
lime_graphics_utils_ImageDataUtil.unmultiplyAlpha(this);
break;
default:
}
}
return value;
}
,get_rect: function() {
return new lime_math_Rectangle(0,0,this.width,this.height);
}
,get_src: function() {
if(this.buffer.__srcCanvas == null) lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
return this.buffer.get_src();
}
,set_src: function(value) {
return this.buffer.set_src(value);
}
,get_transparent: function() {
if(this.buffer == null) return false;
return this.buffer.transparent;
}
,set_transparent: function(value) {
if(this.buffer == null) return false;
return this.buffer.transparent = value;
}
,__class__: lime_graphics_Image
,__properties__: {set_transparent:"set_transparent",get_transparent:"get_transparent",set_src:"set_src",get_src:"get_src",get_rect:"get_rect",set_premultiplied:"set_premultiplied",get_premultiplied:"get_premultiplied",set_powerOfTwo:"set_powerOfTwo",get_powerOfTwo:"get_powerOfTwo",set_format:"set_format",get_format:"get_format",set_data:"set_data",get_data:"get_data"}
};
var lime_graphics_ImageBuffer = function(data,width,height,bitsPerPixel,format) {
if(bitsPerPixel == null) bitsPerPixel = 32;
if(height == null) height = 0;
if(width == null) width = 0;
this.data = data;
this.width = width;
this.height = height;
this.bitsPerPixel = bitsPerPixel;
if(format == null) this.format = 0; else this.format = format;
this.premultiplied = false;
this.transparent = true;
};
$hxClasses["lime.graphics.ImageBuffer"] = lime_graphics_ImageBuffer;
lime_graphics_ImageBuffer.__name__ = ["lime","graphics","ImageBuffer"];
lime_graphics_ImageBuffer.prototype = {
bitsPerPixel: null
,data: null
,format: null
,height: null
,premultiplied: null
,transparent: null
,width: null
,__srcBitmapData: null
,__srcCanvas: null
,__srcContext: null
,__srcCustom: null
,__srcImage: null
,__srcImageData: null
,clone: function() {
var buffer = new lime_graphics_ImageBuffer(this.data,this.width,this.height,this.bitsPerPixel);
if(this.data != null) {
var elements = this.data.byteLength;
var this1;
if(elements != null) this1 = new Uint8Array(elements); else this1 = null;
buffer.data = this1;
var copy;
var view = this.data;
var this2;
if(view != null) this2 = new Uint8Array(view); else this2 = null;
copy = this2;
buffer.data.set(copy);
} else if(this.__srcImageData != null) {
buffer.__srcCanvas = window.document.createElement("canvas");
buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
buffer.__srcCanvas.width = this.__srcImageData.width;
buffer.__srcCanvas.height = this.__srcImageData.height;
buffer.__srcImageData = buffer.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height);
var copy1 = new Uint8ClampedArray(this.__srcImageData.data);
buffer.__srcImageData.data.set(copy1);
} else if(this.__srcCanvas != null) {
buffer.__srcCanvas = window.document.createElement("canvas");
buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
buffer.__srcCanvas.width = this.__srcCanvas.width;
buffer.__srcCanvas.height = this.__srcCanvas.height;
buffer.__srcContext.drawImage(this.__srcCanvas,0,0);
} else buffer.__srcImage = this.__srcImage;
buffer.bitsPerPixel = this.bitsPerPixel;
buffer.format = this.format;
buffer.premultiplied = this.premultiplied;
buffer.transparent = this.transparent;
return buffer;
}
,get_src: function() {
if(this.__srcImage != null) return this.__srcImage;
return this.__srcCanvas;
}
,set_src: function(value) {
if(js_Boot.__instanceof(value,Image)) this.__srcImage = value; else if(js_Boot.__instanceof(value,HTMLCanvasElement)) {
this.__srcCanvas = value;
this.__srcContext = this.__srcCanvas.getContext("2d");
}
return value;
}
,get_stride: function() {
return this.width * 4;
}
,__class__: lime_graphics_ImageBuffer
,__properties__: {get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}
};
var lime_graphics_ImageChannel = $hxClasses["lime.graphics.ImageChannel"] = { __ename__ : ["lime","graphics","ImageChannel"], __constructs__ : ["RED","GREEN","BLUE","ALPHA"] };
lime_graphics_ImageChannel.RED = ["RED",0];
lime_graphics_ImageChannel.RED.toString = $estr;
lime_graphics_ImageChannel.RED.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.GREEN = ["GREEN",1];
lime_graphics_ImageChannel.GREEN.toString = $estr;
lime_graphics_ImageChannel.GREEN.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.BLUE = ["BLUE",2];
lime_graphics_ImageChannel.BLUE.toString = $estr;
lime_graphics_ImageChannel.BLUE.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.ALPHA = ["ALPHA",3];
lime_graphics_ImageChannel.ALPHA.toString = $estr;
lime_graphics_ImageChannel.ALPHA.__enum__ = lime_graphics_ImageChannel;
var lime_graphics_ImageType = $hxClasses["lime.graphics.ImageType"] = { __ename__ : ["lime","graphics","ImageType"], __constructs__ : ["CANVAS","DATA","FLASH","CUSTOM"] };
lime_graphics_ImageType.CANVAS = ["CANVAS",0];
lime_graphics_ImageType.CANVAS.toString = $estr;
lime_graphics_ImageType.CANVAS.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.DATA = ["DATA",1];
lime_graphics_ImageType.DATA.toString = $estr;
lime_graphics_ImageType.DATA.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.FLASH = ["FLASH",2];
lime_graphics_ImageType.FLASH.toString = $estr;
lime_graphics_ImageType.FLASH.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.CUSTOM = ["CUSTOM",3];
lime_graphics_ImageType.CUSTOM.toString = $estr;
lime_graphics_ImageType.CUSTOM.__enum__ = lime_graphics_ImageType;
var lime_graphics_RenderContext = $hxClasses["lime.graphics.RenderContext"] = { __ename__ : ["lime","graphics","RenderContext"], __constructs__ : ["OPENGL","CANVAS","DOM","FLASH","CAIRO","CONSOLE","CUSTOM","NONE"] };
lime_graphics_RenderContext.OPENGL = function(gl) { var $x = ["OPENGL",0,gl]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CANVAS = function(context) { var $x = ["CANVAS",1,context]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.DOM = function(element) { var $x = ["DOM",2,element]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.FLASH = function(stage) { var $x = ["FLASH",3,stage]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CAIRO = function(cairo) { var $x = ["CAIRO",4,cairo]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CONSOLE = function(context) { var $x = ["CONSOLE",5,context]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CUSTOM = function(data) { var $x = ["CUSTOM",6,data]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.NONE = ["NONE",7];
lime_graphics_RenderContext.NONE.toString = $estr;
lime_graphics_RenderContext.NONE.__enum__ = lime_graphics_RenderContext;
var lime_graphics_Renderer = function(window) {
this.onRender = new lime_app__$Event_$Void_$Void();
this.onContextRestored = new lime_app__$Event_$lime_$graphics_$RenderContext_$Void();
this.onContextLost = new lime_app__$Event_$Void_$Void();
this.window = window;
this.backend = new lime__$backend_html5_HTML5Renderer(this);
this.window.renderer = this;
};
$hxClasses["lime.graphics.Renderer"] = lime_graphics_Renderer;
lime_graphics_Renderer.__name__ = ["lime","graphics","Renderer"];
lime_graphics_Renderer.prototype = {
context: null
,onContextLost: null
,onContextRestored: null
,onRender: null
,type: null
,window: null
,backend: null
,create: function() {
this.backend.create();
}
,flip: function() {
this.backend.flip();
}
,readPixels: function(rect) {
return this.backend.readPixels(rect);
}
,render: function() {
this.backend.render();
}
,__class__: lime_graphics_Renderer
};
var lime_graphics_RendererType = $hxClasses["lime.graphics.RendererType"] = { __ename__ : ["lime","graphics","RendererType"], __constructs__ : ["OPENGL","CANVAS","DOM","FLASH","CAIRO","CONSOLE","CUSTOM"] };
lime_graphics_RendererType.OPENGL = ["OPENGL",0];
lime_graphics_RendererType.OPENGL.toString = $estr;
lime_graphics_RendererType.OPENGL.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CANVAS = ["CANVAS",1];
lime_graphics_RendererType.CANVAS.toString = $estr;
lime_graphics_RendererType.CANVAS.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.DOM = ["DOM",2];
lime_graphics_RendererType.DOM.toString = $estr;
lime_graphics_RendererType.DOM.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.FLASH = ["FLASH",3];
lime_graphics_RendererType.FLASH.toString = $estr;
lime_graphics_RendererType.FLASH.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CAIRO = ["CAIRO",4];
lime_graphics_RendererType.CAIRO.toString = $estr;
lime_graphics_RendererType.CAIRO.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CONSOLE = ["CONSOLE",5];
lime_graphics_RendererType.CONSOLE.toString = $estr;
lime_graphics_RendererType.CONSOLE.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CUSTOM = ["CUSTOM",6];
lime_graphics_RendererType.CUSTOM.toString = $estr;
lime_graphics_RendererType.CUSTOM.__enum__ = lime_graphics_RendererType;
var lime_graphics_cairo_Cairo = function(surface) {
if(surface != null) {
}
};
$hxClasses["lime.graphics.cairo.Cairo"] = lime_graphics_cairo_Cairo;
lime_graphics_cairo_Cairo.__name__ = ["lime","graphics","cairo","Cairo"];
lime_graphics_cairo_Cairo.__properties__ = {get_versionString:"get_versionString",get_version:"get_version"}
lime_graphics_cairo_Cairo.get_version = function() {
return 0;
};
lime_graphics_cairo_Cairo.get_versionString = function() {
return "";
};
lime_graphics_cairo_Cairo.prototype = {
target: null
,userData: null
,handle: null
,arc: function(xc,yc,radius,angle1,angle2) {
}
,arcNegative: function(xc,yc,radius,angle1,angle2) {
}
,clip: function() {
}
,clipExtents: function(x1,y1,x2,y2) {
}
,clipPreserve: function() {
}
,closePath: function() {
}
,copyPage: function() {
}
,curveTo: function(x1,y1,x2,y2,x3,y3) {
}
,fill: function() {
}
,fillExtents: function(x1,y1,x2,y2) {
}
,fillPreserve: function() {
}
,identityMatrix: function() {
}
,inClip: function(x,y) {
return false;
}
,inFill: function(x,y) {
return false;
}
,inStroke: function(x,y) {
return false;
}
,lineTo: function(x,y) {
}
,moveTo: function(x,y) {
}
,mask: function(pattern) {
}
,maskSurface: function(surface,x,y) {
}
,newPath: function() {
}
,paint: function() {
}
,paintWithAlpha: function(alpha) {
}
,popGroup: function() {
return null;
}
,popGroupToSource: function() {
}
,pushGroup: function() {
}
,pushGroupWithContent: function(content) {
}
,recreate: function(surface) {
}
,rectangle: function(x,y,width,height) {
}
,relCurveTo: function(dx1,dy1,dx2,dy2,dx3,dy3) {
}
,relLineTo: function(dx,dy) {
}
,relMoveTo: function(dx,dy) {
}
,resetClip: function() {
}
,restore: function() {
}
,save: function() {
}
,setFontSize: function(size) {
}
,setSourceRGB: function(r,g,b) {
}
,setSourceRGBA: function(r,g,b,a) {
}
,setSourceSurface: function(surface,x,y) {
}
,showGlyphs: function(glyphs) {
}
,showPage: function() {
}
,showText: function(utf8) {
}
,status: function() {
return 0;
}
,stroke: function() {
}
,strokeExtents: function(x1,y1,x2,y2) {
}
,strokePreserve: function() {
}
,textPath: function(utf8) {
}
,transform: function(matrix) {
}
,rotate: function(amount) {
}
,scale: function(x,y) {
}
,translate: function(x,y) {
}
,get_antialias: function() {
return 0;
}
,set_antialias: function(value) {
return value;
}
,get_currentPoint: function() {
return null;
}
,get_dash: function() {
return [];
}
,set_dash: function(value) {
return value;
}
,get_dashCount: function() {
return 0;
}
,get_fillRule: function() {
return 0;
}
,set_fillRule: function(value) {
return value;
}
,get_fontFace: function() {
return 0;
}
,set_fontFace: function(value) {
return value;
}
,get_fontOptions: function() {
return null;
}
,set_fontOptions: function(value) {
return value;
}
,get_groupTarget: function() {
return 0;
}
,get_hasCurrentPoint: function() {
return false;
}
,get_lineCap: function() {
return 0;
}
,set_lineCap: function(value) {
return value;
}
,get_lineJoin: function() {
return 0;
}
,set_lineJoin: function(value) {
return value;
}
,get_lineWidth: function() {
return 0;
}
,set_lineWidth: function(value) {
return value;
}
,get_matrix: function() {
return null;
}
,set_matrix: function(value) {
return value;
}
,get_miterLimit: function() {
return 0;
}
,set_miterLimit: function(value) {
return value;
}
,get_operator: function() {
return 0;
}
,set_operator: function(value) {
return value;
}
,get_source: function() {
return 0;
}
,set_source: function(value) {
return value;
}
,get_target: function() {
return 0;
}
,get_tolerance: function() {
return 0;
}
,set_tolerance: function(value) {
return value;
}
,__class__: lime_graphics_cairo_Cairo
,__properties__: {set_tolerance:"set_tolerance",get_tolerance:"get_tolerance",get_target:"get_target",set_source:"set_source",get_source:"get_source",set_operator:"set_operator",get_operator:"get_operator",set_miterLimit:"set_miterLimit",get_miterLimit:"get_miterLimit",set_matrix:"set_matrix",get_matrix:"get_matrix",set_lineWidth:"set_lineWidth",get_lineWidth:"get_lineWidth",set_lineJoin:"set_lineJoin",get_lineJoin:"get_lineJoin",set_lineCap:"set_lineCap",get_lineCap:"get_lineCap",get_hasCurrentPoint:"get_hasCurrentPoint",get_groupTarget:"get_groupTarget",set_fontOptions:"set_fontOptions",get_fontOptions:"get_fontOptions",set_fontFace:"set_fontFace",get_fontFace:"get_fontFace",set_fillRule:"set_fillRule",get_fillRule:"get_fillRule",get_dashCount:"get_dashCount",set_dash:"set_dash",get_dash:"get_dash",get_currentPoint:"get_currentPoint",set_antialias:"set_antialias",get_antialias:"get_antialias"}
};
var lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFTFontFace.CairoFTFontFace_Impl_"] = lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$;
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFTFontFace","CairoFTFontFace_Impl_"];
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$._new = function() {
return 0;
};
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.create = function(face,loadFlags) {
return 0;
};
var lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFontFace.CairoFontFace_Impl_"] = lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$;
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFontFace","CairoFontFace_Impl_"];
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$._new = function() {
return null;
};
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$.status = function(this1) {
return 0;
};
var lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFontOptions.CairoFontOptions_Impl_"] = lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$;
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFontOptions","CairoFontOptions_Impl_"];
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.__properties__ = {set_subpixelOrder:"set_subpixelOrder",get_subpixelOrder:"get_subpixelOrder",set_hintStyle:"set_hintStyle",get_hintStyle:"get_hintStyle",set_hintMetrics:"set_hintMetrics",get_hintMetrics:"get_hintMetrics",set_antialias:"set_antialias",get_antialias:"get_antialias"}
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$._new = function() {
return null;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_antialias = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_antialias = function(this1,value) {
return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_hintMetrics = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_hintMetrics = function(this1,value) {
return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_hintStyle = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_hintStyle = function(this1,value) {
return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_subpixelOrder = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_subpixelOrder = function(this1,value) {
return value;
};
var lime_graphics_cairo_CairoGlyph = function(index,x,y) {
if(y == null) y = 0;
if(x == null) x = 0;
this.index = index;
this.x = x;
this.y = y;
};
$hxClasses["lime.graphics.cairo.CairoGlyph"] = lime_graphics_cairo_CairoGlyph;
lime_graphics_cairo_CairoGlyph.__name__ = ["lime","graphics","cairo","CairoGlyph"];
lime_graphics_cairo_CairoGlyph.prototype = {
index: null
,x: null
,y: null
,__class__: lime_graphics_cairo_CairoGlyph
};
var lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoImageSurface.CairoImageSurface_Impl_"] = lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$;
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoImageSurface","CairoImageSurface_Impl_"];
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.__properties__ = {get_width:"get_width",get_stride:"get_stride",get_height:"get_height",get_format:"get_format",get_data:"get_data"}
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$._new = function(format,width,height) {
return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.create = function(data,format,width,height,stride) {
return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.fromImage = function(image) {
return null;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_data = function(this1) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0);
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_format = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_height = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_stride = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_width = function(this1) {
return 0;
};
var lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoPattern.CairoPattern_Impl_"] = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$;
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoPattern","CairoPattern_Impl_"];
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.__properties__ = {set_matrix:"set_matrix",get_matrix:"get_matrix",set_filter:"set_filter",get_filter:"get_filter",set_extend:"set_extend",get_extend:"get_extend",get_colorStopCount:"get_colorStopCount"}
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$._new = function(handle) {
return handle;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.addColorStopRGB = function(this1,offset,r,g,b) {
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.addColorStopRGBA = function(this1,offset,r,g,b,a) {
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface = function(surface) {
return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createLinear = function(x0,y0,x1,y1) {
return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRadial = function(cx0,cy0,radius0,cx1,cy1,radius1) {
return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGB = function(r,g,b) {
return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA = function(r,g,b,a) {
return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_colorStopCount = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_extend = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_extend = function(this1,value) {
return value;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_filter = function(this1) {
return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter = function(this1,value) {
return value;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_matrix = function(this1) {
return null;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_matrix = function(this1,value) {
return value;
};
var lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoSurface.CairoSurface_Impl_"] = lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$;
lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoSurface","CairoSurface_Impl_"];
lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush = function(this1) {
};
var lime_graphics_console_IndexBuffer = function() {
};
$hxClasses["lime.graphics.console.IndexBuffer"] = lime_graphics_console_IndexBuffer;
lime_graphics_console_IndexBuffer.__name__ = ["lime","graphics","console","IndexBuffer"];
lime_graphics_console_IndexBuffer.prototype = {
__class__: lime_graphics_console_IndexBuffer
};
var lime_graphics_console_Primitive = $hxClasses["lime.graphics.console.Primitive"] = { __ename__ : ["lime","graphics","console","Primitive"], __constructs__ : ["Point","Line","LineStrip","Triangle","TriangleStrip"] };
lime_graphics_console_Primitive.Point = ["Point",0];
lime_graphics_console_Primitive.Point.toString = $estr;
lime_graphics_console_Primitive.Point.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.Line = ["Line",1];
lime_graphics_console_Primitive.Line.toString = $estr;
lime_graphics_console_Primitive.Line.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.LineStrip = ["LineStrip",2];
lime_graphics_console_Primitive.LineStrip.toString = $estr;
lime_graphics_console_Primitive.LineStrip.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.Triangle = ["Triangle",3];
lime_graphics_console_Primitive.Triangle.toString = $estr;
lime_graphics_console_Primitive.Triangle.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.TriangleStrip = ["TriangleStrip",4];
lime_graphics_console_Primitive.TriangleStrip.toString = $estr;
lime_graphics_console_Primitive.TriangleStrip.__enum__ = lime_graphics_console_Primitive;
var lime_graphics_console_Shader = function() {
};
$hxClasses["lime.graphics.console.Shader"] = lime_graphics_console_Shader;
lime_graphics_console_Shader.__name__ = ["lime","graphics","console","Shader"];
lime_graphics_console_Shader.prototype = {
__class__: lime_graphics_console_Shader
};
var lime_graphics_console_VertexBuffer = function() {
};
$hxClasses["lime.graphics.console.VertexBuffer"] = lime_graphics_console_VertexBuffer;
lime_graphics_console_VertexBuffer.__name__ = ["lime","graphics","console","VertexBuffer"];
lime_graphics_console_VertexBuffer.prototype = {
lock: function() {
return new lime_graphics_console_VertexOutput();
}
,unlock: function() {
}
,__class__: lime_graphics_console_VertexBuffer
};
var lime_graphics_console_VertexOutput = function() {
};
$hxClasses["lime.graphics.console.VertexOutput"] = lime_graphics_console_VertexOutput;
lime_graphics_console_VertexOutput.__name__ = ["lime","graphics","console","VertexOutput"];
lime_graphics_console_VertexOutput.prototype = {
vec2: function(x,y) {
}
,vec3: function(x,y,z) {
}
,color: function(r,g,b,a) {
}
,__class__: lime_graphics_console_VertexOutput
};
var lime_graphics_format_BMP = function() { };
$hxClasses["lime.graphics.format.BMP"] = lime_graphics_format_BMP;
lime_graphics_format_BMP.__name__ = ["lime","graphics","format","BMP"];
lime_graphics_format_BMP.encode = function(image,type) {
if(image.get_premultiplied() || image.get_format() != 0) {
image = image.clone();
image.set_premultiplied(false);
image.set_format(0);
}
if(type == null) type = lime_graphics_format_BMPType.RGB;
var fileHeaderLength = 14;
var infoHeaderLength = 40;
var pixelValuesLength = image.width * image.height * 4;
if(type != null) switch(type[1]) {
case 1:
infoHeaderLength = 108;
break;
case 2:
fileHeaderLength = 0;
pixelValuesLength += image.width * image.height;
break;
case 0:
pixelValuesLength = image.width * 3 + image.width * 3 % 4 + image.height * 3 + image.height * 3;
break;
default:
} else {
}
var data = new haxe_io_Bytes(new ArrayBuffer(fileHeaderLength + infoHeaderLength + pixelValuesLength));
var position = 0;
if(fileHeaderLength > 0) {
data.set(position++,66);
data.set(position++,77);
data.setInt32(position,data.length);
position += 4;
data.setUInt16(position,0);
position += 2;
data.setUInt16(position,0);
position += 2;
data.setInt32(position,fileHeaderLength + infoHeaderLength);
position += 4;
}
data.setInt32(position,infoHeaderLength);
position += 4;
data.setInt32(position,image.width);
position += 4;
data.setInt32(position,type == lime_graphics_format_BMPType.ICO?image.height * 2:image.height);
position += 4;
data.setUInt16(position,1);
position += 2;
data.setUInt16(position,type == lime_graphics_format_BMPType.RGB?24:32);
position += 2;
data.setInt32(position,type == lime_graphics_format_BMPType.BITFIELD?3:0);
position += 4;
data.setInt32(position,pixelValuesLength);
position += 4;
data.setInt32(position,11824);
position += 4;
data.setInt32(position,11824);
position += 4;
data.setInt32(position,0);
position += 4;
data.setInt32(position,0);
position += 4;
if(type == lime_graphics_format_BMPType.BITFIELD) {
data.setInt32(position,16711680);
position += 4;
data.setInt32(position,65280);
position += 4;
data.setInt32(position,255);
position += 4;
data.setInt32(position,-16777216);
position += 4;
data.set(position++,32);
data.set(position++,110);
data.set(position++,105);
data.set(position++,87);
var _g = 0;
while(_g < 48) {
var i = _g++;
data.set(position++,0);
}
}
var pixels = image.getPixels(new lime_math_Rectangle(0,0,image.width,image.height),1);
var readPosition = 0;
var a;
var r;
var g;
var b;
if(type != null) switch(type[1]) {
case 1:
var _g1 = 0;
var _g2 = image.height;
while(_g1 < _g2) {
var y = _g1++;
readPosition = (image.height - 1 - y) * 4 * image.width;
var _g3 = 0;
var _g21 = image.width;
while(_g3 < _g21) {
var x = _g3++;
a = pixels.get(readPosition++);
r = pixels.get(readPosition++);
g = pixels.get(readPosition++);
b = pixels.get(readPosition++);
data.set(position++,b);
data.set(position++,g);
data.set(position++,r);
data.set(position++,a);
}
}
break;
case 2:
var andMask = new haxe_io_Bytes(new ArrayBuffer(image.width * image.height));
var maskPosition = 0;
var _g11 = 0;
var _g4 = image.height;
while(_g11 < _g4) {
var y1 = _g11++;
readPosition = (image.height - 1 - y1) * 4 * image.width;
var _g31 = 0;
var _g22 = image.width;
while(_g31 < _g22) {
var x1 = _g31++;
a = pixels.get(readPosition++);
r = pixels.get(readPosition++);
g = pixels.get(readPosition++);
b = pixels.get(readPosition++);
data.set(position++,b);
data.set(position++,g);
data.set(position++,r);
data.set(position++,a);
andMask.set(maskPosition++,0);
}
}
data.blit(position,andMask,0,image.width * image.height);
break;
case 0:
var _g12 = 0;
var _g5 = image.height;
while(_g12 < _g5) {
var y2 = _g12++;
readPosition = (image.height - 1 - y2) * 4 * image.width;
var _g32 = 0;
var _g23 = image.width;
while(_g32 < _g23) {
var x2 = _g32++;
a = pixels.get(readPosition++);
r = pixels.get(readPosition++);
g = pixels.get(readPosition++);
b = pixels.get(readPosition++);
data.set(position++,b);
data.set(position++,g);
data.set(position++,r);
}
var _g33 = 0;
var _g24 = image.width * 3 % 4;
while(_g33 < _g24) {
var i1 = _g33++;
data.set(position++,0);
}
}
break;
default:
} else {
}
return data;
};
var lime_graphics_format_BMPType = $hxClasses["lime.graphics.format.BMPType"] = { __ename__ : ["lime","graphics","format","BMPType"], __constructs__ : ["RGB","BITFIELD","ICO"] };
lime_graphics_format_BMPType.RGB = ["RGB",0];
lime_graphics_format_BMPType.RGB.toString = $estr;
lime_graphics_format_BMPType.RGB.__enum__ = lime_graphics_format_BMPType;
lime_graphics_format_BMPType.BITFIELD = ["BITFIELD",1];
lime_graphics_format_BMPType.BITFIELD.toString = $estr;
lime_graphics_format_BMPType.BITFIELD.__enum__ = lime_graphics_format_BMPType;
lime_graphics_format_BMPType.ICO = ["ICO",2];
lime_graphics_format_BMPType.ICO.toString = $estr;
lime_graphics_format_BMPType.ICO.__enum__ = lime_graphics_format_BMPType;
var lime_graphics_format_JPEG = function() { };
$hxClasses["lime.graphics.format.JPEG"] = lime_graphics_format_JPEG;
lime_graphics_format_JPEG.__name__ = ["lime","graphics","format","JPEG"];
lime_graphics_format_JPEG.decodeBytes = function(bytes,decodeData) {
if(decodeData == null) decodeData = true;
return null;
};
lime_graphics_format_JPEG.decodeFile = function(path,decodeData) {
if(decodeData == null) decodeData = true;
return null;
};
lime_graphics_format_JPEG.encode = function(image,quality) {
if(image.get_premultiplied() || image.get_format() != 0) {
image = image.clone();
image.set_premultiplied(false);
image.set_format(0);
}
lime_graphics_utils_ImageCanvasUtil.sync(image,false);
if(image.buffer.__srcCanvas != null) {
var data = image.buffer.__srcCanvas.toDataURL("image/jpeg",quality / 100);
var buffer = window.atob(data.split(";base64,")[1]);
var bytes = new haxe_io_Bytes(new ArrayBuffer(buffer.length));
var _g1 = 0;
var _g = buffer.length;
while(_g1 < _g) {
var i = _g1++;
bytes.set(i,HxOverrides.cca(buffer,i));
}
return bytes;
}
return null;
};
var lime_graphics_format_PNG = function() { };
$hxClasses["lime.graphics.format.PNG"] = lime_graphics_format_PNG;
lime_graphics_format_PNG.__name__ = ["lime","graphics","format","PNG"];
lime_graphics_format_PNG.decodeBytes = function(bytes,decodeData) {
if(decodeData == null) decodeData = true;
return null;
};
lime_graphics_format_PNG.decodeFile = function(path,decodeData) {
if(decodeData == null) decodeData = true;
return null;
};
lime_graphics_format_PNG.encode = function(image) {
if(image.get_premultiplied() || image.get_format() != 0) {
image = image.clone();
image.set_premultiplied(false);
image.set_format(0);
}
lime_graphics_utils_ImageCanvasUtil.sync(image,false);
if(image.buffer.__srcCanvas != null) {
var data = image.buffer.__srcCanvas.toDataURL("image/png");
var buffer = window.atob(data.split(";base64,")[1]);
var bytes = new haxe_io_Bytes(new ArrayBuffer(buffer.length));
var _g1 = 0;
var _g = buffer.length;
while(_g1 < _g) {
var i = _g1++;
bytes.set(i,HxOverrides.cca(buffer,i));
}
return bytes;
}
return null;
};
var lime_graphics_opengl_GL = function() { };
$hxClasses["lime.graphics.opengl.GL"] = lime_graphics_opengl_GL;
lime_graphics_opengl_GL.__name__ = ["lime","graphics","opengl","GL"];
lime_graphics_opengl_GL.__properties__ = {get_version:"get_version",get_type:"get_type"}
lime_graphics_opengl_GL.activeTexture = function(texture) {
lime_graphics_opengl_GL.context.__context.activeTexture(texture);
};
lime_graphics_opengl_GL.attachShader = function(program,shader) {
lime_graphics_opengl_GL.context.__context.attachShader(program,shader);
};
lime_graphics_opengl_GL.beginQuery = function(target,query) {
lime_graphics_opengl_GL.context.__context.beginQuery(target,query);
};
lime_graphics_opengl_GL.beginTransformFeedback = function(primitiveNode) {
lime_graphics_opengl_GL.context.__context.beginTransformFeedback(primitiveNode);
};
lime_graphics_opengl_GL.bindAttribLocation = function(program,index,name) {
lime_graphics_opengl_GL.context.__context.bindAttribLocation(program,index,name);
};
lime_graphics_opengl_GL.bindBuffer = function(target,buffer) {
lime_graphics_opengl_GL.context.__context.bindBuffer(target,buffer);
};
lime_graphics_opengl_GL.bindBufferBase = function(target,index,buffer) {
lime_graphics_opengl_GL.context.__context.bindBufferBase(target,index,buffer);
};
lime_graphics_opengl_GL.bindBufferRange = function(target,index,buffer,offset,size) {
lime_graphics_opengl_GL.context.__context.bindBufferRange(target,index,buffer,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(size));
};
lime_graphics_opengl_GL.bindFramebuffer = function(target,framebuffer) {
lime_graphics_opengl_GL.context.__context.bindFramebuffer(target,framebuffer);
};
lime_graphics_opengl_GL.bindRenderbuffer = function(target,renderbuffer) {
lime_graphics_opengl_GL.context.__context.bindRenderbuffer(target,renderbuffer);
};
lime_graphics_opengl_GL.bindSampler = function(unit,sampler) {
lime_graphics_opengl_GL.context.__context.bindSampler(unit,sampler);
};
lime_graphics_opengl_GL.bindTexture = function(target,texture) {
lime_graphics_opengl_GL.context.__context.bindTexture(target,texture);
};
lime_graphics_opengl_GL.bindTransformFeedback = function(target,transformFeedback) {
lime_graphics_opengl_GL.context.__context.bindTransformFeedback(target,transformFeedback);
};
lime_graphics_opengl_GL.bindVertexArray = function(vertexArray) {
lime_graphics_opengl_GL.context.__context.bindVertexArray(vertexArray);
};
lime_graphics_opengl_GL.blitFramebuffer = function(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter) {
lime_graphics_opengl_GL.context.__context.blitFramebuffer(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter);
};
lime_graphics_opengl_GL.blendColor = function(red,green,blue,alpha) {
lime_graphics_opengl_GL.context.__context.blendColor(red,green,blue,alpha);
};
lime_graphics_opengl_GL.blendEquation = function(mode) {
lime_graphics_opengl_GL.context.__context.blendEquation(mode);
};
lime_graphics_opengl_GL.blendEquationSeparate = function(modeRGB,modeAlpha) {
lime_graphics_opengl_GL.context.__context.blendEquationSeparate(modeRGB,modeAlpha);
};
lime_graphics_opengl_GL.blendFunc = function(sfactor,dfactor) {
lime_graphics_opengl_GL.context.__context.blendFunc(sfactor,dfactor);
};
lime_graphics_opengl_GL.blendFuncSeparate = function(srcRGB,dstRGB,srcAlpha,dstAlpha) {
lime_graphics_opengl_GL.context.__context.blendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
};
lime_graphics_opengl_GL.bufferData = function(target,size,srcData,usage) {
lime_graphics_opengl_GL.context.__context.bufferData(target,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(srcData,size),usage);
};
lime_graphics_opengl_GL.bufferDataWEBGL = function(target,srcData,usage,srcOffset,length) {
lime_graphics_opengl_GL.context.bufferDataWEBGL(target,srcData,usage,srcOffset,length);
};
lime_graphics_opengl_GL.bufferSubData = function(target,dstByteOffset,size,srcData) {
lime_graphics_opengl_GL.context.__context.bufferSubData(target,dstByteOffset,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(srcData,size));
};
lime_graphics_opengl_GL.bufferSubDataWEBGL = function(target,dstByteOffset,srcData,srcOffset,length) {
lime_graphics_opengl_GL.context.bufferSubDataWEBGL(target,dstByteOffset,srcData,srcOffset,length);
};
lime_graphics_opengl_GL.checkFramebufferStatus = function(target) {
return lime_graphics_opengl_GL.context.__context.checkFramebufferStatus(target);
};
lime_graphics_opengl_GL.clear = function(mask) {
lime_graphics_opengl_GL.context.__context.clear(mask);
};
lime_graphics_opengl_GL.clearBufferfi = function(buffer,drawbuffer,depth,stencil) {
lime_graphics_opengl_GL.context.__context.clearBufferfi(buffer,drawbuffer,depth,stencil);
};
lime_graphics_opengl_GL.clearBufferfv = function(buffer,drawbuffer,value) {
lime_graphics_opengl_GL.context.__context.clearBufferfv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(value));
};
lime_graphics_opengl_GL.clearBufferfvWEBGL = function(buffer,drawbuffer,values,srcOffset) {
lime_graphics_opengl_GL.context.__context.clearBufferfv(buffer,drawbuffer,values,srcOffset);
};
lime_graphics_opengl_GL.clearBufferiv = function(buffer,drawbuffer,value) {
lime_graphics_opengl_GL.context.__context.clearBufferiv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(value));
};
lime_graphics_opengl_GL.clearBufferivWEBGL = function(buffer,drawbuffer,values,srcOffset) {
lime_graphics_opengl_GL.context.__context.clearBufferiv(buffer,drawbuffer,values,srcOffset);
};
lime_graphics_opengl_GL.clearBufferuiv = function(buffer,drawbuffer,value) {
lime_graphics_opengl_GL.context.__context.clearBufferuiv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(value));
};
lime_graphics_opengl_GL.clearBufferuivWEBGL = function(buffer,drawbuffer,values,srcOffset) {
lime_graphics_opengl_GL.context.__context.clearBufferuiv(buffer,drawbuffer,values,srcOffset);
};
lime_graphics_opengl_GL.clearColor = function(red,green,blue,alpha) {
lime_graphics_opengl_GL.context.__context.clearColor(red,green,blue,alpha);
};
lime_graphics_opengl_GL.clearDepth = function(depth) {
lime_graphics_opengl_GL.context.__context.clearDepth(depth);
};
lime_graphics_opengl_GL.clearDepthf = function(depth) {
lime_graphics_opengl_GL.context.__context.clearDepth(depth);
};
lime_graphics_opengl_GL.clearStencil = function(s) {
lime_graphics_opengl_GL.context.__context.clearStencil(s);
};
lime_graphics_opengl_GL.clientWaitSync = function(sync,flags,timeout) {
return lime_graphics_opengl_GL.context.__context.clientWaitSync(sync,flags,timeout);
};
lime_graphics_opengl_GL.colorMask = function(red,green,blue,alpha) {
lime_graphics_opengl_GL.context.__context.colorMask(red,green,blue,alpha);
};
lime_graphics_opengl_GL.compileShader = function(shader) {
lime_graphics_opengl_GL.context.__context.compileShader(shader);
};
lime_graphics_opengl_GL.compressedTexImage2D = function(target,level,internalformat,width,height,border,imageSize,data) {
lime_graphics_opengl_GL.context.__context.compressedTexImage2D(target,level,internalformat,width,height,border,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
};
lime_graphics_opengl_GL.compressedTexImage2DWEBGL = function(target,level,internalformat,width,height,border,srcData,srcOffset,srcLengthOverride) {
lime_graphics_opengl_GL.context.compressedTexImage2DWEBGL(target,level,internalformat,width,height,border,srcData,srcOffset,srcLengthOverride);
};
lime_graphics_opengl_GL.compressedTexImage3D = function(target,level,internalformat,width,height,depth,border,imageSize,data) {
lime_graphics_opengl_GL.context.__context.compressedTexImage3D(target,level,internalformat,width,height,depth,border,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
};
lime_graphics_opengl_GL.compressedTexImage3DWEBGL = function(target,level,internalformat,width,height,depth,border,srcData,srcOffset,srcLengthOverride) {
lime_graphics_opengl_GL.context.__context.compressedTexImage3D(target,level,internalformat,width,height,depth,border,srcData,srcOffset,srcLengthOverride);
};
lime_graphics_opengl_GL.compressedTexSubImage2D = function(target,level,xoffset,yoffset,width,height,format,imageSize,data) {
lime_graphics_opengl_GL.context.__context.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
};
lime_graphics_opengl_GL.compressedTexSubImage2DWEBGL = function(target,level,xoffset,yoffset,width,height,format,srcData,srcOffset,srcLengthOverride) {
lime_graphics_opengl_GL.context.compressedTexSubImage2DWEBGL(target,level,xoffset,yoffset,width,height,format,srcData,srcOffset,srcLengthOverride);
};
lime_graphics_opengl_GL.compressedTexSubImage3D = function(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data) {
lime_graphics_opengl_GL.context.__context.compressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
};
lime_graphics_opengl_GL.compressedTexSubImage3DWEBGL = function(target,level,xoffset,yoffset,zoffset,width,height,depth,format,srcData,srcOffset,srcLengthOverride) {
lime_graphics_opengl_GL.context.compressedTexSubImage3DWEBGL(target,level,xoffset,yoffset,zoffset,width,height,depth,format,srcData,srcOffset,srcLengthOverride);
};
lime_graphics_opengl_GL.copyBufferSubData = function(readTarget,writeTarget,readOffset,writeOffset,size) {
null;
};
lime_graphics_opengl_GL.copyTexImage2D = function(target,level,internalformat,x,y,width,height,border) {
lime_graphics_opengl_GL.context.__context.copyTexImage2D(target,level,internalformat,x,y,width,height,border);
};
lime_graphics_opengl_GL.copyTexSubImage2D = function(target,level,xoffset,yoffset,x,y,width,height) {
lime_graphics_opengl_GL.context.__context.copyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
};
lime_graphics_opengl_GL.copyTexSubImage3D = function(target,level,xoffset,yoffset,zoffset,x,y,width,height) {
lime_graphics_opengl_GL.context.__context.copyTexSubImage3D(target,level,xoffset,yoffset,zoffset,x,y,width,height);
};
lime_graphics_opengl_GL.createBuffer = function() {
return lime_graphics_opengl_GL.context.__context.createBuffer();
};
lime_graphics_opengl_GL.createFramebuffer = function() {
return lime_graphics_opengl_GL.context.__context.createFramebuffer();
};
lime_graphics_opengl_GL.createProgram = function() {
return lime_graphics_opengl_GL.context.__context.createProgram();
};
lime_graphics_opengl_GL.createQuery = function() {
return lime_graphics_opengl_GL.context.__context.createQuery();
};
lime_graphics_opengl_GL.createRenderbuffer = function() {
return lime_graphics_opengl_GL.context.__context.createRenderbuffer();
};
lime_graphics_opengl_GL.createSampler = function() {
return lime_graphics_opengl_GL.context.__context.createSampler();
};
lime_graphics_opengl_GL.createShader = function(type) {
return lime_graphics_opengl_GL.context.__context.createShader(type);
};
lime_graphics_opengl_GL.createTexture = function() {
return lime_graphics_opengl_GL.context.__context.createTexture();
};
lime_graphics_opengl_GL.createTransformFeedback = function() {
return lime_graphics_opengl_GL.context.__context.createTransformFeedback();
};
lime_graphics_opengl_GL.createVertexArray = function() {
return lime_graphics_opengl_GL.context.__context.createVertexArray();
};
lime_graphics_opengl_GL.cullFace = function(mode) {
lime_graphics_opengl_GL.context.__context.cullFace(mode);
};
lime_graphics_opengl_GL.deleteBuffer = function(buffer) {
lime_graphics_opengl_GL.context.__context.deleteBuffer(buffer);
};
lime_graphics_opengl_GL.deleteFramebuffer = function(framebuffer) {
lime_graphics_opengl_GL.context.__context.deleteFramebuffer(framebuffer);
};
lime_graphics_opengl_GL.deleteProgram = function(program) {
lime_graphics_opengl_GL.context.__context.deleteProgram(program);
};
lime_graphics_opengl_GL.deleteQuery = function(query) {
lime_graphics_opengl_GL.context.__context.deleteQuery(query);
};
lime_graphics_opengl_GL.deleteRenderbuffer = function(renderbuffer) {
lime_graphics_opengl_GL.context.__context.deleteRenderbuffer(renderbuffer);
};
lime_graphics_opengl_GL.deleteSampler = function(sampler) {
lime_graphics_opengl_GL.context.__context.deleteSampler(sampler);
};
lime_graphics_opengl_GL.deleteShader = function(shader) {
lime_graphics_opengl_GL.context.__context.deleteShader(shader);
};
lime_graphics_opengl_GL.deleteSync = function(sync) {
lime_graphics_opengl_GL.context.__context.deleteSync(sync);
};
lime_graphics_opengl_GL.deleteTexture = function(texture) {
lime_graphics_opengl_GL.context.__context.deleteTexture(texture);
};
lime_graphics_opengl_GL.deleteTransformFeedback = function(transformFeedback) {
lime_graphics_opengl_GL.context.__context.deleteTransformFeedback(transformFeedback);
};
lime_graphics_opengl_GL.deleteVertexArray = function(vertexArray) {
lime_graphics_opengl_GL.context.__context.deleteVertexArray(vertexArray);
};
lime_graphics_opengl_GL.depthFunc = function(func) {
lime_graphics_opengl_GL.context.__context.depthFunc(func);
};
lime_graphics_opengl_GL.depthMask = function(flag) {
lime_graphics_opengl_GL.context.__context.depthMask(flag);
};
lime_graphics_opengl_GL.depthRange = function(zNear,zFar) {
lime_graphics_opengl_GL.context.__context.depthRange(zNear,zFar);
};
lime_graphics_opengl_GL.depthRangef = function(zNear,zFar) {
lime_graphics_opengl_GL.context.__context.depthRange(zNear,zFar);
};
lime_graphics_opengl_GL.detachShader = function(program,shader) {
lime_graphics_opengl_GL.context.__context.detachShader(program,shader);
};
lime_graphics_opengl_GL.disable = function(cap) {
lime_graphics_opengl_GL.context.__context.disable(cap);
};
lime_graphics_opengl_GL.disableVertexAttribArray = function(index) {
lime_graphics_opengl_GL.context.__context.disableVertexAttribArray(index);
};
lime_graphics_opengl_GL.drawArrays = function(mode,first,count) {
lime_graphics_opengl_GL.context.__context.drawArrays(mode,first,count);
};
lime_graphics_opengl_GL.drawArraysInstanced = function(mode,first,count,instanceCount) {
lime_graphics_opengl_GL.context.__context.drawArraysInstanced(mode,first,count,instanceCount);
};
lime_graphics_opengl_GL.drawBuffers = function(buffers) {
lime_graphics_opengl_GL.context.__context.drawBuffers(buffers);
};
lime_graphics_opengl_GL.drawElements = function(mode,count,type,offset) {
lime_graphics_opengl_GL.context.drawElements(mode,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(offset));
};
lime_graphics_opengl_GL.drawElementsInstanced = function(mode,count,type,offset,instanceCount) {
lime_graphics_opengl_GL.context.__context.drawElementsInstanced(mode,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),instanceCount);
};
lime_graphics_opengl_GL.drawRangeElements = function(mode,start,end,count,type,offset) {
lime_graphics_opengl_GL.context.__context.drawRangeElements(mode,start,end,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)));
};
lime_graphics_opengl_GL.enable = function(cap) {
lime_graphics_opengl_GL.context.__context.enable(cap);
};
lime_graphics_opengl_GL.enableVertexAttribArray = function(index) {
lime_graphics_opengl_GL.context.__context.enableVertexAttribArray(index);
};
lime_graphics_opengl_GL.endQuery = function(target) {
lime_graphics_opengl_GL.context.__context.endQuery(target);
};
lime_graphics_opengl_GL.endTransformFeedback = function() {
lime_graphics_opengl_GL.context.__context.endTransformFeedback();
};
lime_graphics_opengl_GL.fenceSync = function(condition,flags) {
return lime_graphics_opengl_GL.context.__context.fenceSync(condition,flags);
};
lime_graphics_opengl_GL.finish = function() {
lime_graphics_opengl_GL.context.__context.finish();
};
lime_graphics_opengl_GL.flush = function() {
lime_graphics_opengl_GL.context.__context.flush();
};
lime_graphics_opengl_GL.framebufferRenderbuffer = function(target,attachment,renderbuffertarget,renderbuffer) {
lime_graphics_opengl_GL.context.__context.framebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
};
lime_graphics_opengl_GL.framebufferTexture2D = function(target,attachment,textarget,texture,level) {
lime_graphics_opengl_GL.context.__context.framebufferTexture2D(target,attachment,textarget,texture,level);
};
lime_graphics_opengl_GL.framebufferTextureLayer = function(target,attachment,texture,level,layer) {
lime_graphics_opengl_GL.context.__context.framebufferTextureLayer(target,attachment,texture,level,layer);
};
lime_graphics_opengl_GL.frontFace = function(mode) {
lime_graphics_opengl_GL.context.__context.frontFace(mode);
};
lime_graphics_opengl_GL.generateMipmap = function(target) {
lime_graphics_opengl_GL.context.__context.generateMipmap(target);
};
lime_graphics_opengl_GL.getActiveAttrib = function(program,index) {
return lime_graphics_opengl_GL.context.__context.getActiveAttrib(program,index);
};
lime_graphics_opengl_GL.getActiveUniform = function(program,index) {
return lime_graphics_opengl_GL.context.__context.getActiveUniform(program,index);
};
lime_graphics_opengl_GL.getActiveUniformBlocki = function(program,uniformBlockIndex,pname) {
return lime_graphics_opengl_GL.context.__context.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);
};
lime_graphics_opengl_GL.getActiveUniformBlockiv = function(program,uniformBlockIndex,pname,params) {
lime_graphics_opengl_GL.context.getActiveUniformBlockiv(program,uniformBlockIndex,pname,params);
};
lime_graphics_opengl_GL.getActiveUniformBlockName = function(program,uniformBlockIndex) {
return lime_graphics_opengl_GL.context.__context.getActiveUniformBlockName(program,uniformBlockIndex);
};
lime_graphics_opengl_GL.getActiveUniformBlockParameter = function(program,uniformBlockIndex,pname) {
return lime_graphics_opengl_GL.context.__context.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);
};
lime_graphics_opengl_GL.getActiveUniforms = function(program,uniformIndices,pname) {
return lime_graphics_opengl_GL.context.__context.getActiveUniforms(program,uniformIndices,pname);
};
lime_graphics_opengl_GL.getActiveUniformsiv = function(program,uniformIndices,pname,params) {
null;
};
lime_graphics_opengl_GL.getAttachedShaders = function(program) {
return lime_graphics_opengl_GL.context.__context.getAttachedShaders(program);
};
lime_graphics_opengl_GL.getAttribLocation = function(program,name) {
return lime_graphics_opengl_GL.context.__context.getAttribLocation(program,name);
};
lime_graphics_opengl_GL.getBoolean = function(pname) {
return lime_graphics_opengl_GL.context.__context.getParameter(pname);
};
lime_graphics_opengl_GL.getBooleanv = function(pname,params) {
lime_graphics_opengl_GL.context.getBooleanv(pname,params);
};
lime_graphics_opengl_GL.getBufferParameter = function(target,pname) {
return lime_graphics_opengl_GL.context.__context.getBufferParameter(target,pname);
};
lime_graphics_opengl_GL.getBufferParameteri = function(target,pname) {
return lime_graphics_opengl_GL.context.__context.getBufferParameter(target,pname);
};
lime_graphics_opengl_GL.getBufferParameteri64v = function(target,pname,params) {
lime_graphics_opengl_GL.context.getBufferParameteri64v(target,pname,params);
return;
};
lime_graphics_opengl_GL.getBufferParameteriv = function(target,pname,data) {
lime_graphics_opengl_GL.context.getBufferParameteriv(target,pname,data);
return;
};
lime_graphics_opengl_GL.getBufferPointerv = function(target,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0);
};
lime_graphics_opengl_GL.getBufferSubData = function(target,offset,size,data) {
lime_graphics_opengl_GL.context.__context.getBufferSubData(target,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,size));
};
lime_graphics_opengl_GL.getBufferSubDataWEBGL = function(target,srcByteOffset,dstData,srcOffset,length) {
lime_graphics_opengl_GL.context.getBufferSubDataWEBGL(target,srcByteOffset,dstData,srcOffset,length);
};
lime_graphics_opengl_GL.getContextAttributes = function() {
return lime_graphics_opengl_GL.context.__context.getContextAttributes();
};
lime_graphics_opengl_GL.getError = function() {
return lime_graphics_opengl_GL.context.__context.getError();
};
lime_graphics_opengl_GL.getExtension = function(name) {
return lime_graphics_opengl_GL.context.__context.getExtension(name);
};
lime_graphics_opengl_GL.getFloat = function(pname) {
return lime_graphics_opengl_GL.context.__context.getParameter(pname);
};
lime_graphics_opengl_GL.getFloatv = function(pname,params) {
lime_graphics_opengl_GL.context.getFloatv(pname,params);
};
lime_graphics_opengl_GL.getFragDataLocation = function(program,name) {
return lime_graphics_opengl_GL.context.__context.getFragDataLocation(program,name);
};
lime_graphics_opengl_GL.getFramebufferAttachmentParameter = function(target,attachment,pname) {
return lime_graphics_opengl_GL.context.__context.getFramebufferAttachmentParameter(target,attachment,pname);
};
lime_graphics_opengl_GL.getFramebufferAttachmentParameteri = function(target,attachment,pname) {
return lime_graphics_opengl_GL.context.__context.getFramebufferAttachmentParameter(target,attachment,pname);
};
lime_graphics_opengl_GL.getFramebufferAttachmentParameteriv = function(target,attachment,pname,params) {
lime_graphics_opengl_GL.context.getFramebufferAttachmentParameteriv(target,attachment,pname,params);
};
lime_graphics_opengl_GL.getIndexedParameter = function(target,index) {
return lime_graphics_opengl_GL.context.__context.getIndexedParameter(target,index);
};
lime_graphics_opengl_GL.getInteger = function(pname) {
return lime_graphics_opengl_GL.context.__context.getParameter(pname);
};
lime_graphics_opengl_GL.getInteger64 = function(pname) {
return lime_graphics_opengl_GL.context.getInteger64(pname);
};
lime_graphics_opengl_GL.getInteger64i = function(pname) {
return lime_graphics_opengl_GL.context.getInteger64i(pname);
};
lime_graphics_opengl_GL.getInteger64i_v = function(pname,params) {
return null;
};
lime_graphics_opengl_GL.getInteger64v = function(pname,params) {
lime_graphics_opengl_GL.context.getInteger64v(pname,params);
return;
};
lime_graphics_opengl_GL.getIntegeri = function(pname) {
return 0;
};
lime_graphics_opengl_GL.getIntegeri_v = function(pname,params) {
return null;
};
lime_graphics_opengl_GL.getIntegerv = function(pname,params) {
lime_graphics_opengl_GL.context.getIntegerv(pname,params);
};
lime_graphics_opengl_GL.getInternalformati = function(target,internalformat,pname) {
return 0;
};
lime_graphics_opengl_GL.getInternalformativ = function(target,internalformat,pname,params) {
lime_graphics_opengl_GL.context.getInternalformativ(target,internalformat,pname,params);
};
lime_graphics_opengl_GL.getInternalformatParameter = function(target,internalformat,pname) {
return lime_graphics_opengl_GL.context.__context.getInternalformatParameter(target,internalformat,pname);
};
lime_graphics_opengl_GL.getParameter = function(pname) {
return lime_graphics_opengl_GL.context.__context.getParameter(pname);
};
lime_graphics_opengl_GL.getProgrami = function(program,pname) {
return lime_graphics_opengl_GL.context.__context.getProgramParameter(program,pname);
};
lime_graphics_opengl_GL.getProgramiv = function(program,pname,params) {
lime_graphics_opengl_GL.context.getProgramiv(program,pname,params);
};
lime_graphics_opengl_GL.getProgramBinary = function(program,binaryFormat) {
return null;
};
lime_graphics_opengl_GL.getProgramInfoLog = function(program) {
return lime_graphics_opengl_GL.context.__context.getProgramInfoLog(program);
};
lime_graphics_opengl_GL.getProgramParameter = function(program,pname) {
return lime_graphics_opengl_GL.context.__context.getProgramParameter(program,pname);
};
lime_graphics_opengl_GL.getQuery = function(target,pname) {
return lime_graphics_opengl_GL.context.__context.getQuery(target,pname);
};
lime_graphics_opengl_GL.getQueryi = function(target,pname) {
return 0;
};
lime_graphics_opengl_GL.getQueryiv = function(target,pname,params) {
lime_graphics_opengl_GL.context.getQueryiv(target,pname,params);
};
lime_graphics_opengl_GL.getQueryObjectui = function(query,pname) {
return 0;
};
lime_graphics_opengl_GL.getQueryObjectuiv = function(query,pname,params) {
lime_graphics_opengl_GL.context.getQueryObjectuiv(query,pname,params);
};
lime_graphics_opengl_GL.getQueryParameter = function(query,pname) {
return lime_graphics_opengl_GL.context.__context.getQueryParameter(query,pname);
};
lime_graphics_opengl_GL.getRenderbufferParameter = function(target,pname) {
return lime_graphics_opengl_GL.context.__context.getRenderbufferParameter(target,pname);
};
lime_graphics_opengl_GL.getRenderbufferParameteri = function(target,pname) {
return lime_graphics_opengl_GL.context.__context.getRenderbufferParameter(target,pname);
};
lime_graphics_opengl_GL.getRenderbufferParameteriv = function(target,pname,params) {
lime_graphics_opengl_GL.context.getRenderbufferParameteriv(target,pname,params);
};
lime_graphics_opengl_GL.getSamplerParameter = function(sampler,pname) {
return lime_graphics_opengl_GL.context.__context.getSamplerParameter(sampler,pname);
};
lime_graphics_opengl_GL.getSamplerParameterf = function(sampler,pname) {
return 0;
};
lime_graphics_opengl_GL.getSamplerParameterfv = function(sampler,pname,params) {
lime_graphics_opengl_GL.context.getSamplerParameterfv(sampler,pname,params);
};
lime_graphics_opengl_GL.getSamplerParameteri = function(sampler,pname) {
return 0;
};
lime_graphics_opengl_GL.getSamplerParameteriv = function(sampler,pname,params) {
lime_graphics_opengl_GL.context.getSamplerParameteriv(sampler,pname,params);
};
lime_graphics_opengl_GL.getShaderi = function(shader,pname) {
return lime_graphics_opengl_GL.context.__context.getShaderParameter(shader,pname);
};
lime_graphics_opengl_GL.getShaderiv = function(shader,pname,params) {
lime_graphics_opengl_GL.context.getShaderiv(shader,pname,params);
};
lime_graphics_opengl_GL.getShaderInfoLog = function(shader) {
return lime_graphics_opengl_GL.context.__context.getShaderInfoLog(shader);
};
lime_graphics_opengl_GL.getShaderParameter = function(shader,pname) {
return lime_graphics_opengl_GL.context.__context.getShaderParameter(shader,pname);
};
lime_graphics_opengl_GL.getShaderPrecisionFormat = function(shadertype,precisiontype) {
return lime_graphics_opengl_GL.context.__context.getShaderPrecisionFormat(shadertype,precisiontype);
};
lime_graphics_opengl_GL.getShaderSource = function(shader) {
return lime_graphics_opengl_GL.context.__context.getShaderSource(shader);
};
lime_graphics_opengl_GL.getString = function(pname) {
return lime_graphics_opengl_GL.context.getString(pname);
};
lime_graphics_opengl_GL.getStringi = function(name,index) {
return null;
};
lime_graphics_opengl_GL.getSupportedExtensions = function() {
return lime_graphics_opengl_GL.context.__context.getSupportedExtensions();
};
lime_graphics_opengl_GL.getSyncParameter = function(sync,pname) {
return lime_graphics_opengl_GL.context.__context.getSyncParameter(sync,pname);
};
lime_graphics_opengl_GL.getSyncParameteri = function(sync,pname) {
return 0;
};
lime_graphics_opengl_GL.getSyncParameteriv = function(sync,pname,params) {
lime_graphics_opengl_GL.context.getSyncParameteriv(sync,pname,params);
};
lime_graphics_opengl_GL.getTexParameter = function(target,pname) {
return lime_graphics_opengl_GL.context.__context.getTexParameter(target,pname);
};
lime_graphics_opengl_GL.getTexParameterf = function(target,pname) {
return lime_graphics_opengl_GL.context.__context.getTexParameter(target,pname);
};
lime_graphics_opengl_GL.getTexParameterfv = function(target,pname,params) {
lime_graphics_opengl_GL.context.getTexParameterfv(target,pname,params);
};
lime_graphics_opengl_GL.getTexParameteri = function(target,pname) {
return lime_graphics_opengl_GL.context.__context.getTexParameter(target,pname);
};
lime_graphics_opengl_GL.getTexParameteriv = function(target,pname,params) {
lime_graphics_opengl_GL.context.getTexParameteriv(target,pname,params);
};
lime_graphics_opengl_GL.getTransformFeedbackVarying = function(program,index) {
return lime_graphics_opengl_GL.context.__context.getTransformFeedbackVarying(program,index);
};
lime_graphics_opengl_GL.getUniform = function(program,location) {
return lime_graphics_opengl_GL.context.__context.getUniform(program,location);
};
lime_graphics_opengl_GL.getUniformf = function(program,location) {
return lime_graphics_opengl_GL.context.__context.getUniform(program,location);
};
lime_graphics_opengl_GL.getUniformfv = function(program,location,params) {
lime_graphics_opengl_GL.context.getUniformfv(program,location,params);
};
lime_graphics_opengl_GL.getUniformi = function(program,location) {
return lime_graphics_opengl_GL.context.__context.getUniform(program,location);
};
lime_graphics_opengl_GL.getUniformiv = function(program,location,params) {
lime_graphics_opengl_GL.context.getUniformiv(program,location,params);
};
lime_graphics_opengl_GL.getUniformui = function(program,location) {
return 0;
};
lime_graphics_opengl_GL.getUniformuiv = function(program,location,params) {
lime_graphics_opengl_GL.context.getUniformuiv(program,location,params);
};
lime_graphics_opengl_GL.getUniformBlockIndex = function(program,uniformBlockName) {
return lime_graphics_opengl_GL.context.__context.getUniformBlockIndex(program,uniformBlockName);
};
lime_graphics_opengl_GL.getUniformIndices = function(program,uniformNames) {
return lime_graphics_opengl_GL.context.__context.getUniformIndices(program,uniformNames);
};
lime_graphics_opengl_GL.getUniformLocation = function(program,name) {
return lime_graphics_opengl_GL.context.__context.getUniformLocation(program,name);
};
lime_graphics_opengl_GL.getVertexAttrib = function(index,pname) {
return lime_graphics_opengl_GL.context.__context.getVertexAttrib(index,pname);
};
lime_graphics_opengl_GL.getVertexAttribf = function(index,pname) {
return 0;
};
lime_graphics_opengl_GL.getVertexAttribfv = function(index,pname,params) {
lime_graphics_opengl_GL.context.getVertexAttribfv(index,pname,params);
};
lime_graphics_opengl_GL.getVertexAttribi = function(index,pname) {
return 0;
};
lime_graphics_opengl_GL.getVertexAttribIi = function(index,pname) {
return 0;
};
lime_graphics_opengl_GL.getVertexAttribIiv = function(index,pname,params) {
null;
};
lime_graphics_opengl_GL.getVertexAttribIui = function(index,pname) {
return 0;
};
lime_graphics_opengl_GL.getVertexAttribIuiv = function(index,pname,params) {
null;
};
lime_graphics_opengl_GL.getVertexAttribiv = function(index,pname,params) {
lime_graphics_opengl_GL.context.getVertexAttribiv(index,pname,params);
};
lime_graphics_opengl_GL.getVertexAttribOffset = function(index,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_graphics_opengl_GL.context.__context.getVertexAttribOffset(index,pname));
};
lime_graphics_opengl_GL.getVertexAttribPointerv = function(index,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_graphics_opengl_GL.context.__context.getVertexAttribOffset(index,pname));
};
lime_graphics_opengl_GL.hint = function(target,mode) {
lime_graphics_opengl_GL.context.__context.hint(target,mode);
};
lime_graphics_opengl_GL.invalidateFramebuffer = function(target,attachments) {
lime_graphics_opengl_GL.context.__context.invalidateFramebuffer(target,attachments);
};
lime_graphics_opengl_GL.invalidateSubFramebuffer = function(target,attachments,x,y,width,height) {
lime_graphics_opengl_GL.context.__context.invalidateSubFramebuffer(target,attachments,x,y,width,height);
};
lime_graphics_opengl_GL.isBuffer = function(buffer) {
return lime_graphics_opengl_GL.context.__context.isBuffer(buffer);
};
lime_graphics_opengl_GL.isContextLost = function() {
return lime_graphics_opengl_GL.context.isContextLost();
};
lime_graphics_opengl_GL.isEnabled = function(cap) {
return lime_graphics_opengl_GL.context.__context.isEnabled(cap);
};
lime_graphics_opengl_GL.isFramebuffer = function(framebuffer) {
return lime_graphics_opengl_GL.context.__context.isFramebuffer(framebuffer);
};
lime_graphics_opengl_GL.isProgram = function(program) {
return lime_graphics_opengl_GL.context.__context.isProgram(program);
};
lime_graphics_opengl_GL.isQuery = function(query) {
return lime_graphics_opengl_GL.context.__context.isQuery(query);
};
lime_graphics_opengl_GL.isRenderbuffer = function(renderbuffer) {
return lime_graphics_opengl_GL.context.__context.isRenderbuffer(renderbuffer);
};
lime_graphics_opengl_GL.isSampler = function(sampler) {
return lime_graphics_opengl_GL.context.__context.isSampler(sampler);
};
lime_graphics_opengl_GL.isShader = function(shader) {
return lime_graphics_opengl_GL.context.__context.isShader(shader);
};
lime_graphics_opengl_GL.isSync = function(sync) {
return lime_graphics_opengl_GL.context.__context.isSync(sync);
};
lime_graphics_opengl_GL.isTexture = function(texture) {
return lime_graphics_opengl_GL.context.__context.isTexture(texture);
};
lime_graphics_opengl_GL.isTransformFeedback = function(transformFeedback) {
return lime_graphics_opengl_GL.context.__context.isTransformFeedback(transformFeedback);
};
lime_graphics_opengl_GL.isVertexArray = function(vertexArray) {
return lime_graphics_opengl_GL.context.__context.isVertexArray(vertexArray);
};
lime_graphics_opengl_GL.lineWidth = function(width) {
lime_graphics_opengl_GL.context.__context.lineWidth(width);
};
lime_graphics_opengl_GL.linkProgram = function(program) {
lime_graphics_opengl_GL.context.__context.linkProgram(program);
};
lime_graphics_opengl_GL.mapBufferRange = function(target,offset,length,access) {
null;
};
lime_graphics_opengl_GL.pauseTransformFeedback = function() {
lime_graphics_opengl_GL.context.__context.pauseTransformFeedback();
};
lime_graphics_opengl_GL.pixelStorei = function(pname,param) {
lime_graphics_opengl_GL.context.__context.pixelStorei(pname,param);
};
lime_graphics_opengl_GL.polygonOffset = function(factor,units) {
lime_graphics_opengl_GL.context.__context.polygonOffset(factor,units);
};
lime_graphics_opengl_GL.programBinary = function(program,binaryFormat,binary,length) {
null;
};
lime_graphics_opengl_GL.programParameteri = function(program,pname,value) {
null;
};
lime_graphics_opengl_GL.readBuffer = function(src) {
lime_graphics_opengl_GL.context.__context.readBuffer(src);
};
lime_graphics_opengl_GL.readPixels = function(x,y,width,height,format,type,pixels) {
lime_graphics_opengl_GL.context.readPixels(x,y,width,height,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromBytesPointer(pixels));
};
lime_graphics_opengl_GL.readPixelsWEBGL = function(x,y,width,height,format,type,pixels,dstOffset) {
lime_graphics_opengl_GL.context.readPixelsWEBGL(x,y,width,height,format,type,pixels,dstOffset);
};
lime_graphics_opengl_GL.releaseShaderCompiler = function() {
null;
};
lime_graphics_opengl_GL.renderbufferStorage = function(target,internalformat,width,height) {
lime_graphics_opengl_GL.context.__context.renderbufferStorage(target,internalformat,width,height);
};
lime_graphics_opengl_GL.renderbufferStorageMultisample = function(target,samples,internalFormat,width,height) {
lime_graphics_opengl_GL.context.__context.renderbufferStorageMultisample(target,samples,internalFormat,width,height);
};
lime_graphics_opengl_GL.resumeTransformFeedback = function() {
lime_graphics_opengl_GL.context.__context.resumeTransformFeedback();
};
lime_graphics_opengl_GL.sampleCoverage = function(value,invert) {
lime_graphics_opengl_GL.context.__context.sampleCoverage(value,invert);
};
lime_graphics_opengl_GL.samplerParameterf = function(sampler,pname,param) {
lime_graphics_opengl_GL.context.__context.samplerParameterf(sampler,pname,param);
};
lime_graphics_opengl_GL.samplerParameteri = function(sampler,pname,param) {
lime_graphics_opengl_GL.context.__context.samplerParameteri(sampler,pname,param);
};
lime_graphics_opengl_GL.scissor = function(x,y,width,height) {
lime_graphics_opengl_GL.context.__context.scissor(x,y,width,height);
};
lime_graphics_opengl_GL.shaderBinary = function(shaders,binaryformat,binary,length) {
null;
};
lime_graphics_opengl_GL.shaderSource = function(shader,source) {
lime_graphics_opengl_GL.context.__context.shaderSource(shader,source);
};
lime_graphics_opengl_GL.stencilFunc = function(func,ref,mask) {
lime_graphics_opengl_GL.context.__context.stencilFunc(func,ref,mask);
};
lime_graphics_opengl_GL.stencilFuncSeparate = function(face,func,ref,mask) {
lime_graphics_opengl_GL.context.__context.stencilFuncSeparate(face,func,ref,mask);
};
lime_graphics_opengl_GL.stencilMask = function(mask) {
lime_graphics_opengl_GL.context.__context.stencilMask(mask);
};
lime_graphics_opengl_GL.stencilMaskSeparate = function(face,mask) {
lime_graphics_opengl_GL.context.__context.stencilMaskSeparate(face,mask);
};
lime_graphics_opengl_GL.stencilOp = function(fail,zfail,zpass) {
lime_graphics_opengl_GL.context.__context.stencilOp(fail,zfail,zpass);
};
lime_graphics_opengl_GL.stencilOpSeparate = function(face,fail,zfail,zpass) {
lime_graphics_opengl_GL.context.__context.stencilOpSeparate(face,fail,zfail,zpass);
};
lime_graphics_opengl_GL.texImage2D = function(target,level,internalformat,width,height,border,format,type,data) {
lime_graphics_opengl_GL.context.__context.texImage2D(target,level,internalformat,width,height,border,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
};
lime_graphics_opengl_GL.texImage2DWEBGL = function(target,level,internalformat,width,height,border,format,type,srcData,srcOffset) {
lime_graphics_opengl_GL.context.texImage2DWEBGL(target,level,internalformat,width,height,border,format,type,srcData,srcOffset);
};
lime_graphics_opengl_GL.texImage3D = function(target,level,internalformat,width,height,depth,border,format,type,data) {
lime_graphics_opengl_GL.context.__context.texImage3D(target,level,internalformat,width,height,depth,border,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
};
lime_graphics_opengl_GL.texImage3DWEBGL = function(target,level,internalformat,width,height,depth,border,format,type,srcData,srcOffset) {
lime_graphics_opengl_GL.context.__context.texImage3D(target,level,internalformat,width,height,depth,border,format,type,srcData,srcOffset);
};
lime_graphics_opengl_GL.texStorage2D = function(target,level,internalformat,width,height) {
lime_graphics_opengl_GL.context.__context.texStorage2D(target,level,internalformat,width,height);
};
lime_graphics_opengl_GL.texStorage3D = function(target,level,internalformat,width,height,depth) {
lime_graphics_opengl_GL.context.__context.texStorage3D(target,level,internalformat,width,height,depth);
};
lime_graphics_opengl_GL.texParameterf = function(target,pname,param) {
lime_graphics_opengl_GL.context.__context.texParameterf(target,pname,param);
};
lime_graphics_opengl_GL.texParameteri = function(target,pname,param) {
lime_graphics_opengl_GL.context.__context.texParameteri(target,pname,param);
};
lime_graphics_opengl_GL.texSubImage2D = function(target,level,xoffset,yoffset,width,height,format,type,pixels) {
lime_graphics_opengl_GL.context.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(pixels));
};
lime_graphics_opengl_GL.texSubImage2DWEBGL = function(target,level,xoffset,yoffset,width,height,format,type,srcData,srcOffset) {
lime_graphics_opengl_GL.context.texSubImage2DWEBGL(target,level,xoffset,yoffset,width,height,format,type,srcData,srcOffset);
};
lime_graphics_opengl_GL.texSubImage3D = function(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,data) {
lime_graphics_opengl_GL.context.__context.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
};
lime_graphics_opengl_GL.texSubImage3DWEBGL = function(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,source,srcOffset) {
lime_graphics_opengl_GL.context.__context.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,source,srcOffset);
};
lime_graphics_opengl_GL.transformFeedbackVaryings = function(program,varyings,bufferMode) {
lime_graphics_opengl_GL.context.__context.transformFeedbackVaryings(program,varyings,bufferMode);
};
lime_graphics_opengl_GL.uniform1f = function(location,v0) {
lime_graphics_opengl_GL.context.__context.uniform1f(location,v0);
};
lime_graphics_opengl_GL.uniform1fv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform1fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4));
};
lime_graphics_opengl_GL.uniform1fvWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform1fvWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform1i = function(location,v0) {
lime_graphics_opengl_GL.context.__context.uniform1i(location,v0);
};
lime_graphics_opengl_GL.uniform1iv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform1iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4));
};
lime_graphics_opengl_GL.uniform1ivWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform1ivWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform1ui = function(location,v0) {
lime_graphics_opengl_GL.context.__context.uniform1ui(location,v0);
};
lime_graphics_opengl_GL.uniform1uiv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform1uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4));
};
lime_graphics_opengl_GL.uniform1uivWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform1uivWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform2f = function(location,v0,v1) {
lime_graphics_opengl_GL.context.__context.uniform2f(location,v0,v1);
};
lime_graphics_opengl_GL.uniform2fv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform2fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 2));
};
lime_graphics_opengl_GL.uniform2fvWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform2fvWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform2i = function(location,x,y) {
lime_graphics_opengl_GL.context.__context.uniform2i(location,x,y);
};
lime_graphics_opengl_GL.uniform2iv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform2iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 2));
};
lime_graphics_opengl_GL.uniform2ivWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform2ivWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform2ui = function(location,x,y) {
lime_graphics_opengl_GL.context.__context.uniform2ui(location,x,y);
};
lime_graphics_opengl_GL.uniform2uiv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform2uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 2));
};
lime_graphics_opengl_GL.uniform2uivWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform2uivWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform3f = function(location,v0,v1,v2) {
lime_graphics_opengl_GL.context.__context.uniform3f(location,v0,v1,v2);
};
lime_graphics_opengl_GL.uniform3fv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform3fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 3));
};
lime_graphics_opengl_GL.uniform3fvWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform3fvWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform3i = function(location,v0,v1,v2) {
lime_graphics_opengl_GL.context.__context.uniform3i(location,v0,v1,v2);
};
lime_graphics_opengl_GL.uniform3iv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform3iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 3));
};
lime_graphics_opengl_GL.uniform3ivWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform3ivWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform3ui = function(location,v0,v1,v2) {
lime_graphics_opengl_GL.context.__context.uniform3ui(location,v0,v1,v2);
};
lime_graphics_opengl_GL.uniform3uiv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform3uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 3));
};
lime_graphics_opengl_GL.uniform3uivWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform3uivWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform4f = function(location,v0,v1,v2,v3) {
lime_graphics_opengl_GL.context.__context.uniform4f(location,v0,v1,v2,v3);
};
lime_graphics_opengl_GL.uniform4fv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform4fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 4));
};
lime_graphics_opengl_GL.uniform4fvWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform4fvWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform4i = function(location,v0,v1,v2,v3) {
lime_graphics_opengl_GL.context.__context.uniform4i(location,v0,v1,v2,v3);
};
lime_graphics_opengl_GL.uniform4iv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform4iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 4));
};
lime_graphics_opengl_GL.uniform4ivWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform4ivWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniform4ui = function(location,v0,v1,v2,v3) {
lime_graphics_opengl_GL.context.__context.uniform4ui(location,v0,v1,v2,v3);
};
lime_graphics_opengl_GL.uniform4uiv = function(location,count,v) {
lime_graphics_opengl_GL.context.__context.uniform4uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 4));
};
lime_graphics_opengl_GL.uniform4uivWEBGL = function(location,data,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniform4uivWEBGL(location,data,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformBlockBinding = function(program,uniformBlockIndex,uniformBlockBinding) {
lime_graphics_opengl_GL.context.__context.uniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding);
};
lime_graphics_opengl_GL.uniformMatrix2fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 4));
};
lime_graphics_opengl_GL.uniformMatrix2fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix2fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformMatrix2x3fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix2x3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 6));
};
lime_graphics_opengl_GL.uniformMatrix2x3fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix2x3fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformMatrix2x4fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix2x4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 8));
};
lime_graphics_opengl_GL.uniformMatrix2x4fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix2x4fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformMatrix3fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 9));
};
lime_graphics_opengl_GL.uniformMatrix3fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix3fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformMatrix3x2fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix3x2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 6));
};
lime_graphics_opengl_GL.uniformMatrix3x2fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix3x2fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformMatrix3x4fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix3x4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 12));
};
lime_graphics_opengl_GL.uniformMatrix3x4fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix3x4fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformMatrix4fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 16));
};
lime_graphics_opengl_GL.uniformMatrix4fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix4fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformMatrix4x2fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix4x2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 8));
};
lime_graphics_opengl_GL.uniformMatrix4x2fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix4x2fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.uniformMatrix4x3fv = function(location,count,transpose,v) {
lime_graphics_opengl_GL.context.__context.uniformMatrix4x3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 12));
};
lime_graphics_opengl_GL.uniformMatrix4x3fvWEBGL = function(location,transpose,v,srcOffset,srcLength) {
lime_graphics_opengl_GL.context.uniformMatrix4x3fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl_GL.unmapBuffer = function(target) {
return false;
};
lime_graphics_opengl_GL.useProgram = function(program) {
lime_graphics_opengl_GL.__currentProgram = program;
lime_graphics_opengl_GL.context.__context.useProgram(program);
};
lime_graphics_opengl_GL.validateProgram = function(program) {
lime_graphics_opengl_GL.context.__context.validateProgram(program);
};
lime_graphics_opengl_GL.vertexAttrib1f = function(index,v0) {
lime_graphics_opengl_GL.context.__context.vertexAttrib1f(index,v0);
};
lime_graphics_opengl_GL.vertexAttrib1fv = function(index,v) {
lime_graphics_opengl_GL.context.__context.vertexAttrib1fv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v));
};
lime_graphics_opengl_GL.vertexAttrib1fvWEBGL = function(index,v) {
lime_graphics_opengl_GL.context.vertexAttrib1fv(index,v);
};
lime_graphics_opengl_GL.vertexAttrib2f = function(index,v0,v1) {
lime_graphics_opengl_GL.context.__context.vertexAttrib2f(index,v0,v1);
};
lime_graphics_opengl_GL.vertexAttrib2fv = function(index,v) {
lime_graphics_opengl_GL.context.__context.vertexAttrib2fv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v));
};
lime_graphics_opengl_GL.vertexAttrib2fvWEBGL = function(index,v) {
lime_graphics_opengl_GL.context.vertexAttrib2fv(index,v);
};
lime_graphics_opengl_GL.vertexAttrib3f = function(index,v0,v1,v2) {
lime_graphics_opengl_GL.context.__context.vertexAttrib3f(index,v0,v1,v2);
};
lime_graphics_opengl_GL.vertexAttrib3fv = function(index,v) {
lime_graphics_opengl_GL.context.__context.vertexAttrib3fv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v));
};
lime_graphics_opengl_GL.vertexAttrib3fvWEBGL = function(index,v) {
lime_graphics_opengl_GL.context.vertexAttrib3fv(index,v);
};
lime_graphics_opengl_GL.vertexAttrib4f = function(index,v0,v1,v2,v3) {
lime_graphics_opengl_GL.context.__context.vertexAttrib4f(index,v0,v1,v2,v3);
};
lime_graphics_opengl_GL.vertexAttrib4fv = function(index,v) {
lime_graphics_opengl_GL.context.__context.vertexAttrib4fv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v));
};
lime_graphics_opengl_GL.vertexAttrib4fvWEBGL = function(index,v) {
lime_graphics_opengl_GL.context.vertexAttrib4fv(index,v);
};
lime_graphics_opengl_GL.vertexAttribDivisor = function(index,divisor) {
lime_graphics_opengl_GL.context.__context.vertexAttribDivisor(index,divisor);
};
lime_graphics_opengl_GL.vertexAttribI4i = function(index,v0,v1,v2,v3) {
lime_graphics_opengl_GL.context.__context.vertexAttribI4i(index,v0,v1,v2,v3);
};
lime_graphics_opengl_GL.vertexAttribI4iv = function(index,v) {
lime_graphics_opengl_GL.context.__context.vertexAttribI4iv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v));
};
lime_graphics_opengl_GL.vertexAttribI4ivWEBGL = function(index,v) {
lime_graphics_opengl_GL.context.vertexAttribI4iv(index,v);
};
lime_graphics_opengl_GL.vertexAttribI4ui = function(index,v0,v1,v2,v3) {
lime_graphics_opengl_GL.context.__context.vertexAttribI4ui(index,v0,v1,v2,v3);
};
lime_graphics_opengl_GL.vertexAttribI4uiv = function(index,v) {
lime_graphics_opengl_GL.context.__context.vertexAttribI4uiv(index,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v));
};
lime_graphics_opengl_GL.vertexAttribI4uivWEBGL = function(index,v) {
lime_graphics_opengl_GL.context.vertexAttribI4uiv(index,v);
};
lime_graphics_opengl_GL.vertexAttribIPointer = function(index,size,type,stride,offset) {
lime_graphics_opengl_GL.context.__context.vertexAttribIPointer(index,size,type,stride,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)));
};
lime_graphics_opengl_GL.vertexAttribPointer = function(index,size,type,normalized,stride,offset) {
lime_graphics_opengl_GL.context.__context.vertexAttribPointer(index,size,type,normalized,stride,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset));
};
lime_graphics_opengl_GL.viewport = function(x,y,width,height) {
lime_graphics_opengl_GL.context.__context.viewport(x,y,width,height);
};
lime_graphics_opengl_GL.waitSync = function(sync,flags,timeout) {
lime_graphics_opengl_GL.context.__context.waitSync(sync,flags,timeout);
};
lime_graphics_opengl_GL.get_type = function() {
return lime_graphics_opengl_GL.context.type;
};
lime_graphics_opengl_GL.get_version = function() {
return lime_graphics_opengl_GL.context.version;
};
lime_graphics_opengl_GL.__getObjectID = function(object) {
if(object == null) return 0; else return object.id;
};
var lime_graphics_opengl_GLContextType = $hxClasses["lime.graphics.opengl.GLContextType"] = { __ename__ : ["lime","graphics","opengl","GLContextType"], __constructs__ : ["OPENGL","GLES","WEBGL"] };
lime_graphics_opengl_GLContextType.OPENGL = ["OPENGL",0];
lime_graphics_opengl_GLContextType.OPENGL.toString = $estr;
lime_graphics_opengl_GLContextType.OPENGL.__enum__ = lime_graphics_opengl_GLContextType;
lime_graphics_opengl_GLContextType.GLES = ["GLES",1];
lime_graphics_opengl_GLContextType.GLES.toString = $estr;
lime_graphics_opengl_GLContextType.GLES.__enum__ = lime_graphics_opengl_GLContextType;
lime_graphics_opengl_GLContextType.WEBGL = ["WEBGL",2];
lime_graphics_opengl_GLContextType.WEBGL.toString = $estr;
lime_graphics_opengl_GLContextType.WEBGL.__enum__ = lime_graphics_opengl_GLContextType;
var lime_graphics_opengl__$GLES2Context_GLES2Context_$Impl_$ = {};
$hxClasses["lime.graphics.opengl._GLES2Context.GLES2Context_Impl_"] = lime_graphics_opengl__$GLES2Context_GLES2Context_$Impl_$;
lime_graphics_opengl__$GLES2Context_GLES2Context_$Impl_$.__name__ = ["lime","graphics","opengl","_GLES2Context","GLES2Context_Impl_"];
lime_graphics_opengl__$GLES2Context_GLES2Context_$Impl_$.fromGL = function(gl) {
return lime_graphics_opengl_GL.context;
};
var lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$ = {};
$hxClasses["lime.graphics.opengl._GLES3Context.GLES3Context_Impl_"] = lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$;
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.__name__ = ["lime","graphics","opengl","_GLES3Context","GLES3Context_Impl_"];
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.__properties__ = {get_version:"get_version",get_type:"get_type",get_MAX_CLIENT_WAIT_TIMEOUT_WEBGL:"get_MAX_CLIENT_WAIT_TIMEOUT_WEBGL",get_TIMEOUT_IGNORED:"get_TIMEOUT_IGNORED",get_INVALID_INDEX:"get_INVALID_INDEX",get_DEPTH32F_STENCIL8:"get_DEPTH32F_STENCIL8",get_DEPTH_COMPONENT32F:"get_DEPTH_COMPONENT32F",get_DYNAMIC_COPY:"get_DYNAMIC_COPY",get_DYNAMIC_READ:"get_DYNAMIC_READ",get_STATIC_COPY:"get_STATIC_COPY",get_STATIC_READ:"get_STATIC_READ",get_STREAM_COPY:"get_STREAM_COPY",get_STREAM_READ:"get_STREAM_READ",get_DEPTH_COMPONENT24:"get_DEPTH_COMPONENT24",get_MAX:"get_MAX",get_MIN:"get_MIN",get_STENCIL:"get_STENCIL",get_DEPTH:"get_DEPTH",get_COLOR:"get_COLOR",get_SYNC_FLUSH_COMMANDS_BIT:"get_SYNC_FLUSH_COMMANDS_BIT",get_WAIT_FAILED:"get_WAIT_FAILED",get_CONDITION_SATISFIED:"get_CONDITION_SATISFIED",get_TIMEOUT_EXPIRED:"get_TIMEOUT_EXPIRED",get_ALREADY_SIGNALED:"get_ALREADY_SIGNALED",get_SIGNALED:"get_SIGNALED",get_UNSIGNALED:"get_UNSIGNALED",get_SYNC_GPU_COMMANDS_COMPLETE:"get_SYNC_GPU_COMMANDS_COMPLETE",get_SYNC_FENCE:"get_SYNC_FENCE",get_SYNC_FLAGS:"get_SYNC_FLAGS",get_SYNC_STATUS:"get_SYNC_STATUS",get_SYNC_CONDITION:"get_SYNC_CONDITION",get_OBJECT_TYPE:"get_OBJECT_TYPE",get_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:"get_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",get_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:"get_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",get_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:"get_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",get_UNIFORM_BLOCK_ACTIVE_UNIFORMS:"get_UNIFORM_BLOCK_ACTIVE_UNIFORMS",get_UNIFORM_BLOCK_DATA_SIZE:"get_UNIFORM_BLOCK_DATA_SIZE",get_UNIFORM_BLOCK_BINDING:"get_UNIFORM_BLOCK_BINDING",get_UNIFORM_IS_ROW_MAJOR:"get_UNIFORM_IS_ROW_MAJOR",get_UNIFORM_MATRIX_STRIDE:"get_UNIFORM_MATRIX_STRIDE",get_UNIFORM_ARRAY_STRIDE:"get_UNIFORM_ARRAY_STRIDE",get_UNIFORM_OFFSET:"get_UNIFORM_OFFSET",get_UNIFORM_BLOCK_INDEX:"get_UNIFORM_BLOCK_INDEX",get_UNIFORM_SIZE:"get_UNIFORM_SIZE",get_UNIFORM_TYPE:"get_UNIFORM_TYPE",get_ACTIVE_UNIFORM_BLOCKS:"get_ACTIVE_UNIFORM_BLOCKS",get_UNIFORM_BUFFER_OFFSET_ALIGNMENT:"get_UNIFORM_BUFFER_OFFSET_ALIGNMENT",get_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:"get_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",get_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:"get_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",get_MAX_UNIFORM_BLOCK_SIZE:"get_MAX_UNIFORM_BLOCK_SIZE",get_MAX_UNIFORM_BUFFER_BINDINGS:"get_MAX_UNIFORM_BUFFER_BINDINGS",get_MAX_COMBINED_UNIFORM_BLOCKS:"get_MAX_COMBINED_UNIFORM_BLOCKS",get_MAX_FRAGMENT_UNIFORM_BLOCKS:"get_MAX_FRAGMENT_UNIFORM_BLOCKS",get_MAX_VERTEX_UNIFORM_BLOCKS:"get_MAX_VERTEX_UNIFORM_BLOCKS",get_UNIFORM_BUFFER_SIZE:"get_UNIFORM_BUFFER_SIZE",get_UNIFORM_BUFFER_START:"get_UNIFORM_BUFFER_START",get_UNIFORM_BUFFER_BINDING:"get_UNIFORM_BUFFER_BINDING",get_UNIFORM_BUFFER:"get_UNIFORM_BUFFER",get_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:"get_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:"get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",get_RENDERBUFFER_SAMPLES:"get_RENDERBUFFER_SAMPLES",get_READ_FRAMEBUFFER_BINDING:"get_READ_FRAMEBUFFER_BINDING",get_DRAW_FRAMEBUFFER:"get_DRAW_FRAMEBUFFER",get_READ_FRAMEBUFFER:"get_READ_FRAMEBUFFER",get_DRAW_FRAMEBUFFER_BINDING:"get_DRAW_FRAMEBUFFER_BINDING",get_DEPTH24_STENCIL8:"get_DEPTH24_STENCIL8",get_FRAMEBUFFER_DEFAULT:"get_FRAMEBUFFER_DEFAULT",get_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:"get_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",get_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:"get_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",get_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:"get_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",get_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:"get_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",get_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:"get_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",get_FRAMEBUFFER_ATTACHMENT_RED_SIZE:"get_FRAMEBUFFER_ATTACHMENT_RED_SIZE",get_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:"get_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",get_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:"get_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",get_TRANSFORM_FEEDBACK_BINDING:"get_TRANSFORM_FEEDBACK_BINDING",get_TRANSFORM_FEEDBACK_ACTIVE:"get_TRANSFORM_FEEDBACK_ACTIVE",get_TRANSFORM_FEEDBACK_PAUSED:"get_TRANSFORM_FEEDBACK_PAUSED",get_TRANSFORM_FEEDBACK:"get_TRANSFORM_FEEDBACK",get_TRANSFORM_FEEDBACK_BUFFER_BINDING:"get_TRANSFORM_FEEDBACK_BUFFER_BINDING",get_TRANSFORM_FEEDBACK_BUFFER:"get_TRANSFORM_FEEDBACK_BUFFER",get_SEPARATE_ATTRIBS:"get_SEPARATE_ATTRIBS",get_INTERLEAVED_ATTRIBS:"get_INTERLEAVED_ATTRIBS",get_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:"get_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",get_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:"get_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",get_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:"get_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",get_TRANSFORM_FEEDBACK_BUFFER_SIZE:"get_TRANSFORM_FEEDBACK_BUFFER_SIZE",get_TRANSFORM_FEEDBACK_BUFFER_START:"get_TRANSFORM_FEEDBACK_BUFFER_START",get_TRANSFORM_FEEDBACK_VARYINGS:"get_TRANSFORM_FEEDBACK_VARYINGS",get_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:"get_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",get_TRANSFORM_FEEDBACK_BUFFER_MODE:"get_TRANSFORM_FEEDBACK_BUFFER_MODE",get_VERTEX_ATTRIB_ARRAY_DIVISOR:"get_VERTEX_ATTRIB_ARRAY_DIVISOR",get_VERTEX_ATTRIB_ARRAY_INTEGER:"get_VERTEX_ATTRIB_ARRAY_INTEGER",get_SIGNED_NORMALIZED:"get_SIGNED_NORMALIZED",get_UNSIGNED_NORMALIZED:"get_UNSIGNED_NORMALIZED",get_UNSIGNED_INT_VEC4:"get_UNSIGNED_INT_VEC4",get_UNSIGNED_INT_VEC3:"get_UNSIGNED_INT_VEC3",get_UNSIGNED_INT_VEC2:"get_UNSIGNED_INT_VEC2",get_FLOAT_MAT4x3:"get_FLOAT_MAT4x3",get_FLOAT_MAT4x2:"get_FLOAT_MAT4x2",get_FLOAT_MAT3x4:"get_FLOAT_MAT3x4",get_FLOAT_MAT3x2:"get_FLOAT_MAT3x2",get_FLOAT_MAT2x4:"get_FLOAT_MAT2x4",get_FLOAT_MAT2x3:"get_FLOAT_MAT2x3",get_COPY_WRITE_BUFFER_BINDING:"get_COPY_WRITE_BUFFER_BINDING",get_COPY_READ_BUFFER_BINDING:"get_COPY_READ_BUFFER_BINDING",get_COPY_WRITE_BUFFER:"get_COPY_WRITE_BUFFER",get_COPY_READ_BUFFER:"get_COPY_READ_BUFFER",get_PIXEL_UNPACK_BUFFER_BINDING:"get_PIXEL_UNPACK_BUFFER_BINDING",get_PIXEL_PACK_BUFFER_BINDING:"get_PIXEL_PACK_BUFFER_BINDING",get_PIXEL_UNPACK_BUFFER:"get_PIXEL_UNPACK_BUFFER",get_PIXEL_PACK_BUFFER:"get_PIXEL_PACK_BUFFER",get_SAMPLER_BINDING:"get_SAMPLER_BINDING",get_MAX_SAMPLES:"get_MAX_SAMPLES",get_UNSIGNED_INT_SAMPLER_2D_ARRAY:"get_UNSIGNED_INT_SAMPLER_2D_ARRAY",get_UNSIGNED_INT_SAMPLER_CUBE:"get_UNSIGNED_INT_SAMPLER_CUBE",get_UNSIGNED_INT_SAMPLER_3D:"get_UNSIGNED_INT_SAMPLER_3D",get_UNSIGNED_INT_SAMPLER_2D:"get_UNSIGNED_INT_SAMPLER_2D",get_INT_SAMPLER_2D_ARRAY:"get_INT_SAMPLER_2D_ARRAY",get_INT_SAMPLER_CUBE:"get_INT_SAMPLER_CUBE",get_INT_SAMPLER_3D:"get_INT_SAMPLER_3D",get_INT_SAMPLER_2D:"get_INT_SAMPLER_2D",get_SAMPLER_CUBE_SHADOW:"get_SAMPLER_CUBE_SHADOW",get_SAMPLER_2D_ARRAY_SHADOW:"get_SAMPLER_2D_ARRAY_SHADOW",get_SAMPLER_2D_ARRAY:"get_SAMPLER_2D_ARRAY",get_SAMPLER_2D_SHADOW:"get_SAMPLER_2D_SHADOW",get_SAMPLER_3D:"get_SAMPLER_3D",get_COLOR_ATTACHMENT15:"get_COLOR_ATTACHMENT15",get_COLOR_ATTACHMENT14:"get_COLOR_ATTACHMENT14",get_COLOR_ATTACHMENT13:"get_COLOR_ATTACHMENT13",get_COLOR_ATTACHMENT12:"get_COLOR_ATTACHMENT12",get_COLOR_ATTACHMENT11:"get_COLOR_ATTACHMENT11",get_COLOR_ATTACHMENT10:"get_COLOR_ATTACHMENT10",get_COLOR_ATTACHMENT9:"get_COLOR_ATTACHMENT9",get_COLOR_ATTACHMENT8:"get_COLOR_ATTACHMENT8",get_COLOR_ATTACHMENT7:"get_COLOR_ATTACHMENT7",get_COLOR_ATTACHMENT6:"get_COLOR_ATTACHMENT6",get_COLOR_ATTACHMENT5:"get_COLOR_ATTACHMENT5",get_COLOR_ATTACHMENT4:"get_COLOR_ATTACHMENT4",get_COLOR_ATTACHMENT3:"get_COLOR_ATTACHMENT3",get_COLOR_ATTACHMENT2:"get_COLOR_ATTACHMENT2",get_COLOR_ATTACHMENT1:"get_COLOR_ATTACHMENT1",get_MAX_COLOR_ATTACHMENTS:"get_MAX_COLOR_ATTACHMENTS",get_DRAW_BUFFER15:"get_DRAW_BUFFER15",get_DRAW_BUFFER14:"get_DRAW_BUFFER14",get_DRAW_BUFFER13:"get_DRAW_BUFFER13",get_DRAW_BUFFER12:"get_DRAW_BUFFER12",get_DRAW_BUFFER11:"get_DRAW_BUFFER11",get_DRAW_BUFFER10:"get_DRAW_BUFFER10",get_DRAW_BUFFER9:"get_DRAW_BUFFER9",get_DRAW_BUFFER8:"get_DRAW_BUFFER8",get_DRAW_BUFFER7:"get_DRAW_BUFFER7",get_DRAW_BUFFER6:"get_DRAW_BUFFER6",get_DRAW_BUFFER5:"get_DRAW_BUFFER5",get_DRAW_BUFFER4:"get_DRAW_BUFFER4",get_DRAW_BUFFER3:"get_DRAW_BUFFER3",get_DRAW_BUFFER2:"get_DRAW_BUFFER2",get_DRAW_BUFFER1:"get_DRAW_BUFFER1",get_DRAW_BUFFER0:"get_DRAW_BUFFER0",get_MAX_DRAW_BUFFERS:"get_MAX_DRAW_BUFFERS",get_ANY_SAMPLES_PASSED_CONSERVATIVE:"get_ANY_SAMPLES_PASSED_CONSERVATIVE",get_ANY_SAMPLES_PASSED:"get_ANY_SAMPLES_PASSED",get_QUERY_RESULT_AVAILABLE:"get_QUERY_RESULT_AVAILABLE",get_QUERY_RESULT:"get_QUERY_RESULT",get_CURRENT_QUERY:"get_CURRENT_QUERY",get_INT_2_10_10_10_REV:"get_INT_2_10_10_10_REV",get_RG_INTEGER:"get_RG_INTEGER",get_RG:"get_RG",get_HALF_FLOAT:"get_HALF_FLOAT",get_UNSIGNED_INT_24_8:"get_UNSIGNED_INT_24_8",get_FLOAT_32_UNSIGNED_INT_24_8_REV:"get_FLOAT_32_UNSIGNED_INT_24_8_REV",get_UNSIGNED_INT_5_9_9_9_REV:"get_UNSIGNED_INT_5_9_9_9_REV",get_UNSIGNED_INT_10F_11F_11F_REV:"get_UNSIGNED_INT_10F_11F_11F_REV",get_UNSIGNED_INT_2_10_10_10_REV:"get_UNSIGNED_INT_2_10_10_10_REV",get_TEXTURE_IMMUTABLE_LEVELS:"get_TEXTURE_IMMUTABLE_LEVELS",get_TEXTURE_IMMUTABLE_FORMAT:"get_TEXTURE_IMMUTABLE_FORMAT",get_RGB10_A2UI:"get_RGB10_A2UI",get_RGBA8_SNORM:"get_RGBA8_SNORM",get_RGB8_SNORM:"get_RGB8_SNORM",get_RG8_SNORM:"get_RG8_SNORM",get_R8_SNORM:"get_R8_SNORM",get_RG32UI:"get_RG32UI",get_RG32I:"get_RG32I",get_RG16UI:"get_RG16UI",get_RG16I:"get_RG16I",get_RG8UI:"get_RG8UI",get_RG8I:"get_RG8I",get_R32UI:"get_R32UI",get_R32I:"get_R32I",get_R16UI:"get_R16UI",get_R16I:"get_R16I",get_R8UI:"get_R8UI",get_R8I:"get_R8I",get_RG32F:"get_RG32F",get_RG16F:"get_RG16F",get_R32F:"get_R32F",get_R16F:"get_R16F",get_RG8:"get_RG8",get_R8:"get_R8",get_RGBA_INTEGER:"get_RGBA_INTEGER",get_RGB_INTEGER:"get_RGB_INTEGER",get_RED_INTEGER:"get_RED_INTEGER",get_RGB8I:"get_RGB8I",get_RGBA8I:"get_RGBA8I",get_RGB16I:"get_RGB16I",get_RGBA16I:"get_RGBA16I",get_RGB32I:"get_RGB32I",get_RGBA32I:"get_RGBA32I",get_RGB8UI:"get_RGB8UI",get_RGBA8UI:"get_RGBA8UI",get_RGB16UI:"get_RGB16UI",get_RGBA16UI:"get_RGBA16UI",get_RGB32UI:"get_RGB32UI",get_RGBA32UI:"get_RGBA32UI",get_RGB9_E5:"get_RGB9_E5",get_R11F_G11F_B10F:"get_R11F_G11F_B10F",get_TEXTURE_BINDING_2D_ARRAY:"get_TEXTURE_BINDING_2D_ARRAY",get_TEXTURE_2D_ARRAY:"get_TEXTURE_2D_ARRAY",get_RGB16F:"get_RGB16F",get_RGBA16F:"get_RGBA16F",get_RGB32F:"get_RGB32F",get_RGBA32F:"get_RGBA32F",get_COMPARE_REF_TO_TEXTURE:"get_COMPARE_REF_TO_TEXTURE",get_SRGB8_ALPHA8:"get_SRGB8_ALPHA8",get_SRGB8:"get_SRGB8",get_SRGB:"get_SRGB",get_TEXTURE_COMPARE_FUNC:"get_TEXTURE_COMPARE_FUNC",get_TEXTURE_COMPARE_MODE:"get_TEXTURE_COMPARE_MODE",get_TEXTURE_MAX_LEVEL:"get_TEXTURE_MAX_LEVEL",get_TEXTURE_BASE_LEVEL:"get_TEXTURE_BASE_LEVEL",get_TEXTURE_MAX_LOD:"get_TEXTURE_MAX_LOD",get_TEXTURE_MIN_LOD:"get_TEXTURE_MIN_LOD",get_TEXTURE_WRAP_R:"get_TEXTURE_WRAP_R",get_TEXTURE_3D:"get_TEXTURE_3D",get_RGB10_A2:"get_RGB10_A2",get_RGBA8:"get_RGBA8",get_RGB8:"get_RGB8",get_RED:"get_RED",get_MAX_ELEMENT_INDEX:"get_MAX_ELEMENT_INDEX",get_MAX_SERVER_WAIT_TIMEOUT:"get_MAX_SERVER_WAIT_TIMEOUT",get_MAX_FRAGMENT_INPUT_COMPONENTS:"get_MAX_FRAGMENT_INPUT_COMPONENTS",get_MAX_VERTEX_OUTPUT_COMPONENTS:"get_MAX_VERTEX_OUTPUT_COMPONENTS",get_VERTEX_ARRAY_BINDING:"get_VERTEX_ARRAY_BINDING",get_RASTERIZER_DISCARD:"get_RASTERIZER_DISCARD",get_FRAGMENT_SHADER_DERIVATIVE_HINT:"get_FRAGMENT_SHADER_DERIVATIVE_HINT",get_MAX_VARYING_COMPONENTS:"get_MAX_VARYING_COMPONENTS",get_MAX_PROGRAM_TEXEL_OFFSET:"get_MAX_PROGRAM_TEXEL_OFFSET",get_MIN_PROGRAM_TEXEL_OFFSET:"get_MIN_PROGRAM_TEXEL_OFFSET",get_MAX_ARRAY_TEXTURE_LAYERS:"get_MAX_ARRAY_TEXTURE_LAYERS",get_MAX_VERTEX_UNIFORM_COMPONENTS:"get_MAX_VERTEX_UNIFORM_COMPONENTS",get_MAX_FRAGMENT_UNIFORM_COMPONENTS:"get_MAX_FRAGMENT_UNIFORM_COMPONENTS",get_MAX_TEXTURE_LOD_BIAS:"get_MAX_TEXTURE_LOD_BIAS",get_MAX_ELEMENTS_INDICES:"get_MAX_ELEMENTS_INDICES",get_MAX_ELEMENTS_VERTICES:"get_MAX_ELEMENTS_VERTICES",get_MAX_3D_TEXTURE_SIZE:"get_MAX_3D_TEXTURE_SIZE",get_UNPACK_IMAGE_HEIGHT:"get_UNPACK_IMAGE_HEIGHT",get_UNPACK_SKIP_IMAGES:"get_UNPACK_SKIP_IMAGES",get_TEXTURE_BINDING_3D:"get_TEXTURE_BINDING_3D",get_PACK_SKIP_PIXELS:"get_PACK_SKIP_PIXELS",get_PACK_SKIP_ROWS:"get_PACK_SKIP_ROWS",get_PACK_ROW_LENGTH:"get_PACK_ROW_LENGTH",get_UNPACK_SKIP_PIXELS:"get_UNPACK_SKIP_PIXELS",get_UNPACK_SKIP_ROWS:"get_UNPACK_SKIP_ROWS",get_UNPACK_ROW_LENGTH:"get_UNPACK_ROW_LENGTH",get_READ_BUFFER:"get_READ_BUFFER",get_BROWSER_DEFAULT_WEBGL:"get_BROWSER_DEFAULT_WEBGL",get_UNPACK_COLORSPACE_CONVERSION_WEBGL:"get_UNPACK_COLORSPACE_CONVERSION_WEBGL",get_CONTEXT_LOST_WEBGL:"get_CONTEXT_LOST_WEBGL",get_UNPACK_PREMULTIPLY_ALPHA_WEBGL:"get_UNPACK_PREMULTIPLY_ALPHA_WEBGL",get_UNPACK_FLIP_Y_WEBGL:"get_UNPACK_FLIP_Y_WEBGL",get_INVALID_FRAMEBUFFER_OPERATION:"get_INVALID_FRAMEBUFFER_OPERATION",get_MAX_RENDERBUFFER_SIZE:"get_MAX_RENDERBUFFER_SIZE",get_RENDERBUFFER_BINDING:"get_RENDERBUFFER_BINDING",get_FRAMEBUFFER_BINDING:"get_FRAMEBUFFER_BINDING",get_FRAMEBUFFER_UNSUPPORTED:"get_FRAMEBUFFER_UNSUPPORTED",get_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:"get_FRAMEBUFFER_INCOMPLETE_DIMENSIONS",get_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:"get_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",get_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:"get_FRAMEBUFFER_INCOMPLETE_ATTACHMENT",get_FRAMEBUFFER_COMPLETE:"get_FRAMEBUFFER_COMPLETE",get_NONE:"get_NONE",get_DEPTH_STENCIL_ATTACHMENT:"get_DEPTH_STENCIL_ATTACHMENT",get_STENCIL_ATTACHMENT:"get_STENCIL_ATTACHMENT",get_DEPTH_ATTACHMENT:"get_DEPTH_ATTACHMENT",get_COLOR_ATTACHMENT0:"get_COLOR_ATTACHMENT0",get_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:"get_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:"get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",get_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:"get_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",get_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:"get_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",get_RENDERBUFFER_STENCIL_SIZE:"get_RENDERBUFFER_STENCIL_SIZE",get_RENDERBUFFER_DEPTH_SIZE:"get_RENDERBUFFER_DEPTH_SIZE",get_RENDERBUFFER_ALPHA_SIZE:"get_RENDERBUFFER_ALPHA_SIZE",get_RENDERBUFFER_BLUE_SIZE:"get_RENDERBUFFER_BLUE_SIZE",get_RENDERBUFFER_GREEN_SIZE:"get_RENDERBUFFER_GREEN_SIZE",get_RENDERBUFFER_RED_SIZE:"get_RENDERBUFFER_RED_SIZE",get_RENDERBUFFER_INTERNAL_FORMAT:"get_RENDERBUFFER_INTERNAL_FORMAT",get_RENDERBUFFER_HEIGHT:"get_RENDERBUFFER_HEIGHT",get_RENDERBUFFER_WIDTH:"get_RENDERBUFFER_WIDTH",get_DEPTH_STENCIL:"get_DEPTH_STENCIL",get_STENCIL_INDEX8:"get_STENCIL_INDEX8",get_STENCIL_INDEX:"get_STENCIL_INDEX",get_DEPTH_COMPONENT16:"get_DEPTH_COMPONENT16",get_RGB565:"get_RGB565",get_RGB5_A1:"get_RGB5_A1",get_RGBA4:"get_RGBA4",get_RENDERBUFFER:"get_RENDERBUFFER",get_FRAMEBUFFER:"get_FRAMEBUFFER",get_HIGH_INT:"get_HIGH_INT",get_MEDIUM_INT:"get_MEDIUM_INT",get_LOW_INT:"get_LOW_INT",get_HIGH_FLOAT:"get_HIGH_FLOAT",get_MEDIUM_FLOAT:"get_MEDIUM_FLOAT",get_LOW_FLOAT:"get_LOW_FLOAT",get_COMPILE_STATUS:"get_COMPILE_STATUS",get_POINT_SPRITE:"get_POINT_SPRITE",get_VERTEX_PROGRAM_POINT_SIZE:"get_VERTEX_PROGRAM_POINT_SIZE",get_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:"get_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",get_VERTEX_ATTRIB_ARRAY_POINTER:"get_VERTEX_ATTRIB_ARRAY_POINTER",get_VERTEX_ATTRIB_ARRAY_NORMALIZED:"get_VERTEX_ATTRIB_ARRAY_NORMALIZED",get_VERTEX_ATTRIB_ARRAY_TYPE:"get_VERTEX_ATTRIB_ARRAY_TYPE",get_VERTEX_ATTRIB_ARRAY_STRIDE:"get_VERTEX_ATTRIB_ARRAY_STRIDE",get_VERTEX_ATTRIB_ARRAY_SIZE:"get_VERTEX_ATTRIB_ARRAY_SIZE",get_VERTEX_ATTRIB_ARRAY_ENABLED:"get_VERTEX_ATTRIB_ARRAY_ENABLED",get_SAMPLER_CUBE:"get_SAMPLER_CUBE",get_SAMPLER_2D:"get_SAMPLER_2D",get_FLOAT_MAT4:"get_FLOAT_MAT4",get_FLOAT_MAT3:"get_FLOAT_MAT3",get_FLOAT_MAT2:"get_FLOAT_MAT2",get_BOOL_VEC4:"get_BOOL_VEC4",get_BOOL_VEC3:"get_BOOL_VEC3",get_BOOL_VEC2:"get_BOOL_VEC2",get_BOOL:"get_BOOL",get_INT_VEC4:"get_INT_VEC4",get_INT_VEC3:"get_INT_VEC3",get_INT_VEC2:"get_INT_VEC2",get_FLOAT_VEC4:"get_FLOAT_VEC4",get_FLOAT_VEC3:"get_FLOAT_VEC3",get_FLOAT_VEC2:"get_FLOAT_VEC2",get_MIRRORED_REPEAT:"get_MIRRORED_REPEAT",get_CLAMP_TO_EDGE:"get_CLAMP_TO_EDGE",get_REPEAT:"get_REPEAT",get_ACTIVE_TEXTURE:"get_ACTIVE_TEXTURE",get_TEXTURE31:"get_TEXTURE31",get_TEXTURE30:"get_TEXTURE30",get_TEXTURE29:"get_TEXTURE29",get_TEXTURE28:"get_TEXTURE28",get_TEXTURE27:"get_TEXTURE27",get_TEXTURE26:"get_TEXTURE26",get_TEXTURE25:"get_TEXTURE25",get_TEXTURE24:"get_TEXTURE24",get_TEXTURE23:"get_TEXTURE23",get_TEXTURE22:"get_TEXTURE22",get_TEXTURE21:"get_TEXTURE21",get_TEXTURE20:"get_TEXTURE20",get_TEXTURE19:"get_TEXTURE19",get_TEXTURE18:"get_TEXTURE18",get_TEXTURE17:"get_TEXTURE17",get_TEXTURE16:"get_TEXTURE16",get_TEXTURE15:"get_TEXTURE15",get_TEXTURE14:"get_TEXTURE14",get_TEXTURE13:"get_TEXTURE13",get_TEXTURE12:"get_TEXTURE12",get_TEXTURE11:"get_TEXTURE11",get_TEXTURE10:"get_TEXTURE10",get_TEXTURE9:"get_TEXTURE9",get_TEXTURE8:"get_TEXTURE8",get_TEXTURE7:"get_TEXTURE7",get_TEXTURE6:"get_TEXTURE6",get_TEXTURE5:"get_TEXTURE5",get_TEXTURE4:"get_TEXTURE4",get_TEXTURE3:"get_TEXTURE3",get_TEXTURE2:"get_TEXTURE2",get_TEXTURE1:"get_TEXTURE1",get_TEXTURE0:"get_TEXTURE0",get_MAX_CUBE_MAP_TEXTURE_SIZE:"get_MAX_CUBE_MAP_TEXTURE_SIZE",get_TEXTURE_CUBE_MAP_NEGATIVE_Z:"get_TEXTURE_CUBE_MAP_NEGATIVE_Z",get_TEXTURE_CUBE_MAP_POSITIVE_Z:"get_TEXTURE_CUBE_MAP_POSITIVE_Z",get_TEXTURE_CUBE_MAP_NEGATIVE_Y:"get_TEXTURE_CUBE_MAP_NEGATIVE_Y",get_TEXTURE_CUBE_MAP_POSITIVE_Y:"get_TEXTURE_CUBE_MAP_POSITIVE_Y",get_TEXTURE_CUBE_MAP_NEGATIVE_X:"get_TEXTURE_CUBE_MAP_NEGATIVE_X",get_TEXTURE_CUBE_MAP_POSITIVE_X:"get_TEXTURE_CUBE_MAP_POSITIVE_X",get_TEXTURE_BINDING_CUBE_MAP:"get_TEXTURE_BINDING_CUBE_MAP",get_TEXTURE_CUBE_MAP:"get_TEXTURE_CUBE_MAP",get_TEXTURE:"get_TEXTURE",get_TEXTURE_2D:"get_TEXTURE_2D",get_TEXTURE_WRAP_T:"get_TEXTURE_WRAP_T",get_TEXTURE_WRAP_S:"get_TEXTURE_WRAP_S",get_TEXTURE_MIN_FILTER:"get_TEXTURE_MIN_FILTER",get_TEXTURE_MAG_FILTER:"get_TEXTURE_MAG_FILTER",get_LINEAR_MIPMAP_LINEAR:"get_LINEAR_MIPMAP_LINEAR",get_NEAREST_MIPMAP_LINEAR:"get_NEAREST_MIPMAP_LINEAR",get_LINEAR_MIPMAP_NEAREST:"get_LINEAR_MIPMAP_NEAREST",get_NEAREST_MIPMAP_NEAREST:"get_NEAREST_MIPMAP_NEAREST",get_LINEAR:"get_LINEAR",get_NEAREST:"get_NEAREST",get_VERSION:"get_VERSION",get_RENDERER:"get_RENDERER",get_VENDOR:"get_VENDOR",get_DECR_WRAP:"get_DECR_WRAP",get_INCR_WRAP:"get_INCR_WRAP",get_INVERT:"get_INVERT",get_DECR:"get_DECR",get_INCR:"get_INCR",get_REPLACE:"get_REPLACE",get_KEEP:"get_KEEP",get_ALWAYS:"get_ALWAYS",get_GEQUAL:"get_GEQUAL",get_NOTEQUAL:"get_NOTEQUAL",get_GREATER:"get_GREATER",get_LEQUAL:"get_LEQUAL",get_EQUAL:"get_EQUAL",get_LESS:"get_LESS",get_NEVER:"get_NEVER",get_CURRENT_PROGRAM:"get_CURRENT_PROGRAM",get_SHADING_LANGUAGE_VERSION:"get_SHADING_LANGUAGE_VERSION",get_ACTIVE_ATTRIBUTES:"get_ACTIVE_ATTRIBUTES",get_ACTIVE_UNIFORMS:"get_ACTIVE_UNIFORMS",get_ATTACHED_SHADERS:"get_ATTACHED_SHADERS",get_VALIDATE_STATUS:"get_VALIDATE_STATUS",get_LINK_STATUS:"get_LINK_STATUS",get_DELETE_STATUS:"get_DELETE_STATUS",get_SHADER_TYPE:"get_SHADER_TYPE",get_MAX_FRAGMENT_UNIFORM_VECTORS:"get_MAX_FRAGMENT_UNIFORM_VECTORS",get_MAX_TEXTURE_IMAGE_UNITS:"get_MAX_TEXTURE_IMAGE_UNITS",get_MAX_VERTEX_TEXTURE_IMAGE_UNITS:"get_MAX_VERTEX_TEXTURE_IMAGE_UNITS",get_MAX_COMBINED_TEXTURE_IMAGE_UNITS:"get_MAX_COMBINED_TEXTURE_IMAGE_UNITS",get_MAX_VARYING_VECTORS:"get_MAX_VARYING_VECTORS",get_MAX_VERTEX_UNIFORM_VECTORS:"get_MAX_VERTEX_UNIFORM_VECTORS",get_MAX_VERTEX_ATTRIBS:"get_MAX_VERTEX_ATTRIBS",get_VERTEX_SHADER:"get_VERTEX_SHADER",get_FRAGMENT_SHADER:"get_FRAGMENT_SHADER",get_UNSIGNED_SHORT_5_6_5:"get_UNSIGNED_SHORT_5_6_5",get_UNSIGNED_SHORT_5_5_5_1:"get_UNSIGNED_SHORT_5_5_5_1",get_UNSIGNED_SHORT_4_4_4_4:"get_UNSIGNED_SHORT_4_4_4_4",get_LUMINANCE_ALPHA:"get_LUMINANCE_ALPHA",get_LUMINANCE:"get_LUMINANCE",get_RGBA:"get_RGBA",get_RGB:"get_RGB",get_ALPHA:"get_ALPHA",get_DEPTH_COMPONENT:"get_DEPTH_COMPONENT",get_FLOAT:"get_FLOAT",get_UNSIGNED_INT:"get_UNSIGNED_INT",get_INT:"get_INT",get_UNSIGNED_SHORT:"get_UNSIGNED_SHORT",get_SHORT:"get_SHORT",get_UNSIGNED_BYTE:"get_UNSIGNED_BYTE",get_BYTE:"get_BYTE",get_GENERATE_MIPMAP_HINT:"get_GENERATE_MIPMAP_HINT",get_NICEST:"get_NICEST",get_FASTEST:"get_FASTEST",get_DONT_CARE:"get_DONT_CARE",get_COMPRESSED_TEXTURE_FORMATS:"get_COMPRESSED_TEXTURE_FORMATS",get_SAMPLE_COVERAGE_INVERT:"get_SAMPLE_COVERAGE_INVERT",get_SAMPLE_COVERAGE_VALUE:"get_SAMPLE_COVERAGE_VALUE",get_SAMPLES:"get_SAMPLES",get_SAMPLE_BUFFERS:"get_SAMPLE_BUFFERS",get_TEXTURE_BINDING_2D:"get_TEXTURE_BINDING_2D",get_POLYGON_OFFSET_FACTOR:"get_POLYGON_OFFSET_FACTOR",get_POLYGON_OFFSET_UNITS:"get_POLYGON_OFFSET_UNITS",get_STENCIL_BITS:"get_STENCIL_BITS",get_DEPTH_BITS:"get_DEPTH_BITS",get_ALPHA_BITS:"get_ALPHA_BITS",get_BLUE_BITS:"get_BLUE_BITS",get_GREEN_BITS:"get_GREEN_BITS",get_RED_BITS:"get_RED_BITS",get_SUBPIXEL_BITS:"get_SUBPIXEL_BITS",get_MAX_VIEWPORT_DIMS:"get_MAX_VIEWPORT_DIMS",get_MAX_TEXTURE_SIZE:"get_MAX_TEXTURE_SIZE",get_PACK_ALIGNMENT:"get_PACK_ALIGNMENT",get_UNPACK_ALIGNMENT:"get_UNPACK_ALIGNMENT",get_COLOR_WRITEMASK:"get_COLOR_WRITEMASK",get_COLOR_CLEAR_VALUE:"get_COLOR_CLEAR_VALUE",get_SCISSOR_BOX:"get_SCISSOR_BOX",get_VIEWPORT:"get_VIEWPORT",get_STENCIL_BACK_WRITEMASK:"get_STENCIL_BACK_WRITEMASK",get_STENCIL_BACK_VALUE_MASK:"get_STENCIL_BACK_VALUE_MASK",get_STENCIL_BACK_REF:"get_STENCIL_BACK_REF",get_STENCIL_BACK_PASS_DEPTH_PASS:"get_STENCIL_BACK_PASS_DEPTH_PASS",get_STENCIL_BACK_PASS_DEPTH_FAIL:"get_STENCIL_BACK_PASS_DEPTH_FAIL",get_STENCIL_BACK_FAIL:"get_STENCIL_BACK_FAIL",get_STENCIL_BACK_FUNC:"get_STENCIL_BACK_FUNC",get_STENCIL_WRITEMASK:"get_STENCIL_WRITEMASK",get_STENCIL_VALUE_MASK:"get_STENCIL_VALUE_MASK",get_STENCIL_REF:"get_STENCIL_REF",get_STENCIL_PASS_DEPTH_PASS:"get_STENCIL_PASS_DEPTH_PASS",get_STENCIL_PASS_DEPTH_FAIL:"get_STENCIL_PASS_DEPTH_FAIL",get_STENCIL_FAIL:"get_STENCIL_FAIL",get_STENCIL_FUNC:"get_STENCIL_FUNC",get_STENCIL_CLEAR_VALUE:"get_STENCIL_CLEAR_VALUE",get_DEPTH_FUNC:"get_DEPTH_FUNC",get_DEPTH_CLEAR_VALUE:"get_DEPTH_CLEAR_VALUE",get_DEPTH_WRITEMASK:"get_DEPTH_WRITEMASK",get_DEPTH_RANGE:"get_DEPTH_RANGE",get_FRONT_FACE:"get_FRONT_FACE",get_CULL_FACE_MODE:"get_CULL_FACE_MODE",get_ALIASED_LINE_WIDTH_RANGE:"get_ALIASED_LINE_WIDTH_RANGE",get_ALIASED_POINT_SIZE_RANGE:"get_ALIASED_POINT_SIZE_RANGE",get_LINE_WIDTH:"get_LINE_WIDTH",get_CCW:"get_CCW",get_CW:"get_CW",get_OUT_OF_MEMORY:"get_OUT_OF_MEMORY",get_INVALID_OPERATION:"get_INVALID_OPERATION",get_INVALID_VALUE:"get_INVALID_VALUE",get_INVALID_ENUM:"get_INVALID_ENUM",get_NO_ERROR:"get_NO_ERROR",get_SAMPLE_COVERAGE:"get_SAMPLE_COVERAGE",get_SAMPLE_ALPHA_TO_COVERAGE:"get_SAMPLE_ALPHA_TO_COVERAGE",get_POLYGON_OFFSET_FILL:"get_POLYGON_OFFSET_FILL",get_SCISSOR_TEST:"get_SCISSOR_TEST",get_DEPTH_TEST:"get_DEPTH_TEST",get_STENCIL_TEST:"get_STENCIL_TEST",get_DITHER:"get_DITHER",get_BLEND:"get_BLEND",get_CULL_FACE:"get_CULL_FACE",get_FRONT_AND_BACK:"get_FRONT_AND_BACK",get_BACK:"get_BACK",get_FRONT:"get_FRONT",get_CURRENT_VERTEX_ATTRIB:"get_CURRENT_VERTEX_ATTRIB",get_BUFFER_USAGE:"get_BUFFER_USAGE",get_BUFFER_SIZE:"get_BUFFER_SIZE",get_DYNAMIC_DRAW:"get_DYNAMIC_DRAW",get_STATIC_DRAW:"get_STATIC_DRAW",get_STREAM_DRAW:"get_STREAM_DRAW",get_ELEMENT_ARRAY_BUFFER_BINDING:"get_ELEMENT_ARRAY_BUFFER_BINDING",get_ARRAY_BUFFER_BINDING:"get_ARRAY_BUFFER_BINDING",get_ELEMENT_ARRAY_BUFFER:"get_ELEMENT_ARRAY_BUFFER",get_ARRAY_BUFFER:"get_ARRAY_BUFFER",get_BLEND_COLOR:"get_BLEND_COLOR",get_ONE_MINUS_CONSTANT_ALPHA:"get_ONE_MINUS_CONSTANT_ALPHA",get_CONSTANT_ALPHA:"get_CONSTANT_ALPHA",get_ONE_MINUS_CONSTANT_COLOR:"get_ONE_MINUS_CONSTANT_COLOR",get_CONSTANT_COLOR:"get_CONSTANT_COLOR",get_BLEND_SRC_ALPHA:"get_BLEND_SRC_ALPHA",get_BLEND_DST_ALPHA:"get_BLEND_DST_ALPHA",get_BLEND_SRC_RGB:"get_BLEND_SRC_RGB",get_BLEND_DST_RGB:"get_BLEND_DST_RGB",get_FUNC_REVERSE_SUBTRACT:"get_FUNC_REVERSE_SUBTRACT",get_FUNC_SUBTRACT:"get_FUNC_SUBTRACT",get_BLEND_EQUATION_ALPHA:"get_BLEND_EQUATION_ALPHA",get_BLEND_EQUATION_RGB:"get_BLEND_EQUATION_RGB",get_BLEND_EQUATION:"get_BLEND_EQUATION",get_FUNC_ADD:"get_FUNC_ADD",get_SRC_ALPHA_SATURATE:"get_SRC_ALPHA_SATURATE",get_ONE_MINUS_DST_COLOR:"get_ONE_MINUS_DST_COLOR",get_DST_COLOR:"get_DST_COLOR",get_ONE_MINUS_DST_ALPHA:"get_ONE_MINUS_DST_ALPHA",get_DST_ALPHA:"get_DST_ALPHA",get_ONE_MINUS_SRC_ALPHA:"get_ONE_MINUS_SRC_ALPHA",get_SRC_ALPHA:"get_SRC_ALPHA",get_ONE_MINUS_SRC_COLOR:"get_ONE_MINUS_SRC_COLOR",get_SRC_COLOR:"get_SRC_COLOR",get_ONE:"get_ONE",get_ZERO:"get_ZERO",get_TRIANGLE_FAN:"get_TRIANGLE_FAN",get_TRIANGLE_STRIP:"get_TRIANGLE_STRIP",get_TRIANGLES:"get_TRIANGLES",get_LINE_STRIP:"get_LINE_STRIP",get_LINE_LOOP:"get_LINE_LOOP",get_LINES:"get_LINES",get_POINTS:"get_POINTS",get_COLOR_BUFFER_BIT:"get_COLOR_BUFFER_BIT",get_STENCIL_BUFFER_BIT:"get_STENCIL_BUFFER_BIT",get_DEPTH_BUFFER_BIT:"get_DEPTH_BUFFER_BIT",get_EXTENSIONS:"get_EXTENSIONS"}
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_EXTENSIONS = function(this1) {
return 7939;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_BUFFER_BIT = function(this1) {
return this1.DEPTH_BUFFER_BIT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BUFFER_BIT = function(this1) {
return this1.STENCIL_BUFFER_BIT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_BUFFER_BIT = function(this1) {
return this1.COLOR_BUFFER_BIT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_POINTS = function(this1) {
return this1.POINTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LINES = function(this1) {
return this1.LINES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LINE_LOOP = function(this1) {
return this1.LINE_LOOP;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LINE_STRIP = function(this1) {
return this1.LINE_STRIP;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRIANGLES = function(this1) {
return this1.TRIANGLES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRIANGLE_STRIP = function(this1) {
return this1.TRIANGLE_STRIP;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRIANGLE_FAN = function(this1) {
return this1.TRIANGLE_FAN;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ZERO = function(this1) {
return this1.ZERO;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ONE = function(this1) {
return this1.ONE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SRC_COLOR = function(this1) {
return this1.SRC_COLOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ONE_MINUS_SRC_COLOR = function(this1) {
return this1.ONE_MINUS_SRC_COLOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SRC_ALPHA = function(this1) {
return this1.SRC_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ONE_MINUS_SRC_ALPHA = function(this1) {
return this1.ONE_MINUS_SRC_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DST_ALPHA = function(this1) {
return this1.DST_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ONE_MINUS_DST_ALPHA = function(this1) {
return this1.ONE_MINUS_DST_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DST_COLOR = function(this1) {
return this1.DST_COLOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ONE_MINUS_DST_COLOR = function(this1) {
return this1.ONE_MINUS_DST_COLOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SRC_ALPHA_SATURATE = function(this1) {
return this1.SRC_ALPHA_SATURATE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FUNC_ADD = function(this1) {
return this1.FUNC_ADD;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND_EQUATION = function(this1) {
return this1.BLEND_EQUATION;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND_EQUATION_RGB = function(this1) {
return this1.BLEND_EQUATION_RGB;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND_EQUATION_ALPHA = function(this1) {
return this1.BLEND_EQUATION_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FUNC_SUBTRACT = function(this1) {
return this1.FUNC_SUBTRACT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FUNC_REVERSE_SUBTRACT = function(this1) {
return this1.FUNC_REVERSE_SUBTRACT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND_DST_RGB = function(this1) {
return this1.BLEND_DST_RGB;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND_SRC_RGB = function(this1) {
return this1.BLEND_SRC_RGB;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND_DST_ALPHA = function(this1) {
return this1.BLEND_DST_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND_SRC_ALPHA = function(this1) {
return this1.BLEND_SRC_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CONSTANT_COLOR = function(this1) {
return this1.CONSTANT_COLOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ONE_MINUS_CONSTANT_COLOR = function(this1) {
return this1.ONE_MINUS_CONSTANT_COLOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CONSTANT_ALPHA = function(this1) {
return this1.CONSTANT_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ONE_MINUS_CONSTANT_ALPHA = function(this1) {
return this1.ONE_MINUS_CONSTANT_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND_COLOR = function(this1) {
return this1.BLEND_COLOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ARRAY_BUFFER = function(this1) {
return this1.ARRAY_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ELEMENT_ARRAY_BUFFER = function(this1) {
return this1.ELEMENT_ARRAY_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ARRAY_BUFFER_BINDING = function(this1) {
return this1.ARRAY_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ELEMENT_ARRAY_BUFFER_BINDING = function(this1) {
return this1.ELEMENT_ARRAY_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STREAM_DRAW = function(this1) {
return this1.STREAM_DRAW;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STATIC_DRAW = function(this1) {
return this1.STATIC_DRAW;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DYNAMIC_DRAW = function(this1) {
return this1.DYNAMIC_DRAW;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BUFFER_SIZE = function(this1) {
return this1.BUFFER_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BUFFER_USAGE = function(this1) {
return this1.BUFFER_USAGE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CURRENT_VERTEX_ATTRIB = function(this1) {
return this1.CURRENT_VERTEX_ATTRIB;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRONT = function(this1) {
return this1.FRONT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BACK = function(this1) {
return this1.BACK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRONT_AND_BACK = function(this1) {
return this1.FRONT_AND_BACK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CULL_FACE = function(this1) {
return this1.CULL_FACE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLEND = function(this1) {
return this1.BLEND;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DITHER = function(this1) {
return this1.DITHER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_TEST = function(this1) {
return this1.STENCIL_TEST;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_TEST = function(this1) {
return this1.DEPTH_TEST;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SCISSOR_TEST = function(this1) {
return this1.SCISSOR_TEST;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_POLYGON_OFFSET_FILL = function(this1) {
return this1.POLYGON_OFFSET_FILL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLE_ALPHA_TO_COVERAGE = function(this1) {
return this1.SAMPLE_ALPHA_TO_COVERAGE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLE_COVERAGE = function(this1) {
return this1.SAMPLE_COVERAGE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_NO_ERROR = function(this1) {
return this1.NO_ERROR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INVALID_ENUM = function(this1) {
return this1.INVALID_ENUM;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INVALID_VALUE = function(this1) {
return this1.INVALID_VALUE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INVALID_OPERATION = function(this1) {
return this1.INVALID_OPERATION;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_OUT_OF_MEMORY = function(this1) {
return this1.OUT_OF_MEMORY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CW = function(this1) {
return this1.CW;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CCW = function(this1) {
return this1.CCW;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LINE_WIDTH = function(this1) {
return this1.LINE_WIDTH;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ALIASED_POINT_SIZE_RANGE = function(this1) {
return this1.ALIASED_POINT_SIZE_RANGE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ALIASED_LINE_WIDTH_RANGE = function(this1) {
return this1.ALIASED_LINE_WIDTH_RANGE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CULL_FACE_MODE = function(this1) {
return this1.CULL_FACE_MODE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRONT_FACE = function(this1) {
return this1.FRONT_FACE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_RANGE = function(this1) {
return this1.DEPTH_RANGE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_WRITEMASK = function(this1) {
return this1.DEPTH_WRITEMASK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_CLEAR_VALUE = function(this1) {
return this1.DEPTH_CLEAR_VALUE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_FUNC = function(this1) {
return this1.DEPTH_FUNC;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_CLEAR_VALUE = function(this1) {
return this1.STENCIL_CLEAR_VALUE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_FUNC = function(this1) {
return this1.STENCIL_FUNC;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_FAIL = function(this1) {
return this1.STENCIL_FAIL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_PASS_DEPTH_FAIL = function(this1) {
return this1.STENCIL_PASS_DEPTH_FAIL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_PASS_DEPTH_PASS = function(this1) {
return this1.STENCIL_PASS_DEPTH_PASS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_REF = function(this1) {
return this1.STENCIL_REF;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_VALUE_MASK = function(this1) {
return this1.STENCIL_VALUE_MASK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_WRITEMASK = function(this1) {
return this1.STENCIL_WRITEMASK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BACK_FUNC = function(this1) {
return this1.STENCIL_BACK_FUNC;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BACK_FAIL = function(this1) {
return this1.STENCIL_BACK_FAIL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BACK_PASS_DEPTH_FAIL = function(this1) {
return this1.STENCIL_BACK_PASS_DEPTH_FAIL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BACK_PASS_DEPTH_PASS = function(this1) {
return this1.STENCIL_BACK_PASS_DEPTH_PASS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BACK_REF = function(this1) {
return this1.STENCIL_BACK_REF;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BACK_VALUE_MASK = function(this1) {
return this1.STENCIL_BACK_VALUE_MASK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BACK_WRITEMASK = function(this1) {
return this1.STENCIL_BACK_WRITEMASK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VIEWPORT = function(this1) {
return this1.VIEWPORT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SCISSOR_BOX = function(this1) {
return this1.SCISSOR_BOX;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_CLEAR_VALUE = function(this1) {
return this1.COLOR_CLEAR_VALUE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_WRITEMASK = function(this1) {
return this1.COLOR_WRITEMASK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_ALIGNMENT = function(this1) {
return this1.UNPACK_ALIGNMENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_PACK_ALIGNMENT = function(this1) {
return this1.PACK_ALIGNMENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_TEXTURE_SIZE = function(this1) {
return this1.MAX_TEXTURE_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VIEWPORT_DIMS = function(this1) {
return this1.MAX_VIEWPORT_DIMS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SUBPIXEL_BITS = function(this1) {
return this1.SUBPIXEL_BITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RED_BITS = function(this1) {
return this1.RED_BITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_GREEN_BITS = function(this1) {
return this1.GREEN_BITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BLUE_BITS = function(this1) {
return this1.BLUE_BITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ALPHA_BITS = function(this1) {
return this1.ALPHA_BITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_BITS = function(this1) {
return this1.DEPTH_BITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_BITS = function(this1) {
return this1.STENCIL_BITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_POLYGON_OFFSET_UNITS = function(this1) {
return this1.POLYGON_OFFSET_UNITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_POLYGON_OFFSET_FACTOR = function(this1) {
return this1.POLYGON_OFFSET_FACTOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_BINDING_2D = function(this1) {
return this1.TEXTURE_BINDING_2D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLE_BUFFERS = function(this1) {
return this1.SAMPLE_BUFFERS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLES = function(this1) {
return this1.SAMPLES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLE_COVERAGE_VALUE = function(this1) {
return this1.SAMPLE_COVERAGE_VALUE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLE_COVERAGE_INVERT = function(this1) {
return this1.SAMPLE_COVERAGE_INVERT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COMPRESSED_TEXTURE_FORMATS = function(this1) {
return this1.COMPRESSED_TEXTURE_FORMATS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DONT_CARE = function(this1) {
return this1.DONT_CARE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FASTEST = function(this1) {
return this1.FASTEST;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_NICEST = function(this1) {
return this1.NICEST;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_GENERATE_MIPMAP_HINT = function(this1) {
return this1.GENERATE_MIPMAP_HINT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BYTE = function(this1) {
return this1.BYTE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_BYTE = function(this1) {
return this1.UNSIGNED_BYTE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SHORT = function(this1) {
return this1.SHORT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_SHORT = function(this1) {
return this1.UNSIGNED_SHORT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT = function(this1) {
return this1.INT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT = function(this1) {
return this1.UNSIGNED_INT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT = function(this1) {
return this1.FLOAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_COMPONENT = function(this1) {
return this1.DEPTH_COMPONENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ALPHA = function(this1) {
return this1.ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB = function(this1) {
return this1.RGB;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA = function(this1) {
return this1.RGBA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LUMINANCE = function(this1) {
return this1.LUMINANCE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LUMINANCE_ALPHA = function(this1) {
return this1.LUMINANCE_ALPHA;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_SHORT_4_4_4_4 = function(this1) {
return this1.UNSIGNED_SHORT_4_4_4_4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_SHORT_5_5_5_1 = function(this1) {
return this1.UNSIGNED_SHORT_5_5_5_1;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_SHORT_5_6_5 = function(this1) {
return this1.UNSIGNED_SHORT_5_6_5;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAGMENT_SHADER = function(this1) {
return this1.FRAGMENT_SHADER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_SHADER = function(this1) {
return this1.VERTEX_SHADER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VERTEX_ATTRIBS = function(this1) {
return this1.MAX_VERTEX_ATTRIBS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VERTEX_UNIFORM_VECTORS = function(this1) {
return this1.MAX_VERTEX_UNIFORM_VECTORS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VARYING_VECTORS = function(this1) {
return this1.MAX_VARYING_VECTORS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_COMBINED_TEXTURE_IMAGE_UNITS = function(this1) {
return this1.MAX_COMBINED_TEXTURE_IMAGE_UNITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VERTEX_TEXTURE_IMAGE_UNITS = function(this1) {
return this1.MAX_VERTEX_TEXTURE_IMAGE_UNITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_TEXTURE_IMAGE_UNITS = function(this1) {
return this1.MAX_TEXTURE_IMAGE_UNITS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_FRAGMENT_UNIFORM_VECTORS = function(this1) {
return this1.MAX_FRAGMENT_UNIFORM_VECTORS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SHADER_TYPE = function(this1) {
return this1.SHADER_TYPE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DELETE_STATUS = function(this1) {
return this1.DELETE_STATUS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LINK_STATUS = function(this1) {
return this1.LINK_STATUS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VALIDATE_STATUS = function(this1) {
return this1.VALIDATE_STATUS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ATTACHED_SHADERS = function(this1) {
return this1.ATTACHED_SHADERS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ACTIVE_UNIFORMS = function(this1) {
return this1.ACTIVE_UNIFORMS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ACTIVE_ATTRIBUTES = function(this1) {
return this1.ACTIVE_ATTRIBUTES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SHADING_LANGUAGE_VERSION = function(this1) {
return this1.SHADING_LANGUAGE_VERSION;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CURRENT_PROGRAM = function(this1) {
return this1.CURRENT_PROGRAM;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_NEVER = function(this1) {
return this1.NEVER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LESS = function(this1) {
return this1.LESS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_EQUAL = function(this1) {
return this1.EQUAL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LEQUAL = function(this1) {
return this1.LEQUAL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_GREATER = function(this1) {
return this1.GREATER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_NOTEQUAL = function(this1) {
return this1.NOTEQUAL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_GEQUAL = function(this1) {
return this1.GEQUAL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ALWAYS = function(this1) {
return this1.ALWAYS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_KEEP = function(this1) {
return this1.KEEP;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_REPLACE = function(this1) {
return this1.REPLACE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INCR = function(this1) {
return this1.INCR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DECR = function(this1) {
return this1.DECR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INVERT = function(this1) {
return this1.INVERT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INCR_WRAP = function(this1) {
return this1.INCR_WRAP;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DECR_WRAP = function(this1) {
return this1.DECR_WRAP;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VENDOR = function(this1) {
return this1.VENDOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERER = function(this1) {
return this1.RENDERER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERSION = function(this1) {
return this1.VERSION;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_NEAREST = function(this1) {
return this1.NEAREST;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LINEAR = function(this1) {
return this1.LINEAR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_NEAREST_MIPMAP_NEAREST = function(this1) {
return this1.NEAREST_MIPMAP_NEAREST;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LINEAR_MIPMAP_NEAREST = function(this1) {
return this1.LINEAR_MIPMAP_NEAREST;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_NEAREST_MIPMAP_LINEAR = function(this1) {
return this1.NEAREST_MIPMAP_LINEAR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LINEAR_MIPMAP_LINEAR = function(this1) {
return this1.LINEAR_MIPMAP_LINEAR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_MAG_FILTER = function(this1) {
return this1.TEXTURE_MAG_FILTER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_MIN_FILTER = function(this1) {
return this1.TEXTURE_MIN_FILTER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_WRAP_S = function(this1) {
return this1.TEXTURE_WRAP_S;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_WRAP_T = function(this1) {
return this1.TEXTURE_WRAP_T;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_2D = function(this1) {
return this1.TEXTURE_2D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE = function(this1) {
return this1.TEXTURE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_CUBE_MAP = function(this1) {
return this1.TEXTURE_CUBE_MAP;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_BINDING_CUBE_MAP = function(this1) {
return this1.TEXTURE_BINDING_CUBE_MAP;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_CUBE_MAP_POSITIVE_X = function(this1) {
return this1.TEXTURE_CUBE_MAP_POSITIVE_X;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_CUBE_MAP_NEGATIVE_X = function(this1) {
return this1.TEXTURE_CUBE_MAP_NEGATIVE_X;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_CUBE_MAP_POSITIVE_Y = function(this1) {
return this1.TEXTURE_CUBE_MAP_POSITIVE_Y;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_CUBE_MAP_NEGATIVE_Y = function(this1) {
return this1.TEXTURE_CUBE_MAP_NEGATIVE_Y;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_CUBE_MAP_POSITIVE_Z = function(this1) {
return this1.TEXTURE_CUBE_MAP_POSITIVE_Z;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_CUBE_MAP_NEGATIVE_Z = function(this1) {
return this1.TEXTURE_CUBE_MAP_NEGATIVE_Z;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_CUBE_MAP_TEXTURE_SIZE = function(this1) {
return this1.MAX_CUBE_MAP_TEXTURE_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE0 = function(this1) {
return this1.TEXTURE0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE1 = function(this1) {
return this1.TEXTURE1;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE2 = function(this1) {
return this1.TEXTURE2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE3 = function(this1) {
return this1.TEXTURE3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE4 = function(this1) {
return this1.TEXTURE4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE5 = function(this1) {
return this1.TEXTURE5;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE6 = function(this1) {
return this1.TEXTURE6;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE7 = function(this1) {
return this1.TEXTURE7;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE8 = function(this1) {
return this1.TEXTURE8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE9 = function(this1) {
return this1.TEXTURE9;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE10 = function(this1) {
return this1.TEXTURE10;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE11 = function(this1) {
return this1.TEXTURE11;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE12 = function(this1) {
return this1.TEXTURE12;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE13 = function(this1) {
return this1.TEXTURE13;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE14 = function(this1) {
return this1.TEXTURE14;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE15 = function(this1) {
return this1.TEXTURE15;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE16 = function(this1) {
return this1.TEXTURE16;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE17 = function(this1) {
return this1.TEXTURE17;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE18 = function(this1) {
return this1.TEXTURE18;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE19 = function(this1) {
return this1.TEXTURE19;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE20 = function(this1) {
return this1.TEXTURE20;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE21 = function(this1) {
return this1.TEXTURE21;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE22 = function(this1) {
return this1.TEXTURE22;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE23 = function(this1) {
return this1.TEXTURE23;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE24 = function(this1) {
return this1.TEXTURE24;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE25 = function(this1) {
return this1.TEXTURE25;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE26 = function(this1) {
return this1.TEXTURE26;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE27 = function(this1) {
return this1.TEXTURE27;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE28 = function(this1) {
return this1.TEXTURE28;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE29 = function(this1) {
return this1.TEXTURE29;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE30 = function(this1) {
return this1.TEXTURE30;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE31 = function(this1) {
return this1.TEXTURE31;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ACTIVE_TEXTURE = function(this1) {
return this1.ACTIVE_TEXTURE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_REPEAT = function(this1) {
return this1.REPEAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CLAMP_TO_EDGE = function(this1) {
return this1.CLAMP_TO_EDGE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MIRRORED_REPEAT = function(this1) {
return this1.MIRRORED_REPEAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_VEC2 = function(this1) {
return this1.FLOAT_VEC2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_VEC3 = function(this1) {
return this1.FLOAT_VEC3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_VEC4 = function(this1) {
return this1.FLOAT_VEC4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT_VEC2 = function(this1) {
return this1.INT_VEC2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT_VEC3 = function(this1) {
return this1.INT_VEC3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT_VEC4 = function(this1) {
return this1.INT_VEC4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BOOL = function(this1) {
return this1.BOOL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BOOL_VEC2 = function(this1) {
return this1.BOOL_VEC2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BOOL_VEC3 = function(this1) {
return this1.BOOL_VEC3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BOOL_VEC4 = function(this1) {
return this1.BOOL_VEC4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT2 = function(this1) {
return this1.FLOAT_MAT2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT3 = function(this1) {
return this1.FLOAT_MAT3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT4 = function(this1) {
return this1.FLOAT_MAT4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLER_2D = function(this1) {
return this1.SAMPLER_2D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLER_CUBE = function(this1) {
return this1.SAMPLER_CUBE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_ENABLED = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_ENABLED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_SIZE = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_STRIDE = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_STRIDE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_TYPE = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_TYPE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_NORMALIZED = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_NORMALIZED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_POINTER = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_POINTER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_PROGRAM_POINT_SIZE = function(this1) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_POINT_SPRITE = function(this1) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COMPILE_STATUS = function(this1) {
return this1.COMPILE_STATUS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LOW_FLOAT = function(this1) {
return this1.LOW_FLOAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MEDIUM_FLOAT = function(this1) {
return this1.MEDIUM_FLOAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_HIGH_FLOAT = function(this1) {
return this1.HIGH_FLOAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_LOW_INT = function(this1) {
return this1.LOW_INT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MEDIUM_INT = function(this1) {
return this1.MEDIUM_INT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_HIGH_INT = function(this1) {
return this1.HIGH_INT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER = function(this1) {
return this1.FRAMEBUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER = function(this1) {
return this1.RENDERBUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA4 = function(this1) {
return this1.RGBA4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB5_A1 = function(this1) {
return this1.RGB5_A1;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB565 = function(this1) {
return this1.RGB565;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_COMPONENT16 = function(this1) {
return this1.DEPTH_COMPONENT16;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_INDEX = function(this1) {
return this1.STENCIL_INDEX;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_INDEX8 = function(this1) {
return this1.STENCIL_INDEX8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_STENCIL = function(this1) {
return this1.DEPTH_STENCIL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_WIDTH = function(this1) {
return this1.RENDERBUFFER_WIDTH;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_HEIGHT = function(this1) {
return this1.RENDERBUFFER_HEIGHT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_INTERNAL_FORMAT = function(this1) {
return this1.RENDERBUFFER_INTERNAL_FORMAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_RED_SIZE = function(this1) {
return this1.RENDERBUFFER_RED_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_GREEN_SIZE = function(this1) {
return this1.RENDERBUFFER_GREEN_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_BLUE_SIZE = function(this1) {
return this1.RENDERBUFFER_BLUE_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_ALPHA_SIZE = function(this1) {
return this1.RENDERBUFFER_ALPHA_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_DEPTH_SIZE = function(this1) {
return this1.RENDERBUFFER_DEPTH_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_STENCIL_SIZE = function(this1) {
return this1.RENDERBUFFER_STENCIL_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT0 = function(this1) {
return this1.COLOR_ATTACHMENT0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_ATTACHMENT = function(this1) {
return this1.DEPTH_ATTACHMENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL_ATTACHMENT = function(this1) {
return this1.STENCIL_ATTACHMENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_STENCIL_ATTACHMENT = function(this1) {
return this1.DEPTH_STENCIL_ATTACHMENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_NONE = function(this1) {
return this1.NONE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_COMPLETE = function(this1) {
return this1.FRAMEBUFFER_COMPLETE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = function(this1) {
return this1.FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = function(this1) {
return this1.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = function(this1) {
return this1.FRAMEBUFFER_INCOMPLETE_DIMENSIONS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_UNSUPPORTED = function(this1) {
return this1.FRAMEBUFFER_UNSUPPORTED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_BINDING = function(this1) {
return this1.FRAMEBUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_BINDING = function(this1) {
return this1.RENDERBUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_RENDERBUFFER_SIZE = function(this1) {
return this1.MAX_RENDERBUFFER_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INVALID_FRAMEBUFFER_OPERATION = function(this1) {
return this1.INVALID_FRAMEBUFFER_OPERATION;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_FLIP_Y_WEBGL = function(this1) {
return this1.UNPACK_FLIP_Y_WEBGL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_PREMULTIPLY_ALPHA_WEBGL = function(this1) {
return this1.UNPACK_PREMULTIPLY_ALPHA_WEBGL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CONTEXT_LOST_WEBGL = function(this1) {
return this1.CONTEXT_LOST_WEBGL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_COLORSPACE_CONVERSION_WEBGL = function(this1) {
return this1.UNPACK_COLORSPACE_CONVERSION_WEBGL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_BROWSER_DEFAULT_WEBGL = function(this1) {
return this1.BROWSER_DEFAULT_WEBGL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_type = function(this1) {
return this1.type;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_version = function(this1) {
return this1.version;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_READ_BUFFER = function(this1) {
return this1.READ_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_ROW_LENGTH = function(this1) {
return this1.UNPACK_ROW_LENGTH;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_SKIP_ROWS = function(this1) {
return this1.UNPACK_SKIP_ROWS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_SKIP_PIXELS = function(this1) {
return this1.UNPACK_SKIP_PIXELS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_PACK_ROW_LENGTH = function(this1) {
return this1.PACK_ROW_LENGTH;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_PACK_SKIP_ROWS = function(this1) {
return this1.PACK_SKIP_ROWS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_PACK_SKIP_PIXELS = function(this1) {
return this1.PACK_SKIP_PIXELS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_BINDING_3D = function(this1) {
return this1.TEXTURE_BINDING_3D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_SKIP_IMAGES = function(this1) {
return this1.UNPACK_SKIP_IMAGES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNPACK_IMAGE_HEIGHT = function(this1) {
return this1.UNPACK_IMAGE_HEIGHT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_3D_TEXTURE_SIZE = function(this1) {
return this1.MAX_3D_TEXTURE_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_ELEMENTS_VERTICES = function(this1) {
return this1.MAX_ELEMENTS_VERTICES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_ELEMENTS_INDICES = function(this1) {
return this1.MAX_ELEMENTS_INDICES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_TEXTURE_LOD_BIAS = function(this1) {
return this1.MAX_TEXTURE_LOD_BIAS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_FRAGMENT_UNIFORM_COMPONENTS = function(this1) {
return this1.MAX_FRAGMENT_UNIFORM_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VERTEX_UNIFORM_COMPONENTS = function(this1) {
return this1.MAX_VERTEX_UNIFORM_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_ARRAY_TEXTURE_LAYERS = function(this1) {
return this1.MAX_ARRAY_TEXTURE_LAYERS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MIN_PROGRAM_TEXEL_OFFSET = function(this1) {
return this1.MIN_PROGRAM_TEXEL_OFFSET;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_PROGRAM_TEXEL_OFFSET = function(this1) {
return this1.MAX_PROGRAM_TEXEL_OFFSET;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VARYING_COMPONENTS = function(this1) {
return this1.MAX_VARYING_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAGMENT_SHADER_DERIVATIVE_HINT = function(this1) {
return this1.FRAGMENT_SHADER_DERIVATIVE_HINT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RASTERIZER_DISCARD = function(this1) {
return this1.RASTERIZER_DISCARD;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ARRAY_BINDING = function(this1) {
return this1.VERTEX_ARRAY_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VERTEX_OUTPUT_COMPONENTS = function(this1) {
return this1.MAX_VERTEX_OUTPUT_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_FRAGMENT_INPUT_COMPONENTS = function(this1) {
return this1.MAX_FRAGMENT_INPUT_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_SERVER_WAIT_TIMEOUT = function(this1) {
return this1.MAX_SERVER_WAIT_TIMEOUT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_ELEMENT_INDEX = function(this1) {
return this1.MAX_ELEMENT_INDEX;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RED = function(this1) {
return this1.RED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB8 = function(this1) {
return this1.RGB8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA8 = function(this1) {
return this1.RGBA8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB10_A2 = function(this1) {
return this1.RGB10_A2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_3D = function(this1) {
return this1.TEXTURE_3D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_WRAP_R = function(this1) {
return this1.TEXTURE_WRAP_R;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_MIN_LOD = function(this1) {
return this1.TEXTURE_MIN_LOD;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_MAX_LOD = function(this1) {
return this1.TEXTURE_MAX_LOD;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_BASE_LEVEL = function(this1) {
return this1.TEXTURE_BASE_LEVEL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_MAX_LEVEL = function(this1) {
return this1.TEXTURE_MAX_LEVEL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_COMPARE_MODE = function(this1) {
return this1.TEXTURE_COMPARE_MODE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_COMPARE_FUNC = function(this1) {
return this1.TEXTURE_COMPARE_FUNC;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SRGB = function(this1) {
return this1.SRGB;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SRGB8 = function(this1) {
return this1.SRGB8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SRGB8_ALPHA8 = function(this1) {
return this1.SRGB8_ALPHA8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COMPARE_REF_TO_TEXTURE = function(this1) {
return this1.COMPARE_REF_TO_TEXTURE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA32F = function(this1) {
return this1.RGBA32F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB32F = function(this1) {
return this1.RGB32F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA16F = function(this1) {
return this1.RGBA16F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB16F = function(this1) {
return this1.RGB16F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_2D_ARRAY = function(this1) {
return this1.TEXTURE_2D_ARRAY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_BINDING_2D_ARRAY = function(this1) {
return this1.TEXTURE_BINDING_2D_ARRAY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R11F_G11F_B10F = function(this1) {
return this1.R11F_G11F_B10F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB9_E5 = function(this1) {
return this1.RGB9_E5;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA32UI = function(this1) {
return this1.RGBA32UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB32UI = function(this1) {
return this1.RGB32UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA16UI = function(this1) {
return this1.RGBA16UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB16UI = function(this1) {
return this1.RGB16UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA8UI = function(this1) {
return this1.RGBA8UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB8UI = function(this1) {
return this1.RGB8UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA32I = function(this1) {
return this1.RGBA32I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB32I = function(this1) {
return this1.RGB32I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA16I = function(this1) {
return this1.RGBA16I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB16I = function(this1) {
return this1.RGB16I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA8I = function(this1) {
return this1.RGBA8I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB8I = function(this1) {
return this1.RGB8I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RED_INTEGER = function(this1) {
return this1.RED_INTEGER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB_INTEGER = function(this1) {
return this1.RGB_INTEGER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA_INTEGER = function(this1) {
return this1.RGBA_INTEGER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R8 = function(this1) {
return this1.R8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG8 = function(this1) {
return this1.RG8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R16F = function(this1) {
return this1.R16F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R32F = function(this1) {
return this1.R32F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG16F = function(this1) {
return this1.RG16F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG32F = function(this1) {
return this1.RG32F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R8I = function(this1) {
return this1.R8I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R8UI = function(this1) {
return this1.R8UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R16I = function(this1) {
return this1.R16I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R16UI = function(this1) {
return this1.R16UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R32I = function(this1) {
return this1.R32I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R32UI = function(this1) {
return this1.R32UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG8I = function(this1) {
return this1.RG8I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG8UI = function(this1) {
return this1.RG8UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG16I = function(this1) {
return this1.RG16I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG16UI = function(this1) {
return this1.RG16UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG32I = function(this1) {
return this1.RG32I;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG32UI = function(this1) {
return this1.RG32UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_R8_SNORM = function(this1) {
return this1.R8_SNORM;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG8_SNORM = function(this1) {
return this1.RG8_SNORM;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB8_SNORM = function(this1) {
return this1.RGB8_SNORM;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGBA8_SNORM = function(this1) {
return this1.RGBA8_SNORM;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RGB10_A2UI = function(this1) {
return this1.RGB10_A2UI;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_IMMUTABLE_FORMAT = function(this1) {
return this1.TEXTURE_IMMUTABLE_FORMAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TEXTURE_IMMUTABLE_LEVELS = function(this1) {
return this1.TEXTURE_IMMUTABLE_LEVELS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_2_10_10_10_REV = function(this1) {
return this1.UNSIGNED_INT_2_10_10_10_REV;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_10F_11F_11F_REV = function(this1) {
return this1.UNSIGNED_INT_10F_11F_11F_REV;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_5_9_9_9_REV = function(this1) {
return this1.UNSIGNED_INT_5_9_9_9_REV;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_32_UNSIGNED_INT_24_8_REV = function(this1) {
return this1.FLOAT_32_UNSIGNED_INT_24_8_REV;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_24_8 = function(this1) {
return this1.UNSIGNED_INT_24_8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_HALF_FLOAT = function(this1) {
return this1.HALF_FLOAT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG = function(this1) {
return this1.RG;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RG_INTEGER = function(this1) {
return this1.RG_INTEGER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT_2_10_10_10_REV = function(this1) {
return this1.INT_2_10_10_10_REV;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CURRENT_QUERY = function(this1) {
return this1.CURRENT_QUERY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_QUERY_RESULT = function(this1) {
return this1.QUERY_RESULT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_QUERY_RESULT_AVAILABLE = function(this1) {
return this1.QUERY_RESULT_AVAILABLE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ANY_SAMPLES_PASSED = function(this1) {
return this1.ANY_SAMPLES_PASSED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ANY_SAMPLES_PASSED_CONSERVATIVE = function(this1) {
return this1.ANY_SAMPLES_PASSED_CONSERVATIVE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_DRAW_BUFFERS = function(this1) {
return this1.MAX_DRAW_BUFFERS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER0 = function(this1) {
return this1.DRAW_BUFFER0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER1 = function(this1) {
return this1.DRAW_BUFFER1;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER2 = function(this1) {
return this1.DRAW_BUFFER2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER3 = function(this1) {
return this1.DRAW_BUFFER3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER4 = function(this1) {
return this1.DRAW_BUFFER4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER5 = function(this1) {
return this1.DRAW_BUFFER5;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER6 = function(this1) {
return this1.DRAW_BUFFER6;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER7 = function(this1) {
return this1.DRAW_BUFFER7;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER8 = function(this1) {
return this1.DRAW_BUFFER8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER9 = function(this1) {
return this1.DRAW_BUFFER9;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER10 = function(this1) {
return this1.DRAW_BUFFER10;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER11 = function(this1) {
return this1.DRAW_BUFFER11;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER12 = function(this1) {
return this1.DRAW_BUFFER12;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER13 = function(this1) {
return this1.DRAW_BUFFER13;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER14 = function(this1) {
return this1.DRAW_BUFFER14;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_BUFFER15 = function(this1) {
return this1.DRAW_BUFFER15;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_COLOR_ATTACHMENTS = function(this1) {
return this1.MAX_COLOR_ATTACHMENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT1 = function(this1) {
return this1.COLOR_ATTACHMENT1;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT2 = function(this1) {
return this1.COLOR_ATTACHMENT2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT3 = function(this1) {
return this1.COLOR_ATTACHMENT3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT4 = function(this1) {
return this1.COLOR_ATTACHMENT4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT5 = function(this1) {
return this1.COLOR_ATTACHMENT5;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT6 = function(this1) {
return this1.COLOR_ATTACHMENT6;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT7 = function(this1) {
return this1.COLOR_ATTACHMENT7;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT8 = function(this1) {
return this1.COLOR_ATTACHMENT8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT9 = function(this1) {
return this1.COLOR_ATTACHMENT9;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT10 = function(this1) {
return this1.COLOR_ATTACHMENT10;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT11 = function(this1) {
return this1.COLOR_ATTACHMENT11;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT12 = function(this1) {
return this1.COLOR_ATTACHMENT12;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT13 = function(this1) {
return this1.COLOR_ATTACHMENT13;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT14 = function(this1) {
return this1.COLOR_ATTACHMENT14;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR_ATTACHMENT15 = function(this1) {
return this1.COLOR_ATTACHMENT15;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLER_3D = function(this1) {
return this1.SAMPLER_3D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLER_2D_SHADOW = function(this1) {
return this1.SAMPLER_2D_SHADOW;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLER_2D_ARRAY = function(this1) {
return this1.SAMPLER_2D_ARRAY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLER_2D_ARRAY_SHADOW = function(this1) {
return this1.SAMPLER_2D_ARRAY_SHADOW;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLER_CUBE_SHADOW = function(this1) {
return this1.SAMPLER_CUBE_SHADOW;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT_SAMPLER_2D = function(this1) {
return this1.INT_SAMPLER_2D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT_SAMPLER_3D = function(this1) {
return this1.INT_SAMPLER_3D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT_SAMPLER_CUBE = function(this1) {
return this1.INT_SAMPLER_CUBE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INT_SAMPLER_2D_ARRAY = function(this1) {
return this1.INT_SAMPLER_2D_ARRAY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_SAMPLER_2D = function(this1) {
return this1.UNSIGNED_INT_SAMPLER_2D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_SAMPLER_3D = function(this1) {
return this1.UNSIGNED_INT_SAMPLER_3D;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_SAMPLER_CUBE = function(this1) {
return this1.UNSIGNED_INT_SAMPLER_CUBE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_SAMPLER_2D_ARRAY = function(this1) {
return this1.UNSIGNED_INT_SAMPLER_2D_ARRAY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_SAMPLES = function(this1) {
return this1.MAX_SAMPLES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SAMPLER_BINDING = function(this1) {
return this1.SAMPLER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_PIXEL_PACK_BUFFER = function(this1) {
return this1.PIXEL_PACK_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_PIXEL_UNPACK_BUFFER = function(this1) {
return this1.PIXEL_UNPACK_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_PIXEL_PACK_BUFFER_BINDING = function(this1) {
return this1.PIXEL_PACK_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_PIXEL_UNPACK_BUFFER_BINDING = function(this1) {
return this1.PIXEL_UNPACK_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COPY_READ_BUFFER = function(this1) {
return this1.COPY_READ_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COPY_WRITE_BUFFER = function(this1) {
return this1.COPY_WRITE_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COPY_READ_BUFFER_BINDING = function(this1) {
return this1.COPY_READ_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COPY_WRITE_BUFFER_BINDING = function(this1) {
return this1.COPY_WRITE_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT2x3 = function(this1) {
return this1.FLOAT_MAT2x3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT2x4 = function(this1) {
return this1.FLOAT_MAT2x4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT3x2 = function(this1) {
return this1.FLOAT_MAT3x2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT3x4 = function(this1) {
return this1.FLOAT_MAT3x4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT4x2 = function(this1) {
return this1.FLOAT_MAT4x2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FLOAT_MAT4x3 = function(this1) {
return this1.FLOAT_MAT4x3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_VEC2 = function(this1) {
return this1.UNSIGNED_INT_VEC2;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_VEC3 = function(this1) {
return this1.UNSIGNED_INT_VEC3;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_INT_VEC4 = function(this1) {
return this1.UNSIGNED_INT_VEC4;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNED_NORMALIZED = function(this1) {
return this1.UNSIGNED_NORMALIZED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SIGNED_NORMALIZED = function(this1) {
return this1.SIGNED_NORMALIZED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_INTEGER = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_INTEGER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_DIVISOR = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_DIVISOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER_MODE = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER_MODE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = function(this1) {
return this1.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_VARYINGS = function(this1) {
return this1.TRANSFORM_FEEDBACK_VARYINGS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER_START = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER_START;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER_SIZE = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = function(this1) {
return this1.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = function(this1) {
return this1.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = function(this1) {
return this1.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INTERLEAVED_ATTRIBS = function(this1) {
return this1.INTERLEAVED_ATTRIBS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SEPARATE_ATTRIBS = function(this1) {
return this1.SEPARATE_ATTRIBS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER_BINDING = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK = function(this1) {
return this1.TRANSFORM_FEEDBACK;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_PAUSED = function(this1) {
return this1.TRANSFORM_FEEDBACK_PAUSED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_ACTIVE = function(this1) {
return this1.TRANSFORM_FEEDBACK_ACTIVE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TRANSFORM_FEEDBACK_BINDING = function(this1) {
return this1.TRANSFORM_FEEDBACK_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_RED_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_RED_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_DEFAULT = function(this1) {
return this1.FRAMEBUFFER_DEFAULT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH24_STENCIL8 = function(this1) {
return this1.DEPTH24_STENCIL8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_FRAMEBUFFER_BINDING = function(this1) {
return this1.DRAW_FRAMEBUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_READ_FRAMEBUFFER = function(this1) {
return this1.READ_FRAMEBUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DRAW_FRAMEBUFFER = function(this1) {
return this1.DRAW_FRAMEBUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_READ_FRAMEBUFFER_BINDING = function(this1) {
return this1.READ_FRAMEBUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_RENDERBUFFER_SAMPLES = function(this1) {
return this1.RENDERBUFFER_SAMPLES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = function(this1) {
return this1.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BUFFER = function(this1) {
return this1.UNIFORM_BUFFER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BUFFER_BINDING = function(this1) {
return this1.UNIFORM_BUFFER_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BUFFER_START = function(this1) {
return this1.UNIFORM_BUFFER_START;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BUFFER_SIZE = function(this1) {
return this1.UNIFORM_BUFFER_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_VERTEX_UNIFORM_BLOCKS = function(this1) {
return this1.MAX_VERTEX_UNIFORM_BLOCKS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_FRAGMENT_UNIFORM_BLOCKS = function(this1) {
return this1.MAX_FRAGMENT_UNIFORM_BLOCKS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_COMBINED_UNIFORM_BLOCKS = function(this1) {
return this1.MAX_COMBINED_UNIFORM_BLOCKS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_UNIFORM_BUFFER_BINDINGS = function(this1) {
return this1.MAX_UNIFORM_BUFFER_BINDINGS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_UNIFORM_BLOCK_SIZE = function(this1) {
return this1.MAX_UNIFORM_BLOCK_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = function(this1) {
return this1.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = function(this1) {
return this1.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BUFFER_OFFSET_ALIGNMENT = function(this1) {
return this1.UNIFORM_BUFFER_OFFSET_ALIGNMENT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ACTIVE_UNIFORM_BLOCKS = function(this1) {
return this1.ACTIVE_UNIFORM_BLOCKS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_TYPE = function(this1) {
return this1.UNIFORM_TYPE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_SIZE = function(this1) {
return this1.UNIFORM_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BLOCK_INDEX = function(this1) {
return this1.UNIFORM_BLOCK_INDEX;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_OFFSET = function(this1) {
return this1.UNIFORM_OFFSET;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_ARRAY_STRIDE = function(this1) {
return this1.UNIFORM_ARRAY_STRIDE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_MATRIX_STRIDE = function(this1) {
return this1.UNIFORM_MATRIX_STRIDE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_IS_ROW_MAJOR = function(this1) {
return this1.UNIFORM_IS_ROW_MAJOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BLOCK_BINDING = function(this1) {
return this1.UNIFORM_BLOCK_BINDING;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BLOCK_DATA_SIZE = function(this1) {
return this1.UNIFORM_BLOCK_DATA_SIZE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BLOCK_ACTIVE_UNIFORMS = function(this1) {
return this1.UNIFORM_BLOCK_ACTIVE_UNIFORMS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = function(this1) {
return this1.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = function(this1) {
return this1.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = function(this1) {
return this1.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_OBJECT_TYPE = function(this1) {
return this1.OBJECT_TYPE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SYNC_CONDITION = function(this1) {
return this1.SYNC_CONDITION;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SYNC_STATUS = function(this1) {
return this1.SYNC_STATUS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SYNC_FLAGS = function(this1) {
return this1.SYNC_FLAGS;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SYNC_FENCE = function(this1) {
return this1.SYNC_FENCE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SYNC_GPU_COMMANDS_COMPLETE = function(this1) {
return this1.SYNC_GPU_COMMANDS_COMPLETE;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_UNSIGNALED = function(this1) {
return this1.UNSIGNALED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SIGNALED = function(this1) {
return this1.SIGNALED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_ALREADY_SIGNALED = function(this1) {
return this1.ALREADY_SIGNALED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TIMEOUT_EXPIRED = function(this1) {
return this1.TIMEOUT_EXPIRED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_CONDITION_SATISFIED = function(this1) {
return this1.CONDITION_SATISFIED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_WAIT_FAILED = function(this1) {
return this1.WAIT_FAILED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_SYNC_FLUSH_COMMANDS_BIT = function(this1) {
return this1.SYNC_FLUSH_COMMANDS_BIT;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_COLOR = function(this1) {
return this1.COLOR;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH = function(this1) {
return this1.DEPTH;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STENCIL = function(this1) {
return this1.STENCIL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MIN = function(this1) {
return this1.MIN;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX = function(this1) {
return this1.MAX;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_COMPONENT24 = function(this1) {
return this1.DEPTH_COMPONENT24;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STREAM_READ = function(this1) {
return this1.STREAM_READ;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STREAM_COPY = function(this1) {
return this1.STREAM_COPY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STATIC_READ = function(this1) {
return this1.STATIC_READ;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_STATIC_COPY = function(this1) {
return this1.STATIC_COPY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DYNAMIC_READ = function(this1) {
return this1.DYNAMIC_READ;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DYNAMIC_COPY = function(this1) {
return this1.DYNAMIC_COPY;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH_COMPONENT32F = function(this1) {
return this1.DEPTH_COMPONENT32F;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_DEPTH32F_STENCIL8 = function(this1) {
return this1.DEPTH32F_STENCIL8;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_INVALID_INDEX = function(this1) {
return this1.INVALID_INDEX;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_TIMEOUT_IGNORED = function(this1) {
return this1.TIMEOUT_IGNORED;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.get_MAX_CLIENT_WAIT_TIMEOUT_WEBGL = function(this1) {
return this1.MAX_CLIENT_WAIT_TIMEOUT_WEBGL;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.activeTexture = function(this1,texture) {
this1.__context.activeTexture(texture);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.attachShader = function(this1,program,shader) {
this1.__context.attachShader(program,shader);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.beginQuery = function(this1,target,query) {
this1.__context.beginQuery(target,query);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.beginTransformFeedback = function(this1,primitiveNode) {
this1.__context.beginTransformFeedback(primitiveNode);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindAttribLocation = function(this1,program,index,name) {
this1.__context.bindAttribLocation(program,index,name);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindBuffer = function(this1,target,buffer) {
this1.__context.bindBuffer(target,buffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindBufferBase = function(this1,target,index,buffer) {
this1.__context.bindBufferBase(target,index,buffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindBufferRange = function(this1,target,index,buffer,offset,size) {
this1.__context.bindBufferRange(target,index,buffer,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(size));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindFramebuffer = function(this1,target,framebuffer) {
this1.__context.bindFramebuffer(target,framebuffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindRenderbuffer = function(this1,target,renderbuffer) {
this1.__context.bindRenderbuffer(target,renderbuffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindSampler = function(this1,unit,sampler) {
this1.__context.bindSampler(unit,sampler);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindTexture = function(this1,target,texture) {
this1.__context.bindTexture(target,texture);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindTransformFeedback = function(this1,target,transformFeedback) {
this1.__context.bindTransformFeedback(target,transformFeedback);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bindVertexArray = function(this1,vertexArray) {
this1.__context.bindVertexArray(vertexArray);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.blendColor = function(this1,red,green,blue,alpha) {
this1.__context.blendColor(red,green,blue,alpha);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.blendEquation = function(this1,mode) {
this1.__context.blendEquation(mode);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.blendEquationSeparate = function(this1,modeRGB,modeAlpha) {
this1.__context.blendEquationSeparate(modeRGB,modeAlpha);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.blendFunc = function(this1,sfactor,dfactor) {
this1.__context.blendFunc(sfactor,dfactor);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.blendFuncSeparate = function(this1,srcRGB,dstRGB,srcAlpha,dstAlpha) {
this1.__context.blendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.blitFramebuffer = function(this1,srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter) {
this1.__context.blitFramebuffer(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bufferData = function(this1,target,size,data,usage) {
this1.__context.bufferData(target,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,size),usage);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.bufferSubData = function(this1,target,offset,size,data) {
this1.__context.bufferSubData(target,offset,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,size));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.checkFramebufferStatus = function(this1,target) {
return this1.__context.checkFramebufferStatus(target);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clear = function(this1,mask) {
this1.__context.clear(mask);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clearBufferfi = function(this1,buffer,drawbuffer,depth,stencil) {
this1.__context.clearBufferfi(buffer,drawbuffer,depth,stencil);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clearBufferfv = function(this1,buffer,drawbuffer,value) {
this1.__context.clearBufferfv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(value));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clearBufferiv = function(this1,buffer,drawbuffer,value) {
this1.__context.clearBufferiv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(value));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clearBufferuiv = function(this1,buffer,drawbuffer,value) {
this1.__context.clearBufferuiv(buffer,drawbuffer,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(value));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clearColor = function(this1,red,green,blue,alpha) {
this1.__context.clearColor(red,green,blue,alpha);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clearDepthf = function(this1,depth) {
this1.__context.clearDepth(depth);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clearStencil = function(this1,s) {
this1.__context.clearStencil(s);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.clientWaitSync = function(this1,sync,flags,timeout) {
return this1.__context.clientWaitSync(sync,flags,timeout);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.colorMask = function(this1,red,green,blue,alpha) {
this1.__context.colorMask(red,green,blue,alpha);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.compileShader = function(this1,shader) {
this1.__context.compileShader(shader);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.compressedTexImage2D = function(this1,target,level,internalformat,width,height,border,imageSize,data) {
this1.__context.compressedTexImage2D(target,level,internalformat,width,height,border,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.compressedTexImage3D = function(this1,target,level,internalformat,width,height,depth,border,imageSize,data) {
this1.__context.compressedTexImage3D(target,level,internalformat,width,height,depth,border,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.compressedTexSubImage2D = function(this1,target,level,xoffset,yoffset,width,height,format,imageSize,data) {
this1.__context.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.compressedTexSubImage3D = function(this1,target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data) {
this1.__context.compressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data,imageSize));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.copyBufferSubData = function(this1,readTarget,writeTarget,readOffset,writeOffset,size) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.copyTexImage2D = function(this1,target,level,internalformat,x,y,width,height,border) {
this1.__context.copyTexImage2D(target,level,internalformat,x,y,width,height,border);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.copyTexSubImage2D = function(this1,target,level,xoffset,yoffset,x,y,width,height) {
this1.__context.copyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.copyTexSubImage3D = function(this1,target,level,xoffset,yoffset,zoffset,x,y,width,height) {
this1.__context.copyTexSubImage3D(target,level,xoffset,yoffset,zoffset,x,y,width,height);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createBuffer = function(this1) {
return this1.__context.createBuffer();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createFramebuffer = function(this1) {
return this1.__context.createFramebuffer();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createProgram = function(this1) {
return this1.__context.createProgram();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createQuery = function(this1) {
return this1.__context.createQuery();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createRenderbuffer = function(this1) {
return this1.__context.createRenderbuffer();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createSampler = function(this1) {
return this1.__context.createSampler();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createShader = function(this1,type) {
return this1.__context.createShader(type);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createTexture = function(this1) {
return this1.__context.createTexture();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createTransformFeedback = function(this1) {
return this1.__context.createTransformFeedback();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.createVertexArray = function(this1) {
return this1.__context.createVertexArray();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.cullFace = function(this1,mode) {
this1.__context.cullFace(mode);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteBuffer = function(this1,buffer) {
this1.__context.deleteBuffer(buffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteFramebuffer = function(this1,framebuffer) {
this1.__context.deleteFramebuffer(framebuffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteProgram = function(this1,program) {
this1.__context.deleteProgram(program);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteQuery = function(this1,query) {
this1.__context.deleteQuery(query);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteRenderbuffer = function(this1,renderbuffer) {
this1.__context.deleteRenderbuffer(renderbuffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteSampler = function(this1,sampler) {
this1.__context.deleteSampler(sampler);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteShader = function(this1,shader) {
this1.__context.deleteShader(shader);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteSync = function(this1,sync) {
this1.__context.deleteSync(sync);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteTexture = function(this1,texture) {
this1.__context.deleteTexture(texture);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteTransformFeedback = function(this1,transformFeedback) {
this1.__context.deleteTransformFeedback(transformFeedback);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.deleteVertexArray = function(this1,vertexArray) {
this1.__context.deleteVertexArray(vertexArray);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.depthFunc = function(this1,func) {
this1.__context.depthFunc(func);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.depthMask = function(this1,flag) {
this1.__context.depthMask(flag);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.depthRangef = function(this1,zNear,zFar) {
this1.__context.depthRange(zNear,zFar);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.detachShader = function(this1,program,shader) {
this1.__context.detachShader(program,shader);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.disable = function(this1,cap) {
this1.__context.disable(cap);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.disableVertexAttribArray = function(this1,index) {
this1.__context.disableVertexAttribArray(index);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.drawArrays = function(this1,mode,first,count) {
this1.__context.drawArrays(mode,first,count);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.drawArraysInstanced = function(this1,mode,first,count,instanceCount) {
this1.__context.drawArraysInstanced(mode,first,count,instanceCount);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.drawBuffers = function(this1,buffers) {
this1.__context.drawBuffers(buffers);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.drawElements = function(this1,mode,count,type,offset) {
this1.__context.drawElements(mode,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.drawElementsInstanced = function(this1,mode,count,type,offset,instanceCount) {
this1.__context.drawElementsInstanced(mode,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),instanceCount);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.drawRangeElements = function(this1,mode,start,end,count,type,offset) {
this1.__context.drawRangeElements(mode,start,end,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.enable = function(this1,cap) {
this1.__context.enable(cap);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.enableVertexAttribArray = function(this1,index) {
this1.__context.enableVertexAttribArray(index);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.endQuery = function(this1,target) {
this1.__context.endQuery(target);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.endTransformFeedback = function(this1) {
this1.__context.endTransformFeedback();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.fenceSync = function(this1,condition,flags) {
return this1.__context.fenceSync(condition,flags);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.finish = function(this1) {
this1.__context.finish();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.flush = function(this1) {
this1.__context.flush();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.framebufferRenderbuffer = function(this1,target,attachment,renderbuffertarget,renderbuffer) {
this1.__context.framebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.framebufferTexture2D = function(this1,target,attachment,textarget,texture,level) {
this1.__context.framebufferTexture2D(target,attachment,textarget,texture,level);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.framebufferTextureLayer = function(this1,target,attachment,texture,level,layer) {
this1.__context.framebufferTextureLayer(target,attachment,texture,level,layer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.frontFace = function(this1,mode) {
this1.__context.frontFace(mode);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.genBuffers = function(this1,n,buffers) {
if(buffers == null) buffers = [];
var _g = 0;
while(_g < n) {
var i = _g++;
buffers[i] = this1.__context.createBuffer();
}
return buffers;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.generateMipmap = function(this1,target) {
this1.__context.generateMipmap(target);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.genFramebuffers = function(this1,n,framebuffers) {
if(framebuffers == null) framebuffers = [];
var _g = 0;
while(_g < n) {
var i = _g++;
framebuffers[i] = this1.__context.createFramebuffer();
}
return framebuffers;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.genQueries = function(this1,n,queries) {
if(queries == null) queries = [];
var _g = 0;
while(_g < n) {
var i = _g++;
queries[i] = this1.__context.createQuery();
}
return queries;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.genRenderbuffers = function(this1,n,renderbuffers) {
if(renderbuffers == null) renderbuffers = [];
var _g = 0;
while(_g < n) {
var i = _g++;
renderbuffers[i] = this1.__context.createRenderbuffer();
}
return renderbuffers;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.genSamplers = function(this1,n,samplers) {
if(samplers == null) samplers = [];
var _g = 0;
while(_g < n) {
var i = _g++;
samplers[i] = this1.__context.createSampler();
}
return samplers;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.genTextures = function(this1,n,textures) {
if(textures == null) textures = [];
var _g = 0;
while(_g < n) {
var i = _g++;
textures[i] = this1.__context.createTexture();
}
return textures;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.genTransformFeedbacks = function(this1,n,transformFeedbacks) {
if(transformFeedbacks == null) transformFeedbacks = [];
var _g = 0;
while(_g < n) {
var i = _g++;
transformFeedbacks[i] = this1.__context.createTransformFeedback();
}
return transformFeedbacks;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getActiveAttrib = function(this1,program,index) {
return this1.__context.getActiveAttrib(program,index);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getActiveUniform = function(this1,program,index) {
return this1.__context.getActiveUniform(program,index);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getActiveUniformBlocki = function(this1,program,uniformBlockIndex,pname) {
return this1.__context.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getActiveUniformBlockiv = function(this1,program,uniformBlockIndex,pname,params) {
this1.getActiveUniformBlockiv(program,uniformBlockIndex,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getActiveUniformBlockName = function(this1,program,uniformBlockIndex) {
return this1.__context.getActiveUniformBlockName(program,uniformBlockIndex);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getActiveUniformsiv = function(this1,program,uniformIndices,pname,params) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getAttachedShaders = function(this1,program) {
return this1.__context.getAttachedShaders(program);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getAttribLocation = function(this1,program,name) {
return this1.__context.getAttribLocation(program,name);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getBoolean = function(this1,pname) {
return this1.__context.getParameter(pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getBooleanv = function(this1,pname,params) {
this1.getBooleanv(pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getBufferParameteri = function(this1,target,pname) {
return this1.__context.getBufferParameter(target,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getBufferParameteri64v = function(this1,target,pname,params) {
this1.getBufferParameteri64v(target,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getBufferParameteriv = function(this1,target,pname,params) {
this1.getBufferParameteriv(target,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getBufferPointerv = function(this1,target,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getError = function(this1) {
return this1.__context.getError();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getFloat = function(this1,pname) {
return this1.__context.getParameter(pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getFloatv = function(this1,pname,params) {
this1.getFloatv(pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getExtension = function(this1,name) {
return this1.__context.getExtension(name);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getFragDataLocation = function(this1,program,name) {
return this1.__context.getFragDataLocation(program,name);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getFramebufferAttachmentParameteri = function(this1,target,attachment,pname) {
return this1.__context.getFramebufferAttachmentParameter(target,attachment,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getFramebufferAttachmentParameteriv = function(this1,target,attachment,pname,params) {
this1.getFramebufferAttachmentParameteriv(target,attachment,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getInteger = function(this1,pname) {
return this1.__context.getParameter(pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getInteger64 = function(this1,pname) {
return this1.getInteger64(pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getInteger64i = function(this1,pname) {
return this1.getInteger64(pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getInteger64i_v = function(this1,pname,params) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getInteger64v = function(this1,pname,params) {
this1.getInteger64v(pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getIntegeri = function(this1,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getIntegeri_v = function(this1,pname,params) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getIntegerv = function(this1,pname,params) {
this1.getIntegerv(pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getInternalformati = function(this1,target,internalformat,pname) {
return this1.__context.getInternalformatParameter(target,internalformat,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getInternalformativ = function(this1,target,internalformat,pname,params) {
this1.getInternalformativ(target,internalformat,pname,params);
return;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getProgramBinary = function(this1,program,binaryFormat) {
return null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getProgrami = function(this1,program,pname) {
return this1.__context.getProgramParameter(program,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getProgramInfoLog = function(this1,program) {
return this1.__context.getProgramInfoLog(program);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getProgramiv = function(this1,program,pname,params) {
this1.getProgramiv(program,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getQueryi = function(this1,target,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getQueryiv = function(this1,target,pname,params) {
this1.getQueryiv(target,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getQueryObjectui = function(this1,query,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getQueryObjectuiv = function(this1,query,pname,params) {
this1.getQueryObjectuiv(query,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getRenderbufferParameteri = function(this1,target,pname) {
return this1.__context.getRenderbufferParameter(target,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getRenderbufferParameteriv = function(this1,target,pname,params) {
this1.getRenderbufferParameteriv(target,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getSamplerParameteri = function(this1,sampler,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getSamplerParameteriv = function(this1,sampler,pname,params) {
this1.getSamplerParameteriv(sampler,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getSamplerParameterf = function(this1,sampler,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getSamplerParameterfv = function(this1,sampler,pname,params) {
this1.getSamplerParameterfv(sampler,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getShaderInfoLog = function(this1,shader) {
return this1.__context.getShaderInfoLog(shader);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getShaderi = function(this1,shader,pname) {
return this1.__context.getShaderParameter(shader,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getShaderiv = function(this1,shader,pname,params) {
this1.getShaderiv(shader,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getShaderPrecisionFormat = function(this1,shadertype,precisiontype) {
return this1.__context.getShaderPrecisionFormat(shadertype,precisiontype);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getShaderSource = function(this1,shader) {
return this1.__context.getShaderSource(shader);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getString = function(this1,name) {
return this1.getString(name);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getStringi = function(this1,name,index) {
return null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getSyncParameteri = function(this1,sync,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getSyncParameteriv = function(this1,sync,pname,params) {
this1.getSyncParameteriv(sync,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getTexParameterf = function(this1,target,pname) {
return this1.__context.getTexParameter(target,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getTexParameterfv = function(this1,target,pname,params) {
this1.getTexParameterfv(target,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getTexParameteri = function(this1,target,pname) {
return this1.__context.getTexParameter(target,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getTexParameteriv = function(this1,target,pname,params) {
this1.getTexParameteriv(target,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getTransformFeedbackVarying = function(this1,program,index) {
return this1.__context.getTransformFeedbackVarying(program,index);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformf = function(this1,program,location) {
return this1.__context.getUniform(program,location);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformfv = function(this1,program,location,params) {
this1.getUniformfv(program,location,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformi = function(this1,program,location) {
return this1.__context.getUniform(program,location);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformiv = function(this1,program,location,params) {
this1.getUniformiv(program,location,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformui = function(this1,program,location) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformuiv = function(this1,program,location,params) {
this1.getUniformuiv(program,location,params);
return;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformBlockIndex = function(this1,program,uniformBlockName) {
return this1.__context.getUniformBlockIndex(program,uniformBlockName);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformIndices = function(this1,program,uniformNames) {
return this1.__context.getUniformIndices(program,uniformNames);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getUniformLocation = function(this1,program,name) {
return this1.__context.getUniformLocation(program,name);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribf = function(this1,index,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribfv = function(this1,index,pname,params) {
this1.getVertexAttribfv(index,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribi = function(this1,index,pname) {
return this1.__context.getVertexAttrib(index,pname);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribIi = function(this1,index,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribIiv = function(this1,index,pname,params) {
return null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribIui = function(this1,index,pname) {
return 0;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribIuiv = function(this1,index,pname,params) {
return null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribiv = function(this1,index,pname,params) {
this1.getVertexAttribiv(index,pname,params);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.getVertexAttribPointerv = function(this1,index,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(this1.__context.getVertexAttribOffset(index,pname));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.hint = function(this1,target,mode) {
this1.__context.hint(target,mode);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.invalidateFramebuffer = function(this1,target,attachments) {
this1.__context.invalidateFramebuffer(target,attachments);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.invalidateSubFramebuffer = function(this1,target,attachments,x,y,width,height) {
this1.__context.invalidateSubFramebuffer(target,attachments,x,y,width,height);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isBuffer = function(this1,buffer) {
return this1.__context.isBuffer(buffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isEnabled = function(this1,cap) {
return this1.__context.isEnabled(cap);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isFramebuffer = function(this1,framebuffer) {
return this1.__context.isFramebuffer(framebuffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isProgram = function(this1,program) {
return this1.__context.isProgram(program);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isQuery = function(this1,query) {
return this1.__context.isQuery(query);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isRenderbuffer = function(this1,renderbuffer) {
return this1.__context.isRenderbuffer(renderbuffer);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isSampler = function(this1,sampler) {
return this1.__context.isSampler(sampler);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isShader = function(this1,shader) {
return this1.__context.isShader(shader);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isTexture = function(this1,texture) {
return this1.__context.isTexture(texture);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isTransformFeedback = function(this1,transformFeedback) {
return this1.__context.isTransformFeedback(transformFeedback);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.isVertexArray = function(this1,vertexArray) {
return this1.__context.isVertexArray(vertexArray);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.lineWidth = function(this1,width) {
this1.__context.lineWidth(width);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.linkProgram = function(this1,program) {
this1.__context.linkProgram(program);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.mapBufferRange = function(this1,target,offset,length,access) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.pauseTransformFeedback = function(this1) {
this1.__context.pauseTransformFeedback();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.pixelStorei = function(this1,pname,param) {
this1.__context.pixelStorei(pname,param);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.polygonOffset = function(this1,factor,units) {
this1.__context.polygonOffset(factor,units);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.programBinary = function(this1,program,binaryFormat,binary,length) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.programParameteri = function(this1,program,pname,value) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.readBuffer = function(this1,src) {
this1.__context.readBuffer(src);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.readPixels = function(this1,x,y,width,height,format,type,data) {
this1.__context.readPixels(x,y,width,height,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.releaseShaderCompiler = function(this1) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.renderbufferStorage = function(this1,target,internalformat,width,height) {
this1.__context.renderbufferStorage(target,internalformat,width,height);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.renderbufferStorageMultisample = function(this1,target,samples,internalFormat,width,height) {
this1.__context.renderbufferStorageMultisample(target,samples,internalFormat,width,height);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.resumeTransformFeedback = function(this1) {
this1.__context.resumeTransformFeedback();
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.sampleCoverage = function(this1,value,invert) {
this1.__context.sampleCoverage(value,invert);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.samplerParameterf = function(this1,sampler,pname,param) {
this1.__context.samplerParameterf(sampler,pname,param);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.samplerParameteri = function(this1,sampler,pname,param) {
this1.__context.samplerParameteri(sampler,pname,param);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.scissor = function(this1,x,y,width,height) {
this1.__context.scissor(x,y,width,height);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.shaderBinary = function(this1,shaders,binaryformat,binary,length) {
null;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.shaderSource = function(this1,shader,source) {
this1.__context.shaderSource(shader,source);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.stencilFunc = function(this1,func,ref,mask) {
this1.__context.stencilFunc(func,ref,mask);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.stencilFuncSeparate = function(this1,face,func,ref,mask) {
this1.__context.stencilFuncSeparate(face,func,ref,mask);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.stencilMask = function(this1,mask) {
this1.__context.stencilMask(mask);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.stencilMaskSeparate = function(this1,face,mask) {
this1.__context.stencilMaskSeparate(face,mask);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.stencilOp = function(this1,fail,zfail,zpass) {
this1.__context.stencilOp(fail,zfail,zpass);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.stencilOpSeparate = function(this1,face,fail,zfail,zpass) {
this1.__context.stencilOpSeparate(face,fail,zfail,zpass);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.texImage2D = function(this1,target,level,internalformat,width,height,border,format,type,data) {
this1.__context.texImage2D(target,level,internalformat,width,height,border,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.texImage3D = function(this1,target,level,internalformat,width,height,depth,border,format,type,data) {
this1.__context.texImage3D(target,level,internalformat,width,height,depth,border,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.texStorage2D = function(this1,target,level,internalformat,width,height) {
this1.__context.texStorage2D(target,level,internalformat,width,height);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.texStorage3D = function(this1,target,level,internalformat,width,height,depth) {
this1.__context.texStorage3D(target,level,internalformat,width,height,depth);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.texParameterf = function(this1,target,pname,param) {
this1.__context.texParameterf(target,pname,param);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.texParameteri = function(this1,target,pname,param) {
this1.__context.texParameteri(target,pname,param);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.texSubImage2D = function(this1,target,level,xoffset,yoffset,width,height,format,type,data) {
this1.__context.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.texSubImage3D = function(this1,target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,data) {
this1.__context.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView(data));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.transformFeedbackVaryings = function(this1,program,varyings,bufferMode) {
this1.__context.transformFeedbackVaryings(program,varyings,bufferMode);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform1f = function(this1,location,v0) {
this1.__context.uniform1f(location,v0);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform1fv = function(this1,location,count,v) {
this1.__context.uniform1fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform1i = function(this1,location,v0) {
this1.__context.uniform1i(location,v0);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform1iv = function(this1,location,count,v) {
this1.__context.uniform1iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform1ui = function(this1,location,v0) {
this1.__context.uniform1ui(location,v0);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform1uiv = function(this1,location,count,v) {
this1.__context.uniform1uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform2f = function(this1,location,v0,v1) {
this1.__context.uniform2f(location,v0,v1);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform2fv = function(this1,location,count,v) {
this1.__context.uniform2fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 2));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform2i = function(this1,location,v0,v1) {
this1.__context.uniform2i(location,v0,v1);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform2iv = function(this1,location,count,v) {
this1.__context.uniform2iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 2));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform2ui = function(this1,location,v0,v1) {
this1.__context.uniform2ui(location,v0,v1);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform2uiv = function(this1,location,count,v) {
this1.__context.uniform2uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 2));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform3f = function(this1,location,v0,v1,v2) {
this1.__context.uniform3f(location,v0,v1,v2);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform3fv = function(this1,location,count,v) {
this1.__context.uniform3fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 3));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform3i = function(this1,location,v0,v1,v2) {
this1.__context.uniform3i(location,v0,v1,v2);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform3iv = function(this1,location,count,v) {
this1.__context.uniform3iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 3));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform3ui = function(this1,location,v0,v1,v2) {
this1.__context.uniform3ui(location,v0,v1,v2);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform3uiv = function(this1,location,count,v) {
this1.__context.uniform3uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 3));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform4f = function(this1,location,v0,v1,v2,v3) {
this1.__context.uniform4f(location,v0,v1,v2,v3);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform4fv = function(this1,location,count,v) {
this1.__context.uniform4fv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 4));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform4i = function(this1,location,v0,v1,v2,v3) {
this1.__context.uniform4i(location,v0,v1,v2,v3);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform4iv = function(this1,location,count,v) {
this1.__context.uniform4iv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(v,count * 4 * 4));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform4ui = function(this1,location,v0,v1,v2,v3) {
this1.__context.uniform4ui(location,v0,v1,v2,v3);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniform4uiv = function(this1,location,count,v) {
this1.__context.uniform4uiv(location,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(v,count * 4 * 4));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformBlockBinding = function(this1,program,uniformBlockIndex,uniformBlockBinding) {
this1.__context.uniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix2fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 4));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix2x3fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix2x3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 6));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix2x4fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix2x4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 8));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix3fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 9));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix3x2fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix3x2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 6));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix3x4fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix3x4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 12));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix4fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix4fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 16));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix4x2fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix4x2fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 8));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.uniformMatrix4x3fv = function(this1,location,count,transpose,v) {
this1.__context.uniformMatrix4x3fv(location,transpose,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(v,count * 4 * 12));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.unmapBuffer = function(this1,target) {
return false;
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.useProgram = function(this1,program) {
this1.__context.useProgram(program);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.validateProgram = function(this1,program) {
this1.__context.validateProgram(program);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttrib1f = function(this1,indx,x) {
this1.__context.vertexAttrib1f(indx,x);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttrib1fv = function(this1,indx,values) {
this1.__context.vertexAttrib1fv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(values));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttrib2f = function(this1,indx,x,y) {
this1.__context.vertexAttrib2f(indx,x,y);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttrib2fv = function(this1,indx,values) {
this1.__context.vertexAttrib2fv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(values));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttrib3f = function(this1,indx,x,y,z) {
this1.__context.vertexAttrib3f(indx,x,y,z);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttrib3fv = function(this1,indx,values) {
this1.__context.vertexAttrib3fv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(values));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttrib4f = function(this1,indx,x,y,z,w) {
this1.__context.vertexAttrib4f(indx,x,y,z,w);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttrib4fv = function(this1,indx,values) {
this1.__context.vertexAttrib4fv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array(values));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttribDivisor = function(this1,index,divisor) {
this1.__context.vertexAttribDivisor(index,divisor);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttribI4i = function(this1,indx,x,y,z,w) {
this1.__context.vertexAttribI4i(indx,x,y,z,w);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttribI4iv = function(this1,indx,values) {
this1.__context.vertexAttribI4iv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array(values));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttribI4ui = function(this1,indx,x,y,z,w) {
this1.__context.vertexAttribI4ui(indx,x,y,z,w);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttribI4uiv = function(this1,indx,values) {
this1.__context.vertexAttribI4uiv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array(values));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttribIPointer = function(this1,indx,size,type,stride,pointer) {
this1.__context.vertexAttribIPointer(indx,size,type,stride,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(pointer)));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.vertexAttribPointer = function(this1,indx,size,type,normalized,stride,pointer) {
this1.__context.vertexAttribPointer(indx,size,type,normalized,stride,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(pointer));
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.viewport = function(this1,x,y,width,height) {
this1.__context.viewport(x,y,width,height);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.waitSync = function(this1,sync,flags,timeout) {
this1.__context.waitSync(sync,flags,timeout);
};
lime_graphics_opengl__$GLES3Context_GLES3Context_$Impl_$.fromGL = function(gl) {
return lime_graphics_opengl_GL.context;
};
var lime_utils_BytePointerData = function(bytes,offset) {
this.bytes = bytes;
this.offset = offset;
};
$hxClasses["lime.utils.BytePointerData"] = lime_utils_BytePointerData;
lime_utils_BytePointerData.__name__ = ["lime","utils","BytePointerData"];
lime_utils_BytePointerData.prototype = {
bytes: null
,offset: null
,__class__: lime_utils_BytePointerData
};
var lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$ = {};
$hxClasses["lime.graphics.opengl._WebGL2Context.WebGL2Context_Impl_"] = lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$;
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.__name__ = ["lime","graphics","opengl","_WebGL2Context","WebGL2Context_Impl_"];
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.__properties__ = {get_version:"get_version",get_type:"get_type",get_MAX_CLIENT_WAIT_TIMEOUT_WEBGL:"get_MAX_CLIENT_WAIT_TIMEOUT_WEBGL",get_TIMEOUT_IGNORED:"get_TIMEOUT_IGNORED",get_INVALID_INDEX:"get_INVALID_INDEX",get_DEPTH32F_STENCIL8:"get_DEPTH32F_STENCIL8",get_DEPTH_COMPONENT32F:"get_DEPTH_COMPONENT32F",get_DYNAMIC_COPY:"get_DYNAMIC_COPY",get_DYNAMIC_READ:"get_DYNAMIC_READ",get_STATIC_COPY:"get_STATIC_COPY",get_STATIC_READ:"get_STATIC_READ",get_STREAM_COPY:"get_STREAM_COPY",get_STREAM_READ:"get_STREAM_READ",get_DEPTH_COMPONENT24:"get_DEPTH_COMPONENT24",get_MAX:"get_MAX",get_MIN:"get_MIN",get_STENCIL:"get_STENCIL",get_DEPTH:"get_DEPTH",get_COLOR:"get_COLOR",get_SYNC_FLUSH_COMMANDS_BIT:"get_SYNC_FLUSH_COMMANDS_BIT",get_WAIT_FAILED:"get_WAIT_FAILED",get_CONDITION_SATISFIED:"get_CONDITION_SATISFIED",get_TIMEOUT_EXPIRED:"get_TIMEOUT_EXPIRED",get_ALREADY_SIGNALED:"get_ALREADY_SIGNALED",get_SIGNALED:"get_SIGNALED",get_UNSIGNALED:"get_UNSIGNALED",get_SYNC_GPU_COMMANDS_COMPLETE:"get_SYNC_GPU_COMMANDS_COMPLETE",get_SYNC_FENCE:"get_SYNC_FENCE",get_SYNC_FLAGS:"get_SYNC_FLAGS",get_SYNC_STATUS:"get_SYNC_STATUS",get_SYNC_CONDITION:"get_SYNC_CONDITION",get_OBJECT_TYPE:"get_OBJECT_TYPE",get_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:"get_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",get_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:"get_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",get_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:"get_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",get_UNIFORM_BLOCK_ACTIVE_UNIFORMS:"get_UNIFORM_BLOCK_ACTIVE_UNIFORMS",get_UNIFORM_BLOCK_DATA_SIZE:"get_UNIFORM_BLOCK_DATA_SIZE",get_UNIFORM_BLOCK_BINDING:"get_UNIFORM_BLOCK_BINDING",get_UNIFORM_IS_ROW_MAJOR:"get_UNIFORM_IS_ROW_MAJOR",get_UNIFORM_MATRIX_STRIDE:"get_UNIFORM_MATRIX_STRIDE",get_UNIFORM_ARRAY_STRIDE:"get_UNIFORM_ARRAY_STRIDE",get_UNIFORM_OFFSET:"get_UNIFORM_OFFSET",get_UNIFORM_BLOCK_INDEX:"get_UNIFORM_BLOCK_INDEX",get_UNIFORM_SIZE:"get_UNIFORM_SIZE",get_UNIFORM_TYPE:"get_UNIFORM_TYPE",get_ACTIVE_UNIFORM_BLOCKS:"get_ACTIVE_UNIFORM_BLOCKS",get_UNIFORM_BUFFER_OFFSET_ALIGNMENT:"get_UNIFORM_BUFFER_OFFSET_ALIGNMENT",get_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:"get_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",get_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:"get_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",get_MAX_UNIFORM_BLOCK_SIZE:"get_MAX_UNIFORM_BLOCK_SIZE",get_MAX_UNIFORM_BUFFER_BINDINGS:"get_MAX_UNIFORM_BUFFER_BINDINGS",get_MAX_COMBINED_UNIFORM_BLOCKS:"get_MAX_COMBINED_UNIFORM_BLOCKS",get_MAX_FRAGMENT_UNIFORM_BLOCKS:"get_MAX_FRAGMENT_UNIFORM_BLOCKS",get_MAX_VERTEX_UNIFORM_BLOCKS:"get_MAX_VERTEX_UNIFORM_BLOCKS",get_UNIFORM_BUFFER_SIZE:"get_UNIFORM_BUFFER_SIZE",get_UNIFORM_BUFFER_START:"get_UNIFORM_BUFFER_START",get_UNIFORM_BUFFER_BINDING:"get_UNIFORM_BUFFER_BINDING",get_UNIFORM_BUFFER:"get_UNIFORM_BUFFER",get_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:"get_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:"get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",get_RENDERBUFFER_SAMPLES:"get_RENDERBUFFER_SAMPLES",get_READ_FRAMEBUFFER_BINDING:"get_READ_FRAMEBUFFER_BINDING",get_DRAW_FRAMEBUFFER:"get_DRAW_FRAMEBUFFER",get_READ_FRAMEBUFFER:"get_READ_FRAMEBUFFER",get_DRAW_FRAMEBUFFER_BINDING:"get_DRAW_FRAMEBUFFER_BINDING",get_DEPTH24_STENCIL8:"get_DEPTH24_STENCIL8",get_FRAMEBUFFER_DEFAULT:"get_FRAMEBUFFER_DEFAULT",get_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:"get_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",get_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:"get_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",get_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:"get_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",get_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:"get_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",get_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:"get_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",get_FRAMEBUFFER_ATTACHMENT_RED_SIZE:"get_FRAMEBUFFER_ATTACHMENT_RED_SIZE",get_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:"get_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",get_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:"get_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",get_TRANSFORM_FEEDBACK_BINDING:"get_TRANSFORM_FEEDBACK_BINDING",get_TRANSFORM_FEEDBACK_ACTIVE:"get_TRANSFORM_FEEDBACK_ACTIVE",get_TRANSFORM_FEEDBACK_PAUSED:"get_TRANSFORM_FEEDBACK_PAUSED",get_TRANSFORM_FEEDBACK:"get_TRANSFORM_FEEDBACK",get_TRANSFORM_FEEDBACK_BUFFER_BINDING:"get_TRANSFORM_FEEDBACK_BUFFER_BINDING",get_TRANSFORM_FEEDBACK_BUFFER:"get_TRANSFORM_FEEDBACK_BUFFER",get_SEPARATE_ATTRIBS:"get_SEPARATE_ATTRIBS",get_INTERLEAVED_ATTRIBS:"get_INTERLEAVED_ATTRIBS",get_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:"get_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",get_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:"get_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",get_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:"get_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",get_TRANSFORM_FEEDBACK_BUFFER_SIZE:"get_TRANSFORM_FEEDBACK_BUFFER_SIZE",get_TRANSFORM_FEEDBACK_BUFFER_START:"get_TRANSFORM_FEEDBACK_BUFFER_START",get_TRANSFORM_FEEDBACK_VARYINGS:"get_TRANSFORM_FEEDBACK_VARYINGS",get_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:"get_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",get_TRANSFORM_FEEDBACK_BUFFER_MODE:"get_TRANSFORM_FEEDBACK_BUFFER_MODE",get_VERTEX_ATTRIB_ARRAY_DIVISOR:"get_VERTEX_ATTRIB_ARRAY_DIVISOR",get_VERTEX_ATTRIB_ARRAY_INTEGER:"get_VERTEX_ATTRIB_ARRAY_INTEGER",get_SIGNED_NORMALIZED:"get_SIGNED_NORMALIZED",get_UNSIGNED_NORMALIZED:"get_UNSIGNED_NORMALIZED",get_UNSIGNED_INT_VEC4:"get_UNSIGNED_INT_VEC4",get_UNSIGNED_INT_VEC3:"get_UNSIGNED_INT_VEC3",get_UNSIGNED_INT_VEC2:"get_UNSIGNED_INT_VEC2",get_FLOAT_MAT4x3:"get_FLOAT_MAT4x3",get_FLOAT_MAT4x2:"get_FLOAT_MAT4x2",get_FLOAT_MAT3x4:"get_FLOAT_MAT3x4",get_FLOAT_MAT3x2:"get_FLOAT_MAT3x2",get_FLOAT_MAT2x4:"get_FLOAT_MAT2x4",get_FLOAT_MAT2x3:"get_FLOAT_MAT2x3",get_COPY_WRITE_BUFFER_BINDING:"get_COPY_WRITE_BUFFER_BINDING",get_COPY_READ_BUFFER_BINDING:"get_COPY_READ_BUFFER_BINDING",get_COPY_WRITE_BUFFER:"get_COPY_WRITE_BUFFER",get_COPY_READ_BUFFER:"get_COPY_READ_BUFFER",get_PIXEL_UNPACK_BUFFER_BINDING:"get_PIXEL_UNPACK_BUFFER_BINDING",get_PIXEL_PACK_BUFFER_BINDING:"get_PIXEL_PACK_BUFFER_BINDING",get_PIXEL_UNPACK_BUFFER:"get_PIXEL_UNPACK_BUFFER",get_PIXEL_PACK_BUFFER:"get_PIXEL_PACK_BUFFER",get_SAMPLER_BINDING:"get_SAMPLER_BINDING",get_MAX_SAMPLES:"get_MAX_SAMPLES",get_UNSIGNED_INT_SAMPLER_2D_ARRAY:"get_UNSIGNED_INT_SAMPLER_2D_ARRAY",get_UNSIGNED_INT_SAMPLER_CUBE:"get_UNSIGNED_INT_SAMPLER_CUBE",get_UNSIGNED_INT_SAMPLER_3D:"get_UNSIGNED_INT_SAMPLER_3D",get_UNSIGNED_INT_SAMPLER_2D:"get_UNSIGNED_INT_SAMPLER_2D",get_INT_SAMPLER_2D_ARRAY:"get_INT_SAMPLER_2D_ARRAY",get_INT_SAMPLER_CUBE:"get_INT_SAMPLER_CUBE",get_INT_SAMPLER_3D:"get_INT_SAMPLER_3D",get_INT_SAMPLER_2D:"get_INT_SAMPLER_2D",get_SAMPLER_CUBE_SHADOW:"get_SAMPLER_CUBE_SHADOW",get_SAMPLER_2D_ARRAY_SHADOW:"get_SAMPLER_2D_ARRAY_SHADOW",get_SAMPLER_2D_ARRAY:"get_SAMPLER_2D_ARRAY",get_SAMPLER_2D_SHADOW:"get_SAMPLER_2D_SHADOW",get_SAMPLER_3D:"get_SAMPLER_3D",get_COLOR_ATTACHMENT15:"get_COLOR_ATTACHMENT15",get_COLOR_ATTACHMENT14:"get_COLOR_ATTACHMENT14",get_COLOR_ATTACHMENT13:"get_COLOR_ATTACHMENT13",get_COLOR_ATTACHMENT12:"get_COLOR_ATTACHMENT12",get_COLOR_ATTACHMENT11:"get_COLOR_ATTACHMENT11",get_COLOR_ATTACHMENT10:"get_COLOR_ATTACHMENT10",get_COLOR_ATTACHMENT9:"get_COLOR_ATTACHMENT9",get_COLOR_ATTACHMENT8:"get_COLOR_ATTACHMENT8",get_COLOR_ATTACHMENT7:"get_COLOR_ATTACHMENT7",get_COLOR_ATTACHMENT6:"get_COLOR_ATTACHMENT6",get_COLOR_ATTACHMENT5:"get_COLOR_ATTACHMENT5",get_COLOR_ATTACHMENT4:"get_COLOR_ATTACHMENT4",get_COLOR_ATTACHMENT3:"get_COLOR_ATTACHMENT3",get_COLOR_ATTACHMENT2:"get_COLOR_ATTACHMENT2",get_COLOR_ATTACHMENT1:"get_COLOR_ATTACHMENT1",get_MAX_COLOR_ATTACHMENTS:"get_MAX_COLOR_ATTACHMENTS",get_DRAW_BUFFER15:"get_DRAW_BUFFER15",get_DRAW_BUFFER14:"get_DRAW_BUFFER14",get_DRAW_BUFFER13:"get_DRAW_BUFFER13",get_DRAW_BUFFER12:"get_DRAW_BUFFER12",get_DRAW_BUFFER11:"get_DRAW_BUFFER11",get_DRAW_BUFFER10:"get_DRAW_BUFFER10",get_DRAW_BUFFER9:"get_DRAW_BUFFER9",get_DRAW_BUFFER8:"get_DRAW_BUFFER8",get_DRAW_BUFFER7:"get_DRAW_BUFFER7",get_DRAW_BUFFER6:"get_DRAW_BUFFER6",get_DRAW_BUFFER5:"get_DRAW_BUFFER5",get_DRAW_BUFFER4:"get_DRAW_BUFFER4",get_DRAW_BUFFER3:"get_DRAW_BUFFER3",get_DRAW_BUFFER2:"get_DRAW_BUFFER2",get_DRAW_BUFFER1:"get_DRAW_BUFFER1",get_DRAW_BUFFER0:"get_DRAW_BUFFER0",get_MAX_DRAW_BUFFERS:"get_MAX_DRAW_BUFFERS",get_ANY_SAMPLES_PASSED_CONSERVATIVE:"get_ANY_SAMPLES_PASSED_CONSERVATIVE",get_ANY_SAMPLES_PASSED:"get_ANY_SAMPLES_PASSED",get_QUERY_RESULT_AVAILABLE:"get_QUERY_RESULT_AVAILABLE",get_QUERY_RESULT:"get_QUERY_RESULT",get_CURRENT_QUERY:"get_CURRENT_QUERY",get_INT_2_10_10_10_REV:"get_INT_2_10_10_10_REV",get_RG_INTEGER:"get_RG_INTEGER",get_RG:"get_RG",get_HALF_FLOAT:"get_HALF_FLOAT",get_UNSIGNED_INT_24_8:"get_UNSIGNED_INT_24_8",get_FLOAT_32_UNSIGNED_INT_24_8_REV:"get_FLOAT_32_UNSIGNED_INT_24_8_REV",get_UNSIGNED_INT_5_9_9_9_REV:"get_UNSIGNED_INT_5_9_9_9_REV",get_UNSIGNED_INT_10F_11F_11F_REV:"get_UNSIGNED_INT_10F_11F_11F_REV",get_UNSIGNED_INT_2_10_10_10_REV:"get_UNSIGNED_INT_2_10_10_10_REV",get_TEXTURE_IMMUTABLE_LEVELS:"get_TEXTURE_IMMUTABLE_LEVELS",get_TEXTURE_IMMUTABLE_FORMAT:"get_TEXTURE_IMMUTABLE_FORMAT",get_RGB10_A2UI:"get_RGB10_A2UI",get_RGBA8_SNORM:"get_RGBA8_SNORM",get_RGB8_SNORM:"get_RGB8_SNORM",get_RG8_SNORM:"get_RG8_SNORM",get_R8_SNORM:"get_R8_SNORM",get_RG32UI:"get_RG32UI",get_RG32I:"get_RG32I",get_RG16UI:"get_RG16UI",get_RG16I:"get_RG16I",get_RG8UI:"get_RG8UI",get_RG8I:"get_RG8I",get_R32UI:"get_R32UI",get_R32I:"get_R32I",get_R16UI:"get_R16UI",get_R16I:"get_R16I",get_R8UI:"get_R8UI",get_R8I:"get_R8I",get_RG32F:"get_RG32F",get_RG16F:"get_RG16F",get_R32F:"get_R32F",get_R16F:"get_R16F",get_RG8:"get_RG8",get_R8:"get_R8",get_RGBA_INTEGER:"get_RGBA_INTEGER",get_RGB_INTEGER:"get_RGB_INTEGER",get_RED_INTEGER:"get_RED_INTEGER",get_RGB8I:"get_RGB8I",get_RGBA8I:"get_RGBA8I",get_RGB16I:"get_RGB16I",get_RGBA16I:"get_RGBA16I",get_RGB32I:"get_RGB32I",get_RGBA32I:"get_RGBA32I",get_RGB8UI:"get_RGB8UI",get_RGBA8UI:"get_RGBA8UI",get_RGB16UI:"get_RGB16UI",get_RGBA16UI:"get_RGBA16UI",get_RGB32UI:"get_RGB32UI",get_RGBA32UI:"get_RGBA32UI",get_RGB9_E5:"get_RGB9_E5",get_R11F_G11F_B10F:"get_R11F_G11F_B10F",get_TEXTURE_BINDING_2D_ARRAY:"get_TEXTURE_BINDING_2D_ARRAY",get_TEXTURE_2D_ARRAY:"get_TEXTURE_2D_ARRAY",get_RGB16F:"get_RGB16F",get_RGBA16F:"get_RGBA16F",get_RGB32F:"get_RGB32F",get_RGBA32F:"get_RGBA32F",get_COMPARE_REF_TO_TEXTURE:"get_COMPARE_REF_TO_TEXTURE",get_SRGB8_ALPHA8:"get_SRGB8_ALPHA8",get_SRGB8:"get_SRGB8",get_SRGB:"get_SRGB",get_TEXTURE_COMPARE_FUNC:"get_TEXTURE_COMPARE_FUNC",get_TEXTURE_COMPARE_MODE:"get_TEXTURE_COMPARE_MODE",get_TEXTURE_MAX_LEVEL:"get_TEXTURE_MAX_LEVEL",get_TEXTURE_BASE_LEVEL:"get_TEXTURE_BASE_LEVEL",get_TEXTURE_MAX_LOD:"get_TEXTURE_MAX_LOD",get_TEXTURE_MIN_LOD:"get_TEXTURE_MIN_LOD",get_TEXTURE_WRAP_R:"get_TEXTURE_WRAP_R",get_TEXTURE_3D:"get_TEXTURE_3D",get_RGB10_A2:"get_RGB10_A2",get_RGBA8:"get_RGBA8",get_RGB8:"get_RGB8",get_RED:"get_RED",get_MAX_ELEMENT_INDEX:"get_MAX_ELEMENT_INDEX",get_MAX_SERVER_WAIT_TIMEOUT:"get_MAX_SERVER_WAIT_TIMEOUT",get_MAX_FRAGMENT_INPUT_COMPONENTS:"get_MAX_FRAGMENT_INPUT_COMPONENTS",get_MAX_VERTEX_OUTPUT_COMPONENTS:"get_MAX_VERTEX_OUTPUT_COMPONENTS",get_VERTEX_ARRAY_BINDING:"get_VERTEX_ARRAY_BINDING",get_RASTERIZER_DISCARD:"get_RASTERIZER_DISCARD",get_FRAGMENT_SHADER_DERIVATIVE_HINT:"get_FRAGMENT_SHADER_DERIVATIVE_HINT",get_MAX_VARYING_COMPONENTS:"get_MAX_VARYING_COMPONENTS",get_MAX_PROGRAM_TEXEL_OFFSET:"get_MAX_PROGRAM_TEXEL_OFFSET",get_MIN_PROGRAM_TEXEL_OFFSET:"get_MIN_PROGRAM_TEXEL_OFFSET",get_MAX_ARRAY_TEXTURE_LAYERS:"get_MAX_ARRAY_TEXTURE_LAYERS",get_MAX_VERTEX_UNIFORM_COMPONENTS:"get_MAX_VERTEX_UNIFORM_COMPONENTS",get_MAX_FRAGMENT_UNIFORM_COMPONENTS:"get_MAX_FRAGMENT_UNIFORM_COMPONENTS",get_MAX_TEXTURE_LOD_BIAS:"get_MAX_TEXTURE_LOD_BIAS",get_MAX_ELEMENTS_INDICES:"get_MAX_ELEMENTS_INDICES",get_MAX_ELEMENTS_VERTICES:"get_MAX_ELEMENTS_VERTICES",get_MAX_3D_TEXTURE_SIZE:"get_MAX_3D_TEXTURE_SIZE",get_UNPACK_IMAGE_HEIGHT:"get_UNPACK_IMAGE_HEIGHT",get_UNPACK_SKIP_IMAGES:"get_UNPACK_SKIP_IMAGES",get_TEXTURE_BINDING_3D:"get_TEXTURE_BINDING_3D",get_PACK_SKIP_PIXELS:"get_PACK_SKIP_PIXELS",get_PACK_SKIP_ROWS:"get_PACK_SKIP_ROWS",get_PACK_ROW_LENGTH:"get_PACK_ROW_LENGTH",get_UNPACK_SKIP_PIXELS:"get_UNPACK_SKIP_PIXELS",get_UNPACK_SKIP_ROWS:"get_UNPACK_SKIP_ROWS",get_UNPACK_ROW_LENGTH:"get_UNPACK_ROW_LENGTH",get_READ_BUFFER:"get_READ_BUFFER",get_BROWSER_DEFAULT_WEBGL:"get_BROWSER_DEFAULT_WEBGL",get_UNPACK_COLORSPACE_CONVERSION_WEBGL:"get_UNPACK_COLORSPACE_CONVERSION_WEBGL",get_CONTEXT_LOST_WEBGL:"get_CONTEXT_LOST_WEBGL",get_UNPACK_PREMULTIPLY_ALPHA_WEBGL:"get_UNPACK_PREMULTIPLY_ALPHA_WEBGL",get_UNPACK_FLIP_Y_WEBGL:"get_UNPACK_FLIP_Y_WEBGL",get_INVALID_FRAMEBUFFER_OPERATION:"get_INVALID_FRAMEBUFFER_OPERATION",get_MAX_RENDERBUFFER_SIZE:"get_MAX_RENDERBUFFER_SIZE",get_RENDERBUFFER_BINDING:"get_RENDERBUFFER_BINDING",get_FRAMEBUFFER_BINDING:"get_FRAMEBUFFER_BINDING",get_FRAMEBUFFER_UNSUPPORTED:"get_FRAMEBUFFER_UNSUPPORTED",get_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:"get_FRAMEBUFFER_INCOMPLETE_DIMENSIONS",get_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:"get_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",get_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:"get_FRAMEBUFFER_INCOMPLETE_ATTACHMENT",get_FRAMEBUFFER_COMPLETE:"get_FRAMEBUFFER_COMPLETE",get_NONE:"get_NONE",get_DEPTH_STENCIL_ATTACHMENT:"get_DEPTH_STENCIL_ATTACHMENT",get_STENCIL_ATTACHMENT:"get_STENCIL_ATTACHMENT",get_DEPTH_ATTACHMENT:"get_DEPTH_ATTACHMENT",get_COLOR_ATTACHMENT0:"get_COLOR_ATTACHMENT0",get_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:"get_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:"get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",get_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:"get_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",get_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:"get_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",get_RENDERBUFFER_STENCIL_SIZE:"get_RENDERBUFFER_STENCIL_SIZE",get_RENDERBUFFER_DEPTH_SIZE:"get_RENDERBUFFER_DEPTH_SIZE",get_RENDERBUFFER_ALPHA_SIZE:"get_RENDERBUFFER_ALPHA_SIZE",get_RENDERBUFFER_BLUE_SIZE:"get_RENDERBUFFER_BLUE_SIZE",get_RENDERBUFFER_GREEN_SIZE:"get_RENDERBUFFER_GREEN_SIZE",get_RENDERBUFFER_RED_SIZE:"get_RENDERBUFFER_RED_SIZE",get_RENDERBUFFER_INTERNAL_FORMAT:"get_RENDERBUFFER_INTERNAL_FORMAT",get_RENDERBUFFER_HEIGHT:"get_RENDERBUFFER_HEIGHT",get_RENDERBUFFER_WIDTH:"get_RENDERBUFFER_WIDTH",get_DEPTH_STENCIL:"get_DEPTH_STENCIL",get_STENCIL_INDEX8:"get_STENCIL_INDEX8",get_STENCIL_INDEX:"get_STENCIL_INDEX",get_DEPTH_COMPONENT16:"get_DEPTH_COMPONENT16",get_RGB565:"get_RGB565",get_RGB5_A1:"get_RGB5_A1",get_RGBA4:"get_RGBA4",get_RENDERBUFFER:"get_RENDERBUFFER",get_FRAMEBUFFER:"get_FRAMEBUFFER",get_HIGH_INT:"get_HIGH_INT",get_MEDIUM_INT:"get_MEDIUM_INT",get_LOW_INT:"get_LOW_INT",get_HIGH_FLOAT:"get_HIGH_FLOAT",get_MEDIUM_FLOAT:"get_MEDIUM_FLOAT",get_LOW_FLOAT:"get_LOW_FLOAT",get_COMPILE_STATUS:"get_COMPILE_STATUS",get_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:"get_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",get_VERTEX_ATTRIB_ARRAY_POINTER:"get_VERTEX_ATTRIB_ARRAY_POINTER",get_VERTEX_ATTRIB_ARRAY_NORMALIZED:"get_VERTEX_ATTRIB_ARRAY_NORMALIZED",get_VERTEX_ATTRIB_ARRAY_TYPE:"get_VERTEX_ATTRIB_ARRAY_TYPE",get_VERTEX_ATTRIB_ARRAY_STRIDE:"get_VERTEX_ATTRIB_ARRAY_STRIDE",get_VERTEX_ATTRIB_ARRAY_SIZE:"get_VERTEX_ATTRIB_ARRAY_SIZE",get_VERTEX_ATTRIB_ARRAY_ENABLED:"get_VERTEX_ATTRIB_ARRAY_ENABLED",get_SAMPLER_CUBE:"get_SAMPLER_CUBE",get_SAMPLER_2D:"get_SAMPLER_2D",get_FLOAT_MAT4:"get_FLOAT_MAT4",get_FLOAT_MAT3:"get_FLOAT_MAT3",get_FLOAT_MAT2:"get_FLOAT_MAT2",get_BOOL_VEC4:"get_BOOL_VEC4",get_BOOL_VEC3:"get_BOOL_VEC3",get_BOOL_VEC2:"get_BOOL_VEC2",get_BOOL:"get_BOOL",get_INT_VEC4:"get_INT_VEC4",get_INT_VEC3:"get_INT_VEC3",get_INT_VEC2:"get_INT_VEC2",get_FLOAT_VEC4:"get_FLOAT_VEC4",get_FLOAT_VEC3:"get_FLOAT_VEC3",get_FLOAT_VEC2:"get_FLOAT_VEC2",get_MIRRORED_REPEAT:"get_MIRRORED_REPEAT",get_CLAMP_TO_EDGE:"get_CLAMP_TO_EDGE",get_REPEAT:"get_REPEAT",get_ACTIVE_TEXTURE:"get_ACTIVE_TEXTURE",get_TEXTURE31:"get_TEXTURE31",get_TEXTURE30:"get_TEXTURE30",get_TEXTURE29:"get_TEXTURE29",get_TEXTURE28:"get_TEXTURE28",get_TEXTURE27:"get_TEXTURE27",get_TEXTURE26:"get_TEXTURE26",get_TEXTURE25:"get_TEXTURE25",get_TEXTURE24:"get_TEXTURE24",get_TEXTURE23:"get_TEXTURE23",get_TEXTURE22:"get_TEXTURE22",get_TEXTURE21:"get_TEXTURE21",get_TEXTURE20:"get_TEXTURE20",get_TEXTURE19:"get_TEXTURE19",get_TEXTURE18:"get_TEXTURE18",get_TEXTURE17:"get_TEXTURE17",get_TEXTURE16:"get_TEXTURE16",get_TEXTURE15:"get_TEXTURE15",get_TEXTURE14:"get_TEXTURE14",get_TEXTURE13:"get_TEXTURE13",get_TEXTURE12:"get_TEXTURE12",get_TEXTURE11:"get_TEXTURE11",get_TEXTURE10:"get_TEXTURE10",get_TEXTURE9:"get_TEXTURE9",get_TEXTURE8:"get_TEXTURE8",get_TEXTURE7:"get_TEXTURE7",get_TEXTURE6:"get_TEXTURE6",get_TEXTURE5:"get_TEXTURE5",get_TEXTURE4:"get_TEXTURE4",get_TEXTURE3:"get_TEXTURE3",get_TEXTURE2:"get_TEXTURE2",get_TEXTURE1:"get_TEXTURE1",get_TEXTURE0:"get_TEXTURE0",get_MAX_CUBE_MAP_TEXTURE_SIZE:"get_MAX_CUBE_MAP_TEXTURE_SIZE",get_TEXTURE_CUBE_MAP_NEGATIVE_Z:"get_TEXTURE_CUBE_MAP_NEGATIVE_Z",get_TEXTURE_CUBE_MAP_POSITIVE_Z:"get_TEXTURE_CUBE_MAP_POSITIVE_Z",get_TEXTURE_CUBE_MAP_NEGATIVE_Y:"get_TEXTURE_CUBE_MAP_NEGATIVE_Y",get_TEXTURE_CUBE_MAP_POSITIVE_Y:"get_TEXTURE_CUBE_MAP_POSITIVE_Y",get_TEXTURE_CUBE_MAP_NEGATIVE_X:"get_TEXTURE_CUBE_MAP_NEGATIVE_X",get_TEXTURE_CUBE_MAP_POSITIVE_X:"get_TEXTURE_CUBE_MAP_POSITIVE_X",get_TEXTURE_BINDING_CUBE_MAP:"get_TEXTURE_BINDING_CUBE_MAP",get_TEXTURE_CUBE_MAP:"get_TEXTURE_CUBE_MAP",get_TEXTURE:"get_TEXTURE",get_TEXTURE_2D:"get_TEXTURE_2D",get_TEXTURE_WRAP_T:"get_TEXTURE_WRAP_T",get_TEXTURE_WRAP_S:"get_TEXTURE_WRAP_S",get_TEXTURE_MIN_FILTER:"get_TEXTURE_MIN_FILTER",get_TEXTURE_MAG_FILTER:"get_TEXTURE_MAG_FILTER",get_LINEAR_MIPMAP_LINEAR:"get_LINEAR_MIPMAP_LINEAR",get_NEAREST_MIPMAP_LINEAR:"get_NEAREST_MIPMAP_LINEAR",get_LINEAR_MIPMAP_NEAREST:"get_LINEAR_MIPMAP_NEAREST",get_NEAREST_MIPMAP_NEAREST:"get_NEAREST_MIPMAP_NEAREST",get_LINEAR:"get_LINEAR",get_NEAREST:"get_NEAREST",get_VERSION:"get_VERSION",get_RENDERER:"get_RENDERER",get_VENDOR:"get_VENDOR",get_DECR_WRAP:"get_DECR_WRAP",get_INCR_WRAP:"get_INCR_WRAP",get_INVERT:"get_INVERT",get_DECR:"get_DECR",get_INCR:"get_INCR",get_REPLACE:"get_REPLACE",get_KEEP:"get_KEEP",get_ALWAYS:"get_ALWAYS",get_GEQUAL:"get_GEQUAL",get_NOTEQUAL:"get_NOTEQUAL",get_GREATER:"get_GREATER",get_LEQUAL:"get_LEQUAL",get_EQUAL:"get_EQUAL",get_LESS:"get_LESS",get_NEVER:"get_NEVER",get_CURRENT_PROGRAM:"get_CURRENT_PROGRAM",get_SHADING_LANGUAGE_VERSION:"get_SHADING_LANGUAGE_VERSION",get_ACTIVE_ATTRIBUTES:"get_ACTIVE_ATTRIBUTES",get_ACTIVE_UNIFORMS:"get_ACTIVE_UNIFORMS",get_ATTACHED_SHADERS:"get_ATTACHED_SHADERS",get_VALIDATE_STATUS:"get_VALIDATE_STATUS",get_LINK_STATUS:"get_LINK_STATUS",get_DELETE_STATUS:"get_DELETE_STATUS",get_SHADER_TYPE:"get_SHADER_TYPE",get_MAX_FRAGMENT_UNIFORM_VECTORS:"get_MAX_FRAGMENT_UNIFORM_VECTORS",get_MAX_TEXTURE_IMAGE_UNITS:"get_MAX_TEXTURE_IMAGE_UNITS",get_MAX_VERTEX_TEXTURE_IMAGE_UNITS:"get_MAX_VERTEX_TEXTURE_IMAGE_UNITS",get_MAX_COMBINED_TEXTURE_IMAGE_UNITS:"get_MAX_COMBINED_TEXTURE_IMAGE_UNITS",get_MAX_VARYING_VECTORS:"get_MAX_VARYING_VECTORS",get_MAX_VERTEX_UNIFORM_VECTORS:"get_MAX_VERTEX_UNIFORM_VECTORS",get_MAX_VERTEX_ATTRIBS:"get_MAX_VERTEX_ATTRIBS",get_VERTEX_SHADER:"get_VERTEX_SHADER",get_FRAGMENT_SHADER:"get_FRAGMENT_SHADER",get_UNSIGNED_SHORT_5_6_5:"get_UNSIGNED_SHORT_5_6_5",get_UNSIGNED_SHORT_5_5_5_1:"get_UNSIGNED_SHORT_5_5_5_1",get_UNSIGNED_SHORT_4_4_4_4:"get_UNSIGNED_SHORT_4_4_4_4",get_LUMINANCE_ALPHA:"get_LUMINANCE_ALPHA",get_LUMINANCE:"get_LUMINANCE",get_RGBA:"get_RGBA",get_RGB:"get_RGB",get_ALPHA:"get_ALPHA",get_DEPTH_COMPONENT:"get_DEPTH_COMPONENT",get_FLOAT:"get_FLOAT",get_UNSIGNED_INT:"get_UNSIGNED_INT",get_INT:"get_INT",get_UNSIGNED_SHORT:"get_UNSIGNED_SHORT",get_SHORT:"get_SHORT",get_UNSIGNED_BYTE:"get_UNSIGNED_BYTE",get_BYTE:"get_BYTE",get_GENERATE_MIPMAP_HINT:"get_GENERATE_MIPMAP_HINT",get_NICEST:"get_NICEST",get_FASTEST:"get_FASTEST",get_DONT_CARE:"get_DONT_CARE",get_COMPRESSED_TEXTURE_FORMATS:"get_COMPRESSED_TEXTURE_FORMATS",get_SAMPLE_COVERAGE_INVERT:"get_SAMPLE_COVERAGE_INVERT",get_SAMPLE_COVERAGE_VALUE:"get_SAMPLE_COVERAGE_VALUE",get_SAMPLES:"get_SAMPLES",get_SAMPLE_BUFFERS:"get_SAMPLE_BUFFERS",get_TEXTURE_BINDING_2D:"get_TEXTURE_BINDING_2D",get_POLYGON_OFFSET_FACTOR:"get_POLYGON_OFFSET_FACTOR",get_POLYGON_OFFSET_UNITS:"get_POLYGON_OFFSET_UNITS",get_STENCIL_BITS:"get_STENCIL_BITS",get_DEPTH_BITS:"get_DEPTH_BITS",get_ALPHA_BITS:"get_ALPHA_BITS",get_BLUE_BITS:"get_BLUE_BITS",get_GREEN_BITS:"get_GREEN_BITS",get_RED_BITS:"get_RED_BITS",get_SUBPIXEL_BITS:"get_SUBPIXEL_BITS",get_MAX_VIEWPORT_DIMS:"get_MAX_VIEWPORT_DIMS",get_MAX_TEXTURE_SIZE:"get_MAX_TEXTURE_SIZE",get_PACK_ALIGNMENT:"get_PACK_ALIGNMENT",get_UNPACK_ALIGNMENT:"get_UNPACK_ALIGNMENT",get_COLOR_WRITEMASK:"get_COLOR_WRITEMASK",get_COLOR_CLEAR_VALUE:"get_COLOR_CLEAR_VALUE",get_SCISSOR_BOX:"get_SCISSOR_BOX",get_VIEWPORT:"get_VIEWPORT",get_STENCIL_BACK_WRITEMASK:"get_STENCIL_BACK_WRITEMASK",get_STENCIL_BACK_VALUE_MASK:"get_STENCIL_BACK_VALUE_MASK",get_STENCIL_BACK_REF:"get_STENCIL_BACK_REF",get_STENCIL_BACK_PASS_DEPTH_PASS:"get_STENCIL_BACK_PASS_DEPTH_PASS",get_STENCIL_BACK_PASS_DEPTH_FAIL:"get_STENCIL_BACK_PASS_DEPTH_FAIL",get_STENCIL_BACK_FAIL:"get_STENCIL_BACK_FAIL",get_STENCIL_BACK_FUNC:"get_STENCIL_BACK_FUNC",get_STENCIL_WRITEMASK:"get_STENCIL_WRITEMASK",get_STENCIL_VALUE_MASK:"get_STENCIL_VALUE_MASK",get_STENCIL_REF:"get_STENCIL_REF",get_STENCIL_PASS_DEPTH_PASS:"get_STENCIL_PASS_DEPTH_PASS",get_STENCIL_PASS_DEPTH_FAIL:"get_STENCIL_PASS_DEPTH_FAIL",get_STENCIL_FAIL:"get_STENCIL_FAIL",get_STENCIL_FUNC:"get_STENCIL_FUNC",get_STENCIL_CLEAR_VALUE:"get_STENCIL_CLEAR_VALUE",get_DEPTH_FUNC:"get_DEPTH_FUNC",get_DEPTH_CLEAR_VALUE:"get_DEPTH_CLEAR_VALUE",get_DEPTH_WRITEMASK:"get_DEPTH_WRITEMASK",get_DEPTH_RANGE:"get_DEPTH_RANGE",get_FRONT_FACE:"get_FRONT_FACE",get_CULL_FACE_MODE:"get_CULL_FACE_MODE",get_ALIASED_LINE_WIDTH_RANGE:"get_ALIASED_LINE_WIDTH_RANGE",get_ALIASED_POINT_SIZE_RANGE:"get_ALIASED_POINT_SIZE_RANGE",get_LINE_WIDTH:"get_LINE_WIDTH",get_CCW:"get_CCW",get_CW:"get_CW",get_OUT_OF_MEMORY:"get_OUT_OF_MEMORY",get_INVALID_OPERATION:"get_INVALID_OPERATION",get_INVALID_VALUE:"get_INVALID_VALUE",get_INVALID_ENUM:"get_INVALID_ENUM",get_NO_ERROR:"get_NO_ERROR",get_SAMPLE_COVERAGE:"get_SAMPLE_COVERAGE",get_SAMPLE_ALPHA_TO_COVERAGE:"get_SAMPLE_ALPHA_TO_COVERAGE",get_POLYGON_OFFSET_FILL:"get_POLYGON_OFFSET_FILL",get_SCISSOR_TEST:"get_SCISSOR_TEST",get_DEPTH_TEST:"get_DEPTH_TEST",get_STENCIL_TEST:"get_STENCIL_TEST",get_DITHER:"get_DITHER",get_BLEND:"get_BLEND",get_CULL_FACE:"get_CULL_FACE",get_FRONT_AND_BACK:"get_FRONT_AND_BACK",get_BACK:"get_BACK",get_FRONT:"get_FRONT",get_CURRENT_VERTEX_ATTRIB:"get_CURRENT_VERTEX_ATTRIB",get_BUFFER_USAGE:"get_BUFFER_USAGE",get_BUFFER_SIZE:"get_BUFFER_SIZE",get_DYNAMIC_DRAW:"get_DYNAMIC_DRAW",get_STATIC_DRAW:"get_STATIC_DRAW",get_STREAM_DRAW:"get_STREAM_DRAW",get_ELEMENT_ARRAY_BUFFER_BINDING:"get_ELEMENT_ARRAY_BUFFER_BINDING",get_ARRAY_BUFFER_BINDING:"get_ARRAY_BUFFER_BINDING",get_ELEMENT_ARRAY_BUFFER:"get_ELEMENT_ARRAY_BUFFER",get_ARRAY_BUFFER:"get_ARRAY_BUFFER",get_BLEND_COLOR:"get_BLEND_COLOR",get_ONE_MINUS_CONSTANT_ALPHA:"get_ONE_MINUS_CONSTANT_ALPHA",get_CONSTANT_ALPHA:"get_CONSTANT_ALPHA",get_ONE_MINUS_CONSTANT_COLOR:"get_ONE_MINUS_CONSTANT_COLOR",get_CONSTANT_COLOR:"get_CONSTANT_COLOR",get_BLEND_SRC_ALPHA:"get_BLEND_SRC_ALPHA",get_BLEND_DST_ALPHA:"get_BLEND_DST_ALPHA",get_BLEND_SRC_RGB:"get_BLEND_SRC_RGB",get_BLEND_DST_RGB:"get_BLEND_DST_RGB",get_FUNC_REVERSE_SUBTRACT:"get_FUNC_REVERSE_SUBTRACT",get_FUNC_SUBTRACT:"get_FUNC_SUBTRACT",get_BLEND_EQUATION_ALPHA:"get_BLEND_EQUATION_ALPHA",get_BLEND_EQUATION_RGB:"get_BLEND_EQUATION_RGB",get_BLEND_EQUATION:"get_BLEND_EQUATION",get_FUNC_ADD:"get_FUNC_ADD",get_SRC_ALPHA_SATURATE:"get_SRC_ALPHA_SATURATE",get_ONE_MINUS_DST_COLOR:"get_ONE_MINUS_DST_COLOR",get_DST_COLOR:"get_DST_COLOR",get_ONE_MINUS_DST_ALPHA:"get_ONE_MINUS_DST_ALPHA",get_DST_ALPHA:"get_DST_ALPHA",get_ONE_MINUS_SRC_ALPHA:"get_ONE_MINUS_SRC_ALPHA",get_SRC_ALPHA:"get_SRC_ALPHA",get_ONE_MINUS_SRC_COLOR:"get_ONE_MINUS_SRC_COLOR",get_SRC_COLOR:"get_SRC_COLOR",get_ONE:"get_ONE",get_ZERO:"get_ZERO",get_TRIANGLE_FAN:"get_TRIANGLE_FAN",get_TRIANGLE_STRIP:"get_TRIANGLE_STRIP",get_TRIANGLES:"get_TRIANGLES",get_LINE_STRIP:"get_LINE_STRIP",get_LINE_LOOP:"get_LINE_LOOP",get_LINES:"get_LINES",get_POINTS:"get_POINTS",get_COLOR_BUFFER_BIT:"get_COLOR_BUFFER_BIT",get_STENCIL_BUFFER_BIT:"get_STENCIL_BUFFER_BIT",get_DEPTH_BUFFER_BIT:"get_DEPTH_BUFFER_BIT"}
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_BUFFER_BIT = function(this1) {
return this1.DEPTH_BUFFER_BIT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BUFFER_BIT = function(this1) {
return this1.STENCIL_BUFFER_BIT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_BUFFER_BIT = function(this1) {
return this1.COLOR_BUFFER_BIT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_POINTS = function(this1) {
return this1.POINTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LINES = function(this1) {
return this1.LINES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LINE_LOOP = function(this1) {
return this1.LINE_LOOP;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LINE_STRIP = function(this1) {
return this1.LINE_STRIP;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRIANGLES = function(this1) {
return this1.TRIANGLES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRIANGLE_STRIP = function(this1) {
return this1.TRIANGLE_STRIP;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRIANGLE_FAN = function(this1) {
return this1.TRIANGLE_FAN;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ZERO = function(this1) {
return this1.ZERO;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ONE = function(this1) {
return this1.ONE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SRC_COLOR = function(this1) {
return this1.SRC_COLOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ONE_MINUS_SRC_COLOR = function(this1) {
return this1.ONE_MINUS_SRC_COLOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SRC_ALPHA = function(this1) {
return this1.SRC_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ONE_MINUS_SRC_ALPHA = function(this1) {
return this1.ONE_MINUS_SRC_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DST_ALPHA = function(this1) {
return this1.DST_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ONE_MINUS_DST_ALPHA = function(this1) {
return this1.ONE_MINUS_DST_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DST_COLOR = function(this1) {
return this1.DST_COLOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ONE_MINUS_DST_COLOR = function(this1) {
return this1.ONE_MINUS_DST_COLOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SRC_ALPHA_SATURATE = function(this1) {
return this1.SRC_ALPHA_SATURATE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FUNC_ADD = function(this1) {
return this1.FUNC_ADD;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND_EQUATION = function(this1) {
return this1.BLEND_EQUATION;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND_EQUATION_RGB = function(this1) {
return this1.BLEND_EQUATION_RGB;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND_EQUATION_ALPHA = function(this1) {
return this1.BLEND_EQUATION_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FUNC_SUBTRACT = function(this1) {
return this1.FUNC_SUBTRACT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FUNC_REVERSE_SUBTRACT = function(this1) {
return this1.FUNC_REVERSE_SUBTRACT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND_DST_RGB = function(this1) {
return this1.BLEND_DST_RGB;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND_SRC_RGB = function(this1) {
return this1.BLEND_SRC_RGB;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND_DST_ALPHA = function(this1) {
return this1.BLEND_DST_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND_SRC_ALPHA = function(this1) {
return this1.BLEND_SRC_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CONSTANT_COLOR = function(this1) {
return this1.CONSTANT_COLOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ONE_MINUS_CONSTANT_COLOR = function(this1) {
return this1.ONE_MINUS_CONSTANT_COLOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CONSTANT_ALPHA = function(this1) {
return this1.CONSTANT_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ONE_MINUS_CONSTANT_ALPHA = function(this1) {
return this1.ONE_MINUS_CONSTANT_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND_COLOR = function(this1) {
return this1.BLEND_COLOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ARRAY_BUFFER = function(this1) {
return this1.ARRAY_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ELEMENT_ARRAY_BUFFER = function(this1) {
return this1.ELEMENT_ARRAY_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ARRAY_BUFFER_BINDING = function(this1) {
return this1.ARRAY_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ELEMENT_ARRAY_BUFFER_BINDING = function(this1) {
return this1.ELEMENT_ARRAY_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STREAM_DRAW = function(this1) {
return this1.STREAM_DRAW;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STATIC_DRAW = function(this1) {
return this1.STATIC_DRAW;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DYNAMIC_DRAW = function(this1) {
return this1.DYNAMIC_DRAW;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BUFFER_SIZE = function(this1) {
return this1.BUFFER_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BUFFER_USAGE = function(this1) {
return this1.BUFFER_USAGE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CURRENT_VERTEX_ATTRIB = function(this1) {
return this1.CURRENT_VERTEX_ATTRIB;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRONT = function(this1) {
return this1.FRONT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BACK = function(this1) {
return this1.BACK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRONT_AND_BACK = function(this1) {
return this1.FRONT_AND_BACK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CULL_FACE = function(this1) {
return this1.CULL_FACE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLEND = function(this1) {
return this1.BLEND;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DITHER = function(this1) {
return this1.DITHER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_TEST = function(this1) {
return this1.STENCIL_TEST;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_TEST = function(this1) {
return this1.DEPTH_TEST;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SCISSOR_TEST = function(this1) {
return this1.SCISSOR_TEST;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_POLYGON_OFFSET_FILL = function(this1) {
return this1.POLYGON_OFFSET_FILL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLE_ALPHA_TO_COVERAGE = function(this1) {
return this1.SAMPLE_ALPHA_TO_COVERAGE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLE_COVERAGE = function(this1) {
return this1.SAMPLE_COVERAGE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_NO_ERROR = function(this1) {
return this1.NO_ERROR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INVALID_ENUM = function(this1) {
return this1.INVALID_ENUM;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INVALID_VALUE = function(this1) {
return this1.INVALID_VALUE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INVALID_OPERATION = function(this1) {
return this1.INVALID_OPERATION;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_OUT_OF_MEMORY = function(this1) {
return this1.OUT_OF_MEMORY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CW = function(this1) {
return this1.CW;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CCW = function(this1) {
return this1.CCW;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LINE_WIDTH = function(this1) {
return this1.LINE_WIDTH;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ALIASED_POINT_SIZE_RANGE = function(this1) {
return this1.ALIASED_POINT_SIZE_RANGE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ALIASED_LINE_WIDTH_RANGE = function(this1) {
return this1.ALIASED_LINE_WIDTH_RANGE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CULL_FACE_MODE = function(this1) {
return this1.CULL_FACE_MODE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRONT_FACE = function(this1) {
return this1.FRONT_FACE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_RANGE = function(this1) {
return this1.DEPTH_RANGE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_WRITEMASK = function(this1) {
return this1.DEPTH_WRITEMASK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_CLEAR_VALUE = function(this1) {
return this1.DEPTH_CLEAR_VALUE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_FUNC = function(this1) {
return this1.DEPTH_FUNC;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_CLEAR_VALUE = function(this1) {
return this1.STENCIL_CLEAR_VALUE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_FUNC = function(this1) {
return this1.STENCIL_FUNC;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_FAIL = function(this1) {
return this1.STENCIL_FAIL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_PASS_DEPTH_FAIL = function(this1) {
return this1.STENCIL_PASS_DEPTH_FAIL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_PASS_DEPTH_PASS = function(this1) {
return this1.STENCIL_PASS_DEPTH_PASS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_REF = function(this1) {
return this1.STENCIL_REF;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_VALUE_MASK = function(this1) {
return this1.STENCIL_VALUE_MASK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_WRITEMASK = function(this1) {
return this1.STENCIL_WRITEMASK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BACK_FUNC = function(this1) {
return this1.STENCIL_BACK_FUNC;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BACK_FAIL = function(this1) {
return this1.STENCIL_BACK_FAIL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BACK_PASS_DEPTH_FAIL = function(this1) {
return this1.STENCIL_BACK_PASS_DEPTH_FAIL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BACK_PASS_DEPTH_PASS = function(this1) {
return this1.STENCIL_BACK_PASS_DEPTH_PASS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BACK_REF = function(this1) {
return this1.STENCIL_BACK_REF;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BACK_VALUE_MASK = function(this1) {
return this1.STENCIL_BACK_VALUE_MASK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BACK_WRITEMASK = function(this1) {
return this1.STENCIL_BACK_WRITEMASK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VIEWPORT = function(this1) {
return this1.VIEWPORT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SCISSOR_BOX = function(this1) {
return this1.SCISSOR_BOX;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_CLEAR_VALUE = function(this1) {
return this1.COLOR_CLEAR_VALUE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_WRITEMASK = function(this1) {
return this1.COLOR_WRITEMASK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_ALIGNMENT = function(this1) {
return this1.UNPACK_ALIGNMENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_PACK_ALIGNMENT = function(this1) {
return this1.PACK_ALIGNMENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_TEXTURE_SIZE = function(this1) {
return this1.MAX_TEXTURE_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VIEWPORT_DIMS = function(this1) {
return this1.MAX_VIEWPORT_DIMS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SUBPIXEL_BITS = function(this1) {
return this1.SUBPIXEL_BITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RED_BITS = function(this1) {
return this1.RED_BITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_GREEN_BITS = function(this1) {
return this1.GREEN_BITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BLUE_BITS = function(this1) {
return this1.BLUE_BITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ALPHA_BITS = function(this1) {
return this1.ALPHA_BITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_BITS = function(this1) {
return this1.DEPTH_BITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_BITS = function(this1) {
return this1.STENCIL_BITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_POLYGON_OFFSET_UNITS = function(this1) {
return this1.POLYGON_OFFSET_UNITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_POLYGON_OFFSET_FACTOR = function(this1) {
return this1.POLYGON_OFFSET_FACTOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_BINDING_2D = function(this1) {
return this1.TEXTURE_BINDING_2D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLE_BUFFERS = function(this1) {
return this1.SAMPLE_BUFFERS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLES = function(this1) {
return this1.SAMPLES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLE_COVERAGE_VALUE = function(this1) {
return this1.SAMPLE_COVERAGE_VALUE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLE_COVERAGE_INVERT = function(this1) {
return this1.SAMPLE_COVERAGE_INVERT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COMPRESSED_TEXTURE_FORMATS = function(this1) {
return this1.COMPRESSED_TEXTURE_FORMATS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DONT_CARE = function(this1) {
return this1.DONT_CARE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FASTEST = function(this1) {
return this1.FASTEST;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_NICEST = function(this1) {
return this1.NICEST;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_GENERATE_MIPMAP_HINT = function(this1) {
return this1.GENERATE_MIPMAP_HINT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BYTE = function(this1) {
return this1.BYTE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_BYTE = function(this1) {
return this1.UNSIGNED_BYTE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SHORT = function(this1) {
return this1.SHORT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_SHORT = function(this1) {
return this1.UNSIGNED_SHORT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT = function(this1) {
return this1.INT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT = function(this1) {
return this1.UNSIGNED_INT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT = function(this1) {
return this1.FLOAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_COMPONENT = function(this1) {
return this1.DEPTH_COMPONENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ALPHA = function(this1) {
return this1.ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB = function(this1) {
return this1.RGB;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA = function(this1) {
return this1.RGBA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LUMINANCE = function(this1) {
return this1.LUMINANCE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LUMINANCE_ALPHA = function(this1) {
return this1.LUMINANCE_ALPHA;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_SHORT_4_4_4_4 = function(this1) {
return this1.UNSIGNED_SHORT_4_4_4_4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_SHORT_5_5_5_1 = function(this1) {
return this1.UNSIGNED_SHORT_5_5_5_1;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_SHORT_5_6_5 = function(this1) {
return this1.UNSIGNED_SHORT_5_6_5;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAGMENT_SHADER = function(this1) {
return this1.FRAGMENT_SHADER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_SHADER = function(this1) {
return this1.VERTEX_SHADER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VERTEX_ATTRIBS = function(this1) {
return this1.MAX_VERTEX_ATTRIBS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VERTEX_UNIFORM_VECTORS = function(this1) {
return this1.MAX_VERTEX_UNIFORM_VECTORS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VARYING_VECTORS = function(this1) {
return this1.MAX_VARYING_VECTORS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_COMBINED_TEXTURE_IMAGE_UNITS = function(this1) {
return this1.MAX_COMBINED_TEXTURE_IMAGE_UNITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VERTEX_TEXTURE_IMAGE_UNITS = function(this1) {
return this1.MAX_VERTEX_TEXTURE_IMAGE_UNITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_TEXTURE_IMAGE_UNITS = function(this1) {
return this1.MAX_TEXTURE_IMAGE_UNITS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_FRAGMENT_UNIFORM_VECTORS = function(this1) {
return this1.MAX_FRAGMENT_UNIFORM_VECTORS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SHADER_TYPE = function(this1) {
return this1.SHADER_TYPE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DELETE_STATUS = function(this1) {
return this1.DELETE_STATUS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LINK_STATUS = function(this1) {
return this1.LINK_STATUS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VALIDATE_STATUS = function(this1) {
return this1.VALIDATE_STATUS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ATTACHED_SHADERS = function(this1) {
return this1.ATTACHED_SHADERS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ACTIVE_UNIFORMS = function(this1) {
return this1.ACTIVE_UNIFORMS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ACTIVE_ATTRIBUTES = function(this1) {
return this1.ACTIVE_ATTRIBUTES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SHADING_LANGUAGE_VERSION = function(this1) {
return this1.SHADING_LANGUAGE_VERSION;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CURRENT_PROGRAM = function(this1) {
return this1.CURRENT_PROGRAM;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_NEVER = function(this1) {
return this1.NEVER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LESS = function(this1) {
return this1.LESS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_EQUAL = function(this1) {
return this1.EQUAL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LEQUAL = function(this1) {
return this1.LEQUAL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_GREATER = function(this1) {
return this1.GREATER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_NOTEQUAL = function(this1) {
return this1.NOTEQUAL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_GEQUAL = function(this1) {
return this1.GEQUAL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ALWAYS = function(this1) {
return this1.ALWAYS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_KEEP = function(this1) {
return this1.KEEP;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_REPLACE = function(this1) {
return this1.REPLACE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INCR = function(this1) {
return this1.INCR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DECR = function(this1) {
return this1.DECR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INVERT = function(this1) {
return this1.INVERT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INCR_WRAP = function(this1) {
return this1.INCR_WRAP;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DECR_WRAP = function(this1) {
return this1.DECR_WRAP;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VENDOR = function(this1) {
return this1.VENDOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERER = function(this1) {
return this1.RENDERER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERSION = function(this1) {
return this1.VERSION;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_NEAREST = function(this1) {
return this1.NEAREST;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LINEAR = function(this1) {
return this1.LINEAR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_NEAREST_MIPMAP_NEAREST = function(this1) {
return this1.NEAREST_MIPMAP_NEAREST;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LINEAR_MIPMAP_NEAREST = function(this1) {
return this1.LINEAR_MIPMAP_NEAREST;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_NEAREST_MIPMAP_LINEAR = function(this1) {
return this1.NEAREST_MIPMAP_LINEAR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LINEAR_MIPMAP_LINEAR = function(this1) {
return this1.LINEAR_MIPMAP_LINEAR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_MAG_FILTER = function(this1) {
return this1.TEXTURE_MAG_FILTER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_MIN_FILTER = function(this1) {
return this1.TEXTURE_MIN_FILTER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_WRAP_S = function(this1) {
return this1.TEXTURE_WRAP_S;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_WRAP_T = function(this1) {
return this1.TEXTURE_WRAP_T;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_2D = function(this1) {
return this1.TEXTURE_2D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE = function(this1) {
return this1.TEXTURE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_CUBE_MAP = function(this1) {
return this1.TEXTURE_CUBE_MAP;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_BINDING_CUBE_MAP = function(this1) {
return this1.TEXTURE_BINDING_CUBE_MAP;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_CUBE_MAP_POSITIVE_X = function(this1) {
return this1.TEXTURE_CUBE_MAP_POSITIVE_X;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_CUBE_MAP_NEGATIVE_X = function(this1) {
return this1.TEXTURE_CUBE_MAP_NEGATIVE_X;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_CUBE_MAP_POSITIVE_Y = function(this1) {
return this1.TEXTURE_CUBE_MAP_POSITIVE_Y;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_CUBE_MAP_NEGATIVE_Y = function(this1) {
return this1.TEXTURE_CUBE_MAP_NEGATIVE_Y;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_CUBE_MAP_POSITIVE_Z = function(this1) {
return this1.TEXTURE_CUBE_MAP_POSITIVE_Z;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_CUBE_MAP_NEGATIVE_Z = function(this1) {
return this1.TEXTURE_CUBE_MAP_NEGATIVE_Z;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_CUBE_MAP_TEXTURE_SIZE = function(this1) {
return this1.MAX_CUBE_MAP_TEXTURE_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE0 = function(this1) {
return this1.TEXTURE0;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE1 = function(this1) {
return this1.TEXTURE1;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE2 = function(this1) {
return this1.TEXTURE2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE3 = function(this1) {
return this1.TEXTURE3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE4 = function(this1) {
return this1.TEXTURE4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE5 = function(this1) {
return this1.TEXTURE5;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE6 = function(this1) {
return this1.TEXTURE6;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE7 = function(this1) {
return this1.TEXTURE7;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE8 = function(this1) {
return this1.TEXTURE8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE9 = function(this1) {
return this1.TEXTURE9;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE10 = function(this1) {
return this1.TEXTURE10;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE11 = function(this1) {
return this1.TEXTURE11;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE12 = function(this1) {
return this1.TEXTURE12;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE13 = function(this1) {
return this1.TEXTURE13;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE14 = function(this1) {
return this1.TEXTURE14;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE15 = function(this1) {
return this1.TEXTURE15;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE16 = function(this1) {
return this1.TEXTURE16;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE17 = function(this1) {
return this1.TEXTURE17;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE18 = function(this1) {
return this1.TEXTURE18;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE19 = function(this1) {
return this1.TEXTURE19;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE20 = function(this1) {
return this1.TEXTURE20;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE21 = function(this1) {
return this1.TEXTURE21;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE22 = function(this1) {
return this1.TEXTURE22;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE23 = function(this1) {
return this1.TEXTURE23;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE24 = function(this1) {
return this1.TEXTURE24;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE25 = function(this1) {
return this1.TEXTURE25;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE26 = function(this1) {
return this1.TEXTURE26;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE27 = function(this1) {
return this1.TEXTURE27;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE28 = function(this1) {
return this1.TEXTURE28;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE29 = function(this1) {
return this1.TEXTURE29;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE30 = function(this1) {
return this1.TEXTURE30;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE31 = function(this1) {
return this1.TEXTURE31;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ACTIVE_TEXTURE = function(this1) {
return this1.ACTIVE_TEXTURE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_REPEAT = function(this1) {
return this1.REPEAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CLAMP_TO_EDGE = function(this1) {
return this1.CLAMP_TO_EDGE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MIRRORED_REPEAT = function(this1) {
return this1.MIRRORED_REPEAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_VEC2 = function(this1) {
return this1.FLOAT_VEC2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_VEC3 = function(this1) {
return this1.FLOAT_VEC3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_VEC4 = function(this1) {
return this1.FLOAT_VEC4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT_VEC2 = function(this1) {
return this1.INT_VEC2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT_VEC3 = function(this1) {
return this1.INT_VEC3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT_VEC4 = function(this1) {
return this1.INT_VEC4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BOOL = function(this1) {
return this1.BOOL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BOOL_VEC2 = function(this1) {
return this1.BOOL_VEC2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BOOL_VEC3 = function(this1) {
return this1.BOOL_VEC3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BOOL_VEC4 = function(this1) {
return this1.BOOL_VEC4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT2 = function(this1) {
return this1.FLOAT_MAT2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT3 = function(this1) {
return this1.FLOAT_MAT3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT4 = function(this1) {
return this1.FLOAT_MAT4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLER_2D = function(this1) {
return this1.SAMPLER_2D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLER_CUBE = function(this1) {
return this1.SAMPLER_CUBE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_ENABLED = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_ENABLED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_SIZE = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_STRIDE = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_STRIDE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_TYPE = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_TYPE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_NORMALIZED = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_NORMALIZED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_POINTER = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_POINTER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COMPILE_STATUS = function(this1) {
return this1.COMPILE_STATUS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LOW_FLOAT = function(this1) {
return this1.LOW_FLOAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MEDIUM_FLOAT = function(this1) {
return this1.MEDIUM_FLOAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_HIGH_FLOAT = function(this1) {
return this1.HIGH_FLOAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_LOW_INT = function(this1) {
return this1.LOW_INT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MEDIUM_INT = function(this1) {
return this1.MEDIUM_INT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_HIGH_INT = function(this1) {
return this1.HIGH_INT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER = function(this1) {
return this1.FRAMEBUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER = function(this1) {
return this1.RENDERBUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA4 = function(this1) {
return this1.RGBA4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB5_A1 = function(this1) {
return this1.RGB5_A1;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB565 = function(this1) {
return this1.RGB565;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_COMPONENT16 = function(this1) {
return this1.DEPTH_COMPONENT16;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_INDEX = function(this1) {
return this1.STENCIL_INDEX;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_INDEX8 = function(this1) {
return this1.STENCIL_INDEX8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_STENCIL = function(this1) {
return this1.DEPTH_STENCIL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_WIDTH = function(this1) {
return this1.RENDERBUFFER_WIDTH;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_HEIGHT = function(this1) {
return this1.RENDERBUFFER_HEIGHT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_INTERNAL_FORMAT = function(this1) {
return this1.RENDERBUFFER_INTERNAL_FORMAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_RED_SIZE = function(this1) {
return this1.RENDERBUFFER_RED_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_GREEN_SIZE = function(this1) {
return this1.RENDERBUFFER_GREEN_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_BLUE_SIZE = function(this1) {
return this1.RENDERBUFFER_BLUE_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_ALPHA_SIZE = function(this1) {
return this1.RENDERBUFFER_ALPHA_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_DEPTH_SIZE = function(this1) {
return this1.RENDERBUFFER_DEPTH_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_STENCIL_SIZE = function(this1) {
return this1.RENDERBUFFER_STENCIL_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT0 = function(this1) {
return this1.COLOR_ATTACHMENT0;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_ATTACHMENT = function(this1) {
return this1.DEPTH_ATTACHMENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL_ATTACHMENT = function(this1) {
return this1.STENCIL_ATTACHMENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_STENCIL_ATTACHMENT = function(this1) {
return this1.DEPTH_STENCIL_ATTACHMENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_NONE = function(this1) {
return this1.NONE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_COMPLETE = function(this1) {
return this1.FRAMEBUFFER_COMPLETE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = function(this1) {
return this1.FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = function(this1) {
return this1.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = function(this1) {
return this1.FRAMEBUFFER_INCOMPLETE_DIMENSIONS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_UNSUPPORTED = function(this1) {
return this1.FRAMEBUFFER_UNSUPPORTED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_BINDING = function(this1) {
return this1.FRAMEBUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_BINDING = function(this1) {
return this1.RENDERBUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_RENDERBUFFER_SIZE = function(this1) {
return this1.MAX_RENDERBUFFER_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INVALID_FRAMEBUFFER_OPERATION = function(this1) {
return this1.INVALID_FRAMEBUFFER_OPERATION;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_FLIP_Y_WEBGL = function(this1) {
return this1.UNPACK_FLIP_Y_WEBGL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_PREMULTIPLY_ALPHA_WEBGL = function(this1) {
return this1.UNPACK_PREMULTIPLY_ALPHA_WEBGL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CONTEXT_LOST_WEBGL = function(this1) {
return this1.CONTEXT_LOST_WEBGL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_COLORSPACE_CONVERSION_WEBGL = function(this1) {
return this1.UNPACK_COLORSPACE_CONVERSION_WEBGL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_BROWSER_DEFAULT_WEBGL = function(this1) {
return this1.BROWSER_DEFAULT_WEBGL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_type = function(this1) {
return this1.type;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_version = function(this1) {
return this1.version;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_READ_BUFFER = function(this1) {
return this1.READ_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_ROW_LENGTH = function(this1) {
return this1.UNPACK_ROW_LENGTH;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_SKIP_ROWS = function(this1) {
return this1.UNPACK_SKIP_ROWS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_SKIP_PIXELS = function(this1) {
return this1.UNPACK_SKIP_PIXELS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_PACK_ROW_LENGTH = function(this1) {
return this1.PACK_ROW_LENGTH;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_PACK_SKIP_ROWS = function(this1) {
return this1.PACK_SKIP_ROWS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_PACK_SKIP_PIXELS = function(this1) {
return this1.PACK_SKIP_PIXELS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_BINDING_3D = function(this1) {
return this1.TEXTURE_BINDING_3D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_SKIP_IMAGES = function(this1) {
return this1.UNPACK_SKIP_IMAGES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNPACK_IMAGE_HEIGHT = function(this1) {
return this1.UNPACK_IMAGE_HEIGHT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_3D_TEXTURE_SIZE = function(this1) {
return this1.MAX_3D_TEXTURE_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_ELEMENTS_VERTICES = function(this1) {
return this1.MAX_ELEMENTS_VERTICES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_ELEMENTS_INDICES = function(this1) {
return this1.MAX_ELEMENTS_INDICES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_TEXTURE_LOD_BIAS = function(this1) {
return this1.MAX_TEXTURE_LOD_BIAS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_FRAGMENT_UNIFORM_COMPONENTS = function(this1) {
return this1.MAX_FRAGMENT_UNIFORM_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VERTEX_UNIFORM_COMPONENTS = function(this1) {
return this1.MAX_VERTEX_UNIFORM_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_ARRAY_TEXTURE_LAYERS = function(this1) {
return this1.MAX_ARRAY_TEXTURE_LAYERS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MIN_PROGRAM_TEXEL_OFFSET = function(this1) {
return this1.MIN_PROGRAM_TEXEL_OFFSET;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_PROGRAM_TEXEL_OFFSET = function(this1) {
return this1.MAX_PROGRAM_TEXEL_OFFSET;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VARYING_COMPONENTS = function(this1) {
return this1.MAX_VARYING_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAGMENT_SHADER_DERIVATIVE_HINT = function(this1) {
return this1.FRAGMENT_SHADER_DERIVATIVE_HINT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RASTERIZER_DISCARD = function(this1) {
return this1.RASTERIZER_DISCARD;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ARRAY_BINDING = function(this1) {
return this1.VERTEX_ARRAY_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VERTEX_OUTPUT_COMPONENTS = function(this1) {
return this1.MAX_VERTEX_OUTPUT_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_FRAGMENT_INPUT_COMPONENTS = function(this1) {
return this1.MAX_FRAGMENT_INPUT_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_SERVER_WAIT_TIMEOUT = function(this1) {
return this1.MAX_SERVER_WAIT_TIMEOUT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_ELEMENT_INDEX = function(this1) {
return this1.MAX_ELEMENT_INDEX;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RED = function(this1) {
return this1.RED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB8 = function(this1) {
return this1.RGB8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA8 = function(this1) {
return this1.RGBA8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB10_A2 = function(this1) {
return this1.RGB10_A2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_3D = function(this1) {
return this1.TEXTURE_3D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_WRAP_R = function(this1) {
return this1.TEXTURE_WRAP_R;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_MIN_LOD = function(this1) {
return this1.TEXTURE_MIN_LOD;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_MAX_LOD = function(this1) {
return this1.TEXTURE_MAX_LOD;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_BASE_LEVEL = function(this1) {
return this1.TEXTURE_BASE_LEVEL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_MAX_LEVEL = function(this1) {
return this1.TEXTURE_MAX_LEVEL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_COMPARE_MODE = function(this1) {
return this1.TEXTURE_COMPARE_MODE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_COMPARE_FUNC = function(this1) {
return this1.TEXTURE_COMPARE_FUNC;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SRGB = function(this1) {
return this1.SRGB;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SRGB8 = function(this1) {
return this1.SRGB8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SRGB8_ALPHA8 = function(this1) {
return this1.SRGB8_ALPHA8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COMPARE_REF_TO_TEXTURE = function(this1) {
return this1.COMPARE_REF_TO_TEXTURE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA32F = function(this1) {
return this1.RGBA32F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB32F = function(this1) {
return this1.RGB32F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA16F = function(this1) {
return this1.RGBA16F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB16F = function(this1) {
return this1.RGB16F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_2D_ARRAY = function(this1) {
return this1.TEXTURE_2D_ARRAY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_BINDING_2D_ARRAY = function(this1) {
return this1.TEXTURE_BINDING_2D_ARRAY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R11F_G11F_B10F = function(this1) {
return this1.R11F_G11F_B10F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB9_E5 = function(this1) {
return this1.RGB9_E5;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA32UI = function(this1) {
return this1.RGBA32UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB32UI = function(this1) {
return this1.RGB32UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA16UI = function(this1) {
return this1.RGBA16UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB16UI = function(this1) {
return this1.RGB16UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA8UI = function(this1) {
return this1.RGBA8UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB8UI = function(this1) {
return this1.RGB8UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA32I = function(this1) {
return this1.RGBA32I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB32I = function(this1) {
return this1.RGB32I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA16I = function(this1) {
return this1.RGBA16I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB16I = function(this1) {
return this1.RGB16I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA8I = function(this1) {
return this1.RGBA8I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB8I = function(this1) {
return this1.RGB8I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RED_INTEGER = function(this1) {
return this1.RED_INTEGER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB_INTEGER = function(this1) {
return this1.RGB_INTEGER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA_INTEGER = function(this1) {
return this1.RGBA_INTEGER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R8 = function(this1) {
return this1.R8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG8 = function(this1) {
return this1.RG8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R16F = function(this1) {
return this1.R16F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R32F = function(this1) {
return this1.R32F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG16F = function(this1) {
return this1.RG16F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG32F = function(this1) {
return this1.RG32F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R8I = function(this1) {
return this1.R8I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R8UI = function(this1) {
return this1.R8UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R16I = function(this1) {
return this1.R16I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R16UI = function(this1) {
return this1.R16UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R32I = function(this1) {
return this1.R32I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R32UI = function(this1) {
return this1.R32UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG8I = function(this1) {
return this1.RG8I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG8UI = function(this1) {
return this1.RG8UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG16I = function(this1) {
return this1.RG16I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG16UI = function(this1) {
return this1.RG16UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG32I = function(this1) {
return this1.RG32I;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG32UI = function(this1) {
return this1.RG32UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_R8_SNORM = function(this1) {
return this1.R8_SNORM;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG8_SNORM = function(this1) {
return this1.RG8_SNORM;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB8_SNORM = function(this1) {
return this1.RGB8_SNORM;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGBA8_SNORM = function(this1) {
return this1.RGBA8_SNORM;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RGB10_A2UI = function(this1) {
return this1.RGB10_A2UI;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_IMMUTABLE_FORMAT = function(this1) {
return this1.TEXTURE_IMMUTABLE_FORMAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TEXTURE_IMMUTABLE_LEVELS = function(this1) {
return this1.TEXTURE_IMMUTABLE_LEVELS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_2_10_10_10_REV = function(this1) {
return this1.UNSIGNED_INT_2_10_10_10_REV;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_10F_11F_11F_REV = function(this1) {
return this1.UNSIGNED_INT_10F_11F_11F_REV;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_5_9_9_9_REV = function(this1) {
return this1.UNSIGNED_INT_5_9_9_9_REV;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_32_UNSIGNED_INT_24_8_REV = function(this1) {
return this1.FLOAT_32_UNSIGNED_INT_24_8_REV;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_24_8 = function(this1) {
return this1.UNSIGNED_INT_24_8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_HALF_FLOAT = function(this1) {
return this1.HALF_FLOAT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG = function(this1) {
return this1.RG;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RG_INTEGER = function(this1) {
return this1.RG_INTEGER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT_2_10_10_10_REV = function(this1) {
return this1.INT_2_10_10_10_REV;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CURRENT_QUERY = function(this1) {
return this1.CURRENT_QUERY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_QUERY_RESULT = function(this1) {
return this1.QUERY_RESULT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_QUERY_RESULT_AVAILABLE = function(this1) {
return this1.QUERY_RESULT_AVAILABLE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ANY_SAMPLES_PASSED = function(this1) {
return this1.ANY_SAMPLES_PASSED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ANY_SAMPLES_PASSED_CONSERVATIVE = function(this1) {
return this1.ANY_SAMPLES_PASSED_CONSERVATIVE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_DRAW_BUFFERS = function(this1) {
return this1.MAX_DRAW_BUFFERS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER0 = function(this1) {
return this1.DRAW_BUFFER0;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER1 = function(this1) {
return this1.DRAW_BUFFER1;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER2 = function(this1) {
return this1.DRAW_BUFFER2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER3 = function(this1) {
return this1.DRAW_BUFFER3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER4 = function(this1) {
return this1.DRAW_BUFFER4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER5 = function(this1) {
return this1.DRAW_BUFFER5;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER6 = function(this1) {
return this1.DRAW_BUFFER6;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER7 = function(this1) {
return this1.DRAW_BUFFER7;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER8 = function(this1) {
return this1.DRAW_BUFFER8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER9 = function(this1) {
return this1.DRAW_BUFFER9;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER10 = function(this1) {
return this1.DRAW_BUFFER10;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER11 = function(this1) {
return this1.DRAW_BUFFER11;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER12 = function(this1) {
return this1.DRAW_BUFFER12;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER13 = function(this1) {
return this1.DRAW_BUFFER13;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER14 = function(this1) {
return this1.DRAW_BUFFER14;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_BUFFER15 = function(this1) {
return this1.DRAW_BUFFER15;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_COLOR_ATTACHMENTS = function(this1) {
return this1.MAX_COLOR_ATTACHMENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT1 = function(this1) {
return this1.COLOR_ATTACHMENT1;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT2 = function(this1) {
return this1.COLOR_ATTACHMENT2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT3 = function(this1) {
return this1.COLOR_ATTACHMENT3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT4 = function(this1) {
return this1.COLOR_ATTACHMENT4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT5 = function(this1) {
return this1.COLOR_ATTACHMENT5;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT6 = function(this1) {
return this1.COLOR_ATTACHMENT6;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT7 = function(this1) {
return this1.COLOR_ATTACHMENT7;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT8 = function(this1) {
return this1.COLOR_ATTACHMENT8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT9 = function(this1) {
return this1.COLOR_ATTACHMENT9;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT10 = function(this1) {
return this1.COLOR_ATTACHMENT10;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT11 = function(this1) {
return this1.COLOR_ATTACHMENT11;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT12 = function(this1) {
return this1.COLOR_ATTACHMENT12;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT13 = function(this1) {
return this1.COLOR_ATTACHMENT13;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT14 = function(this1) {
return this1.COLOR_ATTACHMENT14;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR_ATTACHMENT15 = function(this1) {
return this1.COLOR_ATTACHMENT15;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLER_3D = function(this1) {
return this1.SAMPLER_3D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLER_2D_SHADOW = function(this1) {
return this1.SAMPLER_2D_SHADOW;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLER_2D_ARRAY = function(this1) {
return this1.SAMPLER_2D_ARRAY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLER_2D_ARRAY_SHADOW = function(this1) {
return this1.SAMPLER_2D_ARRAY_SHADOW;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLER_CUBE_SHADOW = function(this1) {
return this1.SAMPLER_CUBE_SHADOW;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT_SAMPLER_2D = function(this1) {
return this1.INT_SAMPLER_2D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT_SAMPLER_3D = function(this1) {
return this1.INT_SAMPLER_3D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT_SAMPLER_CUBE = function(this1) {
return this1.INT_SAMPLER_CUBE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INT_SAMPLER_2D_ARRAY = function(this1) {
return this1.INT_SAMPLER_2D_ARRAY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_SAMPLER_2D = function(this1) {
return this1.UNSIGNED_INT_SAMPLER_2D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_SAMPLER_3D = function(this1) {
return this1.UNSIGNED_INT_SAMPLER_3D;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_SAMPLER_CUBE = function(this1) {
return this1.UNSIGNED_INT_SAMPLER_CUBE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_SAMPLER_2D_ARRAY = function(this1) {
return this1.UNSIGNED_INT_SAMPLER_2D_ARRAY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_SAMPLES = function(this1) {
return this1.MAX_SAMPLES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SAMPLER_BINDING = function(this1) {
return this1.SAMPLER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_PIXEL_PACK_BUFFER = function(this1) {
return this1.PIXEL_PACK_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_PIXEL_UNPACK_BUFFER = function(this1) {
return this1.PIXEL_UNPACK_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_PIXEL_PACK_BUFFER_BINDING = function(this1) {
return this1.PIXEL_PACK_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_PIXEL_UNPACK_BUFFER_BINDING = function(this1) {
return this1.PIXEL_UNPACK_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COPY_READ_BUFFER = function(this1) {
return this1.COPY_READ_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COPY_WRITE_BUFFER = function(this1) {
return this1.COPY_WRITE_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COPY_READ_BUFFER_BINDING = function(this1) {
return this1.COPY_READ_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COPY_WRITE_BUFFER_BINDING = function(this1) {
return this1.COPY_WRITE_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT2x3 = function(this1) {
return this1.FLOAT_MAT2x3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT2x4 = function(this1) {
return this1.FLOAT_MAT2x4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT3x2 = function(this1) {
return this1.FLOAT_MAT3x2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT3x4 = function(this1) {
return this1.FLOAT_MAT3x4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT4x2 = function(this1) {
return this1.FLOAT_MAT4x2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FLOAT_MAT4x3 = function(this1) {
return this1.FLOAT_MAT4x3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_VEC2 = function(this1) {
return this1.UNSIGNED_INT_VEC2;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_VEC3 = function(this1) {
return this1.UNSIGNED_INT_VEC3;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_INT_VEC4 = function(this1) {
return this1.UNSIGNED_INT_VEC4;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNED_NORMALIZED = function(this1) {
return this1.UNSIGNED_NORMALIZED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SIGNED_NORMALIZED = function(this1) {
return this1.SIGNED_NORMALIZED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_INTEGER = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_INTEGER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_VERTEX_ATTRIB_ARRAY_DIVISOR = function(this1) {
return this1.VERTEX_ATTRIB_ARRAY_DIVISOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER_MODE = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER_MODE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = function(this1) {
return this1.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_VARYINGS = function(this1) {
return this1.TRANSFORM_FEEDBACK_VARYINGS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER_START = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER_START;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER_SIZE = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = function(this1) {
return this1.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = function(this1) {
return this1.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = function(this1) {
return this1.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INTERLEAVED_ATTRIBS = function(this1) {
return this1.INTERLEAVED_ATTRIBS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SEPARATE_ATTRIBS = function(this1) {
return this1.SEPARATE_ATTRIBS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_BUFFER_BINDING = function(this1) {
return this1.TRANSFORM_FEEDBACK_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK = function(this1) {
return this1.TRANSFORM_FEEDBACK;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_PAUSED = function(this1) {
return this1.TRANSFORM_FEEDBACK_PAUSED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_ACTIVE = function(this1) {
return this1.TRANSFORM_FEEDBACK_ACTIVE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TRANSFORM_FEEDBACK_BINDING = function(this1) {
return this1.TRANSFORM_FEEDBACK_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_RED_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_RED_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_DEFAULT = function(this1) {
return this1.FRAMEBUFFER_DEFAULT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH24_STENCIL8 = function(this1) {
return this1.DEPTH24_STENCIL8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_FRAMEBUFFER_BINDING = function(this1) {
return this1.DRAW_FRAMEBUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_READ_FRAMEBUFFER = function(this1) {
return this1.READ_FRAMEBUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DRAW_FRAMEBUFFER = function(this1) {
return this1.DRAW_FRAMEBUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_READ_FRAMEBUFFER_BINDING = function(this1) {
return this1.READ_FRAMEBUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_RENDERBUFFER_SAMPLES = function(this1) {
return this1.RENDERBUFFER_SAMPLES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = function(this1) {
return this1.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = function(this1) {
return this1.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BUFFER = function(this1) {
return this1.UNIFORM_BUFFER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BUFFER_BINDING = function(this1) {
return this1.UNIFORM_BUFFER_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BUFFER_START = function(this1) {
return this1.UNIFORM_BUFFER_START;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BUFFER_SIZE = function(this1) {
return this1.UNIFORM_BUFFER_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_VERTEX_UNIFORM_BLOCKS = function(this1) {
return this1.MAX_VERTEX_UNIFORM_BLOCKS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_FRAGMENT_UNIFORM_BLOCKS = function(this1) {
return this1.MAX_FRAGMENT_UNIFORM_BLOCKS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_COMBINED_UNIFORM_BLOCKS = function(this1) {
return this1.MAX_COMBINED_UNIFORM_BLOCKS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_UNIFORM_BUFFER_BINDINGS = function(this1) {
return this1.MAX_UNIFORM_BUFFER_BINDINGS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_UNIFORM_BLOCK_SIZE = function(this1) {
return this1.MAX_UNIFORM_BLOCK_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = function(this1) {
return this1.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = function(this1) {
return this1.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BUFFER_OFFSET_ALIGNMENT = function(this1) {
return this1.UNIFORM_BUFFER_OFFSET_ALIGNMENT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ACTIVE_UNIFORM_BLOCKS = function(this1) {
return this1.ACTIVE_UNIFORM_BLOCKS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_TYPE = function(this1) {
return this1.UNIFORM_TYPE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_SIZE = function(this1) {
return this1.UNIFORM_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BLOCK_INDEX = function(this1) {
return this1.UNIFORM_BLOCK_INDEX;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_OFFSET = function(this1) {
return this1.UNIFORM_OFFSET;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_ARRAY_STRIDE = function(this1) {
return this1.UNIFORM_ARRAY_STRIDE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_MATRIX_STRIDE = function(this1) {
return this1.UNIFORM_MATRIX_STRIDE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_IS_ROW_MAJOR = function(this1) {
return this1.UNIFORM_IS_ROW_MAJOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BLOCK_BINDING = function(this1) {
return this1.UNIFORM_BLOCK_BINDING;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BLOCK_DATA_SIZE = function(this1) {
return this1.UNIFORM_BLOCK_DATA_SIZE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BLOCK_ACTIVE_UNIFORMS = function(this1) {
return this1.UNIFORM_BLOCK_ACTIVE_UNIFORMS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = function(this1) {
return this1.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = function(this1) {
return this1.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = function(this1) {
return this1.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_OBJECT_TYPE = function(this1) {
return this1.OBJECT_TYPE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SYNC_CONDITION = function(this1) {
return this1.SYNC_CONDITION;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SYNC_STATUS = function(this1) {
return this1.SYNC_STATUS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SYNC_FLAGS = function(this1) {
return this1.SYNC_FLAGS;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SYNC_FENCE = function(this1) {
return this1.SYNC_FENCE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SYNC_GPU_COMMANDS_COMPLETE = function(this1) {
return this1.SYNC_GPU_COMMANDS_COMPLETE;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_UNSIGNALED = function(this1) {
return this1.UNSIGNALED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SIGNALED = function(this1) {
return this1.SIGNALED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_ALREADY_SIGNALED = function(this1) {
return this1.ALREADY_SIGNALED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TIMEOUT_EXPIRED = function(this1) {
return this1.TIMEOUT_EXPIRED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_CONDITION_SATISFIED = function(this1) {
return this1.CONDITION_SATISFIED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_WAIT_FAILED = function(this1) {
return this1.WAIT_FAILED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_SYNC_FLUSH_COMMANDS_BIT = function(this1) {
return this1.SYNC_FLUSH_COMMANDS_BIT;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_COLOR = function(this1) {
return this1.COLOR;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH = function(this1) {
return this1.DEPTH;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STENCIL = function(this1) {
return this1.STENCIL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MIN = function(this1) {
return this1.MIN;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX = function(this1) {
return this1.MAX;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_COMPONENT24 = function(this1) {
return this1.DEPTH_COMPONENT24;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STREAM_READ = function(this1) {
return this1.STREAM_READ;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STREAM_COPY = function(this1) {
return this1.STREAM_COPY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STATIC_READ = function(this1) {
return this1.STATIC_READ;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_STATIC_COPY = function(this1) {
return this1.STATIC_COPY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DYNAMIC_READ = function(this1) {
return this1.DYNAMIC_READ;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DYNAMIC_COPY = function(this1) {
return this1.DYNAMIC_COPY;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH_COMPONENT32F = function(this1) {
return this1.DEPTH_COMPONENT32F;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_DEPTH32F_STENCIL8 = function(this1) {
return this1.DEPTH32F_STENCIL8;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_INVALID_INDEX = function(this1) {
return this1.INVALID_INDEX;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_TIMEOUT_IGNORED = function(this1) {
return this1.TIMEOUT_IGNORED;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.get_MAX_CLIENT_WAIT_TIMEOUT_WEBGL = function(this1) {
return this1.MAX_CLIENT_WAIT_TIMEOUT_WEBGL;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.activeTexture = function(this1,texture) {
this1.__context.activeTexture(texture);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.attachShader = function(this1,program,shader) {
this1.__context.attachShader(program,shader);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.beginQuery = function(this1,target,query) {
this1.__context.beginQuery(target,query);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.beginTransformFeedback = function(this1,primitiveNode) {
this1.__context.beginTransformFeedback(primitiveNode);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindAttribLocation = function(this1,program,index,name) {
this1.__context.bindAttribLocation(program,index,name);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindBuffer = function(this1,target,buffer) {
this1.__context.bindBuffer(target,buffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindBufferBase = function(this1,target,index,buffer) {
this1.__context.bindBufferBase(target,index,buffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindBufferRange = function(this1,target,index,buffer,offset,size) {
this1.__context.bindBufferRange(target,index,buffer,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(size));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindFramebuffer = function(this1,target,framebuffer) {
this1.__context.bindFramebuffer(target,framebuffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindRenderbuffer = function(this1,target,renderbuffer) {
this1.__context.bindRenderbuffer(target,renderbuffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindSampler = function(this1,unit,sampler) {
this1.__context.bindSampler(unit,sampler);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindTexture = function(this1,target,texture) {
this1.__context.bindTexture(target,texture);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindTransformFeedback = function(this1,target,transformFeedback) {
this1.__context.bindTransformFeedback(target,transformFeedback);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bindVertexArray = function(this1,vertexArray) {
this1.__context.bindVertexArray(vertexArray);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.blendColor = function(this1,red,green,blue,alpha) {
this1.__context.blendColor(red,green,blue,alpha);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.blendEquation = function(this1,mode) {
this1.__context.blendEquation(mode);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.blendEquationSeparate = function(this1,modeRGB,modeAlpha) {
this1.__context.blendEquationSeparate(modeRGB,modeAlpha);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.blendFunc = function(this1,sfactor,dfactor) {
this1.__context.blendFunc(sfactor,dfactor);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.blendFuncSeparate = function(this1,srcRGB,dstRGB,srcAlpha,dstAlpha) {
this1.__context.blendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.blitFramebuffer = function(this1,srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter) {
this1.__context.blitFramebuffer(srcX0,srcY0,srcX1,srcY1,dstX0,dstY0,dstX1,dstY1,mask,filter);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bufferData = function(this1,target,srcData,usage,srcOffset,length) {
this1.bufferDataWEBGL(target,srcData,usage,srcOffset,length);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.bufferSubData = function(this1,target,offset,srcData,srcOffset,length) {
this1.bufferSubDataWEBGL(target,offset,srcData,srcOffset,length);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.checkFramebufferStatus = function(this1,target) {
return this1.__context.checkFramebufferStatus(target);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clear = function(this1,mask) {
this1.__context.clear(mask);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clearBufferfi = function(this1,buffer,drawbuffer,depth,stencil) {
this1.__context.clearBufferfi(buffer,drawbuffer,depth,stencil);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clearBufferfv = function(this1,buffer,drawbuffer,values,srcOffset) {
this1.__context.clearBufferfv(buffer,drawbuffer,values,srcOffset);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clearBufferiv = function(this1,buffer,drawbuffer,values,srcOffset) {
this1.__context.clearBufferiv(buffer,drawbuffer,values,srcOffset);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clearBufferuiv = function(this1,buffer,drawbuffer,values,srcOffset) {
this1.__context.clearBufferuiv(buffer,drawbuffer,values,srcOffset);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clearColor = function(this1,red,green,blue,alpha) {
this1.__context.clearColor(red,green,blue,alpha);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clearDepth = function(this1,depth) {
this1.__context.clearDepth(depth);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clearStencil = function(this1,s) {
this1.__context.clearStencil(s);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.clientWaitSync = function(this1,sync,flags,timeout) {
return this1.__context.clientWaitSync(sync,flags,timeout);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.colorMask = function(this1,red,green,blue,alpha) {
this1.__context.colorMask(red,green,blue,alpha);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.compileShader = function(this1,shader) {
this1.__context.compileShader(shader);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.compressedTexImage2D = function(this1,target,level,internalformat,width,height,border,srcData,srcOffset,srcLengthOverride) {
this1.compressedTexImage2DWEBGL(target,level,internalformat,width,height,border,srcData,srcOffset,srcLengthOverride);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.compressedTexImage3D = function(this1,target,level,internalformat,width,height,depth,border,srcData,srcOffset,srcLengthOverride) {
this1.__context.compressedTexImage3D(target,level,internalformat,width,height,depth,border,srcData,srcOffset,srcLengthOverride);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.compressedTexSubImage2D = function(this1,target,level,xoffset,yoffset,width,height,format,srcData,srcOffset,srcLengthOverride) {
this1.compressedTexSubImage2DWEBGL(target,level,xoffset,yoffset,width,height,format,srcData,srcOffset,srcLengthOverride);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.compressedTexSubImage3D = function(this1,target,level,xoffset,yoffset,zoffset,width,height,depth,format,srcData,srcOffset,srcLengthOverride) {
this1.compressedTexSubImage3DWEBGL(target,level,xoffset,yoffset,zoffset,width,height,depth,format,srcData,srcOffset,srcLengthOverride);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.copyBufferSubData = function(this1,readTarget,writeTarget,readOffset,writeOffset,size) {
null;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.copyTexImage2D = function(this1,target,level,internalformat,x,y,width,height,border) {
this1.__context.copyTexImage2D(target,level,internalformat,x,y,width,height,border);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.copyTexSubImage2D = function(this1,target,level,xoffset,yoffset,x,y,width,height) {
this1.__context.copyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.copyTexSubImage3D = function(this1,target,level,xoffset,yoffset,zoffset,x,y,width,height) {
this1.__context.copyTexSubImage3D(target,level,xoffset,yoffset,zoffset,x,y,width,height);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createBuffer = function(this1) {
return this1.__context.createBuffer();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createFramebuffer = function(this1) {
return this1.__context.createFramebuffer();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createProgram = function(this1) {
return this1.__context.createProgram();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createQuery = function(this1) {
return this1.__context.createQuery();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createRenderbuffer = function(this1) {
return this1.__context.createRenderbuffer();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createSampler = function(this1) {
return this1.__context.createSampler();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createShader = function(this1,type) {
return this1.__context.createShader(type);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createTexture = function(this1) {
return this1.__context.createTexture();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createTransformFeedback = function(this1) {
return this1.__context.createTransformFeedback();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.createVertexArray = function(this1) {
return this1.__context.createVertexArray();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.cullFace = function(this1,mode) {
this1.__context.cullFace(mode);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteBuffer = function(this1,buffer) {
this1.__context.deleteBuffer(buffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteFramebuffer = function(this1,framebuffer) {
this1.__context.deleteFramebuffer(framebuffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteProgram = function(this1,program) {
this1.__context.deleteProgram(program);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteQuery = function(this1,query) {
this1.__context.deleteQuery(query);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteRenderbuffer = function(this1,renderbuffer) {
this1.__context.deleteRenderbuffer(renderbuffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteSampler = function(this1,sampler) {
this1.__context.deleteSampler(sampler);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteShader = function(this1,shader) {
this1.__context.deleteShader(shader);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteSync = function(this1,sync) {
this1.__context.deleteSync(sync);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteTexture = function(this1,texture) {
this1.__context.deleteTexture(texture);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteTransformFeedback = function(this1,transformFeedback) {
this1.__context.deleteTransformFeedback(transformFeedback);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.deleteVertexArray = function(this1,vertexArray) {
this1.__context.deleteVertexArray(vertexArray);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.depthFunc = function(this1,func) {
this1.__context.depthFunc(func);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.depthMask = function(this1,flag) {
this1.__context.depthMask(flag);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.depthRange = function(this1,zNear,zFar) {
this1.__context.depthRange(zNear,zFar);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.detachShader = function(this1,program,shader) {
this1.__context.detachShader(program,shader);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.disable = function(this1,cap) {
this1.__context.disable(cap);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.disableVertexAttribArray = function(this1,index) {
this1.__context.disableVertexAttribArray(index);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.drawArrays = function(this1,mode,first,count) {
this1.__context.drawArrays(mode,first,count);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.drawArraysInstanced = function(this1,mode,first,count,instanceCount) {
this1.__context.drawArraysInstanced(mode,first,count,instanceCount);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.drawBuffers = function(this1,buffers) {
this1.__context.drawBuffers(buffers);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.drawElements = function(this1,mode,count,type,offset) {
this1.__context.drawElements(mode,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.drawElementsInstanced = function(this1,mode,count,type,offset,instanceCount) {
this1.__context.drawElementsInstanced(mode,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)),instanceCount);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.drawRangeElements = function(this1,mode,start,end,count,type,offset) {
this1.__context.drawRangeElements(mode,start,end,count,type,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset)));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.enable = function(this1,cap) {
this1.__context.enable(cap);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.enableVertexAttribArray = function(this1,index) {
this1.__context.enableVertexAttribArray(index);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.endQuery = function(this1,target) {
this1.__context.endQuery(target);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.endTransformFeedback = function(this1) {
this1.__context.endTransformFeedback();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.fenceSync = function(this1,condition,flags) {
return this1.__context.fenceSync(condition,flags);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.finish = function(this1) {
this1.__context.finish();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.flush = function(this1) {
this1.__context.flush();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.framebufferRenderbuffer = function(this1,target,attachment,renderbuffertarget,renderbuffer) {
this1.__context.framebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.framebufferTexture2D = function(this1,target,attachment,textarget,texture,level) {
this1.__context.framebufferTexture2D(target,attachment,textarget,texture,level);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.framebufferTextureLayer = function(this1,target,attachment,texture,level,layer) {
this1.__context.framebufferTextureLayer(target,attachment,texture,level,layer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.frontFace = function(this1,mode) {
this1.__context.frontFace(mode);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.generateMipmap = function(this1,target) {
this1.__context.generateMipmap(target);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getActiveAttrib = function(this1,program,index) {
return this1.__context.getActiveAttrib(program,index);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getActiveUniform = function(this1,program,index) {
return this1.__context.getActiveUniform(program,index);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getActiveUniformBlockName = function(this1,program,uniformBlockIndex) {
return this1.__context.getActiveUniformBlockName(program,uniformBlockIndex);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getActiveUniformBlockParameter = function(this1,program,uniformBlockIndex,pname) {
return this1.__context.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getActiveUniforms = function(this1,program,uniformIndices,pname) {
return this1.__context.getActiveUniforms(program,uniformIndices,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getAttachedShaders = function(this1,program) {
return this1.__context.getAttachedShaders(program);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getAttribLocation = function(this1,program,name) {
return this1.__context.getAttribLocation(program,name);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getBufferParameter = function(this1,target,pname) {
return this1.__context.getBufferParameter(target,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getBufferSubData = function(this1,target,srcByteOffset,dstData,srcOffset,length) {
this1.getBufferSubDataWEBGL(target,srcByteOffset,dstData,srcOffset,length);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getContextAttributes = function(this1) {
return this1.__context.getContextAttributes();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getError = function(this1) {
return this1.__context.getError();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getExtension = function(this1,name) {
return this1.__context.getExtension(name);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getFragDataLocation = function(this1,program,name) {
return this1.__context.getFragDataLocation(program,name);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getFramebufferAttachmentParameter = function(this1,target,attachment,pname) {
return this1.__context.getFramebufferAttachmentParameter(target,attachment,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getIndexedParameter = function(this1,target,index) {
return this1.__context.getIndexedParameter(target,index);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getInternalformatParameter = function(this1,target,internalformat,pname) {
return this1.__context.getInternalformatParameter(target,internalformat,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getParameter = function(this1,pname) {
return this1.__context.getParameter(pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getProgramInfoLog = function(this1,program) {
return this1.__context.getProgramInfoLog(program);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getProgramParameter = function(this1,program,pname) {
return this1.__context.getProgramParameter(program,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getQuery = function(this1,target,pname) {
return this1.__context.getQuery(target,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getQueryParameter = function(this1,query,pname) {
return this1.__context.getQueryParameter(query,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getRenderbufferParameter = function(this1,target,pname) {
return this1.__context.getRenderbufferParameter(target,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getSamplerParameter = function(this1,sampler,pname) {
return this1.__context.getSamplerParameter(sampler,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getShaderInfoLog = function(this1,shader) {
return this1.__context.getShaderInfoLog(shader);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getShaderParameter = function(this1,shader,pname) {
return this1.__context.getShaderParameter(shader,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getShaderPrecisionFormat = function(this1,shadertype,precisiontype) {
return this1.__context.getShaderPrecisionFormat(shadertype,precisiontype);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getShaderSource = function(this1,shader) {
return this1.__context.getShaderSource(shader);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getSupportedExtensions = function(this1) {
return this1.__context.getSupportedExtensions();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getSyncParameter = function(this1,sync,pname) {
return this1.__context.getSyncParameter(sync,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getTexParameter = function(this1,target,pname) {
return this1.__context.getTexParameter(target,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getTransformFeedbackVarying = function(this1,program,index) {
return this1.__context.getTransformFeedbackVarying(program,index);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getUniform = function(this1,program,location) {
return this1.__context.getUniform(program,location);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getUniformBlockIndex = function(this1,program,uniformBlockName) {
return this1.__context.getUniformBlockIndex(program,uniformBlockName);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getUniformIndices = function(this1,program,uniformNames) {
return this1.__context.getUniformIndices(program,uniformNames);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getUniformLocation = function(this1,program,name) {
return this1.__context.getUniformLocation(program,name);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getVertexAttrib = function(this1,index,pname) {
return this1.__context.getVertexAttrib(index,pname);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.getVertexAttribOffset = function(this1,index,pname) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(this1.__context.getVertexAttribOffset(index,pname));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.hint = function(this1,target,mode) {
this1.__context.hint(target,mode);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.invalidateFramebuffer = function(this1,target,attachments) {
this1.__context.invalidateFramebuffer(target,attachments);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.invalidateSubFramebuffer = function(this1,target,attachments,x,y,width,height) {
this1.__context.invalidateSubFramebuffer(target,attachments,x,y,width,height);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isBuffer = function(this1,buffer) {
return this1.__context.isBuffer(buffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isContextLost = function(this1) {
return this1.__contextLost || this1.__context.isContextLost();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isEnabled = function(this1,cap) {
return this1.__context.isEnabled(cap);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isFramebuffer = function(this1,framebuffer) {
return this1.__context.isFramebuffer(framebuffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isProgram = function(this1,program) {
return this1.__context.isProgram(program);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isQuery = function(this1,query) {
return this1.__context.isQuery(query);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isRenderbuffer = function(this1,renderbuffer) {
return this1.__context.isRenderbuffer(renderbuffer);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isSampler = function(this1,sampler) {
return this1.__context.isSampler(sampler);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isShader = function(this1,shader) {
return this1.__context.isShader(shader);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isTexture = function(this1,texture) {
return this1.__context.isTexture(texture);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isTransformFeedback = function(this1,transformFeedback) {
return this1.__context.isTransformFeedback(transformFeedback);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.isVertexArray = function(this1,vertexArray) {
return this1.__context.isVertexArray(vertexArray);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.lineWidth = function(this1,width) {
this1.__context.lineWidth(width);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.linkProgram = function(this1,program) {
this1.__context.linkProgram(program);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.pauseTransformFeedback = function(this1) {
this1.__context.pauseTransformFeedback();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.pixelStorei = function(this1,pname,param) {
this1.__context.pixelStorei(pname,param);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.polygonOffset = function(this1,factor,units) {
this1.__context.polygonOffset(factor,units);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.readBuffer = function(this1,src) {
this1.__context.readBuffer(src);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.readPixels = function(this1,x,y,width,height,format,type,pixels,dstOffset) {
this1.readPixelsWEBGL(x,y,width,height,format,type,pixels,dstOffset);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.renderbufferStorage = function(this1,target,internalformat,width,height) {
this1.__context.renderbufferStorage(target,internalformat,width,height);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.renderbufferStorageMultisample = function(this1,target,samples,internalFormat,width,height) {
this1.__context.renderbufferStorageMultisample(target,samples,internalFormat,width,height);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.resumeTransformFeedback = function(this1) {
this1.__context.resumeTransformFeedback();
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.sampleCoverage = function(this1,value,invert) {
this1.__context.sampleCoverage(value,invert);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.samplerParameterf = function(this1,sampler,pname,param) {
this1.__context.samplerParameterf(sampler,pname,param);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.samplerParameteri = function(this1,sampler,pname,param) {
this1.__context.samplerParameteri(sampler,pname,param);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.scissor = function(this1,x,y,width,height) {
this1.__context.scissor(x,y,width,height);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.shaderSource = function(this1,shader,source) {
this1.__context.shaderSource(shader,source);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.stencilFunc = function(this1,func,ref,mask) {
this1.__context.stencilFunc(func,ref,mask);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.stencilFuncSeparate = function(this1,face,func,ref,mask) {
this1.__context.stencilFuncSeparate(face,func,ref,mask);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.stencilMask = function(this1,mask) {
this1.__context.stencilMask(mask);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.stencilMaskSeparate = function(this1,face,mask) {
this1.__context.stencilMaskSeparate(face,mask);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.stencilOp = function(this1,fail,zfail,zpass) {
this1.__context.stencilOp(fail,zfail,zpass);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.stencilOpSeparate = function(this1,face,fail,zfail,zpass) {
this1.__context.stencilOpSeparate(face,fail,zfail,zpass);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.texImage2D = function(this1,target,level,internalformat,width,height,border,format,type,srcData,srcOffset) {
this1.texImage2DWEBGL(target,level,internalformat,width,height,border,format,type,srcData,srcOffset);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.texImage3D = function(this1,target,level,internalformat,width,height,depth,border,format,type,srcData,srcOffset) {
this1.__context.texImage3D(target,level,internalformat,width,height,depth,border,format,type,srcData,srcOffset);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.texStorage2D = function(this1,target,level,internalformat,width,height) {
this1.__context.texStorage2D(target,level,internalformat,width,height);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.texStorage3D = function(this1,target,level,internalformat,width,height,depth) {
this1.__context.texStorage3D(target,level,internalformat,width,height,depth);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.texParameterf = function(this1,target,pname,param) {
this1.__context.texParameterf(target,pname,param);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.texParameteri = function(this1,target,pname,param) {
this1.__context.texParameteri(target,pname,param);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.texSubImage2D = function(this1,target,level,xoffset,yoffset,width,height,format,type,srcData,srcOffset) {
this1.texSubImage2DWEBGL(target,level,xoffset,yoffset,width,height,format,type,srcData,srcOffset);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.texSubImage3D = function(this1,target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,srcData,srcOffset) {
this1.__context.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,srcData,srcOffset);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.transformFeedbackVaryings = function(this1,program,varyings,bufferMode) {
this1.__context.transformFeedbackVaryings(program,varyings,bufferMode);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform1f = function(this1,location,v0) {
this1.__context.uniform1f(location,v0);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform1fv = function(this1,location,v) {
this1.uniform1fvWEBGL(location,v);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform1i = function(this1,location,v0) {
this1.__context.uniform1i(location,v0);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform1iv = function(this1,location,v) {
this1.uniform1ivWEBGL(location,v);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform1ui = function(this1,location,v0) {
this1.__context.uniform1ui(location,v0);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform1uiv = function(this1,location,v) {
this1.uniform1uivWEBGL(location,v,null,null);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform2f = function(this1,location,v0,v1) {
this1.__context.uniform2f(location,v0,v1);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform2fv = function(this1,location,v) {
this1.uniform2fvWEBGL(location,v);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform2i = function(this1,location,v0,v1) {
this1.__context.uniform2i(location,v0,v1);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform2iv = function(this1,location,v) {
this1.uniform2fvWEBGL(location,v);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform2ui = function(this1,location,v0,v1) {
this1.__context.uniform2ui(location,v0,v1);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform2uiv = function(this1,location,v) {
this1.uniform2uivWEBGL(location,v,null,null);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform3f = function(this1,location,v0,v1,v2) {
this1.__context.uniform3f(location,v0,v1,v2);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform3fv = function(this1,location,v) {
this1.uniform3fvWEBGL(location,v);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform3i = function(this1,location,v0,v1,v2) {
this1.__context.uniform3i(location,v0,v1,v2);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform3iv = function(this1,location,v) {
this1.uniform3ivWEBGL(location,v);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform3ui = function(this1,location,v0,v1,v2) {
this1.__context.uniform3ui(location,v0,v1,v2);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform3uiv = function(this1,location,v) {
this1.__context.uniform3uiv(location,v,null,null);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform4f = function(this1,location,v0,v1,v2,v3) {
this1.__context.uniform4f(location,v0,v1,v2,v3);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform4fv = function(this1,location,v) {
this1.uniform4fvWEBGL(location,v);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform4i = function(this1,location,v0,v1,v2,v3) {
this1.__context.uniform4i(location,v0,v1,v2,v3);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform4iv = function(this1,location,v) {
this1.uniform4ivWEBGL(location,v);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform4ui = function(this1,location,v0,v1,v2,v3) {
this1.__context.uniform4ui(location,v0,v1,v2,v3);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniform4uiv = function(this1,location,v) {
this1.__context.uniform4uiv(location,v,null,null);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformBlockBinding = function(this1,program,uniformBlockIndex,uniformBlockBinding) {
this1.__context.uniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix2fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.uniformMatrix2fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix2x3fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.__context.uniformMatrix2x3fv(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix2x4fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.__context.uniformMatrix2x4fv(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix3fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.uniformMatrix3fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix3x2fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.__context.uniformMatrix3x2fv(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix3x4fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.__context.uniformMatrix3x4fv(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix4fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.uniformMatrix4fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix4x2fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.uniformMatrix4x2fvWEBGL(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.uniformMatrix4x3fv = function(this1,location,transpose,v,srcOffset,srcLength) {
this1.__context.uniformMatrix4x3fv(location,transpose,v,srcOffset,srcLength);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.useProgram = function(this1,program) {
this1.__context.useProgram(program);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.validateProgram = function(this1,program) {
this1.__context.validateProgram(program);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttrib1f = function(this1,indx,x) {
this1.__context.vertexAttrib1f(indx,x);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttrib1fv = function(this1,indx,values) {
this1.vertexAttrib1fv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(values));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttrib2f = function(this1,indx,x,y) {
this1.__context.vertexAttrib2f(indx,x,y);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttrib2fv = function(this1,indx,values) {
this1.vertexAttrib2fv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(values));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttrib3f = function(this1,indx,x,y,z) {
this1.__context.vertexAttrib3f(indx,x,y,z);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttrib3fv = function(this1,indx,values) {
this1.vertexAttrib3fv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(values));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttrib4f = function(this1,indx,x,y,z,w) {
this1.__context.vertexAttrib4f(indx,x,y,z,w);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttrib4fv = function(this1,indx,values) {
this1.vertexAttrib4fv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(values));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttribDivisor = function(this1,index,divisor) {
this1.__context.vertexAttribDivisor(index,divisor);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttribI4i = function(this1,indx,x,y,z,w) {
this1.__context.vertexAttribI4i(indx,x,y,z,w);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttribI4iv = function(this1,indx,values) {
this1.vertexAttribI4iv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(values));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttribI4ui = function(this1,indx,x,y,z,w) {
this1.__context.vertexAttribI4ui(indx,x,y,z,w);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttribI4uiv = function(this1,indx,values) {
this1.vertexAttribI4uiv(indx,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(values));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.vertexAttribPointer = function(this1,indx,size,type,normalized,stride,offset) {
this1.__context.vertexAttribPointer(indx,size,type,normalized,stride,lime_utils__$DataPointer_DataPointer_$Impl_$.toValue(offset));
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.viewport = function(this1,x,y,width,height) {
this1.__context.viewport(x,y,width,height);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.waitSync = function(this1,sync,flags,timeout) {
this1.__context.waitSync(sync,flags,timeout);
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.fromGL = function(gl) {
return lime_graphics_opengl_GL.context;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.fromGLES3Context = function(gl) {
return gl;
};
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.toWebGLContext = function(gl) {
return gl;
};
var lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$ = {};
$hxClasses["lime.graphics.opengl._WebGLContext.WebGLContext_Impl_"] = lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$;
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.__name__ = ["lime","graphics","opengl","_WebGLContext","WebGLContext_Impl_"];
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.bufferData = function(this1,target,srcData,usage) {
this1.bufferDataWEBGL(target,srcData,usage,null,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.bufferSubData = function(this1,target,offset,srcData) {
this1.bufferSubDataWEBGL(target,offset,srcData,null,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.compressedTexImage2D = function(this1,target,level,internalformat,width,height,border,srcData) {
this1.compressedTexImage2DWEBGL(target,level,internalformat,width,height,border,srcData,null,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.compressedTexSubImage2D = function(this1,target,level,xoffset,yoffset,width,height,format,srcData) {
this1.compressedTexSubImage2DWEBGL(target,level,xoffset,yoffset,width,height,format,srcData,null,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.readPixels = function(this1,x,y,width,height,format,type,pixels) {
this1.readPixelsWEBGL(x,y,width,height,format,type,pixels,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.texImage2D = function(this1,target,level,internalformat,width,height,border,format,type,srcData) {
var border1 = border;
this1.texImage2DWEBGL(target,level,internalformat,width,height,border1,format,type,srcData,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.texSubImage2D = function(this1,target,level,xoffset,yoffset,width,height,format,type,srcData) {
var format1 = format;
this1.texSubImage2DWEBGL(target,level,xoffset,yoffset,width,height,format1,type,srcData,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.uniformMatrix2fv = function(this1,location,transpose,v) {
this1.uniformMatrix2fvWEBGL(location,transpose,v,null,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.uniformMatrix3fv = function(this1,location,transpose,v) {
this1.uniformMatrix3fvWEBGL(location,transpose,v,null,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.uniformMatrix4fv = function(this1,location,transpose,v) {
this1.uniformMatrix4fvWEBGL(location,transpose,v,null,null);
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.fromGL = function(gl) {
return lime_graphics_opengl_GL.context;
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.fromGLES2Context = function(gl) {
return gl;
};
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.fromGLES3Context = function(gl) {
return gl;
};
var lime_graphics_utils_ImageCanvasUtil = function() { };
$hxClasses["lime.graphics.utils.ImageCanvasUtil"] = lime_graphics_utils_ImageCanvasUtil;
lime_graphics_utils_ImageCanvasUtil.__name__ = ["lime","graphics","utils","ImageCanvasUtil"];
lime_graphics_utils_ImageCanvasUtil.colorTransform = function(image,rect,colorMatrix) {
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
lime_graphics_utils_ImageDataUtil.colorTransform(image,rect,colorMatrix);
};
lime_graphics_utils_ImageCanvasUtil.convertToCanvas = function(image,clear) {
if(clear == null) clear = false;
var buffer = image.buffer;
if(buffer.__srcImage != null) {
if(buffer.__srcCanvas == null) {
lime_graphics_utils_ImageCanvasUtil.createCanvas(image,buffer.__srcImage.width,buffer.__srcImage.height);
buffer.__srcContext.drawImage(buffer.__srcImage,0,0);
}
buffer.__srcImage = null;
} else if(buffer.__srcCanvas == null && buffer.data != null) {
image.set_transparent(true);
lime_graphics_utils_ImageCanvasUtil.createCanvas(image,buffer.width,buffer.height);
lime_graphics_utils_ImageCanvasUtil.createImageData(image);
buffer.__srcContext.putImageData(buffer.__srcImageData,0,0);
} else if(image.type == lime_graphics_ImageType.DATA && buffer.__srcImageData != null && image.dirty) {
buffer.__srcContext.putImageData(buffer.__srcImageData,0,0);
image.dirty = false;
}
if(clear) {
buffer.data = null;
buffer.__srcImageData = null;
} else if(buffer.data == null && buffer.__srcImageData != null) buffer.data = buffer.__srcImageData.data;
image.type = lime_graphics_ImageType.CANVAS;
};
lime_graphics_utils_ImageCanvasUtil.convertToData = function(image,clear) {
if(clear == null) clear = false;
var buffer = image.buffer;
if(buffer.__srcImage != null) lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
if(buffer.__srcCanvas != null && buffer.data == null) {
lime_graphics_utils_ImageCanvasUtil.createImageData(image);
if(image.type == lime_graphics_ImageType.CANVAS) image.dirty = false;
} else if(image.type == lime_graphics_ImageType.CANVAS && buffer.__srcCanvas != null && image.dirty) {
if(buffer.__srcImageData == null) lime_graphics_utils_ImageCanvasUtil.createImageData(image); else {
buffer.__srcImageData = buffer.__srcContext.getImageData(0,0,buffer.width,buffer.height);
var elements = buffer.__srcImageData.data.buffer;
var this1;
if(elements != null) this1 = new Uint8Array(elements); else this1 = null;
buffer.data = this1;
}
image.dirty = false;
}
if(clear) {
image.buffer.__srcCanvas = null;
image.buffer.__srcContext = null;
}
image.type = lime_graphics_ImageType.DATA;
};
lime_graphics_utils_ImageCanvasUtil.copyChannel = function(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
lime_graphics_utils_ImageDataUtil.copyChannel(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
};
lime_graphics_utils_ImageCanvasUtil.copyPixels = function(image,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
if(mergeAlpha == null) mergeAlpha = false;
if(destPoint == null || destPoint.x >= image.width || destPoint.y >= image.height || sourceRect == null || sourceRect.width < 1 || sourceRect.height < 1) return;
if(alphaImage != null && alphaImage.get_transparent()) {
if(alphaPoint == null) alphaPoint = new lime_math_Vector2();
var tempData = image.clone();
tempData.copyChannel(alphaImage,new lime_math_Rectangle(alphaPoint.x,alphaPoint.y,sourceRect.width,sourceRect.height),new lime_math_Vector2(sourceRect.x,sourceRect.y),lime_graphics_ImageChannel.ALPHA,lime_graphics_ImageChannel.ALPHA);
sourceImage = tempData;
}
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image,true);
if(!mergeAlpha) {
if(image.get_transparent() && sourceImage.get_transparent()) image.buffer.__srcContext.clearRect(destPoint.x + image.offsetX,destPoint.y + image.offsetY,sourceRect.width + image.offsetX,sourceRect.height + image.offsetY);
}
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(sourceImage);
if(sourceImage.buffer.get_src() != null) image.buffer.__srcContext.drawImage(sourceImage.buffer.get_src(),sourceRect.x + sourceImage.offsetX | 0,sourceRect.y + sourceImage.offsetY | 0,sourceRect.width | 0,sourceRect.height | 0,destPoint.x + image.offsetX | 0,destPoint.y + image.offsetY | 0,sourceRect.width | 0,sourceRect.height | 0);
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageCanvasUtil.createCanvas = function(image,width,height) {
var buffer = image.buffer;
if(buffer.__srcCanvas == null) {
buffer.__srcCanvas = window.document.createElement("canvas");
buffer.__srcCanvas.width = width;
buffer.__srcCanvas.height = height;
if(!image.get_transparent()) {
if(!image.get_transparent()) buffer.__srcCanvas.setAttribute("moz-opaque","true");
buffer.__srcContext = buffer.__srcCanvas.getContext ("2d", { alpha: false });
} else buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
buffer.__srcContext.mozImageSmoothingEnabled = false;
buffer.__srcContext.msImageSmoothingEnabled = false;
buffer.__srcContext.imageSmoothingEnabled = false;
}
};
lime_graphics_utils_ImageCanvasUtil.createImageData = function(image) {
var buffer = image.buffer;
if(buffer.__srcImageData == null) {
if(buffer.data == null) buffer.__srcImageData = buffer.__srcContext.getImageData(0,0,buffer.width,buffer.height); else {
buffer.__srcImageData = buffer.__srcContext.createImageData(buffer.width,buffer.height);
buffer.__srcImageData.data.set(buffer.data);
}
var elements = buffer.__srcImageData.data.buffer;
var this1;
if(elements != null) this1 = new Uint8Array(elements); else this1 = null;
buffer.data = this1;
}
};
lime_graphics_utils_ImageCanvasUtil.fillRect = function(image,rect,color,format) {
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
var r;
var g;
var b;
var a;
if(format == 1) {
r = color >> 16 & 255;
g = color >> 8 & 255;
b = color & 255;
if(image.get_transparent()) a = color >> 24 & 255; else a = 255;
} else {
r = color >> 24 & 255;
g = color >> 16 & 255;
b = color >> 8 & 255;
if(image.get_transparent()) a = color & 255; else a = 255;
}
if(rect.x == 0 && rect.y == 0 && rect.width == image.width && rect.height == image.height) {
if(image.get_transparent() && a == 0) {
image.buffer.__srcCanvas.width = image.buffer.width;
return;
}
}
image.buffer.__srcContext.fillStyle = "rgba(" + r + ", " + g + ", " + b + ", " + a / 255 + ")";
image.buffer.__srcContext.fillRect(rect.x + image.offsetX,rect.y + image.offsetY,rect.width + image.offsetX,rect.height + image.offsetY);
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageCanvasUtil.floodFill = function(image,x,y,color,format) {
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
lime_graphics_utils_ImageDataUtil.floodFill(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixel = function(image,x,y,format) {
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
return lime_graphics_utils_ImageDataUtil.getPixel(image,x,y,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixel32 = function(image,x,y,format) {
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
return lime_graphics_utils_ImageDataUtil.getPixel32(image,x,y,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixels = function(image,rect,format) {
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
return lime_graphics_utils_ImageDataUtil.getPixels(image,rect,format);
};
lime_graphics_utils_ImageCanvasUtil.merge = function(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
lime_graphics_utils_ImageDataUtil.merge(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
};
lime_graphics_utils_ImageCanvasUtil.resize = function(image,newWidth,newHeight) {
var buffer = image.buffer;
if(buffer.__srcCanvas == null) {
lime_graphics_utils_ImageCanvasUtil.createCanvas(image,newWidth,newHeight);
buffer.__srcContext.drawImage(buffer.get_src(),0,0,newWidth,newHeight);
} else {
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image,true);
var sourceCanvas = buffer.__srcCanvas;
buffer.__srcCanvas = null;
lime_graphics_utils_ImageCanvasUtil.createCanvas(image,newWidth,newHeight);
buffer.__srcContext.drawImage(sourceCanvas,0,0,newWidth,newHeight);
}
buffer.__srcImageData = null;
buffer.data = null;
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageCanvasUtil.scroll = function(image,x,y) {
if(x % image.width == 0 && y % image.height == 0) return;
var copy = image.clone();
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image,true);
image.buffer.__srcContext.clearRect(x,y,image.width,image.height);
image.buffer.__srcContext.drawImage(copy.get_src(),x,y);
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageCanvasUtil.setPixel = function(image,x,y,color,format) {
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
lime_graphics_utils_ImageDataUtil.setPixel(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.setPixel32 = function(image,x,y,color,format) {
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
lime_graphics_utils_ImageDataUtil.setPixel32(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.setPixels = function(image,rect,bytes,format) {
lime_graphics_utils_ImageCanvasUtil.convertToData(image);
lime_graphics_utils_ImageDataUtil.setPixels(image,rect,bytes,format);
};
lime_graphics_utils_ImageCanvasUtil.sync = function(image,clear) {
if(image == null) return;
if(image.type == lime_graphics_ImageType.CANVAS) lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image,clear); else lime_graphics_utils_ImageCanvasUtil.convertToData(image,clear);
};
var lime_graphics_utils_ImageDataUtil = function() { };
$hxClasses["lime.graphics.utils.ImageDataUtil"] = lime_graphics_utils_ImageDataUtil;
lime_graphics_utils_ImageDataUtil.__name__ = ["lime","graphics","utils","ImageDataUtil"];
lime_graphics_utils_ImageDataUtil.colorTransform = function(image,rect,colorMatrix) {
var data = image.buffer.data;
if(data == null) return;
var format = image.buffer.format;
var premultiplied = image.buffer.premultiplied;
var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
var alphaTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable(colorMatrix);
var redTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable(colorMatrix);
var greenTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable(colorMatrix);
var blueTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable(colorMatrix);
var row;
var offset;
var pixel;
var _g1 = 0;
var _g = dataView.height;
while(_g1 < _g) {
var y = _g1++;
row = dataView.offset + dataView.stride * y;
var _g3 = 0;
var _g2 = dataView.width;
while(_g3 < _g2) {
var x = _g3++;
offset = row + x * 4;
switch(format) {
case 2:
pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
}
if(premultiplied) {
if((pixel & 255) != 0 && (pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
var r;
var idx = Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
pixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | pixel & 255 & 255;
}
}
pixel = (redTable[pixel >> 24 & 255] & 255) << 24 | (greenTable[pixel >> 16 & 255] & 255) << 16 | (blueTable[pixel >> 8 & 255] & 255) << 8 | alphaTable[pixel & 255] & 255;
if(premultiplied) {
if((pixel & 255) == 0) {
if(pixel != 0) pixel = 0;
} else if((pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
}
}
switch(format) {
case 2:
data[offset] = pixel >> 8 & 255;
data[offset + 1] = pixel >> 16 & 255;
data[offset + 2] = pixel >> 24 & 255;
data[offset + 3] = pixel & 255;
break;
case 0:
data[offset] = pixel >> 24 & 255;
data[offset + 1] = pixel >> 16 & 255;
data[offset + 2] = pixel >> 8 & 255;
data[offset + 3] = pixel & 255;
break;
case 1:
data[offset] = pixel & 255;
data[offset + 1] = pixel >> 24 & 255;
data[offset + 2] = pixel >> 16 & 255;
data[offset + 3] = pixel >> 8 & 255;
break;
}
}
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.copyChannel = function(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
var destIdx;
switch(destChannel[1]) {
case 0:
destIdx = 0;
break;
case 1:
destIdx = 1;
break;
case 2:
destIdx = 2;
break;
case 3:
destIdx = 3;
break;
}
var srcIdx;
switch(sourceChannel[1]) {
case 0:
srcIdx = 0;
break;
case 1:
srcIdx = 1;
break;
case 2:
srcIdx = 2;
break;
case 3:
srcIdx = 3;
break;
}
var srcData = sourceImage.buffer.data;
var destData = image.buffer.data;
if(srcData == null || destData == null) return;
var srcView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,srcView.width,srcView.height));
var srcFormat = sourceImage.buffer.format;
var destFormat = image.buffer.format;
var srcPremultiplied = sourceImage.buffer.premultiplied;
var destPremultiplied = image.buffer.premultiplied;
var srcPosition;
var destPosition;
var srcPixel;
var destPixel;
var value = 0;
var _g1 = 0;
var _g = destView.height;
while(_g1 < _g) {
var y = _g1++;
srcPosition = srcView.offset + srcView.stride * y;
destPosition = destView.offset + destView.stride * y;
var _g3 = 0;
var _g2 = destView.width;
while(_g3 < _g2) {
var x = _g3++;
switch(srcFormat) {
case 2:
srcPixel = (srcData[srcPosition + 2] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition] & 255) << 8 | srcData[srcPosition + 3] & 255;
break;
case 0:
srcPixel = (srcData[srcPosition] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition + 2] & 255) << 8 | srcData[srcPosition + 3] & 255;
break;
case 1:
srcPixel = (srcData[srcPosition + 1] & 255) << 24 | (srcData[srcPosition + 2] & 255) << 16 | (srcData[srcPosition + 3] & 255) << 8 | srcData[srcPosition] & 255;
break;
}
if(srcPremultiplied) {
if((srcPixel & 255) != 0 && (srcPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (srcPixel & 255);
var r;
var idx = Math.round((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
srcPixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | srcPixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
break;
case 0:
destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
break;
case 1:
destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
break;
}
if(destPremultiplied) {
if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
var r1;
var idx3 = Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx3];
var g1;
var idx4 = Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx4];
var b1;
var idx5 = Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx5];
destPixel = (r1 & 255) << 24 | (g1 & 255) << 16 | (b1 & 255) << 8 | destPixel & 255 & 255;
}
}
switch(srcIdx) {
case 0:
value = srcPixel >> 24 & 255;
break;
case 1:
value = srcPixel >> 16 & 255;
break;
case 2:
value = srcPixel >> 8 & 255;
break;
case 3:
value = srcPixel & 255;
break;
}
switch(destIdx) {
case 0:
destPixel = (value & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
value;
break;
case 1:
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
value;
break;
case 2:
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value & 255) << 8 | destPixel & 255 & 255;
value;
break;
case 3:
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value & 255;
value;
break;
}
if(destPremultiplied) {
if((destPixel & 255) == 0) {
if(destPixel != 0) destPixel = 0;
} else if((destPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destData[destPosition] = destPixel >> 8 & 255;
destData[destPosition + 1] = destPixel >> 16 & 255;
destData[destPosition + 2] = destPixel >> 24 & 255;
destData[destPosition + 3] = destPixel & 255;
break;
case 0:
destData[destPosition] = destPixel >> 24 & 255;
destData[destPosition + 1] = destPixel >> 16 & 255;
destData[destPosition + 2] = destPixel >> 8 & 255;
destData[destPosition + 3] = destPixel & 255;
break;
case 1:
destData[destPosition] = destPixel & 255;
destData[destPosition + 1] = destPixel >> 24 & 255;
destData[destPosition + 2] = destPixel >> 16 & 255;
destData[destPosition + 3] = destPixel >> 8 & 255;
break;
}
srcPosition += 4;
destPosition += 4;
}
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.copyPixels = function(image,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
if(mergeAlpha == null) mergeAlpha = false;
if(image.width == sourceImage.width && image.height == sourceImage.height && sourceRect.width == sourceImage.width && sourceRect.height == sourceImage.height && sourceRect.x == 0 && sourceRect.y == 0 && destPoint.x == 0 && destPoint.y == 0 && alphaImage == null && alphaPoint == null && mergeAlpha == false && image.get_format() == sourceImage.get_format()) image.buffer.data.set(sourceImage.buffer.data); else {
var sourceData = sourceImage.buffer.data;
var destData = image.buffer.data;
if(sourceData == null || destData == null) return;
var sourceView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,sourceView.width,sourceView.height));
var sourceFormat = sourceImage.buffer.format;
var destFormat = image.buffer.format;
var sourcePremultiplied = sourceImage.buffer.premultiplied;
var destPremultiplied = image.buffer.premultiplied;
var sourceBytesPerPixel = sourceImage.buffer.bitsPerPixel / 8 | 0;
var destBytesPerPixel = image.buffer.bitsPerPixel / 8 | 0;
var sourcePosition;
var destPosition;
var sourcePixel;
if(!mergeAlpha || !sourceImage.get_transparent()) {
if(sourceFormat == destFormat && sourcePremultiplied == destPremultiplied && sourceBytesPerPixel == destBytesPerPixel) {
var _g1 = 0;
var _g = destView.height;
while(_g1 < _g) {
var y = _g1++;
sourcePosition = sourceView.offset + sourceView.stride * y;
destPosition = destView.offset + destView.stride * y;
destData.set(sourceData.subarray(sourcePosition,sourcePosition + destView.width * destBytesPerPixel),destPosition);
}
} else {
var _g11 = 0;
var _g2 = destView.height;
while(_g11 < _g2) {
var y1 = _g11++;
sourcePosition = sourceView.offset + sourceView.stride * y1;
destPosition = destView.offset + destView.stride * y1;
var _g3 = 0;
var _g21 = destView.width;
while(_g3 < _g21) {
var x = _g3++;
switch(sourceFormat) {
case 2:
sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
break;
case 0:
sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
break;
case 1:
sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
break;
}
if(sourcePremultiplied) {
if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
var r;
var idx = Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
sourcePixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | sourcePixel & 255 & 255;
}
}
if(destPremultiplied) {
if((sourcePixel & 255) == 0) {
if(sourcePixel != 0) sourcePixel = 0;
} else if((sourcePixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[sourcePixel & 255];
sourcePixel = ((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | sourcePixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destData[destPosition] = sourcePixel >> 8 & 255;
destData[destPosition + 1] = sourcePixel >> 16 & 255;
destData[destPosition + 2] = sourcePixel >> 24 & 255;
destData[destPosition + 3] = sourcePixel & 255;
break;
case 0:
destData[destPosition] = sourcePixel >> 24 & 255;
destData[destPosition + 1] = sourcePixel >> 16 & 255;
destData[destPosition + 2] = sourcePixel >> 8 & 255;
destData[destPosition + 3] = sourcePixel & 255;
break;
case 1:
destData[destPosition] = sourcePixel & 255;
destData[destPosition + 1] = sourcePixel >> 24 & 255;
destData[destPosition + 2] = sourcePixel >> 16 & 255;
destData[destPosition + 3] = sourcePixel >> 8 & 255;
break;
}
sourcePosition += 4;
destPosition += 4;
}
}
}
} else {
var sourceAlpha;
var destAlpha;
var oneMinusSourceAlpha;
var blendAlpha;
var destPixel;
if(alphaImage == null) {
var _g12 = 0;
var _g4 = destView.height;
while(_g12 < _g4) {
var y2 = _g12++;
sourcePosition = sourceView.offset + sourceView.stride * y2;
destPosition = destView.offset + destView.stride * y2;
var _g31 = 0;
var _g22 = destView.width;
while(_g31 < _g22) {
var x1 = _g31++;
switch(sourceFormat) {
case 2:
sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
break;
case 0:
sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
break;
case 1:
sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
break;
}
if(sourcePremultiplied) {
if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
var r1;
var idx3 = Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx3];
var g1;
var idx4 = Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx4];
var b1;
var idx5 = Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx5];
sourcePixel = (r1 & 255) << 24 | (g1 & 255) << 16 | (b1 & 255) << 8 | sourcePixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
break;
case 0:
destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
break;
case 1:
destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
break;
}
if(destPremultiplied) {
if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
var r2;
var idx6 = Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r2 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx6];
var g2;
var idx7 = Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g2 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx7];
var b2;
var idx8 = Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b2 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx8];
destPixel = (r2 & 255) << 24 | (g2 & 255) << 16 | (b2 & 255) << 8 | destPixel & 255 & 255;
}
}
sourceAlpha = (sourcePixel & 255) / 255.0;
destAlpha = (destPixel & 255) / 255.0;
oneMinusSourceAlpha = 1 - sourceAlpha;
blendAlpha = sourceAlpha + destAlpha * oneMinusSourceAlpha;
if(blendAlpha == 0) destPixel = 0; else {
var value;
var idx9 = Math.round(((sourcePixel >> 24 & 255) * sourceAlpha + (destPixel >> 24 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha);
value = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx9];
destPixel = (value & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
value;
var value1;
var idx10 = Math.round(((sourcePixel >> 16 & 255) * sourceAlpha + (destPixel >> 16 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha);
value1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx10];
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value1 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
value1;
var value2;
var idx11 = Math.round(((sourcePixel >> 8 & 255) * sourceAlpha + (destPixel >> 8 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha);
value2 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx11];
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value2 & 255) << 8 | destPixel & 255 & 255;
value2;
var value3;
var idx12 = Math.round(blendAlpha * 255.0);
value3 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx12];
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value3 & 255;
value3;
}
if(destPremultiplied) {
if((destPixel & 255) == 0) {
if(destPixel != 0) destPixel = 0;
} else if((destPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destData[destPosition] = destPixel >> 8 & 255;
destData[destPosition + 1] = destPixel >> 16 & 255;
destData[destPosition + 2] = destPixel >> 24 & 255;
destData[destPosition + 3] = destPixel & 255;
break;
case 0:
destData[destPosition] = destPixel >> 24 & 255;
destData[destPosition + 1] = destPixel >> 16 & 255;
destData[destPosition + 2] = destPixel >> 8 & 255;
destData[destPosition + 3] = destPixel & 255;
break;
case 1:
destData[destPosition] = destPixel & 255;
destData[destPosition + 1] = destPixel >> 24 & 255;
destData[destPosition + 2] = destPixel >> 16 & 255;
destData[destPosition + 3] = destPixel >> 8 & 255;
break;
}
sourcePosition += 4;
destPosition += 4;
}
}
} else {
if(alphaPoint == null) alphaPoint = new lime_math_Vector2();
var alphaData = alphaImage.buffer.data;
var alphaFormat = alphaImage.buffer.format;
var alphaPremultiplied = alphaImage.buffer.premultiplied;
var alphaView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(alphaImage,new lime_math_Rectangle(alphaPoint.x,alphaPoint.y,destView.width,destView.height));
var alphaPosition;
var alphaPixel;
var _g13 = 0;
var _g5 = alphaView.height;
while(_g13 < _g5) {
var y3 = _g13++;
sourcePosition = sourceView.offset + sourceView.stride * y3;
destPosition = destView.offset + destView.stride * y3;
alphaPosition = alphaView.offset + alphaView.stride * y3;
var _g32 = 0;
var _g23 = alphaView.width;
while(_g32 < _g23) {
var x2 = _g32++;
switch(sourceFormat) {
case 2:
sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
break;
case 0:
sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
break;
case 1:
sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
break;
}
if(sourcePremultiplied) {
if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
var r3;
var idx13 = Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r3 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx13];
var g3;
var idx14 = Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g3 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx14];
var b3;
var idx15 = Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b3 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx15];
sourcePixel = (r3 & 255) << 24 | (g3 & 255) << 16 | (b3 & 255) << 8 | sourcePixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
break;
case 0:
destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
break;
case 1:
destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
break;
}
if(destPremultiplied) {
if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
var r4;
var idx16 = Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r4 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx16];
var g4;
var idx17 = Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g4 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx17];
var b4;
var idx18 = Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b4 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx18];
destPixel = (r4 & 255) << 24 | (g4 & 255) << 16 | (b4 & 255) << 8 | destPixel & 255 & 255;
}
}
switch(alphaFormat) {
case 2:
alphaPixel = (alphaData[alphaPosition + 2] & 255) << 24 | (alphaData[alphaPosition + 1] & 255) << 16 | (alphaData[alphaPosition] & 255) << 8 | alphaData[alphaPosition + 3] & 255;
break;
case 0:
alphaPixel = (alphaData[alphaPosition] & 255) << 24 | (alphaData[alphaPosition + 1] & 255) << 16 | (alphaData[alphaPosition + 2] & 255) << 8 | alphaData[alphaPosition + 3] & 255;
break;
case 1:
alphaPixel = (alphaData[alphaPosition + 1] & 255) << 24 | (alphaData[alphaPosition + 2] & 255) << 16 | (alphaData[alphaPosition + 3] & 255) << 8 | alphaData[alphaPosition] & 255;
break;
}
if(alphaPremultiplied) {
if((alphaPixel & 255) != 0 && (alphaPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (alphaPixel & 255);
var r5;
var idx19 = Math.round((alphaPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r5 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx19];
var g5;
var idx20 = Math.round((alphaPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g5 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx20];
var b5;
var idx21 = Math.round((alphaPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b5 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx21];
alphaPixel = (r5 & 255) << 24 | (g5 & 255) << 16 | (b5 & 255) << 8 | alphaPixel & 255 & 255;
}
}
sourceAlpha = (alphaPixel & 255) / 255;
destAlpha = (destPixel & 255) / 255;
oneMinusSourceAlpha = 1 - sourceAlpha;
blendAlpha = sourceAlpha + destAlpha * oneMinusSourceAlpha;
if(blendAlpha == 0) destPixel = 0; else {
var value4;
var idx22 = Math.round(((sourcePixel >> 24 & 255) * sourceAlpha + (destPixel >> 24 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha);
value4 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx22];
destPixel = (value4 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
value4;
var value5;
var idx23 = Math.round(((sourcePixel >> 16 & 255) * sourceAlpha + (destPixel >> 16 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha);
value5 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx23];
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value5 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
value5;
var value6;
var idx24 = Math.round(((sourcePixel >> 8 & 255) * sourceAlpha + (destPixel >> 8 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha);
value6 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx24];
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value6 & 255) << 8 | destPixel & 255 & 255;
value6;
var value7;
var idx25 = Math.round(blendAlpha * 255.0);
value7 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx25];
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value7 & 255;
value7;
}
if(destPremultiplied) {
if((destPixel & 255) == 0) {
if(destPixel != 0) destPixel = 0;
} else if((destPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destData[destPosition] = destPixel >> 8 & 255;
destData[destPosition + 1] = destPixel >> 16 & 255;
destData[destPosition + 2] = destPixel >> 24 & 255;
destData[destPosition + 3] = destPixel & 255;
break;
case 0:
destData[destPosition] = destPixel >> 24 & 255;
destData[destPosition + 1] = destPixel >> 16 & 255;
destData[destPosition + 2] = destPixel >> 8 & 255;
destData[destPosition + 3] = destPixel & 255;
break;
case 1:
destData[destPosition] = destPixel & 255;
destData[destPosition + 1] = destPixel >> 24 & 255;
destData[destPosition + 2] = destPixel >> 16 & 255;
destData[destPosition + 3] = destPixel >> 8 & 255;
break;
}
sourcePosition += 4;
destPosition += 4;
}
}
}
}
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.fillRect = function(image,rect,color,format) {
var fillColor;
switch(format) {
case 1:
{
var argb = color;
var rgba = 0;
rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
fillColor = rgba;
}
break;
case 2:
{
var bgra = color;
var rgba1 = 0;
rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
fillColor = rgba1;
}
break;
default:
fillColor = color;
}
if(!image.get_transparent()) {
fillColor = (fillColor >> 24 & 255 & 255) << 24 | (fillColor >> 16 & 255 & 255) << 16 | (fillColor >> 8 & 255 & 255) << 8 | 255;
255;
}
var data = image.buffer.data;
if(data == null) return;
var format1 = image.buffer.format;
var premultiplied = image.buffer.premultiplied;
if(premultiplied) {
if((fillColor & 255) == 0) {
if(fillColor != 0) fillColor = 0;
} else if((fillColor & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[fillColor & 255];
fillColor = ((fillColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((fillColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((fillColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | fillColor & 255 & 255;
}
}
var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
var row;
var _g1 = 0;
var _g = dataView.height;
while(_g1 < _g) {
var y = _g1++;
row = dataView.offset + dataView.stride * y;
var _g3 = 0;
var _g2 = dataView.width;
while(_g3 < _g2) {
var x = _g3++;
var offset = row + x * 4;
switch(format1) {
case 2:
data[offset] = fillColor >> 8 & 255;
data[offset + 1] = fillColor >> 16 & 255;
data[offset + 2] = fillColor >> 24 & 255;
data[offset + 3] = fillColor & 255;
break;
case 0:
data[offset] = fillColor >> 24 & 255;
data[offset + 1] = fillColor >> 16 & 255;
data[offset + 2] = fillColor >> 8 & 255;
data[offset + 3] = fillColor & 255;
break;
case 1:
data[offset] = fillColor & 255;
data[offset + 1] = fillColor >> 24 & 255;
data[offset + 2] = fillColor >> 16 & 255;
data[offset + 3] = fillColor >> 8 & 255;
break;
}
}
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.floodFill = function(image,x,y,color,format) {
var data = image.buffer.data;
if(data == null) return;
if(format == 1) color = (color & 16777215) << 8 | color >> 24 & 255;
var format1 = image.buffer.format;
var premultiplied = image.buffer.premultiplied;
var fillColor = color;
var hitColor;
var offset = (y + image.offsetY) * (image.buffer.width * 4) + (x + image.offsetX) * 4;
switch(format1) {
case 2:
hitColor = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
hitColor = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
hitColor = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
}
if(premultiplied) {
if((hitColor & 255) != 0 && (hitColor & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (hitColor & 255);
var r;
var idx = Math.round((hitColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((hitColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((hitColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
hitColor = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | hitColor & 255 & 255;
}
}
if(!image.get_transparent()) {
fillColor = (fillColor >> 24 & 255 & 255) << 24 | (fillColor >> 16 & 255 & 255) << 16 | (fillColor >> 8 & 255 & 255) << 8 | 255;
255;
hitColor = (hitColor >> 24 & 255 & 255) << 24 | (hitColor >> 16 & 255 & 255) << 16 | (hitColor >> 8 & 255 & 255) << 8 | 255;
255;
}
if(fillColor == hitColor) return;
if(premultiplied) {
if((fillColor & 255) == 0) {
if(fillColor != 0) fillColor = 0;
} else if((fillColor & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[fillColor & 255];
fillColor = ((fillColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((fillColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((fillColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | fillColor & 255 & 255;
}
}
var dx = [0,-1,1,0];
var dy = [-1,0,0,1];
var minX = -image.offsetX;
var minY = -image.offsetY;
var maxX = minX + image.width;
var maxY = minY + image.height;
var queue = [];
queue.push(x);
queue.push(y);
var curPointX;
var curPointY;
var nextPointX;
var nextPointY;
var nextPointOffset;
var readColor;
while(queue.length > 0) {
curPointY = queue.pop();
curPointX = queue.pop();
var _g = 0;
while(_g < 4) {
var i = _g++;
nextPointX = curPointX + dx[i];
nextPointY = curPointY + dy[i];
if(nextPointX < minX || nextPointY < minY || nextPointX >= maxX || nextPointY >= maxY) continue;
nextPointOffset = (nextPointY * image.width + nextPointX) * 4;
switch(format1) {
case 2:
readColor = (data[nextPointOffset + 2] & 255) << 24 | (data[nextPointOffset + 1] & 255) << 16 | (data[nextPointOffset] & 255) << 8 | data[nextPointOffset + 3] & 255;
break;
case 0:
readColor = (data[nextPointOffset] & 255) << 24 | (data[nextPointOffset + 1] & 255) << 16 | (data[nextPointOffset + 2] & 255) << 8 | data[nextPointOffset + 3] & 255;
break;
case 1:
readColor = (data[nextPointOffset + 1] & 255) << 24 | (data[nextPointOffset + 2] & 255) << 16 | (data[nextPointOffset + 3] & 255) << 8 | data[nextPointOffset] & 255;
break;
}
if(premultiplied) {
if((readColor & 255) != 0 && (readColor & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (readColor & 255);
var r1;
var idx3 = Math.round((readColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx3];
var g1;
var idx4 = Math.round((readColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx4];
var b1;
var idx5 = Math.round((readColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx5];
readColor = (r1 & 255) << 24 | (g1 & 255) << 16 | (b1 & 255) << 8 | readColor & 255 & 255;
}
}
if(readColor == hitColor) {
switch(format1) {
case 2:
data[nextPointOffset] = fillColor >> 8 & 255;
data[nextPointOffset + 1] = fillColor >> 16 & 255;
data[nextPointOffset + 2] = fillColor >> 24 & 255;
data[nextPointOffset + 3] = fillColor & 255;
break;
case 0:
data[nextPointOffset] = fillColor >> 24 & 255;
data[nextPointOffset + 1] = fillColor >> 16 & 255;
data[nextPointOffset + 2] = fillColor >> 8 & 255;
data[nextPointOffset + 3] = fillColor & 255;
break;
case 1:
data[nextPointOffset] = fillColor & 255;
data[nextPointOffset + 1] = fillColor >> 24 & 255;
data[nextPointOffset + 2] = fillColor >> 16 & 255;
data[nextPointOffset + 3] = fillColor >> 8 & 255;
break;
}
queue.push(nextPointX);
queue.push(nextPointY);
}
}
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.getColorBoundsRect = function(image,mask,color,findColor,format) {
if(findColor == null) findColor = true;
var left = image.width + 1;
var right = 0;
var top = image.height + 1;
var bottom = 0;
var _color;
var _mask;
switch(format) {
case 1:
{
var argb = color;
var rgba = 0;
rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
_color = rgba;
}
{
var argb1 = mask;
var rgba1 = 0;
rgba1 = (argb1 >> 16 & 255 & 255) << 24 | (argb1 >> 8 & 255 & 255) << 16 | (argb1 & 255 & 255) << 8 | argb1 >> 24 & 255 & 255;
_mask = rgba1;
}
break;
case 2:
{
var bgra = color;
var rgba2 = 0;
rgba2 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
_color = rgba2;
}
{
var bgra1 = mask;
var rgba3 = 0;
rgba3 = (bgra1 >> 8 & 255 & 255) << 24 | (bgra1 >> 16 & 255 & 255) << 16 | (bgra1 >> 24 & 255 & 255) << 8 | bgra1 & 255 & 255;
_mask = rgba3;
}
break;
default:
_color = color;
_mask = mask;
}
if(!image.get_transparent()) {
_color = (_color >> 24 & 255 & 255) << 24 | (_color >> 16 & 255 & 255) << 16 | (_color >> 8 & 255 & 255) << 8 | 255;
255;
_mask = (_mask >> 24 & 255 & 255) << 24 | (_mask >> 16 & 255 & 255) << 16 | (_mask >> 8 & 255 & 255) << 8 | 255;
255;
}
var pixel;
var hit;
var _g1 = 0;
var _g = image.width;
while(_g1 < _g) {
var x = _g1++;
hit = false;
var _g3 = 0;
var _g2 = image.height;
while(_g3 < _g2) {
var y = _g3++;
pixel = image.getPixel32(x,y,0);
if(findColor) hit = (pixel & _mask) == _color; else hit = (pixel & _mask) != _color;
if(hit) {
if(x < left) left = x;
break;
}
}
if(hit) break;
}
var ix;
var _g11 = 0;
var _g4 = image.width;
while(_g11 < _g4) {
var x1 = _g11++;
ix = image.width - 1 - x1;
hit = false;
var _g31 = 0;
var _g21 = image.height;
while(_g31 < _g21) {
var y1 = _g31++;
pixel = image.getPixel32(ix,y1,0);
if(findColor) hit = (pixel & _mask) == _color; else hit = (pixel & _mask) != _color;
if(hit) {
if(ix > right) right = ix;
break;
}
}
if(hit) break;
}
var _g12 = 0;
var _g5 = image.height;
while(_g12 < _g5) {
var y2 = _g12++;
hit = false;
var _g32 = 0;
var _g22 = image.width;
while(_g32 < _g22) {
var x2 = _g32++;
pixel = image.getPixel32(x2,y2,0);
if(findColor) hit = (pixel & _mask) == _color; else hit = (pixel & _mask) != _color;
if(hit) {
if(y2 < top) top = y2;
break;
}
}
if(hit) break;
}
var iy;
var _g13 = 0;
var _g6 = image.height;
while(_g13 < _g6) {
var y3 = _g13++;
iy = image.height - 1 - y3;
hit = false;
var _g33 = 0;
var _g23 = image.width;
while(_g33 < _g23) {
var x3 = _g33++;
pixel = image.getPixel32(x3,iy,0);
if(findColor) hit = (pixel & _mask) == _color; else hit = (pixel & _mask) != _color;
if(hit) {
if(iy > bottom) bottom = iy;
break;
}
}
if(hit) break;
}
var w = right - left;
var h = bottom - top;
if(w > 0) w++;
if(h > 0) h++;
if(w < 0) w = 0;
if(h < 0) h = 0;
if(left == right) w = 1;
if(top == bottom) h = 1;
if(left > image.width) left = 0;
if(top > image.height) top = 0;
return new lime_math_Rectangle(left,top,w,h);
};
lime_graphics_utils_ImageDataUtil.getPixel = function(image,x,y,format) {
var pixel;
var data = image.buffer.data;
var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
switch(image.buffer.format) {
case 2:
pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
}
if(image.buffer.premultiplied) {
if((pixel & 255) != 0 && (pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
var r;
var idx = Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
pixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | pixel & 255 & 255;
}
}
pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 0;
0;
switch(format) {
case 1:
return (function($this) {
var $r;
var argb = 0;
argb = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
$r = argb;
return $r;
}(this));
case 2:
return (function($this) {
var $r;
var bgra = 0;
bgra = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
$r = bgra;
return $r;
}(this));
default:
return pixel;
}
};
lime_graphics_utils_ImageDataUtil.getPixel32 = function(image,x,y,format) {
var pixel;
var data = image.buffer.data;
var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
switch(image.buffer.format) {
case 2:
pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
}
if(image.buffer.premultiplied) {
if((pixel & 255) != 0 && (pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
var r;
var idx = Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
pixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | pixel & 255 & 255;
}
}
switch(format) {
case 1:
return (function($this) {
var $r;
var argb = 0;
argb = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
$r = argb;
return $r;
}(this));
case 2:
return (function($this) {
var $r;
var bgra = 0;
bgra = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
$r = bgra;
return $r;
}(this));
default:
return pixel;
}
};
lime_graphics_utils_ImageDataUtil.getPixels = function(image,rect,format) {
if(image.buffer.data == null) return null;
var length = rect.width * rect.height | 0;
var bytes = new haxe_io_Bytes(new ArrayBuffer(length * 4));
var data = image.buffer.data;
var sourceFormat = image.buffer.format;
var premultiplied = image.buffer.premultiplied;
var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
var position;
var argb;
var bgra;
var pixel;
var destPosition = 0;
var _g1 = 0;
var _g = dataView.height;
while(_g1 < _g) {
var y = _g1++;
position = dataView.offset + dataView.stride * y;
var _g3 = 0;
var _g2 = dataView.width;
while(_g3 < _g2) {
var x = _g3++;
switch(sourceFormat) {
case 2:
pixel = (data[position + 2] & 255) << 24 | (data[position + 1] & 255) << 16 | (data[position] & 255) << 8 | data[position + 3] & 255;
break;
case 0:
pixel = (data[position] & 255) << 24 | (data[position + 1] & 255) << 16 | (data[position + 2] & 255) << 8 | data[position + 3] & 255;
break;
case 1:
pixel = (data[position + 1] & 255) << 24 | (data[position + 2] & 255) << 16 | (data[position + 3] & 255) << 8 | data[position] & 255;
break;
}
if(premultiplied) {
if((pixel & 255) != 0 && (pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
var r;
var idx = Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
pixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | pixel & 255 & 255;
}
}
switch(format) {
case 1:
{
var argb1 = 0;
argb1 = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
argb = argb1;
}
pixel = argb;
break;
case 2:
{
var bgra1 = 0;
bgra1 = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
bgra = bgra1;
}
pixel = bgra;
break;
default:
}
bytes.set(destPosition++,pixel >> 24 & 255);
bytes.set(destPosition++,pixel >> 16 & 255);
bytes.set(destPosition++,pixel >> 8 & 255);
bytes.set(destPosition++,pixel & 255);
position += 4;
}
}
return bytes;
};
lime_graphics_utils_ImageDataUtil.merge = function(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
if(image.buffer.data == null || sourceImage.buffer.data == null) return;
var sourceView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,sourceView.width,sourceView.height));
var sourceData = sourceImage.buffer.data;
var destData = image.buffer.data;
var sourceFormat = sourceImage.buffer.format;
var destFormat = image.buffer.format;
var sourcePremultiplied = sourceImage.buffer.premultiplied;
var destPremultiplied = image.buffer.premultiplied;
var sourcePosition;
var destPosition;
var sourcePixel;
var destPixel;
var _g1 = 0;
var _g = destView.height;
while(_g1 < _g) {
var y = _g1++;
sourcePosition = sourceView.offset + sourceView.stride * y;
destPosition = destView.offset + destView.stride * y;
var _g3 = 0;
var _g2 = destView.width;
while(_g3 < _g2) {
var x = _g3++;
switch(sourceFormat) {
case 2:
sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
break;
case 0:
sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
break;
case 1:
sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
break;
}
if(sourcePremultiplied) {
if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
var r;
var idx = Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
sourcePixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | sourcePixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
break;
case 0:
destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
break;
case 1:
destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
break;
}
if(destPremultiplied) {
if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
var r1;
var idx3 = Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx3];
var g1;
var idx4 = Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx4];
var b1;
var idx5 = Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b1 = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx5];
destPixel = (r1 & 255) << 24 | (g1 & 255) << 16 | (b1 & 255) << 8 | destPixel & 255 & 255;
}
}
var value = ((sourcePixel >> 24 & 255) * redMultiplier + (destPixel >> 24 & 255) * (256 - redMultiplier)) / 256 | 0;
destPixel = (value & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
value;
var value1 = ((sourcePixel >> 16 & 255) * greenMultiplier + (destPixel >> 16 & 255) * (256 - greenMultiplier)) / 256 | 0;
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value1 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
value1;
var value2 = ((sourcePixel >> 8 & 255) * blueMultiplier + (destPixel >> 8 & 255) * (256 - blueMultiplier)) / 256 | 0;
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value2 & 255) << 8 | destPixel & 255 & 255;
value2;
var value3 = ((sourcePixel & 255) * alphaMultiplier + (destPixel & 255) * (256 - alphaMultiplier)) / 256 | 0;
destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value3 & 255;
value3;
if(destPremultiplied) {
if((destPixel & 255) == 0) {
if(destPixel != 0) destPixel = 0;
} else if((destPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destData[destPosition] = destPixel >> 8 & 255;
destData[destPosition + 1] = destPixel >> 16 & 255;
destData[destPosition + 2] = destPixel >> 24 & 255;
destData[destPosition + 3] = destPixel & 255;
break;
case 0:
destData[destPosition] = destPixel >> 24 & 255;
destData[destPosition + 1] = destPixel >> 16 & 255;
destData[destPosition + 2] = destPixel >> 8 & 255;
destData[destPosition + 3] = destPixel & 255;
break;
case 1:
destData[destPosition] = destPixel & 255;
destData[destPosition + 1] = destPixel >> 24 & 255;
destData[destPosition + 2] = destPixel >> 16 & 255;
destData[destPosition + 3] = destPixel >> 8 & 255;
break;
}
sourcePosition += 4;
destPosition += 4;
}
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.multiplyAlpha = function(image) {
var data = image.buffer.data;
if(data == null || !image.buffer.transparent) return;
var format = image.buffer.format;
var length = data.length / 4 | 0;
var pixel;
var _g = 0;
while(_g < length) {
var i = _g++;
var offset = i * 4;
switch(format) {
case 2:
pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
}
var offset1 = i * 4;
if((pixel & 255) == 0) {
if(pixel != 0) pixel = 0;
} else if((pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
}
switch(format) {
case 2:
data[offset1] = pixel >> 8 & 255;
data[offset1 + 1] = pixel >> 16 & 255;
data[offset1 + 2] = pixel >> 24 & 255;
data[offset1 + 3] = pixel & 255;
break;
case 0:
data[offset1] = pixel >> 24 & 255;
data[offset1 + 1] = pixel >> 16 & 255;
data[offset1 + 2] = pixel >> 8 & 255;
data[offset1 + 3] = pixel & 255;
break;
case 1:
data[offset1] = pixel & 255;
data[offset1 + 1] = pixel >> 24 & 255;
data[offset1 + 2] = pixel >> 16 & 255;
data[offset1 + 3] = pixel >> 8 & 255;
break;
}
}
image.buffer.premultiplied = true;
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.resize = function(image,newWidth,newHeight) {
var buffer = image.buffer;
if(buffer.width == newWidth && buffer.height == newHeight) return;
var newBuffer = new lime_graphics_ImageBuffer((function($this) {
var $r;
var elements = newWidth * newHeight * 4;
var this1;
if(elements != null) this1 = new Uint8Array(elements); else this1 = null;
$r = this1;
return $r;
}(this)),newWidth,newHeight);
var imageWidth = image.width;
var imageHeight = image.height;
var data = image.get_data();
var newData = newBuffer.data;
var sourceIndex;
var sourceIndexX;
var sourceIndexY;
var sourceIndexXY;
var index;
var sourceX;
var sourceY;
var u;
var v;
var uRatio;
var vRatio;
var uOpposite;
var vOpposite;
var _g = 0;
while(_g < newHeight) {
var y = _g++;
var _g1 = 0;
while(_g1 < newWidth) {
var x = _g1++;
u = (x + 0.5) / newWidth * imageWidth - 0.5;
v = (y + 0.5) / newHeight * imageHeight - 0.5;
sourceX = u | 0;
sourceY = v | 0;
sourceIndex = (sourceY * imageWidth + sourceX) * 4;
if(sourceX < imageWidth - 1) sourceIndexX = sourceIndex + 4; else sourceIndexX = sourceIndex;
if(sourceY < imageHeight - 1) sourceIndexY = sourceIndex + imageWidth * 4; else sourceIndexY = sourceIndex;
if(sourceIndexX != sourceIndex) sourceIndexXY = sourceIndexY + 4; else sourceIndexXY = sourceIndexY;
index = (y * newWidth + x) * 4;
uRatio = u - sourceX;
vRatio = v - sourceY;
uOpposite = 1 - uRatio;
vOpposite = 1 - vRatio;
var val = Std["int"]((_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY]) * uRatio) * vRatio);
newData[index] = val;
var val1 = Std["int"]((_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex + 1]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX + 1]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY + 1]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY + 1]) * uRatio) * vRatio);
newData[index + 1] = val1;
var val2 = Std["int"]((_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex + 2]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX + 2]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY + 2]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY + 2]) * uRatio) * vRatio);
newData[index + 2] = val2;
if(data[sourceIndexX + 3] == 0 || data[sourceIndexY + 3] == 0 || data[sourceIndexXY + 3] == 0) newData[index + 3] = 0; else newData[index + 3] = data[sourceIndex + 3];
}
}
buffer.data = newBuffer.data;
buffer.width = newWidth;
buffer.height = newHeight;
buffer.__srcImage = null;
buffer.__srcImageData = null;
buffer.__srcCanvas = null;
buffer.__srcContext = null;
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.resizeBuffer = function(image,newWidth,newHeight) {
var buffer = image.buffer;
var data = image.get_data();
var newData;
var elements = newWidth * newHeight * 4;
var this1;
if(elements != null) this1 = new Uint8Array(elements); else this1 = null;
newData = this1;
var sourceIndex;
var index;
var _g1 = 0;
var _g = buffer.height;
while(_g1 < _g) {
var y = _g1++;
var _g3 = 0;
var _g2 = buffer.width;
while(_g3 < _g2) {
var x = _g3++;
sourceIndex = (y * buffer.width + x) * 4;
index = (y * newWidth + x) * 4;
newData[index] = data[sourceIndex];
newData[index + 1] = data[sourceIndex + 1];
newData[index + 2] = data[sourceIndex + 2];
newData[index + 3] = data[sourceIndex + 3];
}
}
buffer.data = newData;
buffer.width = newWidth;
buffer.height = newHeight;
};
lime_graphics_utils_ImageDataUtil.setFormat = function(image,format) {
var data = image.buffer.data;
if(data == null) return;
var index;
var a16;
var length = data.length / 4 | 0;
var r1;
var g1;
var b1;
var a1;
var r2;
var g2;
var b2;
var a2;
var r;
var g;
var b;
var a;
var _g = image.get_format();
switch(_g) {
case 0:
r1 = 0;
g1 = 1;
b1 = 2;
a1 = 3;
break;
case 1:
r1 = 1;
g1 = 2;
b1 = 3;
a1 = 0;
break;
case 2:
r1 = 2;
g1 = 1;
b1 = 0;
a1 = 3;
break;
}
switch(format) {
case 0:
r2 = 0;
g2 = 1;
b2 = 2;
a2 = 3;
break;
case 1:
r2 = 1;
g2 = 2;
b2 = 3;
a2 = 0;
break;
case 2:
r2 = 2;
g2 = 1;
b2 = 0;
a2 = 3;
break;
}
var _g1 = 0;
while(_g1 < length) {
var i = _g1++;
index = i * 4;
r = data[index + r1];
g = data[index + g1];
b = data[index + b1];
a = data[index + a1];
data[index + r2] = r;
data[index + g2] = g;
data[index + b2] = b;
data[index + a2] = a;
}
image.buffer.format = format;
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.setPixel = function(image,x,y,color,format) {
var pixel;
switch(format) {
case 1:
{
var argb = color;
var rgba = 0;
rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
pixel = rgba;
}
break;
case 2:
{
var bgra = color;
var rgba1 = 0;
rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
pixel = rgba1;
}
break;
default:
pixel = color;
}
var source = 0;
var data = image.buffer.data;
var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
switch(image.buffer.format) {
case 2:
source = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
source = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
source = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
}
if(image.buffer.premultiplied) {
if((source & 255) != 0 && (source & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (source & 255);
var r;
var idx = Math.round((source >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((source >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((source >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
source = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | source & 255 & 255;
}
}
var value = source & 255;
pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | value & 255;
value;
var data1 = image.buffer.data;
var offset1 = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
if(image.buffer.premultiplied) {
if((pixel & 255) == 0) {
if(pixel != 0) pixel = 0;
} else if((pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
}
}
switch(image.buffer.format) {
case 2:
data1[offset1] = pixel >> 8 & 255;
data1[offset1 + 1] = pixel >> 16 & 255;
data1[offset1 + 2] = pixel >> 24 & 255;
data1[offset1 + 3] = pixel & 255;
break;
case 0:
data1[offset1] = pixel >> 24 & 255;
data1[offset1 + 1] = pixel >> 16 & 255;
data1[offset1 + 2] = pixel >> 8 & 255;
data1[offset1 + 3] = pixel & 255;
break;
case 1:
data1[offset1] = pixel & 255;
data1[offset1 + 1] = pixel >> 24 & 255;
data1[offset1 + 2] = pixel >> 16 & 255;
data1[offset1 + 3] = pixel >> 8 & 255;
break;
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.setPixel32 = function(image,x,y,color,format) {
var pixel;
switch(format) {
case 1:
{
var argb = color;
var rgba = 0;
rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
pixel = rgba;
}
break;
case 2:
{
var bgra = color;
var rgba1 = 0;
rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
pixel = rgba1;
}
break;
default:
pixel = color;
}
if(!image.get_transparent()) {
pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 255;
255;
}
var data = image.buffer.data;
var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
if(image.buffer.premultiplied) {
if((pixel & 255) == 0) {
if(pixel != 0) pixel = 0;
} else if((pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
}
}
switch(image.buffer.format) {
case 2:
data[offset] = pixel >> 8 & 255;
data[offset + 1] = pixel >> 16 & 255;
data[offset + 2] = pixel >> 24 & 255;
data[offset + 3] = pixel & 255;
break;
case 0:
data[offset] = pixel >> 24 & 255;
data[offset + 1] = pixel >> 16 & 255;
data[offset + 2] = pixel >> 8 & 255;
data[offset + 3] = pixel & 255;
break;
case 1:
data[offset] = pixel & 255;
data[offset + 1] = pixel >> 24 & 255;
data[offset + 2] = pixel >> 16 & 255;
data[offset + 3] = pixel >> 8 & 255;
break;
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.setPixels = function(image,rect,bytes,format) {
if(image.buffer.data == null) return;
var data = image.buffer.data;
var sourceFormat = image.buffer.format;
var premultiplied = image.buffer.premultiplied;
var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
var row;
var color;
var pixel;
var transparent = image.get_transparent();
var dataPosition = 0;
var _g1 = 0;
var _g = dataView.height;
while(_g1 < _g) {
var y = _g1++;
row = dataView.offset + dataView.stride * y;
var _g3 = 0;
var _g2 = dataView.width;
while(_g3 < _g2) {
var x = _g3++;
color = bytes.b[dataPosition + 3] | bytes.b[dataPosition + 2] << 8 | bytes.b[dataPosition + 1] << 16 | bytes.b[dataPosition] << 24;
dataPosition += 4;
switch(format) {
case 1:
{
var argb = color;
var rgba = 0;
rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
pixel = rgba;
}
break;
case 2:
{
var bgra = color;
var rgba1 = 0;
rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
pixel = rgba1;
}
break;
default:
pixel = color;
}
if(!transparent) {
pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 255;
255;
}
var offset = row + x * 4;
if(premultiplied) {
if((pixel & 255) == 0) {
if(pixel != 0) pixel = 0;
} else if((pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
}
}
switch(sourceFormat) {
case 2:
data[offset] = pixel >> 8 & 255;
data[offset + 1] = pixel >> 16 & 255;
data[offset + 2] = pixel >> 24 & 255;
data[offset + 3] = pixel & 255;
break;
case 0:
data[offset] = pixel >> 24 & 255;
data[offset + 1] = pixel >> 16 & 255;
data[offset + 2] = pixel >> 8 & 255;
data[offset + 3] = pixel & 255;
break;
case 1:
data[offset] = pixel & 255;
data[offset + 1] = pixel >> 24 & 255;
data[offset + 2] = pixel >> 16 & 255;
data[offset + 3] = pixel >> 8 & 255;
break;
}
}
}
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.threshold = function(image,sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format) {
var _color;
var _mask;
var _threshold;
switch(format) {
case 1:
{
var argb = color;
var rgba = 0;
rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
_color = rgba;
}
{
var argb1 = mask;
var rgba1 = 0;
rgba1 = (argb1 >> 16 & 255 & 255) << 24 | (argb1 >> 8 & 255 & 255) << 16 | (argb1 & 255 & 255) << 8 | argb1 >> 24 & 255 & 255;
_mask = rgba1;
}
{
var argb2 = threshold;
var rgba2 = 0;
rgba2 = (argb2 >> 16 & 255 & 255) << 24 | (argb2 >> 8 & 255 & 255) << 16 | (argb2 & 255 & 255) << 8 | argb2 >> 24 & 255 & 255;
_threshold = rgba2;
}
break;
case 2:
{
var bgra = color;
var rgba3 = 0;
rgba3 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
_color = rgba3;
}
{
var bgra1 = mask;
var rgba4 = 0;
rgba4 = (bgra1 >> 8 & 255 & 255) << 24 | (bgra1 >> 16 & 255 & 255) << 16 | (bgra1 >> 24 & 255 & 255) << 8 | bgra1 & 255 & 255;
_mask = rgba4;
}
{
var bgra2 = threshold;
var rgba5 = 0;
rgba5 = (bgra2 >> 8 & 255 & 255) << 24 | (bgra2 >> 16 & 255 & 255) << 16 | (bgra2 >> 24 & 255 & 255) << 8 | bgra2 & 255 & 255;
_threshold = rgba5;
}
break;
default:
_color = color;
_mask = mask;
_threshold = threshold;
}
var _operation;
switch(operation) {
case "!=":
_operation = 0;
break;
case "==":
_operation = 1;
break;
case "<":
_operation = 2;
break;
case "<=":
_operation = 3;
break;
case ">":
_operation = 4;
break;
case ">=":
_operation = 5;
break;
default:
_operation = -1;
}
if(_operation == -1) return 0;
var srcData = sourceImage.buffer.data;
var destData = image.buffer.data;
if(srcData == null || destData == null) return 0;
var hits = 0;
var srcView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,srcView.width,srcView.height));
var srcFormat = sourceImage.buffer.format;
var destFormat = image.buffer.format;
var srcPremultiplied = sourceImage.buffer.premultiplied;
var destPremultiplied = image.buffer.premultiplied;
var srcPosition;
var destPosition;
var srcPixel;
var destPixel;
var pixelMask;
var test;
var value;
var _g1 = 0;
var _g = destView.height;
while(_g1 < _g) {
var y = _g1++;
srcPosition = srcView.offset + srcView.stride * y;
destPosition = destView.offset + destView.stride * y;
var _g3 = 0;
var _g2 = destView.width;
while(_g3 < _g2) {
var x = _g3++;
switch(srcFormat) {
case 2:
srcPixel = (srcData[srcPosition + 2] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition] & 255) << 8 | srcData[srcPosition + 3] & 255;
break;
case 0:
srcPixel = (srcData[srcPosition] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition + 2] & 255) << 8 | srcData[srcPosition + 3] & 255;
break;
case 1:
srcPixel = (srcData[srcPosition + 1] & 255) << 24 | (srcData[srcPosition + 2] & 255) << 16 | (srcData[srcPosition + 3] & 255) << 8 | srcData[srcPosition] & 255;
break;
}
if(srcPremultiplied) {
if((srcPixel & 255) != 0 && (srcPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (srcPixel & 255);
var r;
var idx = Math.round((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
srcPixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | srcPixel & 255 & 255;
}
}
pixelMask = srcPixel & _mask;
value = lime_graphics_utils_ImageDataUtil.__pixelCompare(pixelMask,_threshold);
switch(_operation) {
case 0:
test = value != 0;
break;
case 1:
test = value == 0;
break;
case 2:
test = value == -1;
break;
case 3:
test = value == 0 || value == -1;
break;
case 4:
test = value == 1;
break;
case 5:
test = value == 0 || value == 1;
break;
default:
test = false;
}
if(test) {
if(destPremultiplied) {
if((_color & 255) == 0) {
if(_color != 0) _color = 0;
} else if((_color & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[_color & 255];
_color = ((_color >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((_color >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((_color >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | _color & 255 & 255;
}
}
switch(destFormat) {
case 2:
destData[destPosition] = _color >> 8 & 255;
destData[destPosition + 1] = _color >> 16 & 255;
destData[destPosition + 2] = _color >> 24 & 255;
destData[destPosition + 3] = _color & 255;
break;
case 0:
destData[destPosition] = _color >> 24 & 255;
destData[destPosition + 1] = _color >> 16 & 255;
destData[destPosition + 2] = _color >> 8 & 255;
destData[destPosition + 3] = _color & 255;
break;
case 1:
destData[destPosition] = _color & 255;
destData[destPosition + 1] = _color >> 24 & 255;
destData[destPosition + 2] = _color >> 16 & 255;
destData[destPosition + 3] = _color >> 8 & 255;
break;
}
hits++;
} else if(copySource) {
if(destPremultiplied) {
if((srcPixel & 255) == 0) {
if(srcPixel != 0) srcPixel = 0;
} else if((srcPixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[srcPixel & 255];
srcPixel = ((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | srcPixel & 255 & 255;
}
}
switch(destFormat) {
case 2:
destData[destPosition] = srcPixel >> 8 & 255;
destData[destPosition + 1] = srcPixel >> 16 & 255;
destData[destPosition + 2] = srcPixel >> 24 & 255;
destData[destPosition + 3] = srcPixel & 255;
break;
case 0:
destData[destPosition] = srcPixel >> 24 & 255;
destData[destPosition + 1] = srcPixel >> 16 & 255;
destData[destPosition + 2] = srcPixel >> 8 & 255;
destData[destPosition + 3] = srcPixel & 255;
break;
case 1:
destData[destPosition] = srcPixel & 255;
destData[destPosition + 1] = srcPixel >> 24 & 255;
destData[destPosition + 2] = srcPixel >> 16 & 255;
destData[destPosition + 3] = srcPixel >> 8 & 255;
break;
}
}
srcPosition += 4;
destPosition += 4;
}
}
if(hits > 0) {
image.dirty = true;
image.version++;
}
return hits;
};
lime_graphics_utils_ImageDataUtil.unmultiplyAlpha = function(image) {
var data = image.buffer.data;
if(data == null) return;
var format = image.buffer.format;
var length = data.length / 4 | 0;
var pixel;
var _g = 0;
while(_g < length) {
var i = _g++;
var offset = i * 4;
switch(format) {
case 2:
pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
}
if((pixel & 255) != 0 && (pixel & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
var r;
var idx = Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
pixel = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | pixel & 255 & 255;
}
var offset1 = i * 4;
switch(format) {
case 2:
data[offset1] = pixel >> 8 & 255;
data[offset1 + 1] = pixel >> 16 & 255;
data[offset1 + 2] = pixel >> 24 & 255;
data[offset1 + 3] = pixel & 255;
break;
case 0:
data[offset1] = pixel >> 24 & 255;
data[offset1 + 1] = pixel >> 16 & 255;
data[offset1 + 2] = pixel >> 8 & 255;
data[offset1 + 3] = pixel & 255;
break;
case 1:
data[offset1] = pixel & 255;
data[offset1 + 1] = pixel >> 24 & 255;
data[offset1 + 2] = pixel >> 16 & 255;
data[offset1 + 3] = pixel >> 8 & 255;
break;
}
}
image.buffer.premultiplied = false;
image.dirty = true;
image.version++;
};
lime_graphics_utils_ImageDataUtil.__pixelCompare = function(n1,n2) {
var tmp1;
var tmp2;
tmp1 = n1 >> 24 & 255;
tmp2 = n2 >> 24 & 255;
if(tmp1 != tmp2) if(_$UInt_UInt_$Impl_$.gt(tmp1,tmp2)) return 1; else return -1; else {
tmp1 = n1 >> 16 & 255;
tmp2 = n2 >> 16 & 255;
if(tmp1 != tmp2) if(_$UInt_UInt_$Impl_$.gt(tmp1,tmp2)) return 1; else return -1; else {
tmp1 = n1 >> 8 & 255;
tmp2 = n2 >> 8 & 255;
if(tmp1 != tmp2) if(_$UInt_UInt_$Impl_$.gt(tmp1,tmp2)) return 1; else return -1; else {
tmp1 = n1 & 255;
tmp2 = n2 & 255;
if(tmp1 != tmp2) if(_$UInt_UInt_$Impl_$.gt(tmp1,tmp2)) return 1; else return -1; else return 0;
}
}
}
};
var lime_graphics_utils__$ImageDataUtil_ImageDataView = function(image,rect) {
this.image = image;
if(rect == null) this.rect = image.get_rect(); else {
if(rect.x < 0) rect.x = 0;
if(rect.y < 0) rect.y = 0;
if(rect.x + rect.width > image.width) rect.width = image.width - rect.x;
if(rect.y + rect.height > image.height) rect.height = image.height - rect.y;
if(rect.width < 0) rect.width = 0;
if(rect.height < 0) rect.height = 0;
this.rect = rect;
}
this.stride = image.buffer.get_stride();
this.x = Math.ceil(this.rect.x);
this.y = Math.ceil(this.rect.y);
this.width = Math.floor(this.rect.width);
this.height = Math.floor(this.rect.height);
this.offset = this.stride * (this.y + image.offsetY) + (this.x + image.offsetX) * 4;
};
$hxClasses["lime.graphics.utils._ImageDataUtil.ImageDataView"] = lime_graphics_utils__$ImageDataUtil_ImageDataView;
lime_graphics_utils__$ImageDataUtil_ImageDataView.__name__ = ["lime","graphics","utils","_ImageDataUtil","ImageDataView"];
lime_graphics_utils__$ImageDataUtil_ImageDataView.prototype = {
x: null
,y: null
,height: null
,width: null
,image: null
,offset: null
,rect: null
,stride: null
,clip: function(x,y,width,height) {
this.rect.__contract(x,y,width,height);
this.x = Math.ceil(this.rect.x);
this.y = Math.ceil(this.rect.y);
this.width = Math.floor(this.rect.width);
this.height = Math.floor(this.rect.height);
this.offset = this.stride * (this.y + this.image.offsetY) + (this.x + this.image.offsetX) * 4;
}
,row: function(y) {
return this.offset + this.stride * y;
}
,__class__: lime_graphics_utils__$ImageDataUtil_ImageDataView
};
var lime_math__$ColorMatrix_ColorMatrix_$Impl_$ = {};
$hxClasses["lime.math._ColorMatrix.ColorMatrix_Impl_"] = lime_math__$ColorMatrix_ColorMatrix_$Impl_$;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__name__ = ["lime","math","_ColorMatrix","ColorMatrix_Impl_"];
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__properties__ = {set_redOffset:"set_redOffset",get_redOffset:"get_redOffset",set_redMultiplier:"set_redMultiplier",get_redMultiplier:"get_redMultiplier",set_greenOffset:"set_greenOffset",get_greenOffset:"get_greenOffset",set_greenMultiplier:"set_greenMultiplier",get_greenMultiplier:"get_greenMultiplier",set_color:"set_color",get_color:"get_color",set_blueOffset:"set_blueOffset",get_blueOffset:"get_blueOffset",set_blueMultiplier:"set_blueMultiplier",get_blueMultiplier:"get_blueMultiplier",set_alphaOffset:"set_alphaOffset",get_alphaOffset:"get_alphaOffset",set_alphaMultiplier:"set_alphaMultiplier",get_alphaMultiplier:"get_alphaMultiplier"}
lime_math__$ColorMatrix_ColorMatrix_$Impl_$._new = function(data) {
var this1;
if(data != null && data.length == 20) this1 = data; else {
var array = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__identity;
var this2;
if(array != null) this2 = new Float32Array(array); else this2 = null;
this1 = this2;
}
return this1;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.clone = function(this1) {
return lime_math__$ColorMatrix_ColorMatrix_$Impl_$._new((function($this) {
var $r;
var this2;
if(this1 != null) this2 = new Float32Array(this1); else this2 = null;
$r = this2;
return $r;
}(this)));
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.concat = function(this1,second) {
var _g = this1;
_g[0] = _g[0] + second[0];
var _g1 = this1;
_g1[6] = _g1[6] + second[6];
var _g2 = this1;
_g2[12] = _g2[12] + second[12];
var _g3 = this1;
_g3[18] = _g3[18] + second[18];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.copyFrom = function(this1,other) {
this1.set(other);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.identity = function(this1) {
this1[0] = 1;
this1[1] = 0;
this1[2] = 0;
this1[3] = 0;
this1[4] = 0;
this1[5] = 0;
this1[6] = 1;
this1[7] = 0;
this1[8] = 0;
this1[9] = 0;
this1[10] = 0;
this1[11] = 0;
this1[12] = 1;
this1[13] = 0;
this1[14] = 0;
this1[15] = 0;
this1[16] = 0;
this1[17] = 0;
this1[18] = 1;
this1[19] = 0;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable = function(this1) {
if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable == null) {
var this2;
this2 = new Uint8Array(256);
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable = this2;
}
var value;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable[0] = 0;
var _g = 1;
while(_g < 256) {
var i = _g++;
value = Math.floor(i * this1[18] + this1[19] * 255);
if(value > 255) value = 255;
if(value < 0) value = 0;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable[i] = value;
}
return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable = function(this1) {
if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable == null) {
var this2;
this2 = new Uint8Array(256);
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable = this2;
}
var value;
var _g = 0;
while(_g < 256) {
var i = _g++;
value = Math.floor(i * this1[12] + this1[14] * 255);
if(value > 255) value = 255;
if(value < 0) value = 0;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable[i] = value;
}
return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable = function(this1) {
if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable == null) {
var this2;
this2 = new Uint8Array(256);
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable = this2;
}
var value;
var _g = 0;
while(_g < 256) {
var i = _g++;
value = Math.floor(i * this1[6] + this1[9] * 255);
if(value > 255) value = 255;
if(value < 0) value = 0;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable[i] = value;
}
return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable = function(this1) {
if(lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable == null) {
var this2;
this2 = new Uint8Array(256);
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable = this2;
}
var value;
var _g = 0;
while(_g < 256) {
var i = _g++;
value = Math.floor(i * this1[0] + this1[4] * 255);
if(value > 255) value = 255;
if(value < 0) value = 0;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable[i] = value;
}
return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform = function(this1) {
return null;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_alphaMultiplier = function(this1) {
return this1[18];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_alphaMultiplier = function(this1,value) {
return this1[18] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_alphaOffset = function(this1) {
return this1[19] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_alphaOffset = function(this1,value) {
return this1[19] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_blueMultiplier = function(this1) {
return this1[12];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_blueMultiplier = function(this1,value) {
return this1[12] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_blueOffset = function(this1) {
return this1[14] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_blueOffset = function(this1,value) {
return this1[14] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_color = function(this1) {
return (this1[4] * 255 | 0) << 16 | (this1[9] * 255 | 0) << 8 | (this1[14] * 255 | 0);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_color = function(this1,value) {
this1[4] = (value >> 16 & 255) / 255;
this1[9] = (value >> 8 & 255) / 255;
this1[14] = (value & 255) / 255;
this1[0] = 0;
this1[6] = 0;
this1[12] = 0;
return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_color(this1);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_greenMultiplier = function(this1) {
return this1[6];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_greenMultiplier = function(this1,value) {
return this1[6] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_greenOffset = function(this1) {
return this1[9] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_greenOffset = function(this1,value) {
return this1[9] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_redMultiplier = function(this1) {
return this1[0];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_redMultiplier = function(this1,value) {
return this1[0] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_redOffset = function(this1) {
return this1[4] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_redOffset = function(this1,value) {
return this1[4] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get = function(this1,index) {
return this1[index];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set = function(this1,index,value) {
return this1[index] = value;
};
var lime_math_Matrix3 = function(a,b,c,d,tx,ty) {
if(ty == null) ty = 0;
if(tx == null) tx = 0;
if(d == null) d = 1;
if(c == null) c = 0;
if(b == null) b = 0;
if(a == null) a = 1;
this.a = a;
this.b = b;
this.c = c;
this.d = d;
this.tx = tx;
this.ty = ty;
};
$hxClasses["lime.math.Matrix3"] = lime_math_Matrix3;
lime_math_Matrix3.__name__ = ["lime","math","Matrix3"];
lime_math_Matrix3.prototype = {
a: null
,b: null
,c: null
,d: null
,tx: null
,ty: null
,clone: function() {
return new lime_math_Matrix3(this.a,this.b,this.c,this.d,this.tx,this.ty);
}
,concat: function(m) {
var a1 = this.a * m.a + this.b * m.c;
this.b = this.a * m.b + this.b * m.d;
this.a = a1;
var c1 = this.c * m.a + this.d * m.c;
this.d = this.c * m.b + this.d * m.d;
this.c = c1;
var tx1 = this.tx * m.a + this.ty * m.c + m.tx;
this.ty = this.tx * m.b + this.ty * m.d + m.ty;
this.tx = tx1;
}
,copyColumnFrom: function(column,vector4) {
if(column > 2) throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)"); else if(column == 0) {
this.a = vector4.x;
this.c = vector4.y;
} else if(column == 1) {
this.b = vector4.x;
this.d = vector4.y;
} else {
this.tx = vector4.x;
this.ty = vector4.y;
}
}
,copyColumnTo: function(column,vector4) {
if(column > 2) throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)"); else if(column == 0) {
vector4.x = this.a;
vector4.y = this.c;
vector4.z = 0;
} else if(column == 1) {
vector4.x = this.b;
vector4.y = this.d;
vector4.z = 0;
} else {
vector4.x = this.tx;
vector4.y = this.ty;
vector4.z = 1;
}
}
,copyFrom: function(sourceMatrix3) {
this.a = sourceMatrix3.a;
this.b = sourceMatrix3.b;
this.c = sourceMatrix3.c;
this.d = sourceMatrix3.d;
this.tx = sourceMatrix3.tx;
this.ty = sourceMatrix3.ty;
}
,copyRowFrom: function(row,vector4) {
if(row > 2) throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)"); else if(row == 0) {
this.a = vector4.x;
this.c = vector4.y;
} else if(row == 1) {
this.b = vector4.x;
this.d = vector4.y;
} else {
this.tx = vector4.x;
this.ty = vector4.y;
}
}
,copyRowTo: function(row,vector4) {
if(row > 2) throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)"); else if(row == 0) {
vector4.x = this.a;
vector4.y = this.b;
vector4.z = this.tx;
} else if(row == 1) {
vector4.x = this.c;
vector4.y = this.d;
vector4.z = this.ty;
} else {
vector4.x = 0;
vector4.y = 0;
vector4.z = 1;
}
}
,createBox: function(scaleX,scaleY,rotation,tx,ty) {
if(ty == null) ty = 0;
if(tx == null) tx = 0;
if(rotation == null) rotation = 0;
this.a = scaleX;
this.d = scaleY;
this.b = rotation;
this.tx = tx;
this.ty = ty;
}
,createGradientBox: function(width,height,rotation,tx,ty) {
if(ty == null) ty = 0;
if(tx == null) tx = 0;
if(rotation == null) rotation = 0;
this.a = width / 1638.4;
this.d = height / 1638.4;
if(rotation != 0) {
var cos = Math.cos(rotation);
var sin = Math.sin(rotation);
this.b = sin * this.d;
this.c = -sin * this.a;
this.a *= cos;
this.d *= cos;
} else {
this.b = 0;
this.c = 0;
}
this.tx = tx + width / 2;
this.ty = ty + height / 2;
}
,equals: function(Matrix3) {
return Matrix3 != null && this.tx == Matrix3.tx && this.ty == Matrix3.ty && this.a == Matrix3.a && this.b == Matrix3.b && this.c == Matrix3.c && this.d == Matrix3.d;
}
,deltaTransformVector2: function(Vector2) {
return new lime_math_Vector2(Vector2.x * this.a + Vector2.y * this.c,Vector2.x * this.b + Vector2.y * this.d);
}
,identity: function() {
this.a = 1;
this.b = 0;
this.c = 0;
this.d = 1;
this.tx = 0;
this.ty = 0;
}
,invert: function() {
var norm = this.a * this.d - this.b * this.c;
if(norm == 0) {
this.a = this.b = this.c = this.d = 0;
this.tx = -this.tx;
this.ty = -this.ty;
} else {
norm = 1.0 / norm;
var a1 = this.d * norm;
this.d = this.a * norm;
this.a = a1;
this.b *= -norm;
this.c *= -norm;
var tx1 = -this.a * this.tx - this.c * this.ty;
this.ty = -this.b * this.tx - this.d * this.ty;
this.tx = tx1;
}
return this;
}
,mult: function(m) {
var result = new lime_math_Matrix3(this.a,this.b,this.c,this.d,this.tx,this.ty);
result.concat(m);
return result;
}
,rotate: function(theta) {
var cos = Math.cos(theta);
var sin = Math.sin(theta);
var a1 = this.a * cos - this.b * sin;
this.b = this.a * sin + this.b * cos;
this.a = a1;
var c1 = this.c * cos - this.d * sin;
this.d = this.c * sin + this.d * cos;
this.c = c1;
var tx1 = this.tx * cos - this.ty * sin;
this.ty = this.tx * sin + this.ty * cos;
this.tx = tx1;
}
,scale: function(sx,sy) {
this.a *= sx;
this.b *= sy;
this.c *= sx;
this.d *= sy;
this.tx *= sx;
this.ty *= sy;
}
,setRotation: function(theta,scale) {
if(scale == null) scale = 1;
this.a = Math.cos(theta) * scale;
this.c = Math.sin(theta) * scale;
this.b = -this.c;
this.d = this.a;
}
,setTo: function(a,b,c,d,tx,ty) {
this.a = a;
this.b = b;
this.c = c;
this.d = d;
this.tx = tx;
this.ty = ty;
}
,to3DString: function(roundPixels) {
if(roundPixels == null) roundPixels = false;
if(roundPixels) return "Matrix33d(" + this.a + ", " + this.b + ", " + "0, 0, " + this.c + ", " + this.d + ", " + "0, 0, 0, 0, 1, 0, " + (this.tx | 0) + ", " + (this.ty | 0) + ", 0, 1)"; else return "Matrix33d(" + this.a + ", " + this.b + ", " + "0, 0, " + this.c + ", " + this.d + ", " + "0, 0, 0, 0, 1, 0, " + this.tx + ", " + this.ty + ", 0, 1)";
}
,toMozString: function() {
return "Matrix3(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + "px, " + this.ty + "px)";
}
,toString: function() {
return "Matrix3(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + ", " + this.ty + ")";
}
,transformVector2: function(pos) {
return new lime_math_Vector2(pos.x * this.a + pos.y * this.c + this.tx,pos.x * this.b + pos.y * this.d + this.ty);
}
,translate: function(dx,dy) {
this.tx += dx;
this.ty += dy;
}
,__cleanValues: function() {
this.a = Math.round(this.a * 1000) / 1000;
this.b = Math.round(this.b * 1000) / 1000;
this.c = Math.round(this.c * 1000) / 1000;
this.d = Math.round(this.d * 1000) / 1000;
this.tx = Math.round(this.tx * 10) / 10;
this.ty = Math.round(this.ty * 10) / 10;
}
,__transformX: function(pos) {
return pos.x * this.a + pos.y * this.c + this.tx;
}
,__transformY: function(pos) {
return pos.x * this.b + pos.y * this.d + this.ty;
}
,__translateTransformed: function(pos) {
this.tx = pos.x * this.a + pos.y * this.c + this.tx;
this.ty = pos.x * this.b + pos.y * this.d + this.ty;
}
,__class__: lime_math_Matrix3
};
var lime_math__$Matrix4_Matrix4_$Impl_$ = {};
$hxClasses["lime.math._Matrix4.Matrix4_Impl_"] = lime_math__$Matrix4_Matrix4_$Impl_$;
lime_math__$Matrix4_Matrix4_$Impl_$.__name__ = ["lime","math","_Matrix4","Matrix4_Impl_"];
lime_math__$Matrix4_Matrix4_$Impl_$.__properties__ = {set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}
lime_math__$Matrix4_Matrix4_$Impl_$._new = function(data) {
var this1;
if(data != null && data.length == 16) this1 = data; else {
var array = lime_math__$Matrix4_Matrix4_$Impl_$.__identity;
var this2;
if(array != null) this2 = new Float32Array(array); else this2 = null;
this1 = this2;
}
return this1;
};
lime_math__$Matrix4_Matrix4_$Impl_$.append = function(this1,lhs) {
var m111 = this1[0];
var m121 = this1[4];
var m131 = this1[8];
var m141 = this1[12];
var m112 = this1[1];
var m122 = this1[5];
var m132 = this1[9];
var m142 = this1[13];
var m113 = this1[2];
var m123 = this1[6];
var m133 = this1[10];
var m143 = this1[14];
var m114 = this1[3];
var m124 = this1[7];
var m134 = this1[11];
var m144 = this1[15];
var m211 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,0);
var m221 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,4);
var m231 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,8);
var m241 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,12);
var m212 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,1);
var m222 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,5);
var m232 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,9);
var m242 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,13);
var m213 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,2);
var m223 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,6);
var m233 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,10);
var m243 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,14);
var m214 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,3);
var m224 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,7);
var m234 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,11);
var m244 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,15);
this1[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
this1[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
this1[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
this1[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
this1[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
this1[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
this1[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
this1[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
this1[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
this1[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
this1[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
this1[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
this1[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
this1[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
this1[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
this1[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendRotation = function(this1,degrees,axis,pivotPoint) {
var m = lime_math__$Matrix4_Matrix4_$Impl_$.__getAxisRotation(this1,axis.x,axis.y,axis.z,degrees);
if(pivotPoint != null) {
var p = pivotPoint;
lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation(m,p.x,p.y,p.z);
}
lime_math__$Matrix4_Matrix4_$Impl_$.append(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendScale = function(this1,xScale,yScale,zScale) {
lime_math__$Matrix4_Matrix4_$Impl_$.append(this1,lime_math__$Matrix4_Matrix4_$Impl_$._new((function($this) {
var $r;
var array = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
var this2;
if(array != null) this2 = new Float32Array(array); else this2 = null;
$r = this2;
return $r;
}(this))));
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation = function(this1,x,y,z) {
this1[12] = this1[12] + x;
this1[13] = this1[13] + y;
this1[14] = this1[14] + z;
};
lime_math__$Matrix4_Matrix4_$Impl_$.clone = function(this1) {
return lime_math__$Matrix4_Matrix4_$Impl_$._new((function($this) {
var $r;
var this2;
if(this1 != null) this2 = new Float32Array(this1); else this2 = null;
$r = this2;
return $r;
}(this)));
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyColumnFrom = function(this1,column,vector) {
switch(column) {
case 0:
this1[0] = vector.x;
this1[1] = vector.y;
this1[2] = vector.z;
this1[3] = vector.w;
break;
case 1:
this1[4] = vector.x;
this1[5] = vector.y;
this1[6] = vector.z;
this1[7] = vector.w;
break;
case 2:
this1[8] = vector.x;
this1[9] = vector.y;
this1[10] = vector.z;
this1[11] = vector.w;
break;
case 3:
this1[12] = vector.x;
this1[13] = vector.y;
this1[14] = vector.z;
this1[15] = vector.w;
break;
default:
lime_utils_Log.error("Column " + column + " out of bounds [0, ..., 3]",{ fileName : "Matrix4.hx", lineNumber : 139, className : "lime.math._Matrix4.Matrix4_Impl_", methodName : "copyColumnFrom"});
}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyColumnTo = function(this1,column,vector) {
switch(column) {
case 0:
vector.x = this1[0];
vector.y = this1[1];
vector.z = this1[2];
vector.w = this1[3];
break;
case 1:
vector.x = this1[4];
vector.y = this1[5];
vector.z = this1[6];
vector.w = this1[7];
break;
case 2:
vector.x = this1[8];
vector.y = this1[9];
vector.z = this1[10];
vector.w = this1[11];
break;
case 3:
vector.x = this1[12];
vector.y = this1[13];
vector.z = this1[14];
vector.w = this1[15];
break;
default:
lime_utils_Log.error("Column " + column + " out of bounds [0, ..., 3]",{ fileName : "Matrix4.hx", lineNumber : 180, className : "lime.math._Matrix4.Matrix4_Impl_", methodName : "copyColumnTo"});
}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyFrom = function(this1,other) {
this1.set(other);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copythisFrom = function(this1,array,index,transposeValues) {
if(transposeValues == null) transposeValues = false;
if(index == null) index = 0;
if(transposeValues) lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
var l = array.length - index;
var _g = 0;
while(_g < l) {
var c = _g++;
this1[c] = array[c + index];
}
if(transposeValues) lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copythisTo = function(this1,array,index,transposeValues) {
if(transposeValues == null) transposeValues = false;
if(index == null) index = 0;
if(transposeValues) lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
var l = this1.length;
var _g = 0;
while(_g < l) {
var c = _g++;
array[c + index] = this1[c];
}
if(transposeValues) lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyRowFrom = function(this1,row,vector) {
switch(row) {
case 0:
this1[0] = vector.x;
this1[4] = vector.y;
this1[8] = vector.z;
this1[12] = vector.w;
break;
case 1:
this1[1] = vector.x;
this1[5] = vector.y;
this1[9] = vector.z;
this1[13] = vector.w;
break;
case 2:
this1[2] = vector.x;
this1[6] = vector.y;
this1[10] = vector.z;
this1[14] = vector.w;
break;
case 3:
this1[3] = vector.x;
this1[7] = vector.y;
this1[11] = vector.z;
this1[15] = vector.w;
break;
default:
lime_utils_Log.error("Row " + row + " out of bounds [0, ..., 3]",{ fileName : "Matrix4.hx", lineNumber : 258, className : "lime.math._Matrix4.Matrix4_Impl_", methodName : "copyRowFrom"});
}
};
lime_math__$Matrix4_Matrix4_$Impl_$.create2D = function(x,y,scale,rotation) {
if(rotation == null) rotation = 0;
if(scale == null) scale = 1;
var theta = rotation * Math.PI / 180.0;
var c = Math.cos(theta);
var s = Math.sin(theta);
return lime_math__$Matrix4_Matrix4_$Impl_$._new((function($this) {
var $r;
var array = [c * scale,-s * scale,0,0,s * scale,c * scale,0,0,0,0,1,0,x,y,0,1];
var this1;
if(array != null) this1 = new Float32Array(array); else this1 = null;
$r = this1;
return $r;
}(this)));
};
lime_math__$Matrix4_Matrix4_$Impl_$.createABCD = function(a,b,c,d,tx,ty,matrix) {
if(matrix == null) matrix = lime_math__$Matrix4_Matrix4_$Impl_$._new();
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,0,a);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,1,b);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,2,0);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,3,0);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,4,c);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,5,d);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,6,0);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,7,0);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,8,0);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,9,0);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,10,1);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,11,0);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,12,tx);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,13,ty);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,14,0);
lime_math__$Matrix4_Matrix4_$Impl_$.set(matrix,15,1);
return matrix;
};
lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho = function(x0,x1,y0,y1,zNear,zFar) {
var sx = 1.0 / (x1 - x0);
var sy = 1.0 / (y1 - y0);
var sz = 1.0 / (zFar - zNear);
return lime_math__$Matrix4_Matrix4_$Impl_$._new((function($this) {
var $r;
var array = [2.0 * sx,0,0,0,0,2.0 * sy,0,0,0,0,-2. * sz,0,-(x0 + x1) * sx,-(y0 + y1) * sy,-(zNear + zFar) * sz,1];
var this1;
if(array != null) this1 = new Float32Array(array); else this1 = null;
$r = this1;
return $r;
}(this)));
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyRowTo = function(this1,row,vector) {
switch(row) {
case 0:
vector.x = this1[0];
vector.y = this1[4];
vector.z = this1[8];
vector.w = this1[12];
break;
case 1:
vector.x = this1[1];
vector.y = this1[5];
vector.z = this1[9];
vector.w = this1[13];
break;
case 2:
vector.x = this1[2];
vector.y = this1[6];
vector.z = this1[10];
vector.w = this1[14];
break;
case 3:
vector.x = this1[3];
vector.y = this1[7];
vector.z = this1[11];
vector.w = this1[15];
break;
default:
lime_utils_Log.error("Row " + row + " out of bounds [0, ..., 3]",{ fileName : "Matrix4.hx", lineNumber : 360, className : "lime.math._Matrix4.Matrix4_Impl_", methodName : "copyRowTo"});
}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyToMatrix4 = function(this1,other) {
(js_Boot.__cast(other , Float32Array)).set(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.deltaTransformVector = function(this1,v) {
var x = v.x;
var y = v.y;
var z = v.z;
return new lime_math_Vector4(x * this1[0] + y * this1[4] + z * this1[8] + this1[3],x * this1[1] + y * this1[5] + z * this1[9] + this1[7],x * this1[2] + y * this1[6] + z * this1[10] + this1[11],0);
};
lime_math__$Matrix4_Matrix4_$Impl_$.identity = function(this1) {
this1[0] = 1;
this1[1] = 0;
this1[2] = 0;
this1[3] = 0;
this1[4] = 0;
this1[5] = 1;
this1[6] = 0;
this1[7] = 0;
this1[8] = 0;
this1[9] = 0;
this1[10] = 1;
this1[11] = 0;
this1[12] = 0;
this1[13] = 0;
this1[14] = 0;
this1[15] = 1;
};
lime_math__$Matrix4_Matrix4_$Impl_$.interpolate = function(thisMat,toMat,percent) {
var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
var _g = 0;
while(_g < 16) {
var i = _g++;
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,i,lime_math__$Matrix4_Matrix4_$Impl_$.get(thisMat,i) + (lime_math__$Matrix4_Matrix4_$Impl_$.get(toMat,i) - lime_math__$Matrix4_Matrix4_$Impl_$.get(thisMat,i)) * percent);
}
return m;
};
lime_math__$Matrix4_Matrix4_$Impl_$.interpolateTo = function(this1,toMat,percent) {
var _g = 0;
while(_g < 16) {
var i = _g++;
var val = this1[i] + (lime_math__$Matrix4_Matrix4_$Impl_$.get(toMat,i) - this1[i]) * percent;
this1[i] = val;
}
};
lime_math__$Matrix4_Matrix4_$Impl_$.invert = function(this1) {
var d = lime_math__$Matrix4_Matrix4_$Impl_$.get_determinant(this1);
var invertable = Math.abs(d) > 0.00000000001;
if(invertable) {
d = 1 / d;
var m11 = this1[0];
var m21 = this1[4];
var m31 = this1[8];
var m41 = this1[12];
var m12 = this1[1];
var m22 = this1[5];
var m32 = this1[9];
var m42 = this1[13];
var m13 = this1[2];
var m23 = this1[6];
var m33 = this1[10];
var m43 = this1[14];
var m14 = this1[3];
var m24 = this1[7];
var m34 = this1[11];
var m44 = this1[15];
this1[0] = d * (m22 * (m33 * m44 - m43 * m34) - m32 * (m23 * m44 - m43 * m24) + m42 * (m23 * m34 - m33 * m24));
this1[1] = -d * (m12 * (m33 * m44 - m43 * m34) - m32 * (m13 * m44 - m43 * m14) + m42 * (m13 * m34 - m33 * m14));
this1[2] = d * (m12 * (m23 * m44 - m43 * m24) - m22 * (m13 * m44 - m43 * m14) + m42 * (m13 * m24 - m23 * m14));
this1[3] = -d * (m12 * (m23 * m34 - m33 * m24) - m22 * (m13 * m34 - m33 * m14) + m32 * (m13 * m24 - m23 * m14));
this1[4] = -d * (m21 * (m33 * m44 - m43 * m34) - m31 * (m23 * m44 - m43 * m24) + m41 * (m23 * m34 - m33 * m24));
this1[5] = d * (m11 * (m33 * m44 - m43 * m34) - m31 * (m13 * m44 - m43 * m14) + m41 * (m13 * m34 - m33 * m14));
this1[6] = -d * (m11 * (m23 * m44 - m43 * m24) - m21 * (m13 * m44 - m43 * m14) + m41 * (m13 * m24 - m23 * m14));
this1[7] = d * (m11 * (m23 * m34 - m33 * m24) - m21 * (m13 * m34 - m33 * m14) + m31 * (m13 * m24 - m23 * m14));
this1[8] = d * (m21 * (m32 * m44 - m42 * m34) - m31 * (m22 * m44 - m42 * m24) + m41 * (m22 * m34 - m32 * m24));
this1[9] = -d * (m11 * (m32 * m44 - m42 * m34) - m31 * (m12 * m44 - m42 * m14) + m41 * (m12 * m34 - m32 * m14));
this1[10] = d * (m11 * (m22 * m44 - m42 * m24) - m21 * (m12 * m44 - m42 * m14) + m41 * (m12 * m24 - m22 * m14));
this1[11] = -d * (m11 * (m22 * m34 - m32 * m24) - m21 * (m12 * m34 - m32 * m14) + m31 * (m12 * m24 - m22 * m14));
this1[12] = -d * (m21 * (m32 * m43 - m42 * m33) - m31 * (m22 * m43 - m42 * m23) + m41 * (m22 * m33 - m32 * m23));
this1[13] = d * (m11 * (m32 * m43 - m42 * m33) - m31 * (m12 * m43 - m42 * m13) + m41 * (m12 * m33 - m32 * m13));
this1[14] = -d * (m11 * (m22 * m43 - m42 * m23) - m21 * (m12 * m43 - m42 * m13) + m41 * (m12 * m23 - m22 * m13));
this1[15] = d * (m11 * (m22 * m33 - m32 * m23) - m21 * (m12 * m33 - m32 * m13) + m31 * (m12 * m23 - m22 * m13));
}
return invertable;
};
lime_math__$Matrix4_Matrix4_$Impl_$.pointAt = function(this1,pos,at,up) {
if(at == null) at = new lime_math_Vector4(0,0,-1);
if(up == null) up = new lime_math_Vector4(0,-1,0);
var dir = new lime_math_Vector4(at.x - pos.x,at.y - pos.y,at.z - pos.z);
var vup = new lime_math_Vector4(up.x,up.y,up.z,up.w);
var right;
dir.normalize();
vup.normalize();
var dir2 = new lime_math_Vector4(dir.x,dir.y,dir.z,dir.w);
dir2.scaleBy(vup.x * dir.x + vup.y * dir.y + vup.z * dir.z);
vup = new lime_math_Vector4(vup.x - dir2.x,vup.y - dir2.y,vup.z - dir2.z);
if(Math.sqrt(vup.x * vup.x + vup.y * vup.y + vup.z * vup.z) > 0) vup.normalize(); else if(dir.x != 0) vup = new lime_math_Vector4(-dir.y,dir.x,0); else vup = new lime_math_Vector4(1,0,0);
right = new lime_math_Vector4(vup.y * dir.z - vup.z * dir.y,vup.z * dir.x - vup.x * dir.z,vup.x * dir.y - vup.y * dir.x,1);
right.normalize();
this1[0] = right.x;
this1[4] = right.y;
this1[8] = right.z;
this1[12] = 0.0;
this1[1] = vup.x;
this1[5] = vup.y;
this1[9] = vup.z;
this1[13] = 0.0;
this1[2] = dir.x;
this1[6] = dir.y;
this1[10] = dir.z;
this1[14] = 0.0;
this1[3] = pos.x;
this1[7] = pos.y;
this1[11] = pos.z;
this1[15] = 1.0;
};
lime_math__$Matrix4_Matrix4_$Impl_$.prepend = function(this1,rhs) {
var m111 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,0);
var m121 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,4);
var m131 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,8);
var m141 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,12);
var m112 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,1);
var m122 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,5);
var m132 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,9);
var m142 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,13);
var m113 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,2);
var m123 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,6);
var m133 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,10);
var m143 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,14);
var m114 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,3);
var m124 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,7);
var m134 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,11);
var m144 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,15);
var m211 = this1[0];
var m221 = this1[4];
var m231 = this1[8];
var m241 = this1[12];
var m212 = this1[1];
var m222 = this1[5];
var m232 = this1[9];
var m242 = this1[13];
var m213 = this1[2];
var m223 = this1[6];
var m233 = this1[10];
var m243 = this1[14];
var m214 = this1[3];
var m224 = this1[7];
var m234 = this1[11];
var m244 = this1[15];
this1[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
this1[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
this1[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
this1[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
this1[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
this1[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
this1[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
this1[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
this1[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
this1[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
this1[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
this1[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
this1[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
this1[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
this1[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
this1[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependRotation = function(this1,degrees,axis,pivotPoint) {
var m = lime_math__$Matrix4_Matrix4_$Impl_$.__getAxisRotation(this1,axis.x,axis.y,axis.z,degrees);
if(pivotPoint != null) {
var p = pivotPoint;
lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation(m,p.x,p.y,p.z);
}
lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependScale = function(this1,xScale,yScale,zScale) {
lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,lime_math__$Matrix4_Matrix4_$Impl_$._new((function($this) {
var $r;
var array = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
var this2;
if(array != null) this2 = new Float32Array(array); else this2 = null;
$r = this2;
return $r;
}(this))));
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependTranslation = function(this1,x,y,z) {
var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
lime_math__$Matrix4_Matrix4_$Impl_$.set_position(m,new lime_math_Vector4(x,y,z));
lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.transformVector = function(this1,v) {
var x = v.x;
var y = v.y;
var z = v.z;
return new lime_math_Vector4(x * this1[0] + y * this1[4] + z * this1[8] + this1[12],x * this1[1] + y * this1[5] + z * this1[9] + this1[13],x * this1[2] + y * this1[6] + z * this1[10] + this1[14],x * this1[3] + y * this1[7] + z * this1[11] + this1[15]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.transformVectors = function(this1,ain,aout) {
var i = 0;
var x;
var y;
var z;
while(i + 3 <= ain.length) {
x = ain[i];
y = ain[i + 1];
z = ain[i + 2];
aout[i] = x * this1[0] + y * this1[4] + z * this1[8] + this1[12];
aout[i + 1] = x * this1[1] + y * this1[5] + z * this1[9] + this1[13];
aout[i + 2] = x * this1[2] + y * this1[6] + z * this1[10] + this1[14];
i += 3;
}
};
lime_math__$Matrix4_Matrix4_$Impl_$.transpose = function(this1) {
var temp = this1[1];
this1[1] = this1[4];
this1[4] = temp;
var temp1 = this1[2];
this1[2] = this1[8];
this1[8] = temp1;
var temp2 = this1[3];
this1[3] = this1[12];
this1[12] = temp2;
var temp3 = this1[6];
this1[6] = this1[9];
this1[9] = temp3;
var temp4 = this1[7];
this1[7] = this1[13];
this1[13] = temp4;
var temp5 = this1[11];
this1[11] = this1[14];
this1[14] = temp5;
};
lime_math__$Matrix4_Matrix4_$Impl_$.__getAxisRotation = function(this1,x,y,z,degrees) {
var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
var a1 = new lime_math_Vector4(x,y,z);
var rad = -degrees * (Math.PI / 180);
var c = Math.cos(rad);
var s = Math.sin(rad);
var t = 1.0 - c;
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,0,c + a1.x * a1.x * t);
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,5,c + a1.y * a1.y * t);
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,10,c + a1.z * a1.z * t);
var tmp1 = a1.x * a1.y * t;
var tmp2 = a1.z * s;
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,4,tmp1 + tmp2);
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,1,tmp1 - tmp2);
tmp1 = a1.x * a1.z * t;
tmp2 = a1.y * s;
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,8,tmp1 - tmp2);
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,2,tmp1 + tmp2);
tmp1 = a1.y * a1.z * t;
tmp2 = a1.x * s;
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,9,tmp1 + tmp2);
lime_math__$Matrix4_Matrix4_$Impl_$.set(m,6,tmp1 - tmp2);
return m;
};
lime_math__$Matrix4_Matrix4_$Impl_$.__swap = function(this1,a,b) {
var temp = this1[a];
this1[a] = this1[b];
this1[b] = temp;
};
lime_math__$Matrix4_Matrix4_$Impl_$.get_determinant = function(this1) {
return (this1[0] * this1[5] - this1[4] * this1[1]) * (this1[10] * this1[15] - this1[14] * this1[11]) - (this1[0] * this1[9] - this1[8] * this1[1]) * (this1[6] * this1[15] - this1[14] * this1[7]) + (this1[0] * this1[13] - this1[12] * this1[1]) * (this1[6] * this1[11] - this1[10] * this1[7]) + (this1[4] * this1[9] - this1[8] * this1[5]) * (this1[2] * this1[15] - this1[14] * this1[3]) - (this1[4] * this1[13] - this1[12] * this1[5]) * (this1[2] * this1[11] - this1[10] * this1[3]) + (this1[8] * this1[13] - this1[12] * this1[9]) * (this1[2] * this1[7] - this1[6] * this1[3]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.get_position = function(this1) {
return new lime_math_Vector4(this1[12],this1[13],this1[14]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.set_position = function(this1,val) {
this1[12] = val.x;
this1[13] = val.y;
this1[14] = val.z;
return val;
};
lime_math__$Matrix4_Matrix4_$Impl_$.get = function(this1,index) {
return this1[index];
};
lime_math__$Matrix4_Matrix4_$Impl_$.set = function(this1,index,value) {
this1[index] = value;
return value;
};
var lime_math_Rectangle = function(x,y,width,height) {
if(height == null) height = 0;
if(width == null) width = 0;
if(y == null) y = 0;
if(x == null) x = 0;
this.x = x;
this.y = y;
this.width = width;
this.height = height;
};
$hxClasses["lime.math.Rectangle"] = lime_math_Rectangle;
lime_math_Rectangle.__name__ = ["lime","math","Rectangle"];
lime_math_Rectangle.prototype = {
height: null
,width: null
,x: null
,y: null
,clone: function() {
return new lime_math_Rectangle(this.x,this.y,this.width,this.height);
}
,contains: function(x,y) {
return x >= this.x && y >= this.y && x < this.get_right() && y < this.get_bottom();
}
,containsPoint: function(point) {
return this.contains(point.x,point.y);
}
,containsRect: function(rect) {
if(rect.width <= 0 || rect.height <= 0) return rect.x > this.x && rect.y > this.y && rect.get_right() < this.get_right() && rect.get_bottom() < this.get_bottom(); else return rect.x >= this.x && rect.y >= this.y && rect.get_right() <= this.get_right() && rect.get_bottom() <= this.get_bottom();
}
,copyFrom: function(sourceRect) {
this.x = sourceRect.x;
this.y = sourceRect.y;
this.width = sourceRect.width;
this.height = sourceRect.height;
}
,equals: function(toCompare) {
return toCompare != null && this.x == toCompare.x && this.y == toCompare.y && this.width == toCompare.width && this.height == toCompare.height;
}
,inflate: function(dx,dy) {
this.x -= dx;
this.width += dx * 2;
this.y -= dy;
this.height += dy * 2;
}
,inflatePoint: function(point) {
this.inflate(point.x,point.y);
}
,intersection: function(toIntersect) {
var x0;
if(this.x < toIntersect.x) x0 = toIntersect.x; else x0 = this.x;
var x1;
if(this.get_right() > toIntersect.get_right()) x1 = toIntersect.get_right(); else x1 = this.get_right();
if(x1 <= x0) return new lime_math_Rectangle();
var y0;
if(this.y < toIntersect.y) y0 = toIntersect.y; else y0 = this.y;
var y1;
if(this.get_bottom() > toIntersect.get_bottom()) y1 = toIntersect.get_bottom(); else y1 = this.get_bottom();
if(y1 <= y0) return new lime_math_Rectangle();
return new lime_math_Rectangle(x0,y0,x1 - x0,y1 - y0);
}
,intersects: function(toIntersect) {
var x0;
if(this.x < toIntersect.x) x0 = toIntersect.x; else x0 = this.x;
var x1;
if(this.get_right() > toIntersect.get_right()) x1 = toIntersect.get_right(); else x1 = this.get_right();
if(x1 <= x0) return false;
var y0;
if(this.y < toIntersect.y) y0 = toIntersect.y; else y0 = this.y;
var y1;
if(this.get_bottom() > toIntersect.get_bottom()) y1 = toIntersect.get_bottom(); else y1 = this.get_bottom();
return y1 > y0;
}
,isEmpty: function() {
return this.width <= 0 || this.height <= 0;
}
,offset: function(dx,dy) {
this.x += dx;
this.y += dy;
}
,offsetPoint: function(point) {
this.x += point.x;
this.y += point.y;
}
,setEmpty: function() {
this.x = this.y = this.width = this.height = 0;
}
,setTo: function(xa,ya,widtha,heighta) {
this.x = xa;
this.y = ya;
this.width = widtha;
this.height = heighta;
}
,transform: function(m) {
var tx0 = m.a * this.x + m.c * this.y;
var tx1 = tx0;
var ty0 = m.b * this.x + m.d * this.y;
var ty1 = ty0;
var tx = m.a * (this.x + this.width) + m.c * this.y;
var ty = m.b * (this.x + this.width) + m.d * this.y;
if(tx < tx0) tx0 = tx;
if(ty < ty0) ty0 = ty;
if(tx > tx1) tx1 = tx;
if(ty > ty1) ty1 = ty;
tx = m.a * (this.x + this.width) + m.c * (this.y + this.height);
ty = m.b * (this.x + this.width) + m.d * (this.y + this.height);
if(tx < tx0) tx0 = tx;
if(ty < ty0) ty0 = ty;
if(tx > tx1) tx1 = tx;
if(ty > ty1) ty1 = ty;
tx = m.a * this.x + m.c * (this.y + this.height);
ty = m.b * this.x + m.d * (this.y + this.height);
if(tx < tx0) tx0 = tx;
if(ty < ty0) ty0 = ty;
if(tx > tx1) tx1 = tx;
if(ty > ty1) ty1 = ty;
return new lime_math_Rectangle(tx0 + m.tx,ty0 + m.ty,tx1 - tx0,ty1 - ty0);
}
,union: function(toUnion) {
if(this.width == 0 || this.height == 0) return toUnion.clone(); else if(toUnion.width == 0 || toUnion.height == 0) return this.clone();
var x0;
if(this.x > toUnion.x) x0 = toUnion.x; else x0 = this.x;
var x1;
if(this.get_right() < toUnion.get_right()) x1 = toUnion.get_right(); else x1 = this.get_right();
var y0;
if(this.y > toUnion.y) y0 = toUnion.y; else y0 = this.y;
var y1;
if(this.get_bottom() < toUnion.get_bottom()) y1 = toUnion.get_bottom(); else y1 = this.get_bottom();
return new lime_math_Rectangle(x0,y0,x1 - x0,y1 - y0);
}
,__contract: function(x,y,width,height) {
if(this.width == 0 && this.height == 0) return;
if(this.x < x) this.x = x;
if(this.y < y) this.y = y;
if(this.get_right() > x + width) this.width = x + width - this.x;
if(this.get_bottom() > y + height) this.height = y + height - this.y;
}
,__expand: function(x,y,width,height) {
if(this.width == 0 && this.height == 0) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
return;
}
var cacheRight = this.get_right();
var cacheBottom = this.get_bottom();
if(this.x > x) this.x = x;
if(this.y > y) this.y = y;
if(cacheRight < x + width) this.width = x + width - this.x;
if(cacheBottom < y + height) this.height = y + height - this.y;
}
,__toFlashRectangle: function() {
return null;
}
,get_bottom: function() {
return this.y + this.height;
}
,set_bottom: function(b) {
this.height = b - this.y;
return b;
}
,get_bottomRight: function() {
return new lime_math_Vector2(this.x + this.width,this.y + this.height);
}
,set_bottomRight: function(p) {
this.width = p.x - this.x;
this.height = p.y - this.y;
return p.clone();
}
,get_left: function() {
return this.x;
}
,set_left: function(l) {
this.width -= l - this.x;
this.x = l;
return l;
}
,get_right: function() {
return this.x + this.width;
}
,set_right: function(r) {
this.width = r - this.x;
return r;
}
,get_size: function() {
return new lime_math_Vector2(this.width,this.height);
}
,set_size: function(p) {
this.width = p.x;
this.height = p.y;
return p.clone();
}
,get_top: function() {
return this.y;
}
,set_top: function(t) {
this.height -= t - this.y;
this.y = t;
return t;
}
,get_topLeft: function() {
return new lime_math_Vector2(this.x,this.y);
}
,set_topLeft: function(p) {
this.x = p.x;
this.y = p.y;
return p.clone();
}
,__class__: lime_math_Rectangle
,__properties__: {set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}
};
var lime_math_Vector2 = function(x,y) {
if(y == null) y = 0;
if(x == null) x = 0;
this.x = x;
this.y = y;
};
$hxClasses["lime.math.Vector2"] = lime_math_Vector2;
lime_math_Vector2.__name__ = ["lime","math","Vector2"];
lime_math_Vector2.distance = function(pt1,pt2) {
var dx = pt1.x - pt2.x;
var dy = pt1.y - pt2.y;
return Math.sqrt(dx * dx + dy * dy);
};
lime_math_Vector2.interpolate = function(pt1,pt2,f) {
return new lime_math_Vector2(pt2.x + f * (pt1.x - pt2.x),pt2.y + f * (pt1.y - pt2.y));
};
lime_math_Vector2.polar = function(len,angle) {
return new lime_math_Vector2(len * Math.cos(angle),len * Math.sin(angle));
};
lime_math_Vector2.prototype = {
length: null
,x: null
,y: null
,add: function(v) {
return new lime_math_Vector2(v.x + this.x,v.y + this.y);
}
,clone: function() {
return new lime_math_Vector2(this.x,this.y);
}
,equals: function(toCompare) {
return toCompare != null && toCompare.x == this.x && toCompare.y == this.y;
}
,normalize: function(thickness) {
if(this.x == 0 && this.y == 0) return; else {
var norm = thickness / Math.sqrt(this.x * this.x + this.y * this.y);
this.x *= norm;
this.y *= norm;
}
}
,offset: function(dx,dy) {
this.x += dx;
this.y += dy;
}
,setTo: function(xa,ya) {
this.x = xa;
this.y = ya;
}
,subtract: function(v) {
return new lime_math_Vector2(this.x - v.x,this.y - v.y);
}
,__toFlashPoint: function() {
return null;
}
,get_length: function() {
return Math.sqrt(this.x * this.x + this.y * this.y);
}
,__class__: lime_math_Vector2
,__properties__: {get_length:"get_length"}
};
var lime_math_Vector4 = function(x,y,z,w) {
if(w == null) w = 0.;
if(z == null) z = 0.;
if(y == null) y = 0.;
if(x == null) x = 0.;
this.w = w;
this.x = x;
this.y = y;
this.z = z;
};
$hxClasses["lime.math.Vector4"] = lime_math_Vector4;
lime_math_Vector4.__name__ = ["lime","math","Vector4"];
lime_math_Vector4.__properties__ = {get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"}
lime_math_Vector4.angleBetween = function(a,b) {
var a0 = new lime_math_Vector4(a.x,a.y,a.z,a.w);
a0.normalize();
var b0 = new lime_math_Vector4(b.x,b.y,b.z,b.w);
b0.normalize();
return Math.acos(a0.x * b0.x + a0.y * b0.y + a0.z * b0.z);
};
lime_math_Vector4.distance = function(pt1,pt2) {
var x = pt2.x - pt1.x;
var y = pt2.y - pt1.y;
var z = pt2.z - pt1.z;
return Math.sqrt(x * x + y * y + z * z);
};
lime_math_Vector4.get_X_AXIS = function() {
return new lime_math_Vector4(1,0,0);
};
lime_math_Vector4.get_Y_AXIS = function() {
return new lime_math_Vector4(0,1,0);
};
lime_math_Vector4.get_Z_AXIS = function() {
return new lime_math_Vector4(0,0,1);
};
lime_math_Vector4.prototype = {
length: null
,lengthSquared: null
,w: null
,x: null
,y: null
,z: null
,add: function(a) {
return new lime_math_Vector4(this.x + a.x,this.y + a.y,this.z + a.z);
}
,clone: function() {
return new lime_math_Vector4(this.x,this.y,this.z,this.w);
}
,copyFrom: function(sourceVector4) {
this.x = sourceVector4.x;
this.y = sourceVector4.y;
this.z = sourceVector4.z;
}
,crossProduct: function(a) {
return new lime_math_Vector4(this.y * a.z - this.z * a.y,this.z * a.x - this.x * a.z,this.x * a.y - this.y * a.x,1);
}
,decrementBy: function(a) {
this.x -= a.x;
this.y -= a.y;
this.z -= a.z;
}
,dotProduct: function(a) {
return this.x * a.x + this.y * a.y + this.z * a.z;
}
,equals: function(toCompare,allFour) {
if(allFour == null) allFour = false;
return this.x == toCompare.x && this.y == toCompare.y && this.z == toCompare.z && (!allFour || this.w == toCompare.w);
}
,incrementBy: function(a) {
this.x += a.x;
this.y += a.y;
this.z += a.z;
}
,nearEquals: function(toCompare,tolerance,allFour) {
if(allFour == null) allFour = false;
return Math.abs(this.x - toCompare.x) < tolerance && Math.abs(this.y - toCompare.y) < tolerance && Math.abs(this.z - toCompare.z) < tolerance && (!allFour || Math.abs(this.w - toCompare.w) < tolerance);
}
,negate: function() {
this.x *= -1;
this.y *= -1;
this.z *= -1;
}
,normalize: function() {
var l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
if(l != 0) {
this.x /= l;
this.y /= l;
this.z /= l;
}
return l;
}
,project: function() {
this.x /= this.w;
this.y /= this.w;
this.z /= this.w;
}
,scaleBy: function(s) {
this.x *= s;
this.y *= s;
this.z *= s;
}
,setTo: function(xa,ya,za) {
this.x = xa;
this.y = ya;
this.z = za;
}
,subtract: function(a) {
return new lime_math_Vector4(this.x - a.x,this.y - a.y,this.z - a.z);
}
,toString: function() {
return "Vector4(" + this.x + ", " + this.y + ", " + this.z + ")";
}
,get_length: function() {
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
}
,get_lengthSquared: function() {
return this.x * this.x + this.y * this.y + this.z * this.z;
}
,__class__: lime_math_Vector4
,__properties__: {get_lengthSquared:"get_lengthSquared",get_length:"get_length"}
};
var lime_math_color__$ARGB_ARGB_$Impl_$ = {};
$hxClasses["lime.math.color._ARGB.ARGB_Impl_"] = lime_math_color__$ARGB_ARGB_$Impl_$;
lime_math_color__$ARGB_ARGB_$Impl_$.__name__ = ["lime","math","color","_ARGB","ARGB_Impl_"];
lime_math_color__$ARGB_ARGB_$Impl_$.__properties__ = {set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"}
lime_math_color__$ARGB_ARGB_$Impl_$._new = function(argb) {
if(argb == null) argb = 0;
return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.create = function(a,r,g,b) {
var argb = 0;
argb = (a & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.multiplyAlpha = function(this1) {
if((this1 >> 24 & 255) == 0) this1 = 0; else if((this1 >> 24 & 255) != 255) {
lime_math_color__$ARGB_ARGB_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 >> 24 & 255];
this1 = (this1 >> 24 & 255 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 8 | (this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255;
}
};
lime_math_color__$ARGB_ARGB_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
if(premultiplied == null) premultiplied = false;
if(format == null) format = 0;
switch(format) {
case 2:
this1 = (data[offset + 1] & 255) << 24 | (data[offset] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset + 2] & 255;
break;
case 0:
this1 = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
case 1:
this1 = (data[offset + 2] & 255) << 24 | (data[offset + 3] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 1] & 255;
break;
}
if(premultiplied) {
if((this1 >> 24 & 255) != 0 && (this1 >> 24 & 255) != 255) {
lime_math_color__$ARGB_ARGB_$Impl_$.unmult = 255.0 / (this1 >> 24 & 255);
var r;
var idx = Math.floor((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.floor((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.floor((this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
this1 = (this1 >> 24 & 255 & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
}
}
};
lime_math_color__$ARGB_ARGB_$Impl_$.set = function(this1,a,r,g,b) {
this1 = (a & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.unmultiplyAlpha = function(this1) {
if((this1 >> 24 & 255) != 0 && (this1 >> 24 & 255) != 255) {
lime_math_color__$ARGB_ARGB_$Impl_$.unmult = 255.0 / (this1 >> 24 & 255);
var r;
var idx = Math.floor((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.floor((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.floor((this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
this1 = (this1 >> 24 & 255 & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
}
};
lime_math_color__$ARGB_ARGB_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
if(premultiplied == null) premultiplied = false;
if(format == null) format = 0;
if(premultiplied) {
if((this1 >> 24 & 255) == 0) this1 = 0; else if((this1 >> 24 & 255) != 255) {
lime_math_color__$ARGB_ARGB_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 >> 24 & 255];
this1 = (this1 >> 24 & 255 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 8 | (this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255;
}
}
switch(format) {
case 2:
data[offset] = this1 & 255;
data[offset + 1] = this1 >> 8 & 255;
data[offset + 2] = this1 >> 16 & 255;
data[offset + 3] = this1 >> 24 & 255;
break;
case 0:
data[offset] = this1 >> 16 & 255;
data[offset + 1] = this1 >> 8 & 255;
data[offset + 2] = this1 & 255;
data[offset + 3] = this1 >> 24 & 255;
break;
case 1:
data[offset] = this1 >> 24 & 255;
data[offset + 1] = this1 >> 16 & 255;
data[offset + 2] = this1 >> 8 & 255;
data[offset + 3] = this1 & 255;
break;
}
};
lime_math_color__$ARGB_ARGB_$Impl_$.__fromBGRA = function(bgra) {
var argb = 0;
argb = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.__fromRGBA = function(rgba) {
var argb = 0;
argb = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_a = function(this1) {
return this1 >> 24 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_a = function(this1,value) {
this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_b = function(this1) {
return this1 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_b = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_g = function(this1) {
return this1 >> 8 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_g = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_r = function(this1) {
return this1 >> 16 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_r = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
return value;
};
var lime_math_color__$BGRA_BGRA_$Impl_$ = {};
$hxClasses["lime.math.color._BGRA.BGRA_Impl_"] = lime_math_color__$BGRA_BGRA_$Impl_$;
lime_math_color__$BGRA_BGRA_$Impl_$.__name__ = ["lime","math","color","_BGRA","BGRA_Impl_"];
lime_math_color__$BGRA_BGRA_$Impl_$.__properties__ = {set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"}
lime_math_color__$BGRA_BGRA_$Impl_$._new = function(bgra) {
if(bgra == null) bgra = 0;
return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.create = function(b,g,r,a) {
var bgra = 0;
bgra = (b & 255) << 24 | (g & 255) << 16 | (r & 255) << 8 | a & 255;
return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.multiplyAlpha = function(this1) {
if((this1 & 255) == 0) this1 = 0; else if((this1 & 255) != 255) {
lime_math_color__$BGRA_BGRA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
this1 = ((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
}
};
lime_math_color__$BGRA_BGRA_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
if(premultiplied == null) premultiplied = false;
if(format == null) format = 0;
switch(format) {
case 2:
this1 = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
this1 = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
this1 = (data[offset + 3] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 1] & 255) << 8 | data[offset] & 255;
break;
}
if(premultiplied) {
if((this1 & 255) != 0 && (this1 & 255) != 255) {
lime_math_color__$BGRA_BGRA_$Impl_$.unmult = 255.0 / (this1 & 255);
var b;
var idx = Math.floor((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.floor((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var r;
var idx2 = Math.floor((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
this1 = (b & 255) << 24 | (g & 255) << 16 | (r & 255) << 8 | this1 & 255 & 255;
}
}
};
lime_math_color__$BGRA_BGRA_$Impl_$.set = function(this1,b,g,r,a) {
this1 = (b & 255) << 24 | (g & 255) << 16 | (r & 255) << 8 | a & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.unmultiplyAlpha = function(this1) {
if((this1 & 255) != 0 && (this1 & 255) != 255) {
lime_math_color__$BGRA_BGRA_$Impl_$.unmult = 255.0 / (this1 & 255);
var b;
var idx = Math.floor((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.floor((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var r;
var idx2 = Math.floor((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
this1 = (b & 255) << 24 | (g & 255) << 16 | (r & 255) << 8 | this1 & 255 & 255;
}
};
lime_math_color__$BGRA_BGRA_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
if(premultiplied == null) premultiplied = false;
if(format == null) format = 0;
if(premultiplied) {
if((this1 & 255) == 0) this1 = 0; else if((this1 & 255) != 255) {
lime_math_color__$BGRA_BGRA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
this1 = ((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
}
}
switch(format) {
case 2:
data[offset] = this1 >> 24 & 255;
data[offset + 1] = this1 >> 16 & 255;
data[offset + 2] = this1 >> 8 & 255;
data[offset + 3] = this1 & 255;
break;
case 0:
data[offset] = this1 >> 8 & 255;
data[offset + 1] = this1 >> 16 & 255;
data[offset + 2] = this1 >> 24 & 255;
data[offset + 3] = this1 & 255;
break;
case 1:
data[offset] = this1 & 255;
data[offset + 1] = this1 >> 8 & 255;
data[offset + 2] = this1 >> 16 & 255;
data[offset + 3] = this1 >> 24 & 255;
break;
}
};
lime_math_color__$BGRA_BGRA_$Impl_$.__fromARGB = function(argb) {
var bgra = 0;
bgra = (argb & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb >> 16 & 255 & 255) << 8 | argb >> 24 & 255 & 255;
return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.__fromRGBA = function(rgba) {
var bgra = 0;
bgra = (rgba >> 8 & 255 & 255) << 24 | (rgba >> 16 & 255 & 255) << 16 | (rgba >> 24 & 255 & 255) << 8 | rgba & 255 & 255;
return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_a = function(this1) {
return this1 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_a = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_b = function(this1) {
return this1 >> 24 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_b = function(this1,value) {
this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_g = function(this1) {
return this1 >> 16 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_g = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_r = function(this1) {
return this1 >> 8 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_r = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
return value;
};
var lime_math_color__$RGBA_RGBA_$Impl_$ = {};
$hxClasses["lime.math.color._RGBA.RGBA_Impl_"] = lime_math_color__$RGBA_RGBA_$Impl_$;
lime_math_color__$RGBA_RGBA_$Impl_$.__name__ = ["lime","math","color","_RGBA","RGBA_Impl_"];
lime_math_color__$RGBA_RGBA_$Impl_$.__properties__ = {set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"}
lime_math_color__$RGBA_RGBA_$Impl_$._new = function(rgba) {
if(rgba == null) rgba = 0;
return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.create = function(r,g,b,a) {
var rgba = 0;
rgba = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | a & 255;
return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.multiplyAlpha = function(this1) {
if((this1 & 255) == 0) {
if(this1 != 0) this1 = 0;
} else if((this1 & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
this1 = ((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
}
};
lime_math_color__$RGBA_RGBA_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
if(premultiplied == null) premultiplied = false;
if(format == null) format = 0;
switch(format) {
case 2:
this1 = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
break;
case 0:
this1 = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
break;
case 1:
this1 = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
break;
}
if(premultiplied) {
if((this1 & 255) != 0 && (this1 & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (this1 & 255);
var r;
var idx = Math.round((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
this1 = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | this1 & 255 & 255;
}
}
};
lime_math_color__$RGBA_RGBA_$Impl_$.set = function(this1,r,g,b,a) {
this1 = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | a & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.unmultiplyAlpha = function(this1) {
if((this1 & 255) != 0 && (this1 & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (this1 & 255);
var r;
var idx = Math.round((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
r = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx];
var g;
var idx1 = Math.round((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
g = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx1];
var b;
var idx2 = Math.round((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult);
b = lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[idx2];
this1 = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | this1 & 255 & 255;
}
};
lime_math_color__$RGBA_RGBA_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
if(premultiplied == null) premultiplied = false;
if(format == null) format = 0;
if(premultiplied) {
if((this1 & 255) == 0) {
if(this1 != 0) this1 = 0;
} else if((this1 & 255) != 255) {
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
this1 = ((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
}
}
switch(format) {
case 2:
data[offset] = this1 >> 8 & 255;
data[offset + 1] = this1 >> 16 & 255;
data[offset + 2] = this1 >> 24 & 255;
data[offset + 3] = this1 & 255;
break;
case 0:
data[offset] = this1 >> 24 & 255;
data[offset + 1] = this1 >> 16 & 255;
data[offset + 2] = this1 >> 8 & 255;
data[offset + 3] = this1 & 255;
break;
case 1:
data[offset] = this1 & 255;
data[offset + 1] = this1 >> 24 & 255;
data[offset + 2] = this1 >> 16 & 255;
data[offset + 3] = this1 >> 8 & 255;
break;
}
};
lime_math_color__$RGBA_RGBA_$Impl_$.__fromARGB = function(argb) {
var rgba = 0;
rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.__fromBGRA = function(bgra) {
var rgba = 0;
rgba = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_a = function(this1) {
return this1 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_a = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_b = function(this1) {
return this1 >> 8 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_b = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_g = function(this1) {
return this1 >> 16 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_g = function(this1,value) {
this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_r = function(this1) {
return this1 >> 24 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_r = function(this1,value) {
this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
return value;
};
var lime_media_ALAudioContext = function() {
this.EXPONENT_DISTANCE_CLAMPED = 53254;
this.EXPONENT_DISTANCE = 53253;
this.LINEAR_DISTANCE_CLAMPED = 53252;
this.LINEAR_DISTANCE = 53251;
this.INVERSE_DISTANCE_CLAMPED = 53250;
this.INVERSE_DISTANCE = 53249;
this.DISTANCE_MODEL = 53248;
this.DOPPLER_VELOCITY = 49153;
this.SPEED_OF_SOUND = 49155;
this.DOPPLER_FACTOR = 49152;
this.EXTENSIONS = 45060;
this.RENDERER = 45059;
this.VERSION = 45058;
this.VENDOR = 45057;
this.OUT_OF_MEMORY = 40965;
this.INVALID_OPERATION = 40964;
this.INVALID_VALUE = 40963;
this.INVALID_ENUM = 40962;
this.INVALID_NAME = 40961;
this.NO_ERROR = 0;
this.SIZE = 8196;
this.CHANNELS = 8195;
this.BITS = 8194;
this.FREQUENCY = 8193;
this.FORMAT_STEREO16 = 4355;
this.FORMAT_STEREO8 = 4354;
this.FORMAT_MONO16 = 4353;
this.FORMAT_MONO8 = 4352;
this.UNDETERMINED = 4144;
this.STREAMING = 4137;
this.STATIC = 4136;
this.SOURCE_TYPE = 4135;
this.BYTE_OFFSET = 4134;
this.SAMPLE_OFFSET = 4133;
this.SEC_OFFSET = 4132;
this.MAX_DISTANCE = 4131;
this.CONE_OUTER_GAIN = 4130;
this.ROLLOFF_FACTOR = 4129;
this.REFERENCE_DISTANCE = 4128;
this.BUFFERS_PROCESSED = 4118;
this.BUFFERS_QUEUED = 4117;
this.STOPPED = 4116;
this.PAUSED = 4115;
this.PLAYING = 4114;
this.INITIAL = 4113;
this.SOURCE_STATE = 4112;
this.ORIENTATION = 4111;
this.MAX_GAIN = 4110;
this.MIN_GAIN = 4109;
this.GAIN = 4106;
this.BUFFER = 4105;
this.LOOPING = 4103;
this.VELOCITY = 4102;
this.DIRECTION = 4101;
this.POSITION = 4100;
this.PITCH = 4099;
this.CONE_OUTER_ANGLE = 4098;
this.CONE_INNER_ANGLE = 4097;
this.SOURCE_RELATIVE = 514;
this.TRUE = 1;
this.FALSE = 0;
this.NONE = 0;
};
$hxClasses["lime.media.ALAudioContext"] = lime_media_ALAudioContext;
lime_media_ALAudioContext.__name__ = ["lime","media","ALAudioContext"];
lime_media_ALAudioContext.prototype = {
NONE: null
,FALSE: null
,TRUE: null
,SOURCE_RELATIVE: null
,CONE_INNER_ANGLE: null
,CONE_OUTER_ANGLE: null
,PITCH: null
,POSITION: null
,DIRECTION: null
,VELOCITY: null
,LOOPING: null
,BUFFER: null
,GAIN: null
,MIN_GAIN: null
,MAX_GAIN: null
,ORIENTATION: null
,SOURCE_STATE: null
,INITIAL: null
,PLAYING: null
,PAUSED: null
,STOPPED: null
,BUFFERS_QUEUED: null
,BUFFERS_PROCESSED: null
,REFERENCE_DISTANCE: null
,ROLLOFF_FACTOR: null
,CONE_OUTER_GAIN: null
,MAX_DISTANCE: null
,SEC_OFFSET: null
,SAMPLE_OFFSET: null
,BYTE_OFFSET: null
,SOURCE_TYPE: null
,STATIC: null
,STREAMING: null
,UNDETERMINED: null
,FORMAT_MONO8: null
,FORMAT_MONO16: null
,FORMAT_STEREO8: null
,FORMAT_STEREO16: null
,FREQUENCY: null
,BITS: null
,CHANNELS: null
,SIZE: null
,NO_ERROR: null
,INVALID_NAME: null
,INVALID_ENUM: null
,INVALID_VALUE: null
,INVALID_OPERATION: null
,OUT_OF_MEMORY: null
,VENDOR: null
,VERSION: null
,RENDERER: null
,EXTENSIONS: null
,DOPPLER_FACTOR: null
,SPEED_OF_SOUND: null
,DOPPLER_VELOCITY: null
,DISTANCE_MODEL: null
,INVERSE_DISTANCE: null
,INVERSE_DISTANCE_CLAMPED: null
,LINEAR_DISTANCE: null
,LINEAR_DISTANCE_CLAMPED: null
,EXPONENT_DISTANCE: null
,EXPONENT_DISTANCE_CLAMPED: null
,bufferData: function(buffer,format,data,size,freq) {
lime_media_openal_AL.bufferData(buffer,format,data,size,freq);
}
,buffer3f: function(buffer,param,value1,value2,value3) {
lime_media_openal_AL.buffer3f(buffer,param,value1,value2,value3);
}
,buffer3i: function(buffer,param,value1,value2,value3) {
lime_media_openal_AL.buffer3i(buffer,param,value1,value2,value3);
}
,bufferf: function(buffer,param,value) {
lime_media_openal_AL.bufferf(buffer,param,value);
}
,bufferfv: function(buffer,param,values) {
lime_media_openal_AL.bufferfv(buffer,param,values);
}
,bufferi: function(buffer,param,value) {
lime_media_openal_AL.bufferi(buffer,param,value);
}
,bufferiv: function(buffer,param,values) {
lime_media_openal_AL.bufferiv(buffer,param,values);
}
,createSource: function() {
return lime_media_openal_AL.createSource();
}
,createBuffer: function() {
return lime_media_openal_AL.createBuffer();
}
,deleteBuffer: function(buffer) {
lime_media_openal_AL.deleteBuffer(buffer);
}
,deleteBuffers: function(buffers) {
lime_media_openal_AL.deleteBuffers(buffers);
}
,deleteSource: function(source) {
lime_media_openal_AL.deleteSource(source);
}
,deleteSources: function(sources) {
lime_media_openal_AL.deleteSources(sources);
}
,disable: function(capability) {
lime_media_openal_AL.disable(capability);
}
,distanceModel: function(distanceModel) {
lime_media_openal_AL.distanceModel(distanceModel);
}
,dopplerFactor: function(value) {
lime_media_openal_AL.dopplerFactor(value);
}
,dopplerVelocity: function(value) {
lime_media_openal_AL.dopplerVelocity(value);
}
,enable: function(capability) {
lime_media_openal_AL.enable(capability);
}
,genSource: function() {
return this.createSource();
}
,genSources: function(n) {
return lime_media_openal_AL.genSources(n);
}
,genBuffer: function() {
return this.createBuffer();
}
,genBuffers: function(n) {
return lime_media_openal_AL.genBuffers(n);
}
,getBoolean: function(param) {
return lime_media_openal_AL.getBoolean(param);
}
,getBooleanv: function(param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getBooleanv(param,count);
}
,getBuffer3f: function(buffer,param) {
return lime_media_openal_AL.getBuffer3f(buffer,param);
}
,getBuffer3i: function(buffer,param) {
return lime_media_openal_AL.getBuffer3i(buffer,param);
}
,getBufferf: function(buffer,param) {
return lime_media_openal_AL.getBufferf(buffer,param);
}
,getBufferfv: function(buffer,param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getBufferfv(buffer,param,count);
}
,getBufferi: function(buffer,param) {
return lime_media_openal_AL.getBufferi(buffer,param);
}
,getBufferiv: function(buffer,param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getBufferiv(buffer,param,count);
}
,getDouble: function(param) {
return lime_media_openal_AL.getDouble(param);
}
,getDoublev: function(param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getDoublev(param,count);
}
,getEnumValue: function(ename) {
return lime_media_openal_AL.getEnumValue(ename);
}
,getError: function() {
return lime_media_openal_AL.getError();
}
,getErrorString: function() {
return lime_media_openal_AL.getErrorString();
}
,getFloat: function(param) {
return lime_media_openal_AL.getFloat(param);
}
,getFloatv: function(param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getFloatv(param,count);
}
,getInteger: function(param) {
return lime_media_openal_AL.getInteger(param);
}
,getIntegerv: function(param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getIntegerv(param,count);
}
,getListener3f: function(param) {
return lime_media_openal_AL.getListener3f(param);
}
,getListener3i: function(param) {
return lime_media_openal_AL.getListener3i(param);
}
,getListenerf: function(param) {
return lime_media_openal_AL.getListenerf(param);
}
,getListenerfv: function(param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getListenerfv(param,count);
}
,getListeneri: function(param) {
return lime_media_openal_AL.getListeneri(param);
}
,getListeneriv: function(param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getListeneriv(param,count);
}
,getProcAddress: function(fname) {
return lime_media_openal_AL.getProcAddress(fname);
}
,getSource3f: function(source,param) {
return lime_media_openal_AL.getSource3f(source,param);
}
,getSourcef: function(source,param) {
return lime_media_openal_AL.getSourcef(source,param);
}
,getSource3i: function(source,param) {
return lime_media_openal_AL.getSource3i(source,param);
}
,getSourcefv: function(source,param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getSourcefv(source,param);
}
,getSourcei: function(source,param) {
return lime_media_openal_AL.getSourcei(source,param);
}
,getSourceiv: function(source,param,count) {
if(count == null) count = 1;
return lime_media_openal_AL.getSourceiv(source,param,count);
}
,getString: function(param) {
return lime_media_openal_AL.getString(param);
}
,isBuffer: function(buffer) {
return lime_media_openal_AL.isBuffer(buffer);
}
,isEnabled: function(capability) {
return lime_media_openal_AL.isEnabled(capability);
}
,isExtensionPresent: function(extname) {
return lime_media_openal_AL.isExtensionPresent(extname);
}
,isSource: function(source) {
return lime_media_openal_AL.isSource(source);
}
,listener3f: function(param,value1,value2,value3) {
lime_media_openal_AL.listener3f(param,value1,value2,value3);
}
,listener3i: function(param,value1,value2,value3) {
lime_media_openal_AL.listener3i(param,value1,value2,value3);
}
,listenerf: function(param,value) {
lime_media_openal_AL.listenerf(param,value);
}
,listenerfv: function(param,values) {
lime_media_openal_AL.listenerfv(param,values);
}
,listeneri: function(param,value) {
lime_media_openal_AL.listeneri(param,value);
}
,listeneriv: function(param,values) {
lime_media_openal_AL.listeneriv(param,values);
}
,source3f: function(source,param,value1,value2,value3) {
lime_media_openal_AL.source3f(source,param,value1,value2,value3);
}
,source3i: function(source,param,value1,value2,value3) {
lime_media_openal_AL.source3i(source,param,value1,value2,value3);
}
,sourcef: function(source,param,value) {
lime_media_openal_AL.sourcef(source,param,value);
}
,sourcefv: function(source,param,values) {
lime_media_openal_AL.sourcefv(source,param,values);
}
,sourcei: function(source,param,value) {
lime_media_openal_AL.sourcei(source,param,value);
}
,sourceiv: function(source,param,values) {
lime_media_openal_AL.sourceiv(source,param,values);
}
,sourcePlay: function(source) {
lime_media_openal_AL.sourcePlay(source);
}
,sourcePlayv: function(sources) {
lime_media_openal_AL.sourcePlayv(sources);
}
,sourceStop: function(source) {
lime_media_openal_AL.sourceStop(source);
}
,sourceStopv: function(sources) {
lime_media_openal_AL.sourceStopv(sources);
}
,sourceRewind: function(source) {
lime_media_openal_AL.sourceRewind(source);
}
,sourceRewindv: function(sources) {
lime_media_openal_AL.sourceRewindv(sources);
}
,sourcePause: function(source) {
lime_media_openal_AL.sourcePause(source);
}
,sourcePausev: function(sources) {
lime_media_openal_AL.sourcePausev(sources);
}
,sourceQueueBuffer: function(source,buffer) {
lime_media_openal_AL.sourceQueueBuffer(source,buffer);
}
,sourceQueueBuffers: function(source,nb,buffers) {
lime_media_openal_AL.sourceQueueBuffers(source,nb,buffers);
}
,sourceUnqueueBuffer: function(source) {
return lime_media_openal_AL.sourceUnqueueBuffer(source);
}
,sourceUnqueueBuffers: function(source,nb) {
return lime_media_openal_AL.sourceUnqueueBuffers(source,nb);
}
,speedOfSound: function(value) {
lime_media_openal_AL.speedOfSound(value);
}
,__class__: lime_media_ALAudioContext
};
var lime_media_ALCAudioContext = function() {
this.ALL_DEVICES_SPECIFIER = 4115;
this.DEFAULT_ALL_DEVICES_SPECIFIER = 4114;
this.ENUMERATE_ALL_EXT = 1;
this.EXTENSIONS = 4102;
this.DEVICE_SPECIFIER = 4101;
this.DEFAULT_DEVICE_SPECIFIER = 4100;
this.ALL_ATTRIBUTES = 4099;
this.ATTRIBUTES_SIZE = 4098;
this.OUT_OF_MEMORY = 40965;
this.INVALID_VALUE = 40964;
this.INVALID_ENUM = 40963;
this.INVALID_CONTEXT = 40962;
this.INVALID_DEVICE = 40961;
this.NO_ERROR = 0;
this.STEREO_SOURCES = 4113;
this.MONO_SOURCES = 4112;
this.SYNC = 4105;
this.REFRESH = 4104;
this.FREQUENCY = 4103;
this.TRUE = 1;
this.FALSE = 0;
};
$hxClasses["lime.media.ALCAudioContext"] = lime_media_ALCAudioContext;
lime_media_ALCAudioContext.__name__ = ["lime","media","ALCAudioContext"];
lime_media_ALCAudioContext.prototype = {
FALSE: null
,TRUE: null
,FREQUENCY: null
,REFRESH: null
,SYNC: null
,MONO_SOURCES: null
,STEREO_SOURCES: null
,NO_ERROR: null
,INVALID_DEVICE: null
,INVALID_CONTEXT: null
,INVALID_ENUM: null
,INVALID_VALUE: null
,OUT_OF_MEMORY: null
,ATTRIBUTES_SIZE: null
,ALL_ATTRIBUTES: null
,DEFAULT_DEVICE_SPECIFIER: null
,DEVICE_SPECIFIER: null
,EXTENSIONS: null
,ENUMERATE_ALL_EXT: null
,DEFAULT_ALL_DEVICES_SPECIFIER: null
,ALL_DEVICES_SPECIFIER: null
,closeDevice: function(device) {
return lime_media_openal_ALC.closeDevice(device);
}
,createContext: function(device,attrlist) {
return lime_media_openal_ALC.createContext(device,attrlist);
}
,destroyContext: function(context) {
lime_media_openal_ALC.destroyContext(context);
}
,getContextsDevice: function(context) {
return lime_media_openal_ALC.getContextsDevice(context);
}
,getCurrentContext: function() {
return lime_media_openal_ALC.getCurrentContext();
}
,getError: function(device) {
return lime_media_openal_ALC.getError(device);
}
,getErrorString: function(device) {
return lime_media_openal_ALC.getErrorString(device);
}
,getIntegerv: function(device,param,count) {
if(count == null) count = 1;
return lime_media_openal_ALC.getIntegerv(device,param,count);
}
,getString: function(device,param) {
return lime_media_openal_ALC.getString(device,param);
}
,makeContextCurrent: function(context) {
return lime_media_openal_ALC.makeContextCurrent(context);
}
,openDevice: function(deviceName) {
return lime_media_openal_ALC.openDevice(deviceName);
}
,pauseDevice: function(device) {
lime_media_openal_ALC.pauseDevice(device);
}
,processContext: function(context) {
lime_media_openal_ALC.processContext(context);
}
,resumeDevice: function(device) {
lime_media_openal_ALC.resumeDevice(device);
}
,suspendContext: function(context) {
lime_media_openal_ALC.suspendContext(context);
}
,__class__: lime_media_ALCAudioContext
};
var lime_media_AudioBuffer = function() {
};
$hxClasses["lime.media.AudioBuffer"] = lime_media_AudioBuffer;
lime_media_AudioBuffer.__name__ = ["lime","media","AudioBuffer"];
lime_media_AudioBuffer.fromBytes = function(bytes) {
if(bytes == null) return null;
return null;
};
lime_media_AudioBuffer.fromFile = function(path) {
if(path == null) return null;
var audioBuffer = new lime_media_AudioBuffer();
audioBuffer.__srcHowl = new Howl({ src : [path]});
return audioBuffer;
};
lime_media_AudioBuffer.fromFiles = function(paths) {
var audioBuffer = new lime_media_AudioBuffer();
audioBuffer.__srcHowl = new Howl({ src : paths});
return audioBuffer;
};
lime_media_AudioBuffer.fromVorbisFile = function(vorbisFile) {
return null;
};
lime_media_AudioBuffer.loadFromFile = function(path) {
var promise = new lime_app_Promise();
var audioBuffer = lime_media_AudioBuffer.fromFile(path);
if(audioBuffer != null) {
if(audioBuffer != null) {
audioBuffer.__srcHowl.on("load",function() {
promise.complete(audioBuffer);
});
audioBuffer.__srcHowl.on("loaderror",function() {
promise.error(null);
});
audioBuffer.__srcHowl.load();
}
} else promise.error(null);
return promise.future;
};
lime_media_AudioBuffer.loadFromFiles = function(paths) {
var promise = new lime_app_Promise();
var audioBuffer = lime_media_AudioBuffer.fromFiles(paths);
if(audioBuffer != null) {
audioBuffer.__srcHowl.on("load",function() {
promise.complete(audioBuffer);
});
audioBuffer.__srcHowl.on("loaderror",function() {
promise.error(null);
});
audioBuffer.__srcHowl.load();
} else promise.error(null);
return promise.future;
};
lime_media_AudioBuffer.prototype = {
bitsPerSample: null
,channels: null
,data: null
,sampleRate: null
,__srcAudio: null
,__srcBuffer: null
,__srcCustom: null
,__srcFMODSound: null
,__srcHowl: null
,__srcSound: null
,__srcVorbisFile: null
,dispose: function() {
this.__srcHowl.unload();
}
,get_src: function() {
return this.__srcHowl;
}
,set_src: function(value) {
return this.__srcHowl = value;
}
,__class__: lime_media_AudioBuffer
,__properties__: {set_src:"set_src",get_src:"get_src"}
};
var lime_media_AudioContext = $hxClasses["lime.media.AudioContext"] = { __ename__ : ["lime","media","AudioContext"], __constructs__ : ["OPENAL","HTML5","WEB","FLASH","CUSTOM"] };
lime_media_AudioContext.OPENAL = function(alc,al) { var $x = ["OPENAL",0,alc,al]; $x.__enum__ = lime_media_AudioContext; $x.toString = $estr; return $x; };
lime_media_AudioContext.HTML5 = function(context) { var $x = ["HTML5",1,context]; $x.__enum__ = lime_media_AudioContext; $x.toString = $estr; return $x; };
lime_media_AudioContext.WEB = function(context) { var $x = ["WEB",2,context]; $x.__enum__ = lime_media_AudioContext; $x.toString = $estr; return $x; };
lime_media_AudioContext.FLASH = function(context) { var $x = ["FLASH",3,context]; $x.__enum__ = lime_media_AudioContext; $x.toString = $estr; return $x; };
lime_media_AudioContext.CUSTOM = function(data) { var $x = ["CUSTOM",4,data]; $x.__enum__ = lime_media_AudioContext; $x.toString = $estr; return $x; };
var lime_media_AudioManager = function() { };
$hxClasses["lime.media.AudioManager"] = lime_media_AudioManager;
lime_media_AudioManager.__name__ = ["lime","media","AudioManager"];
lime_media_AudioManager.init = function(context) {
if(lime_media_AudioManager.context == null) {
if(context == null) try {
window.AudioContext = window.AudioContext || window.webkitAudioContext;;
lime_media_AudioManager.context = lime_media_AudioContext.WEB(new AudioContext ());
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
lime_media_AudioManager.context = lime_media_AudioContext.HTML5(new lime_media_HTML5AudioContext());
} else lime_media_AudioManager.context = context;
}
};
lime_media_AudioManager.resume = function() {
if(lime_media_AudioManager.context != null) {
var _g = lime_media_AudioManager.context;
switch(_g[1]) {
case 0:
var al = _g[3];
var alc = _g[2];
var currentContext = alc.getCurrentContext();
if(currentContext != null) {
var device = alc.getContextsDevice(currentContext);
alc.resumeDevice(device);
alc.processContext(currentContext);
}
break;
default:
}
}
};
lime_media_AudioManager.shutdown = function() {
if(lime_media_AudioManager.context != null) {
var _g = lime_media_AudioManager.context;
switch(_g[1]) {
case 0:
var al = _g[3];
var alc = _g[2];
var currentContext = alc.getCurrentContext();
if(currentContext != null) {
var device = alc.getContextsDevice(currentContext);
alc.makeContextCurrent(null);
alc.destroyContext(currentContext);
alc.closeDevice(device);
}
break;
default:
}
}
};
lime_media_AudioManager.suspend = function() {
if(lime_media_AudioManager.context != null) {
var _g = lime_media_AudioManager.context;
switch(_g[1]) {
case 0:
var al = _g[3];
var alc = _g[2];
var currentContext = alc.getCurrentContext();
if(currentContext != null) {
alc.suspendContext(currentContext);
var device = alc.getContextsDevice(currentContext);
alc.pauseDevice(device);
}
break;
default:
}
}
};
var lime_media_AudioSource = function(buffer,offset,length,loops) {
if(loops == null) loops = 0;
if(offset == null) offset = 0;
this.onComplete = new lime_app__$Event_$Void_$Void();
this.buffer = buffer;
this.offset = offset;
this.backend = new lime__$backend_html5_HTML5AudioSource(this);
if(length != null && length != 0) this.set_length(length);
this.set_loops(loops);
if(buffer != null) this.init();
};
$hxClasses["lime.media.AudioSource"] = lime_media_AudioSource;
lime_media_AudioSource.__name__ = ["lime","media","AudioSource"];
lime_media_AudioSource.prototype = {
onComplete: null
,buffer: null
,offset: null
,backend: null
,dispose: function() {
this.backend.dispose();
}
,init: function() {
this.backend.init();
}
,play: function() {
this.backend.play();
}
,pause: function() {
this.backend.pause();
}
,stop: function() {
this.backend.stop();
}
,get_currentTime: function() {
return this.backend.getCurrentTime();
}
,set_currentTime: function(value) {
return this.backend.setCurrentTime(value);
}
,get_gain: function() {
return this.backend.getGain();
}
,set_gain: function(value) {
return this.backend.setGain(value);
}
,get_length: function() {
return this.backend.getLength();
}
,set_length: function(value) {
return this.backend.setLength(value);
}
,get_loops: function() {
return this.backend.getLoops();
}
,set_loops: function(value) {
return this.backend.setLoops(value);
}
,get_position: function() {
return this.backend.getPosition();
}
,set_position: function(value) {
return this.backend.setPosition(value);
}
,__class__: lime_media_AudioSource
,__properties__: {set_position:"set_position",get_position:"get_position",set_loops:"set_loops",get_loops:"get_loops",set_length:"set_length",get_length:"get_length",set_gain:"set_gain",get_gain:"get_gain",set_currentTime:"set_currentTime",get_currentTime:"get_currentTime"}
};
var lime_media_FlashAudioContext = function() {
};
$hxClasses["lime.media.FlashAudioContext"] = lime_media_FlashAudioContext;
lime_media_FlashAudioContext.__name__ = ["lime","media","FlashAudioContext"];
lime_media_FlashAudioContext.prototype = {
createBuffer: function(stream,context) {
return null;
}
,getBytesLoaded: function(buffer) {
return 0;
}
,getBytesTotal: function(buffer) {
return 0;
}
,getID3: function(buffer) {
return null;
}
,getIsBuffering: function(buffer) {
return false;
}
,getIsURLInaccessible: function(buffer) {
return false;
}
,getLength: function(buffer) {
return 0;
}
,getURL: function(buffer) {
return null;
}
,close: function(buffer) {
}
,extract: function(buffer,target,length,startPosition) {
if(startPosition == null) startPosition = -1;
return 0;
}
,load: function(buffer,stream,context) {
}
,loadCompressedDataFromByteArray: function(buffer,bytes,bytesLength) {
}
,loadPCMFromByteArray: function(buffer,bytes,samples,format,stereo,sampleRate) {
if(sampleRate == null) sampleRate = 44100;
if(stereo == null) stereo = true;
}
,play: function(buffer,startTime,loops,sndTransform) {
if(loops == null) loops = 0;
if(startTime == null) startTime = 0;
return null;
}
,__class__: lime_media_FlashAudioContext
};
var lime_media_HTML5AudioContext = function() {
this.NETWORK_NO_SOURCE = 3;
this.NETWORK_LOADING = 2;
this.NETWORK_IDLE = 1;
this.NETWORK_EMPTY = 0;
this.HAVE_NOTHING = 0;
this.HAVE_METADATA = 1;
this.HAVE_FUTURE_DATA = 3;
this.HAVE_ENOUGH_DATA = 4;
this.HAVE_CURRENT_DATA = 2;
};
$hxClasses["lime.media.HTML5AudioContext"] = lime_media_HTML5AudioContext;
lime_media_HTML5AudioContext.__name__ = ["lime","media","HTML5AudioContext"];
lime_media_HTML5AudioContext.prototype = {
HAVE_CURRENT_DATA: null
,HAVE_ENOUGH_DATA: null
,HAVE_FUTURE_DATA: null
,HAVE_METADATA: null
,HAVE_NOTHING: null
,NETWORK_EMPTY: null
,NETWORK_IDLE: null
,NETWORK_LOADING: null
,NETWORK_NO_SOURCE: null
,canPlayType: function(buffer,type) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.canPlayType(type);
return null;
}
,createBuffer: function(urlString) {
var buffer = new lime_media_AudioBuffer();
buffer.__srcAudio = new Audio();
buffer.__srcAudio.src = urlString;
return buffer;
}
,getAutoplay: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.autoplay;
return false;
}
,getBuffered: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.buffered;
return null;
}
,getCurrentSrc: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.currentSrc;
return null;
}
,getCurrentTime: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.currentTime;
return 0;
}
,getDefaultPlaybackRate: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.defaultPlaybackRate;
return 1;
}
,getDuration: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.duration;
return 0;
}
,getEnded: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.ended;
return false;
}
,getError: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.error;
return null;
}
,getLoop: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.loop;
return false;
}
,getMuted: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.muted;
return false;
}
,getNetworkState: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.networkState;
return 0;
}
,getPaused: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.paused;
return false;
}
,getPlaybackRate: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.playbackRate;
return 1;
}
,getPlayed: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.played;
return null;
}
,getPreload: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.preload;
return null;
}
,getReadyState: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.readyState;
return 0;
}
,getSeekable: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.seekable;
return null;
}
,getSeeking: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.seeking;
return false;
}
,getSrc: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.src;
return null;
}
,getStartTime: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.playbackRate;
return 0;
}
,getVolume: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.volume;
return 1;
}
,load: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.load();
}
,pause: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.pause();
}
,play: function(buffer) {
if(buffer.__srcAudio != null) return buffer.__srcAudio.play();
}
,setAutoplay: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.autoplay = value;
}
,setCurrentTime: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.currentTime = value;
}
,setDefaultPlaybackRate: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.defaultPlaybackRate = value;
}
,setLoop: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.loop = value;
}
,setMuted: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.muted = value;
}
,setPlaybackRate: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.playbackRate = value;
}
,setPreload: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.preload = value;
}
,setSrc: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.src = value;
}
,setVolume: function(buffer,value) {
if(buffer.__srcAudio != null) buffer.__srcAudio.volume = value;
}
,__class__: lime_media_HTML5AudioContext
};
var lime_media_codecs_vorbis_VorbisComment = function() {
};
$hxClasses["lime.media.codecs.vorbis.VorbisComment"] = lime_media_codecs_vorbis_VorbisComment;
lime_media_codecs_vorbis_VorbisComment.__name__ = ["lime","media","codecs","vorbis","VorbisComment"];
lime_media_codecs_vorbis_VorbisComment.prototype = {
userComments: null
,vendor: null
,__class__: lime_media_codecs_vorbis_VorbisComment
};
var lime_media_codecs_vorbis_VorbisFile = function(handle) {
this.handle = handle;
};
$hxClasses["lime.media.codecs.vorbis.VorbisFile"] = lime_media_codecs_vorbis_VorbisFile;
lime_media_codecs_vorbis_VorbisFile.__name__ = ["lime","media","codecs","vorbis","VorbisFile"];
lime_media_codecs_vorbis_VorbisFile.fromBytes = function(bytes) {
return null;
};
lime_media_codecs_vorbis_VorbisFile.fromFile = function(path) {
return null;
};
lime_media_codecs_vorbis_VorbisFile.prototype = {
bitstream: null
,handle: null
,bitrate: function(bitstream) {
if(bitstream == null) bitstream = -1;
return 0;
}
,bitrateInstant: function() {
return 0;
}
,clear: function() {
}
,comment: function(bitstream) {
if(bitstream == null) bitstream = -1;
return null;
}
,crosslap: function(other) {
return 0;
}
,info: function(bitstream) {
if(bitstream == null) bitstream = -1;
return null;
}
,pcmSeek: function(pos) {
return 0;
}
,pcmSeekLap: function(pos) {
return 0;
}
,pcmSeekPage: function(pos) {
return 0;
}
,pcmSeekPageLap: function(pos) {
return 0;
}
,pcmTell: function() {
var x = new haxe__$Int64__$_$_$Int64(0,0);
return x;
}
,pcmTotal: function(bitstream) {
if(bitstream == null) bitstream = -1;
var x = new haxe__$Int64__$_$_$Int64(0,0);
return x;
}
,rawSeek: function(pos) {
return 0;
}
,rawSeekLap: function(pos) {
return 0;
}
,rawTell: function() {
var x = new haxe__$Int64__$_$_$Int64(0,0);
return x;
}
,rawTotal: function(bitstream) {
if(bitstream == null) bitstream = -1;
var x = new haxe__$Int64__$_$_$Int64(0,0);
return x;
}
,read: function(buffer,position,length,bigEndianPacking,wordSize,signed) {
if(signed == null) signed = true;
if(wordSize == null) wordSize = 2;
if(bigEndianPacking == null) bigEndianPacking = false;
if(length == null) length = 4096;
return 0;
}
,readFloat: function(pcmChannels,samples) {
return 0;
}
,seekable: function() {
return false;
}
,serialNumber: function(bitstream) {
if(bitstream == null) bitstream = -1;
return 0;
}
,streams: function() {
return 0;
}
,timeSeek: function(s) {
return 0;
}
,timeSeekLap: function(s) {
return 0;
}
,timeSeekPage: function(s) {
return 0;
}
,timeSeekPageLap: function(s) {
return 0;
}
,timeTell: function() {
return 0;
}
,timeTotal: function(bitstream) {
if(bitstream == null) bitstream = -1;
return 0;
}
,__class__: lime_media_codecs_vorbis_VorbisFile
};
var lime_media_codecs_vorbis_VorbisInfo = function() {
};
$hxClasses["lime.media.codecs.vorbis.VorbisInfo"] = lime_media_codecs_vorbis_VorbisInfo;
lime_media_codecs_vorbis_VorbisInfo.__name__ = ["lime","media","codecs","vorbis","VorbisInfo"];
lime_media_codecs_vorbis_VorbisInfo.prototype = {
bitrateLower: null
,bitrateNominal: null
,bitrateUpper: null
,channels: null
,rate: null
,version: null
,__class__: lime_media_codecs_vorbis_VorbisInfo
};
var lime_media_openal_AL = function() { };
$hxClasses["lime.media.openal.AL"] = lime_media_openal_AL;
lime_media_openal_AL.__name__ = ["lime","media","openal","AL"];
lime_media_openal_AL.bufferData = function(buffer,format,data,size,freq) {
};
lime_media_openal_AL.buffer3f = function(buffer,param,value1,value2,value3) {
};
lime_media_openal_AL.buffer3i = function(buffer,param,value1,value2,value3) {
};
lime_media_openal_AL.bufferf = function(buffer,param,value) {
};
lime_media_openal_AL.bufferfv = function(buffer,param,values) {
};
lime_media_openal_AL.bufferi = function(buffer,param,value) {
};
lime_media_openal_AL.bufferiv = function(buffer,param,values) {
};
lime_media_openal_AL.createBuffer = function() {
return null;
};
lime_media_openal_AL.createSource = function() {
return null;
};
lime_media_openal_AL.deleteBuffer = function(buffer) {
};
lime_media_openal_AL.deleteBuffers = function(buffers) {
};
lime_media_openal_AL.deleteSource = function(source) {
};
lime_media_openal_AL.deleteSources = function(sources) {
};
lime_media_openal_AL.disable = function(capability) {
};
lime_media_openal_AL.distanceModel = function(distanceModel) {
};
lime_media_openal_AL.dopplerFactor = function(value) {
};
lime_media_openal_AL.dopplerVelocity = function(value) {
};
lime_media_openal_AL.enable = function(capability) {
};
lime_media_openal_AL.genSource = function() {
return null;
};
lime_media_openal_AL.genSources = function(n) {
return null;
};
lime_media_openal_AL.genBuffer = function() {
return null;
};
lime_media_openal_AL.genBuffers = function(n) {
return null;
};
lime_media_openal_AL.getBoolean = function(param) {
return false;
};
lime_media_openal_AL.getBooleanv = function(param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getBuffer3f = function(buffer,param) {
return null;
};
lime_media_openal_AL.getBuffer3i = function(buffer,param) {
return null;
};
lime_media_openal_AL.getBufferf = function(buffer,param) {
return 0;
};
lime_media_openal_AL.getBufferfv = function(buffer,param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getBufferi = function(buffer,param) {
return 0;
};
lime_media_openal_AL.getBufferiv = function(buffer,param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getDouble = function(param) {
return 0;
};
lime_media_openal_AL.getDoublev = function(param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getEnumValue = function(ename) {
return 0;
};
lime_media_openal_AL.getError = function() {
return 0;
};
lime_media_openal_AL.getErrorString = function() {
var _g = lime_media_openal_AL.getError();
switch(_g) {
case 40961:
return "INVALID_NAME: Invalid parameter name";
case 40962:
return "INVALID_ENUM: Invalid enum value";
case 40963:
return "INVALID_VALUE: Invalid parameter value";
case 40964:
return "INVALID_OPERATION: Illegal operation or call";
case 40965:
return "OUT_OF_MEMORY: OpenAL has run out of memory";
default:
return "";
}
};
lime_media_openal_AL.getFloat = function(param) {
return 0;
};
lime_media_openal_AL.getFloatv = function(param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getInteger = function(param) {
return 0;
};
lime_media_openal_AL.getIntegerv = function(param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getListener3f = function(param) {
return null;
};
lime_media_openal_AL.getListener3i = function(param) {
return null;
};
lime_media_openal_AL.getListenerf = function(param) {
return 0;
};
lime_media_openal_AL.getListenerfv = function(param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getListeneri = function(param) {
return 0;
};
lime_media_openal_AL.getListeneriv = function(param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getParameter = function(param) {
return null;
};
lime_media_openal_AL.getProcAddress = function(fname) {
return null;
};
lime_media_openal_AL.getSource3f = function(source,param) {
return null;
};
lime_media_openal_AL.getSourcef = function(source,param) {
return 0;
};
lime_media_openal_AL.getSource3i = function(source,param) {
return null;
};
lime_media_openal_AL.getSourcefv = function(source,param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getSourcei = function(source,param) {
return 0;
};
lime_media_openal_AL.getSourceiv = function(source,param,count) {
if(count == null) count = 1;
return null;
};
lime_media_openal_AL.getString = function(param) {
return null;
};
lime_media_openal_AL.isBuffer = function(buffer) {
return false;
};
lime_media_openal_AL.isEnabled = function(capability) {
return false;
};
lime_media_openal_AL.isExtensionPresent = function(extname) {
return false;
};
lime_media_openal_AL.isSource = function(source) {
return false;
};
lime_media_openal_AL.listener3f = function(param,value1,value2,value3) {
};
lime_media_openal_AL.listener3i = function(param,value1,value2,value3) {
};
lime_media_openal_AL.listenerf = function(param,value) {
};
lime_media_openal_AL.listenerfv = function(param,values) {
};
lime_media_openal_AL.listeneri = function(param,value) {
};
lime_media_openal_AL.listeneriv = function(param,values) {
};
lime_media_openal_AL.source3f = function(source,param,value1,value2,value3) {
};
lime_media_openal_AL.source3i = function(source,param,value1,value2,value3) {
};
lime_media_openal_AL.sourcef = function(source,param,value) {
};
lime_media_openal_AL.sourcefv = function(source,param,values) {
};
lime_media_openal_AL.sourcei = function(source,param,value) {
};
lime_media_openal_AL.sourceiv = function(source,param,values) {
};
lime_media_openal_AL.sourcePlay = function(source) {
};
lime_media_openal_AL.sourcePlayv = function(sources) {
};
lime_media_openal_AL.sourceStop = function(source) {
};
lime_media_openal_AL.sourceStopv = function(sources) {
};
lime_media_openal_AL.sourceRewind = function(source) {
};
lime_media_openal_AL.sourceRewindv = function(sources) {
};
lime_media_openal_AL.sourcePause = function(source) {
};
lime_media_openal_AL.sourcePausev = function(sources) {
};
lime_media_openal_AL.sourceQueueBuffer = function(source,buffer) {
};
lime_media_openal_AL.sourceQueueBuffers = function(source,nb,buffers) {
};
lime_media_openal_AL.sourceUnqueueBuffer = function(source) {
return 0;
};
lime_media_openal_AL.sourceUnqueueBuffers = function(source,nb) {
return null;
};
lime_media_openal_AL.speedOfSound = function(value) {
};
var lime_media_openal__$ALBuffer_ALBuffer_$Impl_$ = {};
$hxClasses["lime.media.openal._ALBuffer.ALBuffer_Impl_"] = lime_media_openal__$ALBuffer_ALBuffer_$Impl_$;
lime_media_openal__$ALBuffer_ALBuffer_$Impl_$.__name__ = ["lime","media","openal","_ALBuffer","ALBuffer_Impl_"];
lime_media_openal__$ALBuffer_ALBuffer_$Impl_$._new = function(handle) {
return handle;
};
var lime_media_openal_ALC = function() { };
$hxClasses["lime.media.openal.ALC"] = lime_media_openal_ALC;
lime_media_openal_ALC.__name__ = ["lime","media","openal","ALC"];
lime_media_openal_ALC.closeDevice = function(device) {
return false;
};
lime_media_openal_ALC.createContext = function(device,attrlist) {
return null;
};
lime_media_openal_ALC.destroyContext = function(context) {
};
lime_media_openal_ALC.getContextsDevice = function(context) {
return null;
};
lime_media_openal_ALC.getCurrentContext = function() {
return null;
};
lime_media_openal_ALC.getError = function(device) {
return 0;
};
lime_media_openal_ALC.getErrorString = function(device) {
var _g = lime_media_openal_ALC.getError(device);
switch(_g) {
case 40961:
return "INVALID_DEVICE: Invalid device (or no device?)";
case 40962:
return "INVALID_CONTEXT: Invalid context (or no context?)";
case 40963:
return "INVALID_ENUM: Invalid enum value";
case 40964:
return "INVALID_VALUE: Invalid param value";
case 40965:
return "OUT_OF_MEMORY: OpenAL has run out of memory";
default:
return "";
}
};
lime_media_openal_ALC.getIntegerv = function(device,param,size) {
return null;
};
lime_media_openal_ALC.getString = function(device,param) {
return null;
};
lime_media_openal_ALC.makeContextCurrent = function(context) {
return false;
};
lime_media_openal_ALC.openDevice = function(deviceName) {
return null;
};
lime_media_openal_ALC.pauseDevice = function(device) {
};
lime_media_openal_ALC.processContext = function(context) {
};
lime_media_openal_ALC.resumeDevice = function(device) {
};
lime_media_openal_ALC.suspendContext = function(context) {
};
var lime_media_openal__$ALContext_ALContext_$Impl_$ = {};
$hxClasses["lime.media.openal._ALContext.ALContext_Impl_"] = lime_media_openal__$ALContext_ALContext_$Impl_$;
lime_media_openal__$ALContext_ALContext_$Impl_$.__name__ = ["lime","media","openal","_ALContext","ALContext_Impl_"];
lime_media_openal__$ALContext_ALContext_$Impl_$._new = function(handle) {
return handle;
};
var lime_media_openal__$ALDevice_ALDevice_$Impl_$ = {};
$hxClasses["lime.media.openal._ALDevice.ALDevice_Impl_"] = lime_media_openal__$ALDevice_ALDevice_$Impl_$;
lime_media_openal__$ALDevice_ALDevice_$Impl_$.__name__ = ["lime","media","openal","_ALDevice","ALDevice_Impl_"];
lime_media_openal__$ALDevice_ALDevice_$Impl_$._new = function(handle) {
return handle;
};
var lime_media_openal__$ALSource_ALSource_$Impl_$ = {};
$hxClasses["lime.media.openal._ALSource.ALSource_Impl_"] = lime_media_openal__$ALSource_ALSource_$Impl_$;
lime_media_openal__$ALSource_ALSource_$Impl_$.__name__ = ["lime","media","openal","_ALSource","ALSource_Impl_"];
lime_media_openal__$ALSource_ALSource_$Impl_$._new = function(handle) {
return handle;
};
var lime_net__$IHTTPRequest = function() { };
$hxClasses["lime.net._IHTTPRequest"] = lime_net__$IHTTPRequest;
lime_net__$IHTTPRequest.__name__ = ["lime","net","_IHTTPRequest"];
lime_net__$IHTTPRequest.prototype = {
contentType: null
,data: null
,enableResponseHeaders: null
,followRedirects: null
,formData: null
,headers: null
,method: null
,responseHeaders: null
,responseStatus: null
,timeout: null
,uri: null
,userAgent: null
,cancel: null
,__class__: lime_net__$IHTTPRequest
};
var lime_net__$HTTPRequest_AbstractHTTPRequest = function(uri) {
this.uri = uri;
this.contentType = "application/x-www-form-urlencoded";
this.followRedirects = true;
this.formData = new haxe_ds_StringMap();
this.headers = [];
this.method = "GET";
this.timeout = 30000;
this.backend = new lime__$backend_html5_HTML5HTTPRequest();
this.backend.init(this);
};
$hxClasses["lime.net._HTTPRequest.AbstractHTTPRequest"] = lime_net__$HTTPRequest_AbstractHTTPRequest;
lime_net__$HTTPRequest_AbstractHTTPRequest.__name__ = ["lime","net","_HTTPRequest","AbstractHTTPRequest"];
lime_net__$HTTPRequest_AbstractHTTPRequest.__interfaces__ = [lime_net__$IHTTPRequest];
lime_net__$HTTPRequest_AbstractHTTPRequest.prototype = {
contentType: null
,data: null
,enableResponseHeaders: null
,followRedirects: null
,formData: null
,headers: null
,method: null
,responseData: null
,responseHeaders: null
,responseStatus: null
,timeout: null
,uri: null
,userAgent: null
,backend: null
,cancel: function() {
this.backend.cancel();
}
,load: function(uri) {
return null;
}
,__class__: lime_net__$HTTPRequest_AbstractHTTPRequest
};
var lime_net_HTTPRequest = function(uri) {
lime_net__$HTTPRequest_AbstractHTTPRequest.call(this,uri);
};
$hxClasses["lime.net.HTTPRequest"] = lime_net_HTTPRequest;
lime_net_HTTPRequest.__name__ = ["lime","net","HTTPRequest"];
lime_net_HTTPRequest.__super__ = lime_net__$HTTPRequest_AbstractHTTPRequest;
lime_net_HTTPRequest.prototype = $extend(lime_net__$HTTPRequest_AbstractHTTPRequest.prototype,{
__class__: lime_net_HTTPRequest
});
var lime_net__$HTTPRequest_$Bytes = function(uri) {
lime_net__$HTTPRequest_AbstractHTTPRequest.call(this,uri);
};
$hxClasses["lime.net._HTTPRequest_Bytes"] = lime_net__$HTTPRequest_$Bytes;
lime_net__$HTTPRequest_$Bytes.__name__ = ["lime","net","_HTTPRequest_Bytes"];
lime_net__$HTTPRequest_$Bytes.__super__ = lime_net__$HTTPRequest_AbstractHTTPRequest;
lime_net__$HTTPRequest_$Bytes.prototype = $extend(lime_net__$HTTPRequest_AbstractHTTPRequest.prototype,{
fromBytes: function(bytes) {
return bytes;
}
,load: function(uri) {
var _g = this;
if(uri != null) this.uri = uri;
var promise = new lime_app_Promise();
var future = this.backend.loadData(this.uri);
future.onProgress($bind(promise,promise.progress));
future.onError($bind(promise,promise.error));
future.onComplete(function(bytes) {
_g.responseData = _g.fromBytes(bytes);
promise.complete(_g.responseData);
});
return promise.future;
}
,__class__: lime_net__$HTTPRequest_$Bytes
});
var lime_net__$HTTPRequest_$String = function(uri) {
lime_net__$HTTPRequest_AbstractHTTPRequest.call(this,uri);
};
$hxClasses["lime.net._HTTPRequest_String"] = lime_net__$HTTPRequest_$String;
lime_net__$HTTPRequest_$String.__name__ = ["lime","net","_HTTPRequest_String"];
lime_net__$HTTPRequest_$String.__super__ = lime_net__$HTTPRequest_AbstractHTTPRequest;
lime_net__$HTTPRequest_$String.prototype = $extend(lime_net__$HTTPRequest_AbstractHTTPRequest.prototype,{
load: function(uri) {
var _g = this;
if(uri != null) this.uri = uri;
var promise = new lime_app_Promise();
var future = this.backend.loadText(this.uri);
future.onProgress($bind(promise,promise.progress));
future.onError($bind(promise,promise.error));
future.onComplete(function(text) {
_g.responseData = text;
promise.complete(_g.responseData);
});
return promise.future;
}
,__class__: lime_net__$HTTPRequest_$String
});
var lime_net_HTTPRequestHeader = function(name,value) {
if(value == null) value = "";
this.name = name;
this.value = value;
};
$hxClasses["lime.net.HTTPRequestHeader"] = lime_net_HTTPRequestHeader;
lime_net_HTTPRequestHeader.__name__ = ["lime","net","HTTPRequestHeader"];
lime_net_HTTPRequestHeader.prototype = {
name: null
,value: null
,__class__: lime_net_HTTPRequestHeader
};
var lime_net__$HTTPRequest_$lime_$text_$Font = function(uri) {
lime_net__$HTTPRequest_$Bytes.call(this,uri);
};
$hxClasses["lime.net._HTTPRequest_lime_text_Font"] = lime_net__$HTTPRequest_$lime_$text_$Font;
lime_net__$HTTPRequest_$lime_$text_$Font.__name__ = ["lime","net","_HTTPRequest_lime_text_Font"];
lime_net__$HTTPRequest_$lime_$text_$Font.__super__ = lime_net__$HTTPRequest_$Bytes;
lime_net__$HTTPRequest_$lime_$text_$Font.prototype = $extend(lime_net__$HTTPRequest_$Bytes.prototype,{
fromBytes: function(bytes) {
return lime_text_Font.fromBytes(bytes);
}
,__class__: lime_net__$HTTPRequest_$lime_$text_$Font
});
var lime_net__$HTTPRequest_$lime_$utils_$Bytes = function(uri) {
lime_net__$HTTPRequest_$Bytes.call(this,uri);
};
$hxClasses["lime.net._HTTPRequest_lime_utils_Bytes"] = lime_net__$HTTPRequest_$lime_$utils_$Bytes;
lime_net__$HTTPRequest_$lime_$utils_$Bytes.__name__ = ["lime","net","_HTTPRequest_lime_utils_Bytes"];
lime_net__$HTTPRequest_$lime_$utils_$Bytes.__super__ = lime_net__$HTTPRequest_$Bytes;
lime_net__$HTTPRequest_$lime_$utils_$Bytes.prototype = $extend(lime_net__$HTTPRequest_$Bytes.prototype,{
fromBytes: function(bytes) {
return lime_utils__$Bytes_Bytes_$Impl_$.fromBytes(bytes);
}
,__class__: lime_net__$HTTPRequest_$lime_$utils_$Bytes
});
var lime_net__$HTTPRequest_$openfl_$utils_$ByteArray = function(uri) {
lime_net__$HTTPRequest_$Bytes.call(this,uri);
};
$hxClasses["lime.net._HTTPRequest_openfl_utils_ByteArray"] = lime_net__$HTTPRequest_$openfl_$utils_$ByteArray;
lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.__name__ = ["lime","net","_HTTPRequest_openfl_utils_ByteArray"];
lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.__super__ = lime_net__$HTTPRequest_$Bytes;
lime_net__$HTTPRequest_$openfl_$utils_$ByteArray.prototype = $extend(lime_net__$HTTPRequest_$Bytes.prototype,{
fromBytes: function(bytes) {
return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes);
}
,__class__: lime_net__$HTTPRequest_$openfl_$utils_$ByteArray
});
var lime_system_CFFI = function() { };
$hxClasses["lime.system.CFFI"] = lime_system_CFFI;
lime_system_CFFI.__name__ = ["lime","system","CFFI"];
lime_system_CFFI.load = function(library,method,args,lazy) {
if(lazy == null) lazy = false;
if(args == null) args = 0;
if(!lime_system_CFFI.enabled) return Reflect.makeVarArgs(function(__) {
return { };
});
var result = null;
return result;
};
lime_system_CFFI.__findHaxelib = function(library) {
return "";
};
lime_system_CFFI.__loaderTrace = function(message) {
};
lime_system_CFFI.__sysName = function() {
return null;
};
lime_system_CFFI.__tryLoad = function(name,library,func,args) {
return null;
};
var lime_system__$CFFIPointer_CFFIPointer_$Impl_$ = {};
$hxClasses["lime.system._CFFIPointer.CFFIPointer_Impl_"] = lime_system__$CFFIPointer_CFFIPointer_$Impl_$;
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.__name__ = ["lime","system","_CFFIPointer","CFFIPointer_Impl_"];
lime_system__$CFFIPointer_CFFIPointer_$Impl_$._new = function(handle) {
return handle;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get = function(this1) {
if(this1 != null) {
}
return 0;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.equals = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) == b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.equalsPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) == lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThan = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) > b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) > lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanOrEqual = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) >= b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanOrEqualPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) >= lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThan = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) < b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) < lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanOrEqual = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) <= b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanOrEqualPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) <= lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.notEquals = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) != b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.notEqualsPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) != lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
var lime_system_Clipboard = function() { };
$hxClasses["lime.system.Clipboard"] = lime_system_Clipboard;
lime_system_Clipboard.__name__ = ["lime","system","Clipboard"];
lime_system_Clipboard.__properties__ = {set_text:"set_text",get_text:"get_text"}
lime_system_Clipboard.get_text = function() {
return lime_system_Clipboard._text;
};
lime_system_Clipboard.set_text = function(value) {
lime_system_Clipboard._text = value;
var $window = lime_app_Application.current.__windows[0];
if($window != null) $window.backend.setClipboard(value);
return value;
};
var lime_system_Display = function() {
};
$hxClasses["lime.system.Display"] = lime_system_Display;
lime_system_Display.__name__ = ["lime","system","Display"];
lime_system_Display.prototype = {
bounds: null
,currentMode: null
,id: null
,dpi: null
,name: null
,supportedModes: null
,__class__: lime_system_Display
};
var lime_system_DisplayMode = function(width,height,refreshRate,pixelFormat) {
this.width = width;
this.height = height;
this.refreshRate = refreshRate;
this.pixelFormat = pixelFormat;
};
$hxClasses["lime.system.DisplayMode"] = lime_system_DisplayMode;
lime_system_DisplayMode.__name__ = ["lime","system","DisplayMode"];
lime_system_DisplayMode.prototype = {
height: null
,pixelFormat: null
,refreshRate: null
,width: null
,__class__: lime_system_DisplayMode
};
var lime_system_Endian = $hxClasses["lime.system.Endian"] = { __ename__ : ["lime","system","Endian"], __constructs__ : ["LITTLE_ENDIAN","BIG_ENDIAN"] };
lime_system_Endian.LITTLE_ENDIAN = ["LITTLE_ENDIAN",0];
lime_system_Endian.LITTLE_ENDIAN.toString = $estr;
lime_system_Endian.LITTLE_ENDIAN.__enum__ = lime_system_Endian;
lime_system_Endian.BIG_ENDIAN = ["BIG_ENDIAN",1];
lime_system_Endian.BIG_ENDIAN.toString = $estr;
lime_system_Endian.BIG_ENDIAN.__enum__ = lime_system_Endian;
var lime_system_System = function() { };
$hxClasses["lime.system.System"] = lime_system_System;
lime_system_System.__name__ = ["lime","system","System"];
lime_system_System.__properties__ = {get_userDirectory:"get_userDirectory",get_numDisplays:"get_numDisplays",get_fontsDirectory:"get_fontsDirectory",get_endianness:"get_endianness",get_documentsDirectory:"get_documentsDirectory",get_desktopDirectory:"get_desktopDirectory",get_applicationStorageDirectory:"get_applicationStorageDirectory",get_applicationDirectory:"get_applicationDirectory",set_allowScreenTimeout:"set_allowScreenTimeout",get_allowScreenTimeout:"get_allowScreenTimeout"}
lime_system_System.embed = $hx_exports.lime.embed = function(projectName,element,width,height,windowConfig) {
if(lime_system_System.__applicationEntryPoint == null || lime_system_System.__applicationConfig == null) return;
if(lime_system_System.__applicationEntryPoint.exists(projectName)) {
var htmlElement = null;
if(typeof(element) == "string") htmlElement = window.document.getElementById(element); else if(element == null) htmlElement = window.document.createElement("div"); else htmlElement = element;
if(htmlElement == null) {
window.console.log("[lime.embed] ERROR: Cannot find target element: " + Std.string(element));
return;
}
if(width == null) width = 0;
if(height == null) height = 0;
var defaultConfig = lime_system_System.__applicationConfig.get(projectName);
var config = { };
lime_system_System.__copyMissingFields(config,defaultConfig);
if(windowConfig != null) {
config.windows = [];
if((windowConfig instanceof Array) && windowConfig.__enum__ == null) config.windows = windowConfig; else config.windows[0] = windowConfig;
var _g1 = 0;
var _g = config.windows.length;
while(_g1 < _g) {
var i = _g1++;
if(i < defaultConfig.windows.length) lime_system_System.__copyMissingFields(config.windows[i],defaultConfig.windows[i]);
lime_system_System.__copyMissingFields(config.windows[i].parameters,defaultConfig.windows[i].parameters);
if(typeof(windowConfig.background) == "string") {
var background = StringTools.replace(Std.string(windowConfig.background),"#","");
if(background.indexOf("0x") > -1) windowConfig.background = Std.parseInt(background); else windowConfig.background = Std.parseInt("0x" + background);
}
}
}
if(Reflect.field(config.windows[0],"rootPath")) {
config.rootPath = Reflect.field(config.windows[0],"rootPath");
Reflect.deleteField(config.windows[0],"rootPath");
}
config.windows[0].element = htmlElement;
config.windows[0].width = width;
config.windows[0].height = height;
lime_system_System.__applicationEntryPoint.get(projectName)(config);
}
};
lime_system_System.exit = function(code) {
};
lime_system_System.getDisplay = function(id) {
if(id == 0) {
var display = new lime_system_Display();
display.id = 0;
display.name = "Generic Display";
display.dpi = 96 * window.devicePixelRatio;
display.currentMode = new lime_system_DisplayMode(window.screen.width,window.screen.height,60,1);
display.supportedModes = [display.currentMode];
display.bounds = new lime_math_Rectangle(0,0,display.currentMode.width,display.currentMode.height);
return display;
}
return null;
};
lime_system_System.getTimer = function() {
return new Date().getTime();
};
lime_system_System.load = function(library,method,args,lazy) {
if(lazy == null) lazy = false;
if(args == null) args = 0;
return lime_system_CFFI.load(library,method,args,lazy);
};
lime_system_System.openFile = function(path) {
if(path != null) window.open(path,"_blank");
};
lime_system_System.openURL = function(url,target) {
if(target == null) target = "_blank";
if(url != null) window.open(url,target);
};
lime_system_System.__copyMissingFields = function(target,source) {
if(source == null || target == null) return;
var _g = 0;
var _g1 = Reflect.fields(source);
while(_g < _g1.length) {
var field = _g1[_g];
++_g;
if(!Object.prototype.hasOwnProperty.call(target,field)) Reflect.setField(target,field,Reflect.field(source,field));
}
};
lime_system_System.__getDirectory = function(type) {
return null;
};
lime_system_System.__registerEntryPoint = function(projectName,entryPoint,config) {
if(lime_system_System.__applicationConfig == null) lime_system_System.__applicationConfig = new haxe_ds_StringMap();
if(lime_system_System.__applicationEntryPoint == null) lime_system_System.__applicationEntryPoint = new haxe_ds_StringMap();
{
lime_system_System.__applicationEntryPoint.set(projectName,entryPoint);
entryPoint;
}
{
lime_system_System.__applicationConfig.set(projectName,config);
config;
}
};
lime_system_System.get_allowScreenTimeout = function() {
return true;
};
lime_system_System.set_allowScreenTimeout = function(value) {
return true;
};
lime_system_System.get_applicationDirectory = function() {
return lime_system_System.__getDirectory(0);
};
lime_system_System.get_applicationStorageDirectory = function() {
return lime_system_System.__getDirectory(1);
};
lime_system_System.get_desktopDirectory = function() {
return lime_system_System.__getDirectory(2);
};
lime_system_System.get_documentsDirectory = function() {
return lime_system_System.__getDirectory(3);
};
lime_system_System.get_fontsDirectory = function() {
return lime_system_System.__getDirectory(4);
};
lime_system_System.get_numDisplays = function() {
return 1;
};
lime_system_System.get_userDirectory = function() {
return lime_system_System.__getDirectory(5);
};
lime_system_System.get_endianness = function() {
return lime_system_Endian.LITTLE_ENDIAN;
};
var lime_system_ThreadPool = function(minThreads,maxThreads) {
if(maxThreads == null) maxThreads = 1;
if(minThreads == null) minThreads = 0;
this.onProgress = new lime_app__$Event_$Dynamic_$Void();
this.onError = new lime_app__$Event_$Dynamic_$Void();
this.onComplete = new lime_app__$Event_$Dynamic_$Void();
this.doWork = new lime_app__$Event_$Dynamic_$Void();
this.minThreads = minThreads;
this.maxThreads = maxThreads;
this.currentThreads = 0;
};
$hxClasses["lime.system.ThreadPool"] = lime_system_ThreadPool;
lime_system_ThreadPool.__name__ = ["lime","system","ThreadPool"];
lime_system_ThreadPool.prototype = {
currentThreads: null
,doWork: null
,maxThreads: null
,minThreads: null
,onComplete: null
,onError: null
,onProgress: null
,queue: function(state) {
this.doWork.dispatch(state);
}
,sendComplete: function(state) {
this.onComplete.dispatch(state);
}
,sendError: function(state) {
this.onError.dispatch(state);
}
,sendProgress: function(state) {
this.onProgress.dispatch(state);
}
,__class__: lime_system_ThreadPool
};
var lime_system__$ThreadPool_ThreadPoolMessageType = $hxClasses["lime.system._ThreadPool.ThreadPoolMessageType"] = { __ename__ : ["lime","system","_ThreadPool","ThreadPoolMessageType"], __constructs__ : ["COMPLETE","ERROR","EXIT","PROGRESS","WORK"] };
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE = ["COMPLETE",0];
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR = ["ERROR",1];
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT = ["EXIT",2];
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS = ["PROGRESS",3];
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.WORK = ["WORK",4];
lime_system__$ThreadPool_ThreadPoolMessageType.WORK.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.WORK.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
var lime_system__$ThreadPool_ThreadPoolMessage = function(type,state) {
this.type = type;
this.state = state;
};
$hxClasses["lime.system._ThreadPool.ThreadPoolMessage"] = lime_system__$ThreadPool_ThreadPoolMessage;
lime_system__$ThreadPool_ThreadPoolMessage.__name__ = ["lime","system","_ThreadPool","ThreadPoolMessage"];
lime_system__$ThreadPool_ThreadPoolMessage.prototype = {
state: null
,type: null
,__class__: lime_system__$ThreadPool_ThreadPoolMessage
};
var lime_text_Font = function(name) {
if(name != null) this.name = name;
if(this.__fontPath != null) this.__fromFile(this.__fontPath);
};
$hxClasses["lime.text.Font"] = lime_text_Font;
lime_text_Font.__name__ = ["lime","text","Font"];
lime_text_Font.fromBytes = function(bytes) {
if(bytes == null) return null;
var font = new lime_text_Font();
font.__fromBytes(bytes);
return font;
};
lime_text_Font.fromFile = function(path) {
if(path == null) return null;
var font = new lime_text_Font();
font.__fromFile(path);
return font;
};
lime_text_Font.loadFromBytes = function(bytes) {
return lime_app_Future.withValue(lime_text_Font.fromBytes(bytes));
};
lime_text_Font.loadFromFile = function(path) {
var request = new lime_net__$HTTPRequest_$lime_$text_$Font();
return request.load(path).then(function(font) {
if(font != null) return lime_app_Future.withValue(font); else return lime_app_Future.withError("");
});
};
lime_text_Font.loadFromName = function(path) {
var font = new lime_text_Font();
return font.__loadFromName(path);
};
lime_text_Font.__makeLoaderNode = function(fontFamily) {
var node = window.document.createElement("span");
node.innerHTML = "giItT1WQy@!-/#";
var style = node.style;
style.position = "absolute";
style.left = "-10000px";
style.top = "-10000px";
style.fontSize = "300px";
style.fontFamily = fontFamily;
style.fontVariant = "normal";
style.fontStyle = "normal";
style.fontWeight = "normal";
style.letterSpacing = "0";
window.document.body.appendChild(node);
return node;
};
lime_text_Font.prototype = {
ascender: null
,descender: null
,height: null
,name: null
,numGlyphs: null
,src: null
,underlinePosition: null
,underlineThickness: null
,unitsPerEM: null
,__fontPath: null
,decompose: function() {
return null;
}
,getGlyph: function(character) {
return -1;
}
,getGlyphs: function(characters) {
if(characters == null) characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^`'\"/\\&*()[]{}<>|:;_-+=?,. ";
return null;
}
,getGlyphMetrics: function(glyph) {
return null;
}
,renderGlyph: function(glyph,fontSize) {
return null;
}
,renderGlyphs: function(glyphs,fontSize) {
return null;
}
,__fromBytes: function(bytes) {
this.__fontPath = null;
}
,__fromFile: function(path) {
this.__fontPath = path;
}
,__loadFromName: function(name) {
var _g = this;
var promise = new lime_app_Promise();
this.name = name;
var font = name;
var ua = window.navigator.userAgent.toLowerCase();
if(!(ua.indexOf(" safari/") >= 0 && ua.indexOf(" chrome/") < 0) && (window.document.fonts && ($_=window.document.fonts,$bind($_,$_.load)))) window.document.fonts.load("1em '" + font + "'").then(function(_) {
promise.complete(_g);
}); else {
var node1 = lime_text_Font.__makeLoaderNode("sans-serif");
var node2 = lime_text_Font.__makeLoaderNode("serif");
var width1 = node1.offsetWidth;
var width2 = node2.offsetWidth;
node1.style.fontFamily = "'" + name + "', sans-serif";
node2.style.fontFamily = "'" + name + "', serif";
var interval = null;
var found = false;
var checkFont = function() {
if(node1.offsetWidth != width1 || node2.offsetWidth != width2) {
if(!found) {
found = true;
return false;
}
if(interval != null) window.clearInterval(interval);
node1.parentNode.removeChild(node1);
node2.parentNode.removeChild(node2);
node1 = null;
node2 = null;
promise.complete(_g);
return true;
}
return false;
};
if(!checkFont()) interval = window.setInterval(checkFont,50);
}
return promise.future;
}
,__setSize: function(size) {
}
,get_ascender: function() {
return 0;
}
,get_descender: function() {
return 0;
}
,get_height: function() {
return 0;
}
,get_numGlyphs: function() {
return 0;
}
,get_underlinePosition: function() {
return 0;
}
,get_underlineThickness: function() {
return 0;
}
,get_unitsPerEM: function() {
return 0;
}
,__class__: lime_text_Font
,__properties__: {get_unitsPerEM:"get_unitsPerEM",get_underlineThickness:"get_underlineThickness",get_underlinePosition:"get_underlinePosition",get_numGlyphs:"get_numGlyphs",get_height:"get_height",get_descender:"get_descender",get_ascender:"get_ascender"}
};
var lime_text__$Glyph_Glyph_$Impl_$ = {};
$hxClasses["lime.text._Glyph.Glyph_Impl_"] = lime_text__$Glyph_Glyph_$Impl_$;
lime_text__$Glyph_Glyph_$Impl_$.__name__ = ["lime","text","_Glyph","Glyph_Impl_"];
lime_text__$Glyph_Glyph_$Impl_$._new = function(i) {
return i;
};
var lime_text_GlyphMetrics = function() {
};
$hxClasses["lime.text.GlyphMetrics"] = lime_text_GlyphMetrics;
lime_text_GlyphMetrics.__name__ = ["lime","text","GlyphMetrics"];
lime_text_GlyphMetrics.prototype = {
advance: null
,height: null
,horizontalBearing: null
,verticalBearing: null
,__class__: lime_text_GlyphMetrics
};
var lime_text_GlyphPosition = function(glyph,advance,offset) {
this.glyph = glyph;
this.advance = advance;
if(offset != null) this.offset = offset; else this.offset = new lime_math_Vector2();
};
$hxClasses["lime.text.GlyphPosition"] = lime_text_GlyphPosition;
lime_text_GlyphPosition.__name__ = ["lime","text","GlyphPosition"];
lime_text_GlyphPosition.prototype = {
advance: null
,glyph: null
,offset: null
,__class__: lime_text_GlyphPosition
};
var lime_text__$TextDirection_TextDirection_$Impl_$ = {};
$hxClasses["lime.text._TextDirection.TextDirection_Impl_"] = lime_text__$TextDirection_TextDirection_$Impl_$;
lime_text__$TextDirection_TextDirection_$Impl_$.__name__ = ["lime","text","_TextDirection","TextDirection_Impl_"];
lime_text__$TextDirection_TextDirection_$Impl_$.__properties__ = {get_vertical:"get_vertical",get_horizontal:"get_horizontal",get_forward:"get_forward",get_backward:"get_backward"}
lime_text__$TextDirection_TextDirection_$Impl_$.reverse = function(this1) {
this1 = this1 ^ 1;
};
lime_text__$TextDirection_TextDirection_$Impl_$.toString = function(this1) {
switch(this1) {
case 4:
return "leftToRight";
case 5:
return "rightToLeft";
case 6:
return "topToBottom";
case 7:
return "bottomToTop";
default:
return "";
}
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_backward = function(this1) {
return (this1 & -3) == 5;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_forward = function(this1) {
return (this1 & -3) == 4;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_horizontal = function(this1) {
return (this1 & -2) == 4;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_vertical = function(this1) {
return (this1 & -2) == 6;
};
var lime_text_TextLayout = function(text,font,size,direction,script,language) {
if(language == null) language = "en";
if(script == null) script = "Zyyy";
if(direction == null) direction = 4;
if(size == null) size = 12;
if(text == null) text = "";
this.set_text(text);
this.set_font(font);
this.set_size(size);
this.__direction = direction;
this.__script = script;
this.__language = language;
this.positions = [];
this.__dirty = true;
};
$hxClasses["lime.text.TextLayout"] = lime_text_TextLayout;
lime_text_TextLayout.__name__ = ["lime","text","TextLayout"];
lime_text_TextLayout.prototype = {
font: null
,glyphs: null
,positions: null
,size: null
,text: null
,__dirty: null
,__buffer: null
,__direction: null
,__handle: null
,__language: null
,__script: null
,__position: function() {
this.positions = [];
}
,get_positions: function() {
if(this.__dirty) {
this.__dirty = false;
this.__position();
}
return this.positions;
}
,get_direction: function() {
return this.__direction;
}
,set_direction: function(value) {
if(value == this.__direction) return value;
this.__direction = value;
this.__dirty = true;
return value;
}
,set_font: function(value) {
if(value == this.font) return value;
this.font = value;
this.__dirty = true;
return value;
}
,get_glyphs: function() {
var glyphs = [];
var _g = 0;
var _g1 = this.get_positions();
while(_g < _g1.length) {
var position = _g1[_g];
++_g;
glyphs.push(position.glyph);
}
return glyphs;
}
,get_language: function() {
return this.__language;
}
,set_language: function(value) {
if(value == this.__language) return value;
this.__language = value;
this.__dirty = true;
return value;
}
,get_script: function() {
return this.__script;
}
,set_script: function(value) {
if(value == this.__script) return value;
this.__script = value;
this.__dirty = true;
return value;
}
,set_size: function(value) {
if(value == this.size) return value;
this.size = value;
this.__dirty = true;
return value;
}
,set_text: function(value) {
if(value == this.text) return value;
this.text = value;
this.__dirty = true;
return value;
}
,__class__: lime_text_TextLayout
,__properties__: {set_text:"set_text",set_size:"set_size",set_script:"set_script",get_script:"get_script",get_positions:"get_positions",set_language:"set_language",get_language:"get_language",get_glyphs:"get_glyphs",set_font:"set_font",set_direction:"set_direction",get_direction:"get_direction"}
};
var lime_text__$TextScript_TextScript_$Impl_$ = {};
$hxClasses["lime.text._TextScript.TextScript_Impl_"] = lime_text__$TextScript_TextScript_$Impl_$;
lime_text__$TextScript_TextScript_$Impl_$.__name__ = ["lime","text","_TextScript","TextScript_Impl_"];
lime_text__$TextScript_TextScript_$Impl_$.__properties__ = {get_rightToLeft:"get_rightToLeft"}
lime_text__$TextScript_TextScript_$Impl_$.get_rightToLeft = function(this1) {
switch(this1) {
case "Hebr":case "Arab":case "Syrc":case "Thaa":case "Nkoo":case "Samr":case "Mand":case "Armi":case "Phnx":case "Lydi":case "Cprt":case "Khar":case "Sarb":case "Avst":case "Phli":case "Phlp":case "Orkh":
return true;
default:
return false;
}
};
var lime_tools_helpers_StringHelper = function() { };
$hxClasses["lime.tools.helpers.StringHelper"] = lime_tools_helpers_StringHelper;
lime_tools_helpers_StringHelper.__name__ = ["lime","tools","helpers","StringHelper"];
lime_tools_helpers_StringHelper.base64Decode = function(base64) {
base64 = StringTools.trim(base64);
base64 = StringTools.replace(base64,"=","");
if(lime_tools_helpers_StringHelper.base64Encoder == null) lime_tools_helpers_StringHelper.base64Encoder = new haxe_crypto_BaseCode(haxe_io_Bytes.ofString(lime_tools_helpers_StringHelper.base64Chars));
var bytes = lime_tools_helpers_StringHelper.base64Encoder.decodeBytes(haxe_io_Bytes.ofString(base64));
return bytes;
};
lime_tools_helpers_StringHelper.base64Encode = function(bytes) {
var extension;
var _g = bytes.length % 3;
switch(_g) {
case 1:
extension = "==";
break;
case 2:
extension = "=";
break;
default:
extension = "";
}
if(lime_tools_helpers_StringHelper.base64Encoder == null) lime_tools_helpers_StringHelper.base64Encoder = new haxe_crypto_BaseCode(haxe_io_Bytes.ofString(lime_tools_helpers_StringHelper.base64Chars));
return lime_tools_helpers_StringHelper.base64Encoder.encodeBytes(bytes).toString() + extension;
};
lime_tools_helpers_StringHelper.formatArray = function(array) {
var output = "[ ";
var _g1 = 0;
var _g = array.length;
while(_g1 < _g) {
var i = _g1++;
output += Std.string(array[i]);
if(i < array.length - 1) output += ", "; else output += " ";
}
output += "]";
return output;
};
lime_tools_helpers_StringHelper.formatEnum = function(value) {
return Type.getEnumName(Type.getEnum(value)) + "." + Std.string(value);
};
lime_tools_helpers_StringHelper.formatUppercaseVariable = function(name) {
var isAlpha = new EReg("[A-Z0-9]","i");
var variableName = "";
var lastWasUpperCase = false;
var lastWasAlpha = true;
var _g1 = 0;
var _g = name.length;
while(_g1 < _g) {
var i = _g1++;
var $char = name.charAt(i);
if(!isAlpha.match($char)) {
variableName += "_";
lastWasUpperCase = false;
lastWasAlpha = false;
} else {
if($char == $char.toUpperCase() && i > 0) {
if(lastWasUpperCase) {
if(i == name.length - 1 || name.charAt(i + 1) == name.charAt(i + 1).toUpperCase()) variableName += $char; else variableName += "_" + $char;
} else if(lastWasAlpha) variableName += "_" + $char; else variableName += $char;
lastWasUpperCase = true;
} else {
variableName += $char.toUpperCase();
lastWasUpperCase = i == 0 && $char == $char.toUpperCase();
}
lastWasAlpha = true;
}
}
return variableName;
};
lime_tools_helpers_StringHelper.generateHashCode = function(value) {
var hash = 5381;
var length = value.length;
var _g1 = 0;
var _g = value.length;
while(_g1 < _g) {
var i = _g1++;
hash = (hash << 5) + hash + HxOverrides.cca(value,i);
}
return hash;
};
lime_tools_helpers_StringHelper.generateUUID = function(length,radix,seed) {
var chars = lime_tools_helpers_StringHelper.uuidChars.split("");
if(radix == null || radix > chars.length) radix = chars.length; else if(radix < 2) radix = 2;
if(seed == null) seed = Math.floor(Math.random() * 2147483647.0);
var uuid = [];
var seedValue = Math.round(Math.abs(seed));
var _g = 0;
while(_g < length) {
var i = _g++;
seedValue = seedValue * 16807.0 % 2147483647.0 | 0;
uuid[i] = chars[0 | (seedValue / 2147483647.0 * radix | 0)];
}
return uuid.join("");
};
lime_tools_helpers_StringHelper.getFlatName = function(name) {
var chars = name.toLowerCase();
var flatName = "";
var _g1 = 0;
var _g = chars.length;
while(_g1 < _g) {
var i = _g1++;
var code = HxOverrides.cca(chars,i);
if(i > 0 && code >= HxOverrides.cca("0",0) && code <= HxOverrides.cca("9",0) || code >= HxOverrides.cca("a",0) && code <= HxOverrides.cca("z",0) || code == HxOverrides.cca("_",0)) flatName += chars.charAt(i); else flatName += "_";
}
if(flatName == "") flatName = "_";
if(HxOverrides.substr(flatName,0,1) == "_") flatName = "file" + flatName;
while(lime_tools_helpers_StringHelper.usedFlatNames.exists(flatName)) {
var match = new EReg("(.*?)(\\d+)","");
if(match.match(flatName)) flatName = match.matched(1) + (Std.parseInt(match.matched(2)) + 1); else flatName += "1";
}
lime_tools_helpers_StringHelper.usedFlatNames.set(flatName,"1");
return flatName;
};
lime_tools_helpers_StringHelper.getUniqueID = function() {
return StringTools.hex(lime_tools_helpers_StringHelper.seedNumber++,8);
};
lime_tools_helpers_StringHelper.underline = function(string,character) {
if(character == null) character = "=";
return string + "\n" + StringTools.lpad("",character,string.length);
};
var lime_ui_Gamepad = function(id) {
this.onDisconnect = new lime_app__$Event_$Void_$Void();
this.onButtonUp = new lime_app__$Event_$lime_$ui_$GamepadButton_$Void();
this.onButtonDown = new lime_app__$Event_$lime_$ui_$GamepadButton_$Void();
this.onAxisMove = new lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void();
this.id = id;
this.connected = true;
};
$hxClasses["lime.ui.Gamepad"] = lime_ui_Gamepad;
lime_ui_Gamepad.__name__ = ["lime","ui","Gamepad"];
lime_ui_Gamepad.addMappings = function(mappings) {
};
lime_ui_Gamepad.__connect = function(id) {
if(!lime_ui_Gamepad.devices.h.hasOwnProperty(id)) {
var gamepad = new lime_ui_Gamepad(id);
lime_ui_Gamepad.devices.h[id] = gamepad;
lime_ui_Gamepad.onConnect.dispatch(gamepad);
}
};
lime_ui_Gamepad.__disconnect = function(id) {
var gamepad = lime_ui_Gamepad.devices.h[id];
if(gamepad != null) gamepad.connected = false;
lime_ui_Gamepad.devices.remove(id);
if(gamepad != null) gamepad.onDisconnect.dispatch();
};
lime_ui_Gamepad.prototype = {
connected: null
,id: null
,onAxisMove: null
,onButtonDown: null
,onButtonUp: null
,onDisconnect: null
,get_guid: function() {
var devices = lime_ui_Joystick.__getDeviceData();
return devices[this.id].id;
}
,get_name: function() {
var devices = lime_ui_Joystick.__getDeviceData();
return devices[this.id].id;
}
,__class__: lime_ui_Gamepad
,__properties__: {get_name:"get_name",get_guid:"get_guid"}
};
var lime_ui__$GamepadAxis_GamepadAxis_$Impl_$ = {};
$hxClasses["lime.ui._GamepadAxis.GamepadAxis_Impl_"] = lime_ui__$GamepadAxis_GamepadAxis_$Impl_$;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.__name__ = ["lime","ui","_GamepadAxis","GamepadAxis_Impl_"];
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.toString = function(this1) {
switch(this1) {
case 0:
return "LEFT_X";
case 1:
return "LEFT_Y";
case 2:
return "RIGHT_X";
case 3:
return "RIGHT_Y";
case 4:
return "TRIGGER_LEFT";
case 5:
return "TRIGGER_RIGHT";
default:
return "UNKNOWN (" + this1 + ")";
}
};
var lime_ui__$GamepadButton_GamepadButton_$Impl_$ = {};
$hxClasses["lime.ui._GamepadButton.GamepadButton_Impl_"] = lime_ui__$GamepadButton_GamepadButton_$Impl_$;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.__name__ = ["lime","ui","_GamepadButton","GamepadButton_Impl_"];
lime_ui__$GamepadButton_GamepadButton_$Impl_$.toString = function(this1) {
switch(this1) {
case 0:
return "A";
case 1:
return "B";
case 2:
return "X";
case 3:
return "Y";
case 4:
return "BACK";
case 5:
return "GUIDE";
case 6:
return "START";
case 7:
return "LEFT_STICK";
case 8:
return "RIGHT_STICK";
case 9:
return "LEFT_SHOULDER";
case 10:
return "RIGHT_SHOULDER";
case 11:
return "DPAD_UP";
case 12:
return "DPAD_DOWN";
case 13:
return "DPAD_LEFT";
case 14:
return "DPAD_RIGHT";
default:
return "UNKNOWN (" + this1 + ")";
}
};
var lime_ui_Joystick = function(id) {
this.onTrackballMove = new lime_app__$Event_$Int_$Float_$Float_$Void();
this.onHatMove = new lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void();
this.onDisconnect = new lime_app__$Event_$Void_$Void();
this.onButtonUp = new lime_app__$Event_$Int_$Void();
this.onButtonDown = new lime_app__$Event_$Int_$Void();
this.onAxisMove = new lime_app__$Event_$Int_$Float_$Void();
this.id = id;
this.connected = true;
};
$hxClasses["lime.ui.Joystick"] = lime_ui_Joystick;
lime_ui_Joystick.__name__ = ["lime","ui","Joystick"];
lime_ui_Joystick.__connect = function(id) {
if(!lime_ui_Joystick.devices.h.hasOwnProperty(id)) {
var joystick = new lime_ui_Joystick(id);
lime_ui_Joystick.devices.h[id] = joystick;
lime_ui_Joystick.onConnect.dispatch(joystick);
}
};
lime_ui_Joystick.__disconnect = function(id) {
var joystick = lime_ui_Joystick.devices.h[id];
if(joystick != null) joystick.connected = false;
lime_ui_Joystick.devices.remove(id);
if(joystick != null) joystick.onDisconnect.dispatch();
};
lime_ui_Joystick.__getDeviceData = function() {
if(navigator.getGamepads) return navigator.getGamepads(); else if(navigator.webkitGetGamepads) return navigator.webkitGetGamepads(); else return null;
};
lime_ui_Joystick.prototype = {
connected: null
,id: null
,onAxisMove: null
,onButtonDown: null
,onButtonUp: null
,onDisconnect: null
,onHatMove: null
,onTrackballMove: null
,get_guid: function() {
var devices = lime_ui_Joystick.__getDeviceData();
return devices[this.id].id;
}
,get_name: function() {
var devices = lime_ui_Joystick.__getDeviceData();
return devices[this.id].id;
}
,get_numAxes: function() {
var devices = lime_ui_Joystick.__getDeviceData();
return devices[this.id].axes.length;
}
,get_numButtons: function() {
var devices = lime_ui_Joystick.__getDeviceData();
return devices[this.id].buttons.length;
}
,get_numHats: function() {
return 0;
}
,get_numTrackballs: function() {
return 0;
}
,__class__: lime_ui_Joystick
,__properties__: {get_numTrackballs:"get_numTrackballs",get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}
};
var lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$ = {};
$hxClasses["lime.ui._JoystickHatPosition.JoystickHatPosition_Impl_"] = lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.__name__ = ["lime","ui","_JoystickHatPosition","JoystickHatPosition_Impl_"];
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.__properties__ = {set_up:"set_up",get_up:"get_up",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_down:"set_down",get_down:"get_down",set_center:"set_center",get_center:"get_center"}
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$._new = function(value) {
return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_center = function(this1) {
return this1 == 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_center = function(this1,value) {
if(value) this1 = 0;
return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_down = function(this1) {
return (this1 & 4) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_down = function(this1,value) {
if(value) this1 |= 4; else this1 &= 268435455 - 4;
return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_left = function(this1) {
return (this1 & 8) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_left = function(this1,value) {
if(value) this1 |= 8; else this1 &= 268435455 - 8;
return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_right = function(this1) {
return (this1 & 2) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_right = function(this1,value) {
if(value) this1 |= 2; else this1 &= 268435455 - 2;
return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_up = function(this1) {
return (this1 & 1) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_up = function(this1,value) {
if(value) this1 |= 1; else this1 &= 268435455 - 1;
return value;
};
var lime_ui__$KeyCode_KeyCode_$Impl_$ = {};
$hxClasses["lime.ui._KeyCode.KeyCode_Impl_"] = lime_ui__$KeyCode_KeyCode_$Impl_$;
lime_ui__$KeyCode_KeyCode_$Impl_$.__name__ = ["lime","ui","_KeyCode","KeyCode_Impl_"];
lime_ui__$KeyCode_KeyCode_$Impl_$.fromScanCode = function(scanCode) {
return 0;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.toScanCode = function(keyCode) {
return 0;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.gt = function(a,b) {
return a > b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.gte = function(a,b) {
return a >= b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.lt = function(a,b) {
return a < b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.lte = function(a,b) {
return a <= b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.plus = function(a,b) {
return a + b;
};
var lime_ui__$KeyModifier_KeyModifier_$Impl_$ = {};
$hxClasses["lime.ui._KeyModifier.KeyModifier_Impl_"] = lime_ui__$KeyModifier_KeyModifier_$Impl_$;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.__name__ = ["lime","ui","_KeyModifier","KeyModifier_Impl_"];
lime_ui__$KeyModifier_KeyModifier_$Impl_$.__properties__ = {set_shiftKey:"set_shiftKey",get_shiftKey:"get_shiftKey",set_numLock:"set_numLock",get_numLock:"get_numLock",set_metaKey:"set_metaKey",get_metaKey:"get_metaKey",set_ctrlKey:"set_ctrlKey",get_ctrlKey:"get_ctrlKey",set_capsLock:"set_capsLock",get_capsLock:"get_capsLock",set_altKey:"set_altKey",get_altKey:"get_altKey"}
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey = function(this1) {
return (this1 & 256) > 0 || (this1 & 512) > 0;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_altKey = function(this1,value) {
if(value) this1 |= 768; else this1 &= 268435455 - 768;
return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_capsLock = function(this1) {
return (this1 & 8192) > 0 || (this1 & 8192) > 0;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_capsLock = function(this1,value) {
if(value) this1 |= 8192; else this1 &= 268435455 - 8192;
return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey = function(this1) {
return (this1 & 64) > 0 || (this1 & 128) > 0;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_ctrlKey = function(this1,value) {
if(value) this1 |= 192; else this1 &= 268435455 - 192;
return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey = function(this1) {
return (this1 & 1024) > 0 || (this1 & 2048) > 0;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_metaKey = function(this1,value) {
if(value) this1 |= 3072; else this1 &= 268435455 - 3072;
return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_numLock = function(this1) {
return (this1 & 4096) > 0 || (this1 & 4096) > 0;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_numLock = function(this1,value) {
if(value) this1 |= 4096; else this1 &= 268435455 - 4096;
return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey = function(this1) {
return (this1 & 1) > 0 || (this1 & 2) > 0;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_shiftKey = function(this1,value) {
if(value) this1 |= 3; else this1 &= 268435455 - 3;
return value;
};
var lime_ui_Mouse = function() { };
$hxClasses["lime.ui.Mouse"] = lime_ui_Mouse;
lime_ui_Mouse.__name__ = ["lime","ui","Mouse"];
lime_ui_Mouse.__properties__ = {set_lock:"set_lock",get_lock:"get_lock",set_cursor:"set_cursor",get_cursor:"get_cursor"}
lime_ui_Mouse.hide = function() {
lime__$backend_html5_HTML5Mouse.hide();
};
lime_ui_Mouse.show = function() {
lime__$backend_html5_HTML5Mouse.show();
};
lime_ui_Mouse.warp = function(x,y,window) {
lime__$backend_html5_HTML5Mouse.warp(x,y,window);
};
lime_ui_Mouse.get_cursor = function() {
return lime__$backend_html5_HTML5Mouse.get_cursor();
};
lime_ui_Mouse.set_cursor = function(value) {
return lime__$backend_html5_HTML5Mouse.set_cursor(value);
};
lime_ui_Mouse.get_lock = function() {
return lime__$backend_html5_HTML5Mouse.get_lock();
};
lime_ui_Mouse.set_lock = function(value) {
return lime__$backend_html5_HTML5Mouse.set_lock(value);
};
var lime_ui_MouseCursor = $hxClasses["lime.ui.MouseCursor"] = { __ename__ : ["lime","ui","MouseCursor"], __constructs__ : ["ARROW","CROSSHAIR","DEFAULT","MOVE","POINTER","RESIZE_NESW","RESIZE_NS","RESIZE_NWSE","RESIZE_WE","TEXT","WAIT","WAIT_ARROW","CUSTOM"] };
lime_ui_MouseCursor.ARROW = ["ARROW",0];
lime_ui_MouseCursor.ARROW.toString = $estr;
lime_ui_MouseCursor.ARROW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.CROSSHAIR = ["CROSSHAIR",1];
lime_ui_MouseCursor.CROSSHAIR.toString = $estr;
lime_ui_MouseCursor.CROSSHAIR.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.DEFAULT = ["DEFAULT",2];
lime_ui_MouseCursor.DEFAULT.toString = $estr;
lime_ui_MouseCursor.DEFAULT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.MOVE = ["MOVE",3];
lime_ui_MouseCursor.MOVE.toString = $estr;
lime_ui_MouseCursor.MOVE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.POINTER = ["POINTER",4];
lime_ui_MouseCursor.POINTER.toString = $estr;
lime_ui_MouseCursor.POINTER.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NESW = ["RESIZE_NESW",5];
lime_ui_MouseCursor.RESIZE_NESW.toString = $estr;
lime_ui_MouseCursor.RESIZE_NESW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NS = ["RESIZE_NS",6];
lime_ui_MouseCursor.RESIZE_NS.toString = $estr;
lime_ui_MouseCursor.RESIZE_NS.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NWSE = ["RESIZE_NWSE",7];
lime_ui_MouseCursor.RESIZE_NWSE.toString = $estr;
lime_ui_MouseCursor.RESIZE_NWSE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_WE = ["RESIZE_WE",8];
lime_ui_MouseCursor.RESIZE_WE.toString = $estr;
lime_ui_MouseCursor.RESIZE_WE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.TEXT = ["TEXT",9];
lime_ui_MouseCursor.TEXT.toString = $estr;
lime_ui_MouseCursor.TEXT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.WAIT = ["WAIT",10];
lime_ui_MouseCursor.WAIT.toString = $estr;
lime_ui_MouseCursor.WAIT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.WAIT_ARROW = ["WAIT_ARROW",11];
lime_ui_MouseCursor.WAIT_ARROW.toString = $estr;
lime_ui_MouseCursor.WAIT_ARROW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.CUSTOM = ["CUSTOM",12];
lime_ui_MouseCursor.CUSTOM.toString = $estr;
lime_ui_MouseCursor.CUSTOM.__enum__ = lime_ui_MouseCursor;
var lime_ui__$ScanCode_ScanCode_$Impl_$ = {};
$hxClasses["lime.ui._ScanCode.ScanCode_Impl_"] = lime_ui__$ScanCode_ScanCode_$Impl_$;
lime_ui__$ScanCode_ScanCode_$Impl_$.__name__ = ["lime","ui","_ScanCode","ScanCode_Impl_"];
lime_ui__$ScanCode_ScanCode_$Impl_$.fromKeyCode = function(keyCode) {
return lime_ui__$KeyCode_KeyCode_$Impl_$.toScanCode(keyCode);
};
lime_ui__$ScanCode_ScanCode_$Impl_$.toKeyCode = function(scanCode) {
return lime_ui__$KeyCode_KeyCode_$Impl_$.fromScanCode(scanCode);
};
lime_ui__$ScanCode_ScanCode_$Impl_$.gt = function(a,b) {
return a > b;
};
lime_ui__$ScanCode_ScanCode_$Impl_$.gte = function(a,b) {
return a >= b;
};
lime_ui__$ScanCode_ScanCode_$Impl_$.lt = function(a,b) {
return a < b;
};
lime_ui__$ScanCode_ScanCode_$Impl_$.lte = function(a,b) {
return a <= b;
};
lime_ui__$ScanCode_ScanCode_$Impl_$.plus = function(a,b) {
return a + b;
};
var lime_ui_Touch = function(x,y,id,dx,dy,pressure,device) {
this.x = x;
this.y = y;
this.id = id;
this.dx = dx;
this.dy = dy;
this.pressure = pressure;
this.device = device;
};
$hxClasses["lime.ui.Touch"] = lime_ui_Touch;
lime_ui_Touch.__name__ = ["lime","ui","Touch"];
lime_ui_Touch.prototype = {
device: null
,dx: null
,dy: null
,id: null
,pressure: null
,x: null
,y: null
,__class__: lime_ui_Touch
};
var lime_ui_Window = function(config) {
this.onTextInput = new lime_app__$Event_$String_$Void();
this.onTextEdit = new lime_app__$Event_$String_$Int_$Int_$Void();
this.onRestore = new lime_app__$Event_$Void_$Void();
this.onResize = new lime_app__$Event_$Int_$Int_$Void();
this.onMove = new lime_app__$Event_$Float_$Float_$Void();
this.onMouseWheel = new lime_app__$Event_$Float_$Float_$Void();
this.onMouseUp = new lime_app__$Event_$Float_$Float_$Int_$Void();
this.onMouseMoveRelative = new lime_app__$Event_$Float_$Float_$Void();
this.onMouseMove = new lime_app__$Event_$Float_$Float_$Void();
this.onMouseDown = new lime_app__$Event_$Float_$Float_$Int_$Void();
this.onMinimize = new lime_app__$Event_$Void_$Void();
this.onLeave = new lime_app__$Event_$Void_$Void();
this.onKeyUp = new lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void();
this.onKeyDown = new lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void();
this.onFullscreen = new lime_app__$Event_$Void_$Void();
this.onFocusOut = new lime_app__$Event_$Void_$Void();
this.onFocusIn = new lime_app__$Event_$Void_$Void();
this.onEnter = new lime_app__$Event_$Void_$Void();
this.onDropFile = new lime_app__$Event_$String_$Void();
this.onDeactivate = new lime_app__$Event_$Void_$Void();
this.onCreate = new lime_app__$Event_$Void_$Void();
this.onClose = new lime_app__$Event_$Void_$Void();
this.onActivate = new lime_app__$Event_$Void_$Void();
this.config = config;
this.__width = 0;
this.__height = 0;
this.__fullscreen = false;
this.__scale = 1;
this.__x = 0;
this.__y = 0;
this.__title = "";
this.id = -1;
if(config != null) {
if(Object.prototype.hasOwnProperty.call(config,"width")) this.__width = config.width;
if(Object.prototype.hasOwnProperty.call(config,"height")) this.__height = config.height;
if(Object.prototype.hasOwnProperty.call(config,"x")) this.__x = config.x;
if(Object.prototype.hasOwnProperty.call(config,"y")) this.__y = config.y;
if(Object.prototype.hasOwnProperty.call(config,"fullscreen")) this.__fullscreen = config.fullscreen;
if(Object.prototype.hasOwnProperty.call(config,"borderless")) this.__borderless = config.borderless;
if(Object.prototype.hasOwnProperty.call(config,"resizable")) this.__resizable = config.resizable;
if(Object.prototype.hasOwnProperty.call(config,"title")) this.__title = config.title;
}
this.backend = new lime__$backend_html5_HTML5Window(this);
};
$hxClasses["lime.ui.Window"] = lime_ui_Window;
lime_ui_Window.__name__ = ["lime","ui","Window"];
lime_ui_Window.prototype = {
application: null
,config: null
,display: null
,id: null
,onActivate: null
,onClose: null
,onCreate: null
,onDeactivate: null
,onDropFile: null
,onEnter: null
,onFocusIn: null
,onFocusOut: null
,onFullscreen: null
,onKeyDown: null
,onKeyUp: null
,onLeave: null
,onMinimize: null
,onMouseDown: null
,onMouseMove: null
,onMouseMoveRelative: null
,onMouseUp: null
,onMouseWheel: null
,onMove: null
,onResize: null
,onRestore: null
,onTextEdit: null
,onTextInput: null
,renderer: null
,scale: null
,stage: null
,backend: null
,__borderless: null
,__fullscreen: null
,__height: null
,__maximized: null
,__minimized: null
,__resizable: null
,__scale: null
,__title: null
,__width: null
,__x: null
,__y: null
,alert: function(message,title) {
this.backend.alert(message,title);
}
,close: function() {
this.backend.close();
}
,create: function(application) {
this.application = application;
this.backend.create(application);
if(this.renderer != null) this.renderer.create();
}
,focus: function() {
this.backend.focus();
}
,move: function(x,y) {
this.backend.move(x,y);
this.__x = x;
this.__y = y;
}
,resize: function(width,height) {
this.backend.resize(width,height);
this.__width = width;
this.__height = height;
}
,setIcon: function(image) {
if(image == null) return;
this.backend.setIcon(image);
}
,toString: function() {
return "[object Window]";
}
,get_display: function() {
return this.backend.getDisplay();
}
,get_displayMode: function() {
return this.backend.getDisplayMode();
}
,set_displayMode: function(value) {
return this.backend.setDisplayMode(value);
}
,get_borderless: function() {
return this.__borderless;
}
,set_borderless: function(value) {
return this.__borderless = this.backend.setBorderless(value);
}
,get_enableTextEvents: function() {
return this.backend.getEnableTextEvents();
}
,set_enableTextEvents: function(value) {
return this.backend.setEnableTextEvents(value);
}
,get_fullscreen: function() {
return this.__fullscreen;
}
,set_fullscreen: function(value) {
return this.__fullscreen = this.backend.setFullscreen(value);
}
,get_height: function() {
return this.__height;
}
,set_height: function(value) {
this.resize(this.__width,value);
return this.__height;
}
,get_maximized: function() {
return this.__maximized;
}
,set_maximized: function(value) {
this.__minimized = false;
return this.__maximized = this.backend.setMaximized(value);
}
,get_minimized: function() {
return this.__minimized;
}
,set_minimized: function(value) {
this.__maximized = false;
return this.__minimized = this.backend.setMinimized(value);
}
,get_resizable: function() {
return this.__resizable;
}
,set_resizable: function(value) {
this.__resizable = this.backend.setResizable(value);
return this.__resizable;
}
,get_scale: function() {
return this.__scale;
}
,get_title: function() {
return this.__title;
}
,set_title: function(value) {
return this.__title = this.backend.setTitle(value);
}
,get_width: function() {
return this.__width;
}
,set_width: function(value) {
this.resize(value,this.__height);
return this.__width;
}
,get_x: function() {
return this.__x;
}
,set_x: function(value) {
this.move(value,this.__y);
return this.__x;
}
,get_y: function() {
return this.__y;
}
,set_y: function(value) {
this.move(this.__x,value);
return this.__y;
}
,__class__: lime_ui_Window
,__properties__: {set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_title:"set_title",get_title:"get_title",get_scale:"get_scale",set_resizable:"set_resizable",get_resizable:"get_resizable",set_minimized:"set_minimized",get_minimized:"get_minimized",set_maximized:"set_maximized",get_maximized:"get_maximized",set_height:"set_height",get_height:"get_height",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_enableTextEvents:"set_enableTextEvents",get_enableTextEvents:"get_enableTextEvents",set_displayMode:"set_displayMode",get_displayMode:"get_displayMode",get_display:"get_display",set_borderless:"set_borderless",get_borderless:"get_borderless"}
};
var lime_utils_TAError = $hxClasses["lime.utils.TAError"] = { __ename__ : ["lime","utils","TAError"], __constructs__ : ["RangeError"] };
lime_utils_TAError.RangeError = ["RangeError",0];
lime_utils_TAError.RangeError.toString = $estr;
lime_utils_TAError.RangeError.__enum__ = lime_utils_TAError;
var lime_utils_AssetCache = function() {
this.enabled = true;
this.audio = new haxe_ds_StringMap();
this.font = new haxe_ds_StringMap();
this.image = new haxe_ds_StringMap();
this.version = 233897;
};
$hxClasses["lime.utils.AssetCache"] = lime_utils_AssetCache;
lime_utils_AssetCache.__name__ = ["lime","utils","AssetCache"];
lime_utils_AssetCache.prototype = {
audio: null
,enabled: null
,image: null
,font: null
,version: null
,exists: function(id,type) {
if(type == "IMAGE" || type == null) {
if(this.image.exists(id)) return true;
}
if(type == "FONT" || type == null) {
if(this.font.exists(id)) return true;
}
if(type == "SOUND" || type == "MUSIC" || type == null) {
if(this.audio.exists(id)) return true;
}
return false;
}
,set: function(id,type,asset) {
switch(type) {
case "FONT":
var value = asset;
this.font.set(id,value);
break;
case "IMAGE":
if(!js_Boot.__instanceof(asset,lime_graphics_Image)) throw new js__$Boot_HaxeError("Cannot cache non-Image asset: " + Std.string(asset) + " as Image");
var value1 = asset;
this.image.set(id,value1);
break;
case "SOUND":case "MUSIC":
if(!js_Boot.__instanceof(asset,lime_media_AudioBuffer)) throw new js__$Boot_HaxeError("Cannot cache non-AudioBuffer asset: " + Std.string(asset) + " as AudioBuffer");
var value2 = asset;
this.audio.set(id,value2);
break;
default:
throw new js__$Boot_HaxeError(type + " assets are not cachable");
}
}
,clear: function(prefix) {
if(prefix == null) {
this.audio = new haxe_ds_StringMap();
this.font = new haxe_ds_StringMap();
this.image = new haxe_ds_StringMap();
} else {
var keys = this.audio.keys();
while( keys.hasNext() ) {
var key = keys.next();
if(StringTools.startsWith(key,prefix)) this.audio.remove(key);
}
var keys1 = this.font.keys();
while( keys1.hasNext() ) {
var key1 = keys1.next();
if(StringTools.startsWith(key1,prefix)) this.font.remove(key1);
}
var keys2 = this.image.keys();
while( keys2.hasNext() ) {
var key2 = keys2.next();
if(StringTools.startsWith(key2,prefix)) this.image.remove(key2);
}
}
}
,__class__: lime_utils_AssetCache
};
var lime_utils_AssetLibrary = function() {
this.types = new haxe_ds_StringMap();
this.sizes = new haxe_ds_StringMap();
this.preload = new haxe_ds_StringMap();
this.paths = new haxe_ds_StringMap();
this.pathGroups = new haxe_ds_StringMap();
this.classTypes = new haxe_ds_StringMap();
this.cachedText = new haxe_ds_StringMap();
this.cachedImages = new haxe_ds_StringMap();
this.cachedFonts = new haxe_ds_StringMap();
this.cachedBytes = new haxe_ds_StringMap();
this.cachedAudioBuffers = new haxe_ds_StringMap();
this.onChange = new lime_app__$Event_$Void_$Void();
this.bytesLoaded = 0;
this.bytesTotal = 0;
};
$hxClasses["lime.utils.AssetLibrary"] = lime_utils_AssetLibrary;
lime_utils_AssetLibrary.__name__ = ["lime","utils","AssetLibrary"];
lime_utils_AssetLibrary.fromBytes = function(bytes,rootPath) {
return lime_utils_AssetLibrary.fromManifest(lime_utils_AssetManifest.fromBytes(bytes,rootPath));
};
lime_utils_AssetLibrary.fromFile = function(path,rootPath) {
return lime_utils_AssetLibrary.fromManifest(lime_utils_AssetManifest.fromFile(path,rootPath));
};
lime_utils_AssetLibrary.fromManifest = function(manifest) {
if(manifest == null) return null;
var library = null;
if(manifest.libraryType == null) library = new lime_utils_AssetLibrary(); else {
var libraryClass = Type.resolveClass(manifest.libraryType);
if(libraryClass != null) library = Type.createInstance(libraryClass,manifest.libraryArgs); else {
lime_utils_Log.warn("Could not find library type: " + manifest.libraryType,{ fileName : "AssetLibrary.hx", lineNumber : 138, className : "lime.utils.AssetLibrary", methodName : "fromManifest"});
return null;
}
}
library.__fromManifest(manifest);
return library;
};
lime_utils_AssetLibrary.loadFromBytes = function(bytes,rootPath) {
return lime_utils_AssetManifest.loadFromBytes(bytes,rootPath).then(function(manifest) {
return lime_utils_AssetLibrary.loadFromManifest(manifest);
});
};
lime_utils_AssetLibrary.loadFromFile = function(path,rootPath) {
return lime_utils_AssetManifest.loadFromFile(path,rootPath).then(function(manifest) {
return lime_utils_AssetLibrary.loadFromManifest(manifest);
});
};
lime_utils_AssetLibrary.loadFromManifest = function(manifest) {
var library = lime_utils_AssetLibrary.fromManifest(manifest);
if(library != null) return library.load(); else return lime_app_Future.withError("Could not load asset manifest");
};
lime_utils_AssetLibrary.prototype = {
onChange: null
,assetsLoaded: null
,assetsTotal: null
,bytesLoaded: null
,bytesLoadedCache: null
,bytesTotal: null
,cachedAudioBuffers: null
,cachedBytes: null
,cachedFonts: null
,cachedImages: null
,cachedText: null
,classTypes: null
,loaded: null
,pathGroups: null
,paths: null
,preload: null
,promise: null
,sizes: null
,types: null
,exists: function(id,type) {
var requestedType;
if(type != null) requestedType = js_Boot.__cast(type , String); else requestedType = null;
var assetType = this.types.get(id);
if(assetType != null) {
if(assetType == requestedType || (requestedType == "SOUND" || requestedType == "MUSIC") && (assetType == "MUSIC" || assetType == "SOUND")) return true;
if(requestedType == "BINARY" || requestedType == null || assetType == "BINARY" && requestedType == "TEXT") return true;
}
return false;
}
,getAsset: function(id,type) {
switch(type) {
case "BINARY":
return this.getBytes(id);
case "FONT":
return this.getFont(id);
case "IMAGE":
return this.getImage(id);
case "MUSIC":case "SOUND":
return this.getAudioBuffer(id);
case "TEXT":
return this.getText(id);
case "TEMPLATE":
throw new js__$Boot_HaxeError("Not sure how to get template: " + id);
break;
default:
throw new js__$Boot_HaxeError("Unknown asset type: " + type);
}
}
,getAudioBuffer: function(id) {
if(this.cachedAudioBuffers.exists(id)) return this.cachedAudioBuffers.get(id); else if(this.classTypes.exists(id)) return lime_media_AudioBuffer.fromBytes(js_Boot.__cast(Type.createInstance(this.classTypes.get(id),[]) , haxe_io_Bytes)); else return lime_media_AudioBuffer.fromFile(this.paths.get(id));
}
,getBytes: function(id) {
if(this.cachedBytes.exists(id)) return this.cachedBytes.get(id); else if(this.cachedText.exists(id)) {
var bytes = lime_utils__$Bytes_Bytes_$Impl_$.ofString(this.cachedText.get(id));
this.cachedBytes.set(id,bytes);
return bytes;
} else if(this.classTypes.exists(id)) return js_Boot.__cast(Type.createInstance(this.classTypes.get(id),[]) , haxe_io_Bytes); else return lime_utils__$Bytes_Bytes_$Impl_$.fromFile(this.paths.get(id));
}
,getFont: function(id) {
if(this.cachedFonts.exists(id)) return this.cachedFonts.get(id); else if(this.classTypes.exists(id)) return js_Boot.__cast(Type.createInstance(this.classTypes.get(id),[]) , lime_text_Font); else return lime_text_Font.fromFile(this.paths.get(id));
}
,getImage: function(id) {
if(this.cachedImages.exists(id)) return this.cachedImages.get(id); else if(this.classTypes.exists(id)) return js_Boot.__cast(Type.createInstance(this.classTypes.get(id),[]) , lime_graphics_Image); else return lime_graphics_Image.fromFile(this.paths.get(id));
}
,getPath: function(id) {
return this.paths.get(id);
}
,getText: function(id) {
if(this.cachedText.exists(id)) return this.cachedText.get(id); else {
var bytes = this.getBytes(id);
if(bytes == null) return null; else return bytes.getString(0,bytes.length);
}
}
,isLocal: function(id,type) {
if(this.classTypes.exists(id)) return true;
var requestedType;
if(type != null) requestedType = js_Boot.__cast(type , String); else requestedType = null;
switch(requestedType) {
case "IMAGE":
return this.cachedImages.exists(id);
case "MUSIC":case "SOUND":
return this.cachedAudioBuffers.exists(id);
default:
return this.cachedBytes.exists(id) || this.cachedText.exists(id);
}
}
,list: function(type) {
var requestedType;
if(type != null) requestedType = js_Boot.__cast(type , String); else requestedType = null;
var items = [];
var $it0 = this.types.keys();
while( $it0.hasNext() ) {
var id = $it0.next();
if(requestedType == null || this.exists(id,type)) items.push(id);
}
return items;
}
,loadAsset: function(id,type) {
switch(type) {
case "BINARY":
return this.loadBytes(id);
case "FONT":
return this.loadFont(id);
case "IMAGE":
return this.loadImage(id);
case "MUSIC":case "SOUND":
return this.loadAudioBuffer(id);
case "TEXT":
return this.loadText(id);
case "TEMPLATE":
throw new js__$Boot_HaxeError("Not sure how to load template: " + id);
break;
default:
throw new js__$Boot_HaxeError("Unknown asset type: " + type);
}
}
,load: function() {
if(this.loaded) return lime_app_Future.withValue(this);
if(this.promise == null) {
this.promise = new lime_app_Promise();
this.bytesLoadedCache = new haxe_ds_StringMap();
this.assetsLoaded = 0;
this.assetsTotal = 1;
var $it0 = this.preload.keys();
while( $it0.hasNext() ) {
var id = $it0.next();
if(!this.preload.get(id)) continue;
lime_utils_Log.verbose("Preloading asset: " + id + " [" + this.types.get(id) + "]",{ fileName : "AssetLibrary.hx", lineNumber : 434, className : "lime.utils.AssetLibrary", methodName : "load"});
var _g = this.types.get(id);
if(_g != null) switch(_g) {
case "BINARY":
this.assetsTotal++;
var future = this.loadBytes(id);
future.onProgress((function(f,id1) {
return function(a1,a2) {
f(id1,a1,a2);
};
})($bind(this,this.load_onProgress),id));
future.onError((function(f1,id2) {
return function(a11) {
f1(id2,a11);
};
})($bind(this,this.load_onError),id));
future.onComplete((function(f2,id3) {
return function(a12) {
f2(id3,a12);
};
})($bind(this,this.loadBytes_onComplete),id));
break;
case "FONT":
this.assetsTotal++;
var future1 = this.loadFont(id);
future1.onProgress((function(f3,id4) {
return function(a13,a21) {
f3(id4,a13,a21);
};
})($bind(this,this.load_onProgress),id));
future1.onError((function(f4,id5) {
return function(a14) {
f4(id5,a14);
};
})($bind(this,this.load_onError),id));
future1.onComplete((function(f5,id6) {
return function(a15) {
f5(id6,a15);
};
})($bind(this,this.loadFont_onComplete),id));
break;
case "IMAGE":
this.assetsTotal++;
var future2 = this.loadImage(id);
future2.onProgress((function(f6,id7) {
return function(a16,a22) {
f6(id7,a16,a22);
};
})($bind(this,this.load_onProgress),id));
future2.onError((function(f7,id8) {
return function(a17) {
f7(id8,a17);
};
})($bind(this,this.load_onError),id));
future2.onComplete((function(f8,id9) {
return function(a18) {
f8(id9,a18);
};
})($bind(this,this.loadImage_onComplete),id));
break;
case "MUSIC":case "SOUND":
this.assetsTotal++;
var future3 = this.loadAudioBuffer(id);
future3.onProgress((function(f9,id10) {
return function(a19,a23) {
f9(id10,a19,a23);
};
})($bind(this,this.load_onProgress),id));
future3.onError((function(f10,id11) {
return function(a110) {
f10(id11,a110);
};
})($bind(this,this.load_onError),id));
future3.onComplete((function(f11,id12) {
return function(a111) {
f11(id12,a111);
};
})($bind(this,this.loadAudioBuffer_onComplete),id));
break;
case "TEXT":
this.assetsTotal++;
var future4 = this.loadText(id);
future4.onProgress((function(f12,id13) {
return function(a112,a24) {
f12(id13,a112,a24);
};
})($bind(this,this.load_onProgress),id));
future4.onError((function(f13,id14) {
return function(a113) {
f13(id14,a113);
};
})($bind(this,this.load_onError),id));
future4.onComplete((function(f14,id15) {
return function(a114) {
f14(id15,a114);
};
})($bind(this,this.loadText_onComplete),id));
break;
default:
} else {
}
}
this.__assetLoaded(null);
}
return this.promise.future;
}
,loadAudioBuffer: function(id) {
if(this.cachedAudioBuffers.exists(id)) return lime_app_Future.withValue(this.cachedAudioBuffers.get(id)); else if(this.classTypes.exists(id)) return lime_app_Future.withValue(Type.createInstance(this.classTypes.get(id),[])); else if(this.pathGroups.exists(id)) return lime_media_AudioBuffer.loadFromFiles(this.pathGroups.get(id)); else return lime_media_AudioBuffer.loadFromFile(this.paths.get(id));
}
,loadBytes: function(id) {
if(this.cachedBytes.exists(id)) return lime_app_Future.withValue(this.cachedBytes.get(id)); else if(this.classTypes.exists(id)) return lime_app_Future.withValue(Type.createInstance(this.classTypes.get(id),[])); else return lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile(this.paths.get(id));
}
,loadFont: function(id) {
if(this.cachedFonts.exists(id)) return lime_app_Future.withValue(this.cachedFonts.get(id)); else if(this.classTypes.exists(id)) {
var font = Type.createInstance(this.classTypes.get(id),[]);
return lime_text_Font.loadFromName(font.name);
} else return lime_text_Font.loadFromName(this.paths.get(id));
}
,loadImage: function(id) {
if(this.cachedImages.exists(id)) return lime_app_Future.withValue(this.cachedImages.get(id)); else if(this.classTypes.exists(id)) return lime_app_Future.withValue(Type.createInstance(this.classTypes.get(id),[])); else return lime_graphics_Image.loadFromFile(this.paths.get(id));
}
,loadText: function(id) {
if(this.cachedText.exists(id)) return lime_app_Future.withValue(this.cachedText.get(id)); else if(this.cachedBytes.exists(id) || this.classTypes.exists(id)) {
var bytes = this.getBytes(id);
if(bytes == null) return lime_app_Future.withValue(null); else {
var text = bytes.getString(0,bytes.length);
this.cachedText.set(id,text);
return lime_app_Future.withValue(text);
}
} else {
var request = new lime_net__$HTTPRequest_$String();
return request.load(this.paths.get(id));
}
}
,unload: function() {
}
,__assetLoaded: function(id) {
this.assetsLoaded++;
if(id != null) lime_utils_Log.verbose("Loaded asset: " + id + " [" + this.types.get(id) + "] (" + (this.assetsLoaded - 1) + "/" + (this.assetsTotal - 1) + ")",{ fileName : "AssetLibrary.hx", lineNumber : 680, className : "lime.utils.AssetLibrary", methodName : "__assetLoaded"});
if(id != null) {
var size = this.sizes.get(id);
if(!this.bytesLoadedCache.exists(id)) this.bytesLoaded += size; else {
var cache = this.bytesLoadedCache.get(id);
if(cache < size) this.bytesLoaded += size - cache;
}
this.bytesLoadedCache.set(id,size);
}
if(this.assetsLoaded < this.assetsTotal) this.promise.progress(this.bytesLoaded,this.bytesTotal); else {
this.loaded = true;
this.promise.progress(this.bytesTotal,this.bytesTotal);
this.promise.complete(this);
}
}
,__fromManifest: function(manifest) {
var hasSize = manifest.version >= 2;
var size;
var id;
var pathGroup;
var basePath = manifest.rootPath;
if(basePath == null) basePath = "";
if(basePath != "") basePath += "/";
var _g = 0;
var _g1 = manifest.assets;
while(_g < _g1.length) {
var asset = _g1[_g];
++_g;
if(hasSize) size = asset.size; else size = 100;
id = asset.id;
if(Object.prototype.hasOwnProperty.call(asset,"path")) {
var value = basePath + Std.string(Reflect.field(asset,"path"));
this.paths.set(id,value);
}
if(Object.prototype.hasOwnProperty.call(asset,"pathGroup")) {
pathGroup = Reflect.field(asset,"pathGroup");
var _g3 = 0;
var _g2 = pathGroup.length;
while(_g3 < _g2) {
var i = _g3++;
pathGroup[i] = basePath + pathGroup[i];
}
this.pathGroups.set(id,pathGroup);
}
this.sizes.set(id,size);
var value1 = asset.type;
this.types.set(id,value1);
if(Object.prototype.hasOwnProperty.call(asset,"preload")) {
var value2 = Reflect.field(asset,"preload");
this.preload.set(id,value2);
}
if(Object.prototype.hasOwnProperty.call(asset,"className")) {
var value3 = Type.resolveClass(Reflect.field(asset,"className"));
this.classTypes.set(id,value3);
}
}
this.bytesTotal = 0;
var _g4 = 0;
var _g11 = manifest.assets;
while(_g4 < _g11.length) {
var asset1 = _g11[_g4];
++_g4;
id = asset1.id;
if(this.preload.exists(id) && this.preload.get(id)) this.bytesTotal += this.sizes.get(id);
}
}
,loadAudioBuffer_onComplete: function(id,audioBuffer) {
this.cachedAudioBuffers.set(id,audioBuffer);
if(this.pathGroups.exists(id)) {
var pathGroup = this.pathGroups.get(id);
var $it0 = this.pathGroups.keys();
while( $it0.hasNext() ) {
var otherID = $it0.next();
if(otherID == id) continue;
var _g = 0;
while(_g < pathGroup.length) {
var path = pathGroup[_g];
++_g;
if((function($this) {
var $r;
var _this = $this.pathGroups.get(otherID);
$r = HxOverrides.indexOf(_this,path,0);
return $r;
}(this)) > -1) {
this.cachedAudioBuffers.set(otherID,audioBuffer);
break;
}
}
}
}
this.__assetLoaded(id);
}
,loadBytes_onComplete: function(id,bytes) {
this.cachedBytes.set(id,bytes);
this.__assetLoaded(id);
}
,loadFont_onComplete: function(id,font) {
this.cachedFonts.set(id,font);
this.__assetLoaded(id);
}
,loadImage_onComplete: function(id,image) {
this.cachedImages.set(id,image);
this.__assetLoaded(id);
}
,loadText_onComplete: function(id,text) {
this.cachedText.set(id,text);
this.__assetLoaded(id);
}
,load_onError: function(id,message) {
if(message != null && message != "") this.promise.error("Error loading asset \"" + id + "\": " + Std.string(message)); else this.promise.error("Error loading asset \"" + id + "\"");
}
,load_onProgress: function(id,bytesLoaded,bytesTotal) {
if(bytesLoaded > 0) {
var size = this.sizes.get(id);
var percent;
if(bytesTotal > 0) {
percent = bytesLoaded / bytesTotal;
if(percent > 1) percent = 1;
bytesLoaded = Math.floor(percent * size);
} else if(bytesLoaded > size) bytesLoaded = size;
if(this.bytesLoadedCache.exists(id)) {
var cache = this.bytesLoadedCache.get(id);
if(bytesLoaded != cache) this.bytesLoaded += bytesLoaded - cache;
} else this.bytesLoaded += bytesLoaded;
this.bytesLoadedCache.set(id,bytesLoaded);
this.promise.progress(this.bytesLoaded,this.bytesTotal);
}
}
,__class__: lime_utils_AssetLibrary
};
var lime_utils_AssetManifest = function() {
this.assets = [];
this.libraryArgs = [];
this.version = 2;
};
$hxClasses["lime.utils.AssetManifest"] = lime_utils_AssetManifest;
lime_utils_AssetManifest.__name__ = ["lime","utils","AssetManifest"];
lime_utils_AssetManifest.fromBytes = function(bytes,rootPath) {
if(bytes != null) return lime_utils_AssetManifest.parse(bytes.getString(0,bytes.length),rootPath); else return null;
};
lime_utils_AssetManifest.fromFile = function(path,rootPath) {
path = lime_utils_AssetManifest.__resolvePath(path);
rootPath = lime_utils_AssetManifest.__resolveRootPath(rootPath,path);
if(path == null) return null;
return lime_utils_AssetManifest.fromBytes(lime_utils__$Bytes_Bytes_$Impl_$.fromFile(path),rootPath);
};
lime_utils_AssetManifest.loadFromBytes = function(bytes,rootPath) {
return lime_app_Future.withValue(lime_utils_AssetManifest.fromBytes(bytes,rootPath));
};
lime_utils_AssetManifest.loadFromFile = function(path,rootPath) {
path = lime_utils_AssetManifest.__resolvePath(path);
rootPath = lime_utils_AssetManifest.__resolveRootPath(rootPath,path);
if(path == null) return null;
return lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile(path).then(function(bytes) {
return lime_app_Future.withValue(lime_utils_AssetManifest.fromBytes(bytes,rootPath));
});
};
lime_utils_AssetManifest.parse = function(data,rootPath) {
if(data == null || data == "") return null;
var manifestData = new haxe_format_JsonParser(data).parseRec();
var manifest = new lime_utils_AssetManifest();
manifest.name = manifestData.name;
manifest.libraryType = manifestData.libraryType;
manifest.libraryArgs = manifestData.libraryArgs;
manifest.assets = haxe_Unserializer.run(manifestData.assets);
if(rootPath != null) manifest.rootPath = rootPath;
return manifest;
};
lime_utils_AssetManifest.__resolvePath = function(path) {
if(path == null) return null;
var queryIndex = path.indexOf("?");
var basePath;
if(queryIndex > -1) basePath = HxOverrides.substr(path,0,queryIndex); else basePath = path;
StringTools.replace(basePath,"\\","/");
while(StringTools.endsWith(basePath,"/")) basePath = HxOverrides.substr(basePath,0,basePath.length - 1);
if(StringTools.endsWith(basePath,".bundle")) {
if(queryIndex > -1) return basePath + "/library.json" + HxOverrides.substr(path,queryIndex,null); else return basePath + "/library.json";
} else return path;
};
lime_utils_AssetManifest.__resolveRootPath = function(rootPath,path) {
if(rootPath != null) return rootPath;
var queryIndex = path.indexOf("?");
if(queryIndex > -1) rootPath = HxOverrides.substr(path,0,queryIndex); else rootPath = path;
StringTools.replace(rootPath,"\\","/");
while(StringTools.endsWith(rootPath,"/")) {
if(rootPath == "/") return rootPath;
rootPath = HxOverrides.substr(rootPath,0,rootPath.length - 1);
}
if(StringTools.endsWith(rootPath,".bundle")) return rootPath; else return haxe_io_Path.directory(rootPath);
return rootPath;
};
lime_utils_AssetManifest.prototype = {
assets: null
,libraryArgs: null
,libraryType: null
,name: null
,rootPath: null
,version: null
,serialize: function() {
var manifestData = { };
manifestData.version = this.version;
manifestData.libraryType = this.libraryType;
manifestData.libraryArgs = this.libraryArgs;
manifestData.name = this.name;
manifestData.assets = haxe_Serializer.run(this.assets);
return haxe_format_JsonPrinter.print(manifestData,null,null);
}
,__class__: lime_utils_AssetManifest
};
var lime_utils_Assets = function() { };
$hxClasses["lime.utils.Assets"] = lime_utils_Assets;
lime_utils_Assets.__name__ = ["lime","utils","Assets"];
lime_utils_Assets.exists = function(id,type) {
if(type == null) type = "BINARY";
var symbol = new lime_utils__$Assets_LibrarySymbol(id);
if(symbol.library != null) return symbol.library.exists(symbol.symbolName,type);
return false;
};
lime_utils_Assets.getAsset = function(id,type,useCache) {
if(useCache && lime_utils_Assets.cache.enabled) switch(type) {
case "BINARY":case "TEXT":
useCache = false;
break;
case "FONT":
var font = lime_utils_Assets.cache.font.get(id);
if(font != null) return font;
break;
case "IMAGE":
var image = lime_utils_Assets.cache.image.get(id);
if(lime_utils_Assets.isValidImage(image)) return image;
break;
case "MUSIC":case "SOUND":
var audio = lime_utils_Assets.cache.audio.get(id);
if(lime_utils_Assets.isValidAudio(audio)) return audio;
break;
case "TEMPLATE":
throw new js__$Boot_HaxeError("Not sure how to get template: " + id);
break;
default:
return null;
}
var symbol = new lime_utils__$Assets_LibrarySymbol(id);
if(symbol.library != null) {
if(symbol.library.exists(symbol.symbolName,type)) {
if(symbol.library.isLocal(symbol.symbolName,type)) {
var asset = symbol.library.getAsset(symbol.symbolName,type);
if(useCache && lime_utils_Assets.cache.enabled) lime_utils_Assets.cache.set(id,type,asset);
return asset;
} else lime_utils_Log.error(type + " asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 160, className : "lime.utils.Assets", methodName : "getAsset"});
} else lime_utils_Log.error("There is no " + type + " asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 166, className : "lime.utils.Assets", methodName : "getAsset"});
} else lime_utils_Log.error(lime_utils_Assets.__libraryNotFound(symbol.libraryName),{ fileName : "Assets.hx", lineNumber : 172, className : "lime.utils.Assets", methodName : "getAsset"});
return null;
};
lime_utils_Assets.getAudioBuffer = function(id,useCache) {
if(useCache == null) useCache = true;
return lime_utils_Assets.getAsset(id,"SOUND",useCache);
};
lime_utils_Assets.getBytes = function(id) {
return lime_utils_Assets.getAsset(id,"BINARY",false);
};
lime_utils_Assets.getFont = function(id,useCache) {
if(useCache == null) useCache = true;
return lime_utils_Assets.getAsset(id,"FONT",useCache);
};
lime_utils_Assets.getImage = function(id,useCache) {
if(useCache == null) useCache = true;
return lime_utils_Assets.getAsset(id,"IMAGE",useCache);
};
lime_utils_Assets.getLibrary = function(name) {
if(name == null || name == "") name = "default";
return lime_utils_Assets.libraries.get(name);
};
lime_utils_Assets.getPath = function(id) {
var symbol = new lime_utils__$Assets_LibrarySymbol(id);
if(symbol.library != null) {
if(symbol.library.exists(symbol.symbolName,null)) return symbol.library.getPath(symbol.symbolName); else lime_utils_Log.error("There is no asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 269, className : "lime.utils.Assets", methodName : "getPath"});
} else lime_utils_Log.error(lime_utils_Assets.__libraryNotFound(symbol.libraryName),{ fileName : "Assets.hx", lineNumber : 275, className : "lime.utils.Assets", methodName : "getPath"});
return null;
};
lime_utils_Assets.getText = function(id) {
return lime_utils_Assets.getAsset(id,"TEXT",false);
};
lime_utils_Assets.isLocal = function(id,type,useCache) {
if(useCache == null) useCache = true;
if(useCache && lime_utils_Assets.cache.enabled) {
if(lime_utils_Assets.cache.exists(id,type)) return true;
}
var symbol = new lime_utils__$Assets_LibrarySymbol(id);
return symbol.library != null && symbol.library.isLocal(symbol.symbolName,type);
};
lime_utils_Assets.isValidAudio = function(buffer) {
return buffer != null;
};
lime_utils_Assets.isValidImage = function(image) {
return image != null && image.buffer != null;
};
lime_utils_Assets.list = function(type) {
var items = [];
var $it0 = lime_utils_Assets.libraries.iterator();
while( $it0.hasNext() ) {
var library = $it0.next();
var libraryItems = library.list(type);
if(libraryItems != null) items = items.concat(libraryItems);
}
return items;
};
lime_utils_Assets.loadAsset = function(id,type,useCache) {
if(useCache && lime_utils_Assets.cache.enabled) switch(type) {
case "BINARY":case "TEXT":
useCache = false;
break;
case "FONT":
var font = lime_utils_Assets.cache.font.get(id);
if(font != null) return lime_app_Future.withValue(font);
break;
case "IMAGE":
var image = lime_utils_Assets.cache.image.get(id);
if(lime_utils_Assets.isValidImage(image)) return lime_app_Future.withValue(image);
break;
case "MUSIC":case "SOUND":
var audio = lime_utils_Assets.cache.audio.get(id);
if(lime_utils_Assets.isValidAudio(audio)) return lime_app_Future.withValue(audio);
break;
case "TEMPLATE":
throw new js__$Boot_HaxeError("Not sure how to get template: " + id);
break;
default:
return null;
}
var symbol = new lime_utils__$Assets_LibrarySymbol(id);
if(symbol.library != null) {
if(symbol.library.exists(symbol.symbolName,type)) {
var future = symbol.library.loadAsset(symbol.symbolName,type);
if(useCache && lime_utils_Assets.cache.enabled) future.onComplete(function(asset) {
lime_utils_Assets.cache.set(id,type,asset);
});
return future;
} else return lime_app_Future.withError("There is no " + type + " asset with an ID of \"" + id + "\"");
} else return lime_app_Future.withError(lime_utils_Assets.__libraryNotFound(symbol.libraryName));
};
lime_utils_Assets.loadAudioBuffer = function(id,useCache) {
if(useCache == null) useCache = true;
return lime_utils_Assets.loadAsset(id,"SOUND",useCache);
};
lime_utils_Assets.loadBytes = function(id) {
return lime_utils_Assets.loadAsset(id,"BINARY",false);
};
lime_utils_Assets.loadFont = function(id,useCache) {
if(useCache == null) useCache = true;
return lime_utils_Assets.loadAsset(id,"FONT",useCache);
};
lime_utils_Assets.loadImage = function(id,useCache) {
if(useCache == null) useCache = true;
return lime_utils_Assets.loadAsset(id,"IMAGE",useCache);
};
lime_utils_Assets.loadLibrary = function(id) {
var promise = new lime_app_Promise();
var library = lime_utils_Assets.getLibrary(id);
if(library != null) return library.load();
var path = id;
var rootPath = null;
if(lime_utils_Assets.libraryPaths.exists(id)) {
path = lime_utils_Assets.libraryPaths.get(id);
rootPath = lime_utils_Assets.defaultRootPath;
} else if(StringTools.endsWith(path,".bundle")) path += "/library.json";
lime_utils_AssetManifest.loadFromFile(path,rootPath).onComplete(function(manifest) {
if(manifest == null) {
promise.error("Cannot parse asset manifest for library \"" + id + "\"");
return;
}
var library1 = lime_utils_AssetLibrary.fromManifest(manifest);
if(library1 == null) promise.error("Cannot open library \"" + id + "\""); else {
lime_utils_Assets.libraries.set(id,library1);
library1.onChange.add(($_=lime_utils_Assets.onChange,$bind($_,$_.dispatch)));
promise.completeWith(library1.load());
}
}).onError(function(_) {
promise.error("There is no asset library with an ID of \"" + id + "\"");
});
return promise.future;
};
lime_utils_Assets.loadText = function(id) {
return lime_utils_Assets.loadAsset(id,"TEXT",false);
};
lime_utils_Assets.registerLibrary = function(name,library) {
if(lime_utils_Assets.libraries.exists(name)) {
if(lime_utils_Assets.libraries.get(name) == library) return; else lime_utils_Assets.unloadLibrary(name);
}
if(library != null) library.onChange.add(lime_utils_Assets.library_onChange);
lime_utils_Assets.libraries.set(name,library);
};
lime_utils_Assets.unloadLibrary = function(name) {
var library = lime_utils_Assets.libraries.get(name);
if(library != null) {
lime_utils_Assets.cache.clear(name + ":");
library.onChange.remove(lime_utils_Assets.library_onChange);
library.unload();
}
lime_utils_Assets.libraries.remove(name);
};
lime_utils_Assets.__libraryNotFound = function(name) {
if(name == null || name == "") name = "default";
if(lime_app_Application.current != null && lime_app_Application.current.__preloader != null && !lime_app_Application.current.__preloader.complete) return "There is no asset library named \"" + name + "\", or it is not yet preloaded"; else return "There is no asset library named \"" + name + "\"";
};
lime_utils_Assets.library_onChange = function() {
lime_utils_Assets.cache.clear();
lime_utils_Assets.onChange.dispatch();
};
var lime_utils__$Assets_LibrarySymbol = function(id) {
var colonIndex = id.indexOf(":");
this.libraryName = id.substring(0,colonIndex);
this.symbolName = id.substring(colonIndex + 1);
this.library = lime_utils_Assets.getLibrary(this.libraryName);
};
$hxClasses["lime.utils._Assets.LibrarySymbol"] = lime_utils__$Assets_LibrarySymbol;
lime_utils__$Assets_LibrarySymbol.__name__ = ["lime","utils","_Assets","LibrarySymbol"];
lime_utils__$Assets_LibrarySymbol.prototype = {
library: null
,libraryName: null
,symbolName: null
,isLocal: function(type) {
return this.library.isLocal(this.symbolName,type);
}
,exists: function(type) {
return this.library.exists(this.symbolName,type);
}
,__class__: lime_utils__$Assets_LibrarySymbol
};
var lime_utils__$BytePointer_BytePointer_$Impl_$ = {};
$hxClasses["lime.utils._BytePointer.BytePointer_Impl_"] = lime_utils__$BytePointer_BytePointer_$Impl_$;
lime_utils__$BytePointer_BytePointer_$Impl_$.__name__ = ["lime","utils","_BytePointer","BytePointer_Impl_"];
lime_utils__$BytePointer_BytePointer_$Impl_$._new = function(bytes,offset) {
if(offset == null) offset = 0;
return new lime_utils_BytePointerData(bytes,offset);
};
lime_utils__$BytePointer_BytePointer_$Impl_$.set = function(this1,bytes,bufferView,buffer,offset) {
if(buffer != null) bytes = haxe_io_Bytes.ofData(buffer);
if(bytes != null || bufferView == null) {
this1.bytes = bytes;
if(offset != null) this1.offset = offset; else this1.offset = 0;
} else {
this1.bytes = haxe_io_Bytes.ofData(bufferView.buffer);
if(offset != null) this1.offset = bufferView.byteOffset + offset; else this1.offset = bufferView.byteOffset;
}
};
lime_utils__$BytePointer_BytePointer_$Impl_$.__arrayGet = function(this1,index) {
if(this1.bytes != null) return this1.bytes.b[index + this1.offset]; else return 0;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.__arraySet = function(this1,index,value) {
if(this1.bytes == null) this1.bytes.b[index + this1.offset] = value & 255;
return value;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.fromArrayBufferView = function(arrayBufferView) {
if(arrayBufferView == null) return null;
return new lime_utils_BytePointerData(haxe_io_Bytes.ofData(arrayBufferView.buffer),arrayBufferView.byteOffset);
};
lime_utils__$BytePointer_BytePointer_$Impl_$.fromArrayBuffer = function(buffer) {
if(buffer == null) return null;
return new lime_utils_BytePointerData(haxe_io_Bytes.ofData(buffer),0);
};
lime_utils__$BytePointer_BytePointer_$Impl_$.fromBytes = function(bytes) {
return new lime_utils_BytePointerData(bytes,0);
};
lime_utils__$BytePointer_BytePointer_$Impl_$.fromBytesData = function(bytesData) {
if(bytesData == null) return new lime_utils_BytePointerData(null,0); else return new lime_utils_BytePointerData(haxe_io_Bytes.ofData(bytesData),0);
};
lime_utils__$BytePointer_BytePointer_$Impl_$.fromFile = function(path) {
return new lime_utils_BytePointerData(lime_utils__$Bytes_Bytes_$Impl_$.fromFile(path),0);
};
lime_utils__$BytePointer_BytePointer_$Impl_$.fromLimeBytes = function(bytes) {
return new lime_utils_BytePointerData(bytes,0);
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toUInt8Array = function(bytePointer) {
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 8 | 0;
var this1;
if(buffer != null) this1 = new Uint8Array(buffer,byteoffset); else this1 = null;
return this1;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toUInt8ClampedArray = function(bytePointer) {
if(bytePointer == null || bytePointer.bytes == null) return null;
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 8 | 0;
var this1;
if(buffer != null) this1 = new Uint8ClampedArray(buffer,byteoffset); else this1 = null;
return this1;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toInt8Array = function(bytePointer) {
if(bytePointer == null || bytePointer.bytes == null) return null;
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 8 | 0;
var this1;
if(buffer != null) this1 = new Int8Array(buffer,byteoffset); else this1 = null;
return this1;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toUInt16Array = function(bytePointer) {
if(bytePointer == null || bytePointer.bytes == null) return null;
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 16 | 0;
var this1;
if(buffer != null) this1 = new Uint16Array(buffer,byteoffset); else this1 = null;
return this1;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toInt16Array = function(bytePointer) {
if(bytePointer == null || bytePointer.bytes == null) return null;
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 16 | 0;
var this1;
if(buffer != null) this1 = new Int16Array(buffer,byteoffset); else this1 = null;
return this1;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toUInt32Array = function(bytePointer) {
if(bytePointer == null || bytePointer.bytes == null) return null;
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 32 | 0;
var this1;
if(buffer != null) this1 = new Uint32Array(buffer,byteoffset); else this1 = null;
return this1;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toInt32Array = function(bytePointer) {
if(bytePointer == null || bytePointer.bytes == null) return null;
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 32 | 0;
var this1;
if(buffer != null) this1 = new Int32Array(buffer,byteoffset); else this1 = null;
return this1;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toFloat32Array = function(bytePointer) {
if(bytePointer == null || bytePointer.bytes == null) return null;
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 32 | 0;
var this1;
if(buffer != null) this1 = new Float32Array(buffer,byteoffset); else this1 = null;
return this1;
};
lime_utils__$BytePointer_BytePointer_$Impl_$.toFloat64Array = function(bytePointer) {
if(bytePointer == null || bytePointer.bytes == null) return null;
var buffer = bytePointer.bytes.b.bufferValue;
var byteoffset = bytePointer.offset / 64 | 0;
var this1;
if(buffer != null) this1 = new Float64Array(buffer,byteoffset); else this1 = null;
return this1;
};
var lime_utils__$Bytes_Bytes_$Impl_$ = {};
$hxClasses["lime.utils._Bytes.Bytes_Impl_"] = lime_utils__$Bytes_Bytes_$Impl_$;
lime_utils__$Bytes_Bytes_$Impl_$.__name__ = ["lime","utils","_Bytes","Bytes_Impl_"];
lime_utils__$Bytes_Bytes_$Impl_$._new = function(length,bytesData) {
return new haxe_io_Bytes(bytesData);
};
lime_utils__$Bytes_Bytes_$Impl_$.alloc = function(length) {
var bytes = new haxe_io_Bytes(new ArrayBuffer(length));
return lime_utils__$Bytes_Bytes_$Impl_$._new(bytes.length,bytes.b.bufferValue);
};
lime_utils__$Bytes_Bytes_$Impl_$.fastGet = function(b,pos) {
return b.bytes[pos];
};
lime_utils__$Bytes_Bytes_$Impl_$.fromBytes = function(bytes) {
if(bytes == null) return null;
return lime_utils__$Bytes_Bytes_$Impl_$._new(bytes.length,bytes.b.bufferValue);
};
lime_utils__$Bytes_Bytes_$Impl_$.fromFile = function(path) {
return null;
};
lime_utils__$Bytes_Bytes_$Impl_$.loadFromBytes = function(bytes) {
return lime_app_Future.withValue(lime_utils__$Bytes_Bytes_$Impl_$.fromBytes(bytes));
};
lime_utils__$Bytes_Bytes_$Impl_$.loadFromFile = function(path) {
var request = new lime_net__$HTTPRequest_$lime_$utils_$Bytes();
return request.load(path);
};
lime_utils__$Bytes_Bytes_$Impl_$.ofData = function(b) {
var bytes = haxe_io_Bytes.ofData(b);
return lime_utils__$Bytes_Bytes_$Impl_$._new(bytes.length,bytes.b.bufferValue);
};
lime_utils__$Bytes_Bytes_$Impl_$.ofString = function(s) {
var bytes = haxe_io_Bytes.ofString(s);
return lime_utils__$Bytes_Bytes_$Impl_$._new(bytes.length,bytes.b.bufferValue);
};
var lime_utils__$DataPointer_DataPointer_$Impl_$ = {};
$hxClasses["lime.utils._DataPointer.DataPointer_Impl_"] = lime_utils__$DataPointer_DataPointer_$Impl_$;
lime_utils__$DataPointer_DataPointer_$Impl_$.__name__ = ["lime","utils","_DataPointer","DataPointer_Impl_"];
lime_utils__$DataPointer_DataPointer_$Impl_$._new = function(data) {
return data;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt = function(value) {
return lime_utils__$DataPointer_DataPointer_$Impl_$._new(new lime_utils_DataPointerObject(null,null,value));
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromFloat = function(value) {
return lime_utils__$DataPointer_DataPointer_$Impl_$._new(new lime_utils_DataPointerObject(null,null,value | 0));
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromBytesPointer = function(pointer) {
return lime_utils__$DataPointer_DataPointer_$Impl_$._new(new lime_utils_DataPointerObject(null,pointer.bytes.b.bufferValue,pointer.offset));
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView = function(arrayBufferView) {
return lime_utils__$DataPointer_DataPointer_$Impl_$._new(new lime_utils_DataPointerObject(arrayBufferView));
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBuffer = function(buffer) {
return lime_utils__$DataPointer_DataPointer_$Impl_$._new(new lime_utils_DataPointerObject(null,buffer));
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromBytes = function(bytes) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBuffer(bytes.b.bufferValue);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromBytesData = function(bytesData) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBuffer(bytesData);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromLimeBytes = function(bytes) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.fromBytes(bytes);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromCFFIPointer = function(pointer) {
return null;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.fromFile = function(path) {
return null;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferOrBufferView = function(this1,length) {
var data = this1;
if (!data) return null;
var _g = data.type;
switch(_g[1]) {
case 1:
if(length == null) length = data.bufferView.byteLength;
if(data.offset == 0 && length == data.bufferView.byteLength) return data.bufferView; else {
var buffer = data.bufferView.buffer;
var byteoffset = data.bufferView.byteOffset + data.offset;
var this2;
if(buffer != null) {
if(length == null) this2 = new Uint8Array(buffer,byteoffset); else this2 = new Uint8Array(buffer,byteoffset,length);
} else this2 = null;
return this2;
}
break;
case 0:
if(length == null) length = data.buffer.byteLength;
if(data.offset == 0 && length == data.buffer.byteLength) return data.buffer; else {
var buffer1 = data.buffer;
var byteoffset1 = data.offset;
var this3;
if(buffer1 != null) {
if(length == null) this3 = new Uint8Array(buffer1,byteoffset1); else this3 = new Uint8Array(buffer1,byteoffset1,length);
} else this3 = null;
return this3;
}
break;
default:
return null;
}
};
lime_utils__$DataPointer_DataPointer_$Impl_$.toBufferView = function(this1,length) {
var data = this1;
if (!data) return null;
var _g = data.type;
switch(_g[1]) {
case 1:
if(length == null) length = data.bufferView.byteLength;
if(data.offset == 0 && length == data.bufferView.byteLength) return data.bufferView; else {
var buffer = data.bufferView.buffer;
var byteoffset = data.bufferView.byteOffset + data.offset;
var this2;
if(buffer != null) {
if(length == null) this2 = new Uint8Array(buffer,byteoffset); else this2 = new Uint8Array(buffer,byteoffset,length);
} else this2 = null;
return this2;
}
break;
case 0:
if(length == null) length = data.buffer.byteLength;
var buffer1 = data.buffer;
var byteoffset1 = data.offset;
var this3;
if(buffer1 != null) {
if(length == null) this3 = new Uint8Array(buffer1,byteoffset1); else this3 = new Uint8Array(buffer1,byteoffset1,length);
} else this3 = null;
return this3;
default:
return null;
}
};
lime_utils__$DataPointer_DataPointer_$Impl_$.toFloat32Array = function(this1,length) {
var data = this1;
if (!data) return null;
var _g = data.type;
switch(_g[1]) {
case 1:
if(length == null) length = data.bufferView.byteLength;
if(data.offset == 0 && length == data.bufferView.byteLength && data.bufferView.constructor == Float32Array) return data.bufferView; else {
var buffer = data.bufferView.buffer;
var byteoffset = data.bufferView.byteOffset + data.offset;
var len = length / 4 | 0;
var this2;
if(buffer != null) {
if(len == null) this2 = new Float32Array(buffer,byteoffset); else this2 = new Float32Array(buffer,byteoffset,len);
} else this2 = null;
return this2;
}
break;
case 0:
if(length == null) length = data.buffer.byteLength;
var buffer1 = data.buffer;
var byteoffset1 = data.offset;
var len1 = length / 4 | 0;
var this3;
if(buffer1 != null) {
if(len1 == null) this3 = new Float32Array(buffer1,byteoffset1); else this3 = new Float32Array(buffer1,byteoffset1,len1);
} else this3 = null;
return this3;
default:
return null;
}
};
lime_utils__$DataPointer_DataPointer_$Impl_$.toInt32Array = function(this1,length) {
var data = this1;
if (!data) return null;
var _g = data.type;
switch(_g[1]) {
case 1:
if(length == null) length = data.bufferView.byteLength;
if(data.offset == 0 && length == data.bufferView.byteLength && data.bufferView.constructor == Int32Array) return data.bufferView; else {
var buffer = data.bufferView.buffer;
var byteoffset = data.bufferView.byteOffset + data.offset;
var len = length / 4 | 0;
var this2;
if(buffer != null) {
if(len == null) this2 = new Int32Array(buffer,byteoffset); else this2 = new Int32Array(buffer,byteoffset,len);
} else this2 = null;
return this2;
}
break;
case 0:
if(length == null) length = data.buffer.byteLength;
var buffer1 = data.buffer;
var byteoffset1 = data.offset;
var len1 = length / 4 | 0;
var this3;
if(buffer1 != null) {
if(len1 == null) this3 = new Int32Array(buffer1,byteoffset1); else this3 = new Int32Array(buffer1,byteoffset1,len1);
} else this3 = null;
return this3;
default:
return null;
}
};
lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt8Array = function(this1,length) {
var data = this1;
if (!data) return null;
var _g = data.type;
switch(_g[1]) {
case 1:
if(length == null) length = data.bufferView.byteLength;
if(data.offset == 0 && length == data.bufferView.byteLength && data.bufferView.constructor == Uint8Array) return data.bufferView; else {
var buffer = data.bufferView.buffer;
var byteoffset = data.bufferView.byteOffset + data.offset;
var this2;
if(buffer != null) {
if(length == null) this2 = new Uint8Array(buffer,byteoffset); else this2 = new Uint8Array(buffer,byteoffset,length);
} else this2 = null;
return this2;
}
break;
case 0:
if(length == null) length = data.buffer.byteLength;
var buffer1 = data.buffer;
var byteoffset1 = data.offset;
var this3;
if(buffer1 != null) {
if(length == null) this3 = new Uint8Array(buffer1,byteoffset1); else this3 = new Uint8Array(buffer1,byteoffset1,length);
} else this3 = null;
return this3;
default:
return null;
}
};
lime_utils__$DataPointer_DataPointer_$Impl_$.toUInt32Array = function(this1,length) {
var data = this1;
if (!data) return null;
var _g = data.type;
switch(_g[1]) {
case 1:
if(length == null) length = data.bufferView.byteLength;
if(data.offset == 0 && length == data.bufferView.byteLength && data.bufferView.constructor == Uint32Array) return data.bufferView; else {
var buffer = data.bufferView.buffer;
var byteoffset = data.bufferView.byteOffset + data.offset;
var len = length / 4 | 0;
var this2;
if(buffer != null) {
if(len == null) this2 = new Uint32Array(buffer,byteoffset); else this2 = new Uint32Array(buffer,byteoffset,len);
} else this2 = null;
return this2;
}
break;
case 0:
if(length == null) length = data.buffer.byteLength;
var buffer1 = data.buffer;
var byteoffset1 = data.offset;
var len1 = length / 4 | 0;
var this3;
if(buffer1 != null) {
if(len1 == null) this3 = new Uint32Array(buffer1,byteoffset1); else this3 = new Uint32Array(buffer1,byteoffset1,len1);
} else this3 = null;
return this3;
default:
return null;
}
};
lime_utils__$DataPointer_DataPointer_$Impl_$.toValue = function(this1) {
var data = this1;
if (!data) return 0;
if (typeof data === 'number') return data;
var _g = data.type;
switch(_g[1]) {
case 2:
return data.offset;
default:
return 0;
}
};
lime_utils__$DataPointer_DataPointer_$Impl_$.__withOffset = function(data,offset) {
return null;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.equals = function(a,b) {
return a == b;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.equalsPointer = function(a,b) {
return a == b;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.greaterThan = function(a,b) {
return a > b;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.greaterThanPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) > lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.greaterThanOrEqual = function(a,b) {
return a >= b;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.greaterThanOrEqualPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) >= lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.lessThan = function(a,b) {
return a < b;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.lessThanPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) < lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.lessThanOrEqual = function(a,b) {
return a <= b;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.lessThanOrEqualPointer = function(a,b) {
return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) <= lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.notEquals = function(a,b) {
return a != b;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.notEqualsPointer = function(a,b) {
return a != b;
};
lime_utils__$DataPointer_DataPointer_$Impl_$.plus = function(a,b) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.__withOffset(a,b);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.plusPointer = function(a,b) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.__withOffset(a,b | 0);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.minus = function(a,b) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.__withOffset(a,-b);
};
lime_utils__$DataPointer_DataPointer_$Impl_$.minusPointer = function(a,b) {
return lime_utils__$DataPointer_DataPointer_$Impl_$.__withOffset(a,-(b | 0));
};
var lime_utils_DataPointerObject = function(bufferView,buffer,offset) {
if(offset == null) offset = 0;
if(bufferView != null) {
this.bufferView = bufferView;
this.type = lime_utils_DataPointerObjectType.BUFFER_VIEW;
} else if(buffer != null) {
this.buffer = buffer;
this.type = lime_utils_DataPointerObjectType.BUFFER;
} else this.type = lime_utils_DataPointerObjectType.VALUE;
this.offset = offset;
};
$hxClasses["lime.utils.DataPointerObject"] = lime_utils_DataPointerObject;
lime_utils_DataPointerObject.__name__ = ["lime","utils","DataPointerObject"];
lime_utils_DataPointerObject.prototype = {
buffer: null
,bufferView: null
,offset: null
,type: null
,__class__: lime_utils_DataPointerObject
};
var lime_utils_DataPointerObjectType = $hxClasses["lime.utils.DataPointerObjectType"] = { __ename__ : ["lime","utils","DataPointerObjectType"], __constructs__ : ["BUFFER","BUFFER_VIEW","VALUE"] };
lime_utils_DataPointerObjectType.BUFFER = ["BUFFER",0];
lime_utils_DataPointerObjectType.BUFFER.toString = $estr;
lime_utils_DataPointerObjectType.BUFFER.__enum__ = lime_utils_DataPointerObjectType;
lime_utils_DataPointerObjectType.BUFFER_VIEW = ["BUFFER_VIEW",1];
lime_utils_DataPointerObjectType.BUFFER_VIEW.toString = $estr;
lime_utils_DataPointerObjectType.BUFFER_VIEW.__enum__ = lime_utils_DataPointerObjectType;
lime_utils_DataPointerObjectType.VALUE = ["VALUE",2];
lime_utils_DataPointerObjectType.VALUE.toString = $estr;
lime_utils_DataPointerObjectType.VALUE.__enum__ = lime_utils_DataPointerObjectType;
var lime_utils__$Float32Array_Float32Array_$Impl_$ = {};
$hxClasses["lime.utils._Float32Array.Float32Array_Impl_"] = lime_utils__$Float32Array_Float32Array_$Impl_$;
lime_utils__$Float32Array_Float32Array_$Impl_$.__name__ = ["lime","utils","_Float32Array","Float32Array_Impl_"];
lime_utils__$Float32Array_Float32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) byteOffset = 0;
if(byteOffset == null) return new Float32Array(bytes.b.bufferValue);
if(len == null) return new Float32Array(bytes.b.bufferValue,byteOffset);
return new Float32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Float32Array_Float32Array_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Float32Array_Float32Array_$Impl_$.toString = function(this1) {
if(this1 != null) return "Float32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
var lime_utils__$Float64Array_Float64Array_$Impl_$ = {};
$hxClasses["lime.utils._Float64Array.Float64Array_Impl_"] = lime_utils__$Float64Array_Float64Array_$Impl_$;
lime_utils__$Float64Array_Float64Array_$Impl_$.__name__ = ["lime","utils","_Float64Array","Float64Array_Impl_"];
lime_utils__$Float64Array_Float64Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) byteOffset = 0;
if(byteOffset == null) return new Float64Array(bytes.b.bufferValue);
if(len == null) return new Float64Array(bytes.b.bufferValue,byteOffset);
return new Float64Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Float64Array_Float64Array_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Float64Array_Float64Array_$Impl_$.toString = function(this1) {
if(this1 != null) return "Float64Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
var lime_utils_GLUtils = function() { };
$hxClasses["lime.utils.GLUtils"] = lime_utils_GLUtils;
lime_utils_GLUtils.__name__ = ["lime","utils","GLUtils"];
lime_utils_GLUtils.compileShader = function(source,type) {
var shader = lime_graphics_opengl_GL.context.__context.createShader(type);
lime_graphics_opengl_GL.context.__context.shaderSource(shader,source);
lime_graphics_opengl_GL.context.__context.compileShader(shader);
if(lime_graphics_opengl_GL.context.__context.getShaderParameter(shader,35713) == 0) {
var message;
switch(type) {
case 35633:
message = "Error compiling vertex shader";
break;
case 35632:
message = "Error compiling fragment shader";
break;
default:
message = "Error compiling unknown shader type";
}
message += "\n" + lime_graphics_opengl_GL.context.__context.getShaderInfoLog(shader);
lime_utils_Log.error(message,{ fileName : "GLUtils.hx", lineNumber : 35, className : "lime.utils.GLUtils", methodName : "compileShader"});
}
return shader;
};
lime_utils_GLUtils.createProgram = function(vertexSource,fragmentSource) {
var vertexShader = lime_utils_GLUtils.compileShader(vertexSource,35633);
var fragmentShader = lime_utils_GLUtils.compileShader(fragmentSource,35632);
var program = lime_graphics_opengl_GL.context.__context.createProgram();
lime_graphics_opengl_GL.context.__context.attachShader(program,vertexShader);
lime_graphics_opengl_GL.context.__context.attachShader(program,fragmentShader);
lime_graphics_opengl_GL.context.__context.linkProgram(program);
if(lime_graphics_opengl_GL.context.__context.getProgramParameter(program,35714) == 0) lime_utils_Log.error("Unable to initialize the shader program",{ fileName : "GLUtils.hx", lineNumber : 56, className : "lime.utils.GLUtils", methodName : "createProgram"});
return program;
};
var lime_utils__$Int16Array_Int16Array_$Impl_$ = {};
$hxClasses["lime.utils._Int16Array.Int16Array_Impl_"] = lime_utils__$Int16Array_Int16Array_$Impl_$;
lime_utils__$Int16Array_Int16Array_$Impl_$.__name__ = ["lime","utils","_Int16Array","Int16Array_Impl_"];
lime_utils__$Int16Array_Int16Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) byteOffset = 0;
if(byteOffset == null) return new Int16Array(bytes.b.bufferValue);
if(len == null) return new Int16Array(bytes.b.bufferValue,byteOffset);
return new Int16Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Int16Array_Int16Array_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Int16Array_Int16Array_$Impl_$.toString = function(this1) {
if(this1 != null) return "Int16Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
var lime_utils__$Int32Array_Int32Array_$Impl_$ = {};
$hxClasses["lime.utils._Int32Array.Int32Array_Impl_"] = lime_utils__$Int32Array_Int32Array_$Impl_$;
lime_utils__$Int32Array_Int32Array_$Impl_$.__name__ = ["lime","utils","_Int32Array","Int32Array_Impl_"];
lime_utils__$Int32Array_Int32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) byteOffset = 0;
if(byteOffset == null) return new Int32Array(bytes.b.bufferValue);
if(len == null) return new Int32Array(bytes.b.bufferValue,byteOffset);
return new Int32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Int32Array_Int32Array_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Int32Array_Int32Array_$Impl_$.toString = function(this1) {
if(this1 != null) return "Int32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
var lime_utils__$Int8Array_Int8Array_$Impl_$ = {};
$hxClasses["lime.utils._Int8Array.Int8Array_Impl_"] = lime_utils__$Int8Array_Int8Array_$Impl_$;
lime_utils__$Int8Array_Int8Array_$Impl_$.__name__ = ["lime","utils","_Int8Array","Int8Array_Impl_"];
lime_utils__$Int8Array_Int8Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) byteOffset = 0;
return new Int8Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Int8Array_Int8Array_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Int8Array_Int8Array_$Impl_$.toString = function(this1) {
if(this1 != null) return "Int8Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
var lime_utils_Log = function() { };
$hxClasses["lime.utils.Log"] = lime_utils_Log;
lime_utils_Log.__name__ = ["lime","utils","Log"];
lime_utils_Log.debug = function(message,info) {
if(lime_utils_Log.level >= 4) console.log("[" + info.className + "] " + message);
};
lime_utils_Log.error = function(message,info) {
if(lime_utils_Log.level >= 1) {
var message1 = "[" + info.className + "] ERROR: " + message;
if(lime_utils_Log.throwErrors) throw new js__$Boot_HaxeError(message1); else console.log(message1);
}
};
lime_utils_Log.info = function(message,info) {
if(lime_utils_Log.level >= 3) console.log("[" + info.className + "] " + message);
};
lime_utils_Log.print = function(message) {
console.log(message);
};
lime_utils_Log.println = function(message) {
console.log(message);
};
lime_utils_Log.verbose = function(message,info) {
if(lime_utils_Log.level >= 5) console.log("[" + info.className + "] " + message);
};
lime_utils_Log.warn = function(message,info) {
if(lime_utils_Log.level >= 2) console.log("[" + info.className + "] WARNING: " + message);
};
var lime_utils__$Log_LogLevel_$Impl_$ = {};
$hxClasses["lime.utils._Log.LogLevel_Impl_"] = lime_utils__$Log_LogLevel_$Impl_$;
lime_utils__$Log_LogLevel_$Impl_$.__name__ = ["lime","utils","_Log","LogLevel_Impl_"];
lime_utils__$Log_LogLevel_$Impl_$.gt = function(a,b) {
return a > b;
};
lime_utils__$Log_LogLevel_$Impl_$.gte = function(a,b) {
return a >= b;
};
lime_utils__$Log_LogLevel_$Impl_$.lt = function(a,b) {
return a < b;
};
lime_utils__$Log_LogLevel_$Impl_$.lte = function(a,b) {
return a <= b;
};
var lime_utils_ObjectPool = function(create,clean,size) {
if(create != null) this.create = create;
if(clean != null) this.clean = clean;
if(size != null) this.set_size(size);
this.__activeObjects = new List();
this.__inactiveObjects = new List();
};
$hxClasses["lime.utils.ObjectPool"] = lime_utils_ObjectPool;
lime_utils_ObjectPool.__name__ = ["lime","utils","ObjectPool"];
lime_utils_ObjectPool.prototype = {
__activeObjects: null
,__inactiveObjects: null
,__size: null
,add: function(object) {
if(object != null) {
this.__activeObjects.remove(object);
this.__inactiveObjects.remove(object);
this.clean(object);
this.__inactiveObjects.add(object);
}
}
,clean: function(object) {
}
,clear: function() {
this.__inactiveObjects.clear();
this.__activeObjects.clear();
}
,create: function() {
return null;
}
,get: function() {
var object = null;
if(this.__inactiveObjects.length > 0) {
object = this.__inactiveObjects.pop();
this.__activeObjects.add(object);
} else if(this.__size == null || this.__activeObjects.length < this.__size) {
object = this.create();
if(object != null) this.__activeObjects.add(object);
}
return object;
}
,release: function(object) {
if(this.__activeObjects.remove(object)) {
this.clean(object);
if(this.__size == null || this.__activeObjects.length + this.__inactiveObjects.length < this.__size) this.__inactiveObjects.add(object);
}
}
,get_activeObjects: function() {
return this.__activeObjects.length;
}
,get_inactiveObjects: function() {
return this.__inactiveObjects.length;
}
,get_size: function() {
return this.__size;
}
,set_size: function(value) {
if(value == null) this.__size = null; else {
var current = this.__inactiveObjects.length + this.__activeObjects.length;
this.__size = value;
while(current > value) if(this.__inactiveObjects.length > 0) {
this.__inactiveObjects.pop();
current--;
} else if(this.__activeObjects.length > 0) {
this.__activeObjects.pop();
current--;
} else break;
var object;
while(value > current) {
object = this.create();
if(object != null) {
this.__inactiveObjects.add(object);
current++;
} else break;
}
}
return value;
}
,__class__: lime_utils_ObjectPool
,__properties__: {set_size:"set_size",get_size:"get_size",get_inactiveObjects:"get_inactiveObjects",get_activeObjects:"get_activeObjects"}
};
var lime_utils_ObjectPool_$openfl_$geom_$Matrix = function(create,clean,size) {
if(create != null) this.create = create;
if(clean != null) this.clean = clean;
if(size != null) this.set_size(size);
this.__activeObjects = new List();
this.__inactiveObjects = new List();
};
$hxClasses["lime.utils.ObjectPool_openfl_geom_Matrix"] = lime_utils_ObjectPool_$openfl_$geom_$Matrix;
lime_utils_ObjectPool_$openfl_$geom_$Matrix.__name__ = ["lime","utils","ObjectPool_openfl_geom_Matrix"];
lime_utils_ObjectPool_$openfl_$geom_$Matrix.prototype = {
__activeObjects: null
,__inactiveObjects: null
,__size: null
,add: function(object) {
if(object != null) {
this.__activeObjects.remove(object);
this.__inactiveObjects.remove(object);
this.clean(object);
this.__inactiveObjects.add(object);
}
}
,clean: function(object) {
}
,clear: function() {
this.__inactiveObjects.clear();
this.__activeObjects.clear();
}
,create: function() {
return null;
}
,get: function() {
var object = null;
if(this.__inactiveObjects.length > 0) {
object = this.__inactiveObjects.pop();
this.__activeObjects.add(object);
} else if(this.__size == null || this.__activeObjects.length < this.__size) {
object = this.create();
if(object != null) this.__activeObjects.add(object);
}
return object;
}
,release: function(object) {
if(this.__activeObjects.remove(object)) {
this.clean(object);
if(this.__size == null || this.__activeObjects.length + this.__inactiveObjects.length < this.__size) this.__inactiveObjects.add(object);
}
}
,get_activeObjects: function() {
return this.__activeObjects.length;
}
,get_inactiveObjects: function() {
return this.__inactiveObjects.length;
}
,get_size: function() {
return this.__size;
}
,set_size: function(value) {
if(value == null) this.__size = null; else {
var current = this.__inactiveObjects.length + this.__activeObjects.length;
this.__size = value;
while(current > value) if(this.__inactiveObjects.length > 0) {
this.__inactiveObjects.pop();
current--;
} else if(this.__activeObjects.length > 0) {
this.__activeObjects.pop();
current--;
} else break;
var object;
while(value > current) {
object = this.create();
if(object != null) {
this.__inactiveObjects.add(object);
current++;
} else break;
}
}
return value;
}
,__class__: lime_utils_ObjectPool_$openfl_$geom_$Matrix
,__properties__: {set_size:"set_size",get_size:"get_size",get_inactiveObjects:"get_inactiveObjects",get_activeObjects:"get_activeObjects"}
};
var lime_utils_ObjectPool_$openfl_$geom_$Point = function(create,clean,size) {
if(create != null) this.create = create;
if(clean != null) this.clean = clean;
if(size != null) this.set_size(size);
this.__activeObjects = new List();
this.__inactiveObjects = new List();
};
$hxClasses["lime.utils.ObjectPool_openfl_geom_Point"] = lime_utils_ObjectPool_$openfl_$geom_$Point;
lime_utils_ObjectPool_$openfl_$geom_$Point.__name__ = ["lime","utils","ObjectPool_openfl_geom_Point"];
lime_utils_ObjectPool_$openfl_$geom_$Point.prototype = {
__activeObjects: null
,__inactiveObjects: null
,__size: null
,add: function(object) {
if(object != null) {
this.__activeObjects.remove(object);
this.__inactiveObjects.remove(object);
this.clean(object);
this.__inactiveObjects.add(object);
}
}
,clean: function(object) {
}
,clear: function() {
this.__inactiveObjects.clear();
this.__activeObjects.clear();
}
,create: function() {
return null;
}
,get: function() {
var object = null;
if(this.__inactiveObjects.length > 0) {
object = this.__inactiveObjects.pop();
this.__activeObjects.add(object);
} else if(this.__size == null || this.__activeObjects.length < this.__size) {
object = this.create();
if(object != null) this.__activeObjects.add(object);
}
return object;
}
,release: function(object) {
if(this.__activeObjects.remove(object)) {
this.clean(object);
if(this.__size == null || this.__activeObjects.length + this.__inactiveObjects.length < this.__size) this.__inactiveObjects.add(object);
}
}
,get_activeObjects: function() {
return this.__activeObjects.length;
}
,get_inactiveObjects: function() {
return this.__inactiveObjects.length;
}
,get_size: function() {
return this.__size;
}
,set_size: function(value) {
if(value == null) this.__size = null; else {
var current = this.__inactiveObjects.length + this.__activeObjects.length;
this.__size = value;
while(current > value) if(this.__inactiveObjects.length > 0) {
this.__inactiveObjects.pop();
current--;
} else if(this.__activeObjects.length > 0) {
this.__activeObjects.pop();
current--;
} else break;
var object;
while(value > current) {
object = this.create();
if(object != null) {
this.__inactiveObjects.add(object);
current++;
} else break;
}
}
return value;
}
,__class__: lime_utils_ObjectPool_$openfl_$geom_$Point
,__properties__: {set_size:"set_size",get_size:"get_size",get_inactiveObjects:"get_inactiveObjects",get_activeObjects:"get_activeObjects"}
};
var lime_utils_ObjectPool_$openfl_$geom_$Rectangle = function(create,clean,size) {
if(create != null) this.create = create;
if(clean != null) this.clean = clean;
if(size != null) this.set_size(size);
this.__activeObjects = new List();
this.__inactiveObjects = new List();
};
$hxClasses["lime.utils.ObjectPool_openfl_geom_Rectangle"] = lime_utils_ObjectPool_$openfl_$geom_$Rectangle;
lime_utils_ObjectPool_$openfl_$geom_$Rectangle.__name__ = ["lime","utils","ObjectPool_openfl_geom_Rectangle"];
lime_utils_ObjectPool_$openfl_$geom_$Rectangle.prototype = {
__activeObjects: null
,__inactiveObjects: null
,__size: null
,add: function(object) {
if(object != null) {
this.__activeObjects.remove(object);
this.__inactiveObjects.remove(object);
this.clean(object);
this.__inactiveObjects.add(object);
}
}
,clean: function(object) {
}
,clear: function() {
this.__inactiveObjects.clear();
this.__activeObjects.clear();
}
,create: function() {
return null;
}
,get: function() {
var object = null;
if(this.__inactiveObjects.length > 0) {
object = this.__inactiveObjects.pop();
this.__activeObjects.add(object);
} else if(this.__size == null || this.__activeObjects.length < this.__size) {
object = this.create();
if(object != null) this.__activeObjects.add(object);
}
return object;
}
,release: function(object) {
if(this.__activeObjects.remove(object)) {
this.clean(object);
if(this.__size == null || this.__activeObjects.length + this.__inactiveObjects.length < this.__size) this.__inactiveObjects.add(object);
}
}
,get_activeObjects: function() {
return this.__activeObjects.length;
}
,get_inactiveObjects: function() {
return this.__inactiveObjects.length;
}
,get_size: function() {
return this.__size;
}
,set_size: function(value) {
if(value == null) this.__size = null; else {
var current = this.__inactiveObjects.length + this.__activeObjects.length;
this.__size = value;
while(current > value) if(this.__inactiveObjects.length > 0) {
this.__inactiveObjects.pop();
current--;
} else if(this.__activeObjects.length > 0) {
this.__activeObjects.pop();
current--;
} else break;
var object;
while(value > current) {
object = this.create();
if(object != null) {
this.__inactiveObjects.add(object);
current++;
} else break;
}
}
return value;
}
,__class__: lime_utils_ObjectPool_$openfl_$geom_$Rectangle
,__properties__: {set_size:"set_size",get_size:"get_size",get_inactiveObjects:"get_inactiveObjects",get_activeObjects:"get_activeObjects"}
};
var lime_utils__$UInt16Array_UInt16Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt16Array.UInt16Array_Impl_"] = lime_utils__$UInt16Array_UInt16Array_$Impl_$;
lime_utils__$UInt16Array_UInt16Array_$Impl_$.__name__ = ["lime","utils","_UInt16Array","UInt16Array_Impl_"];
lime_utils__$UInt16Array_UInt16Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) byteOffset = 0;
if(byteOffset == null) return new Uint16Array(bytes.b.bufferValue);
if(len == null) return new Uint16Array(bytes.b.bufferValue,byteOffset);
return new Uint16Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.toString = function(this1) {
if(this1 != null) return "UInt16Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
var lime_utils__$UInt32Array_UInt32Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt32Array.UInt32Array_Impl_"] = lime_utils__$UInt32Array_UInt32Array_$Impl_$;
lime_utils__$UInt32Array_UInt32Array_$Impl_$.__name__ = ["lime","utils","_UInt32Array","UInt32Array_Impl_"];
lime_utils__$UInt32Array_UInt32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) byteOffset = 0;
if(byteOffset == null) return new Uint32Array(bytes.b.bufferValue);
if(len == null) return new Uint32Array(bytes.b.bufferValue,byteOffset);
return new Uint32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.toString = function(this1) {
if(this1 != null) return "UInt32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
var lime_utils__$UInt8Array_UInt8Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt8Array.UInt8Array_Impl_"] = lime_utils__$UInt8Array_UInt8Array_$Impl_$;
lime_utils__$UInt8Array_UInt8Array_$Impl_$.__name__ = ["lime","utils","_UInt8Array","UInt8Array_Impl_"];
lime_utils__$UInt8Array_UInt8Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) return new Uint8Array(bytes.b.bufferValue);
if(len == null) return new Uint8Array(bytes.b.bufferValue,byteOffset);
return new Uint8Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.toString = function(this1) {
if(this1 != null) return "UInt8Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
var lime_utils__$UInt8ClampedArray_UInt8ClampedArray_$Impl_$ = {};
$hxClasses["lime.utils._UInt8ClampedArray.UInt8ClampedArray_Impl_"] = lime_utils__$UInt8ClampedArray_UInt8ClampedArray_$Impl_$;
lime_utils__$UInt8ClampedArray_UInt8ClampedArray_$Impl_$.__name__ = ["lime","utils","_UInt8ClampedArray","UInt8ClampedArray_Impl_"];
lime_utils__$UInt8ClampedArray_UInt8ClampedArray_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
if(byteOffset == null) byteOffset = 0;
if(byteOffset == null) return new Uint8ClampedArray(bytes.b.bufferValue);
if(len == null) return new Uint8ClampedArray(bytes.b.bufferValue,byteOffset);
return new Uint8ClampedArray(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt8ClampedArray_UInt8ClampedArray_$Impl_$.toBytes = function(this1) {
return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt8ClampedArray_UInt8ClampedArray_$Impl_$.toString = function(this1) {
if(this1 != null) return "UInt8ClampedArray [byteLength:" + this1.byteLength + ", length:" + this1.length + "]"; else return null;
};
lime_utils__$UInt8ClampedArray_UInt8ClampedArray_$Impl_$._clamp = function(_in) {
var _out = _in | 0;
if(_out > 255) _out = 255; else _out = _out;
if(_out < 0) return 0; else return _out;
};
var lime_utils_compress_Deflate = function() { };
$hxClasses["lime.utils.compress.Deflate"] = lime_utils_compress_Deflate;
lime_utils_compress_Deflate.__name__ = ["lime","utils","compress","Deflate"];
lime_utils_compress_Deflate.compress = function(bytes) {
var data = pako.deflateRaw(bytes.b.bufferValue);
return haxe_io_Bytes.ofData(data);
};
lime_utils_compress_Deflate.decompress = function(bytes) {
var data = pako.inflateRaw(bytes.b.bufferValue);
return haxe_io_Bytes.ofData(data);
};
var lime_utils_compress_LZMA = function() { };
$hxClasses["lime.utils.compress.LZMA"] = lime_utils_compress_LZMA;
lime_utils_compress_LZMA.__name__ = ["lime","utils","compress","LZMA"];
lime_utils_compress_LZMA.compress = function(bytes) {
return null;
};
lime_utils_compress_LZMA.decompress = function(bytes) {
return null;
};
var lime_utils_compress_Zlib = function() { };
$hxClasses["lime.utils.compress.Zlib"] = lime_utils_compress_Zlib;
lime_utils_compress_Zlib.__name__ = ["lime","utils","compress","Zlib"];
lime_utils_compress_Zlib.compress = function(bytes) {
var data = pako.deflate(bytes.b.bufferValue);
return haxe_io_Bytes.ofData(data);
};
lime_utils_compress_Zlib.decompress = function(bytes) {
var data = pako.inflate(bytes.b.bufferValue);
return haxe_io_Bytes.ofData(data);
};
var miniclip_core_Color = function() {
};
$hxClasses["miniclip.core.Color"] = miniclip_core_Color;
miniclip_core_Color.__name__ = ["miniclip","core","Color"];
miniclip_core_Color.Rgb2Hex = function(r,g,b) {
return r << 16 | g << 8 | b;
};
miniclip_core_Color.prototype = {
__class__: miniclip_core_Color
};
var miniclip_core_DateUtils = function() { };
$hxClasses["miniclip.core.DateUtils"] = miniclip_core_DateUtils;
miniclip_core_DateUtils.__name__ = ["miniclip","core","DateUtils"];
miniclip_core_DateUtils.getUnixTimestamp = function(pDate) {
return pDate.getTime();
};
miniclip_core_DateUtils.fromTime = function(t) {
var d = new Date();
d.setTime(t);
return d;
};
miniclip_core_DateUtils.getNextDateForParams = function(currentTimestamp,parameters) {
var currentDate = miniclip_core_DateUtils.fromTime(currentTimestamp);
var activationYear;
if(parameters.year > 0) activationYear = parameters.year; else activationYear = currentDate.getFullYear();
var activationMonth;
if(parameters.month > 0) activationMonth = parameters.month - 1; else activationMonth = currentDate.getMonth();
var activationDay;
if(parameters.day > 0) activationDay = parameters.day; else activationDay = currentDate.getDate();
var activationHour;
if(parameters.hour > -1) activationHour = parameters.hour; else activationHour = currentDate.getHours();
var activationMinute;
if(parameters.minute > -1) activationMinute = parameters.minute; else activationMinute = currentDate.getMinutes();
var activationSecond = parameters.second;
if(parameters.year == 0 && parameters.month > 0) {
if(activationMonth < currentDate.getMonth()) activationYear++; else if(activationMonth == currentDate.getMonth() && parameters.day > 0) {
if(activationDay < currentDate.getDay()) activationYear++; else if(activationDay == currentDate.getDay() && parameters.hour > -1) {
if(activationHour < currentDate.getHours()) activationYear++; else if(activationHour == currentDate.getHours() && parameters.minute > -1) {
if(activationMinute < currentDate.getMinutes()) activationYear++; else if(activationMinute == currentDate.getMinutes() && activationSecond < currentDate.getSeconds()) activationYear++;
}
}
}
} else if(activationYear < currentDate.getFullYear()) return -1;
if(parameters.month == 0 && parameters.day > 0) {
if(activationDay < currentDate.getDay()) activationMonth++; else if(activationDay == currentDate.getDay() && parameters.hour > -1) {
if(activationHour < currentDate.getHours()) activationMonth++; else if(activationHour == currentDate.getHours() && parameters.minute > -1) {
if(activationMinute < currentDate.getMinutes()) activationMonth++; else if(activationMinute == currentDate.getMinutes() && activationSecond < currentDate.getSeconds()) activationMonth++;
}
}
} else if(activationMonth < currentDate.getMonth()) return -1;
if(parameters.day == 0 && parameters.hour > -1) {
if(activationHour < currentDate.getHours()) activationDay++; else if(activationHour == currentDate.getHours() && parameters.minute > -1) {
if(activationMinute < currentDate.getMinutes()) activationDay++; else if(activationMinute == currentDate.getMinutes() && activationSecond < currentDate.getSeconds()) activationDay++;
}
} else if(activationDay < currentDate.getDay()) return -1;
if(parameters.hour == -1 && parameters.minute > -1) {
if(activationMinute < currentDate.getMinutes()) activationHour++; else if(activationMinute == currentDate.getMinutes() && activationSecond < currentDate.getSeconds()) activationHour++;
} else if(activationHour < currentDate.getHours()) return -1;
if(parameters.minute == -1 && activationSecond < currentDate.getSeconds()) activationMinute++; else if(activationMinute < currentDate.getMinutes()) return -1;
var changed = true;
while(changed) {
changed = false;
if(activationMinute > 59) {
if(parameters.hour == -1) {
activationMinute = 0;
activationHour++;
changed = true;
} else return -1;
}
if(activationHour > 23) {
if(parameters.day == 0) {
activationHour = 0;
activationDay++;
changed = true;
} else return -1;
}
if(activationDay > DateTools.getMonthDays(new Date(activationYear,activationMonth,0,0,0,0))) {
if(parameters.month == 0) {
activationDay = 1;
activationMonth++;
changed = true;
} else return -1;
}
if(activationMonth > 11) {
if(parameters.year == 0) {
activationMonth = 0;
activationYear++;
changed = true;
} else return -1;
}
}
var activationTimestamp = new Date(activationYear,activationMonth,activationDay,activationHour,activationMinute,activationSecond).getTime();
return activationTimestamp;
};
var miniclip_core_PSDebug = function() { };
$hxClasses["miniclip.core.PSDebug"] = miniclip_core_PSDebug;
miniclip_core_PSDebug.__name__ = ["miniclip","core","PSDebug"];
miniclip_core_PSDebug.genSpaces = function(depth) {
return ((function($this) {
var $r;
var _g = [];
{
var _g1 = 0;
while(_g1 < depth) {
var i = _g1++;
_g.push("| ");
}
}
$r = _g;
return $r;
}(this))).join("");
};
var miniclip_core_PromoVO = function(promoSystem,obj) {
this._promoSystem = promoSystem;
this._dataAccessList = new haxe_ds_StringMap();
var objClass = js_Boot.getClass(this);
var className = Type.getClassName(objClass);
this.loadFieldInfo(className,objClass,true);
this.setValues(obj);
};
$hxClasses["miniclip.core.PromoVO"] = miniclip_core_PromoVO;
miniclip_core_PromoVO.__name__ = ["miniclip","core","PromoVO"];
miniclip_core_PromoVO.addFieldDeclaration = function(className,fieldName,fieldType) {
if(!miniclip_core_PromoVO.classCache.exists(className)) {
var value = new haxe_ds_StringMap();
miniclip_core_PromoVO.classCache.set(className,value);
}
var gotIt = miniclip_core_PromoVO.classCache.get(className);
if(__map_reserved[fieldName] != null) gotIt.setReserved(fieldName,fieldType); else gotIt.h[fieldName] = fieldType;
};
miniclip_core_PromoVO.classHasField = function(className,fieldName) {
if(miniclip_core_PromoVO.classCache.exists(className)) {
var tmpList = miniclip_core_PromoVO.classCache.get(className);
if(__map_reserved[fieldName] != null?tmpList.existsReserved(fieldName):tmpList.h.hasOwnProperty(fieldName)) return true;
}
return false;
};
miniclip_core_PromoVO.getClassFields = function(className) {
if(miniclip_core_PromoVO.classCache.exists(className)) return miniclip_core_PromoVO.classCache.get(className);
return null;
};
miniclip_core_PromoVO.prototype = {
_promoSystem: null
,dataAccess: null
,_dataAccessList: null
,_className: null
,handleSpecialTypes: function(fieldName,fieldValue) {
return false;
}
,hasField: function(fieldToFind) {
var fields = Type.getInstanceFields(js_Boot.getClass(this));
var _g = 0;
while(_g < fields.length) {
var field = fields[_g];
++_g;
if(field == fieldToFind) return true;
}
return false;
}
,initializeField: function(className,fieldName,fieldValue,avoidAllocations) {
if(avoidAllocations == null) avoidAllocations = false;
try {
if(avoidAllocations) {
var field = Reflect.getProperty(this,fieldName);
var isFieldNull = field == null;
var isVO = js_Boot.__instanceof(field,miniclip_core_PromoVO);
if(!isFieldNull && isVO) {
(js_Boot.__cast(field , miniclip_core_PromoVO)).setValues(fieldValue);
return;
}
}
var voType = this.getDeclaredTypeOfField(className,fieldName);
var fieldObject = this._parse(voType,fieldValue);
var isNative = false;
switch(voType[1]) {
case 0:
var name = voType[2];
isNative = true;
break;
default:
isNative = false;
}
if(!(isNative && fieldValue != null && this.isDataAccess(fieldValue))) Reflect.setProperty(this,fieldName,fieldObject);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
null;
}
}
,handleDataAccessFields: function(fieldName,fieldData) {
if(this.isDataAccess(fieldData)) {
var value = miniclip_promotionsystem_core_model_DataAccessSolver.getDataAccess(fieldData.dataAccess);
this._dataAccessList.set(fieldName,value);
return true;
}
return false;
}
,setValues: function(obj) {
if(obj == null) return;
if(Type["typeof"](obj) != ValueType.TObject) return;
var className;
if(this._className == null) this._className = Type.getClassName(js_Boot.getClass(this));
className = this._className;
if(this.isDataAccess(obj)) {
this.dataAccess = miniclip_promotionsystem_core_model_DataAccessSolver.getDataAccess(obj.dataAccess);
return;
}
var instanceFields = Reflect.fields(obj);
var _g = 0;
while(_g < instanceFields.length) {
var fieldName = instanceFields[_g];
++_g;
if(StringTools.endsWith(fieldName,"_")) continue;
var fieldValue = Reflect.getProperty(obj,fieldName);
if(this.handleDataAccessFields(fieldName,fieldValue)) continue;
if(this.handleSpecialTypes(fieldName,fieldValue)) continue;
if(miniclip_core_PromoVO.classHasField(className,fieldName)) this.initializeField(className,fieldName,fieldValue); else null;
}
}
,isDataAccessClass: function(type) {
switch(type[1]) {
case 4:
var name = type[2];
return true;
default:
return false;
}
return false;
}
,isVT_Array: function(type) {
switch(type[1]) {
case 3:
var vType = type[2];
return true;
default:
return false;
}
return false;
}
,_parse: function(type,v) {
switch(type[1]) {
case 0:
var name = type[2];
return v;
case 3:
var valueType = type[2];
var vClass = this.resolveVOType(valueType);
return this._parseArray(vClass,valueType,v);
case 2:
var valueType1 = type[3];
var keyType = type[2];
var kClass = this.resolveVOType(keyType);
var vClass1 = this.resolveVOType(valueType1);
return this._parseMap(kClass,keyType,vClass1,valueType1,v);
case 1:
var name1 = type[2];
return this._parseClass(name1,v);
default:
return null;
}
return null;
}
,_parseClass: function(name,v) {
try {
var resolvedClass = Type.resolveClass(name);
return Type.createInstance(resolvedClass,[this._promoSystem,v]);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
null;
}
return null;
}
,resolveVOType: function(type) {
switch(type[1]) {
case 0:
var name = type[2];
var resuClass = Type.resolveClass(name);
return resuClass;
case 1:
var name1 = type[2];
var resuClass1 = Type.resolveClass(name1);
return resuClass1;
default:
return null;
}
return null;
}
,_parseArray: function(valueClass,valueType,arrayValue) {
var result = [];
if(this.isDataAccess(arrayValue)) return result;
var arr = arrayValue;
try {
var _g1 = 0;
var _g = arr.length;
while(_g1 < _g) {
var ii = _g1++;
result.push(this._parse(valueType,arr[ii]));
}
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
null;
}
return result;
}
,_parseMap: function(keyClass,keyType,valueClass,valueType,mapValue) {
var result = new haxe_ds_StringMap();
if(this.isDataAccess(mapValue)) return result;
try {
var _g = 0;
var _g1 = Reflect.fields(mapValue);
while(_g < _g1.length) {
var ii = _g1[_g];
++_g;
var value = Reflect.field(mapValue,ii);
if(__map_reserved[ii] != null) result.setReserved(ii,value); else result.h[ii] = value;
}
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
null;
}
return result;
}
,parseRTTIFields: function(type) {
switch(type[1]) {
case 7:
var params = type[3];
var name = type[2];
return this.parseFieldType(name,params);
case 2:
var params1 = type[3];
var name1 = type[2];
return this.parseFieldType(name1,params1);
default:
}
return miniclip_core_VOTypes.VT_Unknown;
}
,parseFieldType: function(name,params) {
switch(name) {
case "String":case "Int":case "Float":case "Bool":case "Date":
return miniclip_core_VOTypes.VT_Native(name);
case "Array":
var firstField = this.parseRTTIFields(params.pop());
if(firstField != null) return miniclip_core_VOTypes.VT_Array(firstField);
break;
case "Map":
var firstField1 = this.parseRTTIFields(params.pop());
var secondField = this.parseRTTIFields(params.pop());
if(firstField1 != null && secondField != null) return miniclip_core_VOTypes.VT_Map(firstField1,secondField);
break;
case "miniclip.promotionsystem.core.model.vo.DataAccess":
var firstField2 = this.parseRTTIFields(params.pop());
if(firstField2 != null) return miniclip_core_VOTypes.VT_DataAccess(firstField2);
break;
case "miniclip.promotionsystem.core.model.vo.CoreDataAccess":
var firstField3 = this.parseRTTIFields(params.pop());
if(firstField3 != null) return miniclip_core_VOTypes.VT_CoreDataAccess(firstField3);
break;
default:
}
return miniclip_core_VOTypes.VT_Class(name);
}
,loadFieldInfo: function(className,classObj,rootCall) {
if(rootCall == null) rootCall = false;
if(rootCall && miniclip_core_PromoVO.classCache.exists(className)) return;
var rtti = haxe_rtti_Rtti.getRtti(classObj);
var _g_head = rtti.fields.h;
var _g_val = null;
while(_g_head != null) {
var field;
field = (function($this) {
var $r;
_g_val = _g_head[0];
_g_head = _g_head[1];
$r = _g_val;
return $r;
}(this));
if(field.isPublic) {
var _g = field.type;
switch(_g[1]) {
case 7:
var params = _g[3];
var name = _g[2];
miniclip_core_PromoVO.addFieldDeclaration(className,field.name,this.parseFieldType(name,params));
break;
case 2:
var params1 = _g[3];
var name1 = _g[2];
miniclip_core_PromoVO.addFieldDeclaration(className,field.name,this.parseFieldType(name1,params1));
break;
default:
}
}
}
if(rtti.superClass != null) this.loadFieldInfo(className,Type.resolveClass(rtti.superClass.path),false);
}
,getDeclaredTypeOfField: function(className,field) {
if(miniclip_core_PromoVO.classCache.exists(className)) {
var tmpList = miniclip_core_PromoVO.classCache.get(className);
if(__map_reserved[field] != null?tmpList.existsReserved(field):tmpList.h.hasOwnProperty(field)) return __map_reserved[field] != null?tmpList.getReserved(field):tmpList.h[field];
}
return miniclip_core_VOTypes.VT_Unknown;
}
,isDataAccess: function(field) {
var _g = Type["typeof"](field);
switch(_g[1]) {
case 4:
return field.dataAccess != null;
default:
return false;
}
}
,getClassName: function() {
if(this._className == null) this._className = Type.getClassName(js_Boot.getClass(this));
return this._className;
}
,resolveField: function(fieldName) {
if(this._dataAccessList.exists(fieldName)) {
var field = this._dataAccessList.get(fieldName);
var indirectData = miniclip_promotionsystem_core_model_DataAccessSolver.solve(field);
if(!this.handleSpecialTypes(fieldName,indirectData)) this.initializeField((function($this) {
var $r;
if($this._className == null) $this._className = Type.getClassName(js_Boot.getClass($this));
$r = $this._className;
return $r;
}(this)),fieldName,indirectData,true);
}
}
,resolve: function(recursive,depth) {
if(depth == null) depth = 0;
if(recursive == null) recursive = false;
var className;
if(this._className == null) this._className = Type.getClassName(js_Boot.getClass(this));
className = this._className;
if(this.dataAccess != null) {
var indirectData = miniclip_promotionsystem_core_model_DataAccessSolver.solve(this.dataAccess);
this.setValues(indirectData);
}
if(this._dataAccessList != null) {
var daFields = this._dataAccessList.keys();
while( daFields.hasNext() ) {
var fieldName = daFields.next();
this.resolveField(fieldName);
}
}
if(recursive) {
var classFields = miniclip_core_PromoVO.getClassFields((function($this) {
var $r;
if($this._className == null) $this._className = Type.getClassName(js_Boot.getClass($this));
$r = $this._className;
return $r;
}(this)));
if(classFields == null) return;
var fieldsList = classFields.keys();
var fieldType;
while( fieldsList.hasNext() ) {
var fieldName1 = fieldsList.next();
if(fieldName1 == "dataAccess") continue;
fieldType = __map_reserved[fieldName1] != null?classFields.getReserved(fieldName1):classFields.h[fieldName1];
switch(fieldType[1]) {
case 1:
var name = fieldType[2];
var fieldValue = Reflect.getProperty(this,fieldName1);
if(fieldValue != null && js_Boot.__instanceof(fieldValue,miniclip_core_PromoVO)) (js_Boot.__cast(fieldValue , miniclip_core_PromoVO)).resolve(recursive,depth + 1);
break;
case 3:
var vType = fieldType[2];
var data = Reflect.getProperty(this,fieldName1);
if(data == null) continue;
var fieldValue1 = data;
if(fieldValue1 == null) continue;
var $it0 = $iterator(fieldValue1)();
while( $it0.hasNext() ) {
var elm = $it0.next();
if(js_Boot.__instanceof(elm,miniclip_core_PromoVO)) (js_Boot.__cast(elm , miniclip_core_PromoVO)).resolve(recursive,depth + 1);
}
break;
case 0:
var name1 = fieldType[2];
continue;
break;
case 2:
var valueType = fieldType[3];
var keyType = fieldType[2];
var data1 = Reflect.getProperty(this,fieldName1);
if(data1 == null) continue;
var fieldValue2 = data1;
if(fieldValue2 == null) continue;
var $it1 = fieldValue2.iterator();
while( $it1.hasNext() ) {
var elm1 = $it1.next();
if(js_Boot.__instanceof(elm1,miniclip_core_PromoVO)) (js_Boot.__cast(elm1 , miniclip_core_PromoVO)).resolve(recursive,depth + 1);
}
break;
default:
continue;
}
}
}
}
,getFields: function() {
return miniclip_core_PromoVO.getClassFields((function($this) {
var $r;
if($this._className == null) $this._className = Type.getClassName(js_Boot.getClass($this));
$r = $this._className;
return $r;
}(this)));
}
,__class__: miniclip_core_PromoVO
};
var miniclip_core_VOTypes = $hxClasses["miniclip.core.VOTypes"] = { __ename__ : ["miniclip","core","VOTypes"], __constructs__ : ["VT_Native","VT_Class","VT_Map","VT_Array","VT_DataAccess","VT_CoreDataAccess","VT_Unknown"] };
miniclip_core_VOTypes.VT_Native = function(name) { var $x = ["VT_Native",0,name]; $x.__enum__ = miniclip_core_VOTypes; $x.toString = $estr; return $x; };
miniclip_core_VOTypes.VT_Class = function(name) { var $x = ["VT_Class",1,name]; $x.__enum__ = miniclip_core_VOTypes; $x.toString = $estr; return $x; };
miniclip_core_VOTypes.VT_Map = function(key,value) { var $x = ["VT_Map",2,key,value]; $x.__enum__ = miniclip_core_VOTypes; $x.toString = $estr; return $x; };
miniclip_core_VOTypes.VT_Array = function(value) { var $x = ["VT_Array",3,value]; $x.__enum__ = miniclip_core_VOTypes; $x.toString = $estr; return $x; };
miniclip_core_VOTypes.VT_DataAccess = function(value) { var $x = ["VT_DataAccess",4,value]; $x.__enum__ = miniclip_core_VOTypes; $x.toString = $estr; return $x; };
miniclip_core_VOTypes.VT_CoreDataAccess = function(value) { var $x = ["VT_CoreDataAccess",5,value]; $x.__enum__ = miniclip_core_VOTypes; $x.toString = $estr; return $x; };
miniclip_core_VOTypes.VT_Unknown = ["VT_Unknown",6];
miniclip_core_VOTypes.VT_Unknown.toString = $estr;
miniclip_core_VOTypes.VT_Unknown.__enum__ = miniclip_core_VOTypes;
var miniclip_promotionsystem_Utils = function() { };
$hxClasses["miniclip.promotionsystem.Utils"] = miniclip_promotionsystem_Utils;
miniclip_promotionsystem_Utils.__name__ = ["miniclip","promotionsystem","Utils"];
miniclip_promotionsystem_Utils.isTimeTrigger = function(trigger) {
return trigger != null && js_Boot.__instanceof(trigger,miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger);
};
miniclip_promotionsystem_Utils.isStringEmpty = function(value) {
return value == null || value == "";
};
miniclip_promotionsystem_Utils.isCollectionEmpty = function(collection) {
return collection == null || collection.length == 0;
};
miniclip_promotionsystem_Utils.remove_last_instance_of_object = function(vector,obj) {
var idx;
var x = obj;
idx = HxOverrides.lastIndexOf(vector,x,vector.length - 1);
if(idx != -1) {
vector.splice(idx,1);
return true;
}
return false;
};
miniclip_promotionsystem_Utils.isNaN = function(x) {
return isNaN(x);
};
miniclip_promotionsystem_Utils.convertPlist = function(data) {
var data1 = com_plist_Reader.read(data);
return data1;
};
var miniclip_promotionsystem_client_PromotionManager = function() {
this._promoClients = new haxe_ds_StringMap();
this._promoConfigs = new haxe_ds_StringMap();
};
$hxClasses["miniclip.promotionsystem.client.PromotionManager"] = miniclip_promotionsystem_client_PromotionManager;
miniclip_promotionsystem_client_PromotionManager.__name__ = ["miniclip","promotionsystem","client","PromotionManager"];
miniclip_promotionsystem_client_PromotionManager.prototype = {
encryptPassword: null
,userId: null
,clientDelegate: null
,get_clientDelegate: function() {
return this._clientDelegate;
}
,_promoClients: null
,_promoConfigs: null
,_systemDelegate: null
,_clientDelegate: null
,initWithPromotionClientDelegate: function(clientDelegate,systemDelegate) {
this.setupPromotionClientDelegate(clientDelegate,systemDelegate);
}
,setupPromotionClientWithConfigObject: function(config,systemId,persistanceDelegate) {
if(this._clientDelegate == null) return false; else {
var newClient = new miniclip_promotionsystem_client_PromotionSystemClient();
newClient.getClientWithConfiguration(config,systemId,this.userId,this._clientDelegate,this._systemDelegate,persistanceDelegate);
if(newClient == null) return false; else {
this._promoClients.set(systemId,newClient);
var value = config;
this._promoConfigs.set(systemId,value);
return true;
}
}
}
,setCurrentTimestamp: function(currentTimestamp) {
var $it0 = this._promoClients.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
this._promoClients.get(key).setCurrentTimestamp(currentTimestamp);
}
}
,setIndirectDataAccess: function(config) {
miniclip_promotionsystem_core_model_DataAccessSolver.loadIndirectData(config);
}
,setPromotionDataAccessProtocol: function(delegate) {
miniclip_promotionsystem_core_PromotionDataAccessManager.initWithDelegate(delegate);
}
,getClientForSystem: function(systemId) {
return this._promoClients.get(systemId);
}
,getNextShowablePopupForSystem: function(systemId) {
var client = this._promoClients.get(systemId);
if(client == null) return null;
return client.getNextShowablePopup();
}
,getNextShowableOfferForSystem: function(systemId) {
var client = this._promoClients.get(systemId);
if(client == null) return null;
return client.getNextShowablePopupOfferId();
}
,getCustomDataForOffer: function(offerId,systemId) {
var client = this._promoClients.get(systemId);
if(client == null) return null;
return client.get_promoSystem().getPopUpInfoForOffer(offerId).customData;
}
,isProductActivated: function(pProductId) {
var $it0 = this._promoClients.iterator();
while( $it0.hasNext() ) {
var client = $it0.next();
if(client.get_promoSystem().isProductActivated(pProductId)) return true;
}
return false;
}
,isProductDeactivated: function(pProductId) {
var $it0 = this._promoClients.iterator();
while( $it0.hasNext() ) {
var client = $it0.next();
if(client.get_promoSystem().isProductDeactivated(pProductId)) return true;
}
return false;
}
,getProductReplacement: function(pProductId) {
var $it0 = this._promoClients.iterator();
while( $it0.hasNext() ) {
var client = $it0.next();
var replacement = client.get_promoSystem().getProductReplacement(pProductId);
if(replacement != null) return replacement;
}
return null;
}
,getReplacedProduct: function(pProductId) {
var $it0 = this._promoClients.iterator();
while( $it0.hasNext() ) {
var client = $it0.next();
var replacement = client.get_promoSystem().getReplacedProduct(pProductId);
if(replacement != null) return replacement;
}
return null;
}
,setupPromotionClientDelegate: function(clientDelegate,systemDelegate) {
this._clientDelegate = clientDelegate;
this._systemDelegate = systemDelegate;
}
,reloadSystems: function() {
var $it0 = this._promoClients.keys();
while( $it0.hasNext() ) {
var systemId = $it0.next();
var config = this._promoConfigs.get(systemId);
if(config != null) this.reloadSystem(config,systemId);
}
}
,reloadSystem: function(config,systemId) {
var client = this._promoClients.get(systemId);
if(client == null) return false;
if(config == null) return false;
return client.get_promoSystem().loadOffersConfiguration(config);
}
,resetSystems: function() {
var $it0 = this._promoClients.iterator();
while( $it0.hasNext() ) {
var client = $it0.next();
client.get_gameDelegate().hideCurrentBadgeForSystem(client.get_promoSystem());
client.reset();
}
}
,__class__: miniclip_promotionsystem_client_PromotionManager
,__properties__: {get_clientDelegate:"get_clientDelegate"}
};
var miniclip_promotionsystem_core_interfaces_IPromotionActionDelegate = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.IPromotionActionDelegate"] = miniclip_promotionsystem_core_interfaces_IPromotionActionDelegate;
miniclip_promotionsystem_core_interfaces_IPromotionActionDelegate.__name__ = ["miniclip","promotionsystem","core","interfaces","IPromotionActionDelegate"];
miniclip_promotionsystem_core_interfaces_IPromotionActionDelegate.prototype = {
executeAction: null
,getActionType: null
,__class__: miniclip_promotionsystem_core_interfaces_IPromotionActionDelegate
};
var miniclip_promotionsystem_client_interfaces_IPromotionSystemClient = function() { };
$hxClasses["miniclip.promotionsystem.client.interfaces.IPromotionSystemClient"] = miniclip_promotionsystem_client_interfaces_IPromotionSystemClient;
miniclip_promotionsystem_client_interfaces_IPromotionSystemClient.__name__ = ["miniclip","promotionsystem","client","interfaces","IPromotionSystemClient"];
miniclip_promotionsystem_client_interfaces_IPromotionSystemClient.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IPromotionActionDelegate];
miniclip_promotionsystem_client_interfaces_IPromotionSystemClient.prototype = {
get_promoSystem: null
,get_gameDelegate: null
,promoSystem: null
,gameDelegate: null
,initClientForSystem: null
,reset: null
,setCurrentTimestamp: null
,getPopupForOffer: null
,getBadgeForOffer: null
,getNextShowablePopupOfferId: null
,getNextShowablePopupOfferIdIsAuto: null
,getNextShowablePopup: null
,getNextShowablePopupIsAuto: null
,activateBadgeCycling: null
,deactivateBadgeCycling: null
,getTopShowableBadgeOfferId: null
,getNextShowableBadge: null
,__class__: miniclip_promotionsystem_client_interfaces_IPromotionSystemClient
,__properties__: {get_gameDelegate:"get_gameDelegate",get_promoSystem:"get_promoSystem"}
};
var miniclip_promotionsystem_client_PromotionSystemClient = function() {
this.PREVIOUSLY_SHOWN_BADGES_STATE_FOR_SYSTEM_AND_USER = "PromoClient_PreviouslyShownBadges-";
this.BadgeCyclingTimerPeriod = 1000;
};
$hxClasses["miniclip.promotionsystem.client.PromotionSystemClient"] = miniclip_promotionsystem_client_PromotionSystemClient;
miniclip_promotionsystem_client_PromotionSystemClient.__name__ = ["miniclip","promotionsystem","client","PromotionSystemClient"];
miniclip_promotionsystem_client_PromotionSystemClient.__interfaces__ = [miniclip_promotionsystem_client_interfaces_IPromotionSystemClient];
miniclip_promotionsystem_client_PromotionSystemClient.prototype = {
BadgeCyclingTimerPeriod: null
,PREVIOUSLY_SHOWN_BADGES_STATE_FOR_SYSTEM_AND_USER: null
,promoSystem: null
,get_promoSystem: function() {
return this._promoSystem;
}
,gameDelegate: null
,get_gameDelegate: function() {
return this._gameDelegate;
}
,_promoSystem: null
,_gameDelegate: null
,_shownPopupForOfferIds: null
,_shownBadgeForOfferIds: null
,_lastBadgeChange: null
,_badgeCyclingActive: null
,_updateBadgeTimer: null
,_oldBadge: null
,getClientWithConfiguration: function(configuration,systemId,userId,clientDelegate,systemDelegate,persistanceDelegate) {
var promoSystem = new miniclip_promotionsystem_core_PromotionSystem();
promoSystem.set_promoSystemId(systemId);
promoSystem.set_defaultSaveDataKey("${systemId}SaveData");
promoSystem.set_delegate(systemDelegate);
promoSystem.initWithOffersConfiguration(configuration,persistanceDelegate,this);
this.initClientForSystem(promoSystem,clientDelegate);
}
,initClientForSystem: function(promoSystem,delegate) {
this.reset();
this._promoSystem = promoSystem;
this._gameDelegate = delegate;
}
,reset: function() {
this._shownPopupForOfferIds = [];
this.deactivateBadgeCycling();
this._lastBadgeChange = -1.0;
this._badgeCyclingActive = false;
this._oldBadge = null;
if(this.get_promoSystem() != null) this.get_promoSystem().reset();
}
,loadPreviouslyShownOffers: function() {
if(this._shownBadgeForOfferIds != null) this._shownBadgeForOfferIds.splice(0,this._shownBadgeForOfferIds.length);
if(this._badgeCyclingActive) {
var userId = this._gameDelegate.getCurrentUserId();
var _previousShownBadgesSaveKey = this.PREVIOUSLY_SHOWN_BADGES_STATE_FOR_SYSTEM_AND_USER + "%" + this._promoSystem.get_promoSystemId() + "-%" + userId;
var previouslyShownOffersState = null;
if(previouslyShownOffersState == null) this._shownBadgeForOfferIds = [];
} else this._shownBadgeForOfferIds = [];
this._lastBadgeChange = -1.0;
}
,setCurrentTimestamp: function(timestamp) {
this._promoSystem.set_currentTimestamp(timestamp);
this.checkIfOffersShouldBeKilled();
}
,getPopupForOffer: function(offerId,isAuto,fetchOnly) {
if(fetchOnly == null) fetchOnly = false;
if(isAuto == null) isAuto = false;
if(offerId == null) return null;
if(fetchOnly) {
var popup = this._gameDelegate.getPopupForOffer(offerId,this,this._promoSystem);
return popup;
} else if(this._gameDelegate.canShowOfferPopup(offerId,this._promoSystem,isAuto)) {
var popup1 = this._gameDelegate.getPopupForOffer(offerId,this,this._promoSystem);
if(popup1 != null) {
this.addOfferIdToShownPopups(offerId);
var offer = this._promoSystem.getOfferFromId(offerId);
offer.setPopupActiveState(true);
}
return popup1;
}
return null;
}
,getBadgeForOffer: function(offerId) {
var _g = this;
if(this._gameDelegate.canShowOfferBadge(offerId,this._promoSystem)) {
var offer = this._promoSystem.getOfferFromId(offerId);
var badgeConfiguration = this._promoSystem.getBadgeInfoForOffer(offerId);
var badge = this._gameDelegate.getPromoButtonForOffer(offer,badgeConfiguration,function() {
_g._gameDelegate.badgeButtonPressed(offerId,_g._promoSystem);
},this._promoSystem);
return badge;
}
return null;
}
,getNextShowablePopupOfferId: function() {
return this.getNextShowablePopupOfferIdIsAuto(true);
}
,getNextShowablePopupOfferIdIsAuto: function(isAuto) {
var offers = this._promoSystem.getActiveOffers();
var _g1 = 0;
var _g = offers.length;
while(_g1 < _g) {
var i = _g1++;
var offer = offers[i];
if(offer == null || miniclip_promotionsystem_Utils.isStringEmpty(offer.offerName)) continue;
var isPopupActive = true;
if(isAuto) isPopupActive = this._promoSystem.isOfferPopUpActive(offer.offerName);
if(!isPopupActive) continue;
var canShowPopup = this._gameDelegate.canShowOfferPopup(offer.offerName,this._promoSystem,isAuto);
if(canShowPopup) return offer.offerName;
}
return null;
}
,getNextShowablePopup: function() {
return this.getNextShowablePopupIsAuto(true);
}
,getNextShowablePopupIsAuto: function(isAuto) {
return this.getPopupForOffer(this.getNextShowablePopupOfferIdIsAuto(isAuto),isAuto);
}
,deactivateBadgeCycling: function() {
this._lastBadgeChange = -1.0;
this._badgeCyclingActive = false;
if(this._updateBadgeTimer != null) {
this._updateBadgeTimer.stop();
this._updateBadgeTimer = null;
}
}
,activateBadgeCycling: function() {
if(this._badgeCyclingActive) return;
var cycleCooldown = this.getBadgeCycleCooldownTime();
var canActivateCycling = cycleCooldown != -1.0;
if(canActivateCycling && !this._badgeCyclingActive) this._badgeCyclingActive = true;
this.loadPreviouslyShownOffers();
if(this._updateBadgeTimer != null) {
this._updateBadgeTimer.stop();
this._updateBadgeTimer = null;
}
this._updateBadgeTimer = new haxe_Timer(1000);
this._updateBadgeTimer.run = $bind(this,this.updatePromotionBadge);
}
,updatePromotionBadge: function() {
var nextShowableBadgeOfferId = this.getNextShowableBadgeOfferId();
if(miniclip_promotionsystem_Utils.isStringEmpty(nextShowableBadgeOfferId)) {
if(!miniclip_promotionsystem_Utils.isCollectionEmpty(this._shownBadgeForOfferIds)) {
this.resetShownBadges();
this._gameDelegate.hideCurrentBadgeForSystem(this._promoSystem);
}
return;
}
if(nextShowableBadgeOfferId != this._shownBadgeForOfferIds[this._shownBadgeForOfferIds.length - 1]) {
var promo = this._promoSystem.getOfferFromId(nextShowableBadgeOfferId);
var badge = this.getBadgeForOffer(nextShowableBadgeOfferId);
if(badge != null) {
this.addOfferIdToShownBadges(nextShowableBadgeOfferId);
if(this._oldBadge == null || this._oldBadge.get_offerId() != badge.get_offerId()) {
this._oldBadge = badge;
this._gameDelegate.showBadge(badge,this._promoSystem);
}
}
}
}
,getBadgeCycleCooldownTime: function() {
var genericGameClientCooldown;
try {
genericGameClientCooldown = this._gameDelegate.getDefaultBadgeCycleCooldownForSystem(this._promoSystem);
} catch( msg ) {
haxe_CallStack.lastException = msg;
if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
return -1.0;
}
if(genericGameClientCooldown <= 0.0) return -1.0;
var offerId;
if(miniclip_promotionsystem_Utils.isCollectionEmpty(this._shownBadgeForOfferIds)) offerId = null; else offerId = this._shownBadgeForOfferIds[this._shownBadgeForOfferIds.length - 1];
var specificOfferCooldown = -1.0;
if(!miniclip_promotionsystem_Utils.isStringEmpty(offerId)) {
var offer = this._promoSystem.getOfferFromId(offerId);
specificOfferCooldown = offer.badgeCycleCooldown;
if(specificOfferCooldown == 0) return -1.0;
}
if(specificOfferCooldown > 0.0) return specificOfferCooldown; else return genericGameClientCooldown;
}
,getTopShowableBadgeOfferId: function() {
return null;
}
,getNextShowableBadge: function() {
return null;
}
,getNextShowableBadgeOfferId: function() {
var cycleCoolDown = this.getBadgeCycleCooldownTime();
var currentTimestamp = this._promoSystem.get_currentTimestamp();
var cooldownTimePassed = this._lastBadgeChange == -1. || currentTimestamp - this._lastBadgeChange > cycleCoolDown && cycleCoolDown != -1.0;
var shouldCycle = this._badgeCyclingActive && cooldownTimePassed;
var firstShowableOffer = null;
var offers = this._promoSystem.getActiveOffers();
var _g = 0;
while(_g < offers.length) {
var offer = offers[_g];
++_g;
if(miniclip_promotionsystem_Utils.isStringEmpty(offer.offerName)) continue;
if(!this.offerHasBadgeConfiguration(offer.offerName)) continue;
if(this._gameDelegate.canShowOfferBadge(offer.offerName,this._promoSystem)) {
if(offer.offerName == this._shownBadgeForOfferIds[this._shownBadgeForOfferIds.length - 1] && !shouldCycle) return offer.offerName;
if(miniclip_promotionsystem_Utils.isStringEmpty(firstShowableOffer)) firstShowableOffer = offer.offerName;
if(HxOverrides.indexOf(this._shownBadgeForOfferIds,offer.offerName,0) > -1) continue;
return offer.offerName;
}
}
var shouldResetCycle = HxOverrides.indexOf(this._shownBadgeForOfferIds,firstShowableOffer,0) > -1;
if(shouldResetCycle) this.resetShownBadges();
var wasLastItem = firstShowableOffer == this._shownBadgeForOfferIds[this._shownBadgeForOfferIds.length - 1];
if(wasLastItem) this.addOfferIdToShownBadges(firstShowableOffer);
return firstShowableOffer;
}
,offerHasBadgeConfiguration: function(offerId) {
var badgeInfo = this._promoSystem.getBadgeInfoForOffer(offerId);
if(badgeInfo == null) return false;
var badgeHasLegacyConfig = !miniclip_promotionsystem_Utils.isStringEmpty(badgeInfo.text) && !miniclip_promotionsystem_Utils.isStringEmpty(badgeInfo.image);
var badgeHasCurrentConfig = badgeInfo.badgeConfiguration != null;
if(badgeHasLegacyConfig || badgeHasCurrentConfig) return true;
return false;
}
,resetShownBadges: function() {
if(this._shownBadgeForOfferIds.length > 0) this._shownBadgeForOfferIds.splice(0,this._shownBadgeForOfferIds.length);
this._oldBadge = null;
}
,checkIfOffersShouldBeKilled: function() {
var activeOffers = this._promoSystem.getActiveOffers();
var _g = 0;
while(_g < activeOffers.length) {
var activeOffer = activeOffers[_g];
++_g;
var customData = activeOffer.popUpCustomData;
if(customData != null) {
var productsThatKill = customData.productsThatKill;
var needAllProductsToKill = customData.needAllProductsToKill;
if(productsThatKill != null && this._gameDelegate.userOwnsProductsInList(productsThatKill,needAllProductsToKill,this._promoSystem)) activeOffer.kill();
}
}
}
,executeAction: function(type,parameters,successEvents,successOnFirstEvent,failureEvents,failureOnFirstEvent) {
if(type == "dismiss") return miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_SUCCESS; else if(type == "redirect") {
var target = Reflect.getProperty(parameters,"target");
if(miniclip_promotionsystem_Utils.isStringEmpty(target)) return miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE;
return this._gameDelegate.redirectToTarget(target,parameters,this.get_promoSystem());
} else if(type == "transaction") {
var transactionId = Reflect.getProperty(parameters,"transactionId");
if(miniclip_promotionsystem_Utils.isStringEmpty(transactionId)) return miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE;
return this._gameDelegate.makePurchase(transactionId,this._shownPopupForOfferIds[this._shownPopupForOfferIds.length - 1],successEvents,successOnFirstEvent,failureEvents,failureOnFirstEvent,this.get_promoSystem());
} else if(type == "url") {
var url = Reflect.getProperty(parameters,"url");
if(miniclip_promotionsystem_Utils.isStringEmpty(url)) return miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE;
try {
return this._gameDelegate.openBrowserWithURL(url,this.get_promoSystem());
} catch( msg ) {
haxe_CallStack.lastException = msg;
if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
if( js_Boot.__instanceof(msg,String) ) {
return miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE;
} else throw(msg);
}
} else if(type == "url") {
var appId = Reflect.getProperty(parameters,"appId");
if(miniclip_promotionsystem_Utils.isStringEmpty(appId)) return miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE;
try {
return this._gameDelegate.openStoreWithAppId(appId,this.get_promoSystem());
} catch( msg1 ) {
haxe_CallStack.lastException = msg1;
if (msg1 instanceof js__$Boot_HaxeError) msg1 = msg1.val;
if( js_Boot.__instanceof(msg1,String) ) {
return miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE;
} else throw(msg1);
}
} else return miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE;
}
,getActionType: function(type,parameters,successEvents,successOnFirstEvent,failureEvents,failureOnFirstEvent) {
null;
}
,addOfferIdToShownPopups: function(offerId) {
if(HxOverrides.indexOf(this._shownPopupForOfferIds,offerId,0) == -1) this._shownPopupForOfferIds.push(offerId);
}
,addOfferIdToShownBadges: function(offerId) {
var index = HxOverrides.indexOf(this._shownBadgeForOfferIds,offerId,0);
if(index > -1) this._shownBadgeForOfferIds.splice(index,1);
if(this._badgeCyclingActive) {
}
this._lastBadgeChange = this._promoSystem.get_currentTimestamp();
this._shownBadgeForOfferIds.push(offerId);
}
,__class__: miniclip_promotionsystem_client_PromotionSystemClient
,__properties__: {get_gameDelegate:"get_gameDelegate",get_promoSystem:"get_promoSystem"}
};
var miniclip_promotionsystem_client_interfaces_IPromotionPopupInfo = function() { };
$hxClasses["miniclip.promotionsystem.client.interfaces.IPromotionPopupInfo"] = miniclip_promotionsystem_client_interfaces_IPromotionPopupInfo;
miniclip_promotionsystem_client_interfaces_IPromotionPopupInfo.__name__ = ["miniclip","promotionsystem","client","interfaces","IPromotionPopupInfo"];
miniclip_promotionsystem_client_interfaces_IPromotionPopupInfo.prototype = {
buttonText: null
,image: null
,dismissEvent: null
,killEvent: null
,customData: null
,initWithImage: null
,__class__: miniclip_promotionsystem_client_interfaces_IPromotionPopupInfo
};
var miniclip_promotionsystem_core_PromotionDataAccessManager = function() { };
$hxClasses["miniclip.promotionsystem.core.PromotionDataAccessManager"] = miniclip_promotionsystem_core_PromotionDataAccessManager;
miniclip_promotionsystem_core_PromotionDataAccessManager.__name__ = ["miniclip","promotionsystem","core","PromotionDataAccessManager"];
miniclip_promotionsystem_core_PromotionDataAccessManager.initWithDelegate = function(delegate) {
miniclip_promotionsystem_core_PromotionDataAccessManager._delegate = delegate;
};
miniclip_promotionsystem_core_PromotionDataAccessManager.getGroupForTest = function(testId) {
if(miniclip_promotionsystem_core_PromotionDataAccessManager._delegate != null) return miniclip_promotionsystem_core_PromotionDataAccessManager._delegate.getGroupForTest(testId); else return "default";
};
miniclip_promotionsystem_core_PromotionDataAccessManager.getClientLanguage = function() {
if(miniclip_promotionsystem_core_PromotionDataAccessManager._delegate != null) return miniclip_promotionsystem_core_PromotionDataAccessManager._delegate.getClientLanguage(); else return "default";
};
miniclip_promotionsystem_core_PromotionDataAccessManager.currentPlatformType = function() {
if(miniclip_promotionsystem_core_PromotionDataAccessManager._delegate != null) return miniclip_promotionsystem_core_PromotionDataAccessManager._delegate.currentPlatformType(); else return "default";
};
miniclip_promotionsystem_core_PromotionDataAccessManager.getPropertyType = function(propertyType,propertyInfo) {
if(miniclip_promotionsystem_core_PromotionDataAccessManager._delegate != null) return miniclip_promotionsystem_core_PromotionDataAccessManager._delegate.getPropertyType(propertyType,propertyInfo); else return "default";
};
miniclip_promotionsystem_core_PromotionDataAccessManager.getNumberPropertyType = function(propertyType) {
if(miniclip_promotionsystem_core_PromotionDataAccessManager._delegate != null) return miniclip_promotionsystem_core_PromotionDataAccessManager._delegate.getNumberPropertyType(propertyType); else return 0;
};
miniclip_promotionsystem_core_PromotionDataAccessManager.getBoolPropertyType = function(propertyType,propertyInfo) {
if(miniclip_promotionsystem_core_PromotionDataAccessManager._delegate != null) return miniclip_promotionsystem_core_PromotionDataAccessManager._delegate.getBoolPropertyType(propertyType,propertyInfo); else return true;
};
var partials_Partial = function() { };
$hxClasses["partials.Partial"] = partials_Partial;
partials_Partial.__name__ = ["partials","Partial"];
var miniclip_promotionsystem_core_interfaces_IPromotionOfferDelegate = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.IPromotionOfferDelegate"] = miniclip_promotionsystem_core_interfaces_IPromotionOfferDelegate;
miniclip_promotionsystem_core_interfaces_IPromotionOfferDelegate.__name__ = ["miniclip","promotionsystem","core","interfaces","IPromotionOfferDelegate"];
miniclip_promotionsystem_core_interfaces_IPromotionOfferDelegate.prototype = {
showOfferPopUp: null
,hideOfferPopUp: null
,offerActivated: null
,offerDeactivated: null
,activateStoreChanges: null
,deactivateStoreChanges: null
,__class__: miniclip_promotionsystem_core_interfaces_IPromotionOfferDelegate
};
var miniclip_promotionsystem_core_interfaces_IPromotionSystemBase = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.IPromotionSystemBase"] = miniclip_promotionsystem_core_interfaces_IPromotionSystemBase;
miniclip_promotionsystem_core_interfaces_IPromotionSystemBase.__name__ = ["miniclip","promotionsystem","core","interfaces","IPromotionSystemBase"];
miniclip_promotionsystem_core_interfaces_IPromotionSystemBase.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IPromotionOfferDelegate];
miniclip_promotionsystem_core_interfaces_IPromotionSystemBase.prototype = {
get_promoSystemId: null
,set_promoSystemId: null
,get_currentTimestamp: null
,set_currentTimestamp: null
,get_delegate: null
,set_delegate: null
,get_defaultSaveDataKey: null
,set_defaultSaveDataKey: null
,get_currentSaveDataKey: null
,set_currentSaveDataKey: null
,dirtyFlag: null
,loadData: null
,saveData: null
,resetData: null
,saveDataAndSynchronize: null
,reset: null
,getProductReplacement: null
,getReplacedProduct: null
,getProductReplacements: null
,isProductActivated: null
,isProductDeactivated: null
,getActivatedProducts: null
,getDeactivatedProducts: null
,getProductReplacementsForOffer: null
,getActivatedProductsForOffer: null
,getDeactivatedProductsForOffer: null
,getOffers: null
,isOfferActive: null
,activateOffer: null
,isOfferKilled: null
,isOfferHidden: null
,getActiveOffers: null
,setOfferPopUpState: null
,isOfferPopUpActive: null
,getOfferFromId: null
,getTopActiveOffer: null
,getBadgeInfoForOffer: null
,getRemainingBadgeTimeForOffer: null
,getEnqueuedOfferPopUps: null
,getTopOfferPopUp: null
,getPopUpInfoForOffer: null
,runPopUpAction: null
,getPopupActionDataForOffer: null
,getSaveDataKeyForUser: null
,loadOffersConfiguration: null
,registerForEvent: null
,unregisterForEvent: null
,postEvent: null
,__class__: miniclip_promotionsystem_core_interfaces_IPromotionSystemBase
,__properties__: {set_currentSaveDataKey:"set_currentSaveDataKey",get_currentSaveDataKey:"get_currentSaveDataKey",set_defaultSaveDataKey:"set_defaultSaveDataKey",get_defaultSaveDataKey:"get_defaultSaveDataKey",set_delegate:"set_delegate",get_delegate:"get_delegate",set_currentTimestamp:"set_currentTimestamp",get_currentTimestamp:"get_currentTimestamp",set_promoSystemId:"set_promoSystemId",get_promoSystemId:"get_promoSystemId"}
};
var miniclip_promotionsystem_core_PromotionSystem = function() {
this._numDisabledOffersToCheck = 1;
this._disabledOfferIndex = 0;
this.dirtyFlag = false;
this.set_currentTimestamp(-1.0);
this._offers = new haxe_ds_StringMap();
this._activeOffers = [];
this._offerPopupQueue = [];
this._offerPopupPrioritizedQueue = [];
this._dispatcher = new miniclip_promotionsystem_core_model_PromoEventDispatcher();
this._disabledOffers = [];
this._storeChangesProductActivationState = new haxe_ds_StringMap();
this._storeChangesReplacedProducts = new haxe_ds_StringMap();
};
$hxClasses["miniclip.promotionsystem.core.PromotionSystem"] = miniclip_promotionsystem_core_PromotionSystem;
miniclip_promotionsystem_core_PromotionSystem.__name__ = ["miniclip","promotionsystem","core","PromotionSystem"];
miniclip_promotionsystem_core_PromotionSystem.__interfaces__ = [partials_Partial,miniclip_promotionsystem_core_interfaces_IPromotionSystemBase];
miniclip_promotionsystem_core_PromotionSystem.sortString = function(a,b) {
if(a < b) return -1; else if(a > b) return 1; else return 0;
};
miniclip_promotionsystem_core_PromotionSystem.prototype = {
dirtyFlag: null
,promoSystemId: null
,get_promoSystemId: function() {
return this.promoSystemId;
}
,set_promoSystemId: function(value) {
return this.promoSystemId = value;
}
,currentTimestamp: null
,get_currentTimestamp: function() {
return this.currentTimestamp;
}
,set_currentTimestamp: function(value) {
if(!this._initialized) return this.get_currentTimestamp();
this.currentTimestamp = value;
if(this._disabledOffers.length > 0) {
var offerCounter;
if(this._numDisabledOffersToCheck == 0) offerCounter = this._disabledOffers.length; else offerCounter = this._numDisabledOffersToCheck;
var _g = 0;
while(_g < offerCounter) {
var count = _g++;
if(this._disabledOfferIndex >= this._disabledOffers.length) this._disabledOfferIndex = 0;
var offer = this._disabledOffers[this._disabledOfferIndex];
offer.updateDisableOffer();
if(!offer.disableOffer) {
this.addOffer(offer);
this._disabledOffers.splice(this._disabledOfferIndex,1);
if(this._disabledOffers.length <= 0) break;
} else ++this._disabledOfferIndex;
}
}
var $it0 = this._offers.iterator();
while( $it0.hasNext() ) {
var offer1 = $it0.next();
offer1.set_currentTimestamp(value);
}
if(this.dirtyFlag) {
this.dirtyFlag = false;
this.saveData();
}
return this.currentTimestamp = value;
}
,delegate: null
,get_delegate: function() {
return this.delegate;
}
,set_delegate: function(value) {
return this.delegate = value;
}
,defaultSaveDataKey: null
,get_defaultSaveDataKey: function() {
return this.defaultSaveDataKey;
}
,set_defaultSaveDataKey: function(value) {
return this.defaultSaveDataKey = value;
}
,currentSaveDataKey: null
,get_currentSaveDataKey: function() {
return this.currentSaveDataKey;
}
,set_currentSaveDataKey: function(value) {
return this.currentSaveDataKey = value;
}
,_offers: null
,_activeOffers: null
,_offerPopupPrioritizedQueue: null
,_offerPopupQueue: null
,_disabledOffers: null
,_disabledOfferIndex: null
,_numDisabledOffersToCheck: null
,_initialized: null
,_storeChangesProductActivationState: null
,_storeChangesReplacedProducts: null
,_dispatcher: null
,_defaultActionDelegate: null
,_persistanceDelegate: null
,initWithOffersConfiguration: function(offersConfiguration,persistanceDelegate,defaultActionDelegate,userId,numDisabledOffersToCheck) {
if(numDisabledOffersToCheck == null) numDisabledOffersToCheck = 1;
this._numDisabledOffersToCheck = numDisabledOffersToCheck;
var newSaveDataKey = this.getSaveDataKeyForUser(userId);
var isSameLocation = newSaveDataKey == this.get_currentSaveDataKey();
this.set_defaultSaveDataKey("promotionSystemBaseSaveData");
if(isSameLocation && this._initialized) return;
if(this._initialized) {
this.saveData();
this.reset();
}
this.set_currentSaveDataKey(newSaveDataKey);
var _g = 0;
while(_g < offersConfiguration.length) {
var offerConfiguration = offersConfiguration[_g];
++_g;
var promotionOffer = new miniclip_promotionsystem_core_model_vo_PromotionOffer(this,offerConfiguration);
promotionOffer.delegate = this;
if(promotionOffer.shouldInstanceOffer) {
if(!promotionOffer.disableOffer) this.addOffer(promotionOffer); else this._disabledOffers.push(promotionOffer);
}
}
this._persistanceDelegate = persistanceDelegate;
this._defaultActionDelegate = defaultActionDelegate;
this._initialized = true;
this.loadData();
}
,loadData: function() {
if(!this._initialized) return;
var state = null;
if(this._persistanceDelegate != null) state = this._persistanceDelegate.loadData(); else null;
if(state != "" && state != null) this.setState(new haxe_format_JsonParser(state).parseRec());
}
,resetData: function() {
if(!this._initialized) return;
if(this._persistanceDelegate != null) this._persistanceDelegate.saveData(null);
}
,saveData: function() {
if(!this._initialized) return;
var state = this.getState();
if(this._persistanceDelegate != null) this._persistanceDelegate.saveData(haxe_format_JsonPrinter.print(state,null,null));
null;
}
,saveDataAndSynchronize: function(shouldSynchronize) {
throw new js__$Boot_HaxeError("not implemented!");
}
,reset: function() {
if(!this._initialized) return;
this._storeChangesProductActivationState = new haxe_ds_StringMap();
this._storeChangesReplacedProducts = new haxe_ds_StringMap();
this._activeOffers = [];
this._offerPopupQueue = [];
this._offerPopupPrioritizedQueue = [];
var $it0 = this._offers.iterator();
while( $it0.hasNext() ) {
var offer = $it0.next();
offer.reset();
}
this._disabledOfferIndex = 0;
this.set_currentTimestamp(-1.0);
}
,activateOffer: function(offerId) {
var offer = this.getOfferFromId(offerId);
if(offer == null) return;
offer.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE,this.get_currentTimestamp());
}
,loadOffersConfiguration: function(offers) {
if(!this._initialized || offers == null || offers.length <= 0) return false;
if(this.get_currentTimestamp() >= 0.0) this.reset();
this.clearOffers();
var _g1 = 0;
var _g = offers.length;
while(_g1 < _g) {
var i = _g1++;
this.addOffer(new miniclip_promotionsystem_core_model_vo_PromotionOffer(this,offers[i]));
}
return true;
}
,clearOffers: function() {
if(this._offers != null) this._offers = new haxe_ds_StringMap();
}
,addOffers: function(offers) {
var _g1 = 0;
var _g = offers.length;
while(_g1 < _g) {
var i = _g1++;
this.addOffer(offers[i]);
}
}
,hasPromotions: function() {
return this._offers != null;
}
,hasActivePromotions: function() {
return this._activeOffers != null && this._activeOffers.length > 0;
}
,addOffer: function(promo) {
this._offers.set(promo.offerName,promo);
}
,getOffers: function() {
var ret = [];
var $it0 = this._offers.iterator();
while( $it0.hasNext() ) {
var offer = $it0.next();
ret.push(offer);
}
return ret;
}
,isOfferActive: function(offerId) {
if(!this._initialized || !this.hasPromotions()) return false;
var promotion = this.getOfferFromId(offerId);
if(promotion == null) return false;
if(!promotion.isOfferActive()) return false;
var index = this.getActivePromotionIndex(promotion);
return index > -1;
}
,isOfferKilled: function(offerId) {
var offer = this.getOfferFromId(offerId);
if(offer != null) return offer.getOfferState() == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED;
return false;
}
,isOfferHidden: function(offerId) {
if(!this._initialized || !this.hasPromotions()) return false;
var promotion = this.getOfferFromId(offerId);
if(promotion == null) return false;
return promotion.get_hidePromotion();
}
,getOfferFromId: function(offerId) {
if(!this._initialized || !this.hasPromotions()) return null;
return this._offers.get(offerId);
}
,getActivePromotionIndex: function(promotion) {
return HxOverrides.indexOf(this._activeOffers,promotion,0);
}
,addActivePromotion: function(promotion) {
this._activeOffers.push(promotion);
this._activeOffers.sort($bind(this,this.sortPromotions));
}
,removeActivePromotion: function(index) {
this._activeOffers.splice(index,1);
}
,getTopActiveOffer: function() {
if(this._activeOffers != null && this._activeOffers.length > 0) return this._activeOffers[0]; else return null;
}
,getActiveOffers: function() {
return this._activeOffers;
}
,getActiveOffersTokens: function() {
throw new js__$Boot_HaxeError("not implemented!");
return null;
}
,getTokenForOffer: function(offerId,onlyActive) {
throw new js__$Boot_HaxeError("not implemented!");
return null;
}
,getAllOffersPrioritized: function() {
throw new js__$Boot_HaxeError("not implemented!");
return null;
}
,getActivatedProducts: function() {
if(!this._initialized) return null;
var activatedProducts = [];
var $it0 = this._storeChangesProductActivationState.keys();
while( $it0.hasNext() ) {
var product = $it0.next();
var activationStates = this._storeChangesProductActivationState.get(product);
if(miniclip_promotionsystem_Utils.isCollectionEmpty(activationStates)) continue;
var state = activationStates[activationStates.length - 1];
if(state) activatedProducts.push(product);
}
return activatedProducts;
}
,getDeactivatedProducts: function() {
if(!this._initialized) return null;
var desactivatedProducts = [];
var $it0 = this._storeChangesProductActivationState.keys();
while( $it0.hasNext() ) {
var product = $it0.next();
var activationStates = this._storeChangesProductActivationState.get(product);
if(miniclip_promotionsystem_Utils.isCollectionEmpty(activationStates)) continue;
var state = activationStates[activationStates.length - 1];
if(state) desactivatedProducts.push(product);
}
return desactivatedProducts;
}
,isProductActivated: function(product) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(product)) return false;
var activationStates = this._storeChangesProductActivationState.get(product);
if(miniclip_promotionsystem_Utils.isCollectionEmpty(activationStates)) return false;
var state = activationStates[activationStates.length - 1];
return state;
}
,isProductDeactivated: function(product) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(product)) return false;
var activationStates = this._storeChangesProductActivationState.get(product);
if(miniclip_promotionsystem_Utils.isCollectionEmpty(activationStates)) return false;
var state = activationStates[activationStates.length - 1];
return !state;
}
,getActivatedProductsForOffer: function(offerId) {
throw new js__$Boot_HaxeError("not implemented!");
return null;
}
,getDeactivatedProductsForOffer: function(offerId) {
throw new js__$Boot_HaxeError("not implemented!");
return null;
}
,getProductReplacementsForOffer: function(offerId) {
throw new js__$Boot_HaxeError("not implemented!");
return null;
}
,getProductReplacement: function(product) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(product)) return null;
var replacementProducts = this._storeChangesReplacedProducts.get(product);
if(!miniclip_promotionsystem_Utils.isCollectionEmpty(replacementProducts)) return replacementProducts[replacementProducts.length - 1]; else return null;
}
,getReplacedProduct: function(replacement) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(replacement)) return null;
var $it0 = this._storeChangesReplacedProducts.keys();
while( $it0.hasNext() ) {
var replaced = $it0.next();
var replacements = this._storeChangesReplacedProducts.get(replaced);
var _g1 = 0;
var _g = replacements.length;
while(_g1 < _g) {
var i = _g1++;
if(replacements[i] == replacement) return replaced;
}
}
return null;
}
,getProductReplacements: function() {
if(!this._initialized) return null;
var productReplacements = new haxe_ds_StringMap();
var $it0 = this._storeChangesReplacedProducts.keys();
while( $it0.hasNext() ) {
var product = $it0.next();
var replacementProducts = this._storeChangesReplacedProducts.get(product);
if(!miniclip_promotionsystem_Utils.isCollectionEmpty(replacementProducts)) productReplacements.set(product,replacementProducts[replacementProducts.length - 1]);
}
return productReplacements;
}
,getBadgeInfoForOffer: function(offerId) {
var offer = this.getOfferFromId(offerId);
if(offer == null) return null;
var conf;
if(offer.badgeConfigurationWeb != null) conf = offer.badgeConfigurationWeb; else conf = offer.badgeConfiguration;
if(conf == null) {
if(offer.badgeImage == null && offer.badgeText == null) return null; else miniclip_promotionsystem_core_model_vo_BadgeInfo.iniWithImage(offer.badgeImage,offer.badgeText);
}
return miniclip_promotionsystem_core_model_vo_BadgeInfo.iniWithConfiguration(conf);
}
,getRemainingBadgeTimeForOffer: function(offerId) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(offerId)) return -1.0;
var offer = this.getOfferFromId(offerId);
if(offer == null) return -1.0;
return offer.get_badgeRemainingTime();
}
,setOfferPopUpState: function(offerId,isActive) {
var promotion;
promotion = js_Boot.__cast(this.getOfferFromId(offerId) , miniclip_promotionsystem_core_model_vo_PromotionOffer);
promotion.setPopupActiveState(isActive);
}
,isOfferPopUpActive: function(offerID) {
var offer = this.getOfferFromId(offerID);
return offer.isPopUpActive();
}
,getEnqueuedOfferPopUps: function() {
if(this._offerPopupPrioritizedQueue != null) return this._offerPopupPrioritizedQueue; else return this._offerPopupQueue;
}
,getTopOfferPopUp: function() {
if(!this._initialized) return null;
if(this._offerPopupPrioritizedQueue != null && this._offerPopupPrioritizedQueue.length > 0) return this._offerPopupPrioritizedQueue[0];
if(this._offerPopupQueue != null && this._offerPopupQueue.length > 0) return this._offerPopupQueue[0];
return null;
}
,getPopUpInfoForOffer: function(offerId) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(offerId)) return null;
var offer = this.getOfferFromId(offerId);
if(offer == null) return null;
var popup = new miniclip_promotionsystem_core_model_vo_PromotionPopupInfo();
popup.initWithImage(offer.popupImage,offer.popUpButtonText,offer.getPopupDismissedEvent(),offer.getKillEvent(),offer.popUpCustomData);
return popup;
}
,runPopUpAction: function(actionKey,offerId,delegate) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(offerId)) return;
var offer = this.getOfferFromId(offerId);
if(offer == null) return;
var aDelegate;
if(offer.getOfferState() == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) if(delegate != null) aDelegate = delegate; else aDelegate = this._defaultActionDelegate; else aDelegate = null;
if(aDelegate == null) return;
if(actionKey != null) {
var action = offer.popUpActions.get(actionKey);
if(action == null) return;
action.run(aDelegate);
}
return;
}
,runPopUpActionForOffer: function(offerId,delegate) {
throw new js__$Boot_HaxeError("not implemented!");
}
,getPopupActionDataForOffer: function(offerId,delegate) {
throw new js__$Boot_HaxeError("not implemented!");
}
,showOfferPopUp: function(offer,prioritize) {
if(!this._initialized || offer == null) return;
var index = this.getPrioritizedQueueIndex(offer);
if(index != -1) return;
index = this.getQueueIndex(offer);
if(index != -1) {
if(prioritize) this.removeFromQueue(index); else return;
}
if(prioritize) this.addToPrioritizedQueue(offer); else this.addToQueue(offer);
if(this.get_delegate() != null) this.get_delegate().offerPopUpAddedToQueue(offer.offerName);
}
,hideOfferPopUp: function(offer) {
if(!this._initialized || offer == null) return;
var index = this.getPrioritizedQueueIndex(offer);
if(index != -1) this.removeFromPrioritizedQueue(index); else {
index = this.getQueueIndex(offer);
if(index != -1) this.removeFromQueue(index); else return;
}
if(this.get_delegate() != null) this.get_delegate().offerPopUpRemovedFromQueue(offer.offerName);
}
,offerActivated: function(offer) {
if(!this._initialized || offer == null) return;
var index = this.getActivePromotionIndex(offer);
if(index != -1) return;
this.addActivePromotion(offer);
if(this.get_delegate() != null) this.get_delegate().offerWasActivated(offer.offerName);
}
,offerDeactivated: function(offer) {
if(!this._initialized || offer == null) return;
var index = this.getActivePromotionIndex(offer);
if(index == -1) return;
this.removeActivePromotion(index);
if(this.get_delegate() != null) this.get_delegate().offerWasDeactivated(offer.offerName);
}
,activateStoreChanges: function(offer,storeChanges) {
if(!this._initialized || storeChanges == null || storeChanges.length == 0) return;
var _g = 0;
while(_g < storeChanges.length) {
var change = storeChanges[_g];
++_g;
this.addStoreChange(change);
}
}
,deactivateStoreChanges: function(offer,storeChanges) {
if(!this._initialized || storeChanges == null || storeChanges.length == 0) return;
var _g = 0;
while(_g < storeChanges.length) {
var change = storeChanges[_g];
++_g;
this.removeStoreChange(change);
}
}
,addToPrioritizedQueue: function(offer) {
this._offerPopupPrioritizedQueue.push(offer);
this._offerPopupPrioritizedQueue.sort($bind(this,this.sortPromotions));
}
,getQueueIndex: function(offer) {
return HxOverrides.indexOf(this._offerPopupQueue,offer,0);
}
,addToQueue: function(offer) {
this._offerPopupQueue.push(offer);
}
,removeFromQueue: function(index) {
this._offerPopupQueue.splice(index,1);
}
,getSaveDataKeyForUser: function(userId) {
if(miniclip_promotionsystem_Utils.isStringEmpty(userId)) return this.get_defaultSaveDataKey();
return this.get_defaultSaveDataKey() + "For" + userId;
}
,registerForEvent: function(eventName,caller,callback) {
this._dispatcher.registerForEvent(eventName,caller,callback);
}
,unregisterForEvent: function(eventName,callback) {
this._dispatcher.unregisterForEvent(eventName,callback);
}
,postEvent: function(eventName,data) {
this._dispatcher.postEvent(eventName,data);
}
,isOfferCloseToBegin: function(offerId) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(offerId)) return false;
var offer = this.getOfferFromId(offerId);
if(offer == null) return false;
return offer.isOfferCloseToBegin();
}
,isOfferCloseToEnd: function(offerId) {
if(!this._initialized || miniclip_promotionsystem_Utils.isStringEmpty(offerId)) return false;
var offer = this.getOfferFromId(offerId);
if(offer == null) return false;
return offer.isOfferCloseToEnd();
}
,getDeltaToDisplayCloseToBeginNotificationForOffer: function(offerId) {
var offer = this.getOfferFromId(offerId);
if(offer == null) return -1.0;
return offer.getDeltaToDisplayCloseToBeginNotification();
}
,getDeltaToDisplayActiveNotificationForOffer: function(offerId) {
var offer = this.getOfferFromId(offerId);
if(offer == null) return -1.0;
return offer.getDeltaToDisplayActiveNotification();
}
,getDeltaToDisplayCloseToEndNotificationForOffer: function(offerId) {
var offer = this.getOfferFromId(offerId);
if(offer == null) return -1.0;
return offer.getDeltaToDisplayCloseToEndNotification();
}
,getDeltaToDisplayAfterStartDateNotificationForOffer: function(offerId) {
var offer = this.getOfferFromId(offerId);
if(offer == null) return -1.0;
return offer.getDeltaToDisplayAfterStartDateNotification();
}
,getDeltaToDisplayBeforeEndDateNotificationForOffer: function(offerId) {
var offer = this.getOfferFromId(offerId);
if(offer == null) return -1.0;
return offer.getDeltaToDisplayBeforeEndDateNotification();
}
,getPrioritizedQueueIndex: function(offer) {
return HxOverrides.indexOf(this._offerPopupPrioritizedQueue,offer,0);
}
,removeFromPrioritizedQueue: function(index) {
this._offerPopupPrioritizedQueue.splice(index,1);
}
,sortPromotions: function(offer1,offer2) {
if(offer1 == null || offer2 == null || miniclip_promotionsystem_Utils.isStringEmpty(offer1.offerName) || miniclip_promotionsystem_Utils.isStringEmpty(offer2.offerName)) null;
if(offer1.badgePriority < offer2.badgePriority) return 1;
if(offer1.badgePriority > offer2.badgePriority) return -1;
if(offer1.get_badgeRemainingTime() < offer2.get_badgeRemainingTime() && offer1.get_badgeRemainingTime() > 0) return -1;
if(offer1.get_badgeRemainingTime() > offer2.get_badgeRemainingTime() && offer2.get_badgeRemainingTime() > 0) return 1;
if(offer1.lastActivationTimestamp > offer2.lastActivationTimestamp) return -1;
if(offer1.lastActivationTimestamp < offer2.lastActivationTimestamp) return 1;
return miniclip_promotionsystem_core_PromotionSystem.sortString(offer1.offerName,offer2.offerName);
}
,addStoreChange: function(storeChange) {
var activationStates;
var productToActivate = storeChange.activateProduct;
if(!miniclip_promotionsystem_Utils.isStringEmpty(productToActivate)) {
activationStates = Reflect.field(this._storeChangesProductActivationState,productToActivate);
if(activationStates == null) {
activationStates = [];
this._storeChangesProductActivationState.set(productToActivate,activationStates);
}
activationStates.push(true);
}
var productToDeactivate = storeChange.deactivateProduct;
if(!miniclip_promotionsystem_Utils.isStringEmpty(productToDeactivate)) {
activationStates = Reflect.field(this._storeChangesProductActivationState,productToDeactivate);
if(activationStates == null) {
activationStates = [];
this._storeChangesProductActivationState.set(productToDeactivate,activationStates);
}
activationStates.push(false);
}
var replacementProductToActivate = storeChange.get_replacementProductToActivate();
var replacementProductToDeactivate = storeChange.get_replacementProductToDeactivate();
if(!miniclip_promotionsystem_Utils.isStringEmpty(replacementProductToActivate) && !miniclip_promotionsystem_Utils.isStringEmpty(replacementProductToDeactivate)) {
var replacementProducts = Reflect.field(this._storeChangesReplacedProducts,replacementProductToDeactivate);
if(replacementProducts == null) {
replacementProducts = [];
this._storeChangesReplacedProducts.set(replacementProductToDeactivate,replacementProducts);
}
replacementProducts.push(replacementProductToActivate);
}
}
,removeStoreChange: function(storeChange) {
var activationStates;
var productToActivate = storeChange.activateProduct;
if(!miniclip_promotionsystem_Utils.isStringEmpty(productToActivate)) {
activationStates = this._storeChangesProductActivationState.get(productToActivate);
if(activationStates != null) {
miniclip_promotionsystem_Utils.remove_last_instance_of_object(activationStates,true);
if(activationStates.length == 0) this._storeChangesProductActivationState.remove(productToActivate);
}
}
var productToDeactivate = storeChange.deactivateProduct;
if(!miniclip_promotionsystem_Utils.isStringEmpty(productToDeactivate)) {
activationStates = this._storeChangesProductActivationState.get(productToDeactivate);
if(activationStates != null) {
miniclip_promotionsystem_Utils.remove_last_instance_of_object(activationStates,false);
if(activationStates.length == 0) this._storeChangesProductActivationState.remove(productToDeactivate);
}
}
var replacementProductToActivate = storeChange.get_replacementProductToActivate();
var replacementProductToDeactivate = storeChange.get_replacementProductToDeactivate();
if(!miniclip_promotionsystem_Utils.isStringEmpty(replacementProductToActivate) && !miniclip_promotionsystem_Utils.isStringEmpty(replacementProductToDeactivate)) {
var replacementProducts = this._storeChangesReplacedProducts.get(replacementProductToDeactivate);
if(replacementProducts != null) {
miniclip_promotionsystem_Utils.remove_last_instance_of_object(replacementProducts,replacementProductToActivate);
if(replacementProducts.length == 0) this._storeChangesReplacedProducts.remove(replacementProductToDeactivate);
}
}
}
,removeAllStoreChanges: function() {
this._storeChangesProductActivationState = new haxe_ds_StringMap();
this._storeChangesReplacedProducts = new haxe_ds_StringMap();
}
,getState: function() {
var state = { };
var offersStateDict = { };
var $it0 = this._offers.keys();
while( $it0.hasNext() ) {
var offerId = $it0.next();
var offer = this._offers.get(offerId);
Reflect.setProperty(offersStateDict,offer.offerName,offer.getState());
}
var activeOffers = [];
var _g = 0;
var _g1 = this._activeOffers;
while(_g < _g1.length) {
var offer1 = _g1[_g];
++_g;
activeOffers.push(offer1.offerName);
}
var offerPopUpPrioritizedQueue = [];
var _g2 = 0;
var _g11 = this._offerPopupPrioritizedQueue;
while(_g2 < _g11.length) {
var offer2 = _g11[_g2];
++_g2;
offerPopUpPrioritizedQueue.push(offer2.offerName);
}
var offerPopUpQueue = [];
var _g3 = 0;
var _g12 = this._offerPopupQueue;
while(_g3 < _g12.length) {
var offer3 = _g12[_g3];
++_g3;
offerPopUpQueue.push(offer3.offerName);
}
Reflect.setProperty(state,"currentTimestampState",this.get_currentTimestamp());
Reflect.setProperty(state,"offersState",offersStateDict);
Reflect.setProperty(state,"activeOffersState",activeOffers);
Reflect.setProperty(state,"OfferPopUpQueueState",offerPopUpPrioritizedQueue);
Reflect.setProperty(state,"OfferPopUpPrioritizedQueueState",offerPopUpQueue);
return state;
}
,setState: function(state) {
if(state == null) throw new js__$Boot_HaxeError("Cannot continue without appropriate state defined");
try {
var stateDictionary = state;
var currentTimestamp = Reflect.getProperty(stateDictionary,"currentTimestampState");
var offersStateDict = Reflect.getProperty(stateDictionary,"offersState");
var activeOffers = Reflect.getProperty(stateDictionary,"activeOffersState");
var offerPopUpPrioritizedQueue = Reflect.getProperty(stateDictionary,"OfferPopUpQueueState");
var offerPopUpQueue = Reflect.getProperty(stateDictionary,"OfferPopUpPrioritizedQueueState");
if(offersStateDict != null) {
var _g = 0;
var _g1 = Reflect.fields(offersStateDict);
while(_g < _g1.length) {
var offerName = _g1[_g];
++_g;
var offerState = Reflect.field(offersStateDict,offerName);
var offer = this._offers.get(offerName);
if(offer == null) continue;
offer.setState(offerState);
}
}
var $it0 = this._storeChangesProductActivationState.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
this._storeChangesProductActivationState.remove(key);
}
var $it1 = this._storeChangesReplacedProducts.keys();
while( $it1.hasNext() ) {
var key1 = $it1.next();
this._storeChangesReplacedProducts.remove(key1);
}
this._activeOffers.splice(0,this._activeOffers.length);
this._offerPopupPrioritizedQueue.splice(0,this._offerPopupPrioritizedQueue.length);
this._offerPopupQueue.splice(0,this._offerPopupQueue.length);
if(activeOffers != null) {
var _g2 = 0;
while(_g2 < activeOffers.length) {
var offerName1 = activeOffers[_g2];
++_g2;
var offer1 = this._offers.get(offerName1);
if(offer1 == null) continue;
if(offer1.getOfferState() != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) continue;
if(!offer1.get_hidePromotion()) {
this._activeOffers.push(offer1);
var storeChanges = offer1.storeChanges;
if(!miniclip_promotionsystem_Utils.isCollectionEmpty(storeChanges)) {
var _g11 = 0;
while(_g11 < storeChanges.length) {
var storeChange = storeChanges[_g11];
++_g11;
this.addStoreChange(storeChange);
}
}
}
}
}
this._activeOffers.sort($bind(this,this.sortPromotions));
if(offerPopUpPrioritizedQueue != null) {
var _g3 = 0;
while(_g3 < offerPopUpPrioritizedQueue.length) {
var offerName2 = offerPopUpPrioritizedQueue[_g3];
++_g3;
var offer2 = this._offers.get(offerName2);
if(offer2 == null) continue;
if(offer2.getOfferState() != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) continue;
if(!offer2.get_hidePromotion()) this._offerPopupPrioritizedQueue.push(offer2);
}
}
this._offerPopupPrioritizedQueue.sort($bind(this,this.sortPromotions));
if(offerPopUpQueue != null) {
var _g4 = 0;
while(_g4 < offerPopUpQueue.length) {
var offerName3 = offerPopUpQueue[_g4];
++_g4;
var offer3 = this._offers.get(offerName3);
if(offer3 == null) continue;
if(offer3.getOfferState() != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) continue;
if(!offer3.get_hidePromotion()) this._offerPopupQueue.push(offer3);
}
}
this.set_currentTimestamp(currentTimestamp);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
haxe_Log.trace("Failed to set promotion system state.",{ fileName : "PromotionSystem.hx", lineNumber : 1221, className : "miniclip.promotionsystem.core.PromotionSystem", methodName : "setState"});
null;
}
}
,__class__: miniclip_promotionsystem_core_PromotionSystem
,__properties__: {set_currentSaveDataKey:"set_currentSaveDataKey",get_currentSaveDataKey:"get_currentSaveDataKey",set_defaultSaveDataKey:"set_defaultSaveDataKey",get_defaultSaveDataKey:"get_defaultSaveDataKey",set_delegate:"set_delegate",get_delegate:"get_delegate",set_currentTimestamp:"set_currentTimestamp",get_currentTimestamp:"get_currentTimestamp",set_promoSystemId:"set_promoSystemId",get_promoSystemId:"get_promoSystemId"}
};
var miniclip_promotionsystem_core_interfaces_IListableResources = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.IListableResources"] = miniclip_promotionsystem_core_interfaces_IListableResources;
miniclip_promotionsystem_core_interfaces_IListableResources.__name__ = ["miniclip","promotionsystem","core","interfaces","IListableResources"];
miniclip_promotionsystem_core_interfaces_IListableResources.prototype = {
getResourceList: null
,__class__: miniclip_promotionsystem_core_interfaces_IListableResources
};
var miniclip_promotionsystem_core_interfaces_IMultiTriggerEvent = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.IMultiTriggerEvent"] = miniclip_promotionsystem_core_interfaces_IMultiTriggerEvent;
miniclip_promotionsystem_core_interfaces_IMultiTriggerEvent.__name__ = ["miniclip","promotionsystem","core","interfaces","IMultiTriggerEvent"];
miniclip_promotionsystem_core_interfaces_IMultiTriggerEvent.prototype = {
activateOnFirstEvent: null
,triggerEvents: null
,activate: null
,reset: null
,S_TriggerActivated: null
,__class__: miniclip_promotionsystem_core_interfaces_IMultiTriggerEvent
};
var miniclip_promotionsystem_core_interfaces_IPromotionAction = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.IPromotionAction"] = miniclip_promotionsystem_core_interfaces_IPromotionAction;
miniclip_promotionsystem_core_interfaces_IPromotionAction.__name__ = ["miniclip","promotionsystem","core","interfaces","IPromotionAction"];
miniclip_promotionsystem_core_interfaces_IPromotionAction.prototype = {
type: null
,parameters: null
,successDelegateSelector: null
,failureDelegateSelector: null
,popUpActionDismissesPopup: null
,popUpActionDeactivatesOffer: null
,popUpActionKillsOffer: null
,getActionFromConfiguration: null
,initWithConfiguration: null
,reset: null
,getState: null
,setState: null
,run: null
,getData: null
,__class__: miniclip_promotionsystem_core_interfaces_IPromotionAction
};
var miniclip_promotionsystem_core_interfaces_PromotionClientActionType = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.PromotionClientActionType"] = miniclip_promotionsystem_core_interfaces_PromotionClientActionType;
miniclip_promotionsystem_core_interfaces_PromotionClientActionType.__name__ = ["miniclip","promotionsystem","core","interfaces","PromotionClientActionType"];
var miniclip_promotionsystem_core_interfaces_PromotionClientActionParams = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.PromotionClientActionParams"] = miniclip_promotionsystem_core_interfaces_PromotionClientActionParams;
miniclip_promotionsystem_core_interfaces_PromotionClientActionParams.__name__ = ["miniclip","promotionsystem","core","interfaces","PromotionClientActionParams"];
var miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType = $hxClasses["miniclip.promotionsystem.core.interfaces.PromotionActionDelegateReturnType"] = { __ename__ : ["miniclip","promotionsystem","core","interfaces","PromotionActionDelegateReturnType"], __constructs__ : ["PROMOTION_ACTION_RETURN_TYPE_SUCCESS","PROMOTION_ACTION_RETURN_TYPE_FAILURE","PROMOTION_ACTION_RETURN_TYPE_DELAYED_RESPONSE","PROMOTION_ACTION_RETURN_TYPE_NUM"] };
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_SUCCESS = ["PROMOTION_ACTION_RETURN_TYPE_SUCCESS",0];
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_SUCCESS.toString = $estr;
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_SUCCESS.__enum__ = miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType;
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE = ["PROMOTION_ACTION_RETURN_TYPE_FAILURE",1];
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE.toString = $estr;
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_FAILURE.__enum__ = miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType;
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_DELAYED_RESPONSE = ["PROMOTION_ACTION_RETURN_TYPE_DELAYED_RESPONSE",2];
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_DELAYED_RESPONSE.toString = $estr;
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_DELAYED_RESPONSE.__enum__ = miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType;
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_NUM = ["PROMOTION_ACTION_RETURN_TYPE_NUM",3];
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_NUM.toString = $estr;
miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType.PROMOTION_ACTION_RETURN_TYPE_NUM.__enum__ = miniclip_promotionsystem_core_interfaces_PromotionActionDelegateReturnType;
var miniclip_promotionsystem_core_interfaces_IPromotionSystemDelegate = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.IPromotionSystemDelegate"] = miniclip_promotionsystem_core_interfaces_IPromotionSystemDelegate;
miniclip_promotionsystem_core_interfaces_IPromotionSystemDelegate.__name__ = ["miniclip","promotionsystem","core","interfaces","IPromotionSystemDelegate"];
miniclip_promotionsystem_core_interfaces_IPromotionSystemDelegate.prototype = {
offerWasActivated: null
,offerWasDeactivated: null
,offerPopUpAddedToQueue: null
,offerPopUpRemovedFromQueue: null
,__class__: miniclip_promotionsystem_core_interfaces_IPromotionSystemDelegate
};
var miniclip_promotionsystem_core_interfaces_ITriggerEvent = function() { };
$hxClasses["miniclip.promotionsystem.core.interfaces.ITriggerEvent"] = miniclip_promotionsystem_core_interfaces_ITriggerEvent;
miniclip_promotionsystem_core_interfaces_ITriggerEvent.__name__ = ["miniclip","promotionsystem","core","interfaces","ITriggerEvent"];
miniclip_promotionsystem_core_interfaces_ITriggerEvent.prototype = {
set_enabled: null
,delegateTarget: null
,delegateParameter: null
,enabled: null
,eventLevels: null
,reveivedEvent: null
,description: null
,activate: null
,reset: null
,S_TriggerActivated: null
,__class__: miniclip_promotionsystem_core_interfaces_ITriggerEvent
,__properties__: {set_enabled:"set_enabled"}
};
var miniclip_promotionsystem_core_model_DataAccessSolver = function() { };
$hxClasses["miniclip.promotionsystem.core.model.DataAccessSolver"] = miniclip_promotionsystem_core_model_DataAccessSolver;
miniclip_promotionsystem_core_model_DataAccessSolver.__name__ = ["miniclip","promotionsystem","core","model","DataAccessSolver"];
miniclip_promotionsystem_core_model_DataAccessSolver.solve = function(dataAccess) {
if(dataAccess == null) return null;
var value = dataAccess.execute();
if(miniclip_promotionsystem_core_model_DataAccessSolver.isDataAccess(value)) {
if(js_Boot.__instanceof(value,miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO)) return miniclip_promotionsystem_core_model_DataAccessSolver.solve(value);
return miniclip_promotionsystem_core_model_DataAccessSolver.solve(miniclip_promotionsystem_core_model_DataAccessSolver.getDataAccess(Reflect.getProperty(value,"dataAccess")));
}
return value;
};
miniclip_promotionsystem_core_model_DataAccessSolver.isDataAccess = function(field) {
var _g = Type["typeof"](field);
switch(_g[1]) {
case 4:
return field.dataAccess != null;
default:
return false;
}
};
miniclip_promotionsystem_core_model_DataAccessSolver.loadIndirectData = function(data) {
miniclip_promotionsystem_core_model_DataAccessSolver.indirections = data;
};
miniclip_promotionsystem_core_model_DataAccessSolver.getIndirectDataForKey = function(key) {
var data = miniclip_promotionsystem_core_model_DataAccessSolver.indirections;
var path = "";
var _g = 0;
while(_g < key.length) {
var subKey = key[_g];
++_g;
path += subKey + ".";
data = Reflect.field(data,subKey);
if(data == null) break;
}
return data;
};
miniclip_promotionsystem_core_model_DataAccessSolver.getDataAccess = function(data) {
if(Object.prototype.hasOwnProperty.call(data,"type")) {
var _sw0_ = Reflect.field(data,"type");
switch(_sw0_) {
case "MCPromoDataAccessIndirect":
return new miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO(null,data);
case "MCPromoDataAccessLocalization":
return new miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO(null,data);
case "MCPromoDataAccessPlatform":
return new miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO(null,data);
case "MCPromoDataAccessABtest":
return new miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO(null,data);
case "MCPromoDataAccessUserProperty":
return new miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO(null,data);
case "MCPromoDataAccessNumberProperty":
return new miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO(null,data);
case "MCPromoDataAccessIndirectTemplate":
return new miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO(null,data);
case "MCPromoDataAccessBoolProperty":
return new miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO(null,data);
default:
null;
}
}
return null;
};
var miniclip_promotionsystem_core_model_PromoEventDispatcher = function() {
this.observersList = new haxe_ds_StringMap();
this.eventsList = new List();
};
$hxClasses["miniclip.promotionsystem.core.model.PromoEventDispatcher"] = miniclip_promotionsystem_core_model_PromoEventDispatcher;
miniclip_promotionsystem_core_model_PromoEventDispatcher.__name__ = ["miniclip","promotionsystem","core","model","PromoEventDispatcher"];
miniclip_promotionsystem_core_model_PromoEventDispatcher.prototype = {
observersList: null
,eventsList: null
,parentsList: null
,registerForEvent: function(eventName,caller,callback) {
var observer;
if(this.observersList.exists(eventName)) observer = this.observersList.get(eventName); else {
observer = new hxsignal_impl_Signal1();
this.observersList.set(eventName,observer);
}
this.eventsList.push({ name : eventName, caller : caller, callback : callback, observer : observer});
observer.connect(callback);
}
,unregisterForEvent: function(eventName,callback) {
if(this.observersList.exists(eventName)) {
var observer = this.observersList.get(eventName);
observer.disconnect(callback);
}
}
,unregisterObserverForAllEvents: function(caller) {
var _g_head = this.eventsList.h;
var _g_val = null;
while(_g_head != null) {
var event;
event = (function($this) {
var $r;
_g_val = _g_head[0];
_g_head = _g_head[1];
$r = _g_val;
return $r;
}(this));
if(event.caller == caller) {
if(this.observersList.exists(event.name)) {
var signal = this.observersList.get(event.name);
signal.disconnect(event.callback);
}
this.eventsList.remove(event);
}
}
}
,postEvent: function(eventName,data) {
if(this.observersList.exists(eventName)) {
var observer = this.observersList.get(eventName);
var event = { name : eventName, data : data};
observer.emit(event);
}
}
,__class__: miniclip_promotionsystem_core_model_PromoEventDispatcher
};
var miniclip_promotionsystem_core_model_PromotionFactory = function() { };
$hxClasses["miniclip.promotionsystem.core.model.PromotionFactory"] = miniclip_promotionsystem_core_model_PromotionFactory;
miniclip_promotionsystem_core_model_PromotionFactory.__name__ = ["miniclip","promotionsystem","core","model","PromotionFactory"];
miniclip_promotionsystem_core_model_PromotionFactory.createTrigger = function(promoSystem,obj) {
if(Object.prototype.hasOwnProperty.call(obj,"triggerType")) {
var _sw0_ = Reflect.field(obj,"triggerType");
switch(_sw0_) {
case "MCPromoWaitForDeltaTimeTrigger":
return new miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger(promoSystem,obj);
case "MCPromoWaitForTimeTrigger":
return new miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTrigger(promoSystem,obj);
case "MCPromoWaitForEventTrigger":
return new miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger(promoSystem,obj);
case "MCPromoWaitForNestedTriggersTrigger":
return new miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTrigger(promoSystem,obj);
case "MCPromoWaitForSequencedNestedTriggersTrigger":
return new miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger(promoSystem,obj);
case "MCPromoWaitForMultiTimeTrigger":
return new miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger(promoSystem,obj);
default:
return new miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO(obj);
}
}
return null;
};
var miniclip_promotionsystem_core_model_TimeVO = function(promoSystem,obj) {
this.seconds = 0;
this.minutes = 0;
this.hours = 0;
this.days = 0;
this.weeks = 0;
this.months = 0;
this.years = 0;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.TimeVO"] = miniclip_promotionsystem_core_model_TimeVO;
miniclip_promotionsystem_core_model_TimeVO.__name__ = ["miniclip","promotionsystem","core","model","TimeVO"];
miniclip_promotionsystem_core_model_TimeVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_TimeVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
years: null
,months: null
,weeks: null
,days: null
,hours: null
,minutes: null
,seconds: null
,toMiliseconds: function() {
var deltaTime = this.years * 31536000;
deltaTime += this.months * 2678400;
deltaTime += this.weeks * 604800;
deltaTime += this.days * 86400;
deltaTime += this.hours * 3600;
deltaTime += this.minutes * 60;
deltaTime += this.seconds;
deltaTime *= 1000;
return deltaTime;
}
,__class__: miniclip_promotionsystem_core_model_TimeVO
});
var miniclip_promotionsystem_core_model_vo_AssetConfigVO = function(promoSystem,obj) {
this.anchorY = 0.5;
this.anchorX = 0.5;
this.zOrder = 0;
this.offsetY = 0;
this.offsetX = 0;
this.rightX = 0;
this.leftX = 0;
this.maximumScale = 1;
this.minimumScale = 0.2;
this.maxHeight = NaN;
this.maxWidth = NaN;
this.rotation = 0;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.AssetConfigVO"] = miniclip_promotionsystem_core_model_vo_AssetConfigVO;
miniclip_promotionsystem_core_model_vo_AssetConfigVO.__name__ = ["miniclip","promotionsystem","core","model","vo","AssetConfigVO"];
miniclip_promotionsystem_core_model_vo_AssetConfigVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_AssetConfigVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
useBasePack: null
,rotation: null
,maxWidth: null
,maxHeight: null
,minimumScale: null
,maximumScale: null
,colorData: null
,leftX: null
,rightX: null
,offsetX: null
,offsetY: null
,zOrder: null
,anchorX: null
,anchorY: null
,imageEntries: null
,textEntries: null
,__class__: miniclip_promotionsystem_core_model_vo_AssetConfigVO
});
var miniclip_promotionsystem_core_model_vo_AssetDefinition = function() {
this.isFramedSprite = false;
this.isBitmapFont = false;
this.isAtlas = false;
};
$hxClasses["miniclip.promotionsystem.core.model.vo.AssetDefinition"] = miniclip_promotionsystem_core_model_vo_AssetDefinition;
miniclip_promotionsystem_core_model_vo_AssetDefinition.__name__ = ["miniclip","promotionsystem","core","model","vo","AssetDefinition"];
miniclip_promotionsystem_core_model_vo_AssetDefinition.prototype = {
type: null
,isAtlas: null
,isBitmapFont: null
,isFramedSprite: null
,name: null
,spriteName: null
,atlasName: null
,__class__: miniclip_promotionsystem_core_model_vo_AssetDefinition
};
var miniclip_promotionsystem_core_model_vo_BadgeInfo = function() {
};
$hxClasses["miniclip.promotionsystem.core.model.vo.BadgeInfo"] = miniclip_promotionsystem_core_model_vo_BadgeInfo;
miniclip_promotionsystem_core_model_vo_BadgeInfo.__name__ = ["miniclip","promotionsystem","core","model","vo","BadgeInfo"];
miniclip_promotionsystem_core_model_vo_BadgeInfo.iniWithConfiguration = function(configuration) {
var badgeInfo = new miniclip_promotionsystem_core_model_vo_BadgeInfo();
badgeInfo.badgeConfiguration = configuration;
return badgeInfo;
};
miniclip_promotionsystem_core_model_vo_BadgeInfo.iniWithImage = function(image,text) {
var badgeInfo = new miniclip_promotionsystem_core_model_vo_BadgeInfo();
badgeInfo.image = image;
badgeInfo.text = text;
return badgeInfo;
};
miniclip_promotionsystem_core_model_vo_BadgeInfo.prototype = {
text: null
,image: null
,badgeConfiguration: null
,__class__: miniclip_promotionsystem_core_model_vo_BadgeInfo
};
var miniclip_promotionsystem_core_model_vo_ButtonConfigurationVO = function(promoSystem,obj) {
this.darkenIfDisabled = true;
this.isButtonDisabled = false;
this.darkenOnPress = false;
this.displayRemainingTimeOnBadge = false;
this.buttonAction = null;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.ButtonConfigurationVO"] = miniclip_promotionsystem_core_model_vo_ButtonConfigurationVO;
miniclip_promotionsystem_core_model_vo_ButtonConfigurationVO.__name__ = ["miniclip","promotionsystem","core","model","vo","ButtonConfigurationVO"];
miniclip_promotionsystem_core_model_vo_ButtonConfigurationVO.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IListableResources];
miniclip_promotionsystem_core_model_vo_ButtonConfigurationVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_ButtonConfigurationVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
timerConfiguration: null
,buttonIconImages: null
,buttonTextLabels: null
,buttonBackgroundImage: null
,buttonAction: null
,displayRemainingTimeOnBadge: null
,darkenOnPress: null
,isButtonDisabled: null
,darkenIfDisabled: null
,enabledButton: null
,disabledButton: null
,colorData: null
,getResourceList: function(outputList) {
if(this.buttonIconImages != null) {
var _g = 0;
var _g1 = this.buttonIconImages;
while(_g < _g1.length) {
var image = _g1[_g];
++_g;
image.getResourceList(outputList);
}
}
if(this.buttonBackgroundImage != null) this.buttonBackgroundImage.getResourceList(outputList);
if(this.buttonTextLabels != null) {
var _g2 = 0;
var _g11 = this.buttonTextLabels;
while(_g2 < _g11.length) {
var text = _g11[_g2];
++_g2;
text.getResourceList(outputList);
}
}
if(this.timerConfiguration != null) this.timerConfiguration.getResourceList(outputList);
if(this.enabledButton != null) this.enabledButton.getResourceList(outputList);
if(this.disabledButton != null) this.disabledButton.getResourceList(outputList);
return outputList;
}
,__class__: miniclip_promotionsystem_core_model_vo_ButtonConfigurationVO
});
var miniclip_promotionsystem_core_model_vo_ColorDataVO = function(promoSystem,obj) {
this.a = 255;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.ColorDataVO"] = miniclip_promotionsystem_core_model_vo_ColorDataVO;
miniclip_promotionsystem_core_model_vo_ColorDataVO.__name__ = ["miniclip","promotionsystem","core","model","vo","ColorDataVO"];
miniclip_promotionsystem_core_model_vo_ColorDataVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_ColorDataVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
r: null
,g: null
,b: null
,a: null
,hex: null
,get_hex: function() {
return this.r << 16 | this.g << 8 | this.b;
}
,_r: null
,_g: null
,_b: null
,_a: null
,__class__: miniclip_promotionsystem_core_model_vo_ColorDataVO
,__properties__: {get_hex:"get_hex"}
});
var miniclip_promotionsystem_core_model_vo_DateVO = function(promoSystem,obj) {
this.second = 0;
this.minute = -1;
this.hour = -1;
this.day = 0;
this.month = 0;
this.year = 0;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.DateVO"] = miniclip_promotionsystem_core_model_vo_DateVO;
miniclip_promotionsystem_core_model_vo_DateVO.__name__ = ["miniclip","promotionsystem","core","model","vo","DateVO"];
miniclip_promotionsystem_core_model_vo_DateVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_DateVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
year: null
,month: null
,day: null
,hour: null
,minute: null
,second: null
,__class__: miniclip_promotionsystem_core_model_vo_DateVO
});
var miniclip_promotionsystem_core_model_vo_ImageDataVO = function(promoSystem,obj) {
this.spriteFilename = null;
this.plistFilename = null;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.ImageDataVO"] = miniclip_promotionsystem_core_model_vo_ImageDataVO;
miniclip_promotionsystem_core_model_vo_ImageDataVO.__name__ = ["miniclip","promotionsystem","core","model","vo","ImageDataVO"];
miniclip_promotionsystem_core_model_vo_ImageDataVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_ImageDataVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
frameName: null
,plistFilename: null
,spriteFilename: null
,__class__: miniclip_promotionsystem_core_model_vo_ImageDataVO
});
var miniclip_promotionsystem_core_model_vo_ImageEntryVO = function(promoSystem,obj) {
this.spriteFilename = null;
this.plistFilename = null;
miniclip_promotionsystem_core_model_vo_AssetConfigVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.ImageEntryVO"] = miniclip_promotionsystem_core_model_vo_ImageEntryVO;
miniclip_promotionsystem_core_model_vo_ImageEntryVO.__name__ = ["miniclip","promotionsystem","core","model","vo","ImageEntryVO"];
miniclip_promotionsystem_core_model_vo_ImageEntryVO.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IListableResources];
miniclip_promotionsystem_core_model_vo_ImageEntryVO.__super__ = miniclip_promotionsystem_core_model_vo_AssetConfigVO;
miniclip_promotionsystem_core_model_vo_ImageEntryVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_AssetConfigVO.prototype,{
type: null
,params: null
,isAtlas: null
,get_isAtlas: function() {
return this.imageData != null && this.imageData.plistFilename != null && this.imageData.frameName != null || this.plistFilename != null && this.frameName != null;
}
,isSpecialImage: null
,get_isSpecialImage: function() {
return this.type != null;
}
,frameName: null
,frameDescription: null
,plistFilename: null
,spriteFilename: null
,actionKey: null
,imageData: null
,removeExtension: function(frameName) {
var regex = new EReg("\\\\.(png|jpg|gif)$","g");
return regex.replace(frameName,"");
}
,getResourceList: function(outputList) {
var assetDef = new miniclip_promotionsystem_core_model_vo_AssetDefinition();
if(this.imageData != null) {
assetDef.isAtlas = this.get_isAtlas();
if(this.get_isAtlas()) assetDef.name = this.imageData.frameName; else assetDef.name = this.imageData.spriteFilename;
if(this.get_isAtlas()) assetDef.atlasName = this.imageData.plistFilename; else assetDef.atlasName = null;
if(this.imageData.spriteFilename != null) assetDef.spriteName = this.imageData.spriteFilename; else assetDef.spriteName = this.imageData.frameName;
} else {
assetDef.isAtlas = this.get_isAtlas();
if(this.get_isAtlas()) assetDef.name = this.frameName; else assetDef.name = this.spriteFilename;
if(this.get_isAtlas()) assetDef.atlasName = this.plistFilename; else assetDef.atlasName = null;
if(this.spriteFilename != null) assetDef.spriteName = this.spriteFilename; else assetDef.spriteName = this.frameName;
}
assetDef.type = this.type;
var _g = this.type;
switch(_g) {
case "FramedSprite":
assetDef.spriteName = this.frameName + ".plist";
assetDef.isFramedSprite = true;
break;
case "HorizontalStretchFrame":
assetDef.spriteName = this.frameDescription;
if(this.plistFilename != null) {
assetDef.atlasName = this.plistFilename;
assetDef.isAtlas = true;
}
assetDef.isFramedSprite = true;
break;
default:
}
outputList.push(assetDef);
return outputList;
}
,__class__: miniclip_promotionsystem_core_model_vo_ImageEntryVO
,__properties__: {get_isSpecialImage:"get_isSpecialImage",get_isAtlas:"get_isAtlas"}
});
var miniclip_promotionsystem_core_model_vo_NotificationDataVO = function(promoSystem,obj) {
this.deltaTime = -1;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.NotificationDataVO"] = miniclip_promotionsystem_core_model_vo_NotificationDataVO;
miniclip_promotionsystem_core_model_vo_NotificationDataVO.__name__ = ["miniclip","promotionsystem","core","model","vo","NotificationDataVO"];
miniclip_promotionsystem_core_model_vo_NotificationDataVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_NotificationDataVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
deltaTime: null
,time: null
,text: null
,handleSpecialTypes: function(fieldName,fieldValue) {
if(fieldName == "beforeBeginNotificationTime" || fieldName == "activeNotificationTime" || fieldName == "beforeEndNotificationTime" || fieldName == "afterStartDateNotificationTime" || fieldName == "beforeEndDateNotificationTime") {
Reflect.setField(this,"time",new miniclip_promotionsystem_core_model_TimeVO(this._promoSystem,fieldValue));
this.deltaTime = this.time.toMiliseconds();
return true;
} else if(fieldName == "beforeBeginNotificationText" || fieldName == "activeNotificationText" || fieldName == "beforeEndNotificationText" || fieldName == "afterStartDateNotificationText" || fieldName == "beforeEndDateNotificationText") {
this.text = fieldValue;
return true;
}
return miniclip_core_PromoVO.prototype.handleSpecialTypes.call(this,fieldName,fieldValue);
}
,__class__: miniclip_promotionsystem_core_model_vo_NotificationDataVO
});
var miniclip_promotionsystem_core_model_vo_PopupActionParametersVO = function(promoSystem,obj) {
this.productId = -1;
this.tier = -1;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.PopupActionParametersVO"] = miniclip_promotionsystem_core_model_vo_PopupActionParametersVO;
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.__name__ = ["miniclip","promotionsystem","core","model","vo","PopupActionParametersVO"];
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
target: null
,tier: null
,productId: null
,transactionId: null
,appId: null
,url: null
,urlAndroid: null
,actionToken: null
,promoParamSkinShopTabName: null
,__class__: miniclip_promotionsystem_core_model_vo_PopupActionParametersVO
});
var miniclip_promotionsystem_core_model_vo_PopupActionVO = function(promoSystem,offerName,actionName,obj) {
miniclip_core_PromoVO.call(this,promoSystem,obj);
if(this.successTrigger == null) {
var activationEvent = [offerName + "_" + actionName + "_SuccessEvent"];
var onActivationEvent = [offerName + "_" + actionName + "_SuccessOnActivationEvent"];
var triggerName = offerName + "_" + actionName + "_SuccessTrigger";
this.successTrigger = this.createDefaultWaitForEventTrigger(promoSystem,triggerName,activationEvent,onActivationEvent);
}
if(this.failureTrigger == null) {
var activationEvent1 = [offerName + "_" + actionName + "_FailureEvent"];
var onActivationEvent1 = [offerName + "_" + actionName + "_FailureOnActivationEvent"];
var triggerName1 = offerName + "_" + actionName + "_FailureTrigger";
this.failureTrigger = this.createDefaultWaitForEventTrigger(promoSystem,triggerName1,activationEvent1,onActivationEvent1);
}
};
$hxClasses["miniclip.promotionsystem.core.model.vo.PopupActionVO"] = miniclip_promotionsystem_core_model_vo_PopupActionVO;
miniclip_promotionsystem_core_model_vo_PopupActionVO.__name__ = ["miniclip","promotionsystem","core","model","vo","PopupActionVO"];
miniclip_promotionsystem_core_model_vo_PopupActionVO.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IPromotionAction];
miniclip_promotionsystem_core_model_vo_PopupActionVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_PopupActionVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
type: null
,actionType: null
,successTrigger: null
,failureTrigger: null
,parameters: null
,successDelegateSelector: null
,failureDelegateSelector: null
,popUpActionDismissesPopup: null
,popUpActionDeactivatesOffer: null
,popUpActionKillsOffer: null
,createDefaultWaitForEventTrigger: function(promoSystem,triggerName,activationEvent,onActivationEvent) {
var activationMultiEvent = new miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO(promoSystem);
activationMultiEvent.addEvent(activationEvent);
var trigParameters = new miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters(promoSystem);
trigParameters.activationEvent = activationMultiEvent;
trigParameters.onActivationEvents = onActivationEvent;
var trigger = new miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger(promoSystem);
trigger.parameters = trigParameters;
trigger.triggerName = triggerName;
trigger.triggerType = "MCPromoWaitForEventTrigger";
return trigger;
}
,initWithConfiguration: function(configuration) {
throw new js__$Boot_HaxeError("not implemented!");
}
,getData: function(delegate) {
throw new js__$Boot_HaxeError("not implemented!");
}
,getActionFromConfiguration: function(configuration) {
throw new js__$Boot_HaxeError("not implemented!");
return null;
}
,reset: function() {
if(this.successTrigger != null) {
this.successTrigger.reset();
this.successTrigger.set_enabled(false);
}
if(this.failureTrigger != null) {
this.failureTrigger.reset();
this.failureTrigger.set_enabled(false);
}
}
,success: function() {
this.reset();
if(this.successDelegateSelector != null) this.successDelegateSelector(this);
}
,failure: function() {
this.reset();
if(this.failureDelegateSelector != null) this.failureDelegateSelector(this);
}
,getState: function() {
var stateDictionary = { };
if(this.successTrigger != null) {
var successTRiggerState = this.successTrigger.getState();
Reflect.setProperty(stateDictionary,"successTriggerState",successTRiggerState);
}
if(this.successTrigger != null) {
var failureTriggerState = this.failureTrigger.getState();
Reflect.setProperty(stateDictionary,"failureTriggerState",failureTriggerState);
}
return stateDictionary;
}
,setState: function(state) {
if(state == null) throw new js__$Boot_HaxeError("Cannot continue without appropriate state defined");
var stateDictionay = state;
this.successTrigger.setState(Reflect.getProperty(stateDictionay,"successTriggerState"));
this.failureTrigger.setState(Reflect.getProperty(stateDictionay,"failureTriggerState"));
}
,run: function(delegate) {
if(delegate == null) throw new js__$Boot_HaxeError("Cannot continue without appropriate delegate defined");
this.successTrigger.reset();
this.successTrigger.set_enabled(true);
var successOnFirstEvent;
successOnFirstEvent = (js_Boot.__cast(this.successTrigger.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters)).activationEvent.activateOnFirstEvent;
var failureOnFirstEvent;
failureOnFirstEvent = (js_Boot.__cast(this.failureTrigger.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters)).activationEvent.activateOnFirstEvent;
var successEvents;
successEvents = (js_Boot.__cast(this.successTrigger.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters)).activationEvent.events;
var failureEvents;
failureEvents = (js_Boot.__cast(this.failureTrigger.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters)).activationEvent.events;
var ret = delegate.executeAction(this.actionType,this.parameters,successEvents,successOnFirstEvent,failureEvents,failureOnFirstEvent);
switch(ret[1]) {
case 0:
this.success();
break;
case 1:
this.failure();
break;
case 2:
break;
default:
throw new js__$Boot_HaxeError("Return type unknown");
}
}
,__class__: miniclip_promotionsystem_core_model_vo_PopupActionVO
});
var miniclip_promotionsystem_core_model_vo_PopupActionReturnType = $hxClasses["miniclip.promotionsystem.core.model.vo.PopupActionReturnType"] = { __ename__ : ["miniclip","promotionsystem","core","model","vo","PopupActionReturnType"], __constructs__ : ["SUCCESS","FAILURE","DELAYED_RESPONSE","NUM"] };
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.SUCCESS = ["SUCCESS",0];
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.SUCCESS.toString = $estr;
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.SUCCESS.__enum__ = miniclip_promotionsystem_core_model_vo_PopupActionReturnType;
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.FAILURE = ["FAILURE",1];
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.FAILURE.toString = $estr;
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.FAILURE.__enum__ = miniclip_promotionsystem_core_model_vo_PopupActionReturnType;
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.DELAYED_RESPONSE = ["DELAYED_RESPONSE",2];
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.DELAYED_RESPONSE.toString = $estr;
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.DELAYED_RESPONSE.__enum__ = miniclip_promotionsystem_core_model_vo_PopupActionReturnType;
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.NUM = ["NUM",3];
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.NUM.toString = $estr;
miniclip_promotionsystem_core_model_vo_PopupActionReturnType.NUM.__enum__ = miniclip_promotionsystem_core_model_vo_PopupActionReturnType;
var miniclip_promotionsystem_core_model_vo_PopupCustomData = function(promoSystem,obj) {
this.buttonsConfiguration = [];
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.PopupCustomData"] = miniclip_promotionsystem_core_model_vo_PopupCustomData;
miniclip_promotionsystem_core_model_vo_PopupCustomData.__name__ = ["miniclip","promotionsystem","core","model","vo","PopupCustomData"];
miniclip_promotionsystem_core_model_vo_PopupCustomData.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IListableResources];
miniclip_promotionsystem_core_model_vo_PopupCustomData.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_PopupCustomData.prototype = $extend(miniclip_core_PromoVO.prototype,{
timerConfiguration: null
,textEntries: null
,imageEntries: null
,popUpImage: null
,buttonConfiguration: null
,buttonsConfiguration: null
,productsThatKill: null
,needAllProductsToKill: null
,doNotShowIfUsingBundleConfiguration: null
,shouldHaveFrame: null
,hideVIPBadge: null
,uniqueId: null
,shouldHaveExitButton: null
,allowedStates: null
,appsThatKill: null
,hideIfAppInstalledIOS: null
,hideIfAppInstalledAndroid: null
,getResourceList: function(outputList) {
if(this.imageEntries != null) {
var _g = 0;
var _g1 = this.imageEntries;
while(_g < _g1.length) {
var image = _g1[_g];
++_g;
image.getResourceList(outputList);
}
}
if(this.popUpImage != null) {
var backgroundAsset = new miniclip_promotionsystem_core_model_vo_AssetDefinition();
backgroundAsset.isAtlas = false;
backgroundAsset.name = this.popUpImage;
backgroundAsset.spriteName = this.popUpImage;
outputList.push(backgroundAsset);
}
if(this.buttonConfiguration != null) this.buttonConfiguration.getResourceList(outputList);
if(this.buttonsConfiguration != null) {
var _g2 = 0;
var _g11 = this.buttonsConfiguration;
while(_g2 < _g11.length) {
var buttonConfig = _g11[_g2];
++_g2;
buttonConfig.getResourceList(outputList);
}
}
if(this.timerConfiguration != null) this.timerConfiguration.getResourceList(outputList);
if(this.textEntries != null) {
var _g3 = 0;
var _g12 = this.textEntries;
while(_g3 < _g12.length) {
var text = _g12[_g3];
++_g3;
text.getResourceList(outputList);
}
}
return outputList;
}
,__class__: miniclip_promotionsystem_core_model_vo_PopupCustomData
});
var miniclip_promotionsystem_core_model_vo_PromoOfferType = $hxClasses["miniclip.promotionsystem.core.model.vo.PromoOfferType"] = { __ename__ : ["miniclip","promotionsystem","core","model","vo","PromoOfferType"], __constructs__ : ["PROMO_OFFER_TYPE_TRIGGERED","PROMO_OFFER_TYPE_TIME_BASE","PROMO_OFFER_TYPE_INFORMATION","PROMO_OFFER_TYPE_NUM"] };
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_TRIGGERED = ["PROMO_OFFER_TYPE_TRIGGERED",0];
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_TRIGGERED.toString = $estr;
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_TRIGGERED.__enum__ = miniclip_promotionsystem_core_model_vo_PromoOfferType;
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_TIME_BASE = ["PROMO_OFFER_TYPE_TIME_BASE",1];
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_TIME_BASE.toString = $estr;
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_TIME_BASE.__enum__ = miniclip_promotionsystem_core_model_vo_PromoOfferType;
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_INFORMATION = ["PROMO_OFFER_TYPE_INFORMATION",2];
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_INFORMATION.toString = $estr;
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_INFORMATION.__enum__ = miniclip_promotionsystem_core_model_vo_PromoOfferType;
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_NUM = ["PROMO_OFFER_TYPE_NUM",3];
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_NUM.toString = $estr;
miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_NUM.__enum__ = miniclip_promotionsystem_core_model_vo_PromoOfferType;
var miniclip_promotionsystem_core_model_vo_PromotionOffer = function(promoSystem,configuration) {
this.popUpActive = false;
this.activatePopUpOnOfferActivation = true;
this.disableOffer = false;
this.shouldInstanceOffer = true;
this.set_currentTimestamp(-1);
this.delegate = promoSystem;
this._state = miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED;
this.interruptPromotion = false;
if(configuration == null) null;
this.popUpActions = new haxe_ds_StringMap();
miniclip_core_PromoVO.call(this,promoSystem,configuration);
this.resolve(true);
if(!this.shouldInstanceOffer) return;
if(this.offerName == null) throw new js__$Boot_HaxeError("Cannot continue with empty promotion name");
this.popUpDismissedTrigger = new miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger(this._promoSystem,{ triggerName : "PROMO_OFFER_POP_UP_TRIGGER", parameters : { maxActivations : 1, onActivationEvents : ["PROMO_OFFER_POP_UP_DISMISSED_" + this.offerName], activationEvent : { events : [["PROMO_OFFER_POP_UP_DISMISS_" + this.offerName]]}}});
this.popUpDismissedTrigger.S_TriggerActivated.connect($bind(this,this.onPopupDismissedTriggerActivated));
if(this.badgeEndTrigger != null) this.badgeEndTrigger.S_TriggerActivated.connect($bind(this,this.onBadgeEndTriggerActivated));
if(this.wakeUpTrigger != null) this.wakeUpTrigger.S_TriggerActivated.connect($bind(this,this.onWakeUpTriggerActivated));
if(this.startTrigger != null) this.startTrigger.S_TriggerActivated.connect($bind(this,this.onStartTriggerActivated));
if(this.popUpTrigger != null) this.popUpTrigger.S_TriggerActivated.connect($bind(this,this.onPopUpTriggerActivated));
if(this.killTrigger != null) this.killTrigger.S_TriggerActivated.connect($bind(this,this.onKillTriggerActivated));
if(this.resetTrigger != null) this.resetTrigger.S_TriggerActivated.connect($bind(this,this.onResetTriggerActivated));
if(this.interruptTrigger != null) this.interruptTrigger.S_TriggerActivated.connect($bind(this,this.onInterruptTriggerActivated));
if(this.resumeTrigger != null) this.resumeTrigger.S_TriggerActivated.connect($bind(this,this.onResumeTriggerActivated));
if(this.popUpAction != null) this.popUpActions.set("",this.popUpAction);
var $it0 = this.popUpActions.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
var action = this.popUpActions.get(key);
action.successDelegateSelector = $bind(this,this.actionSuccess);
action.failureDelegateSelector = $bind(this,this.actionFailure);
if(action.successTrigger != null) action.successTrigger.S_TriggerActivated.connect($bind(this,this.onSuccessTriggerActivated_Popup));
if(action.failureTrigger != null) action.failureTrigger.S_TriggerActivated.connect($bind(this,this.onFailureTriggerActivated_Popup));
}
if(this.startDate != null) this._startTimestamp = miniclip_core_DateUtils.getUnixTimestamp(this.startDate); else this._startTimestamp = -1.0;
if(this.endDate != null) this._endTimestamp = miniclip_core_DateUtils.getUnixTimestamp(this.endDate); else this._endTimestamp = -1.0;
if(this.endOfActivationDate != null) this._endOfActivationTimestamp = miniclip_core_DateUtils.getUnixTimestamp(this.endOfActivationDate); else this._endOfActivationTimestamp = -1.0;
this._offerType = this.getPromoTypeFromStringId(this.offerType);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.PromotionOffer"] = miniclip_promotionsystem_core_model_vo_PromotionOffer;
miniclip_promotionsystem_core_model_vo_PromotionOffer.__name__ = ["miniclip","promotionsystem","core","model","vo","PromotionOffer"];
miniclip_promotionsystem_core_model_vo_PromotionOffer.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IListableResources,partials_Partial];
miniclip_promotionsystem_core_model_vo_PromotionOffer.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_PromotionOffer.prototype = $extend(miniclip_core_PromoVO.prototype,{
uniqueId: null
,offerName: null
,cycleId: null
,campaignId: null
,groupId: null
,offerType: null
,startDate: null
,endDate: null
,endOfActivationDate: null
,startTrigger: null
,promoToken: null
,promoTokenParameter: null
,wakeUpTrigger: null
,killTrigger: null
,resetTrigger: null
,interruptTrigger: null
,resumeTrigger: null
,storeChanges: null
,badgePriority: null
,badgeText: null
,badgeImage: null
,badgeEndTrigger: null
,popupImage: null
,popUpButtonText: null
,popUpAction: null
,popUpActions: null
,popUpActionKillsOffer: null
,popUpActionDeactivatesOffer: null
,popUpActionDismissesPopUp: null
,popUpTrigger: null
,popUpCustomData: null
,shouldInstanceOffer: null
,disableOffer: null
,beforeBeginNotification: null
,activeNotification: null
,beforeEndNotification: null
,afterStartDateNotification: null
,beforeEndDateNotification: null
,badgeConfiguration: null
,badgeConfigurationWeb: null
,badgeCycleCooldown: null
,hidePromotion: null
,get_hidePromotion: function() {
return this.hidePromotion || this.get_hidePromotionWeb();
}
,set_hidePromotion: function(value) {
this.hidePromotion = value;
return value;
}
,hidePromotionMobile: null
,hidePromotionIOS: null
,hidePromotionAmazon: null
,hidePromotionAndroid: null
,hidePromotionWeb: null
,get_hidePromotionWeb: function() {
return this.hidePromotionWeb || this.hidePromotionMiniclip || this.hidePromotionFacebook;
}
,set_hidePromotionWeb: function(value) {
this.hidePromotionWeb = value;
return value;
}
,hidePromotionMiniclip: null
,hidePromotionFacebook: null
,activatePopUpOnOfferActivation: null
,lastActivationTimestamp: null
,badgeRemainingTime: null
,get_badgeRemainingTime: function() {
if(this._state != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE || this.currentTimestamp < 0) return -1;
var timeToEndTrigger = -1.0;
if(this.badgeEndTrigger != null) {
if(js_Boot.__instanceof(this.badgeEndTrigger,miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)) timeToEndTrigger = (js_Boot.__cast(this.badgeEndTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation(); else return -1;
}
if(timeToEndTrigger < 0.0 || timeToEndTrigger > this._endTimestamp && this._endTimestamp != -1) timeToEndTrigger = this._endTimestamp;
if(timeToEndTrigger >= 0.0 && this.currentTimestamp <= timeToEndTrigger) return timeToEndTrigger - this.currentTimestamp; else return -1.0;
}
,popUpActive: null
,popUpDismissedTrigger: null
,_initialized: null
,interruptPromotion: null
,currentTimestamp: null
,set_currentTimestamp: function(currentTime) {
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED) return currentTime;
if(this.get_hidePromotion()) return currentTime;
if(currentTime < 0.0) return currentTime;
currentTime = Math.floor(currentTime * 0.001) * 1000.0;
if(this.currentTimestamp < 0.0) this.currentTimestamp = currentTime; else if(currentTime < this.currentTimestamp) null;
this.currentTimestamp = currentTime;
var beforeActiveState = this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER;
var afterEndDate = this._endTimestamp >= 0.0 && this.currentTimestamp >= this._endTimestamp;
var afterEndActivationDate = this._endOfActivationTimestamp > 0 && this.currentTimestamp >= this._endOfActivationTimestamp;
if(afterEndDate || afterEndActivationDate && beforeActiveState) {
this.currentTimestamp = this._endTimestamp;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) {
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.deactivateStoreChanges(this,this.storeChanges);
this.delegate.offerDeactivated(this);
if(this.popUpActive) this.delegate.hideOfferPopUp(this);
this.setPopupActiveState(false);
}
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.KILLED,currentTime);
return currentTime;
}
this.processTime(currentTime);
return currentTime;
}
,_startTimestamp: null
,_endTimestamp: null
,_endOfActivationTimestamp: null
,_state: null
,_offerType: null
,offerState: null
,get_offerState: function() {
return this._state;
}
,delegate: null
,handleSpecialTypes: function(key,obj) {
if(miniclip_core_PromoVO.prototype.handleSpecialTypes.call(this,key,obj)) return true;
if(key == "popUpActions") {
var fields = Reflect.fields(obj);
var _g = 0;
while(_g < fields.length) {
var action = fields[_g];
++_g;
if(action != "dataAccess") {
var value = new miniclip_promotionsystem_core_model_vo_PopupActionVO(this._promoSystem,this.offerName,action,Reflect.getProperty(obj,action));
this.popUpActions.set(action,value);
} else null;
}
return true;
} else if(key == "popUpAction") {
var value1 = new miniclip_promotionsystem_core_model_vo_PopupActionVO(this._promoSystem,this.offerName,"popUpAction",obj);
this.popUpActions.set("",value1);
return true;
}
if(key == "badgeEndTrigger" || key == "wakeUpTrigger" || key == "startTrigger" || key == "popUpTrigger" || key == "killTrigger" || key == "resetTrigger" || key == "interruptTrigger" || key == "resumeTrigger") {
var trigger = miniclip_promotionsystem_core_model_PromotionFactory.createTrigger(this._promoSystem,obj);
this[key] = trigger;
return true;
}
return false;
}
,isOfferActive: function() {
return !this.get_hidePromotion() && !this.interruptPromotion && this.get_offerState() == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE;
}
,processTime: function(currentTime) {
try {
while(true) {
var previousState = this._state;
if(this._state != miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED && this._state != miniclip_promotionsystem_core_model_vo_StateOffer.KILLED) {
if(this.killTrigger != null) this.killTrigger.set_currentTimestamp(currentTime);
if(this.resetTrigger != null) this.resetTrigger.set_currentTimestamp(currentTime);
if(this.interruptTrigger != null) this.interruptTrigger.set_currentTimestamp(currentTime);
if(this.resumeTrigger != null) this.resumeTrigger.set_currentTimestamp(currentTime);
}
var _g = this._state;
switch(_g[1]) {
case 0:
if(currentTime >= this._startTimestamp) this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER,this._startTimestamp >= 0.0?this._startTimestamp:currentTime);
break;
case 2:
if(this.startTrigger == null) throw "__break__";
if(this.startTrigger != null) this.startTrigger.set_currentTimestamp(currentTime);
break;
case 3:
if(this.popUpTrigger != null) this.popUpTrigger.set_currentTimestamp(currentTime);
if(this.badgeEndTrigger != null) this.badgeEndTrigger.set_currentTimestamp(currentTime);
break;
case 1:
if(this.wakeUpTrigger == null) throw "__break__";
if(this.wakeUpTrigger != null) this.wakeUpTrigger.set_currentTimestamp(currentTime);
break;
case 4:
break;
}
if(previousState == this._state) throw "__break__";
}
} catch( e ) { if( e != "__break__" ) throw e; }
}
,updateDisableOffer: function() {
this.resolve(false);
}
,getOfferState: function() {
return this._state;
}
,setOfferState: function(state,timestamp) {
if(timestamp == null) timestamp = -1.0;
if(this.get_hidePromotion()) return;
if(this._state == state) return;
switch(state[1]) {
case 0:
this.set_offer_state_not_started(timestamp);
break;
case 2:
this.set_offer_wait_start_trigger(timestamp);
break;
case 1:
this.set_offer_wait_wake_up_trigger(timestamp);
break;
case 3:
this.set_offer_state_active(timestamp);
break;
case 4:
this.set_offer_state_killed(timestamp);
break;
}
}
,getResourceList: function(outputList) {
if(!this.get_hidePromotion()) {
if(this.popUpCustomData != null) this.popUpCustomData.getResourceList(outputList);
if(this.badgeConfigurationWeb != null) this.badgeConfigurationWeb.getResourceList(outputList);
if(this.badgeConfiguration != null) this.badgeConfiguration.getResourceList(outputList);
}
return outputList;
}
,set_offer_state_not_started: function(timestamp) {
this._state = miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED;
this.set_currentTimestamp(-1);
this.popUpActive = false;
if(this.startTrigger != null) {
this.startTrigger.reset();
this.startTrigger.set_enabled(false);
}
if(this.wakeUpTrigger != null) {
this.wakeUpTrigger.reset();
this.wakeUpTrigger.set_enabled(false);
}
if(this.killTrigger != null) {
this.killTrigger.reset();
this.killTrigger.set_enabled(false);
}
if(this.resetTrigger != null) {
this.resetTrigger.reset();
this.resetTrigger.set_enabled(false);
}
if(this.badgeEndTrigger != null) {
this.badgeEndTrigger.reset();
this.badgeEndTrigger.set_enabled(false);
}
if(this.interruptTrigger != null) {
this.interruptTrigger.reset();
this.interruptTrigger.set_enabled(false);
}
if(this.resumeTrigger != null) {
this.resumeTrigger.reset();
this.resumeTrigger.set_enabled(false);
}
if(this.popUpTrigger != null) {
this.popUpTrigger.reset();
this.popUpTrigger.set_enabled(false);
}
if(this.popUpDismissedTrigger != null) {
this.popUpDismissedTrigger.reset();
this.popUpDismissedTrigger.set_enabled(false);
}
if(this.popUpActions != null) {
var $it0 = this.popUpActions.keys();
while( $it0.hasNext() ) {
var actionKey = $it0.next();
this.popUpActions.get(actionKey).reset();
}
}
}
,set_offer_wait_start_trigger: function(timestamp) {
var previousState = this._state;
this._state = miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER;
if(previousState == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED) {
if(this.killTrigger != null) {
this.killTrigger.set_enabled(true);
this.killTrigger.set_currentTimestamp(timestamp);
}
if(this.resetTrigger != null) {
this.resetTrigger.set_enabled(true);
this.resetTrigger.set_currentTimestamp(timestamp);
}
}
if(this.interruptTrigger != null) {
this.interruptTrigger.set_enabled(true);
this.interruptPromotion = false;
this.interruptTrigger.set_currentTimestamp(timestamp);
}
if(this.startTrigger == null) {
if(this._endOfActivationTimestamp > 0 && timestamp >= this._endOfActivationTimestamp) this.kill(); else this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE,timestamp);
return;
}
this.startTrigger.set_enabled(true);
this.startTrigger.set_currentTimestamp(timestamp);
}
,set_offer_state_active: function(timestamp) {
var previousState = this._state;
this._state = miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE;
this.lastActivationTimestamp = timestamp;
if(this.delegate != null) {
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.activateStoreChanges(this,this.storeChanges);
this.delegate.offerActivated(this);
if(this.activatePopUpOnOfferActivation) this.delegate.showOfferPopUp(this,true);
}
if(this.activatePopUpOnOfferActivation) {
this.popUpActive = true;
this.popUpDismissedTrigger.set_enabled(true);
} else if(this.popUpTrigger != null) {
this.popUpTrigger.set_enabled(true);
this.popUpTrigger.set_currentTimestamp(timestamp);
}
if(this.badgeEndTrigger != null) {
this.badgeEndTrigger.set_enabled(true);
this.badgeEndTrigger.set_currentTimestamp(timestamp);
}
}
,set_offer_wait_wake_up_trigger: function(timestamp) {
this._state = miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER;
if(this.wakeUpTrigger == null) {
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER,timestamp);
return;
}
this.wakeUpTrigger.set_enabled(true);
this.wakeUpTrigger.set_currentTimestamp(timestamp);
if(this.interruptTrigger != null) {
this.interruptTrigger.set_enabled(true);
this.interruptTrigger.set_currentTimestamp(timestamp);
if(this.resumeTrigger != null) this.resumeTrigger.set_enabled(false);
this.interruptPromotion = false;
}
}
,set_offer_state_killed: function(timestamp) {
var previousState = this._state;
this._state = miniclip_promotionsystem_core_model_vo_StateOffer.KILLED;
if(this.startTrigger != null) this.startTrigger.set_enabled(false);
if(this.wakeUpTrigger != null) this.wakeUpTrigger.set_enabled(false);
if(this.killTrigger != null) this.killTrigger.set_enabled(false);
if(this.resetTrigger != null) this.resetTrigger.set_enabled(false);
if(this.interruptTrigger != null) this.interruptTrigger.set_enabled(false);
if(this.resumeTrigger != null) this.resumeTrigger.set_enabled(false);
if(this.badgeEndTrigger != null) this.badgeEndTrigger.set_enabled(false);
if(this.popUpTrigger != null) this.popUpTrigger.set_enabled(false);
if(this.popUpDismissedTrigger != null) this.popUpDismissedTrigger.set_enabled(false);
if(this.popUpActions != null) {
var $it0 = this.popUpActions.keys();
while( $it0.hasNext() ) {
var actionKey = $it0.next();
this.popUpActions.get(actionKey).reset();
}
}
}
,setPopupActiveState: function(active) {
if(this.popUpActive && !active) {
var dismissEvent = this.getPopupDismissedEvent();
if(dismissEvent != null) this._promoSystem.postEvent(dismissEvent);
} else if(!this.popUpActive && active) {
if(this.popUpTrigger != null) this.popUpTrigger.set_enabled(!active);
this.popUpDismissedTrigger.set_enabled(active);
this.popUpActive = active;
}
}
,isOfferCloseToBegin: function() {
if(this.get_hidePromotion() || this.interruptTrigger != null) return false;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED) return false;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED) {
if(this.startTrigger == null) return this._startTimestamp - this.currentTimestamp <= this.beforeBeginNotification.deltaTime; else if(miniclip_promotionsystem_Utils.isTimeTrigger(this.startTrigger)) {
var deltaTimeToActivate = (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation() - this.currentTimestamp;
return deltaTimeToActivate <= this.beforeBeginNotification.deltaTime;
} else return false;
}
var timeToNextActivation;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER) {
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.startTrigger)) timeToNextActivation = (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation(); else return false;
if(this._endOfActivationTimestamp > 0 && timeToNextActivation >= this._endOfActivationTimestamp) return false;
return timeToNextActivation - this.currentTimestamp <= this.beforeBeginNotification.deltaTime;
}
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER) {
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.wakeUpTrigger)) timeToNextActivation = (js_Boot.__cast(this.wakeUpTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation(); else return false;
if(this._endOfActivationTimestamp > 0 && timeToNextActivation >= this._endOfActivationTimestamp) return false;
return timeToNextActivation - this.currentTimestamp <= this.beforeBeginNotification.deltaTime;
}
return false;
}
,isOfferCloseToEnd: function() {
if(this.get_hidePromotion() || this.interruptTrigger != null) return false;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER) return false;
if(this.get_badgeRemainingTime() != -1 && this.beforeEndNotification.deltaTime != -1) return this.get_badgeRemainingTime() <= this.beforeEndNotification.deltaTime;
return false;
}
,getDeltaToDisplayCloseToBeginNotification: function() {
if(this.get_hidePromotion()) return -1.0;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED) return -1.0;
if(this.beforeBeginNotification.deltaTime == -1.0) return -1.0;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED) {
if(this.startTrigger == null) {
var deltaTimeToActivate = this._startTimestamp - this.currentTimestamp;
if(deltaTimeToActivate > this.beforeBeginNotification.deltaTime) return deltaTimeToActivate - this.beforeBeginNotification.deltaTime;
return -1.0;
} else if(js_Boot.__instanceof(this.startTrigger,miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger)) {
var deltaTimeToActivate1;
deltaTimeToActivate1 = this._startTimestamp + (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger)).deltaTime - this.currentTimestamp;
if(deltaTimeToActivate1 > this.beforeBeginNotification.deltaTime) return deltaTimeToActivate1 - this.beforeBeginNotification.deltaTime;
return -1.0;
} else if(miniclip_promotionsystem_Utils.isTimeTrigger(this.startTrigger)) {
var deltaTimeToActivate2 = (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation() - this.currentTimestamp;
if(deltaTimeToActivate2 > this.beforeBeginNotification.deltaTime) return deltaTimeToActivate2 - this.beforeBeginNotification.deltaTime;
return -1.0;
} else return -1.0;
}
var timeToNextActivation;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER) {
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.startTrigger)) timeToNextActivation = (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation(); else return -1.0;
if(this._endOfActivationTimestamp > 0 && timeToNextActivation >= this._endOfActivationTimestamp) return -1.0;
var deltaTimeToActivate3 = timeToNextActivation - this.currentTimestamp;
if(deltaTimeToActivate3 > this.beforeBeginNotification.deltaTime) return deltaTimeToActivate3 - this.beforeBeginNotification.deltaTime;
return -1.0;
}
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER) {
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.wakeUpTrigger)) timeToNextActivation = (js_Boot.__cast(this.wakeUpTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation(); else return -1.0;
if(this._endOfActivationTimestamp > 0 && timeToNextActivation >= this._endOfActivationTimestamp) return -1.0;
var deltaTimeToActivate4 = timeToNextActivation - this.currentTimestamp;
if(deltaTimeToActivate4 > this.beforeBeginNotification.deltaTime) return deltaTimeToActivate4 - this.beforeBeginNotification.deltaTime;
return -1.0;
}
return -1.0;
}
,getDeltaToDisplayActiveNotification: function() {
if(this.get_hidePromotion()) return -1.0;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED) return -1.0;
if(this.activeNotification.deltaTime == -1.0) return -1.0;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED) {
if(this.startTrigger == null) return this._startTimestamp + this.activeNotification.deltaTime - this.currentTimestamp; else if(js_Boot.__instanceof(this.startTrigger,miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger)) {
var deltaTimeToActivate;
deltaTimeToActivate = this._startTimestamp + (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger)).deltaTime - this.currentTimestamp;
return deltaTimeToActivate + this.beforeBeginNotification.deltaTime;
} else if(miniclip_promotionsystem_Utils.isTimeTrigger(this.startTrigger)) {
var deltaTimeToActivate1 = (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation() - this.currentTimestamp;
return deltaTimeToActivate1 + this.activeNotification.deltaTime;
} else return -1.0;
}
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER) {
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.startTrigger)) {
var timeToNextActivation = (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation();
if(this._endOfActivationTimestamp > 0 && timeToNextActivation >= this._endOfActivationTimestamp) return -1.0;
var deltaTimeToActivate2 = timeToNextActivation - this.currentTimestamp;
return deltaTimeToActivate2 + this.activeNotification.deltaTime;
} else return -1.0;
}
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER) {
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.startTrigger)) {
var timeToNextActivation1 = (js_Boot.__cast(this.wakeUpTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).get_timeToNextActivation();
if(this._endOfActivationTimestamp > 0 && timeToNextActivation1 >= this._endOfActivationTimestamp) return -1.0;
var deltaTimeToActivate3 = timeToNextActivation1 - this.currentTimestamp;
return deltaTimeToActivate3 + this.activeNotification.deltaTime;
} else return -1.0;
}
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) {
var deltaTimeToActivate4 = this.lastActivationTimestamp + this.activeNotification.deltaTime;
return deltaTimeToActivate4 - this.currentTimestamp;
}
return -1.0;
}
,getDeltaToDisplayCloseToEndNotification: function() {
if(this.get_hidePromotion()) return -1.0;
if(this.beforeEndNotification.deltaTime == -1.0) return -1.0;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER) return -1.0;
if(this.get_badgeRemainingTime() != -1. && this.beforeEndNotification.deltaTime != -1.0) return this.get_badgeRemainingTime() - this.beforeEndNotification.deltaTime;
return -1.0;
}
,getDeltaToDisplayAfterStartDateNotification: function() {
if(this.get_hidePromotion()) return -1.0;
if(this.afterStartDateNotification.deltaTime == -1.0) return -1.0;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) return -1.0;
if(this.lastActivationTimestamp != -1.0) return -1.0;
if(this.currentTimestamp >= this._endTimestamp) return -1.0;
var timeToNotify = this._startTimestamp + this.afterStartDateNotification.deltaTime;
if((this._state == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER) && timeToNotify >= this._endTimestamp) return -1.0;
if(this._endTimestamp > 0 && timeToNotify >= this._endTimestamp) return -1.0;
return timeToNotify - this.currentTimestamp;
}
,getDeltaToDisplayBeforeEndDateNotification: function() {
if(this.get_hidePromotion()) return -1.0;
if(this.beforeEndDateNotification.deltaTime == -1.0) return -1.0;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED) return -1.0;
if(this.currentTimestamp >= this._endTimestamp) return -1.0;
if(this._endTimestamp - this.beforeEndDateNotification.deltaTime < this._startTimestamp) return -1.0;
var timeToDisplay = this._endTimestamp - this.beforeEndDateNotification.deltaTime - this.currentTimestamp;
var beforeActiveState = this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER;
if(this._endOfActivationTimestamp > 0 && beforeActiveState && timeToDisplay >= this._endOfActivationTimestamp) return -1.0;
return timeToDisplay;
}
,isPopUpActive: function() {
return this.popUpActive;
}
,actionSuccess: function(action) {
if(this._state != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) return;
if(this.get_hidePromotion()) return;
var popUpActionKillsOffer = this.popUpActionKillsOffer || action.popUpActionKillsOffer;
var popUpActionDeactivatesOffer = this.popUpActionDeactivatesOffer || action.popUpActionDeactivatesOffer;
var popUpActionDismissesPopUp = this.popUpActionDismissesPopUp || action.popUpActionDismissesPopup;
if(popUpActionDismissesPopUp || popUpActionDeactivatesOffer || popUpActionKillsOffer) {
if(!popUpActionDeactivatesOffer && !popUpActionKillsOffer) this._promoSystem.postEvent(this.getPopupDismissedEvent()); else {
if(this.delegate != null && this.popUpActive) this.delegate.hideOfferPopUp(this);
if(this.popUpActive) this.setPopupActiveState(false);
}
} else {
this._promoSystem.postEvent("PROMO_OFFER_ACTION_SUCCESS_" + this.offerName);
return;
}
if(popUpActionDeactivatesOffer || popUpActionKillsOffer) {
if(this.delegate != null) {
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.deactivateStoreChanges(this,this.storeChanges);
this.delegate.offerDeactivated(this);
}
}
var timestamp = 0;
if(popUpActionDeactivatesOffer) {
if(this.badgeEndTrigger != null) {
this.badgeEndTrigger.reset();
this.badgeEndTrigger.set_enabled(false);
}
if(this.popUpTrigger != null) {
this.popUpTrigger.reset();
this.popUpTrigger.set_enabled(false);
}
this.popUpDismissedTrigger.reset();
this.popUpDismissedTrigger.set_enabled(false);
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER,timestamp);
} else if(popUpActionKillsOffer) this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.KILLED,timestamp);
this._promoSystem.postEvent("PROMO_OFFER_ACTION_SUCCESS_" + this.offerName);
}
,actionFailure: function(action) {
if(this.get_hidePromotion()) return;
this._promoSystem.postEvent("PROMO_OFFER_ACITON_FAILURE_" + this.offerName);
null;
}
,getState: function() {
var startTriggerState;
if(this.startTrigger != null) startTriggerState = this.startTrigger.getState(); else startTriggerState = null;
var wakeUpTriggerState;
if(this.wakeUpTrigger != null) wakeUpTriggerState = this.wakeUpTrigger.getState(); else wakeUpTriggerState = null;
var badgeEndTriggerState;
if(this.badgeEndTrigger != null) badgeEndTriggerState = this.badgeEndTrigger.getState(); else badgeEndTriggerState = null;
var popUpTriggerState;
if(this.popUpTrigger != null) popUpTriggerState = this.popUpTrigger.getState(); else popUpTriggerState = null;
var popUpDismissedTriggerState;
if(this.popUpDismissedTrigger != null) popUpDismissedTriggerState = this.popUpDismissedTrigger.getState(); else popUpDismissedTriggerState = null;
var killTriggerState;
if(this.killTrigger != null) killTriggerState = this.killTrigger.getState(); else killTriggerState = null;
var resetTriggerState;
if(this.resetTrigger != null) resetTriggerState = this.resetTrigger.getState(); else resetTriggerState = null;
var interruptTriggerState;
if(this.interruptTrigger != null) interruptTriggerState = this.interruptTrigger.getState(); else interruptTriggerState = null;
var resumeTriggerState;
if(this.resetTrigger != null) resumeTriggerState = this.resetTrigger.getState(); else resumeTriggerState = null;
var promotionActionsState = { };
if(this.popUpActions != null) {
var $it0 = this.popUpActions.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
var popupAction = this.popUpActions.get(key);
try {
Reflect.setProperty(promotionActionsState,key,popupAction.getState());
} catch( msg ) {
haxe_CallStack.lastException = msg;
if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
null;
}
}
}
var stateDictionary = { };
if(startTriggerState != null) Reflect.setProperty(stateDictionary,"startTriggerState",startTriggerState);
if(wakeUpTriggerState != null) Reflect.setProperty(stateDictionary,"wakeupTriggerState",wakeUpTriggerState);
if(badgeEndTriggerState != null) Reflect.setProperty(stateDictionary,"badgeEndTriggerState",badgeEndTriggerState);
if(popUpTriggerState != null) Reflect.setProperty(stateDictionary,"popUpTriggerState",popUpTriggerState);
if(popUpDismissedTriggerState != null) Reflect.setProperty(stateDictionary,"popUpDismissedTriggerState",popUpDismissedTriggerState);
if(killTriggerState != null) Reflect.setProperty(stateDictionary,"killTriggerState",killTriggerState);
if(resetTriggerState != null) Reflect.setProperty(stateDictionary,"resetTriggerState",resetTriggerState);
if(interruptTriggerState != null) Reflect.setProperty(stateDictionary,"interruptTriggerState",interruptTriggerState);
if(resumeTriggerState != null) Reflect.setProperty(stateDictionary,"resumeTriggerState",resumeTriggerState);
if(promotionActionsState != null) Reflect.setProperty(stateDictionary,"promotionActionsState",promotionActionsState);
Reflect.setProperty(stateDictionary,"currentTimestampState",this.currentTimestamp);
Reflect.setProperty(stateDictionary,"lastActivation",this.lastActivationTimestamp);
Reflect.setProperty(stateDictionary,"promotionOfferState",this._state[1]);
Reflect.setProperty(stateDictionary,"popupActiveState",this.isPopUpActive());
Reflect.setProperty(stateDictionary,"interrumptPromotionState",this.interruptPromotion);
return stateDictionary;
}
,setState: function(state) {
if(state == null) throw new js__$Boot_HaxeError("Cannot continue without appropriate state defined");
var stateDictionary = state;
var startTriggerState = Reflect.getProperty(stateDictionary,"startTriggerState");
var wakeUpTriggerState = Reflect.getProperty(stateDictionary,"wakeupTriggerState");
var badgeEndTriggerState = Reflect.getProperty(stateDictionary,"badgeEndTriggerState");
var popUpTriggerState = Reflect.getProperty(stateDictionary,"popUpTriggerState");
var popUpDismissedTriggerState = Reflect.getProperty(stateDictionary,"popUpDismissedTriggerState");
var killTriggerState = Reflect.getProperty(stateDictionary,"killTriggerState");
var resetTriggerState = Reflect.getProperty(stateDictionary,"resetTriggerState");
var interruptTriggerState = Reflect.getProperty(stateDictionary,"interruptTriggerState");
var resumeTriggerState = Reflect.getProperty(stateDictionary,"resumeTriggerState");
var promotionActionsState = Reflect.getProperty(stateDictionary,"promotionActionsState");
if(startTriggerState != null && this.startTrigger != null) this.startTrigger.setState(startTriggerState);
if(wakeUpTriggerState != null && this.wakeUpTrigger != null) this.wakeUpTrigger.setState(wakeUpTriggerState);
if(badgeEndTriggerState != null && this.badgeEndTrigger != null) this.badgeEndTrigger.setState(badgeEndTriggerState);
if(popUpTriggerState != null && this.popUpTrigger != null) this.popUpTrigger.setState(popUpTriggerState);
if(popUpDismissedTriggerState != null && this.popUpDismissedTrigger != null) this.popUpDismissedTrigger.setState(popUpDismissedTriggerState);
if(killTriggerState != null && this.killTrigger != null) this.killTrigger.setState(killTriggerState);
if(resetTriggerState != null && this.resetTrigger != null) this.resetTrigger.setState(resetTriggerState);
if(interruptTriggerState != null && this.interruptTrigger != null) this.interruptTrigger.setState(interruptTriggerState);
if(resumeTriggerState != null && this.resetTrigger != null) this.resetTrigger.setState(resumeTriggerState);
if(wakeUpTriggerState != null && this.wakeUpTrigger != null) this.wakeUpTrigger.setState(wakeUpTriggerState);
if(promotionActionsState != null && this.popUpActions != null) {
var pActionsKeys = Reflect.fields(promotionActionsState);
var _g = 0;
while(_g < pActionsKeys.length) {
var key = pActionsKeys[_g];
++_g;
var popupAction = this.popUpActions.get(key);
var popupActionState = Reflect.field(promotionActionsState,key);
popupAction.setState(popupActionState);
}
}
var currentTimestamp = Reflect.getProperty(stateDictionary,"currentTimestampState");
var lastActivationTimestamp = Reflect.getProperty(stateDictionary,"lastActivation");
var popUpActive = Reflect.getProperty(stateDictionary,"popupActiveState");
var interruptPromotion = Reflect.getProperty(stateDictionary,"interrumptPromotionState");
var promotionOfferState = Reflect.getProperty(stateDictionary,"promotionOfferState");
this._state = Type.createEnumIndex(miniclip_promotionsystem_core_model_vo_StateOffer,promotionOfferState,null);
this.lastActivationTimestamp = lastActivationTimestamp;
this.popUpActive = popUpActive;
this.interruptPromotion = interruptPromotion;
this.set_currentTimestamp(currentTimestamp);
}
,getPopupDismissedEvent: function() {
var array = this.popUpDismissedTrigger.getActivationEvents();
if(array.length > 0) return array[0];
return "";
}
,getKillEvent: function() {
return null;
}
,onStartTriggerActivated: function(triggerName) {
if(this.startTrigger == null) return;
if(this.get_hidePromotion()) return;
if(this._state != miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER) return;
if(this._endOfActivationTimestamp > 0 && this.currentTimestamp >= this._endOfActivationTimestamp) {
this.kill();
return;
}
var timestamp;
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.startTrigger)) timestamp = (js_Boot.__cast(this.startTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).lastActivationTimestamp; else timestamp = this.currentTimestamp;
this.startTrigger.reset(true);
this.startTrigger.set_enabled(false);
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE,timestamp);
}
,onPopUpTriggerActivated: function(triggerName) {
if(this.popUpTrigger == null) return;
if(this.get_hidePromotion()) return;
if(this._state != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) return;
if(this.popUpActive) return;
this.popUpActive = true;
var timestamp;
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.popUpTrigger)) timestamp = (js_Boot.__cast(this.popUpTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).lastActivationTimestamp; else timestamp = this.currentTimestamp;
this.popUpTrigger.reset(true);
this.popUpTrigger.set_enabled(false);
this.popUpDismissedTrigger.set_enabled(true);
if(this.delegate != null) this.delegate.showOfferPopUp(this,false);
}
,onPopupDismissedTriggerActivated: function(triggerName) {
if(this.popUpDismissedTrigger == null || this._state != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) return;
if(this.get_hidePromotion()) return;
if(this._state != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) return;
if(!this.popUpActive) return;
this.popUpActive = false;
var timestamp = this.currentTimestamp;
if(this.delegate != null) this.delegate.hideOfferPopUp(this);
this.popUpDismissedTrigger.reset();
this.popUpDismissedTrigger.set_enabled(false);
if(this.popUpTrigger != null) {
if(this.badgeEndTrigger == null && this.popUpTrigger.reachedMaxActivations()) {
if(this.delegate != null) {
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.deactivateStoreChanges(this,this.storeChanges);
this.delegate.offerDeactivated(this);
}
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER,timestamp);
} else {
this.popUpTrigger.set_enabled(true);
this.popUpTrigger.set_currentTimestamp(timestamp);
}
}
}
,onBadgeEndTriggerActivated: function(triggerName) {
if(this.badgeEndTrigger == null) return;
if(this.get_hidePromotion()) return;
if(this._state != miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) return;
var timestamp;
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.badgeEndTrigger)) timestamp = (js_Boot.__cast(this.badgeEndTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).lastActivationTimestamp; else timestamp = this.currentTimestamp;
if(this.delegate != null) {
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.deactivateStoreChanges(this,this.storeChanges);
if(this.popUpActive) this.setPopupActiveState(false);
this.delegate.offerDeactivated(this);
}
this.badgeEndTrigger.reset(true);
this.badgeEndTrigger.set_enabled(false);
if(this.popUpTrigger != null) {
this.popUpTrigger.reset();
this.popUpTrigger.set_enabled(false);
}
this.popUpDismissedTrigger.reset();
this.popUpDismissedTrigger.set_enabled(false);
if(this.popUpActive) this.setPopupActiveState(false);
if(this.interruptTrigger != null && this.resumeTrigger != null) this.interruptPromotion = false;
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER,timestamp);
}
,onWakeUpTriggerActivated: function(triggerName) {
if(this.wakeUpTrigger == null) return;
if(this.get_hidePromotion()) return;
if(this._state != miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER) return;
var timestamp;
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.wakeUpTrigger)) timestamp = (js_Boot.__cast(this.wakeUpTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).lastActivationTimestamp; else timestamp = this.currentTimestamp;
this.wakeUpTrigger.reset(true);
this.wakeUpTrigger.set_enabled(false);
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER,timestamp);
}
,onKillTriggerActivated: function(triggerName) {
if(this.killTrigger == null) return;
if(this.get_hidePromotion()) return;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED) return;
var timestamp;
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.killTrigger)) timestamp = (js_Boot.__cast(this.killTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).lastActivationTimestamp; else timestamp = this.currentTimestamp;
this.kill();
}
,onResetTriggerActivated: function(triggerName) {
if(this.resetTrigger == null) return;
if(this.get_hidePromotion()) return;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED || this._state == miniclip_promotionsystem_core_model_vo_StateOffer.KILLED) return;
var timestamp;
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.resetTrigger)) timestamp = (js_Boot.__cast(this.resetTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).lastActivationTimestamp; else timestamp = this.currentTimestamp;
if(this.delegate != null) {
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) {
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.deactivateStoreChanges(this,this.storeChanges);
this.delegate.offerDeactivated(this);
}
if(this.popUpActive) this.delegate.hideOfferPopUp(this);
this.setPopupActiveState(false);
}
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED,timestamp);
}
,onInterruptTriggerActivated: function(triggerName) {
if(this.interruptTrigger == null) return;
this.interruptPromotion = true;
if(this.delegate != null) {
this.delegate.offerDeactivated(this);
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.deactivateStoreChanges(this,this.storeChanges);
}
if(this.resumeTrigger != null) {
this.resumeTrigger.set_enabled(true);
if(miniclip_promotionsystem_Utils.isTimeTrigger(this.interruptTrigger)) this.resumeTrigger.set_currentTimestamp((js_Boot.__cast(this.interruptTrigger , miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger)).lastActivationTimestamp);
this.interruptTrigger.set_enabled(false);
}
}
,onResumeTriggerActivated: function(triggerName) {
if(this.resumeTrigger == null) return;
if(!this.interruptPromotion) return;
this.interruptPromotion = false;
if(this.delegate != null && !this.get_hidePromotion() && this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) {
this.delegate.offerDeactivated(this);
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.activateStoreChanges(this,this.storeChanges);
}
this.interruptTrigger.set_enabled(true);
}
,onSuccessTriggerActivated_Popup: function(triggerName) {
if(this.popUpActionKillsOffer == true) this.kill(); else if(this.popUpActionDeactivatesOffer == true) this.onBadgeEndTriggerActivated();
}
,onFailureTriggerActivated_Popup: function(triggerName) {
null;
}
,kill: function() {
if(this.delegate != null) {
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) {
if(this.storeChanges != null && this.storeChanges.length > 0) this.delegate.deactivateStoreChanges(this,this.storeChanges);
this.delegate.offerDeactivated(this);
}
if(this.popUpActive) {
this.delegate.hideOfferPopUp(this);
this.setPopupActiveState(false);
}
}
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.KILLED,this.currentTimestamp);
}
,toString: function() {
return "" + this.offerName + " - start: " + Std.string(this.startDate) + " end: " + Std.string(this.endDate);
}
,reset: function() {
if(this.get_hidePromotion()) return;
if(this._state == miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE) {
if(!miniclip_promotionsystem_Utils.isCollectionEmpty(this.storeChanges)) this.delegate.deactivateStoreChanges(this,this.storeChanges);
this.delegate.offerDeactivated(this);
if(this.popUpActive) this.delegate.hideOfferPopUp(this);
this.popUpActive = false;
}
this.setOfferState(miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED);
}
,getPromoTypeFromStringId: function(value) {
if(value == "triggered") return miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_TRIGGERED;
if(value == "time-based") return miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_TIME_BASE;
if(value == "information") return miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_INFORMATION; else return miniclip_promotionsystem_core_model_vo_PromoOfferType.PROMO_OFFER_TYPE_NUM;
}
,__class__: miniclip_promotionsystem_core_model_vo_PromotionOffer
,__properties__: {get_offerState:"get_offerState",set_currentTimestamp:"set_currentTimestamp",get_badgeRemainingTime:"get_badgeRemainingTime",set_hidePromotionWeb:"set_hidePromotionWeb",get_hidePromotionWeb:"get_hidePromotionWeb",set_hidePromotion:"set_hidePromotion",get_hidePromotion:"get_hidePromotion"}
});
var miniclip_promotionsystem_core_model_vo_PromotionPopupInfo = function() {
};
$hxClasses["miniclip.promotionsystem.core.model.vo.PromotionPopupInfo"] = miniclip_promotionsystem_core_model_vo_PromotionPopupInfo;
miniclip_promotionsystem_core_model_vo_PromotionPopupInfo.__name__ = ["miniclip","promotionsystem","core","model","vo","PromotionPopupInfo"];
miniclip_promotionsystem_core_model_vo_PromotionPopupInfo.__interfaces__ = [miniclip_promotionsystem_client_interfaces_IPromotionPopupInfo];
miniclip_promotionsystem_core_model_vo_PromotionPopupInfo.prototype = {
buttonText: null
,image: null
,dismissEvent: null
,killEvent: null
,customData: null
,initWithImage: function(image,buttonText,dismissEvent,killEvent,customData) {
this.image = image;
this.buttonText = buttonText;
this.dismissEvent = dismissEvent;
this.killEvent = killEvent;
this.customData = customData;
}
,__class__: miniclip_promotionsystem_core_model_vo_PromotionPopupInfo
};
var miniclip_promotionsystem_core_model_vo_ReplaceProductVO = function(promoSystem,obj) {
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.ReplaceProductVO"] = miniclip_promotionsystem_core_model_vo_ReplaceProductVO;
miniclip_promotionsystem_core_model_vo_ReplaceProductVO.__name__ = ["miniclip","promotionsystem","core","model","vo","ReplaceProductVO"];
miniclip_promotionsystem_core_model_vo_ReplaceProductVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_ReplaceProductVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
activate: null
,deactivate: null
,__class__: miniclip_promotionsystem_core_model_vo_ReplaceProductVO
});
var miniclip_promotionsystem_core_model_vo_StateOffer = $hxClasses["miniclip.promotionsystem.core.model.vo.StateOffer"] = { __ename__ : ["miniclip","promotionsystem","core","model","vo","StateOffer"], __constructs__ : ["NOT_STARTED","WAIT_WAKE_UP_TRIGGER","WAIT_START_TRIGGER","ACTIVE","KILLED"] };
miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED = ["NOT_STARTED",0];
miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED.toString = $estr;
miniclip_promotionsystem_core_model_vo_StateOffer.NOT_STARTED.__enum__ = miniclip_promotionsystem_core_model_vo_StateOffer;
miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER = ["WAIT_WAKE_UP_TRIGGER",1];
miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER.toString = $estr;
miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_WAKE_UP_TRIGGER.__enum__ = miniclip_promotionsystem_core_model_vo_StateOffer;
miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER = ["WAIT_START_TRIGGER",2];
miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER.toString = $estr;
miniclip_promotionsystem_core_model_vo_StateOffer.WAIT_START_TRIGGER.__enum__ = miniclip_promotionsystem_core_model_vo_StateOffer;
miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE = ["ACTIVE",3];
miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE.toString = $estr;
miniclip_promotionsystem_core_model_vo_StateOffer.ACTIVE.__enum__ = miniclip_promotionsystem_core_model_vo_StateOffer;
miniclip_promotionsystem_core_model_vo_StateOffer.KILLED = ["KILLED",4];
miniclip_promotionsystem_core_model_vo_StateOffer.KILLED.toString = $estr;
miniclip_promotionsystem_core_model_vo_StateOffer.KILLED.__enum__ = miniclip_promotionsystem_core_model_vo_StateOffer;
var miniclip_promotionsystem_core_model_vo_StoreChangeVO = function(promoSystem,obj) {
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.StoreChangeVO"] = miniclip_promotionsystem_core_model_vo_StoreChangeVO;
miniclip_promotionsystem_core_model_vo_StoreChangeVO.__name__ = ["miniclip","promotionsystem","core","model","vo","StoreChangeVO"];
miniclip_promotionsystem_core_model_vo_StoreChangeVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_StoreChangeVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
activateProduct: null
,deactivateProduct: null
,replaceProduct: null
,get_replacementProductToActivate: function() {
if(this.replaceProduct == null) return null;
return this.replaceProduct.activate;
}
,get_replacementProductToDeactivate: function() {
if(this.replaceProduct == null) return null;
return this.replaceProduct.deactivate;
}
,__class__: miniclip_promotionsystem_core_model_vo_StoreChangeVO
,__properties__: {get_replacementProductToDeactivate:"get_replacementProductToDeactivate",get_replacementProductToActivate:"get_replacementProductToActivate"}
});
var miniclip_promotionsystem_core_model_vo_TextEntryVO = function(promoSystem,obj) {
this.productIdMultiplier = 1;
this.productMultiplier = 1;
this.productIndex = 0;
this.productId = null;
this.ttfFontSize = 30;
this.ttfFontName = null;
this.jsonQuery = null;
this.transactionId = null;
this.tag = null;
miniclip_promotionsystem_core_model_vo_AssetConfigVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.TextEntryVO"] = miniclip_promotionsystem_core_model_vo_TextEntryVO;
miniclip_promotionsystem_core_model_vo_TextEntryVO.__name__ = ["miniclip","promotionsystem","core","model","vo","TextEntryVO"];
miniclip_promotionsystem_core_model_vo_TextEntryVO.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IListableResources];
miniclip_promotionsystem_core_model_vo_TextEntryVO.__super__ = miniclip_promotionsystem_core_model_vo_AssetConfigVO;
miniclip_promotionsystem_core_model_vo_TextEntryVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_AssetConfigVO.prototype,{
dataType: null
,tag: null
,transactionId: null
,jsonQuery: null
,bitmapFontName: null
,ttfFontName: null
,ttfFontSize: null
,ttfFontOutline: null
,ttfFontOutlineSize: null
,ttfFontOutlineColor: null
,productId: null
,productIndex: null
,productMultiplier: null
,shouldGetSum: null
,shouldFormatValue: null
,shouldLocalizeValue: null
,shouldDisplayCurrencyIcon: null
,shouldDisplayCoinIcon: null
,shouldDisplayCashIcon: null
,multiline: null
,horizontalStrikethrough: null
,diagonalStrikethrough: null
,actionKey: null
,productIdMultiplier: null
,getResourceList: function(outputList) {
if(this.bitmapFontName != null) {
var assetDef = new miniclip_promotionsystem_core_model_vo_AssetDefinition();
assetDef.isBitmapFont = true;
assetDef.name = this.bitmapFontName;
assetDef.atlasName = this.bitmapFontName;
assetDef.spriteName = StringTools.replace(this.bitmapFontName,".fnt",".png");
outputList.push(assetDef);
}
return outputList;
}
,__class__: miniclip_promotionsystem_core_model_vo_TextEntryVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO = function(promoSystem,obj) {
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessBaseVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessBaseVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
type: null
,execute: function() {
throw new js__$Boot_HaxeError("DataAccessBaseVO:This method should be overrided: " + this.type);
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessABTestVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessABTestVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype,{
valueForGroup: null
,testId: null
,execute: function() {
var group = miniclip_promotionsystem_core_PromotionDataAccessManager.getGroupForTest(this.testId);
var _g1 = 0;
var _g = this.valueForGroup.length;
while(_g1 < _g) {
var index = _g1++;
if(this.valueForGroup[index].hasGroup(group)) {
this.valueForGroup[index].resolve();
return this.valueForGroup[index].value;
}
}
var _g11 = 0;
var _g2 = this.valueForGroup.length;
while(_g11 < _g2) {
var index1 = _g11++;
if(this.valueForGroup[index1].hasGroup("default")) {
this.valueForGroup[index1].resolve();
return this.valueForGroup[index1].value;
}
}
return null;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO = function(promoSystem,obj) {
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessEntryVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessEntryVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
value: null
,handleSpecialTypes: function(fieldName,obj) {
if(fieldName == "value") {
this[fieldName] = obj;
return true;
}
return false;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_ABTestVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.ABTestVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_ABTestVO;
miniclip_promotionsystem_core_model_vo_dataAccess_ABTestVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","ABTestVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_ABTestVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO;
miniclip_promotionsystem_core_model_vo_dataAccess_ABTestVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.prototype,{
groups: null
,hasGroup: function(group) {
return this.groups != null && HxOverrides.indexOf(this.groups,group,0) > -1;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_ABTestVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessBoolPropertyVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessBoolPropertyVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype,{
accessType: null
,propertyType: null
,propertyInfo: null
,execute: function() {
return miniclip_promotionsystem_core_PromotionDataAccessManager.getBoolPropertyType(this.propertyType,this.propertyInfo);
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessIndirectTemplateVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessIndirectTemplateVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype,{
target: null
,replacements: null
,execute: function() {
if(typeof(this.target) == "string") this.target = ["TemplateConfig",this.target];
var template = miniclip_promotionsystem_core_model_DataAccessSolver.getIndirectDataForKey(this.target);
var _g = 0;
var _g1 = this.replacements;
while(_g < _g1.length) {
var replacement = _g1[_g];
++_g;
var _g2 = 0;
var _g3 = Reflect.fields(template);
while(_g2 < _g3.length) {
var field = _g3[_g2];
++_g2;
if(Reflect.field(template,field) == replacement.replaceTag) {
var value = replacement.replaceValue;
if(miniclip_promotionsystem_core_model_DataAccessSolver.isDataAccess(value)) value = miniclip_promotionsystem_core_model_DataAccessSolver.solve(miniclip_promotionsystem_core_model_DataAccessSolver.getDataAccess(Reflect.field(value,"dataAccess")));
template[field] = value;
}
}
}
return template;
}
,handleSpecialTypes: function(fieldName,fieldValue) {
if(fieldName == "target") {
this.target = fieldValue;
return true;
}
return miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype.handleSpecialTypes.call(this,fieldName,fieldValue);
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_ReplacementVO = function(promoSystem,obj) {
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.ReplacementVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_ReplacementVO;
miniclip_promotionsystem_core_model_vo_dataAccess_ReplacementVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","ReplacementVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_ReplacementVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_dataAccess_ReplacementVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
replaceTag: null
,replaceValue: null
,handleSpecialTypes: function(fieldName,obj) {
if(fieldName == "replaceValue") {
this[fieldName] = obj;
return true;
}
return false;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_ReplacementVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessIndirectVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessIndirectVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype,{
target: null
,execute: function() {
if(typeof(this.target) == "string") this.target = ["IndirectConfig",this.target];
return miniclip_promotionsystem_core_model_DataAccessSolver.getIndirectDataForKey(this.target);
}
,handleSpecialTypes: function(fieldName,fieldValue) {
if(fieldName == "target") {
this.target = fieldValue;
return true;
}
return miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype.handleSpecialTypes.call(this,fieldName,fieldValue);
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessLocalizationVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessLocalizationVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype,{
valueForLanguage: null
,execute: function() {
var language = miniclip_promotionsystem_core_PromotionDataAccessManager.getClientLanguage();
var _g1 = 0;
var _g = this.valueForLanguage.length;
while(_g1 < _g) {
var index = _g1++;
if(this.valueForLanguage[index].hasLanguage(language)) {
this.valueForLanguage[index].resolve();
return this.valueForLanguage[index].value;
}
}
var _g11 = 0;
var _g2 = this.valueForLanguage.length;
while(_g11 < _g2) {
var index1 = _g11++;
if(this.valueForLanguage[index1].hasLanguage("default")) {
this.valueForLanguage[index1].resolve();
return this.valueForLanguage[index1].value;
}
}
return null;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_LanguageVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.LanguageVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_LanguageVO;
miniclip_promotionsystem_core_model_vo_dataAccess_LanguageVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","LanguageVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_LanguageVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO;
miniclip_promotionsystem_core_model_vo_dataAccess_LanguageVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.prototype,{
languages: null
,hasLanguage: function(language) {
return this.languages != null && HxOverrides.indexOf(this.languages,language,0) > -1;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_LanguageVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessNumberPropertyVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessNumberPropertyVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype,{
valueForRange: null
,propertyType: null
,execute: function() {
var number = miniclip_promotionsystem_core_PromotionDataAccessManager.getNumberPropertyType(this.propertyType);
var defaultValue = null;
if(miniclip_promotionsystem_Utils.isNaN(number)) number = 0;
var _g1 = 0;
var _g = this.valueForRange.length;
while(_g1 < _g) {
var index = _g1++;
if(this.valueForRange[index].hasNumber(number)) {
this.valueForRange[index].resolve();
return this.valueForRange[index].value;
}
if(this.valueForRange[index].isDefault()) {
this.valueForRange[index].resolve();
defaultValue = this.valueForRange[index].value;
}
}
return defaultValue;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_NumberVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.NumberVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_NumberVO;
miniclip_promotionsystem_core_model_vo_dataAccess_NumberVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","NumberVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_NumberVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO;
miniclip_promotionsystem_core_model_vo_dataAccess_NumberVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.prototype,{
ranges: null
,hasNumber: function(number) {
var _g1 = 0;
var _g = this.ranges.length;
while(_g1 < _g) {
var index = _g1++;
if(this.ranges[index].onRange(number)) return true;
}
return false;
}
,isDefault: function() {
var _g1 = 0;
var _g = this.ranges.length;
while(_g1 < _g) {
var index = _g1++;
if(this.ranges[index].isDefault) return true;
}
return false;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_NumberVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_RangeVO = function(promoSystem,configuration) {
this.superior = NaN;
this.inferior = NaN;
miniclip_core_PromoVO.call(this,promoSystem,configuration);
this.isDefault = typeof(configuration) == "string" && configuration == "default";
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.RangeVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_RangeVO;
miniclip_promotionsystem_core_model_vo_dataAccess_RangeVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","RangeVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_RangeVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_dataAccess_RangeVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
inferior: null
,superior: null
,excludeInferior: null
,excludeSuperior: null
,isDefault: null
,onRange: function(number) {
var isAboveInferiorLimit;
isAboveInferiorLimit = miniclip_promotionsystem_Utils.isNaN(this.inferior) || (this.excludeInferior?number > this.inferior:number >= this.inferior);
var isBelowSuperiorLimit;
isBelowSuperiorLimit = miniclip_promotionsystem_Utils.isNaN(this.superior) || (this.excludeSuperior?number < this.superior:number <= this.superior);
return isAboveInferiorLimit && isBelowSuperiorLimit;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_RangeVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessPlatformVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessPlatformVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype,{
valueForPlatform: null
,execute: function() {
var platform = miniclip_promotionsystem_core_PromotionDataAccessManager.currentPlatformType();
var _g1 = 0;
var _g = this.valueForPlatform.length;
while(_g1 < _g) {
var index = _g1++;
if(this.valueForPlatform[index].hasPlatform(platform)) {
this.valueForPlatform[index].resolve();
return this.valueForPlatform[index].value;
}
}
var _g11 = 0;
var _g2 = this.valueForPlatform.length;
while(_g11 < _g2) {
var index1 = _g11++;
if(this.valueForPlatform[index1].hasPlatform("default")) {
this.valueForPlatform[index1].resolve();
return this.valueForPlatform[index1].value;
}
}
return null;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_PlatformVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.PlatformVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_PlatformVO;
miniclip_promotionsystem_core_model_vo_dataAccess_PlatformVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","PlatformVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_PlatformVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO;
miniclip_promotionsystem_core_model_vo_dataAccess_PlatformVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.prototype,{
platforms: null
,hasPlatform: function(platform) {
return this.platforms != null && HxOverrides.indexOf(this.platforms,platform,0) > -1;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_PlatformVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.DataAccessUserPropertyVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","DataAccessUserPropertyVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO;
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.prototype,{
valueForProperty: null
,propertyType: null
,propertyInfo: null
,execute: function() {
var property = miniclip_promotionsystem_core_PromotionDataAccessManager.getPropertyType(this.propertyType,this.propertyInfo);
var _g1 = 0;
var _g = this.valueForProperty.length;
while(_g1 < _g) {
var index = _g1++;
if(this.valueForProperty[index].hasProperty(property)) {
this.valueForProperty[index].resolve();
return this.valueForProperty[index].value;
}
}
var _g11 = 0;
var _g2 = this.valueForProperty.length;
while(_g11 < _g2) {
var index1 = _g11++;
if(this.valueForProperty[index1].hasProperty("default")) {
this.valueForProperty[index1].resolve();
return this.valueForProperty[index1].value;
}
}
return null;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO
});
var miniclip_promotionsystem_core_model_vo_dataAccess_UserPropertiesVO = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.dataAccess.UserPropertiesVO"] = miniclip_promotionsystem_core_model_vo_dataAccess_UserPropertiesVO;
miniclip_promotionsystem_core_model_vo_dataAccess_UserPropertiesVO.__name__ = ["miniclip","promotionsystem","core","model","vo","dataAccess","UserPropertiesVO"];
miniclip_promotionsystem_core_model_vo_dataAccess_UserPropertiesVO.__super__ = miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO;
miniclip_promotionsystem_core_model_vo_dataAccess_UserPropertiesVO.prototype = $extend(miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.prototype,{
properties: null
,hasProperty: function(property) {
return this.properties != null && HxOverrides.indexOf(this.properties,property,0) > -1;
}
,__class__: miniclip_promotionsystem_core_model_vo_dataAccess_UserPropertiesVO
});
var miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO = function(promoSystem,obj) {
this.S_TriggerActivated = new hxsignal_impl_Signal0();
this.triggerEvents = new haxe_ds_StringMap();
miniclip_core_PromoVO.call(this,promoSystem,obj);
if(this.events != null) {
var _g = 0;
var _g1 = this.events;
while(_g < _g1.length) {
var eventLevels = _g1[_g];
++_g;
this.addEvent(eventLevels);
}
}
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.PromotionMultiEventVO"] = miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO;
miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","PromotionMultiEventVO"];
miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO.__interfaces__ = [miniclip_promotionsystem_core_interfaces_IMultiTriggerEvent];
miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
activateOnFirstEvent: null
,events: null
,triggerEvents: null
,S_TriggerActivated: null
,enabled: null
,set_enabled: function(enabled) {
if(this.enabled == enabled) return this.enabled;
this.enabled = enabled;
if(enabled) this.enableEvents(); else this.disableEvents();
var $it0 = this.triggerEvents.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
this.triggerEvents.get(key).set_enabled(enabled);
}
return this.enabled;
}
,reset: function() {
if(this.triggerEvents != null) {
var $it0 = this.triggerEvents.iterator();
while( $it0.hasNext() ) {
var event = $it0.next();
event.receivedEvent = false;
}
}
}
,getEvents: function() {
var array = [];
if(this.triggerEvents != null) {
var $it0 = this.triggerEvents.keys();
while( $it0.hasNext() ) {
var event = $it0.next();
array.push(event);
}
}
return array;
}
,addEvent: function(eventLevels) {
if(eventLevels == null || eventLevels.length == 0) throw new js__$Boot_HaxeError("Cannot continue with empty event levels");
var eventName = "";
var _g = 0;
while(_g < eventLevels.length) {
var name = eventLevels[_g];
++_g;
if(eventName != "") eventName += "_";
eventName += name;
}
if(eventName != "") {
var event = new miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO(this._promoSystem);
event.triggerName = eventName;
event.set_enabled(true);
event.receivedEvent = false;
this.triggerEvents.set(eventName,event);
}
}
,disableEvents: function() {
var $it0 = this.triggerEvents.keys();
while( $it0.hasNext() ) {
var eventName = $it0.next();
this._promoSystem.unregisterForEvent(eventName,$bind(this,this.eventReceived));
}
}
,enableEvents: function() {
var $it0 = this.triggerEvents.keys();
while( $it0.hasNext() ) {
var eventName = $it0.next();
this._promoSystem.registerForEvent(eventName,this,$bind(this,this.eventReceived));
}
}
,eventReceived: function(triggerEvent) {
if(triggerEvent == null) return;
var triggerEventEntry = this.triggerEvents.get(triggerEvent.name);
if(triggerEventEntry == null) return;
var shouldActivate = true;
if(!this.activateOnFirstEvent) {
triggerEventEntry.receivedEvent = true;
var $it0 = this.triggerEvents.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
triggerEventEntry = this.triggerEvents.get(key);
if(triggerEventEntry.receivedEvent == false) {
shouldActivate = false;
break;
}
}
}
if(shouldActivate == true) this.activate();
if(this._promoSystem != null) this._promoSystem.dirtyFlag = true;
}
,activate: function() {
this.S_TriggerActivated.emit();
this.reset();
}
,getState: function() {
var objState = { };
Reflect.setProperty(objState,"enabledState",this.enabled);
var triggerEventsState = { };
var numTriggers = 0;
var $it0 = this.triggerEvents.keys();
while( $it0.hasNext() ) {
var triggerName = $it0.next();
Reflect.setField(triggerEventsState,triggerName,this.triggerEvents.get(triggerName).getState());
numTriggers++;
}
if(numTriggers > 0) Reflect.setProperty(objState,"triggerEventsState",triggerEventsState);
return objState;
}
,setState: function(state) {
if(state == null) throw new js__$Boot_HaxeError("Cannot continue without appropriate state defined");
var stateDictionary = state;
var enabledState = Reflect.getProperty(stateDictionary,"enabledState");
var triggerEventsState = Reflect.getProperty(stateDictionary,"triggerEventsState");
if(triggerEventsState == null) throw new js__$Boot_HaxeError("Cannot continue without state or trigger defined");
var numValues = 0;
var keyList = Reflect.fields(triggerEventsState);
var _g = 0;
while(_g < keyList.length) {
var key = keyList[_g];
++_g;
var triggerEventEntry = this.triggerEvents.get(key);
if(triggerEventEntry == null) throw new js__$Boot_HaxeError("Cannot continue with trigger data mismatch");
var receivedEventFlag = Reflect.getProperty(triggerEventsState,key);
triggerEventEntry.setState(receivedEventFlag);
}
this.set_enabled(enabledState);
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO
,__properties__: {set_enabled:"set_enabled"}
});
var miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO = function(promoSystem,obj) {
this.currentTimestamp = -1.0;
this.numActivations = 0;
this._enabled = false;
var _g = this;
miniclip_core_PromoVO.call(this,promoSystem,obj);
this.receivedEvent = false;
this.S_TriggerActivated = new hxsignal_impl_Signal1();
if(this.parameters != null) {
if(this.parameters.resetEvent != null) this.parameters.resetEvent.S_TriggerActivated.connect(function() {
_g.reset();
});
if(this.parameters.enableEvent != null) this.parameters.enableEvent.S_TriggerActivated.connect(function() {
_g.set_enabled(true);
});
if(this.parameters.disableEvent != null) this.parameters.disableEvent.S_TriggerActivated.connect(function() {
_g.set_enabled(false);
});
}
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.TriggerEventVO"] = miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO;
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","TriggerEventVO"];
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
_enabled: null
,get_enabled: function() {
return this._enabled;
}
,set_enabled: function(value) {
if(this._enabled == value) return this._enabled;
this._enabled = value;
if(this.parameters != null) {
if(!this._enabled && this.parameters.resetOnDisable) this.reset();
if(this.parameters.resetEvent != null) this.parameters.resetEvent.set_enabled(value);
if(this.parameters.enableEvent != null) this.parameters.enableEvent.set_enabled(value);
if(this.parameters.disableEvent != null) this.parameters.disableEvent.set_enabled(value);
}
return value;
}
,numActivations: null
,triggerName: null
,triggerType: null
,parameters: null
,currentTimestamp: null
,set_currentTimestamp: function(value) {
if(!this.get_enabled()) return value;
this.currentTimestamp = value;
return value;
}
,eventLevels: null
,receivedEvent: null
,S_TriggerActivated: null
,handleSpecialTypes: function(key,obj) {
if(key == "parameters") {
Reflect.setField(this,key,new miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO(this._promoSystem,obj));
return true;
}
return miniclip_core_PromoVO.prototype.handleSpecialTypes.call(this,key,obj);
}
,reset: function(soft) {
if(soft == null) soft = false;
if(!soft) {
this.numActivations = 0;
this.receivedEvent = false;
}
if(this.parameters != null) this.parameters.reset(soft);
}
,trigger: function() {
if(!this.get_enabled()) return false;
if(this.get_canActivate()) {
if(this.parameters.maxActivations > 0) this.numActivations++;
if(this.parameters != null) this.parameters.dispatchEvents();
this.S_TriggerActivated.emit(this.triggerName);
if(this._promoSystem != null) this._promoSystem.dirtyFlag = true;
return true;
} else null;
return false;
}
,get_canActivate: function() {
return this.get_enabled() && !this.reachedMaxActivations();
}
,description: function() {
var ret = "EVENT_";
var _g = 0;
var _g1 = this.eventLevels;
while(_g < _g1.length) {
var event = _g1[_g];
++_g;
ret += event;
}
return ret;
}
,getState: function() {
var stateDictionary = { };
Reflect.setProperty(stateDictionary,"enabledState",this.get_enabled() == true);
Reflect.setProperty(stateDictionary,"numActivationsState",this.numActivations);
Reflect.setProperty(stateDictionary,"receivedEvent",this.receivedEvent);
if(this.parameters != null) {
Reflect.setProperty(stateDictionary,"resetOnDisableState",this.parameters.resetOnDisable);
Reflect.setProperty(stateDictionary,"maxActivations",this.parameters.maxActivations);
if(this.parameters.resetEvent != null) Reflect.setProperty(stateDictionary,"resetEventState",this.parameters.resetEvent.getState());
if(this.parameters.enableEvent != null) Reflect.setProperty(stateDictionary,"enableEventState",this.parameters.enableEvent.getState());
if(this.parameters.disableEvent != null) Reflect.setProperty(stateDictionary,"disableEventState",this.parameters.disableEvent.getState());
}
return stateDictionary;
}
,setState: function(state) {
if(state == null) throw new js__$Boot_HaxeError("Cannot continue without appropriate state defined");
var stateDictionary = state;
if(this.parameters != null) {
this.parameters.resetOnDisable = Reflect.getProperty(stateDictionary,"resetOnDisableState");
this.parameters.maxActivations = Reflect.getProperty(stateDictionary,"maxActivations");
if(this.parameters.resetEvent != null) this.parameters.resetEvent.setState(Reflect.getProperty(stateDictionary,"resetEventState"));
if(this.parameters.enableEvent != null) this.parameters.enableEvent.setState(Reflect.getProperty(stateDictionary,"enableEventState"));
if(this.parameters.disableEvent != null) this.parameters.disableEvent.setState(Reflect.getProperty(stateDictionary,"disableEventState"));
}
var enableFlag = Reflect.getProperty(stateDictionary,"enabledState");
var numActivations = Reflect.getProperty(stateDictionary,"numActivationsState");
var receivedEvent = Reflect.getProperty(stateDictionary,"receivedEvent");
this.set_enabled(enableFlag);
this.numActivations = numActivations;
this.receivedEvent = receivedEvent;
}
,reachedMaxActivations: function() {
return this.parameters != null && this.parameters.maxActivations > 0 && this.numActivations >= this.parameters.maxActivations;
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO
,__properties__: {get_canActivate:"get_canActivate",set_enabled:"set_enabled",get_enabled:"get_enabled"}
});
var miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO = function(promoSystem,obj) {
this.resetOnDisable = false;
miniclip_core_PromoVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.TriggerParametersVO"] = miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO;
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","TriggerParametersVO"];
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.__super__ = miniclip_core_PromoVO;
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.prototype = $extend(miniclip_core_PromoVO.prototype,{
resetOnDisable: null
,maxActivations: null
,onActivationEvents: null
,resetEvent: null
,enableEvent: null
,disableEvent: null
,dispatchEvents: function() {
if(this.onActivationEvents != null) {
var _g = 0;
var _g1 = this.onActivationEvents;
while(_g < _g1.length) {
var event = _g1[_g];
++_g;
this._promoSystem.postEvent(event);
}
}
}
,reset: function(soft) {
if(soft) return;
if(this.resetEvent != null) this.resetEvent.reset();
if(this.enableEvent != null) this.enableEvent.reset();
if(this.disableEvent != null) this.disableEvent.reset();
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger = function(promoSystem,obj) {
this.startTimestamp = -1.0;
this.lastActivationTimestamp = -1.0;
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForTimeBaseTrigger"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForTimeBaseTrigger"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.__super__ = miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO;
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype,{
lastActivationTimestamp: null
,startTimestamp: null
,get_timeToNextActivation: function() {
return -1.0;
}
,reset: function(soft) {
if(soft == null) soft = false;
this.currentTimestamp = -1.0;
this.startTimestamp = -1.0;
if(!soft) this.lastActivationTimestamp = -1.0;
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.reset.call(this,soft);
}
,getState: function() {
var state = miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.getState.call(this);
Reflect.setProperty(state,"lastActivationState",this.lastActivationTimestamp);
Reflect.setProperty(state,"startTimestampState",this.startTimestamp);
Reflect.setProperty(state,"currentTimestampState",this.currentTimestamp);
return state;
}
,setState: function(state) {
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.setState.call(this,state);
this.lastActivationTimestamp = Reflect.getProperty(state,"lastActivationState");
this.startTimestamp = Reflect.getProperty(state,"startTimestampState");
this.currentTimestamp = Reflect.getProperty(state,"currentTimestampState");
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger
,__properties__: $extend(miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.__properties__,{get_timeToNextActivation:"get_timeToNextActivation"})
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.call(this,promoSystem,obj);
this.initialize();
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForDeltaTimeTrigger"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForDeltaTimeTrigger"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.__super__ = miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.prototype,{
deltaTime: null
,initialize: function() {
this.deltaTime = 0.0;
if(this.parameters != null && js_Boot.__instanceof(this.parameters,miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters)) {
var parameters;
try {
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
parameters = null;
}
this.deltaTime += parameters.years * 31536000;
this.deltaTime += parameters.months * 2678400;
this.deltaTime += parameters.weeks * 604800;
this.deltaTime += parameters.days * 86400;
this.deltaTime += parameters.hours * 3600;
this.deltaTime += parameters.minutes * 60;
this.deltaTime += parameters.seconds;
this.deltaTime *= 1000;
}
}
,get_timeToNextActivation: function() {
if(this.startTimestamp < 0.0) return -1.0;
var remainingTime = this.deltaTime - (this.currentTimestamp - this.startTimestamp);
if(remainingTime < 0.0) return -1.0;
return this.currentTimestamp + remainingTime;
}
,set_currentTimestamp: function(currentTime) {
if(!this.get_enabled() || this.parameters == null) return currentTime;
if(currentTime < 0.0) return currentTime;
if(this.currentTimestamp < 0.0) {
this.currentTimestamp = currentTime;
this.startTimestamp = currentTime;
} else if(currentTime <= this.currentTimestamp) return currentTime;
var currentDelta = currentTime - this.startTimestamp;
if(this.deltaTime > 0.0 && currentDelta >= this.deltaTime && this.get_canActivate()) {
var activations = currentDelta / this.deltaTime | 0;
if(activations > 1 && (js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters)).allowTriggerMoreThanOnceOnUpdate) {
var _g = 0;
while(_g < activations) {
var i = _g++;
if(this.get_canActivate()) {
this.startTimestamp = this.lastActivationTimestamp = this.startTimestamp + this.deltaTime;
this.trigger();
}
if(!this.get_enabled() || this.startTimestamp < 0) break;
}
} else {
this.startTimestamp = this.lastActivationTimestamp = this.startTimestamp + this.deltaTime;
this.trigger();
}
}
return currentTime;
}
,handleSpecialTypes: function(key,obj) {
if(key == "parameters") {
Reflect.setField(this,key,new miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters(this._promoSystem,obj));
return true;
}
return miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.prototype.handleSpecialTypes.call(this,key,obj);
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForDeltaTimeTriggerParameters"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForDeltaTimeTriggerParameters"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters.__super__ = miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.prototype,{
years: null
,months: null
,weeks: null
,days: null
,hours: null
,minutes: null
,seconds: null
,allowTriggerMoreThanOnceOnUpdate: null
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger = function(promoSystem,obj) {
this.nCount = 0;
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.call(this,promoSystem,obj);
this.initialize();
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForEventTrigger"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForEventTrigger"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger.__super__ = miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO;
miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype,{
nCount: null
,set_enabled: function(value) {
if(this._enabled == value) return this._enabled;
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters);
if(parameters != null) {
if(parameters.activationEvent != null) parameters.activationEvent.set_enabled(value);
}
return miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.set_enabled.call(this,value);
}
,handleSpecialTypes: function(key,obj) {
if(key == "parameters") {
Reflect.setField(this,key,new miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters(this._promoSystem,obj));
return true;
}
return miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.handleSpecialTypes.call(this,key,obj);
}
,initialize: function() {
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters);
if(parameters != null && parameters.activationEvent != null) parameters.activationEvent.S_TriggerActivated.connect($bind(this,this.trigger));
}
,trigger: function() {
this.nCount++;
if(this.nCount >= (js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters)).count) return miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.trigger.call(this);
return false;
}
,reset: function(soft) {
if(soft == null) soft = false;
this.nCount = 0;
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.reset.call(this,soft);
}
,getActivationEvents: function() {
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters);
if(parameters == null || parameters.activationEvent == null) return null;
return parameters.activationEvent.getEvents();
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters = function(promoSystem,obj) {
this.count = 1;
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForEventTriggerParameters"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters;
miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForEventTriggerParameters"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters.__super__ = miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO;
miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.prototype,{
activationEvent: null
,count: null
,reset: function(soft) {
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.prototype.reset.call(this,soft);
if(this.activationEvent != null && !soft) this.activationEvent.reset();
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForMultiTimeTrigger"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForMultiTimeTrigger"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger.__super__ = miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.prototype,{
handleSpecialTypes: function(key,obj) {
if(key == "parameters") {
Reflect.setField(this,key,new miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters(this._promoSystem,obj));
return true;
}
return miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.prototype.handleSpecialTypes.call(this,key,obj);
}
,set_currentTimestamp: function(_time) {
if(!this.get_enabled()) return this.currentTimestamp;
if(_time < 0.0) return this.currentTimestamp;
if(this.currentTimestamp < 0.0) this.currentTimestamp = _time; else if(_time <= this.currentTimestamp) return this.currentTimestamp;
var previousTimestamp = this.currentTimestamp;
this.currentTimestamp = _time;
var activationTimestamp = this.get_timeToNextActivation();
if(activationTimestamp >= previousTimestamp && activationTimestamp <= this.currentTimestamp && activationTimestamp > this.lastActivationTimestamp) {
if(this.trigger()) this.lastActivationTimestamp = activationTimestamp;
}
return this.currentTimestamp;
}
,get_timeToNextActivation: function() {
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters);
if(this.currentTimestamp < 0.0 || parameters == null) return -1.0;
var closestTimestamp = -1;
var activationTimestamp;
var _g = 0;
var _g1 = parameters.activationDates;
while(_g < _g1.length) {
var date = _g1[_g];
++_g;
activationTimestamp = miniclip_core_DateUtils.getNextDateForParams(this.currentTimestamp,date);
if(activationTimestamp >= this.currentTimestamp && (closestTimestamp == -1 || activationTimestamp < closestTimestamp)) closestTimestamp = activationTimestamp;
}
return closestTimestamp;
}
,reachedMaxActivations: function() {
try {
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters);
if(parameters != null && parameters.activationDates.length == 1) return miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.prototype.reachedMaxActivations.call(this);
} catch( error ) {
haxe_CallStack.lastException = error;
if (error instanceof js__$Boot_HaxeError) error = error.val;
return miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.prototype.reachedMaxActivations.call(this);
}
return false;
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForMultiTimeTriggerParameters"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters;
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForMultiTimeTriggerParameters"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters.__super__ = miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO;
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.prototype,{
activationDates: null
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.call(this,promoSystem,obj);
this.initialize();
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForSequencedNestedTriggersTrigger"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForSequencedNestedTriggersTrigger"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger.__super__ = miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO;
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype,{
triggersMap: null
,handleSpecialTypes: function(key,obj) {
if(key == "parameters") {
Reflect.setField(this,key,new miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters(this._promoSystem,obj));
return true;
}
return miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.handleSpecialTypes.call(this,key,obj);
}
,set_enabled: function(value) {
if(this.get_enabled() == value) return this.get_enabled();
this.enableTriggers(value);
return miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.set_enabled.call(this,value);
}
,enableTriggers: function(value) {
if(this.parameters != null) {
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters);
var _g1 = 0;
var _g = parameters.activationTriggers.length;
while(_g1 < _g) {
var i = _g1++;
parameters.activationTriggers[i].set_enabled(i == 0?value:false);
}
}
}
,set_currentTimestamp: function(value) {
if(!this.get_enabled()) return value;
if(this.parameters != null) {
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters);
var _g1 = 0;
var _g = parameters.activationTriggers.length;
while(_g1 < _g) {
var i = _g1++;
parameters.activationTriggers[i].set_currentTimestamp(value);
}
}
return miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.set_currentTimestamp.call(this,value);
}
,initialize: function() {
this.triggersMap = new haxe_ds_StringMap();
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters);
if(parameters != null && parameters.activationTriggers != null) {
var _g1 = 0;
var _g = parameters.activationTriggers.length;
while(_g1 < _g) {
var i = _g1++;
this.triggersMap.set(parameters.activationTriggers[i].triggerName,i);
parameters.activationTriggers[i].S_TriggerActivated.connect($bind(this,this.onTriggerActivated));
}
}
}
,onTriggerActivated: function(triggerName) {
var index = this.triggersMap.get(triggerName);
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters);
parameters.activationTriggers[index].receivedEvent = true;
if(parameters.activateOnFirstTrigger) this.trigger(); else if(index < parameters.activationTriggers.length - 1) parameters.activationTriggers[index + 1].set_enabled(true); else this.trigger();
if(this._promoSystem != null) this._promoSystem.dirtyFlag = true;
}
,trigger: function() {
if(miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.trigger.call(this)) {
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters);
var _g1 = 0;
var _g = parameters.activationTriggers.length;
while(_g1 < _g) {
var i = _g1++;
parameters.activationTriggers[i].receivedEvent = false;
parameters.activationTriggers[i].reset(true);
}
return true;
}
return false;
}
,getState: function() {
var objState = miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.getState.call(this);
var triggersState = { };
var numTriggers = 0;
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters);
var $it0 = this.triggersMap.keys();
while( $it0.hasNext() ) {
var triggerName = $it0.next();
Reflect.setField(triggersState,triggerName,parameters.activationTriggers[this.triggersMap.get(triggerName)].getState());
numTriggers++;
}
if(numTriggers > 0) Reflect.setProperty(objState,"triggersMapState",triggersState);
return objState;
}
,setState: function(state) {
if(state == null) throw new js__$Boot_HaxeError("Cannot continue without appropriate state defined");
var stateDictionary = state;
var triggersState = Reflect.getProperty(stateDictionary,"triggersMapState");
if(triggersState == null) throw new js__$Boot_HaxeError("Cannot continue without state or trigger defined");
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters);
var keyList = Reflect.fields(triggersState);
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.prototype.setState.call(this,state);
var _g = 0;
while(_g < keyList.length) {
var key = keyList[_g];
++_g;
var triggerEventEntry = parameters.activationTriggers[this.triggersMap.get(key)];
if(triggerEventEntry == null) throw new js__$Boot_HaxeError("Cannot continue with trigger data mismatch");
var triggerState = Reflect.getProperty(triggersState,key);
triggerEventEntry.setState(triggerState);
}
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTrigger = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForNestedTriggersTrigger"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTrigger.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForNestedTriggersTrigger"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTrigger.__super__ = miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTrigger.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger.prototype,{
handleSpecialTypes: function(key,obj) {
if(key == "parameters") {
Reflect.setField(this,key,new miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters(this._promoSystem,obj));
return true;
}
return miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger.prototype.handleSpecialTypes.call(this,key,obj);
}
,enableTriggers: function(value) {
if(this.parameters != null) {
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters);
var _g1 = 0;
var _g = parameters.activationTriggers.length;
while(_g1 < _g) {
var i = _g1++;
parameters.activationTriggers[i].set_enabled(value);
}
}
}
,onTriggerActivated: function(triggerName) {
var index = this.triggersMap.get(triggerName);
var parameters;
parameters = js_Boot.__cast(this.parameters , miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters);
parameters.activationTriggers[index].receivedEvent = true;
if(this._promoSystem != null) this._promoSystem.dirtyFlag = true;
if(!parameters.activateOnFirstTrigger) {
var _g1 = 0;
var _g = parameters.activationTriggers.length;
while(_g1 < _g) {
var i = _g1++;
if(parameters.activationTriggers[i].receivedEvent == false) return;
}
}
this.trigger();
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTrigger
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForSequencedNestedTriggersTriggerParameters"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters;
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForSequencedNestedTriggersTriggerParameters"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters.__super__ = miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO;
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.prototype,{
activationTriggers: null
,activateOnFirstTrigger: null
,reset: function(soft) {
var _g1 = 0;
var _g = this.activationTriggers.length;
while(_g1 < _g) {
var i = _g1++;
this.activationTriggers[i].reset(soft);
}
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.prototype.reset.call(this,soft);
}
,handleSpecialTypes: function(key,obj) {
if(key == "activationTriggers") {
var array = [];
var _g1 = 0;
var _g = obj.length;
while(_g1 < _g) {
var i = _g1++;
var trigger = miniclip_promotionsystem_core_model_PromotionFactory.createTrigger(this._promoSystem,obj[i]);
if(trigger != null) array.push(trigger);
}
this[key] = array;
return true;
}
return miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.prototype.handleSpecialTypes.call(this,key,obj);
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForNestedTriggersTriggerParameters"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters;
miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForNestedTriggersTriggerParameters"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters.__super__ = miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters;
miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters.prototype,{
__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTrigger = function(promoSystem,obj) {
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger.call(this,promoSystem,obj);
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForTimeTrigger"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTrigger.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForTimeTrigger"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTrigger.__super__ = miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger;
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTrigger.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger.prototype,{
handleSpecialTypes: function(key,obj) {
if(key == "parameters") {
Reflect.setField(this,key,new miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTriggerParameters(this._promoSystem,obj));
return true;
}
return miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger.prototype.handleSpecialTypes.call(this,key,obj);
}
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTrigger
});
var miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTriggerParameters = function(promoSystem,obj) {
this.second = 0;
this.minute = -1;
this.hour = -1;
this.day = 0;
this.month = 0;
this.year = 0;
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters.call(this,promoSystem,obj);
this.activationDates = [];
this.activationDates.push(new miniclip_promotionsystem_core_model_vo_DateVO(promoSystem,{ year : this.year, month : this.month, day : this.day, hour : this.hour, minute : this.minute, second : this.second}));
};
$hxClasses["miniclip.promotionsystem.core.model.vo.triggers.WaitForTimeTriggerParameters"] = miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTriggerParameters;
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTriggerParameters.__name__ = ["miniclip","promotionsystem","core","model","vo","triggers","WaitForTimeTriggerParameters"];
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTriggerParameters.__super__ = miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters;
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTriggerParameters.prototype = $extend(miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters.prototype,{
year: null
,month: null
,day: null
,hour: null
,minute: null
,second: null
,__class__: miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTriggerParameters
});
var motion_actuators_IGenericActuator = function() { };
$hxClasses["motion.actuators.IGenericActuator"] = motion_actuators_IGenericActuator;
motion_actuators_IGenericActuator.__name__ = ["motion","actuators","IGenericActuator"];
motion_actuators_IGenericActuator.prototype = {
autoVisible: null
,delay: null
,ease: null
,onComplete: null
,onRepeat: null
,onUpdate: null
,reflect: null
,repeat: null
,reverse: null
,smartRotation: null
,snapping: null
,onPause: null
,onResume: null
,apply: null
,move: null
,pause: null
,resume: null
,stop: null
,__class__: motion_actuators_IGenericActuator
};
var motion_actuators_GenericActuator = function(target,duration,properties) {
this._autoVisible = true;
this._delay = 0;
this._reflect = false;
this._repeat = 0;
this._reverse = false;
this._smartRotation = false;
this._snapping = false;
this.special = false;
this.target = target;
this.properties = properties;
this.duration = duration;
this._ease = motion_Actuate.defaultEase;
};
$hxClasses["motion.actuators.GenericActuator"] = motion_actuators_GenericActuator;
motion_actuators_GenericActuator.__name__ = ["motion","actuators","GenericActuator"];
motion_actuators_GenericActuator.__interfaces__ = [motion_actuators_IGenericActuator];
motion_actuators_GenericActuator.prototype = {
duration: null
,id: null
,properties: null
,target: null
,_autoVisible: null
,_delay: null
,_ease: null
,_onComplete: null
,_onCompleteParams: null
,_onRepeat: null
,_onRepeatParams: null
,_onUpdate: null
,_onUpdateParams: null
,_onResume: null
,_onResumeParams: null
,_onPause: null
,_onPauseParams: null
,_reflect: null
,_repeat: null
,_reverse: null
,_smartRotation: null
,_snapping: null
,special: null
,apply: function() {
var _g = 0;
var _g1 = Reflect.fields(this.properties);
while(_g < _g1.length) {
var i = _g1[_g];
++_g;
if(Object.prototype.hasOwnProperty.call(this.target,i)) Reflect.setField(this.target,i,Reflect.field(this.properties,i)); else Reflect.setProperty(this.target,i,Reflect.field(this.properties,i));
}
}
,autoVisible: function(value) {
if(value == null) value = true;
this._autoVisible = value;
return this;
}
,callMethod: function(method,params) {
if(params == null) params = [];
return Reflect.callMethod(method,method,params);
}
,change: function() {
if(this._onUpdate != null) this.callMethod(this._onUpdate,this._onUpdateParams);
}
,complete: function(sendEvent) {
if(sendEvent == null) sendEvent = true;
if(sendEvent) {
this.change();
if(this._onComplete != null) this.callMethod(this._onComplete,this._onCompleteParams);
}
motion_Actuate.unload(this);
}
,delay: function(duration) {
this._delay = duration;
return this;
}
,ease: function(easing) {
this._ease = easing;
return this;
}
,move: function() {
}
,onComplete: function(handler,parameters) {
this._onComplete = handler;
if(parameters == null) this._onCompleteParams = []; else this._onCompleteParams = parameters;
if(this.duration == 0) this.complete();
return this;
}
,onRepeat: function(handler,parameters) {
this._onRepeat = handler;
if(parameters == null) this._onRepeatParams = []; else this._onRepeatParams = parameters;
return this;
}
,onUpdate: function(handler,parameters) {
this._onUpdate = handler;
if(parameters == null) this._onUpdateParams = []; else this._onUpdateParams = parameters;
return this;
}
,onPause: function(handler,parameters) {
this._onPause = handler;
if(parameters == null) this._onPauseParams = []; else this._onPauseParams = parameters;
return this;
}
,onResume: function(handler,parameters) {
this._onResume = handler;
if(parameters == null) this._onResumeParams = []; else this._onResumeParams = parameters;
return this;
}
,pause: function() {
if(this._onPause != null) this.callMethod(this._onPause,this._onPauseParams);
}
,reflect: function(value) {
if(value == null) value = true;
this._reflect = value;
this.special = true;
return this;
}
,repeat: function(times) {
if(times == null) times = -1;
this._repeat = times;
return this;
}
,resume: function() {
if(this._onResume != null) this.callMethod(this._onResume,this._onResumeParams);
}
,reverse: function(value) {
if(value == null) value = true;
this._reverse = value;
this.special = true;
return this;
}
,smartRotation: function(value) {
if(value == null) value = true;
this._smartRotation = value;
this.special = true;
return this;
}
,snapping: function(value) {
if(value == null) value = true;
this._snapping = value;
this.special = true;
return this;
}
,stop: function(properties,complete,sendEvent) {
}
,__class__: motion_actuators_GenericActuator
};
var motion_actuators_SimpleActuator = function(target,duration,properties) {
this.active = true;
this.propertyDetails = [];
this.sendChange = false;
this.paused = false;
this.cacheVisible = false;
this.initialized = false;
this.setVisible = false;
this.toggleVisible = false;
this.startTime = openfl_Lib.getTimer() / 1000;
motion_actuators_GenericActuator.call(this,target,duration,properties);
if(!motion_actuators_SimpleActuator.addedEvent) {
motion_actuators_SimpleActuator.addedEvent = true;
openfl_Lib.current.stage.addEventListener("enterFrame",motion_actuators_SimpleActuator.stage_onEnterFrame);
}
};
$hxClasses["motion.actuators.SimpleActuator"] = motion_actuators_SimpleActuator;
motion_actuators_SimpleActuator.__name__ = ["motion","actuators","SimpleActuator"];
motion_actuators_SimpleActuator.stage_onEnterFrame = function(event) {
var currentTime = openfl_Lib.getTimer() / 1000;
var actuator;
var j = 0;
var cleanup = false;
var _g1 = 0;
var _g = motion_actuators_SimpleActuator.actuatorsLength;
while(_g1 < _g) {
var i = _g1++;
actuator = motion_actuators_SimpleActuator.actuators[j];
if(actuator != null && actuator.active) {
if(currentTime >= actuator.timeOffset) actuator.update(currentTime);
j++;
} else {
motion_actuators_SimpleActuator.actuators.splice(j,1);
--motion_actuators_SimpleActuator.actuatorsLength;
}
}
};
motion_actuators_SimpleActuator.__super__ = motion_actuators_GenericActuator;
motion_actuators_SimpleActuator.prototype = $extend(motion_actuators_GenericActuator.prototype,{
setField_openfl_geom_Transform: function(target,propertyName,value) {
if(Object.prototype.hasOwnProperty.call(target,propertyName)) target[propertyName] = value; else Reflect.setProperty(target,propertyName,value);
}
,setField_motion_actuators_TransformActuator_T: function(target,propertyName,value) {
if(Object.prototype.hasOwnProperty.call(target,propertyName)) target[propertyName] = value; else Reflect.setProperty(target,propertyName,value);
}
,setField_motion_actuators_MotionPathActuator_T: function(target,propertyName,value) {
if(Object.prototype.hasOwnProperty.call(target,propertyName)) target[propertyName] = value; else Reflect.setProperty(target,propertyName,value);
}
,setField_openfl_display_DisplayObject: function(target,propertyName,value) {
if(Object.prototype.hasOwnProperty.call(target,propertyName)) target[propertyName] = value; else Reflect.setProperty(target,propertyName,value);
}
,setField_motion_actuators_SimpleActuator_T: function(target,propertyName,value) {
if(Object.prototype.hasOwnProperty.call(target,propertyName)) target[propertyName] = value; else Reflect.setProperty(target,propertyName,value);
}
,timeOffset: null
,active: null
,cacheVisible: null
,detailsLength: null
,initialized: null
,paused: null
,pauseTime: null
,propertyDetails: null
,sendChange: null
,setVisible: null
,startTime: null
,toggleVisible: null
,autoVisible: function(value) {
if(value == null) value = true;
this._autoVisible = value;
if(!value) {
this.toggleVisible = false;
if(this.setVisible) this.setField_motion_actuators_SimpleActuator_T(this.target,"visible",this.cacheVisible);
}
return this;
}
,delay: function(duration) {
this._delay = duration;
this.timeOffset = this.startTime + duration;
return this;
}
,getField: function(target,propertyName) {
var value = null;
if(Object.prototype.hasOwnProperty.call(target,propertyName)) value = Reflect.field(target,propertyName); else value = Reflect.getProperty(target,propertyName);
return value;
}
,initialize: function() {
var details;
var start;
var _g = 0;
var _g1 = Reflect.fields(this.properties);
while(_g < _g1.length) {
var i = _g1[_g];
++_g;
var isField = true;
if(Object.prototype.hasOwnProperty.call(this.target,i) && !(this.target.__properties__ && this.target.__properties__["set_" + i])) start = Reflect.field(this.target,i); else {
isField = false;
start = Reflect.getProperty(this.target,i);
}
if(typeof(start) == "number") {
var value = this.getField(this.properties,i);
if(start == null) start = 0;
if(value == null) value = 0;
details = new motion_actuators_PropertyDetails(this.target,i,start,value - start,isField);
this.propertyDetails.push(details);
}
}
this.detailsLength = this.propertyDetails.length;
this.initialized = true;
}
,move: function() {
this.toggleVisible = Object.prototype.hasOwnProperty.call(this.properties,"alpha") && js_Boot.__instanceof(this.target,openfl_display_DisplayObject);
if(this.toggleVisible && this.properties.alpha != 0 && !this.getField(this.target,"visible")) {
this.setVisible = true;
this.cacheVisible = this.getField(this.target,"visible");
this.setField_motion_actuators_SimpleActuator_T(this.target,"visible",true);
}
this.timeOffset = this.startTime;
motion_actuators_SimpleActuator.actuators.push(this);
++motion_actuators_SimpleActuator.actuatorsLength;
}
,onUpdate: function(handler,parameters) {
this._onUpdate = handler;
if(parameters == null) this._onUpdateParams = []; else this._onUpdateParams = parameters;
this.sendChange = true;
return this;
}
,pause: function() {
if(!this.paused) {
this.paused = true;
motion_actuators_GenericActuator.prototype.pause.call(this);
this.pauseTime = openfl_Lib.getTimer();
}
}
,resume: function() {
if(this.paused) {
this.paused = false;
this.timeOffset += (openfl_Lib.getTimer() - this.pauseTime) / 1000;
motion_actuators_GenericActuator.prototype.resume.call(this);
}
}
,setProperty: function(details,value) {
if(details.isField) details.target[details.propertyName] = value; else Reflect.setProperty(details.target,details.propertyName,value);
}
,stop: function(properties,complete,sendEvent) {
if(this.active) {
if(properties == null) {
this.active = false;
if(complete) this.apply();
this.complete(sendEvent);
return;
}
var _g = 0;
var _g1 = Reflect.fields(properties);
while(_g < _g1.length) {
var i = _g1[_g];
++_g;
if(Object.prototype.hasOwnProperty.call(this.properties,i)) {
this.active = false;
if(complete) this.apply();
this.complete(sendEvent);
return;
}
}
}
}
,update: function(currentTime) {
if(!this.paused) {
var details;
var easing;
var i;
var tweenPosition = (currentTime - this.timeOffset) / this.duration;
if(tweenPosition > 1) tweenPosition = 1;
if(!this.initialized) this.initialize();
if(!this.special) {
easing = this._ease.calculate(tweenPosition);
var _g1 = 0;
var _g = this.detailsLength;
while(_g1 < _g) {
var i1 = _g1++;
details = this.propertyDetails[i1];
this.setProperty(details,details.start + details.change * easing);
}
} else {
if(!this._reverse) easing = this._ease.calculate(tweenPosition); else easing = this._ease.calculate(1 - tweenPosition);
var endValue;
var _g11 = 0;
var _g2 = this.detailsLength;
while(_g11 < _g2) {
var i2 = _g11++;
details = this.propertyDetails[i2];
if(this._smartRotation && (details.propertyName == "rotation" || details.propertyName == "rotationX" || details.propertyName == "rotationY" || details.propertyName == "rotationZ")) {
var rotation = details.change % 360;
if(rotation > 180) rotation -= 360; else if(rotation < -180) rotation += 360;
endValue = details.start + rotation * easing;
} else endValue = details.start + details.change * easing;
if(!this._snapping) {
if(details.isField) details.target[details.propertyName] = endValue; else Reflect.setProperty(details.target,details.propertyName,endValue);
} else this.setProperty(details,Math.round(endValue));
}
}
if(tweenPosition == 1) {
if(this._repeat == 0) {
this.active = false;
if(this.toggleVisible && this.getField(this.target,"alpha") == 0) this.setField_motion_actuators_SimpleActuator_T(this.target,"visible",false);
this.complete(true);
return;
} else {
if(this._onRepeat != null) this.callMethod(this._onRepeat,this._onRepeatParams);
if(this._reflect) this._reverse = !this._reverse;
this.startTime = currentTime;
this.timeOffset = this.startTime + this._delay;
if(this._repeat > 0) this._repeat--;
}
}
if(this.sendChange) this.change();
}
}
,__class__: motion_actuators_SimpleActuator
});
var motion_easing_Expo = function() { };
$hxClasses["motion.easing.Expo"] = motion_easing_Expo;
motion_easing_Expo.__name__ = ["motion","easing","Expo"];
motion_easing_Expo.__properties__ = {get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"}
motion_easing_Expo.get_easeIn = function() {
return new motion_easing_ExpoEaseIn();
};
motion_easing_Expo.get_easeInOut = function() {
return new motion_easing_ExpoEaseInOut();
};
motion_easing_Expo.get_easeOut = function() {
return new motion_easing_ExpoEaseOut();
};
var motion_easing_IEasing = function() { };
$hxClasses["motion.easing.IEasing"] = motion_easing_IEasing;
motion_easing_IEasing.__name__ = ["motion","easing","IEasing"];
motion_easing_IEasing.prototype = {
calculate: null
,ease: null
,__class__: motion_easing_IEasing
};
var motion_easing_ExpoEaseOut = function() {
};
$hxClasses["motion.easing.ExpoEaseOut"] = motion_easing_ExpoEaseOut;
motion_easing_ExpoEaseOut.__name__ = ["motion","easing","ExpoEaseOut"];
motion_easing_ExpoEaseOut.__interfaces__ = [motion_easing_IEasing];
motion_easing_ExpoEaseOut.prototype = {
calculate: function(k) {
if(k == 1) return 1; else return 1 - Math.pow(2,-10 * k);
}
,ease: function(t,b,c,d) {
if(t == d) return b + c; else return c * (1 - Math.pow(2,-10 * t / d)) + b;
}
,__class__: motion_easing_ExpoEaseOut
};
var motion_Actuate = function() { };
$hxClasses["motion.Actuate"] = motion_Actuate;
motion_Actuate.__name__ = ["motion","Actuate"];
motion_Actuate.apply = function(target,properties,customActuator) {
motion_Actuate.stop(target,properties);
if(customActuator == null) customActuator = motion_Actuate.defaultActuator;
var actuator = Type.createInstance(customActuator,[target,0,properties]);
actuator.apply();
return actuator;
};
motion_Actuate.effects = function(target,duration,overwrite) {
if(overwrite == null) overwrite = true;
return new motion__$Actuate_EffectsOptions(target,duration,overwrite);
};
motion_Actuate.getLibrary = function(target,allowCreation) {
if(allowCreation == null) allowCreation = true;
if(!(motion_Actuate.targetLibraries.h.__keys__[target.__id__] != null) && allowCreation) motion_Actuate.targetLibraries.set(target,[]);
return motion_Actuate.targetLibraries.h[target.__id__];
};
motion_Actuate.isActive = function() {
var result = false;
var $it0 = motion_Actuate.targetLibraries.iterator();
while( $it0.hasNext() ) {
var library = $it0.next();
result = true;
break;
}
return result;
};
motion_Actuate.motionPath = function(target,duration,properties,overwrite) {
if(overwrite == null) overwrite = true;
return motion_Actuate.tween(target,duration,properties,overwrite,motion_actuators_MotionPathActuator);
};
motion_Actuate.pause = function(target) {
if(js_Boot.__instanceof(target,motion_actuators_IGenericActuator)) {
var actuator = target;
actuator.pause();
} else {
var library = motion_Actuate.getLibrary(target,false);
if(library != null) {
var _g = 0;
while(_g < library.length) {
var actuator1 = library[_g];
++_g;
actuator1.pause();
}
}
}
};
motion_Actuate.pauseAll = function() {
var $it0 = motion_Actuate.targetLibraries.iterator();
while( $it0.hasNext() ) {
var library = $it0.next();
var _g = 0;
while(_g < library.length) {
var actuator = library[_g];
++_g;
actuator.pause();
}
}
};
motion_Actuate.reset = function() {
var $it0 = motion_Actuate.targetLibraries.iterator();
while( $it0.hasNext() ) {
var library = $it0.next();
var i = library.length - 1;
while(i >= 0) {
library[i].stop(null,false,false);
i--;
}
}
motion_Actuate.targetLibraries = new haxe_ds_ObjectMap();
};
motion_Actuate.resume = function(target) {
if(js_Boot.__instanceof(target,motion_actuators_IGenericActuator)) {
var actuator = target;
actuator.resume();
} else {
var library = motion_Actuate.getLibrary(target,false);
if(library != null) {
var _g = 0;
while(_g < library.length) {
var actuator1 = library[_g];
++_g;
actuator1.resume();
}
}
}
};
motion_Actuate.resumeAll = function() {
var $it0 = motion_Actuate.targetLibraries.iterator();
while( $it0.hasNext() ) {
var library = $it0.next();
var _g = 0;
while(_g < library.length) {
var actuator = library[_g];
++_g;
actuator.resume();
}
}
};
motion_Actuate.stop = function(target,properties,complete,sendEvent) {
if(sendEvent == null) sendEvent = true;
if(complete == null) complete = false;
if(target != null) {
if(js_Boot.__instanceof(target,motion_actuators_IGenericActuator)) {
var actuator = target;
actuator.stop(null,complete,sendEvent);
} else {
var library = motion_Actuate.getLibrary(target,false);
if(library != null) {
if(typeof(properties) == "string") {
var temp = { };
Reflect.setField(temp,properties,null);
properties = temp;
} else if((properties instanceof Array) && properties.__enum__ == null) {
var temp1 = { };
var _g = 0;
var _g1;
_g1 = js_Boot.__cast(properties , Array);
while(_g < _g1.length) {
var property = _g1[_g];
++_g;
Reflect.setField(temp1,property,null);
}
properties = temp1;
}
var i = library.length - 1;
while(i >= 0) {
library[i].stop(properties,complete,sendEvent);
i--;
}
}
}
}
};
motion_Actuate.timer = function(duration,customActuator) {
return motion_Actuate.tween(new motion__$Actuate_TweenTimer(0),duration,new motion__$Actuate_TweenTimer(1),false,customActuator);
};
motion_Actuate.transform = function(target,duration,overwrite) {
if(overwrite == null) overwrite = true;
if(duration == null) duration = 0;
return new motion__$Actuate_TransformOptions(target,duration,overwrite);
};
motion_Actuate.tween = function(target,duration,properties,overwrite,customActuator) {
if(overwrite == null) overwrite = true;
if(target != null) {
if(duration > 0) {
if(customActuator == null) customActuator = motion_Actuate.defaultActuator;
var actuator = Type.createInstance(customActuator,[target,duration,properties]);
var library = motion_Actuate.getLibrary(actuator.target);
if(overwrite) {
var i = library.length - 1;
while(i >= 0) {
library[i].stop(actuator.properties,false,false);
i--;
}
library = motion_Actuate.getLibrary(actuator.target);
}
library.push(actuator);
actuator.move();
return actuator;
} else return motion_Actuate.apply(target,properties,customActuator);
}
return null;
};
motion_Actuate.unload = function(actuator) {
var target = actuator.target;
if(motion_Actuate.targetLibraries.h.__keys__[target.__id__] != null) {
HxOverrides.remove(motion_Actuate.targetLibraries.h[target.__id__],actuator);
if(motion_Actuate.targetLibraries.h[target.__id__].length == 0) motion_Actuate.targetLibraries.remove(target);
}
};
motion_Actuate.update = function(target,duration,start,end,overwrite) {
if(overwrite == null) overwrite = true;
var properties = { start : start, end : end};
return motion_Actuate.tween(target,duration,properties,overwrite,motion_actuators_MethodActuator);
};
var motion__$Actuate_EffectsOptions = function(target,duration,overwrite) {
this.target = target;
this.duration = duration;
this.overwrite = overwrite;
};
$hxClasses["motion._Actuate.EffectsOptions"] = motion__$Actuate_EffectsOptions;
motion__$Actuate_EffectsOptions.__name__ = ["motion","_Actuate","EffectsOptions"];
motion__$Actuate_EffectsOptions.prototype = {
duration: null
,overwrite: null
,target: null
,filter: function(reference,properties) {
properties.filter = reference;
return motion_Actuate.tween(this.target,this.duration,properties,this.overwrite,motion_actuators_FilterActuator);
}
,__class__: motion__$Actuate_EffectsOptions
};
var motion__$Actuate_TransformOptions = function(target,duration,overwrite) {
this.target = target;
this.duration = duration;
this.overwrite = overwrite;
};
$hxClasses["motion._Actuate.TransformOptions"] = motion__$Actuate_TransformOptions;
motion__$Actuate_TransformOptions.__name__ = ["motion","_Actuate","TransformOptions"];
motion__$Actuate_TransformOptions.prototype = {
duration: null
,overwrite: null
,target: null
,color: function(value,strength,alpha) {
if(strength == null) strength = 1;
if(value == null) value = 0;
var properties = { colorValue : value, colorStrength : strength};
if(alpha != null) properties.colorAlpha = alpha;
return motion_Actuate.tween(this.target,this.duration,properties,this.overwrite,motion_actuators_TransformActuator);
}
,sound: function(volume,pan) {
var properties = { };
if(volume != null) properties.soundVolume = volume;
if(pan != null) properties.soundPan = pan;
return motion_Actuate.tween(this.target,this.duration,properties,this.overwrite,motion_actuators_TransformActuator);
}
,__class__: motion__$Actuate_TransformOptions
};
var motion__$Actuate_TweenTimer = function(progress) {
this.progress = progress;
};
$hxClasses["motion._Actuate.TweenTimer"] = motion__$Actuate_TweenTimer;
motion__$Actuate_TweenTimer.__name__ = ["motion","_Actuate","TweenTimer"];
motion__$Actuate_TweenTimer.prototype = {
progress: null
,__class__: motion__$Actuate_TweenTimer
};
var motion_MotionPath = function() {
this._x = new motion_ComponentPath();
this._y = new motion_ComponentPath();
this._rotation = null;
};
$hxClasses["motion.MotionPath"] = motion_MotionPath;
motion_MotionPath.__name__ = ["motion","MotionPath"];
motion_MotionPath.prototype = {
rotation: null
,x: null
,y: null
,_rotation: null
,_x: null
,_y: null
,bezier: function(x,y,controlX,controlY,strength) {
if(strength == null) strength = 1;
this._x.addPath(new motion_BezierPath(x,controlX,strength));
this._y.addPath(new motion_BezierPath(y,controlY,strength));
return this;
}
,line: function(x,y,strength) {
if(strength == null) strength = 1;
this._x.addPath(new motion_LinearPath(x,strength));
this._y.addPath(new motion_LinearPath(y,strength));
return this;
}
,get_rotation: function() {
if(this._rotation == null) this._rotation = new motion_RotationPath(this._x,this._y);
return this._rotation;
}
,get_x: function() {
return this._x;
}
,get_y: function() {
return this._y;
}
,__class__: motion_MotionPath
,__properties__: {get_y:"get_y",get_x:"get_x",get_rotation:"get_rotation"}
};
var motion_IComponentPath = function() { };
$hxClasses["motion.IComponentPath"] = motion_IComponentPath;
motion_IComponentPath.__name__ = ["motion","IComponentPath"];
motion_IComponentPath.prototype = {
get_end: null
,end: null
,start: null
,calculate: null
,__class__: motion_IComponentPath
,__properties__: {get_end:"get_end"}
};
var motion_ComponentPath = function() {
this.paths = [];
this.start = 0;
this.totalStrength = 0;
};
$hxClasses["motion.ComponentPath"] = motion_ComponentPath;
motion_ComponentPath.__name__ = ["motion","ComponentPath"];
motion_ComponentPath.__interfaces__ = [motion_IComponentPath];
motion_ComponentPath.prototype = {
start: null
,end: null
,paths: null
,totalStrength: null
,addPath: function(path) {
this.paths.push(path);
this.totalStrength += path.strength;
}
,calculate: function(k) {
if(this.paths.length == 1) return this.paths[0].calculate(this.start,k); else {
var ratio = k * this.totalStrength;
var lastEnd = this.start;
var _g = 0;
var _g1 = this.paths;
while(_g < _g1.length) {
var path = _g1[_g];
++_g;
if(ratio > path.strength) {
ratio -= path.strength;
lastEnd = path.end;
} else return path.calculate(lastEnd,ratio / path.strength);
}
}
return 0;
}
,get_end: function() {
if(this.paths.length > 0) {
var path = this.paths[this.paths.length - 1];
return path.end;
} else return this.start;
}
,__class__: motion_ComponentPath
,__properties__: {get_end:"get_end"}
};
var motion_BezierPath = function(end,control,strength) {
this.end = end;
this.control = control;
this.strength = strength;
};
$hxClasses["motion.BezierPath"] = motion_BezierPath;
motion_BezierPath.__name__ = ["motion","BezierPath"];
motion_BezierPath.prototype = {
control: null
,end: null
,strength: null
,calculate: function(start,k) {
return (1 - k) * (1 - k) * start + 2 * (1 - k) * k * this.control + k * k * this.end;
}
,__class__: motion_BezierPath
};
var motion_LinearPath = function(end,strength) {
motion_BezierPath.call(this,end,0,strength);
};
$hxClasses["motion.LinearPath"] = motion_LinearPath;
motion_LinearPath.__name__ = ["motion","LinearPath"];
motion_LinearPath.__super__ = motion_BezierPath;
motion_LinearPath.prototype = $extend(motion_BezierPath.prototype,{
calculate: function(start,k) {
return start + k * (this.end - start);
}
,__class__: motion_LinearPath
});
var motion_RotationPath = function(x,y) {
this.step = 0.01;
this._x = x;
this._y = y;
this.offset = 0;
this.start = this.calculate(0.0);
};
$hxClasses["motion.RotationPath"] = motion_RotationPath;
motion_RotationPath.__name__ = ["motion","RotationPath"];
motion_RotationPath.__interfaces__ = [motion_IComponentPath];
motion_RotationPath.prototype = {
end: null
,offset: null
,start: null
,step: null
,_x: null
,_y: null
,calculate: function(k) {
var dX = this._x.calculate(k) - this._x.calculate(k + this.step);
var dY = this._y.calculate(k) - this._y.calculate(k + this.step);
var angle = Math.atan2(dY,dX) * (180 / Math.PI);
angle = (angle + this.offset) % 360;
return angle;
}
,get_end: function() {
return this.calculate(1.0);
}
,__class__: motion_RotationPath
,__properties__: {get_end:"get_end"}
};
var motion_actuators_FilterActuator = function(target,duration,properties) {
this.filterIndex = -1;
motion_actuators_SimpleActuator.call(this,target,duration,properties);
if(js_Boot.__instanceof(properties.filter,Class)) {
this.filterClass = properties.filter;
if(target.get_filters().length == 0) target.set_filters([Type.createInstance(this.filterClass,[])]);
var _g = 0;
var _g1 = target.get_filters();
while(_g < _g1.length) {
var filter = _g1[_g];
++_g;
if(js_Boot.__instanceof(filter,this.filterClass)) this.filter = filter;
}
} else {
this.filterIndex = properties.filter;
this.filter = target.get_filters()[this.filterIndex];
}
};
$hxClasses["motion.actuators.FilterActuator"] = motion_actuators_FilterActuator;
motion_actuators_FilterActuator.__name__ = ["motion","actuators","FilterActuator"];
motion_actuators_FilterActuator.__super__ = motion_actuators_SimpleActuator;
motion_actuators_FilterActuator.prototype = $extend(motion_actuators_SimpleActuator.prototype,{
filter: null
,filterClass: null
,filterIndex: null
,apply: function() {
var _g = 0;
var _g1 = Reflect.fields(this.properties);
while(_g < _g1.length) {
var propertyName = _g1[_g];
++_g;
if(propertyName != "filter") Reflect.setField(this.filter,propertyName,Reflect.field(this.properties,propertyName));
}
var filters = this.getField(this.target,"filters");
Reflect.setField(filters,this.properties.filter,this.filter);
this.setField_openfl_display_DisplayObject(this.target,"filters",filters);
}
,initialize: function() {
var details;
var start;
var _g = 0;
var _g1 = Reflect.fields(this.properties);
while(_g < _g1.length) {
var propertyName = _g1[_g];
++_g;
if(propertyName != "filter") {
start = this.getField(this.filter,propertyName);
details = new motion_actuators_PropertyDetails(this.filter,propertyName,start,Reflect.field(this.properties,propertyName) - start);
this.propertyDetails.push(details);
}
}
this.detailsLength = this.propertyDetails.length;
this.initialized = true;
}
,update: function(currentTime) {
motion_actuators_SimpleActuator.prototype.update.call(this,currentTime);
var filters = this.target.get_filters();
if(this.filterIndex > -1) Reflect.setField(filters,this.properties.filter,this.filter); else {
var _g1 = 0;
var _g = filters.length;
while(_g1 < _g) {
var i = _g1++;
if(js_Boot.__instanceof(filters[i],this.filterClass)) filters[i] = this.filter;
}
}
this.setField_openfl_display_DisplayObject(this.target,"filters",filters);
}
,__class__: motion_actuators_FilterActuator
});
var motion_actuators_MethodActuator = function(target,duration,properties) {
this.currentParameters = [];
this.tweenProperties = { };
motion_actuators_SimpleActuator.call(this,target,duration,properties);
if(!Object.prototype.hasOwnProperty.call(properties,"start")) this.properties.start = [];
if(!Object.prototype.hasOwnProperty.call(properties,"end")) this.properties.end = this.properties.start;
var _g1 = 0;
var _g = this.properties.start.length;
while(_g1 < _g) {
var i = _g1++;
this.currentParameters.push(this.properties.start[i]);
}
};
$hxClasses["motion.actuators.MethodActuator"] = motion_actuators_MethodActuator;
motion_actuators_MethodActuator.__name__ = ["motion","actuators","MethodActuator"];
motion_actuators_MethodActuator.__super__ = motion_actuators_SimpleActuator;
motion_actuators_MethodActuator.prototype = $extend(motion_actuators_SimpleActuator.prototype,{
currentParameters: null
,tweenProperties: null
,apply: function() {
this.callMethod(this.target,this.properties.end);
}
,complete: function(sendEvent) {
if(sendEvent == null) sendEvent = true;
var _g1 = 0;
var _g = this.properties.start.length;
while(_g1 < _g) {
var i = _g1++;
this.currentParameters[i] = Reflect.field(this.tweenProperties,"param" + i);
}
this.callMethod(this.target,this.currentParameters);
motion_actuators_SimpleActuator.prototype.complete.call(this,sendEvent);
}
,initialize: function() {
var details;
var propertyName;
var start;
var _g1 = 0;
var _g = this.properties.start.length;
while(_g1 < _g) {
var i = _g1++;
propertyName = "param" + i;
start = this.properties.start[i];
this.tweenProperties[propertyName] = start;
if(typeof(start) == "number" || ((start | 0) === start)) {
details = new motion_actuators_PropertyDetails(this.tweenProperties,propertyName,start,this.properties.end[i] - start);
this.propertyDetails.push(details);
}
}
this.detailsLength = this.propertyDetails.length;
this.initialized = true;
}
,update: function(currentTime) {
motion_actuators_SimpleActuator.prototype.update.call(this,currentTime);
if(this.active && !this.paused) {
var _g1 = 0;
var _g = this.properties.start.length;
while(_g1 < _g) {
var i = _g1++;
this.currentParameters[i] = Reflect.field(this.tweenProperties,"param" + i);
}
this.callMethod(this.target,this.currentParameters);
}
}
,__class__: motion_actuators_MethodActuator
});
var motion_actuators_MotionPathActuator = function(target,duration,properties) {
motion_actuators_SimpleActuator.call(this,target,duration,properties);
};
$hxClasses["motion.actuators.MotionPathActuator"] = motion_actuators_MotionPathActuator;
motion_actuators_MotionPathActuator.__name__ = ["motion","actuators","MotionPathActuator"];
motion_actuators_MotionPathActuator.__super__ = motion_actuators_SimpleActuator;
motion_actuators_MotionPathActuator.prototype = $extend(motion_actuators_SimpleActuator.prototype,{
apply: function() {
var _g = 0;
var _g1 = Reflect.fields(this.properties);
while(_g < _g1.length) {
var propertyName = _g1[_g];
++_g;
if(Object.prototype.hasOwnProperty.call(this.target,propertyName)) Reflect.setField(this.target,propertyName,(js_Boot.__cast(Reflect.field(this.properties,propertyName) , motion_IComponentPath)).get_end()); else Reflect.setProperty(this.target,propertyName,(js_Boot.__cast(Reflect.field(this.properties,propertyName) , motion_IComponentPath)).get_end());
}
}
,initialize: function() {
var details;
var path;
var _g = 0;
var _g1 = Reflect.fields(this.properties);
while(_g < _g1.length) {
var propertyName = _g1[_g];
++_g;
path = js_Boot.__cast(Reflect.field(this.properties,propertyName) , motion_IComponentPath);
if(path != null) {
var isField = true;
if(Object.prototype.hasOwnProperty.call(this.target,propertyName)) path.start = Reflect.field(this.target,propertyName); else {
isField = false;
path.start = Reflect.getProperty(this.target,propertyName);
}
details = new motion_actuators_PropertyPathDetails(this.target,propertyName,path,isField);
this.propertyDetails.push(details);
}
}
this.detailsLength = this.propertyDetails.length;
this.initialized = true;
}
,update: function(currentTime) {
if(!this.paused) {
var details;
var easing;
var tweenPosition = (currentTime - this.timeOffset) / this.duration;
if(tweenPosition > 1) tweenPosition = 1;
if(!this.initialized) this.initialize();
if(!this.special) {
easing = this._ease.calculate(tweenPosition);
var _g = 0;
var _g1 = this.propertyDetails;
while(_g < _g1.length) {
var details1 = _g1[_g];
++_g;
if(details1.isField) Reflect.setField(details1.target,details1.propertyName,(js_Boot.__cast(details1 , motion_actuators_PropertyPathDetails)).path.calculate(easing)); else Reflect.setProperty(details1.target,details1.propertyName,(js_Boot.__cast(details1 , motion_actuators_PropertyPathDetails)).path.calculate(easing));
}
} else {
if(!this._reverse) easing = this._ease.calculate(tweenPosition); else easing = this._ease.calculate(1 - tweenPosition);
var endValue;
var _g2 = 0;
var _g11 = this.propertyDetails;
while(_g2 < _g11.length) {
var details2 = _g11[_g2];
++_g2;
if(!this._snapping) {
if(details2.isField) Reflect.setField(details2.target,details2.propertyName,(js_Boot.__cast(details2 , motion_actuators_PropertyPathDetails)).path.calculate(easing)); else Reflect.setProperty(details2.target,details2.propertyName,(js_Boot.__cast(details2 , motion_actuators_PropertyPathDetails)).path.calculate(easing));
} else if(details2.isField) Reflect.setField(details2.target,details2.propertyName,Math.round((js_Boot.__cast(details2 , motion_actuators_PropertyPathDetails)).path.calculate(easing))); else Reflect.setProperty(details2.target,details2.propertyName,Math.round((js_Boot.__cast(details2 , motion_actuators_PropertyPathDetails)).path.calculate(easing)));
}
}
if(tweenPosition == 1) {
if(this._repeat == 0) {
this.active = false;
if(this.toggleVisible && this.getField(this.target,"alpha") == 0) this.setField_motion_actuators_MotionPathActuator_T(this.target,"visible",false);
this.complete(true);
return;
} else {
if(this._onRepeat != null) this.callMethod(this._onRepeat,this._onRepeatParams);
if(this._reflect) this._reverse = !this._reverse;
this.startTime = currentTime;
this.timeOffset = this.startTime + this._delay;
if(this._repeat > 0) this._repeat--;
}
}
if(this.sendChange) this.change();
}
}
,__class__: motion_actuators_MotionPathActuator
});
var motion_actuators_PropertyDetails = function(target,propertyName,start,change,isField) {
if(isField == null) isField = true;
this.target = target;
this.propertyName = propertyName;
this.start = start;
this.change = change;
this.isField = isField;
};
$hxClasses["motion.actuators.PropertyDetails"] = motion_actuators_PropertyDetails;
motion_actuators_PropertyDetails.__name__ = ["motion","actuators","PropertyDetails"];
motion_actuators_PropertyDetails.prototype = {
change: null
,isField: null
,propertyName: null
,start: null
,target: null
,__class__: motion_actuators_PropertyDetails
};
var motion_actuators_PropertyPathDetails = function(target,propertyName,path,isField) {
if(isField == null) isField = true;
motion_actuators_PropertyDetails.call(this,target,propertyName,0,0,isField);
this.path = path;
};
$hxClasses["motion.actuators.PropertyPathDetails"] = motion_actuators_PropertyPathDetails;
motion_actuators_PropertyPathDetails.__name__ = ["motion","actuators","PropertyPathDetails"];
motion_actuators_PropertyPathDetails.__super__ = motion_actuators_PropertyDetails;
motion_actuators_PropertyPathDetails.prototype = $extend(motion_actuators_PropertyDetails.prototype,{
path: null
,__class__: motion_actuators_PropertyPathDetails
});
var motion_actuators_TransformActuator = function(target,duration,properties) {
motion_actuators_SimpleActuator.call(this,target,duration,properties);
};
$hxClasses["motion.actuators.TransformActuator"] = motion_actuators_TransformActuator;
motion_actuators_TransformActuator.__name__ = ["motion","actuators","TransformActuator"];
motion_actuators_TransformActuator.__super__ = motion_actuators_SimpleActuator;
motion_actuators_TransformActuator.prototype = $extend(motion_actuators_SimpleActuator.prototype,{
endColorTransform: null
,endSoundTransform: null
,tweenColorTransform: null
,tweenSoundTransform: null
,apply: function() {
this.initialize();
if(this.endColorTransform != null) {
var transform = this.getField(this.target,"transform");
this.setField_openfl_geom_Transform(transform,"colorTransform",this.endColorTransform);
}
if(this.endSoundTransform != null) this.setField_motion_actuators_TransformActuator_T(this.target,"soundTransform",this.endSoundTransform);
}
,initialize: function() {
if(Object.prototype.hasOwnProperty.call(this.properties,"colorValue") && js_Boot.__instanceof(this.target,openfl_display_DisplayObject)) this.initializeColor();
if(Object.prototype.hasOwnProperty.call(this.properties,"soundVolume") || Object.prototype.hasOwnProperty.call(this.properties,"soundPan")) this.initializeSound();
this.detailsLength = this.propertyDetails.length;
this.initialized = true;
}
,initializeColor: function() {
this.endColorTransform = new openfl_geom_ColorTransform();
var color = this.properties.colorValue;
var strength = this.properties.colorStrength;
if(strength < 1) {
var multiplier;
var offset;
if(strength < 0.5) {
multiplier = 1;
offset = strength * 2;
} else {
multiplier = 1 - (strength - 0.5) * 2;
offset = 1;
}
this.endColorTransform.redMultiplier = multiplier;
this.endColorTransform.greenMultiplier = multiplier;
this.endColorTransform.blueMultiplier = multiplier;
this.endColorTransform.redOffset = offset * (color >> 16 & 255);
this.endColorTransform.greenOffset = offset * (color >> 8 & 255);
this.endColorTransform.blueOffset = offset * (color & 255);
} else {
this.endColorTransform.redMultiplier = 0;
this.endColorTransform.greenMultiplier = 0;
this.endColorTransform.blueMultiplier = 0;
this.endColorTransform.redOffset = color >> 16 & 255;
this.endColorTransform.greenOffset = color >> 8 & 255;
this.endColorTransform.blueOffset = color & 255;
}
var propertyNames = ["redMultiplier","greenMultiplier","blueMultiplier","redOffset","greenOffset","blueOffset"];
if(Object.prototype.hasOwnProperty.call(this.properties,"colorAlpha")) {
this.endColorTransform.alphaMultiplier = this.properties.colorAlpha;
propertyNames.push("alphaMultiplier");
} else this.endColorTransform.alphaMultiplier = this.getField(this.target,"alpha");
var transform = this.getField(this.target,"transform");
var begin = this.getField(transform,"colorTransform");
this.tweenColorTransform = new openfl_geom_ColorTransform();
var details;
var start;
var _g = 0;
while(_g < propertyNames.length) {
var propertyName = propertyNames[_g];
++_g;
start = this.getField(begin,propertyName);
details = new motion_actuators_PropertyDetails(this.tweenColorTransform,propertyName,start,this.getField(this.endColorTransform,propertyName) - start);
this.propertyDetails.push(details);
}
}
,initializeSound: function() {
if(this.getField(this.target,"soundTransform") == null) this.setField_motion_actuators_TransformActuator_T(this.target,"soundTransform",new openfl_media_SoundTransform());
var start = this.getField(this.target,"soundTransform");
this.endSoundTransform = this.getField(this.target,"soundTransform");
this.tweenSoundTransform = new openfl_media_SoundTransform();
if(Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")) {
this.endSoundTransform.volume = this.properties.soundVolume;
this.propertyDetails.push(new motion_actuators_PropertyDetails(this.tweenSoundTransform,"volume",start.volume,this.endSoundTransform.volume - start.volume));
}
if(Object.prototype.hasOwnProperty.call(this.properties,"soundPan")) {
this.endSoundTransform.pan = this.properties.soundPan;
this.propertyDetails.push(new motion_actuators_PropertyDetails(this.tweenSoundTransform,"pan",start.pan,this.endSoundTransform.pan - start.pan));
}
}
,update: function(currentTime) {
motion_actuators_SimpleActuator.prototype.update.call(this,currentTime);
if(this.endColorTransform != null) {
var transform = this.getField(this.target,"transform");
this.setField_openfl_geom_Transform(transform,"colorTransform",this.tweenColorTransform);
}
if(this.endSoundTransform != null) this.setField_motion_actuators_TransformActuator_T(this.target,"soundTransform",this.tweenSoundTransform);
}
,__class__: motion_actuators_TransformActuator
});
var motion_easing_Elastic = function() { };
$hxClasses["motion.easing.Elastic"] = motion_easing_Elastic;
motion_easing_Elastic.__name__ = ["motion","easing","Elastic"];
motion_easing_Elastic.__properties__ = {get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"}
motion_easing_Elastic.get_easeIn = function() {
return new motion_easing_ElasticEaseIn(0.1,0.4);
};
motion_easing_Elastic.get_easeInOut = function() {
return new motion_easing_ElasticEaseInOut(0.1,0.4);
};
motion_easing_Elastic.get_easeOut = function() {
return new motion_easing_ElasticEaseOut(0.1,0.4);
};
var motion_easing_ElasticEaseIn = function(a,p) {
this.a = a;
this.p = p;
};
$hxClasses["motion.easing.ElasticEaseIn"] = motion_easing_ElasticEaseIn;
motion_easing_ElasticEaseIn.__name__ = ["motion","easing","ElasticEaseIn"];
motion_easing_ElasticEaseIn.__interfaces__ = [motion_easing_IEasing];
motion_easing_ElasticEaseIn.prototype = {
a: null
,p: null
,calculate: function(k) {
if(k == 0) return 0;
if(k == 1) return 1;
var s;
if(this.a < 1) {
this.a = 1;
s = this.p / 4;
} else s = this.p / (2 * Math.PI) * Math.asin(1 / this.a);
return -(this.a * Math.pow(2,10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / this.p));
}
,ease: function(t,b,c,d) {
if(t == 0) return b;
if((t /= d) == 1) return b + c;
var s;
if(this.a < Math.abs(c)) {
this.a = c;
s = this.p / 4;
} else s = this.p / (2 * Math.PI) * Math.asin(c / this.a);
return -(this.a * Math.pow(2,10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / this.p)) + b;
}
,__class__: motion_easing_ElasticEaseIn
};
var motion_easing_ElasticEaseInOut = function(a,p) {
this.a = a;
this.p = p;
};
$hxClasses["motion.easing.ElasticEaseInOut"] = motion_easing_ElasticEaseInOut;
motion_easing_ElasticEaseInOut.__name__ = ["motion","easing","ElasticEaseInOut"];
motion_easing_ElasticEaseInOut.__interfaces__ = [motion_easing_IEasing];
motion_easing_ElasticEaseInOut.prototype = {
a: null
,p: null
,calculate: function(k) {
if(k == 0) return 0;
if((k /= 0.5) == 2) return 1;
var p = 0.449999999999999956;
var a = 1;
var s = p / 4;
if(k < 1) return -0.5 * (Math.pow(2,10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p));
return Math.pow(2,-10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p) * 0.5 + 1;
}
,ease: function(t,b,c,d) {
if(t == 0) return b;
if((t /= d / 2) == 2) return b + c;
var s;
if(this.a < Math.abs(c)) {
this.a = c;
s = this.p / 4;
} else s = this.p / (2 * Math.PI) * Math.asin(c / this.a);
if(t < 1) return -0.5 * (this.a * Math.pow(2,10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / this.p)) + b;
return this.a * Math.pow(2,-10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / this.p) * 0.5 + c + b;
}
,__class__: motion_easing_ElasticEaseInOut
};
var motion_easing_ElasticEaseOut = function(a,p) {
this.a = a;
this.p = p;
};
$hxClasses["motion.easing.ElasticEaseOut"] = motion_easing_ElasticEaseOut;
motion_easing_ElasticEaseOut.__name__ = ["motion","easing","ElasticEaseOut"];
motion_easing_ElasticEaseOut.__interfaces__ = [motion_easing_IEasing];
motion_easing_ElasticEaseOut.prototype = {
a: null
,p: null
,calculate: function(k) {
if(k == 0) return 0;
if(k == 1) return 1;
var s;
if(this.a < 1) {
this.a = 1;
s = this.p / 4;
} else s = this.p / (2 * Math.PI) * Math.asin(1 / this.a);
return this.a * Math.pow(2,-10 * k) * Math.sin((k - s) * (2 * Math.PI) / this.p) + 1;
}
,ease: function(t,b,c,d) {
if(t == 0) return b;
if((t /= d) == 1) return b + c;
var s;
if(this.a < Math.abs(c)) {
this.a = c;
s = this.p / 4;
} else s = this.p / (2 * Math.PI) * Math.asin(c / this.a);
return this.a * Math.pow(2,-10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / this.p) + c + b;
}
,__class__: motion_easing_ElasticEaseOut
};
var motion_easing_ExpoEaseIn = function() {
};
$hxClasses["motion.easing.ExpoEaseIn"] = motion_easing_ExpoEaseIn;
motion_easing_ExpoEaseIn.__name__ = ["motion","easing","ExpoEaseIn"];
motion_easing_ExpoEaseIn.__interfaces__ = [motion_easing_IEasing];
motion_easing_ExpoEaseIn.prototype = {
calculate: function(k) {
if(k == 0) return 0; else return Math.pow(2,10 * (k - 1));
}
,ease: function(t,b,c,d) {
if(t == 0) return b; else return c * Math.pow(2,10 * (t / d - 1)) + b;
}
,__class__: motion_easing_ExpoEaseIn
};
var motion_easing_ExpoEaseInOut = function() {
};
$hxClasses["motion.easing.ExpoEaseInOut"] = motion_easing_ExpoEaseInOut;
motion_easing_ExpoEaseInOut.__name__ = ["motion","easing","ExpoEaseInOut"];
motion_easing_ExpoEaseInOut.__interfaces__ = [motion_easing_IEasing];
motion_easing_ExpoEaseInOut.prototype = {
calculate: function(k) {
if(k == 0) return 0;
if(k == 1) return 1;
if((k /= 0.5) < 1.0) return 0.5 * Math.pow(2,10 * (k - 1));
return 0.5 * (2 - Math.pow(2,-10 * --k));
}
,ease: function(t,b,c,d) {
if(t == 0) return b;
if(t == d) return b + c;
if((t /= d / 2.0) < 1.0) return c / 2 * Math.pow(2,10 * (t - 1)) + b;
return c / 2 * (2 - Math.pow(2,-10 * --t)) + b;
}
,__class__: motion_easing_ExpoEaseInOut
};
var motion_easing_Linear = function() { };
$hxClasses["motion.easing.Linear"] = motion_easing_Linear;
motion_easing_Linear.__name__ = ["motion","easing","Linear"];
motion_easing_Linear.__properties__ = {get_easeNone:"get_easeNone"}
motion_easing_Linear.get_easeNone = function() {
return new motion_easing_LinearEaseNone();
};
var motion_easing_LinearEaseNone = function() {
};
$hxClasses["motion.easing.LinearEaseNone"] = motion_easing_LinearEaseNone;
motion_easing_LinearEaseNone.__name__ = ["motion","easing","LinearEaseNone"];
motion_easing_LinearEaseNone.__interfaces__ = [motion_easing_IEasing];
motion_easing_LinearEaseNone.prototype = {
calculate: function(k) {
return k;
}
,ease: function(t,b,c,d) {
return c * t / d + b;
}
,__class__: motion_easing_LinearEaseNone
};
var msignal_Signal2 = function(type1,type2) {
msignal_Signal.call(this,[type1,type2]);
};
$hxClasses["msignal.Signal2"] = msignal_Signal2;
msignal_Signal2.__name__ = ["msignal","Signal2"];
msignal_Signal2.__super__ = msignal_Signal;
msignal_Signal2.prototype = $extend(msignal_Signal.prototype,{
dispatch: function(value1,value2) {
var slotsToProcess = this.slots;
while(slotsToProcess.nonEmpty) {
slotsToProcess.head.execute(value1,value2);
slotsToProcess = slotsToProcess.tail;
}
}
,createSlot: function(listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
return new msignal_Slot2(this,listener,once,priority);
}
,__class__: msignal_Signal2
});
var msignal_Slot = function(signal,listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
this.signal = signal;
this.set_listener(listener);
this.once = once;
this.priority = priority;
this.enabled = true;
};
$hxClasses["msignal.Slot"] = msignal_Slot;
msignal_Slot.__name__ = ["msignal","Slot"];
msignal_Slot.prototype = {
listener: null
,once: null
,priority: null
,enabled: null
,signal: null
,remove: function() {
this.signal.remove(this.listener);
}
,set_listener: function(value) {
return this.listener = value;
}
,__class__: msignal_Slot
,__properties__: {set_listener:"set_listener"}
};
var msignal_Slot0 = function(signal,listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
msignal_Slot.call(this,signal,listener,once,priority);
};
$hxClasses["msignal.Slot0"] = msignal_Slot0;
msignal_Slot0.__name__ = ["msignal","Slot0"];
msignal_Slot0.__super__ = msignal_Slot;
msignal_Slot0.prototype = $extend(msignal_Slot.prototype,{
execute: function() {
if(!this.enabled) return;
if(this.once) this.remove();
this.listener();
}
,__class__: msignal_Slot0
});
var msignal_Slot1 = function(signal,listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
msignal_Slot.call(this,signal,listener,once,priority);
};
$hxClasses["msignal.Slot1"] = msignal_Slot1;
msignal_Slot1.__name__ = ["msignal","Slot1"];
msignal_Slot1.__super__ = msignal_Slot;
msignal_Slot1.prototype = $extend(msignal_Slot.prototype,{
param: null
,execute: function(value1) {
if(!this.enabled) return;
if(this.once) this.remove();
if(this.param != null) value1 = this.param;
this.listener(value1);
}
,__class__: msignal_Slot1
});
var msignal_Slot2 = function(signal,listener,once,priority) {
if(priority == null) priority = 0;
if(once == null) once = false;
msignal_Slot.call(this,signal,listener,once,priority);
};
$hxClasses["msignal.Slot2"] = msignal_Slot2;
msignal_Slot2.__name__ = ["msignal","Slot2"];
msignal_Slot2.__super__ = msignal_Slot;
msignal_Slot2.prototype = $extend(msignal_Slot.prototype,{
param1: null
,param2: null
,execute: function(value1,value2) {
if(!this.enabled) return;
if(this.once) this.remove();
if(this.param1 != null) value1 = this.param1;
if(this.param2 != null) value2 = this.param2;
this.listener(value1,value2);
}
,__class__: msignal_Slot2
});
var oaktree_ext_commands_Commands = function() {
this._commands = new haxe_ds_StringMap();
};
$hxClasses["oaktree.ext.commands.Commands"] = oaktree_ext_commands_Commands;
oaktree_ext_commands_Commands.__name__ = ["oaktree","ext","commands","Commands"];
oaktree_ext_commands_Commands.prototype = {
_commands: null
,initialize: function(commands) {
var _g = 0;
while(_g < commands.length) {
var command = commands[_g];
++_g;
this._commands.set(command.event,command);
this.addCommand(command);
}
}
,addCommand: function(command) {
oaktree_OakTree.events.addEventListener(command.event,$bind(this,this.handleCommandEvent));
}
,removeCommand: function(command) {
oaktree_OakTree.events.removeEventListener(command.event,$bind(this,this.handleCommandEvent));
}
,handleCommandEvent: function(event) {
var command = this._commands.get(event.type);
var commandClass = command.command;
var commandInstance = Type.createEmptyInstance(commandClass);
commandInstance.execute(event);
commandInstance = null;
if(command.oneTime) {
this.removeCommand(command);
this._commands.remove(event.type);
}
}
,__class__: oaktree_ext_commands_Commands
};
var oaktree_core_events_Dispatcher = function() {
this.eventDispatcher = new openfl_events_EventDispatcher();
};
$hxClasses["oaktree.core.events.Dispatcher"] = oaktree_core_events_Dispatcher;
oaktree_core_events_Dispatcher.__name__ = ["oaktree","core","events","Dispatcher"];
oaktree_core_events_Dispatcher.prototype = {
eventDispatcher: null
,dispatchEventWith: function(type,data,bubbles) {
if(bubbles == null) bubbles = false;
this.eventDispatcher.dispatchEvent(new oaktree_core_events_GameEvent(type,data,bubbles));
}
,addEventListener: function(type,listener,useCapture,priority) {
if(priority == null) priority = 0;
if(useCapture == null) useCapture = false;
if(this.eventDispatcher.hasEventListener(type)) this.eventDispatcher.removeEventListener(type,listener);
this.eventDispatcher.addEventListener(type,listener,useCapture,priority);
}
,removeEventListener: function(type,listener) {
this.eventDispatcher.removeEventListener(type,listener);
}
,fire: function(type,data) {
this.dispatchEventWith(type,data);
}
,listen: function(type,listener) {
this.eventDispatcher.addEventListener(type,listener);
}
,unlisten: function(type,listener) {
this.eventDispatcher.removeEventListener(type,listener);
}
,__class__: oaktree_core_events_Dispatcher
};
var oaktree_OakTree = function() { };
$hxClasses["oaktree.OakTree"] = oaktree_OakTree;
oaktree_OakTree.__name__ = ["oaktree","OakTree"];
oaktree_OakTree.__properties__ = {get_fontName:"get_fontName",get_scenes:"get_scenes"}
oaktree_OakTree.init = function() {
if(oaktree_OakTree._isInitialized) {
haxe_Log.trace("OakTree already initialized",{ fileName : "OakTree.hx", lineNumber : 34, className : "oaktree.OakTree", methodName : "init"});
return;
}
oaktree_utils_Warehouse.store("oaktree-logo",openfl_utils_Assets.getBitmapData("core-assets/oaktree.png"));
oaktree_utils_Warehouse.store("dialog-closebutton",openfl_utils_Assets.getBitmapData("core-assets/Close.png"));
oaktree_utils_Warehouse.store("dialog-closebutton-disabled",openfl_utils_Assets.getBitmapData("core-assets/Close_disabled.png"));
oaktree_OakTree._isInitialized = true;
};
oaktree_OakTree.onEngineAddedToStage = function(pEngine,pStage) {
oaktree_OakTree.engine = pEngine;
oaktree_OakTree.stage = pStage;
};
oaktree_OakTree.get_fontName = function() {
return "_sans";
};
oaktree_OakTree.get_scenes = function() {
return oaktree_OakTree.engine.scenes;
};
var oaktree_core_Entity = function(pStandalone) {
if(pStandalone == null) pStandalone = false;
this.standalone = false;
this.parentEntity = null;
this._id = oaktree_core_Entity._idCounter + 1;
this._components = [];
this._entities = [];
this._entitiesToAdd = [];
this._entitiesToRemove = [];
this.set_standalone(pStandalone);
if(this.standalone) oaktree_OakTree.engine.entities.registerEntity(this);
};
$hxClasses["oaktree.core.Entity"] = oaktree_core_Entity;
oaktree_core_Entity.__name__ = ["oaktree","core","Entity"];
oaktree_core_Entity.__interfaces__ = [oaktree_core_IEntityContainer,oaktree_core_IEntity];
oaktree_core_Entity.prototype = {
_id: null
,handle: null
,scene: null
,parentEntity: null
,_components: null
,_entities: null
,_entitiesToAdd: null
,_entitiesToRemove: null
,dispose: function() {
this.removeEntitiesFromQueue();
this._entitiesToRemove = null;
this.addEntitiesFromQueue();
this._entitiesToAdd = null;
var _g = 0;
var _g1 = this._entities;
while(_g < _g1.length) {
var e = _g1[_g];
++_g;
e.dispose();
}
var _g2 = 0;
var _g11 = this._components;
while(_g2 < _g11.length) {
var c = _g11[_g2];
++_g2;
c.dispose();
}
this._components = null;
this.scene = null;
if(this.standalone) {
this.set_standalone(false);
oaktree_OakTree.engine.entities.unregisterEntity(this);
}
}
,getId: function() {
return this._id;
}
,onAddedToScene: function(pScene) {
this.scene = pScene;
var _g = 0;
var _g1 = this._components;
while(_g < _g1.length) {
var c = _g1[_g];
++_g;
c.onEntityAddedToScene(this.scene);
}
var _g2 = 0;
var _g11 = this._entities;
while(_g2 < _g11.length) {
var e = _g11[_g2];
++_g2;
e.onAddedToScene(this.scene);
}
}
,onRemovedFromScene: function() {
var _g = 0;
var _g1 = this._components;
while(_g < _g1.length) {
var c = _g1[_g];
++_g;
c.onEntityRemovedFromScene();
}
var _g2 = 0;
var _g11 = this._entities;
while(_g2 < _g11.length) {
var e = _g11[_g2];
++_g2;
e.onRemovedFromScene();
}
this.scene = null;
}
,addComponent: function(pComponent) {
this._components.push(pComponent);
this._components.sort($bind(this,this.sortOnPriority));
pComponent.onAddedToEntity(this);
if(this.scene != null) pComponent.onEntityAddedToScene(this.scene);
return pComponent;
}
,removeComponent: function(pComponent) {
if(this.scene != null) pComponent.onEntityRemovedFromScene();
this._components.slice(oaktree_utils_ArrayUtil.indexOf(this._components,pComponent),1);
pComponent.onRemovedFromEntity();
return pComponent;
}
,removeAllComponents: function() {
var _g = 0;
var _g1 = this._components;
while(_g < _g1.length) {
var c = _g1[_g];
++_g;
if(this.scene != null) c.onEntityRemovedFromScene();
c.onRemovedFromEntity();
}
this._components = [];
}
,sortOnPriority: function(a,b) {
return a.priority - b.priority;
}
,addEntity: function(pEntity) {
this._entitiesToAdd.push(pEntity);
return pEntity;
}
,removeEntity: function(pEntity) {
this._entitiesToRemove.push(pEntity);
return pEntity;
}
,update: function(pDT) {
var pos;
var c;
this.addEntitiesFromQueue();
pos = this._components.length;
while(--pos >= 0) {
c = this._components[pos];
if(c.enabled) c.update(pDT);
}
var _g = 0;
var _g1 = this._entities;
while(_g < _g1.length) {
var e = _g1[_g];
++_g;
e.update(pDT);
}
this.removeEntitiesFromQueue();
}
,internal_addEntity: function(pEntity) {
this._entities.push(pEntity);
if(this.scene != null) pEntity.onAddedToScene(this.scene);
}
,internal_removeEntity: function(pEntity) {
this._entities.splice(oaktree_utils_ArrayUtil.indexOf(this._entities,pEntity),1);
pEntity.onRemovedFromScene();
pEntity.dispose();
}
,addEntitiesFromQueue: function() {
var e;
if(this._entitiesToAdd.length > 0) {
var _g = 0;
var _g1 = this._entitiesToAdd;
while(_g < _g1.length) {
var e1 = _g1[_g];
++_g;
this.internal_addEntity(e1);
}
this._entitiesToAdd = [];
}
}
,removeEntitiesFromQueue: function() {
var pos = this._entitiesToRemove.length;
var e;
if(pos > 0) {
while(--pos >= 0) {
e = this._entitiesToRemove[pos];
this.internal_removeEntity(e);
}
this._entitiesToRemove = [];
}
}
,entities: null
,get_entities: function() {
return this._entities;
}
,id: null
,get_id: function() {
return this._id;
}
,standalone: null
,set_standalone: function(value) {
if(this.standalone != value) {
if(value) oaktree_OakTree.engine.entities.registerEntity(this); else oaktree_OakTree.engine.entities.unregisterEntity(this);
}
this.standalone = value;
return value;
}
,__class__: oaktree_core_Entity
,__properties__: {set_standalone:"set_standalone",get_id:"get_id",get_entities:"get_entities"}
};
var oaktree_core_EntityManager = function() {
this.entityList = new List();
};
$hxClasses["oaktree.core.EntityManager"] = oaktree_core_EntityManager;
oaktree_core_EntityManager.__name__ = ["oaktree","core","EntityManager"];
oaktree_core_EntityManager.prototype = {
entityList: null
,registerEntity: function(pEntity) {
this.entityList.add(pEntity);
}
,unregisterEntity: function(pEntity) {
this.entityList.remove(pEntity);
}
,update: function(pDelta) {
var _g_head = this.entityList.h;
var _g_val = null;
while(_g_head != null) {
var entity;
entity = (function($this) {
var $r;
_g_val = _g_head[0];
_g_head = _g_head[1];
$r = _g_val;
return $r;
}(this));
entity.update(pDelta);
}
}
,__class__: oaktree_core_EntityManager
};
var oaktree_core_JobScheduler = function(timePerUpdate) {
if(timePerUpdate == null) timePerUpdate = 8.33333333333333393;
this._now = 0;
this._spentTime = 0;
this.taskQueue = new List();
this._timePerUpdate = timePerUpdate;
};
$hxClasses["oaktree.core.JobScheduler"] = oaktree_core_JobScheduler;
oaktree_core_JobScheduler.__name__ = ["oaktree","core","JobScheduler"];
oaktree_core_JobScheduler.prototype = {
taskQueue: null
,_timePerUpdate: null
,_task: null
,_spentTime: null
,_now: null
,schedule: function(callback) {
this.taskQueue.add({ callback : callback});
}
,update: function() {
this._now = oaktree_OakTree.engine.get_time();
while(this.taskQueue.length > 0) {
this._task = this.taskQueue.pop();
this._task.callback();
if(oaktree_OakTree.engine.get_time() - this._now > this._timePerUpdate) break;
}
}
,__class__: oaktree_core_JobScheduler
};
var oaktree_core_Log = function() { };
$hxClasses["oaktree.core.Log"] = oaktree_core_Log;
oaktree_core_Log.__name__ = ["oaktree","core","Log"];
oaktree_core_Log.getLogContext = function(file) {
var _file = haxe_io_Path.withoutDirectory(file);
var _context = haxe_io_Path.withoutExtension(_file).toLowerCase();
var _spaces = oaktree_core_Log._get_spacing(_file);
return "" + _spaces + " / " + _context + " /";
};
oaktree_core_Log._get_spacing = function(_file) {
var _spaces = "";
var _trace_length = _file.length + 4;
var _diff = oaktree_core_Log._log_width - _trace_length;
if(_diff > 0) {
var _g = 0;
while(_g < _diff) {
var i = _g++;
_spaces += " ";
}
}
return _spaces;
};
var oaktree_core_FileType = $hxClasses["oaktree.core.FileType"] = { __ename__ : ["oaktree","core","FileType"], __constructs__ : ["AUTO","IMAGE","TEXT","BINARY","SOUND","FONT"] };
oaktree_core_FileType.AUTO = ["AUTO",0];
oaktree_core_FileType.AUTO.toString = $estr;
oaktree_core_FileType.AUTO.__enum__ = oaktree_core_FileType;
oaktree_core_FileType.IMAGE = ["IMAGE",1];
oaktree_core_FileType.IMAGE.toString = $estr;
oaktree_core_FileType.IMAGE.__enum__ = oaktree_core_FileType;
oaktree_core_FileType.TEXT = ["TEXT",2];
oaktree_core_FileType.TEXT.toString = $estr;
oaktree_core_FileType.TEXT.__enum__ = oaktree_core_FileType;
oaktree_core_FileType.BINARY = ["BINARY",3];
oaktree_core_FileType.BINARY.toString = $estr;
oaktree_core_FileType.BINARY.__enum__ = oaktree_core_FileType;
oaktree_core_FileType.SOUND = ["SOUND",4];
oaktree_core_FileType.SOUND.toString = $estr;
oaktree_core_FileType.SOUND.__enum__ = oaktree_core_FileType;
oaktree_core_FileType.FONT = ["FONT",5];
oaktree_core_FileType.FONT.toString = $estr;
oaktree_core_FileType.FONT.__enum__ = oaktree_core_FileType;
var oaktree_core_VOTypes = $hxClasses["oaktree.core.VOTypes"] = { __ename__ : ["oaktree","core","VOTypes"], __constructs__ : ["VT_Native","VT_Class","VT_Map","VT_Array","VT_Unknown"] };
oaktree_core_VOTypes.VT_Native = function(name) { var $x = ["VT_Native",0,name]; $x.__enum__ = oaktree_core_VOTypes; $x.toString = $estr; return $x; };
oaktree_core_VOTypes.VT_Class = function(name) { var $x = ["VT_Class",1,name]; $x.__enum__ = oaktree_core_VOTypes; $x.toString = $estr; return $x; };
oaktree_core_VOTypes.VT_Map = function(key,value) { var $x = ["VT_Map",2,key,value]; $x.__enum__ = oaktree_core_VOTypes; $x.toString = $estr; return $x; };
oaktree_core_VOTypes.VT_Array = function(value) { var $x = ["VT_Array",3,value]; $x.__enum__ = oaktree_core_VOTypes; $x.toString = $estr; return $x; };
oaktree_core_VOTypes.VT_Unknown = ["VT_Unknown",4];
oaktree_core_VOTypes.VT_Unknown.toString = $estr;
oaktree_core_VOTypes.VT_Unknown.__enum__ = oaktree_core_VOTypes;
var oaktree_core_components_Component = function() {
this.enabled = true;
this.priority = 0;
this.entity = null;
};
$hxClasses["oaktree.core.components.Component"] = oaktree_core_components_Component;
oaktree_core_components_Component.__name__ = ["oaktree","core","components","Component"];
oaktree_core_components_Component.prototype = {
entity: null
,priority: null
,enabled: null
,dispose: function() {
this.entity = null;
}
,onAddedToEntity: function(pEntity) {
this.entity = pEntity;
}
,onRemovedFromEntity: function() {
this.entity = null;
}
,onEntityAddedToScene: function(pScene) {
}
,onEntityRemovedFromScene: function() {
}
,update: function(pDT) {
}
,__class__: oaktree_core_components_Component
};
var oaktree_core_events_ConnectionEvent = function(type,data,bubbles,cancelable) {
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
oaktree_core_events_GameEvent.call(this,type,data,bubbles,cancelable);
};
$hxClasses["oaktree.core.events.ConnectionEvent"] = oaktree_core_events_ConnectionEvent;
oaktree_core_events_ConnectionEvent.__name__ = ["oaktree","core","events","ConnectionEvent"];
oaktree_core_events_ConnectionEvent.__super__ = oaktree_core_events_GameEvent;
oaktree_core_events_ConnectionEvent.prototype = $extend(oaktree_core_events_GameEvent.prototype,{
__class__: oaktree_core_events_ConnectionEvent
});
var oaktree_core_events_UserEvent = function(type,data,bubbles,cancelable) {
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
oaktree_core_events_GameEvent.call(this,type,data,bubbles,cancelable);
};
$hxClasses["oaktree.core.events.UserEvent"] = oaktree_core_events_UserEvent;
oaktree_core_events_UserEvent.__name__ = ["oaktree","core","events","UserEvent"];
oaktree_core_events_UserEvent.__super__ = oaktree_core_events_GameEvent;
oaktree_core_events_UserEvent.prototype = $extend(oaktree_core_events_GameEvent.prototype,{
__class__: oaktree_core_events_UserEvent
});
var oaktree_core_io_IO = function() { };
$hxClasses["oaktree.core.io.IO"] = oaktree_core_io_IO;
oaktree_core_io_IO.__name__ = ["oaktree","core","io","IO"];
oaktree_core_io_IO.addMapping = function(_ext,type) {
oaktree_core_io_IO._ftypeMapping.set(_ext,type);
};
oaktree_core_io_IO.getFileTypeFromExtension = function(_path) {
var parts = _path.split("?")[0].split(".");
var extension = "";
if(parts.length > 1) extension = parts[parts.length - 1];
switch(extension) {
case "png":case "jpg":case "bmp":
return oaktree_core_FileType.IMAGE;
case "xml":case "json":case "txt":
return oaktree_core_FileType.TEXT;
default:
if(oaktree_core_io_IO._ftypeMapping.exists(extension)) return oaktree_core_io_IO._ftypeMapping.get(extension);
return oaktree_core_FileType.BINARY;
}
return oaktree_core_FileType.BINARY;
};
oaktree_core_io_IO.data_load = function(_path,options) {
var defer = new promhx_deferred_DeferredPromise();
if(options == null) options = { };
if(options.filetype == null) options.filetype = oaktree_core_FileType.AUTO;
options.filetype;
var ftype;
if(options.filetype == oaktree_core_FileType.AUTO) ftype = oaktree_core_io_IO.getFileTypeFromExtension(_path); else ftype = options.filetype;
var loader;
switch(ftype[1]) {
case 1:
loader = new assets_manager_loaders_ImageLoader(_path);
break;
case 2:
loader = new assets_manager_loaders_TextLoader(_path);
break;
case 4:
loader = new assets_manager_loaders_SoundLoader(_path);
break;
default:
loader = new assets_manager_loaders_BinaryLoader(_path);
}
loader.addEventListener("complete",function(e) {
if(loader.status == assets_manager_misc_LoaderStatus.LOADED) defer.resolve(loader.data); else defer.handleError("" + Std.string(loader.status) + " - " + _path);
});
loader.start();
return defer.boundPromise;
};
oaktree_core_io_IO.data_flow = function(_info,_processor,_provider) {
if(_provider == null) _provider = oaktree_core_io_IO.default_provider;
var flowDefer = new promhx_Deferred();
_provider(_info).then(function(data) {
if(_processor != null) _processor(_info,data).then(function(processedData) {
flowDefer.resolve(processedData);
}).errorThen(function(e) {
flowDefer.handleError(e);
}); else flowDefer.resolve(data);
}).errorThen(function(e1) {
flowDefer.handleError(e1);
});
return flowDefer.promise();
};
oaktree_core_io_IO.default_provider = function(_id) {
return oaktree_core_io_IO.data_load(_id);
};
var oaktree_core_io_SaveSlotTarget = $hxClasses["oaktree.core.io.SaveSlotTarget"] = { __ename__ : ["oaktree","core","io","SaveSlotTarget"], __constructs__ : ["LOCAL_STORAGE","SHARED_OBJECT","CUSTOM"] };
oaktree_core_io_SaveSlotTarget.LOCAL_STORAGE = ["LOCAL_STORAGE",0];
oaktree_core_io_SaveSlotTarget.LOCAL_STORAGE.toString = $estr;
oaktree_core_io_SaveSlotTarget.LOCAL_STORAGE.__enum__ = oaktree_core_io_SaveSlotTarget;
oaktree_core_io_SaveSlotTarget.SHARED_OBJECT = ["SHARED_OBJECT",1];
oaktree_core_io_SaveSlotTarget.SHARED_OBJECT.toString = $estr;
oaktree_core_io_SaveSlotTarget.SHARED_OBJECT.__enum__ = oaktree_core_io_SaveSlotTarget;
oaktree_core_io_SaveSlotTarget.CUSTOM = function(id) { var $x = ["CUSTOM",2,id]; $x.__enum__ = oaktree_core_io_SaveSlotTarget; $x.toString = $estr; return $x; };
var oaktree_core_io_SaveSlot = function(pId,pTarget) {
this.data = "";
this._target = oaktree_core_io_SaveSlotTarget.LOCAL_STORAGE;
this.id = "_";
if(oaktree_core_io_SaveSlot._targetList == null) {
oaktree_core_io_SaveSlot._targetList = new haxe_ds_EnumValueMap();
var value = new oaktree_core_io_LocalStorageSaveSlot();
oaktree_core_io_SaveSlot._targetList.set(oaktree_core_io_SaveSlotTarget.LOCAL_STORAGE,value);
var value1 = new oaktree_core_io_SharedObjectSaveSlot();
oaktree_core_io_SaveSlot._targetList.set(oaktree_core_io_SaveSlotTarget.SHARED_OBJECT,value1);
}
if(pTarget == null) pTarget = oaktree_core_io_SaveSlotTarget.LOCAL_STORAGE;
this.id = pId;
this._target = pTarget;
};
$hxClasses["oaktree.core.io.SaveSlot"] = oaktree_core_io_SaveSlot;
oaktree_core_io_SaveSlot.__name__ = ["oaktree","core","io","SaveSlot"];
oaktree_core_io_SaveSlot.prototype = {
id: null
,_target: null
,data: null
,load: function() {
if(!oaktree_core_io_SaveSlot._targetList.exists(this._target)) {
haxe_Log.trace("Non existant SaveSlot target!",{ fileName : "SaveSlot.hx", lineNumber : 73, className : "oaktree.core.io.SaveSlot", methodName : "load"});
return "";
}
var t = oaktree_core_io_SaveSlot._targetList.get(this._target);
this.data = t.load(this.id);
return this.data;
}
,save: function() {
if(!oaktree_core_io_SaveSlot._targetList.exists(this._target)) {
haxe_Log.trace("Non existant SaveSlot target!",{ fileName : "SaveSlot.hx", lineNumber : 86, className : "oaktree.core.io.SaveSlot", methodName : "save"});
return false;
}
return oaktree_core_io_SaveSlot._targetList.get(this._target).save(this.id,this.data);
}
,__class__: oaktree_core_io_SaveSlot
};
var oaktree_core_io_ISlotTarget = function() { };
$hxClasses["oaktree.core.io.ISlotTarget"] = oaktree_core_io_ISlotTarget;
oaktree_core_io_ISlotTarget.__name__ = ["oaktree","core","io","ISlotTarget"];
oaktree_core_io_ISlotTarget.prototype = {
save: null
,load: null
,__class__: oaktree_core_io_ISlotTarget
};
var oaktree_core_io_LocalStorageSaveSlot = function() {
this._localStorageAvailable = false;
this._localStorageAvailable = js_Browser.getLocalStorage() != null;
};
$hxClasses["oaktree.core.io.LocalStorageSaveSlot"] = oaktree_core_io_LocalStorageSaveSlot;
oaktree_core_io_LocalStorageSaveSlot.__name__ = ["oaktree","core","io","LocalStorageSaveSlot"];
oaktree_core_io_LocalStorageSaveSlot.__interfaces__ = [oaktree_core_io_ISlotTarget];
oaktree_core_io_LocalStorageSaveSlot.prototype = {
_localStorageAvailable: null
,save: function(key,data) {
if(!this._localStorageAvailable) return false;
try {
js_Browser.getLocalStorage().setItem(key,data);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
return false;
}
return true;
}
,load: function(key) {
if(!this._localStorageAvailable) return "";
return js_Browser.getLocalStorage().getItem(key);
}
,__class__: oaktree_core_io_LocalStorageSaveSlot
};
var oaktree_core_io_SharedObjectSaveSlot = function() {
};
$hxClasses["oaktree.core.io.SharedObjectSaveSlot"] = oaktree_core_io_SharedObjectSaveSlot;
oaktree_core_io_SharedObjectSaveSlot.__name__ = ["oaktree","core","io","SharedObjectSaveSlot"];
oaktree_core_io_SharedObjectSaveSlot.__interfaces__ = [oaktree_core_io_ISlotTarget];
oaktree_core_io_SharedObjectSaveSlot.prototype = {
save: function(key,data) {
var _sharedObject = openfl_net_SharedObject.getLocal(key);
var flushStatus = null;
try {
_sharedObject.data.data = data;
flushStatus = _sharedObject.flush();
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
return false;
}
return true;
}
,load: function(key) {
var _sharedObject = openfl_net_SharedObject.getLocal(key);
if(_sharedObject != null && _sharedObject.data.data != null) return _sharedObject.data.data;
return "";
}
,__class__: oaktree_core_io_SharedObjectSaveSlot
};
var oaktree_core_io_KVSaveSlot = function(pId,pTarget) {
this._loaded = false;
this.saveOnSet = true;
this._map = new haxe_ds_StringMap();
oaktree_core_io_SaveSlot.call(this,pId,pTarget);
};
$hxClasses["oaktree.core.io.KVSaveSlot"] = oaktree_core_io_KVSaveSlot;
oaktree_core_io_KVSaveSlot.__name__ = ["oaktree","core","io","KVSaveSlot"];
oaktree_core_io_KVSaveSlot.__super__ = oaktree_core_io_SaveSlot;
oaktree_core_io_KVSaveSlot.prototype = $extend(oaktree_core_io_SaveSlot.prototype,{
_map: null
,saveOnSet: null
,_loaded: null
,set: function(key,value) {
this._map.set(key,value);
if(this.saveOnSet) this.save();
}
,get: function(key,pDefault) {
if(!this._loaded) this.load();
if(!this._map.exists(key)) return pDefault; else return this._map.get(key);
}
,save: function() {
this.data = haxe_Serializer.run(this._map);
return oaktree_core_io_SaveSlot.prototype.save.call(this);
}
,load: function() {
var result = false;
oaktree_core_io_SaveSlot.prototype.load.call(this);
try {
this._map = haxe_Unserializer.run(this.data);
result = true;
} catch( error ) {
haxe_CallStack.lastException = error;
if (error instanceof js__$Boot_HaxeError) error = error.val;
result = false;
null;
}
this._loaded = true;
return this.data;
}
,__class__: oaktree_core_io_KVSaveSlot
});
var oaktree_core_scene_SceneManager = function(container) {
this._dirty = true;
this._scenesCounter = 0;
this._container = container;
this._scenesList = [];
this._scenesToRemove = [];
this.onLateUpdate = new hxsignal_impl_Signal0();
};
$hxClasses["oaktree.core.scene.SceneManager"] = oaktree_core_scene_SceneManager;
oaktree_core_scene_SceneManager.__name__ = ["oaktree","core","scene","SceneManager"];
oaktree_core_scene_SceneManager.prototype = {
onLateUpdate: null
,_scenesCounter: null
,_container: null
,_scenesList: null
,_scenesToRemove: null
,_dirty: null
,add: function(scene,priority) {
if(priority == null) priority = 0;
var isScene = js_Boot.__instanceof(scene,oaktree_core_scene_IScene);
this._scenesCounter++;
this._scenesList.push({ scene : scene, priority : priority, insertOrder : this._scenesCounter, isIScene : isScene});
this._scenesList.sort($bind(this,this.sceneSortFunc));
this._dirty = true;
}
,remove: function(scene) {
var _g = 0;
var _g1 = this._scenesList;
while(_g < _g1.length) {
var s = _g1[_g];
++_g;
if(s.scene == scene) {
HxOverrides.remove(this._scenesList,s);
this._scenesToRemove.push(s);
return;
}
}
}
,reset: function() {
var _g = 0;
var _g1 = this._scenesList;
while(_g < _g1.length) {
var s = _g1[_g];
++_g;
this._scenesToRemove.push(s);
}
this._scenesList = null;
this._scenesList = [];
}
,update: function(delta) {
var _g = 0;
var _g1 = this._scenesList;
while(_g < _g1.length) {
var scene = _g1[_g];
++_g;
if(scene.isIScene) (js_Boot.__cast(scene.scene , oaktree_core_scene_IScene)).update(delta);
}
}
,lateUpdate: function() {
if(this._scenesToRemove.length > 0) {
var _g = 0;
var _g1 = this._scenesToRemove;
while(_g < _g1.length) {
var scene = _g1[_g];
++_g;
if(this._container.contains(scene.scene)) {
this._container.removeChild(scene.scene);
HxOverrides.remove(this._scenesToRemove,scene);
if(scene.isIScene) (js_Boot.__cast(scene.scene , oaktree_core_scene_IScene)).onRemoved();
}
}
}
if(this._dirty) {
var idx = 0;
var _g2 = 0;
var _g11 = this._scenesList;
while(_g2 < _g11.length) {
var scene1 = _g11[_g2];
++_g2;
if(!this._container.contains(scene1.scene)) {
this._container.addChild(scene1.scene);
if(scene1.isIScene) (js_Boot.__cast(scene1.scene , oaktree_core_scene_IScene)).onAdded();
}
if(this._container.getChildIndex(scene1.scene) != idx && idx < this._container.get_numChildren()) this._container.setChildIndex(scene1.scene,idx);
idx++;
if(scene1.isIScene) (js_Boot.__cast(scene1.scene , oaktree_core_scene_IScene)).lateUpdate();
}
this._dirty = false;
}
this.onLateUpdate.emit();
}
,get_container: function() {
return this._container;
}
,set_container: function(value) {
this._container = value;
return value;
}
,sceneSortFunc: function(a,b) {
if(a.priority == b.priority) return a.insertOrder - b.insertOrder;
return a.priority - b.priority;
}
,__class__: oaktree_core_scene_SceneManager
,__properties__: {set_container:"set_container",get_container:"get_container"}
};
var oaktree_display_CoreAssetType = $hxClasses["oaktree.display.CoreAssetType"] = { __ename__ : ["oaktree","display","CoreAssetType"], __constructs__ : ["UNKNOWN","SPRITE","TEXTURE_ATLAS","FRAMED_SPRITE","FONT"] };
oaktree_display_CoreAssetType.UNKNOWN = ["UNKNOWN",0];
oaktree_display_CoreAssetType.UNKNOWN.toString = $estr;
oaktree_display_CoreAssetType.UNKNOWN.__enum__ = oaktree_display_CoreAssetType;
oaktree_display_CoreAssetType.SPRITE = ["SPRITE",1];
oaktree_display_CoreAssetType.SPRITE.toString = $estr;
oaktree_display_CoreAssetType.SPRITE.__enum__ = oaktree_display_CoreAssetType;
oaktree_display_CoreAssetType.TEXTURE_ATLAS = ["TEXTURE_ATLAS",2];
oaktree_display_CoreAssetType.TEXTURE_ATLAS.toString = $estr;
oaktree_display_CoreAssetType.TEXTURE_ATLAS.__enum__ = oaktree_display_CoreAssetType;
oaktree_display_CoreAssetType.FRAMED_SPRITE = ["FRAMED_SPRITE",3];
oaktree_display_CoreAssetType.FRAMED_SPRITE.toString = $estr;
oaktree_display_CoreAssetType.FRAMED_SPRITE.__enum__ = oaktree_display_CoreAssetType;
oaktree_display_CoreAssetType.FONT = ["FONT",4];
oaktree_display_CoreAssetType.FONT.toString = $estr;
oaktree_display_CoreAssetType.FONT.__enum__ = oaktree_display_CoreAssetType;
var oaktree_display_AssetHolder = function(pId,pUrl,pType) {
this.assetType = oaktree_display_CoreAssetType.UNKNOWN;
this.loaded = false;
this.valid = false;
this.id = pId;
this.url = pUrl;
this.loaded = false;
if(pType == null && pUrl != null) pType = oaktree_core_io_IO.getFileTypeFromExtension(pUrl);
this.type = pType;
};
$hxClasses["oaktree.display.AssetHolder"] = oaktree_display_AssetHolder;
oaktree_display_AssetHolder.__name__ = ["oaktree","display","AssetHolder"];
oaktree_display_AssetHolder.prototype = {
valid: null
,loaded: null
,id: null
,url: null
,type: null
,assetType: null
,data: null
,storeData: function(data) {
oaktree_utils_Warehouse.store(this.id,data);
}
,load: function() {
var _g1 = this;
var defer = new promhx_deferred_DeferredPromise();
if(this.loaded) defer.resolve(this); else {
var self = this;
var resolved = false;
if(!resolved) {
var _g = this.type;
switch(_g[1]) {
case 5:
oaktree_utils_FontUtils.registerFontOnHTML(this.id,this.url);
break;
default:
var loadAsset = oaktree_core_io_IO.data_load(this.url);
loadAsset.then(function(data) {
_g1.storeData(data);
_g1.resolveLoad(defer);
self.loaded = true;
}).catchError(function(error) {
haxe_Log.trace(error,{ fileName : "AssetHolder.hx", lineNumber : 270, className : "oaktree.display.AssetHolder", methodName : "load"});
_g1.resolveLoad(defer);
});
}
}
}
return defer.boundPromise;
}
,resolveLoad: function(defer) {
defer.resolve(this);
}
,get_data: function() {
return this.getData();
}
,getData: function() {
if(!this.loaded) return null;
return oaktree_utils_Warehouse.fetch(this.id);
}
,dispose: function() {
oaktree_utils_Warehouse["delete"](this.id);
}
,__class__: oaktree_display_AssetHolder
,__properties__: {get_data:"get_data"}
};
var oaktree_display_NullAssetHolder = function(id) {
oaktree_display_AssetHolder.call(this,id,null);
};
$hxClasses["oaktree.display.NullAssetHolder"] = oaktree_display_NullAssetHolder;
oaktree_display_NullAssetHolder.__name__ = ["oaktree","display","NullAssetHolder"];
oaktree_display_NullAssetHolder.__super__ = oaktree_display_AssetHolder;
oaktree_display_NullAssetHolder.prototype = $extend(oaktree_display_AssetHolder.prototype,{
load: function() {
var defer = new promhx_deferred_DeferredPromise();
this.loaded = false;
defer.resolve(this);
return defer.boundPromise;
}
,__class__: oaktree_display_NullAssetHolder
});
var oaktree_display_FramedSpriteAssetHolder = function(id,url,frame,manager) {
if(url == null) url = "";
oaktree_display_AssetHolder.call(this,id,url);
this.assetType = oaktree_display_CoreAssetType.FRAMED_SPRITE;
this.type = oaktree_core_FileType.TEXT;
this.config = frame;
};
$hxClasses["oaktree.display.FramedSpriteAssetHolder"] = oaktree_display_FramedSpriteAssetHolder;
oaktree_display_FramedSpriteAssetHolder.__name__ = ["oaktree","display","FramedSpriteAssetHolder"];
oaktree_display_FramedSpriteAssetHolder.__super__ = oaktree_display_AssetHolder;
oaktree_display_FramedSpriteAssetHolder.prototype = $extend(oaktree_display_AssetHolder.prototype,{
config: null
,manager: null
,storeData: function(data) {
try {
this.config = new oaktree_objects_FramedSpriteVO(com_plist_Reader.read(data));
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
}
}
,resolveLoad: function(defer) {
var self = this;
oaktree_display_AssetHolderUtils.loadFramedSpriteResources(this.manager,this.config,function() {
defer.resolve(self);
});
}
,setFrame: function(frame) {
this.loaded = frame != null;
this.config = frame;
}
,getData: function() {
return this.config;
}
,dispose: function() {
this.config = null;
oaktree_display_AssetHolder.prototype.dispose.call(this);
}
,__class__: oaktree_display_FramedSpriteAssetHolder
});
var oaktree_display_FontAssetHolder = function(id,url) {
if(url == null) url = "";
oaktree_display_AssetHolder.call(this,id,url);
this.assetType = oaktree_display_CoreAssetType.FONT;
this.type = oaktree_core_FileType.FONT;
};
$hxClasses["oaktree.display.FontAssetHolder"] = oaktree_display_FontAssetHolder;
oaktree_display_FontAssetHolder.__name__ = ["oaktree","display","FontAssetHolder"];
oaktree_display_FontAssetHolder.__super__ = oaktree_display_AssetHolder;
oaktree_display_FontAssetHolder.prototype = $extend(oaktree_display_AssetHolder.prototype,{
storeData: function(data) {
try {
var font;
font = openfl_text_Font.fromBytes(data);
font.name = this.id;
var name = font.name;
oaktree_utils_Warehouse.store(this.id,font);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
}
}
,getData: function() {
return oaktree_utils_Warehouse.fetch(this.id);
}
,__class__: oaktree_display_FontAssetHolder
});
var oaktree_display_TextureAtlasAssetHolder = function(id,pAtlas) {
oaktree_display_AssetHolder.call(this,id,null);
this.assetType = oaktree_display_CoreAssetType.TEXTURE_ATLAS;
this.atlas = pAtlas;
};
$hxClasses["oaktree.display.TextureAtlasAssetHolder"] = oaktree_display_TextureAtlasAssetHolder;
oaktree_display_TextureAtlasAssetHolder.__name__ = ["oaktree","display","TextureAtlasAssetHolder"];
oaktree_display_TextureAtlasAssetHolder.__super__ = oaktree_display_AssetHolder;
oaktree_display_TextureAtlasAssetHolder.prototype = $extend(oaktree_display_AssetHolder.prototype,{
atlas: null
,load: function() {
var _g = this;
var defer = new promhx_deferred_DeferredPromise();
this.loaded = false;
this.atlas.load().then(function(_) {
_g.loaded = true;
defer.resolve(_g);
});
return defer.boundPromise;
}
,getData: function() {
return this.atlas;
}
,dispose: function() {
this.atlas = null;
oaktree_display_AssetHolder.prototype.dispose.call(this);
}
,__class__: oaktree_display_TextureAtlasAssetHolder
});
var oaktree_display_AssetHolderUtils = function() { };
$hxClasses["oaktree.display.AssetHolderUtils"] = oaktree_display_AssetHolderUtils;
oaktree_display_AssetHolderUtils.__name__ = ["oaktree","display","AssetHolderUtils"];
oaktree_display_AssetHolderUtils.loadFramedSpriteResources = function(manager,pConfig,pOnReady) {
var resources = [];
pConfig.getResourceList(resources);
var promoAssets = [];
var _g = 0;
while(_g < resources.length) {
var resource = resources[_g];
++_g;
var tempAsset;
if(!resource.isAtlas && resource.spriteName != null) {
tempAsset = manager.getAsset(resource.spriteName);
promoAssets.push(tempAsset.load());
}
if(resource.atlasName != null) {
tempAsset = manager.getAsset(oaktree_display_AssetHolderUtils.removeExtension(resource.atlasName));
promoAssets.push(tempAsset.load());
}
}
var gotPromoAssets = promhx_Promise.whenAll(promoAssets);
gotPromoAssets.then(function(_) {
if(pOnReady != null) pOnReady();
return true;
}).catchError(function(error) {
null;
});
};
oaktree_display_AssetHolderUtils.removeExtension = function(filename) {
var regex = new EReg("[.](png|jpg|gif|plist|xml)$","g");
return regex.replace(filename,"");
};
var oaktree_display_AssetsManager = function(atlasList) {
this._initialized = false;
this.onInit = new hxsignal_impl_Signal0();
this.initialize(atlasList);
};
$hxClasses["oaktree.display.AssetsManager"] = oaktree_display_AssetsManager;
oaktree_display_AssetsManager.__name__ = ["oaktree","display","AssetsManager"];
oaktree_display_AssetsManager.prototype = {
onInit: null
,initialized: null
,_initialized: null
,_textureAtlas: null
,_assetHolder: null
,initialize: function(atlasList) {
var _g = this;
this._textureAtlas = new haxe_ds_StringMap();
this._assetHolder = new haxe_ds_StringMap();
var loadList = [];
if(atlasList != null) {
var $it0 = $iterator(atlasList)();
while( $it0.hasNext() ) {
var setup = $it0.next();
loadList.push(oaktree_core_io_IO.data_flow(setup,$bind(this,this.processTextureAtlas),$bind(this,this.loadTextureAtlas)));
}
}
if(loadList.length > 0) promhx_Promise.whenAll(loadList).then(function(_) {
_g.postInit();
return true;
}).catchError(function(e) {
_g.postInit();
return false;
}); else this.postInit();
}
,postInit: function() {
this._initialized = true;
this.onInit.emit();
}
,loadTextureAtlas: function(info) {
var defer = new promhx_deferred_DeferredPromise();
var imgName = StringTools.replace(info.src,".json",".png");
imgName = StringTools.replace(imgName,".xml",".png");
if(openfl_utils_Assets.exists(info.src) && openfl_utils_Assets.exists(imgName)) {
var textureBitmap = openfl_utils_Assets.getBitmapData(imgName);
var textureConfig = openfl_utils_Assets.getText(info.src);
defer.resolve({ config : textureConfig, image : textureBitmap});
} else defer.handleError("Failed to load " + info.src + "/" + imgName + ": assets aren't loaded");
return defer.boundPromise;
}
,processTextureAtlas: function(info,data) {
var defer = new promhx_deferred_DeferredPromise();
var atlas = new oaktree_display_TextureAtlas(oaktree_display_Texture.fromBitmapData(data.image));
if(info.src.indexOf(".json") != -1) atlas.parseAtlasJSON(data.config); else if(info.src.indexOf(".xml") != -1) atlas.parseAtlasXml(Xml.parse(data.config)); else {
defer.handleError("Failed to load " + info.src + ": unknown format");
return defer.boundPromise;
}
this._textureAtlas.set(info.id,atlas);
defer.resolve(atlas);
return defer.boundPromise;
}
,getTexture: function(name,pAtlasName) {
if(pAtlasName == null) pAtlasName = "";
if(pAtlasName == "") {
var $it0 = this._textureAtlas.iterator();
while( $it0.hasNext() ) {
var atlas = $it0.next();
var texture = atlas.getTexture(name);
if(texture != null) return texture;
}
} else if(this._textureAtlas.exists(pAtlasName)) return this._textureAtlas.get(pAtlasName).getTexture(name);
return null;
}
,getAtlas: function(name) {
if(this._textureAtlas.exists(name)) return this._textureAtlas.get(name);
return null;
}
,registerExternalAtlas: function(id,textureUrl,metadataUrl) {
var value = new oaktree_display_TextureAtlas(null,textureUrl,metadataUrl);
this._textureAtlas.set(id,value);
var value1 = new oaktree_display_TextureAtlasAssetHolder(id,this._textureAtlas.get(id));
this._assetHolder.set(id,value1);
}
,registerAsset: function(id,assetUrl,type) {
id = oaktree_display_AssetsManager.webRegex.replace(id,"");
if(type != null) switch(type[1]) {
case 3:
var tx = new oaktree_display_FramedSpriteAssetHolder(id,assetUrl,null,this);
this._assetHolder.set(id,tx);
break;
case 2:
var tx1 = new oaktree_display_TextureAtlasAssetHolder(id);
tx1.atlas = this.getAtlas(id);
this._assetHolder.set(id,tx1);
break;
case 4:
if(!StringTools.endsWith(assetUrl,".ttf")) return;
var tx2 = new oaktree_display_FontAssetHolder(id,assetUrl);
this._assetHolder.set(id,tx2);
tx2.load();
break;
default:
var value = new oaktree_display_AssetHolder(id,assetUrl);
this._assetHolder.set(id,value);
} else {
var value = new oaktree_display_AssetHolder(id,assetUrl);
this._assetHolder.set(id,value);
}
}
,unregisterAsset: function(id) {
if(!this._assetHolder.exists(id)) return false;
this._assetHolder.get(id).dispose();
this._assetHolder.remove(id);
return true;
}
,getAsset: function(id) {
if(this._assetHolder.exists(id)) return this._assetHolder.get(id);
return new oaktree_display_NullAssetHolder(id);
}
,getFramedSprite: function(id) {
if(this._assetHolder.exists(id) && this._assetHolder.get(id).assetType == oaktree_display_CoreAssetType.FRAMED_SPRITE) return this._assetHolder.get(id);
return null;
}
,getFont: function(id) {
if(this._assetHolder.exists(id) && this._assetHolder.get(id).assetType == oaktree_display_CoreAssetType.FONT) return this._assetHolder.get(id);
return null;
}
,getFramedSpriteFromAssetName: function(name) {
var $it0 = this._assetHolder.keys();
while( $it0.hasNext() ) {
var assetId = $it0.next();
var asset = this._assetHolder.get(assetId);
if(asset.assetType == oaktree_display_CoreAssetType.FRAMED_SPRITE && asset.loaded) {
var frameName;
frameName = (js_Boot.__cast(asset.get_data() , oaktree_objects_FramedSpriteVO)).imageFrameName;
if(frameName == name) return asset;
}
}
return null;
}
,get_initialized: function() {
return this._initialized;
}
,__class__: oaktree_display_AssetsManager
,__properties__: {get_initialized:"get_initialized"}
};
var oaktree_display_Texture = function() {
this.scale = 1.0;
};
$hxClasses["oaktree.display.Texture"] = oaktree_display_Texture;
oaktree_display_Texture.__name__ = ["oaktree","display","Texture"];
oaktree_display_Texture.fromBitmapData = function(data,scale) {
if(scale == null) scale = 1;
var texture = oaktree_display_Texture.empty(Math.floor(data.width / scale),Math.floor(data.height / scale),scale);
texture.get_base().uploadBitmapData(data);
return texture;
};
oaktree_display_Texture.fromTexture = function(texture,region,frame,rotated) {
if(rotated == null) rotated = false;
return new oaktree_display_SubTexture(texture,region,frame,rotated,false);
};
oaktree_display_Texture.empty = function(width,height,scale) {
if(scale == null) scale = 1;
var nativeTexture;
var origWidth = Math.floor(width * scale);
var origHeight = Math.floor(height * scale);
nativeTexture = new openfl_display_BitmapData(origWidth,origHeight,true,0);
return new oaktree_display_BaseTexture(nativeTexture,origWidth,origHeight);
};
oaktree_display_Texture.prototype = {
width: null
,height: null
,base: null
,bitmapData: null
,frame: null
,scale: null
,dispose: function() {
}
,get_width: function() {
return 0;
}
,get_height: function() {
return 0;
}
,get_frame: function() {
return null;
}
,get_base: function() {
return null;
}
,get_bitmapData: function() {
return this.get_base().get_bitmapData();
}
,asBitmap: function() {
return new openfl_display_Bitmap(this.get_bitmapData());
}
,__class__: oaktree_display_Texture
,__properties__: {get_frame:"get_frame",get_bitmapData:"get_bitmapData",get_base:"get_base",get_height:"get_height",get_width:"get_width"}
};
var openfl_geom_Point = function(x,y) {
if(y == null) y = 0;
if(x == null) x = 0;
this.x = x;
this.y = y;
};
$hxClasses["openfl.geom.Point"] = openfl_geom_Point;
openfl_geom_Point.__name__ = ["openfl","geom","Point"];
openfl_geom_Point.distance = function(pt1,pt2) {
var dx = pt1.x - pt2.x;
var dy = pt1.y - pt2.y;
return Math.sqrt(dx * dx + dy * dy);
};
openfl_geom_Point.interpolate = function(pt1,pt2,f) {
return new openfl_geom_Point(pt2.x + f * (pt1.x - pt2.x),pt2.y + f * (pt1.y - pt2.y));
};
openfl_geom_Point.polar = function(len,angle) {
return new openfl_geom_Point(len * Math.cos(angle),len * Math.sin(angle));
};
openfl_geom_Point.prototype = {
x: null
,y: null
,add: function(v) {
return new openfl_geom_Point(v.x + this.x,v.y + this.y);
}
,clone: function() {
return new openfl_geom_Point(this.x,this.y);
}
,copyFrom: function(sourcePoint) {
this.x = sourcePoint.x;
this.y = sourcePoint.y;
}
,equals: function(toCompare) {
return toCompare != null && toCompare.x == this.x && toCompare.y == this.y;
}
,normalize: function(thickness) {
if(this.x == 0 && this.y == 0) return; else {
var norm = thickness / Math.sqrt(this.x * this.x + this.y * this.y);
this.x *= norm;
this.y *= norm;
}
}
,offset: function(dx,dy) {
this.x += dx;
this.y += dy;
}
,setTo: function(xa,ya) {
this.x = xa;
this.y = ya;
}
,subtract: function(v) {
return new openfl_geom_Point(this.x - v.x,this.y - v.y);
}
,toString: function() {
return "(x=" + this.x + ", y=" + this.y + ")";
}
,__toLimeVector2: function() {
if(openfl_geom_Point.__limeVector2 == null) openfl_geom_Point.__limeVector2 = new lime_math_Vector2();
openfl_geom_Point.__limeVector2.setTo(this.x,this.y);
return openfl_geom_Point.__limeVector2;
}
,get_length: function() {
return Math.sqrt(this.x * this.x + this.y * this.y);
}
,__class__: openfl_geom_Point
,__properties__: {get_length:"get_length"}
};
var oaktree_display_BaseTexture = function(data,width,height) {
oaktree_display_Texture.call(this);
this._data = data;
this._width = width;
this._height = height;
};
$hxClasses["oaktree.display.BaseTexture"] = oaktree_display_BaseTexture;
oaktree_display_BaseTexture.__name__ = ["oaktree","display","BaseTexture"];
oaktree_display_BaseTexture.__super__ = oaktree_display_Texture;
oaktree_display_BaseTexture.prototype = $extend(oaktree_display_Texture.prototype,{
_data: null
,_width: null
,_height: null
,uploadBitmapData: function(data) {
var potData;
if(data.width != this.get_width() || data.height != this.get_height()) {
potData = new openfl_display_BitmapData(this.get_width(),this.get_height(),true,0);
potData.copyPixels(data,data.rect,oaktree_display_BaseTexture.sOrigin);
data = potData;
}
this._data.copyPixels(data,data.rect,oaktree_display_BaseTexture.sOrigin);
}
,get_width: function() {
return this._width;
}
,get_height: function() {
return this._height;
}
,get_base: function() {
return this;
}
,get_bitmapData: function() {
return this._data;
}
,__class__: oaktree_display_BaseTexture
});
var oaktree_display_GUIInstances = function() {
};
$hxClasses["oaktree.display.GUIInstances"] = oaktree_display_GUIInstances;
oaktree_display_GUIInstances.__name__ = ["oaktree","display","GUIInstances"];
oaktree_display_GUIInstances.add = function(id,instance) {
var value = instance;
oaktree_display_GUIInstances.instances.set(id,value);
};
oaktree_display_GUIInstances.get = function(id) {
return oaktree_display_GUIInstances.instances.get(id);
};
oaktree_display_GUIInstances.remove = function(id) {
oaktree_display_GUIInstances.instances.remove(id);
};
oaktree_display_GUIInstances.prototype = {
__class__: oaktree_display_GUIInstances
};
var oaktree_display_RemoteAsset = function() {
};
$hxClasses["oaktree.display.RemoteAsset"] = oaktree_display_RemoteAsset;
oaktree_display_RemoteAsset.__name__ = ["oaktree","display","RemoteAsset"];
oaktree_display_RemoteAsset.prototype = {
id: null
,loader: null
,data: null
,defer: null
,__class__: oaktree_display_RemoteAsset
};
var oaktree_display_RemoteAssetLibrary = function() {
this.bitmapAssets = new haxe_ds_StringMap();
};
$hxClasses["oaktree.display.RemoteAssetLibrary"] = oaktree_display_RemoteAssetLibrary;
oaktree_display_RemoteAssetLibrary.__name__ = ["oaktree","display","RemoteAssetLibrary"];
oaktree_display_RemoteAssetLibrary.prototype = {
bitmapAssets: null
,exists: function(id,type) {
if(type == "IMAGE") return this.bitmapAssets.exists(id);
return false;
}
,loadBitmap: function(id,url) {
var _g = this;
var cacheEntry = new oaktree_display_RemoteAsset();
cacheEntry.id = id;
var defer = new promhx_deferred_DeferredPromise();
var loader = new assets_manager_loaders_ImageLoader(url);
cacheEntry.loader = loader;
loader.addEventListener("complete",function(e) {
if(loader.status == assets_manager_misc_LoaderStatus.LOADED) {
cacheEntry.data = loader.data;
_g.bitmapAssets.set(id,cacheEntry);
defer.resolve(loader.data);
} else defer.boundPromise.reject(loader.status);
});
loader.start();
cacheEntry.defer = defer;
return defer.boundPromise;
}
,getBitmapData: function(id) {
if(this.exists(id,"IMAGE")) {
var entry = this.bitmapAssets.get(id);
return entry.defer.boundPromise;
}
return null;
}
,__class__: oaktree_display_RemoteAssetLibrary
};
var openfl_geom_Matrix = function(a,b,c,d,tx,ty) {
if(ty == null) ty = 0;
if(tx == null) tx = 0;
if(d == null) d = 1;
if(c == null) c = 0;
if(b == null) b = 0;
if(a == null) a = 1;
this.a = a;
this.b = b;
this.c = c;
this.d = d;
this.tx = tx;
this.ty = ty;
};
$hxClasses["openfl.geom.Matrix"] = openfl_geom_Matrix;
openfl_geom_Matrix.__name__ = ["openfl","geom","Matrix"];
openfl_geom_Matrix.prototype = {
a: null
,b: null
,c: null
,d: null
,tx: null
,ty: null
,__array: null
,clone: function() {
return new openfl_geom_Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty);
}
,concat: function(m) {
var a1 = this.a * m.a + this.b * m.c;
this.b = this.a * m.b + this.b * m.d;
this.a = a1;
var c1 = this.c * m.a + this.d * m.c;
this.d = this.c * m.b + this.d * m.d;
this.c = c1;
var tx1 = this.tx * m.a + this.ty * m.c + m.tx;
this.ty = this.tx * m.b + this.ty * m.d + m.ty;
this.tx = tx1;
}
,copyColumnFrom: function(column,vector3D) {
if(column > 2) throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)"); else if(column == 0) {
this.a = vector3D.x;
this.c = vector3D.y;
} else if(column == 1) {
this.b = vector3D.x;
this.d = vector3D.y;
} else {
this.tx = vector3D.x;
this.ty = vector3D.y;
}
}
,copyColumnTo: function(column,vector3D) {
if(column > 2) throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)"); else if(column == 0) {
vector3D.x = this.a;
vector3D.y = this.c;
vector3D.z = 0;
} else if(column == 1) {
vector3D.x = this.b;
vector3D.y = this.d;
vector3D.z = 0;
} else {
vector3D.x = this.tx;
vector3D.y = this.ty;
vector3D.z = 1;
}
}
,copyFrom: function(sourceMatrix) {
this.a = sourceMatrix.a;
this.b = sourceMatrix.b;
this.c = sourceMatrix.c;
this.d = sourceMatrix.d;
this.tx = sourceMatrix.tx;
this.ty = sourceMatrix.ty;
}
,copyRowFrom: function(row,vector3D) {
if(row > 2) throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)"); else if(row == 0) {
this.a = vector3D.x;
this.c = vector3D.y;
} else if(row == 1) {
this.b = vector3D.x;
this.d = vector3D.y;
} else {
this.tx = vector3D.x;
this.ty = vector3D.y;
}
}
,copyRowTo: function(row,vector3D) {
if(row > 2) throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)"); else if(row == 0) {
vector3D.x = this.a;
vector3D.y = this.b;
vector3D.z = this.tx;
} else if(row == 1) {
vector3D.x = this.c;
vector3D.y = this.d;
vector3D.z = this.ty;
} else vector3D.setTo(0,0,1);
}
,createBox: function(scaleX,scaleY,rotation,tx,ty) {
if(ty == null) ty = 0;
if(tx == null) tx = 0;
if(rotation == null) rotation = 0;
if(rotation != 0) {
var cos = Math.cos(rotation);
var sin = Math.sin(rotation);
this.a = cos * scaleX;
this.b = sin * scaleY;
this.c = -sin * scaleX;
this.d = cos * scaleY;
} else {
this.a = scaleX;
this.b = 0;
this.c = 0;
this.d = scaleY;
}
this.tx = tx;
this.ty = ty;
}
,createGradientBox: function(width,height,rotation,tx,ty) {
if(ty == null) ty = 0;
if(tx == null) tx = 0;
if(rotation == null) rotation = 0;
this.a = width / 1638.4;
this.d = height / 1638.4;
if(rotation != 0) {
var cos = Math.cos(rotation);
var sin = Math.sin(rotation);
this.b = sin * this.d;
this.c = -sin * this.a;
this.a *= cos;
this.d *= cos;
} else {
this.b = 0;
this.c = 0;
}
this.tx = tx + width / 2;
this.ty = ty + height / 2;
}
,deltaTransformPoint: function(point) {
return new openfl_geom_Point(point.x * this.a + point.y * this.c,point.x * this.b + point.y * this.d);
}
,equals: function(matrix) {
return matrix != null && this.tx == matrix.tx && this.ty == matrix.ty && this.a == matrix.a && this.b == matrix.b && this.c == matrix.c && this.d == matrix.d;
}
,identity: function() {
this.a = 1;
this.b = 0;
this.c = 0;
this.d = 1;
this.tx = 0;
this.ty = 0;
}
,invert: function() {
var norm = this.a * this.d - this.b * this.c;
if(norm == 0) {
this.a = this.b = this.c = this.d = 0;
this.tx = -this.tx;
this.ty = -this.ty;
} else {
norm = 1.0 / norm;
var a1 = this.d * norm;
this.d = this.a * norm;
this.a = a1;
this.b *= -norm;
this.c *= -norm;
var tx1 = -this.a * this.tx - this.c * this.ty;
this.ty = -this.b * this.tx - this.d * this.ty;
this.tx = tx1;
}
return this;
}
,rotate: function(theta) {
var cos = Math.cos(theta);
var sin = Math.sin(theta);
var a1 = this.a * cos - this.b * sin;
this.b = this.a * sin + this.b * cos;
this.a = a1;
var c1 = this.c * cos - this.d * sin;
this.d = this.c * sin + this.d * cos;
this.c = c1;
var tx1 = this.tx * cos - this.ty * sin;
this.ty = this.tx * sin + this.ty * cos;
this.tx = tx1;
}
,scale: function(sx,sy) {
this.a *= sx;
this.b *= sy;
this.c *= sx;
this.d *= sy;
this.tx *= sx;
this.ty *= sy;
}
,setRotation: function(theta,scale) {
if(scale == null) scale = 1;
this.a = Math.cos(theta) * scale;
this.c = Math.sin(theta) * scale;
this.b = -this.c;
this.d = this.a;
}
,setTo: function(a,b,c,d,tx,ty) {
this.a = a;
this.b = b;
this.c = c;
this.d = d;
this.tx = tx;
this.ty = ty;
}
,to3DString: function(roundPixels) {
if(roundPixels == null) roundPixels = false;
if(roundPixels) return "matrix3d(" + this.a + ", " + this.b + ", 0, 0, " + this.c + ", " + this.d + ", 0, 0, 0, 0, 1, 0, " + (this.tx | 0) + ", " + (this.ty | 0) + ", 0, 1)"; else return "matrix3d(" + this.a + ", " + this.b + ", 0, 0, " + this.c + ", " + this.d + ", 0, 0, 0, 0, 1, 0, " + this.tx + ", " + this.ty + ", 0, 1)";
}
,toMozString: function() {
return "matrix(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + "px, " + this.ty + "px)";
}
,toString: function() {
return "matrix(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + ", " + this.ty + ")";
}
,transformPoint: function(pos) {
return new openfl_geom_Point(pos.x * this.a + pos.y * this.c + this.tx,pos.x * this.b + pos.y * this.d + this.ty);
}
,translate: function(dx,dy) {
this.tx += dx;
this.ty += dy;
}
,toArray: function(transpose) {
if(transpose == null) transpose = false;
if(this.__array == null) {
var this1;
this1 = new Float32Array(9);
this.__array = this1;
}
if(transpose) {
this.__array[0] = this.a;
this.__array[1] = this.b;
this.__array[2] = 0;
this.__array[3] = this.c;
this.__array[4] = this.d;
this.__array[5] = 0;
this.__array[6] = this.tx;
this.__array[7] = this.ty;
this.__array[8] = 1;
} else {
this.__array[0] = this.a;
this.__array[1] = this.c;
this.__array[2] = this.tx;
this.__array[3] = this.b;
this.__array[4] = this.d;
this.__array[5] = this.ty;
this.__array[6] = 0;
this.__array[7] = 0;
this.__array[8] = 1;
}
return this.__array;
}
,__cleanValues: function() {
this.a = Math.round(this.a * 1000) / 1000;
this.b = Math.round(this.b * 1000) / 1000;
this.c = Math.round(this.c * 1000) / 1000;
this.d = Math.round(this.d * 1000) / 1000;
this.tx = Math.round(this.tx * 10) / 10;
this.ty = Math.round(this.ty * 10) / 10;
}
,__toMatrix3: function() {
openfl_geom_Matrix.__matrix3.setTo(this.a,this.b,this.c,this.d,this.tx,this.ty);
return openfl_geom_Matrix.__matrix3;
}
,__transformInversePoint: function(point) {
var norm = this.a * this.d - this.b * this.c;
if(norm == 0) {
point.x = -this.tx;
point.y = -this.ty;
} else {
var px = 1.0 / norm * (this.c * (this.ty - point.y) + this.d * (point.x - this.tx));
point.y = 1.0 / norm * (this.a * (point.y - this.ty) + this.b * (this.tx - point.x));
point.x = px;
}
}
,__transformInverseX: function(px,py) {
var norm = this.a * this.d - this.b * this.c;
if(norm == 0) return -this.tx; else return 1.0 / norm * (this.c * (this.ty - py) + this.d * (px - this.tx));
}
,__transformInverseY: function(px,py) {
var norm = this.a * this.d - this.b * this.c;
if(norm == 0) return -this.ty; else return 1.0 / norm * (this.a * (py - this.ty) + this.b * (this.tx - px));
}
,__transformPoint: function(point) {
var px = point.x;
var py = point.y;
point.x = px * this.a + py * this.c + this.tx;
point.y = px * this.b + py * this.d + this.ty;
}
,__transformX: function(px,py) {
return px * this.a + py * this.c + this.tx;
}
,__transformY: function(px,py) {
return px * this.b + py * this.d + this.ty;
}
,__translateTransformed: function(px,py) {
this.tx = px * this.a + py * this.c + this.tx;
this.ty = px * this.b + py * this.d + this.ty;
}
,__class__: openfl_geom_Matrix
};
var oaktree_display_SubTexture = function(parentTexture,region,frame,rotated,ownsParent) {
if(ownsParent == null) ownsParent = false;
if(rotated == null) rotated = false;
if(region == null) region = new openfl_geom_Rectangle(0,0,parentTexture.get_width(),parentTexture.get_height());
this._parent = parentTexture;
this._ownsParent = ownsParent;
this._rotated = rotated;
this._width = Math.floor(this._rotated?region.height:region.width);
this._height = Math.floor(this._rotated?region.width:region.height);
if(frame != null) this._frame = frame.clone(); else this._frame = new openfl_geom_Rectangle(0,0,this._width,this._height);
this._transformationMatrix = new openfl_geom_Matrix();
if(rotated) {
this._transformationMatrix.translate(0,-1);
this._transformationMatrix.rotate(Math.PI / 2.0);
}
this._transformationMatrix.translate(-this._frame.x,-this._frame.y);
var tmpData = new openfl_display_BitmapData(this._width,this._height,true,0);
tmpData.copyPixels(parentTexture.get_base().get_bitmapData(),region,oaktree_display_SubTexture._tTexCoords);
var tdata = new openfl_display_BitmapData(Math.floor(this._frame.width),Math.floor(this._frame.height),true,0);
tdata.draw(tmpData,this._transformationMatrix);
tmpData.dispose();
oaktree_display_BaseTexture.call(this,tdata,tdata.width,tdata.height);
};
$hxClasses["oaktree.display.SubTexture"] = oaktree_display_SubTexture;
oaktree_display_SubTexture.__name__ = ["oaktree","display","SubTexture"];
oaktree_display_SubTexture.__super__ = oaktree_display_BaseTexture;
oaktree_display_SubTexture.prototype = $extend(oaktree_display_BaseTexture.prototype,{
_parent: null
,_ownsParent: null
,_frame: null
,_rotated: null
,_transformationMatrix: null
,dispose: function() {
if(this._ownsParent) this._parent.dispose();
oaktree_display_BaseTexture.prototype.dispose.call(this);
}
,get_frame: function() {
return this._frame;
}
,__class__: oaktree_display_SubTexture
});
var oaktree_display_TextureAtlas = function(texture,textureFileUrl,metaFileUrl) {
if(metaFileUrl == null) metaFileUrl = "";
if(textureFileUrl == null) textureFileUrl = "";
this._loaded = false;
this._loading = false;
this._textureInfos = new haxe_ds_StringMap();
this._texture = texture;
if(textureFileUrl != "" && metaFileUrl != "") {
this._textureFile = textureFileUrl;
this._metaFile = metaFileUrl;
}
};
$hxClasses["oaktree.display.TextureAtlas"] = oaktree_display_TextureAtlas;
oaktree_display_TextureAtlas.__name__ = ["oaktree","display","TextureAtlas"];
oaktree_display_TextureAtlas.parseBool = function(value) {
if(value == null) return false;
return value.toLowerCase() == "true";
};
oaktree_display_TextureAtlas.prototype = {
_loading: null
,_loaded: null
,loaded: null
,get_loaded: function() {
return this._loaded;
}
,mainTexture: null
,get_mainTexture: function() {
return this._texture;
}
,textures: null
,get_textures: function() {
return this._textureInfos;
}
,_texture: null
,_textureInfos: null
,_textureNames: null
,_textureFile: null
,_metaFile: null
,dispose: function() {
if(this._texture != null) this._texture.dispose();
}
,parseAtlasJSON: function(data) {
if(this._texture == null) return false;
var scale = this._texture.scale;
var structuredJson = new haxe_format_JsonParser(data).parseRec();
var frames = [];
var _g = 0;
var _g1 = structuredJson.frames;
while(_g < _g1.length) {
var frame = _g1[_g];
++_g;
var name = frame.filename;
var x = frame.frame.x / scale;
var y = frame.frame.y / scale;
var width = frame.sourceSize.w / scale;
var height = frame.sourceSize.h / scale;
var frameX = frame.frame.x / scale;
var frameY = frame.frame.y / scale;
var frameWidth = frame.frame.w / scale;
var frameHeight = frame.frame.h / scale;
var rotated = frame.rotated;
var region = new openfl_geom_Rectangle(x,y,width,height);
var frame1;
if(frameWidth > 0 && frameHeight > 0) frame1 = new openfl_geom_Rectangle(frameX,frameY,frameWidth,frameHeight); else frame1 = null;
this.addRegion(name,region,frame1,rotated);
}
this._loaded = true;
return true;
}
,parseAtlasXml: function(data) {
if(this._texture == null) return false;
var scale = this._texture.scale;
var $it0 = data.firstElement().elements();
while( $it0.hasNext() ) {
var subTexture = $it0.next();
var name = subTexture.get("name");
var x = Std.parseFloat(subTexture.get("x")) / scale;
var y = Std.parseFloat(subTexture.get("y")) / scale;
var width = Std.parseFloat(subTexture.get("width")) / scale;
var height = Std.parseFloat(subTexture.get("height")) / scale;
var frameX = Std.parseFloat(subTexture.get("frameX")) / scale;
var frameY = Std.parseFloat(subTexture.get("frameY")) / scale;
var frameWidth = Std.parseFloat(subTexture.get("frameWidth")) / scale;
var frameHeight = Std.parseFloat(subTexture.get("frameHeight")) / scale;
var rotated = oaktree_display_TextureAtlas.parseBool(subTexture.get("rotated"));
var region = new openfl_geom_Rectangle(x,y,width,height);
var frame;
if(frameWidth > 0 && frameHeight > 0) frame = new openfl_geom_Rectangle(frameX,frameY,frameWidth,frameHeight); else frame = null;
this.addRegion(name,region,frame,rotated);
}
this._loaded = true;
return true;
}
,_loadPromise: null
,getLoadPromise: function() {
if(this._loadPromise == null) this._loadPromise = new promhx_deferred_DeferredPromise();
return this._loadPromise;
}
,clearLoadPromise: function() {
this._loading = false;
if(this._loadPromise == null) this._loadPromise = null;
}
,load: function() {
var _g = this;
var defer = this.getLoadPromise();
if(this._loaded) {
if(!defer._resolved) defer.resolve(this);
} else if(!this._loading) {
this._loading = true;
var gotMetaFile = oaktree_display_TextureUtils.downloadAtlasDescriptionFile(this._metaFile);
var gotTextureFile = oaktree_display_TextureUtils.downloadAtlasImageFile(this._textureFile);
var gotFiles;
var varargf = function(f) {
var ret = new promhx_Promise();
var arr = [gotMetaFile,gotTextureFile];
var p = new promhx_Promise();
promhx_base_AsyncBase.linkAll(arr,p);
p._update.push({ async : ret, linkf : function(x) {
ret.handleResolve(f(arr[0]._val,arr[1]._val));
}});
return ret;
};
gotFiles = { then : varargf};
gotFiles.then(function(metadata,textureData) {
if(textureData == null || metadata == null) {
defer.handleError("TextureAtlas is invalid");
return false;
}
_g._texture = oaktree_display_Texture.fromBitmapData(textureData);
var xmlData = null;
var jsonData = null;
try {
xmlData = Xml.parse(metadata);
} catch( xmlError ) {
haxe_CallStack.lastException = xmlError;
if (xmlError instanceof js__$Boot_HaxeError) xmlError = xmlError.val;
try {
jsonData = new haxe_format_JsonParser(metadata).parseRec();
} catch( jsonError ) {
haxe_CallStack.lastException = jsonError;
if (jsonError instanceof js__$Boot_HaxeError) jsonError = jsonError.val;
null;
}
}
var success = false;
if(xmlData != null) success = _g.parseAtlasXml(xmlData); else if(jsonData != null) success = _g.parseAtlasJSON(metadata);
if(!success) {
defer.handleError("Bad texture Atlas: " + _g._metaFile);
_g.clearLoadPromise();
return false;
}
defer.resolve(_g);
_g.clearLoadPromise();
return true;
});
}
return defer.boundPromise;
}
,get: function(name) {
return this.getTexture(name);
}
,getTexture: function(name) {
if(this._textureInfos.exists(name)) {
var info = this._textureInfos.get(name);
return oaktree_display_Texture.fromTexture(this._texture,info.region,info.frame,info.rotated);
}
return null;
}
,hasTexture: function(name) {
return this._textureInfos.exists(name);
}
,getTextureList: function() {
var result = [];
var $it0 = this._textureInfos.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
result.push(key);
}
return result;
}
,addRegion: function(name,region,frame,rotated) {
if(rotated == null) rotated = false;
this._textureInfos.set(name,{ region : region, frame : frame, rotated : rotated, name : name});
}
,remoteRegion: function(name) {
this._textureInfos.remove(name);
}
,__class__: oaktree_display_TextureAtlas
,__properties__: {get_textures:"get_textures",get_mainTexture:"get_mainTexture"}
};
var oaktree_display_TextureUtils = function() {
};
$hxClasses["oaktree.display.TextureUtils"] = oaktree_display_TextureUtils;
oaktree_display_TextureUtils.__name__ = ["oaktree","display","TextureUtils"];
oaktree_display_TextureUtils.downloadAtlasDescriptionFile = function(url) {
var defer = new promhx_deferred_DeferredPromise();
var textLoader = new assets_manager_loaders_TextLoader(url);
textLoader.addEventListener("complete",function(data) {
defer.resolve(textLoader.data);
});
textLoader.start();
return defer.boundPromise;
};
oaktree_display_TextureUtils.downloadAtlasImageFile = function(url) {
var defer = new promhx_deferred_DeferredPromise();
var imageLoader = new assets_manager_loaders_ImageLoader(url);
imageLoader.addEventListener("complete",function(e) {
defer.resolve(imageLoader.data);
});
imageLoader.start();
return defer.boundPromise;
};
oaktree_display_TextureUtils.prototype = {
__class__: oaktree_display_TextureUtils
};
var oaktree_events_StateEvent = function(type,state,enabled,bubbles,cancelable) {
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.state = state;
this.enabled = enabled;
};
$hxClasses["oaktree.events.StateEvent"] = oaktree_events_StateEvent;
oaktree_events_StateEvent.__name__ = ["oaktree","events","StateEvent"];
oaktree_events_StateEvent.__super__ = openfl_events_Event;
oaktree_events_StateEvent.prototype = $extend(openfl_events_Event.prototype,{
state: null
,enabled: null
,__class__: oaktree_events_StateEvent
});
var oaktree_ext_input_Input = function() {
this._total = 256;
this._lookup = new haxe_ds_StringMap();
this._map = [];
var _g1 = 0;
var _g = this._total;
while(_g1 < _g) {
var i = _g1++;
this._map[i] = null;
}
};
$hxClasses["oaktree.ext.input.Input"] = oaktree_ext_input_Input;
oaktree_ext_input_Input.__name__ = ["oaktree","ext","input","Input"];
oaktree_ext_input_Input.prototype = {
_lookup: null
,_map: null
,_total: null
,Update: function() {
var i = 0;
while(i < this._total) {
var o = this._map[i];
i++;
if(o == null) continue;
if(o.get_Last() == -1 && o.get_Current() == -1) o.set_Current(0); else if(o.get_Last() == 2 && o.get_Current() == 2) o.set_Current(1);
o.set_Last(o.get_Current());
}
}
,Reset: function() {
var i = 0;
while(i < this._total) {
var o = this._map[i];
i++;
if(o == null) continue;
Reflect.setField(this,o.get_Name(),false);
o.set_Current(0);
o.set_Last(0);
}
}
,Pressed: function(key) {
return Reflect.field(this,key);
}
,JustPressed: function(key) {
return this._map[this._lookup.get(key)].get_Current() == 2;
}
,JustReleased: function(key) {
return this._map[this._lookup.get(key)].get_Current() == -1;
}
,GetKeyCode: function(pName) {
return this._lookup.get(pName);
}
,Any: function() {
var i = 0;
while(i < this._total) {
var o = this._map[i];
i++;
if(o != null && o.get_Current() > 0) return true;
}
return false;
}
,AddKey: function(freshName,freshCode) {
this._lookup.set(freshName,freshCode);
this._map[freshCode] = new oaktree_ext_input_Key(freshName,0,0);
}
,Destroy: function() {
this._lookup = null;
this._map = null;
}
,__class__: oaktree_ext_input_Input
};
var oaktree_ext_input_Key = function(pName,pCurrent,pLast) {
this._keyName = pName;
this._current = pCurrent;
this._last = pLast;
};
$hxClasses["oaktree.ext.input.Key"] = oaktree_ext_input_Key;
oaktree_ext_input_Key.__name__ = ["oaktree","ext","input","Key"];
oaktree_ext_input_Key.prototype = {
_keyName: null
,_current: null
,_last: null
,Name: null
,get_Name: function() {
return this._keyName;
}
,get_Current: function() {
return this._current;
}
,set_Current: function(pCurrent) {
this._current = pCurrent;
return this._current;
}
,get_Last: function() {
return this._last;
}
,set_Last: function(pLast) {
this._last = pLast;
return this._last;
}
,__class__: oaktree_ext_input_Key
,__properties__: {set_Last:"set_Last",get_Last:"get_Last",set_Current:"set_Current",get_Current:"get_Current",get_Name:"get_Name"}
};
var oaktree_ext_input_Keyboard = function() {
oaktree_ext_input_Input.call(this);
var _g = 65;
while(_g < 91) {
var letter = _g++;
this.AddKey(String.fromCharCode(letter),letter);
}
this.AddKey("ZERO",48);
this.AddKey("ONE",49);
this.AddKey("TWO",50);
this.AddKey("THREE",51);
this.AddKey("FOUR",52);
this.AddKey("FIVE",53);
this.AddKey("SIX",54);
this.AddKey("SEVEN",55);
this.AddKey("EIGHT",56);
this.AddKey("NINE",57);
this.AddKey("PAGEUP",33);
this.AddKey("PAGEDOWN",34);
this.AddKey("HOME",36);
this.AddKey("END",35);
this.AddKey("INSERT",45);
this.AddKey("ESCAPE",27);
this.AddKey("MINUS",189);
this.AddKey("PLUS",187);
this.AddKey("DELETE",46);
this.AddKey("BACKSPACE",8);
this.AddKey("LBRACKET",219);
this.AddKey("RBRACKET",221);
this.AddKey("BACKSLASH",220);
this.AddKey("CAPSLOCK",20);
this.AddKey("SEMICOLON",186);
this.AddKey("QUOTE",222);
this.AddKey("ENTER",13);
this.AddKey("SHIFT",16);
this.AddKey("COMMA",188);
this.AddKey("PERIOD",190);
this.AddKey("SLASH",191);
this.AddKey("CONTROL",17);
this.AddKey("ALT",18);
this.AddKey("SPACE",32);
this.AddKey("UP",38);
this.AddKey("DOWN",40);
this.AddKey("LEFT",37);
this.AddKey("RIGHT",39);
this.AddKey("TAB",9);
};
$hxClasses["oaktree.ext.input.Keyboard"] = oaktree_ext_input_Keyboard;
oaktree_ext_input_Keyboard.__name__ = ["oaktree","ext","input","Keyboard"];
oaktree_ext_input_Keyboard.__super__ = oaktree_ext_input_Input;
oaktree_ext_input_Keyboard.prototype = $extend(oaktree_ext_input_Input.prototype,{
ESCAPE: null
,ONE: null
,TWO: null
,THREE: null
,FOUR: null
,FIVE: null
,SIX: null
,SEVEN: null
,EIGHT: null
,NINE: null
,ZERO: null
,PAGEUP: null
,PAGEDOWN: null
,HOME: null
,END: null
,INSERT: null
,MINUS: null
,PLUS: null
,DELETE: null
,BACKSPACE: null
,TAB: null
,Q: null
,W: null
,E: null
,R: null
,T: null
,Y: null
,U: null
,I: null
,O: null
,P: null
,LBRACKET: null
,RBRACKET: null
,BACKSLASH: null
,CAPSLOCK: null
,A: null
,S: null
,D: null
,F: null
,G: null
,H: null
,J: null
,K: null
,L: null
,SEMICOLON: null
,QUOTE: null
,ENTER: null
,SHIFT: null
,Z: null
,X: null
,C: null
,V: null
,B: null
,N: null
,M: null
,COMMA: null
,PERIOD: null
,SLASH: null
,CONTROL: null
,ALT: null
,SPACE: null
,UP: null
,DOWN: null
,LEFT: null
,RIGHT: null
,HandleKeyDown: function(freshEvent) {
var keyObject = this._map[freshEvent.keyCode];
if(keyObject == null) return;
if(keyObject.get_Current() > 0) keyObject.set_Current(1); else keyObject.set_Current(2);
Reflect.setField(this,keyObject.get_Name(),true);
}
,HandleKeyUp: function(freshEvent) {
var keyObject = this._map[freshEvent.keyCode];
if(keyObject == null) return;
if(keyObject.get_Current() > 0) keyObject.set_Current(-1); else keyObject.set_Current(0);
Reflect.setField(this,keyObject.get_Name(),false);
}
,__class__: oaktree_ext_input_Keyboard
});
var oaktree_ext_localization_I18n = function() {
};
$hxClasses["oaktree.ext.localization.I18n"] = oaktree_ext_localization_I18n;
oaktree_ext_localization_I18n.__name__ = ["oaktree","ext","localization","I18n"];
oaktree_ext_localization_I18n.init = function(arr) {
oaktree_ext_localization_I18n.mapping = new haxe_ds_StringMap();
var keys = Reflect.fields(arr);
var _g = 0;
while(_g < keys.length) {
var key = keys[_g];
++_g;
if(oaktree_ext_localization_I18n.mapping.exists(key)) null;
var val = Reflect.field(arr,key);
oaktree_ext_localization_I18n.mapping.set(key,val);
if(oaktree_ext_localization_I18n.biddings.exists(key)) {
var target = oaktree_ext_localization_I18n.biddings.get(key);
Reflect.setProperty(target.obj,target.prop,val);
}
}
oaktree_ext_localization_I18n.initialized = true;
oaktree_ext_localization_I18n.onInit.dispatch();
};
oaktree_ext_localization_I18n.to_string = function() {
var result = [];
var $it0 = oaktree_ext_localization_I18n.mapping.keys();
while( $it0.hasNext() ) {
var key = $it0.next();
result.push(" " + key + ": \"" + oaktree_ext_localization_I18n.mapping.get(key) + "\"");
}
return "{ " + result.join(",") + "}";
};
oaktree_ext_localization_I18n.text = function(tag,list) {
if(oaktree_ext_localization_I18n.mapping == null || !oaktree_ext_localization_I18n.mapping.exists(tag)) return "" + tag;
var finalText = oaktree_ext_localization_I18n.mapping.get(tag);
finalText = oaktree_utils_StringUtility.withFormat(finalText,list);
return finalText;
};
oaktree_ext_localization_I18n.exists = function(tag) {
return oaktree_ext_localization_I18n.mapping.exists(tag);
};
oaktree_ext_localization_I18n.bind = function(tag,obj,prop) {
oaktree_ext_localization_I18n.biddings.set(tag,{ obj : obj, prop : prop});
};
oaktree_ext_localization_I18n.unbind = function(tag) {
if(oaktree_ext_localization_I18n.biddings.exists(tag)) oaktree_ext_localization_I18n.biddings.remove(tag);
};
oaktree_ext_localization_I18n.prototype = {
__class__: oaktree_ext_localization_I18n
};
var oaktree_ext_networking_ServerConnectionStatus = $hxClasses["oaktree.ext.networking.ServerConnectionStatus"] = { __ename__ : ["oaktree","ext","networking","ServerConnectionStatus"], __constructs__ : ["DISCONNECTED","CONNECTING","CONNECTED"] };
oaktree_ext_networking_ServerConnectionStatus.DISCONNECTED = ["DISCONNECTED",0];
oaktree_ext_networking_ServerConnectionStatus.DISCONNECTED.toString = $estr;
oaktree_ext_networking_ServerConnectionStatus.DISCONNECTED.__enum__ = oaktree_ext_networking_ServerConnectionStatus;
oaktree_ext_networking_ServerConnectionStatus.CONNECTING = ["CONNECTING",1];
oaktree_ext_networking_ServerConnectionStatus.CONNECTING.toString = $estr;
oaktree_ext_networking_ServerConnectionStatus.CONNECTING.__enum__ = oaktree_ext_networking_ServerConnectionStatus;
oaktree_ext_networking_ServerConnectionStatus.CONNECTED = ["CONNECTED",2];
oaktree_ext_networking_ServerConnectionStatus.CONNECTED.toString = $estr;
oaktree_ext_networking_ServerConnectionStatus.CONNECTED.__enum__ = oaktree_ext_networking_ServerConnectionStatus;
var oaktree_ext_services_ServiceConfig = function(type,properties) {
this.type = type;
this.properties = properties;
};
$hxClasses["oaktree.ext.services.ServiceConfig"] = oaktree_ext_services_ServiceConfig;
oaktree_ext_services_ServiceConfig.__name__ = ["oaktree","ext","services","ServiceConfig"];
oaktree_ext_services_ServiceConfig.prototype = {
type: null
,properties: null
,__class__: oaktree_ext_services_ServiceConfig
};
var oaktree_ext_services_ServiceManager = function() { };
$hxClasses["oaktree.ext.services.ServiceManager"] = oaktree_ext_services_ServiceManager;
oaktree_ext_services_ServiceManager.__name__ = ["oaktree","ext","services","ServiceManager"];
oaktree_ext_services_ServiceManager.getService = function(type) {
var _g_head = oaktree_ext_services_ServiceManager.serviceList.h;
var _g_val = null;
while(_g_head != null) {
var m;
m = (function($this) {
var $r;
_g_val = _g_head[0];
_g_head = _g_head[1];
$r = _g_val;
return $r;
}(this));
if(js_Boot.__instanceof(m,type)) return m;
}
return null;
};
oaktree_ext_services_ServiceManager.initialize = function(models) {
oaktree_ext_services_ServiceManager.serviceList = new List();
var $it0 = $iterator(models)();
while( $it0.hasNext() ) {
var setup = $it0.next();
var model = Type.createInstance(setup.type,[]);
model.create();
if(setup.properties != null) {
if(js_Boot.__instanceof(model,oaktree_ext_services_IConfigurable)) (js_Boot.__cast(model , oaktree_ext_services_IConfigurable)).configure(setup.properties); else oaktree_utils_ObjectUtility.copyProperties(setup.properties,model);
}
oaktree_ext_services_ServiceManager.serviceList.push(model);
}
var _g_head = oaktree_ext_services_ServiceManager.serviceList.h;
var _g_val = null;
while(_g_head != null) {
var m;
m = (function($this) {
var $r;
_g_val = _g_head[0];
_g_head = _g_head[1];
$r = _g_val;
return $r;
}(this));
m.initialize();
}
};
var oaktree_ext_social_fb_FBService = function() {
};
$hxClasses["oaktree.ext.social.fb.FBService"] = oaktree_ext_social_fb_FBService;
oaktree_ext_social_fb_FBService.__name__ = ["oaktree","ext","social","fb","FBService"];
oaktree_ext_social_fb_FBService.prototype = {
getQueryRequests: function() {
if(Core.environment.webEnv.getParameter("request_ids") != null) return this.getAppRequests();
return null;
}
,getAppRequests: function() {
var _g = this;
var def = new promhx_deferred_DeferredPromise();
FB.api("/me/apprequests",function(response) {
_g.onAppRequests(response,def);
});
return def.boundPromise;
}
,onAppRequests: function(fbResponse,def) {
var result = this.extractAppRequestsIds(fbResponse);
def.resolve(result);
}
,extractAppRequestsIds: function(fbResponse) {
var response = { gifts : [], invites : []};
if(fbResponse && !fbResponse.error) {
var data = fbResponse.data;
var _g = 0;
while(_g < data.length) {
var val = data[_g];
++_g;
if(val.data == "gift") {
var id = val.id;
response.gifts.push(id.substr(0,id.indexOf("_")));
} else if(val.data == "invite") {
var id1 = val.id;
response.invites.push(id1.substr(0,id1.indexOf("_")));
}
}
} else null;
return response;
}
,inviteFriends: function(obj,callback) {
this.doInvite(obj.title,obj.message,obj.users,callback);
}
,doInvite: function(title,message,users,callback) {
FB.ui({ method : "apprequests", title : title, message : message, to : users, data : "invite"},callback);
}
,__class__: oaktree_ext_social_fb_FBService
};
var oaktree_ext_ui_TextGroup = function(Id) {
if(Id == null) Id = "";
this.id = "";
this._members = [];
this.id = Id;
};
$hxClasses["oaktree.ext.ui.TextGroup"] = oaktree_ext_ui_TextGroup;
oaktree_ext_ui_TextGroup.__name__ = ["oaktree","ext","ui","TextGroup"];
oaktree_ext_ui_TextGroup.prototype = {
id: null
,length: null
,_members: null
,add: function(field) {
this._members.push(field);
return field;
}
,remove: function(field) {
var idx = HxOverrides.indexOf(this._members,field,0);
if(idx != -1) this._members.splice(idx,1);
}
,get_length: function() {
return this._members.length;
}
,useLowestFontSize: function(minFont,onlyHighterThanMin) {
if(onlyHighterThanMin == null) onlyHighterThanMin = false;
if(minFont == null) minFont = 0;
var smallestFontSize = -1;
var modified = false;
var _g = 0;
var _g1 = this._members;
while(_g < _g1.length) {
var label = _g1[_g];
++_g;
if(smallestFontSize == -1 || smallestFontSize > label.getTextFormat().size) {
smallestFontSize = label.getTextFormat().size;
modified = true;
}
}
smallestFontSize = Math.floor(Math.max(minFont,smallestFontSize));
if(modified) {
var _g2 = 0;
var _g11 = this._members;
while(_g2 < _g11.length) {
var label1 = _g11[_g2];
++_g2;
var newTextFormat = label1.getTextFormat();
if(!onlyHighterThanMin || newTextFormat.size >= smallestFontSize) {
newTextFormat.size = smallestFontSize;
label1.set_defaultTextFormat(newTextFormat);
label1.setTextFormat(newTextFormat);
label1.setText(label1.get_text(),true);
}
}
}
return smallestFontSize;
}
,__class__: oaktree_ext_ui_TextGroup
,__properties__: {get_length:"get_length"}
};
var oaktree_ext_ui_controls_CloseButton = function(id) {
var closeBitmapData = oaktree_utils_Warehouse.fetch("dialog-closebutton");
var closeDisabledBitmapData = oaktree_utils_Warehouse.fetch("dialog-closebutton-disabled");
this.upState = new openfl_display_Bitmap(closeBitmapData);
this.overState = new openfl_display_Bitmap(closeDisabledBitmapData);
this.downState = new openfl_display_Bitmap(closeDisabledBitmapData);
this.disabledState = new openfl_display_Bitmap(closeDisabledBitmapData);
oaktree_ext_ui_controls_Button.call(this,id);
};
$hxClasses["oaktree.ext.ui.controls.CloseButton"] = oaktree_ext_ui_controls_CloseButton;
oaktree_ext_ui_controls_CloseButton.__name__ = ["oaktree","ext","ui","controls","CloseButton"];
oaktree_ext_ui_controls_CloseButton.__super__ = oaktree_ext_ui_controls_Button;
oaktree_ext_ui_controls_CloseButton.prototype = $extend(oaktree_ext_ui_controls_Button.prototype,{
__class__: oaktree_ext_ui_controls_CloseButton
});
var oaktree_ext_ui_controls_IconLabel = function(lblOptions,icon,iconPosition,padding,paddingTop) {
if(paddingTop == null) paddingTop = 0;
if(padding == null) padding = 0;
if(iconPosition == null) iconPosition = "left";
openfl_display_Sprite.call(this);
this.padding = padding;
this.paddingTop = paddingTop;
this.iconPosition = iconPosition;
this.set_icon(icon);
this.label = new oaktree_ext_ui_Label(lblOptions);
if(icon != null) {
this.addChild(icon);
icon.set_y(0);
}
this.set_text(lblOptions.text);
this.set_textAlign(lblOptions.align);
this.addChild(this.label);
this.label.addEventListener("addedToStage",$bind(this,this.onAdded));
this.addEventListener("addedToStage",$bind(this,this.onAdded));
};
$hxClasses["oaktree.ext.ui.controls.IconLabel"] = oaktree_ext_ui_controls_IconLabel;
oaktree_ext_ui_controls_IconLabel.__name__ = ["oaktree","ext","ui","controls","IconLabel"];
oaktree_ext_ui_controls_IconLabel.__super__ = openfl_display_Sprite;
oaktree_ext_ui_controls_IconLabel.prototype = $extend(openfl_display_Sprite.prototype,{
label: null
,icon: null
,get_icon: function() {
return this.icon;
}
,set_icon: function(value) {
if(value == null && this.get_icon() != null) this.removeChild(this.get_icon());
return this.icon = value;
}
,iconPosition: null
,padding: null
,paddingTop: null
,text: null
,get_text: function() {
return this.text;
}
,set_text: function(value) {
this.updateLabelText(value);
return this.text = value;
}
,textAlign: null
,get_textAlign: function() {
return this.textAlign;
}
,set_textAlign: function(value) {
this.label.get_defaultTextFormat().align = value;
this.updateLabelText(this.get_text());
return this.textAlign = value;
}
,onAdded: function(e) {
this.updateLabelText(this.get_text());
}
,updateLabelText: function(value) {
this.label.set_text(value);
this.updatePosition();
}
,updatePosition: function() {
if(this.parent != null) {
this.label.set_y(0);
var _g = this.get_textAlign();
switch(_g) {
case 0:
this.label.set_x((this.parent.get_width() - this.label.get_width()) / 2);
break;
case 4:
this.label.set_x(this.parent.get_width() - this.label.get_width() - 5);
break;
default:
this.label.set_x(5);
}
this.positionIcon();
}
}
,positionIcon: function() {
if(this.get_icon() != null) {
if(this.iconPosition.toLowerCase() == "right") {
var _g = this.label;
_g.set_x(_g.get_x() - this.get_icon().get_width() / 2);
this.get_icon().set_x(this.label.get_x() + this.label.get_width() + this.padding);
} else {
var _g1 = this.label;
_g1.set_x(_g1.get_x() + this.get_icon().get_width() / 2);
this.get_icon().set_x(this.label.get_x() - this.get_icon().get_width() - this.padding);
}
this.get_icon().set_y(this.label.get_y() + (this.label.get_height() - this.get_icon().get_height()) / 2 + this.paddingTop);
}
}
,get_height: function() {
return this.label.get_height();
}
,__class__: oaktree_ext_ui_controls_IconLabel
,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{set_textAlign:"set_textAlign",get_textAlign:"get_textAlign",set_text:"set_text",get_text:"get_text",set_icon:"set_icon",get_icon:"get_icon"})
});
var oaktree_ext_ui_controls_LabelRectangle = function(options) {
openfl_display_Sprite.call(this);
if(options.labelOptions.autoSize == null) options.labelOptions.autoSize = 1;
options.labelOptions.autoSize;
this.label = new oaktree_ext_ui_Label(options.labelOptions);
this.label.set_selectable(false);
this.label.mouseEnabled = false;
this.shape = new openfl_display_Shape();
this.shape.get_graphics().beginFill(options.backgroundColor,1);
this.shape.get_graphics().drawRoundRect(0,0,options.labelWidth,options.labelHeight,options.radius,options.radius);
this.shape.get_graphics().endFill();
this.addChild(this.shape);
this.addChild(this.label);
this.label.addEventListener("addedToStage",$bind(this,this.onAdded));
};
$hxClasses["oaktree.ext.ui.controls.LabelRectangle"] = oaktree_ext_ui_controls_LabelRectangle;
oaktree_ext_ui_controls_LabelRectangle.__name__ = ["oaktree","ext","ui","controls","LabelRectangle"];
oaktree_ext_ui_controls_LabelRectangle.__super__ = openfl_display_Sprite;
oaktree_ext_ui_controls_LabelRectangle.prototype = $extend(openfl_display_Sprite.prototype,{
shape: null
,label: null
,onAdded: function(e) {
this.removeEventListener("addedToStage",$bind(this,this.onAdded));
this.doLayout();
}
,doLayout: function() {
this.label.set_x((this.shape.get_width() - this.label.get_width()) / 2);
this.label.set_y((this.shape.get_height() - this.label.get_height()) / 2);
}
,__class__: oaktree_ext_ui_controls_LabelRectangle
});
var oaktree_ext_ui_controls_PaginatedContainer = function(_opts) {
this.rowsPerPage = 1;
this.totalPages = 0;
this.itemsPerPage = 0;
this.itemHeight = 0;
this.itemWidth = 0;
this.currentPage = 0;
this.spacing = 4;
if(_opts.name == null) _opts.name = "paginated_control";
_opts.name;
if(_opts.w == null) _opts.w = 100;
_opts.w;
if(_opts.h == null) _opts.h = 100;
_opts.h;
this.options = _opts;
this.S_onChange = new msignal_Signal0();
oaktree_ext_ui_Control.call(this,this.options);
this.items = [];
this.container = new oaktree_ext_ui_Control({ name : "" + this.get_name() + ".container"});
this.addChild(this.container);
this.set_size(this.w,this.h);
};
$hxClasses["oaktree.ext.ui.controls.PaginatedContainer"] = oaktree_ext_ui_controls_PaginatedContainer;
oaktree_ext_ui_controls_PaginatedContainer.__name__ = ["oaktree","ext","ui","controls","PaginatedContainer"];
oaktree_ext_ui_controls_PaginatedContainer.__super__ = oaktree_ext_ui_Control;
oaktree_ext_ui_controls_PaginatedContainer.prototype = $extend(oaktree_ext_ui_Control.prototype,{
container: null
,items: null
,options: null
,clipMask: null
,spacing: null
,currentPage: null
,typicalItem: null
,itemWidth: null
,itemHeight: null
,itemsPerPage: null
,totalPages: null
,rowsPerPage: null
,S_onChange: null
,addItem: function(_item) {
if(this.items.length == 0 && this.typicalItem == null) this.typicalItem = _item;
this.items.push(_item);
this.update_layout();
return _item;
}
,removeItem: function(_item) {
HxOverrides.remove(this.items,_item);
this.update_layout();
return _item;
}
,getItemAt: function(i) {
return this.items[i];
}
,addArray: function(_array) {
this.empty();
if(_array.length > 0) {
var _g = 0;
while(_g < _array.length) {
var item = _array[_g];
++_g;
this.addItem(item);
}
this.update_layout();
}
return _array;
}
,empty: function() {
while(this.container.get_numChildren() > 0) this.container.removeChildAt(0);
this.items = [];
}
,update_layout: function(animate) {
if(animate == null) animate = true;
var _g2 = this;
this.itemWidth = this.typicalItem.w + this.spacing;
this.itemHeight = this.typicalItem.h + this.spacing;
this.itemsPerPage = Math.floor(this.w / this.itemWidth) * this.rowsPerPage;
this.totalPages = Math.ceil(this.items.length / this.itemsPerPage);
var idx = 0;
var idy = 0;
var loading = 0;
var columnsPerPage = this.itemsPerPage / this.rowsPerPage | 0;
var startIdx = this.currentPage * columnsPerPage;
var itemIndex = this.itemsPerPage * this.currentPage;
var itemIndexStart = itemIndex;
var _g1 = 0;
var _g = this.itemsPerPage;
while(_g1 < _g) {
var i = _g1++;
idx = startIdx + (i % columnsPerPage | 0);
idy = i / columnsPerPage | 0;
if(itemIndex >= this.items.length) break;
var item = this.items[itemIndex];
if(!this.container.contains(item)) {
if(!item.complete) {
loading++;
item.addEventListener("complete",function(e) {
loading--;
if(loading == 0) _g2.preload();
});
}
this.container.addChild(item);
}
item.set_visible(true);
item.set_x(idx * this.itemWidth);
item.set_y(idy * this.itemHeight);
itemIndex++;
}
var targetX = Math.round(-startIdx * this.itemWidth);
if(animate) motion_Actuate.tween(this.container,0.5,{ x : targetX}).onComplete(function() {
_g2.removeItems(itemIndexStart,_g2.itemsPerPage);
}); else motion_Actuate.tween(this.container,0.0,{ x : targetX}).onComplete(function() {
_g2.removeItems(itemIndexStart,_g2.itemsPerPage);
});
if(loading == 0) this.preload();
}
,removeItems: function(lastIndex,count) {
var _g = 0;
while(_g < lastIndex) {
var i = _g++;
var item = this.items[i];
if(item != null && item.parent != null) this.container.removeChild(item);
}
var _g1 = lastIndex + count * 2;
var _g2 = this.items.length;
while(_g1 < _g2) {
var i1 = _g1++;
var item1 = this.items[i1];
if(item1 != null && item1.parent != null && item1.complete) this.container.removeChild(item1);
}
}
,preload: function() {
this.preloadPageItems(this.currentPage - 1);
this.preloadPageItems(this.currentPage + 1);
}
,preloadPageItems: function(page) {
var itemsPerPage = Math.floor(this.w / this.itemWidth) * this.rowsPerPage;
var columnsPerPage = itemsPerPage / this.rowsPerPage | 0;
var startIdx = page * columnsPerPage;
var itemIndex = itemsPerPage * page;
var _g = 0;
while(_g < itemsPerPage) {
var i = _g++;
var idx = startIdx + (i % columnsPerPage | 0);
if(itemIndex < 0 || itemIndex >= this.items.length) break;
var item = this.items[itemIndex];
if(!this.container.contains(item)) {
this.container.addChild(item);
item.set_visible(false);
}
itemIndex++;
}
}
,next_page: function() {
this.set_page(this.currentPage + 1);
this.S_onChange.dispatch();
}
,previous_page: function() {
this.set_page(this.currentPage - 1);
this.S_onChange.dispatch();
}
,set_page: function(toPage,animate) {
if(animate == null) animate = true;
if(toPage < 0 || toPage >= this.totalPages) return;
this.currentPage = toPage;
this.update_layout(animate);
this.S_onChange.dispatch();
}
,update_clip_mask: function() {
if(this.clipMask != null && this.clipMask.get_width() == this.w && this.clipMask.get_height() == this.h) return;
if(this.clipMask != null) {
if(this.contains(this.clipMask)) this.removeChild(this.clipMask);
this.clipMask.get_graphics().clear();
} else this.clipMask = new openfl_display_Shape();
this.clipMask.get_graphics().beginFill(16711935,0.3);
this.clipMask.get_graphics().drawRect(0,0,this.w,this.h + 1);
this.clipMask.get_graphics().endFill();
this.clipMask.set_y(-1);
this.addChild(this.clipMask);
this.set_mask(this.clipMask);
}
,set_size: function(_w,_h) {
oaktree_ext_ui_Control.prototype.set_size.call(this,_w,_h);
this.update_clip_mask();
}
,__class__: oaktree_ext_ui_controls_PaginatedContainer
});
var oaktree_ext_ui_controls_PaginationControl = function() {
this.totalPages = 1;
this.visiblePages = 6;
this.currentPage = 0;
this.spacing = 10;
this.firstPage = 0;
oaktree_ext_ui_Control.call(this,{ name : "pagination_control"});
this.itemPool = [];
this.S_onChange = new msignal_Signal0();
this.addEventListener("addedToStage",$bind(this,this.onAddedToStage));
};
$hxClasses["oaktree.ext.ui.controls.PaginationControl"] = oaktree_ext_ui_controls_PaginationControl;
oaktree_ext_ui_controls_PaginationControl.__name__ = ["oaktree","ext","ui","controls","PaginationControl"];
oaktree_ext_ui_controls_PaginationControl.__super__ = oaktree_ext_ui_Control;
oaktree_ext_ui_controls_PaginationControl.prototype = $extend(oaktree_ext_ui_Control.prototype,{
firstPage: null
,spacing: null
,currentPage: null
,visiblePages: null
,totalPages: null
,paginationItemClass: null
,itemPool: null
,gotoFirstButton: null
,gotoLastButton: null
,gotoNextButton: null
,gotoPreviousButton: null
,S_onChange: null
,hideArrows: function() {
this.hideLeft();
this.hideRight();
}
,hideRight: function() {
this.gotoLastButton.set_enabled(false);
this.gotoLastButton.set_alpha(0.6);
this.gotoNextButton.set_enabled(false);
this.gotoNextButton.set_alpha(0.6);
}
,hideLeft: function() {
this.gotoFirstButton.set_enabled(false);
this.gotoFirstButton.set_alpha(0.6);
this.gotoPreviousButton.set_enabled(false);
this.gotoPreviousButton.set_alpha(0.6);
}
,showArrows: function() {
this.showLeft();
this.showRight();
}
,showRight: function() {
this.gotoLastButton.set_enabled(true);
this.gotoLastButton.set_alpha(1);
this.gotoNextButton.set_enabled(true);
this.gotoNextButton.set_alpha(1);
}
,showLeft: function() {
this.gotoFirstButton.set_enabled(true);
this.gotoFirstButton.set_alpha(1);
this.gotoPreviousButton.set_enabled(true);
this.gotoPreviousButton.set_alpha(1);
}
,onAddedToStage: function(e) {
this.removeEventListener("addedToStage",$bind(this,this.onAddedToStage));
this.addEventListener("removedFromStage",$bind(this,this.onRemovedFromStage));
this.update();
}
,onRemovedFromStage: function(e) {
this.addEventListener("addedToStage",$bind(this,this.onAddedToStage));
}
,update: function() {
if(this.stage == null) return;
var minPage = Math.round(Math.max(this.firstPage,this.currentPage - Math.floor((this.visiblePages - 1) / 2)));
var maxPage = Math.round(Math.min(this.totalPages,minPage + this.visiblePages - 1));
minPage = Math.round(Math.max(this.firstPage,Math.min(minPage,maxPage - this.visiblePages + 1)));
while(this.get_numChildren() > 0) this.removeChildAt(0);
if(this.gotoFirstButton != null) {
this.addChild(this.gotoFirstButton);
this.gotoFirstButton.set_selected(false);
this.gotoFirstButton.addEventListener("click",$bind(this,this.onFirstButtonClick));
}
if(this.gotoPreviousButton != null) {
this.addChild(this.gotoPreviousButton);
this.gotoPreviousButton.set_selected(false);
this.gotoPreviousButton.addEventListener("click",$bind(this,this.onPreviousButtonClick));
}
var _g = minPage;
while(_g < maxPage) {
var i = _g++;
var child;
if(i >= this.itemPool.length) {
child = Type.createInstance(this.paginationItemClass,[]);
this.itemPool.push(child);
} else child = this.itemPool[i];
child.set_name("" + i);
if(i == minPage) child.set_name("0");
if(i == maxPage - 1) child.set_name("" + (this.totalPages - 1));
var btn = this.addChild(child);
btn.set_selected(i == this.currentPage);
btn.setText("" + (Std.parseInt(child.get_name()) + 1));
child.addEventListener("click",$bind(this,this.handlePageClick));
}
if(this.gotoNextButton != null) {
this.addChild(this.gotoNextButton);
this.gotoNextButton.set_selected(false);
this.gotoNextButton.addEventListener("click",$bind(this,this.onNextButtonClick));
}
if(this.gotoLastButton != null) {
this.addChild(this.gotoLastButton);
this.gotoLastButton.set_selected(false);
this.gotoLastButton.addEventListener("click",$bind(this,this.onLastButtonClick));
}
this.showArrows();
if(this.totalPages == 1) {
this.hideLeft();
this.hideRight();
} else if(this.currentPage == minPage) this.hideLeft(); else if(this.currentPage == maxPage - 1) this.hideRight();
this.update_layout();
}
,onFirstButtonClick: function(e) {
this.set_currentPage(0);
this.S_onChange.dispatch();
}
,onLastButtonClick: function(e) {
this.set_currentPage(this.totalPages - 1);
this.S_onChange.dispatch();
}
,onPreviousButtonClick: function(e) {
var _g = this;
var _g1 = _g.currentPage;
_g.set_currentPage(_g1 - 1);
_g1;
this.S_onChange.dispatch();
}
,onNextButtonClick: function(e) {
var _g = this;
var _g1 = _g.currentPage;
_g.set_currentPage(_g1 + 1);
_g1;
this.S_onChange.dispatch();
}
,handlePageClick: function(e) {
var child = e.currentTarget;
var childIdx = Std.parseInt(child.get_name());
this.set_currentPage(childIdx);
this.S_onChange.dispatch();
}
,update_layout: function() {
var maxH = 0.0;
var _g1 = 0;
var _g = this.get_numChildren();
while(_g1 < _g) {
var i = _g1++;
maxH = Math.max(maxH,this.getChildAt(0).get_height());
}
var xx = 0.0;
var child;
var _g11 = 0;
var _g2 = this.get_numChildren();
while(_g11 < _g2) {
var i1 = _g11++;
child = this.getChildAt(i1);
child.set_x(xx);
child.set_y((maxH - child.get_height()) * 0.5);
xx += child.get_width() + this.spacing;
}
}
,set_totalPages: function(value) {
this.totalPages = value;
this.update();
return this.totalPages;
}
,set_visiblePages: function(value) {
this.visiblePages = value;
this.update();
return value;
}
,set_currentPage: function(value) {
if(value < 0 || value >= this.totalPages) return this.currentPage;
this.currentPage = value;
this.update();
return value;
}
,set_spacing: function(value) {
this.spacing = value;
this.update();
return value;
}
,__class__: oaktree_ext_ui_controls_PaginationControl
,__properties__: $extend(oaktree_ext_ui_Control.prototype.__properties__,{set_totalPages:"set_totalPages",set_visiblePages:"set_visiblePages",set_currentPage:"set_currentPage",set_spacing:"set_spacing"})
});
var oaktree_objects_FramedSpriteVO = function(obj) {
this.topY = 0;
this.bottomY = 0;
this.rightX = 0;
this.leftX = 0;
oaktree_core_VO.call(this,obj);
if(this.imageFrameName != null) this.imageFrameName = this.removeExtension(this.imageFrameName);
};
$hxClasses["oaktree.objects.FramedSpriteVO"] = oaktree_objects_FramedSpriteVO;
oaktree_objects_FramedSpriteVO.__name__ = ["oaktree","objects","FramedSpriteVO"];
oaktree_objects_FramedSpriteVO.__super__ = oaktree_core_VO;
oaktree_objects_FramedSpriteVO.prototype = $extend(oaktree_core_VO.prototype,{
scaleHorizontal: null
,scaleVertical: null
,texture: null
,imageFrameName: null
,leftX: null
,rightX: null
,bottomY: null
,topY: null
,handleSpecialTypes: function(key,obj) {
if(key == "UniqueImage") {
if(Object.prototype.hasOwnProperty.call(obj.UniqueImage,"Source_Frame")) this.imageFrameName = obj.UniqueImage.Source_Frame;
if(Object.prototype.hasOwnProperty.call(obj.UniqueImage,"X_Left")) this.leftX = obj.UniqueImage.X_Left;
if(Object.prototype.hasOwnProperty.call(obj.UniqueImage,"X_Right")) this.rightX = obj.UniqueImage.X_Right;
if(Object.prototype.hasOwnProperty.call(obj.UniqueImage,"Y_Bottom")) this.bottomY = obj.UniqueImage.Y_Bottom;
if(Object.prototype.hasOwnProperty.call(obj.UniqueImage,"Y_Top")) this.topY = obj.UniqueImage.Y_Top;
return true;
}
return false;
}
,removeExtension: function(frameName) {
var regex = new EReg("\\.(png|jpg|gif)$","g");
return regex.replace(frameName,"");
}
,asRectangle: function() {
return new openfl_geom_Rectangle(this.leftX,this.topY,this.rightX,this.bottomY);
}
,clone: function() {
var frame = new oaktree_objects_FramedSpriteVO();
frame.leftX = this.leftX;
frame.rightX = this.rightX;
frame.topY = this.topY;
frame.bottomY = this.bottomY;
frame.scaleHorizontal = this.scaleHorizontal;
frame.scaleVertical = this.scaleVertical;
frame.texture = this.texture;
frame.imageFrameName = this.imageFrameName;
return frame;
}
,getResourceList: function(outputList) {
var resource = { atlasName : this.texture, spriteName : this.imageFrameName, isAtlas : true};
outputList.push(resource);
return outputList;
}
,__class__: oaktree_objects_FramedSpriteVO
});
var oaktree_objects_ManifestVO = function(obj) {
this.assets = [];
oaktree_core_VO.call(this,obj);
};
$hxClasses["oaktree.objects.ManifestVO"] = oaktree_objects_ManifestVO;
oaktree_objects_ManifestVO.__name__ = ["oaktree","objects","ManifestVO"];
oaktree_objects_ManifestVO.__super__ = oaktree_core_VO;
oaktree_objects_ManifestVO.prototype = $extend(oaktree_core_VO.prototype,{
build: null
,assets: null
,__class__: oaktree_objects_ManifestVO
});
var oaktree_objects_AssetVO = function(obj) {
oaktree_core_VO.call(this,obj);
};
$hxClasses["oaktree.objects.AssetVO"] = oaktree_objects_AssetVO;
oaktree_objects_AssetVO.__name__ = ["oaktree","objects","AssetVO"];
oaktree_objects_AssetVO.__super__ = oaktree_core_VO;
oaktree_objects_AssetVO.prototype = $extend(oaktree_core_VO.prototype,{
id: null
,src: null
,type: null
,base: null
,texture: null
,metafile: null
,__class__: oaktree_objects_AssetVO
});
var openfl__$internal_text_TextEngine = function(textField) {
this.textField = textField;
this.width = 100;
this.height = 100;
this.set_text("");
this.bounds = new openfl_geom_Rectangle(0,0,0,0);
this.type = 0;
this.autoSize = 2;
this.embedFonts = false;
this.selectable = true;
this.borderColor = 0;
this.border = false;
this.backgroundColor = 16777215;
this.background = false;
this.gridFitType = 1;
this.maxChars = 0;
this.multiline = false;
this.sharpness = 0;
this.scrollH = 0;
this.scrollV = 1;
this.wordWrap = false;
this.lineAscents = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.lineBreaks = openfl__$Vector_Vector_$Impl_$.toIntVector(null);
this.lineDescents = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.lineLeadings = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.lineHeights = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.lineWidths = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.layoutGroups = openfl__$Vector_Vector_$Impl_$.toObjectVector(null);
this.textFormatRanges = openfl__$Vector_Vector_$Impl_$.toObjectVector(null);
openfl__$internal_text_TextEngine.__canvas = window.document.createElement("canvas");
openfl__$internal_text_TextEngine.__context = openfl__$internal_text_TextEngine.__canvas.getContext("2d");
};
$hxClasses["openfl._internal.text.TextEngine"] = openfl__$internal_text_TextEngine;
openfl__$internal_text_TextEngine.__name__ = ["openfl","_internal","text","TextEngine"];
openfl__$internal_text_TextEngine.findFont = function(name) {
return null;
};
openfl__$internal_text_TextEngine.getFormatHeight = function(format) {
var ascent;
var descent;
var leading;
openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(format);
ascent = format.size;
descent = format.size * 0.185;
leading = format.leading;
return ascent + descent + leading;
};
openfl__$internal_text_TextEngine.getFont = function(format) {
var font;
if(format.italic) font = "italic "; else font = "normal ";
font += "normal ";
if(format.bold) font += "bold "; else font += "normal ";
font += format.size + "px";
font += "/" + (format.leading + format.size + 3) + "px ";
font += "" + (function($this) {
var $r;
var _g = format.font;
$r = (function($this) {
var $r;
switch(_g) {
case "_sans":
$r = "sans-serif";
break;
case "_serif":
$r = "serif";
break;
case "_typewriter":
$r = "monospace";
break;
default:
$r = "'" + new EReg("^[\\s'\"]+(.*)[\\s'\"]+$","").replace(format.font,"$1") + "'";
}
return $r;
}($this));
return $r;
}(this));
return font;
};
openfl__$internal_text_TextEngine.getFontInstance = function(format) {
return null;
};
openfl__$internal_text_TextEngine.prototype = {
antiAliasType: null
,autoSize: null
,background: null
,backgroundColor: null
,border: null
,borderColor: null
,bottomScrollV: null
,bounds: null
,caretIndex: null
,embedFonts: null
,gridFitType: null
,height: null
,layoutGroups: null
,lineAscents: null
,lineBreaks: null
,lineDescents: null
,lineLeadings: null
,lineHeights: null
,lineWidths: null
,maxChars: null
,maxScrollH: null
,maxScrollV: null
,multiline: null
,numLines: null
,restrict: null
,scrollH: null
,scrollV: null
,selectable: null
,sharpness: null
,text: null
,textHeight: null
,textFormatRanges: null
,textWidth: null
,type: null
,width: null
,wordWrap: null
,textField: null
,__cursorTimer: null
,__hasFocus: null
,__isKeyDown: null
,__measuredHeight: null
,__measuredWidth: null
,__restrictRegexp: null
,__selectionStart: null
,__showCursor: null
,__textFormat: null
,__textLayout: null
,__texture: null
,__useIntAdvances: null
,__cairoFont: null
,__font: null
,__hiddenInput: null
,createRestrictRegexp: function(restrict) {
var declinedRange = new EReg("\\^(.-.|.)","gu");
var declined = "";
var accepted = declinedRange.map(restrict,function(ereg) {
declined += ereg.matched(1);
return "";
});
var testRegexpParts = [];
if(accepted.length > 0) testRegexpParts.push("[^" + restrict + "]");
if(declined.length > 0) testRegexpParts.push("[" + declined + "]");
return new EReg("(" + testRegexpParts.join("|") + ")","g");
}
,getBounds: function() {
var padding;
if(this.border) padding = 1; else padding = 0;
this.bounds.width = this.width + padding;
this.bounds.height = this.height + padding;
}
,getLine: function(index) {
if(index < 0 || index > this.lineBreaks.get_length() + 1) return null;
if(this.lineBreaks.get_length() == 0) return this.text; else return this.text.substring(index > 0?this.lineBreaks.get(index - 1):0,this.lineBreaks.get(index));
}
,getLineBreakIndex: function(startIndex) {
if(startIndex == null) startIndex = 0;
var cr = this.text.indexOf("\n",startIndex);
var lf = this.text.indexOf("\r",startIndex);
if(cr == -1) return lf;
if(lf == -1) return cr;
if(cr < lf) return cr; else return lf;
}
,getLineMeasurements: function() {
this.lineAscents.set_length(0);
this.lineDescents.set_length(0);
this.lineLeadings.set_length(0);
this.lineHeights.set_length(0);
this.lineWidths.set_length(0);
var currentLineAscent = 0.0;
var currentLineDescent = 0.0;
var currentLineLeading = null;
var currentLineHeight = 0.0;
var currentLineWidth = 0.0;
this.textWidth = 0;
this.textHeight = 0;
this.numLines = 1;
this.bottomScrollV = 0;
this.maxScrollH = 0;
var _g = 0;
var _g1 = this.layoutGroups;
while(_g < _g1.get_length()) {
var group = _g1.get(_g);
++_g;
while(group.lineIndex > this.numLines - 1) {
this.lineAscents.push(currentLineAscent);
this.lineDescents.push(currentLineDescent);
this.lineLeadings.push(currentLineLeading != null?currentLineLeading:0);
this.lineHeights.push(currentLineHeight);
this.lineWidths.push(currentLineWidth);
currentLineAscent = 0;
currentLineDescent = 0;
currentLineLeading = null;
currentLineHeight = 0;
currentLineWidth = 0;
this.numLines++;
if(this.textHeight <= this.height - 2) this.bottomScrollV++;
}
currentLineAscent = Math.max(currentLineAscent,group.ascent);
currentLineDescent = Math.max(currentLineDescent,group.descent);
if(currentLineLeading == null) currentLineLeading = group.leading; else currentLineLeading = Std["int"](Math.max(currentLineLeading,group.leading));
currentLineHeight = Math.max(currentLineHeight,group.height);
currentLineWidth = group.offsetX - 2 + group.width;
if(currentLineWidth > this.textWidth) this.textWidth = currentLineWidth;
this.textHeight = group.offsetY - 2 + group.ascent + group.descent;
}
this.lineAscents.push(currentLineAscent);
this.lineDescents.push(currentLineDescent);
this.lineLeadings.push(currentLineLeading != null?currentLineLeading:0);
this.lineHeights.push(currentLineHeight);
this.lineWidths.push(currentLineWidth);
if(this.numLines == 1) {
this.bottomScrollV = 1;
if(currentLineLeading > 0) this.textHeight += currentLineLeading;
} else if(this.textHeight <= this.height - 2) this.bottomScrollV++;
if(this.autoSize != 2) {
var _g2 = this.autoSize;
switch(_g2) {
case 1:case 3:case 0:
if(!this.wordWrap) this.width = this.textWidth + 4;
this.height = this.textHeight + 4;
this.bottomScrollV = this.numLines;
break;
default:
}
}
if(this.textWidth > this.width - 4) this.maxScrollH = this.textWidth - this.width + 4 | 0; else this.maxScrollH = 0;
this.maxScrollV = this.numLines - this.bottomScrollV + 1;
}
,getLayoutGroups: function() {
var _g = this;
this.layoutGroups.set_length(0);
var rangeIndex = -1;
var formatRange = null;
var font = null;
var currentFormat = openfl_text_TextField.__defaultTextFormat.clone();
var leading = 0;
var ascent = 0.0;
var descent = 0.0;
var layoutGroup = null;
var advances = null;
var widthValue;
var heightValue = 0.0;
var previousSpaceIndex = -2;
var spaceIndex = this.text.indexOf(" ");
var breakIndex = this.getLineBreakIndex();
var offsetX = 2.0;
var offsetY = 2.0;
var textIndex = 0;
var lineIndex = 0;
var lineFormat = null;
if(rangeIndex < _g.textFormatRanges.get_length() - 1) {
rangeIndex++;
formatRange = _g.textFormatRanges.get(rangeIndex);
currentFormat.__merge(formatRange.format);
openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
ascent = currentFormat.size;
descent = currentFormat.size * 0.185;
leading = currentFormat.leading;
heightValue = ascent + descent + leading;
}
lineFormat = formatRange.format;
var wrap;
var maxLoops = this.text.length;
if(this.multiline) maxLoops++;
while(textIndex < maxLoops) if(breakIndex > -1 && (spaceIndex == -1 || breakIndex < spaceIndex) && formatRange.end >= breakIndex) {
if(textIndex <= breakIndex) {
if(layoutGroup == null || layoutGroup.startIndex != layoutGroup.endIndex) {
layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,breakIndex);
_g.layoutGroups.push(layoutGroup);
} else {
layoutGroup.format = formatRange.format;
layoutGroup.startIndex = textIndex;
layoutGroup.endIndex = breakIndex;
}
var text = this.text;
var advances1 = [];
if(_g.__useIntAdvances == null) _g.__useIntAdvances = new EReg("Trident/7.0","").match(window.navigator.userAgent);
if(_g.__useIntAdvances) {
var previousWidth = 0.0;
var width;
var _g1 = textIndex;
while(_g1 < breakIndex) {
var i = _g1++;
width = openfl__$internal_text_TextEngine.__context.measureText(text.substring(textIndex,i + 1)).width;
advances1.push(width - previousWidth);
previousWidth = width;
}
} else {
var _g11 = textIndex;
while(_g11 < breakIndex) {
var i1 = _g11++;
var advance;
if(i1 < text.length - 1) {
var nextWidth = openfl__$internal_text_TextEngine.__context.measureText(text.charAt(i1 + 1)).width;
var twoWidths = openfl__$internal_text_TextEngine.__context.measureText(HxOverrides.substr(text,i1,2)).width;
advance = twoWidths - nextWidth;
} else advance = openfl__$internal_text_TextEngine.__context.measureText(text.charAt(i1)).width;
advances1.push(advance);
}
}
layoutGroup.advances = advances1;
layoutGroup.offsetX = offsetX;
layoutGroup.ascent = ascent;
layoutGroup.descent = descent;
layoutGroup.leading = leading;
layoutGroup.lineIndex = lineIndex;
layoutGroup.offsetY = offsetY;
var advances2 = layoutGroup.advances;
var width1 = 0.0;
var _g2 = 0;
while(_g2 < advances2.length) {
var advance1 = advances2[_g2];
++_g2;
width1 += advance1;
}
layoutGroup.width = width1;
layoutGroup.height = heightValue;
layoutGroup = null;
} else if(layoutGroup != null && layoutGroup.startIndex != layoutGroup.endIndex) {
layoutGroup.width -= layoutGroup.advances[layoutGroup.advances.length - 1];
layoutGroup = null;
}
offsetY += heightValue;
offsetX = 2;
if(formatRange.end == breakIndex) {
if(rangeIndex < _g.textFormatRanges.get_length() - 1) {
rangeIndex++;
formatRange = _g.textFormatRanges.get(rangeIndex);
currentFormat.__merge(formatRange.format);
openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
ascent = currentFormat.size;
descent = currentFormat.size * 0.185;
leading = currentFormat.leading;
heightValue = ascent + descent + leading;
}
lineFormat = formatRange.format;
}
textIndex = breakIndex + 1;
breakIndex = this.getLineBreakIndex(textIndex);
lineIndex++;
} else if(formatRange.end >= spaceIndex && spaceIndex > -1 && textIndex < formatRange.end) {
if(layoutGroup != null && layoutGroup.startIndex != layoutGroup.endIndex) layoutGroup = null;
wrap = false;
while(true) {
if(textIndex == formatRange.end) break;
var endIndex;
if(spaceIndex == -1) {
if(breakIndex == -1) endIndex = formatRange.end; else endIndex = breakIndex;
} else if(spaceIndex + 1 > formatRange.end) endIndex = formatRange.end; else endIndex = spaceIndex + 1;
var text1 = this.text;
var advances3 = [];
if(_g.__useIntAdvances == null) _g.__useIntAdvances = new EReg("Trident/7.0","").match(window.navigator.userAgent);
if(_g.__useIntAdvances) {
var previousWidth1 = 0.0;
var width2;
var _g12 = textIndex;
while(_g12 < endIndex) {
var i2 = _g12++;
width2 = openfl__$internal_text_TextEngine.__context.measureText(text1.substring(textIndex,i2 + 1)).width;
advances3.push(width2 - previousWidth1);
previousWidth1 = width2;
}
} else {
var _g13 = textIndex;
while(_g13 < endIndex) {
var i3 = _g13++;
var advance2;
if(i3 < text1.length - 1) {
var nextWidth1 = openfl__$internal_text_TextEngine.__context.measureText(text1.charAt(i3 + 1)).width;
var twoWidths1 = openfl__$internal_text_TextEngine.__context.measureText(HxOverrides.substr(text1,i3,2)).width;
advance2 = twoWidths1 - nextWidth1;
} else advance2 = openfl__$internal_text_TextEngine.__context.measureText(text1.charAt(i3)).width;
advances3.push(advance2);
}
}
advances = advances3;
var width3 = 0.0;
var _g3 = 0;
while(_g3 < advances.length) {
var advance3 = advances[_g3];
++_g3;
width3 += advance3;
}
widthValue = width3;
if(lineFormat.align == 2) {
if(advances.length > 0 && textIndex == previousSpaceIndex) {
textIndex++;
var spaceWidth = advances.shift();
widthValue -= spaceWidth;
offsetX += spaceWidth;
}
if(advances.length > 0 && endIndex == spaceIndex + 1) {
endIndex--;
var spaceWidth1 = advances.pop();
widthValue -= spaceWidth1;
}
}
if(this.wordWrap) {
if(offsetX + widthValue > this.width) wrap = true;
}
if(wrap) {
if(lineFormat.align != 2 && (layoutGroup != null || this.layoutGroups.get_length() > 0)) {
var previous = layoutGroup;
if(previous == null) {
var index = this.layoutGroups.get_length() - 1;
previous = this.layoutGroups.get(index);
}
previous.width -= previous.advances[previous.advances.length - 1];
previous.endIndex--;
}
offsetY += heightValue;
var i4 = this.layoutGroups.get_length() - 1;
var offsetCount = 0;
while(true) {
layoutGroup = this.layoutGroups.get(i4);
if(i4 > 0 && layoutGroup.startIndex > previousSpaceIndex) offsetCount++; else break;
i4--;
}
lineIndex++;
offsetX = 2;
if(offsetCount > 0) {
var bumpX;
bumpX = ((function($this) {
var $r;
var index1 = $this.layoutGroups.get_length() - offsetCount;
$r = $this.layoutGroups.get(index1);
return $r;
}(this))).offsetX;
var _g14 = this.layoutGroups.get_length() - offsetCount;
var _g4 = this.layoutGroups.get_length();
while(_g14 < _g4) {
var i5 = _g14++;
layoutGroup = this.layoutGroups.get(i5);
layoutGroup.offsetX -= bumpX;
layoutGroup.offsetY = offsetY;
layoutGroup.lineIndex = lineIndex;
offsetX += layoutGroup.width;
}
}
if(layoutGroup == null || layoutGroup.startIndex != layoutGroup.endIndex) {
layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,endIndex);
_g.layoutGroups.push(layoutGroup);
} else {
layoutGroup.format = formatRange.format;
layoutGroup.startIndex = textIndex;
layoutGroup.endIndex = endIndex;
}
layoutGroup.advances = advances;
layoutGroup.offsetX = offsetX;
layoutGroup.ascent = ascent;
layoutGroup.descent = descent;
layoutGroup.leading = leading;
layoutGroup.lineIndex = lineIndex;
layoutGroup.offsetY = offsetY;
layoutGroup.width = widthValue;
layoutGroup.height = heightValue;
offsetX += widthValue;
textIndex = endIndex;
wrap = false;
} else {
if(layoutGroup != null && textIndex == spaceIndex) {
if(lineFormat.align != 2) layoutGroup.endIndex = spaceIndex;
} else if(layoutGroup == null || lineFormat.align == 2) {
if(layoutGroup == null || layoutGroup.startIndex != layoutGroup.endIndex) {
layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,endIndex);
_g.layoutGroups.push(layoutGroup);
} else {
layoutGroup.format = formatRange.format;
layoutGroup.startIndex = textIndex;
layoutGroup.endIndex = endIndex;
}
layoutGroup.advances = advances;
layoutGroup.offsetX = offsetX;
layoutGroup.ascent = ascent;
layoutGroup.descent = descent;
layoutGroup.leading = leading;
layoutGroup.lineIndex = lineIndex;
layoutGroup.offsetY = offsetY;
layoutGroup.width = widthValue;
layoutGroup.height = heightValue;
} else {
layoutGroup.endIndex = endIndex;
layoutGroup.advances = layoutGroup.advances.concat(advances);
layoutGroup.width += widthValue;
if(breakIndex == endIndex) endIndex++;
}
offsetX += widthValue;
textIndex = endIndex;
}
var nextSpaceIndex = this.text.indexOf(" ",textIndex);
if(formatRange.end <= previousSpaceIndex) {
layoutGroup = null;
textIndex = formatRange.end;
if(rangeIndex < _g.textFormatRanges.get_length() - 1) {
rangeIndex++;
formatRange = _g.textFormatRanges.get(rangeIndex);
currentFormat.__merge(formatRange.format);
openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
ascent = currentFormat.size;
descent = currentFormat.size * 0.185;
leading = currentFormat.leading;
heightValue = ascent + descent + leading;
}
} else {
if(breakIndex == previousSpaceIndex) {
layoutGroup.endIndex = breakIndex;
if(breakIndex - layoutGroup.startIndex - layoutGroup.advances.length < 0) layoutGroup.advances.push(0.0);
textIndex = breakIndex + 1;
}
previousSpaceIndex = spaceIndex;
spaceIndex = nextSpaceIndex;
}
if(breakIndex > -1 && (spaceIndex > breakIndex || spaceIndex == -1 && breakIndex <= textIndex) || textIndex > this.text.length || spaceIndex > formatRange.end) break;
}
} else {
if(textIndex > formatRange.end) break; else if(textIndex < formatRange.end || textIndex == this.text.length) {
var text2 = this.text;
var endIndex1 = formatRange.end;
var advances4 = [];
if(_g.__useIntAdvances == null) _g.__useIntAdvances = new EReg("Trident/7.0","").match(window.navigator.userAgent);
if(_g.__useIntAdvances) {
var previousWidth2 = 0.0;
var width4;
var _g15 = textIndex;
while(_g15 < endIndex1) {
var i6 = _g15++;
width4 = openfl__$internal_text_TextEngine.__context.measureText(text2.substring(textIndex,i6 + 1)).width;
advances4.push(width4 - previousWidth2);
previousWidth2 = width4;
}
} else {
var _g16 = textIndex;
while(_g16 < endIndex1) {
var i7 = _g16++;
var advance4;
if(i7 < text2.length - 1) {
var nextWidth2 = openfl__$internal_text_TextEngine.__context.measureText(text2.charAt(i7 + 1)).width;
var twoWidths2 = openfl__$internal_text_TextEngine.__context.measureText(HxOverrides.substr(text2,i7,2)).width;
advance4 = twoWidths2 - nextWidth2;
} else advance4 = openfl__$internal_text_TextEngine.__context.measureText(text2.charAt(i7)).width;
advances4.push(advance4);
}
}
advances = advances4;
var width5 = 0.0;
var _g5 = 0;
while(_g5 < advances.length) {
var advance5 = advances[_g5];
++_g5;
width5 += advance5;
}
widthValue = width5;
if(layoutGroup != null && layoutGroup.startIndex != layoutGroup.endIndex) {
layoutGroup.advances = layoutGroup.advances.concat(advances);
layoutGroup.width += widthValue;
layoutGroup.endIndex = formatRange.end;
} else {
var endIndex2 = formatRange.end;
if(layoutGroup == null || layoutGroup.startIndex != layoutGroup.endIndex) {
layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,endIndex2);
_g.layoutGroups.push(layoutGroup);
} else {
layoutGroup.format = formatRange.format;
layoutGroup.startIndex = textIndex;
layoutGroup.endIndex = endIndex2;
}
var text3 = this.text;
var endIndex3 = formatRange.end;
var advances5 = [];
if(_g.__useIntAdvances == null) _g.__useIntAdvances = new EReg("Trident/7.0","").match(window.navigator.userAgent);
if(_g.__useIntAdvances) {
var previousWidth3 = 0.0;
var width6;
var _g17 = textIndex;
while(_g17 < endIndex3) {
var i8 = _g17++;
width6 = openfl__$internal_text_TextEngine.__context.measureText(text3.substring(textIndex,i8 + 1)).width;
advances5.push(width6 - previousWidth3);
previousWidth3 = width6;
}
} else {
var _g18 = textIndex;
while(_g18 < endIndex3) {
var i9 = _g18++;
var advance6;
if(i9 < text3.length - 1) {
var nextWidth3 = openfl__$internal_text_TextEngine.__context.measureText(text3.charAt(i9 + 1)).width;
var twoWidths3 = openfl__$internal_text_TextEngine.__context.measureText(HxOverrides.substr(text3,i9,2)).width;
advance6 = twoWidths3 - nextWidth3;
} else advance6 = openfl__$internal_text_TextEngine.__context.measureText(text3.charAt(i9)).width;
advances5.push(advance6);
}
}
layoutGroup.advances = advances5;
layoutGroup.offsetX = offsetX;
layoutGroup.ascent = ascent;
layoutGroup.descent = descent;
layoutGroup.leading = leading;
layoutGroup.lineIndex = lineIndex;
layoutGroup.offsetY = offsetY;
var advances6 = layoutGroup.advances;
var width7 = 0.0;
var _g6 = 0;
while(_g6 < advances6.length) {
var advance7 = advances6[_g6];
++_g6;
width7 += advance7;
}
layoutGroup.width = width7;
layoutGroup.height = heightValue;
}
offsetX += widthValue;
textIndex = formatRange.end;
}
if(rangeIndex < _g.textFormatRanges.get_length() - 1) {
rangeIndex++;
formatRange = _g.textFormatRanges.get(rangeIndex);
currentFormat.__merge(formatRange.format);
openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
ascent = currentFormat.size;
descent = currentFormat.size * 0.185;
leading = currentFormat.leading;
heightValue = ascent + descent + leading;
}
if(textIndex == formatRange.end) {
textIndex++;
break;
}
}
}
,setTextAlignment: function() {
var lineIndex = -1;
var offsetX = 0.0;
var totalWidth = this.width - 4;
var group;
var lineLength;
var _g1 = 0;
var _g = this.layoutGroups.get_length();
while(_g1 < _g) {
var i = _g1++;
group = this.layoutGroups.get(i);
if(group.lineIndex != lineIndex) {
lineIndex = group.lineIndex;
var _g2 = group.format.align;
switch(_g2) {
case 0:
if(this.lineWidths.get(lineIndex) < totalWidth) offsetX = Math.round((totalWidth - this.lineWidths.get(lineIndex)) / 2); else offsetX = 0;
break;
case 4:
if(this.lineWidths.get(lineIndex) < totalWidth) offsetX = Math.round(totalWidth - this.lineWidths.get(lineIndex)); else offsetX = 0;
break;
case 2:
if(this.lineWidths.get(lineIndex) < totalWidth) {
lineLength = 1;
var _g4 = i + 1;
var _g3 = this.layoutGroups.get_length();
while(_g4 < _g3) {
var j = _g4++;
if(this.layoutGroups.get(j).lineIndex == lineIndex) {
if(j == 0 || (function($this) {
var $r;
var index = $this.layoutGroups.get(j).startIndex - 1;
$r = HxOverrides.cca($this.text,index);
return $r;
}(this)) == 32) lineLength++;
} else break;
}
if(lineLength > 1) {
group = this.layoutGroups.get(i + lineLength - 1);
var endChar = HxOverrides.cca(this.text,group.endIndex);
if(group.endIndex < this.text.length && endChar != 10 && endChar != 13) {
offsetX = (totalWidth - this.lineWidths.get(lineIndex)) / (lineLength - 1);
var j1 = 0;
do {
if(j1 > 1 && (function($this) {
var $r;
var index1 = $this.layoutGroups.get(j1).startIndex - 1;
$r = HxOverrides.cca($this.text,index1);
return $r;
}(this)) != 32) {
this.layoutGroups.get(i + j1).offsetX += offsetX * (j1 - 1);
j1++;
}
this.layoutGroups.get(i + j1).offsetX += offsetX * j1;
} while(++j1 < lineLength);
}
}
}
offsetX = 0;
break;
default:
offsetX = 0;
}
}
if(offsetX > 0) group.offsetX += offsetX;
}
}
,update: function() {
if(this.text == null || !this.multiline && StringTools.trim(this.text) == "" || this.textFormatRanges.get_length() == 0) {
this.lineAscents.set_length(0);
this.lineBreaks.set_length(0);
this.lineDescents.set_length(0);
this.lineLeadings.set_length(0);
this.lineHeights.set_length(0);
this.lineWidths.set_length(0);
this.layoutGroups.set_length(0);
this.textWidth = 0;
this.textHeight = 0;
this.numLines = 1;
this.maxScrollH = 0;
this.maxScrollV = 1;
this.bottomScrollV = 1;
} else {
this.getLayoutGroups();
this.getLineMeasurements();
this.setTextAlignment();
}
this.getBounds();
}
,set_restrict: function(value) {
if(this.restrict == value) return this.restrict;
this.restrict = value;
if(this.restrict == null || this.restrict.length == 0) this.__restrictRegexp = null; else this.__restrictRegexp = this.createRestrictRegexp(value);
return this.restrict;
}
,set_text: function(value) {
if(value == null) return this.text = value;
if(this.__restrictRegexp != null) value = this.__restrictRegexp.split(value).join("");
if(this.maxChars > 0 && value.length > this.maxChars) value = HxOverrides.substr(value,0,this.maxChars);
this.text = value;
return this.text;
}
,__class__: openfl__$internal_text_TextEngine
,__properties__: {set_text:"set_text",set_restrict:"set_restrict"}
};
var oaktree_text_TextEngineOutline = function(textField) {
openfl__$internal_text_TextEngine.call(this,textField);
};
$hxClasses["oaktree.text.TextEngineOutline"] = oaktree_text_TextEngineOutline;
oaktree_text_TextEngineOutline.__name__ = ["oaktree","text","TextEngineOutline"];
oaktree_text_TextEngineOutline.__super__ = openfl__$internal_text_TextEngine;
oaktree_text_TextEngineOutline.prototype = $extend(openfl__$internal_text_TextEngine.prototype,{
outline: null
,outlineColor: null
,outlineWidth: null
,__class__: oaktree_text_TextEngineOutline
});
var oaktree_utils_Accounting = function() {
};
$hxClasses["oaktree.utils.Accounting"] = oaktree_utils_Accounting;
oaktree_utils_Accounting.__name__ = ["oaktree","utils","Accounting"];
oaktree_utils_Accounting.getInstance = function() {
if(oaktree_utils_Accounting._instance == null) oaktree_utils_Accounting._instance = new oaktree_utils_Accounting();
return oaktree_utils_Accounting._instance;
};
oaktree_utils_Accounting.checkPrecision = function(val,base) {
if(base == null) base = 10;
var tval = Math.round(Math.abs(val));
if(isNaN(tval)) return base; else return tval;
};
oaktree_utils_Accounting.checkCurrencyFormat = function(format) {
var defaults = oaktree_utils_Accounting.settings.currency.formatObj;
if(format != null && typeof(format) == "string" && format.indexOf("%v") != -1) return { pos : format, neg : StringTools.replace(StringTools.replace(format,"-",""),"%v","-%v"), zero : format}; else {
if(defaults == null) defaults = oaktree_utils_Accounting.settings.currency.formatObj = { pos : oaktree_utils_Accounting.settings.currency.format, neg : StringTools.replace(oaktree_utils_Accounting.settings.currency.format,"%v","-%v"), zero : oaktree_utils_Accounting.settings.currency.format};
return defaults;
}
};
oaktree_utils_Accounting.unformat = function(value,decimal) {
if(decimal == null) decimal = oaktree_utils_Accounting.settings.number.decimal; else decimal = decimal;
var regex = new EReg("[^0-9-" + decimal + "]","g");
var brackedValues = new EReg("\\((.*)\\)","");
var unformatted = Std.parseFloat(StringTools.replace(regex.replace(brackedValues.replace(value,"-$1"),""),decimal,"."));
if(!isNaN(unformatted)) return unformatted; else return 0;
};
oaktree_utils_Accounting.toFixed = function(value,precision) {
precision = oaktree_utils_Accounting.checkPrecision(precision,oaktree_utils_Accounting.settings.number.precision);
var power = Math.pow(10,precision);
return oaktree_utils_Maths.toFixed(Math.round(value * power) / power,precision);
};
oaktree_utils_Accounting.formatNumber = function(number,precision,thousand,decimal) {
var opts = oaktree_utils_Accounting.defaults({ precision : precision, thousand : thousand, decimal : decimal},oaktree_utils_Accounting.settings.number);
var usePrecision = oaktree_utils_Accounting.checkPrecision(opts.precision);
var negative;
if(number < 0) negative = "-"; else negative = "";
var base = Std.parseInt(oaktree_utils_Accounting.toFixed(Math.abs(number),usePrecision)) + "";
var mod;
if(base.length > 3) mod = base.length % 3; else mod = 0;
var digitsReg = new EReg("(\\d{3})(?=\\d)","g");
var phase1;
if(mod != 0) phase1 = HxOverrides.substr(base,0,mod) + opts.thousand; else phase1 = "";
var phase2 = digitsReg.replace(HxOverrides.substr(base,mod,null),"$1" + opts.thousand);
var splitPhase = oaktree_utils_Accounting.toFixed(Math.abs(number),usePrecision).split(".")[1];
var phase3;
if(usePrecision != 0) phase3 = opts.decimal + splitPhase; else phase3 = "";
return negative + phase1 + phase2 + phase3;
};
oaktree_utils_Accounting.copyAnonymous = function(v) {
var properties = Reflect.fields(v);
var anonymous = { };
var _g1 = 0;
var _g = properties.length;
while(_g1 < _g) {
var i = _g1++;
var property = properties[i];
Reflect.setField(anonymous,property,Reflect.getProperty(v,property));
}
return anonymous;
};
oaktree_utils_Accounting.defaults = function(obj,defaultObj) {
var ret = oaktree_utils_Accounting.copyAnonymous(defaultObj);
if(obj == null) return ret;
var fields = Reflect.fields(defaultObj);
var _g = 0;
while(_g < fields.length) {
var key = fields[_g];
++_g;
if(Object.prototype.hasOwnProperty.call(obj,key)) Reflect.setField(ret,key,Reflect.getProperty(obj,key));
}
return ret;
};
oaktree_utils_Accounting.formatMoney = function(number,options) {
var opts = oaktree_utils_Accounting.defaults(options,oaktree_utils_Accounting.settings.currency);
var formats = oaktree_utils_Accounting.checkCurrencyFormat(opts.format);
var useFormat;
if(number > 0) useFormat = formats.pos; else if(number < 0) useFormat = formats.neg; else useFormat = formats.zero;
var phase1 = StringTools.replace(useFormat,"%s",opts.symbol);
var formatedNumber = oaktree_utils_Accounting.formatNumber(Math.abs(number),oaktree_utils_Accounting.checkPrecision(opts.precision),opts.thousand,opts.decimal);
var phase2 = StringTools.replace(phase1,"%v",formatedNumber);
return phase2;
};
oaktree_utils_Accounting.getSymbol = function(currency_code,default_symbol) {
if(default_symbol == null) default_symbol = "$";
if(currency_code != null && (function($this) {
var $r;
var key = currency_code.toUpperCase();
$r = oaktree_utils_Accounting.codeToSymbolMap.exists(key);
return $r;
}(this))) {
var key1 = currency_code.toUpperCase();
return oaktree_utils_Accounting.codeToSymbolMap.get(key1);
} else return default_symbol;
};
oaktree_utils_Accounting.prototype = {
__class__: oaktree_utils_Accounting
};
var oaktree_utils_ArrayUtil = function() { };
$hxClasses["oaktree.utils.ArrayUtil"] = oaktree_utils_ArrayUtil;
oaktree_utils_ArrayUtil.__name__ = ["oaktree","utils","ArrayUtil"];
oaktree_utils_ArrayUtil.indexOf = function(arrayToCheck,objectToSearch) {
var _g1 = 0;
var _g = arrayToCheck.length;
while(_g1 < _g) {
var i = _g1++;
if(arrayToCheck[i] == objectToSearch) return i;
}
return -1;
};
var oaktree_utils_ByteConversions = function() { };
$hxClasses["oaktree.utils.ByteConversions"] = oaktree_utils_ByteConversions;
oaktree_utils_ByteConversions.__name__ = ["oaktree","utils","ByteConversions"];
oaktree_utils_ByteConversions.byteArrayToBytes = function(v) {
return openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(v);
};
oaktree_utils_ByteConversions.bytesToByteArray = function(v) {
return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(v);
};
oaktree_utils_ByteConversions.arrayBufferToBytes = function(v) {
return openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(v);
};
var openfl_utils_Timer = function(delay,repeatCount) {
if(repeatCount == null) repeatCount = 0;
if(isNaN(delay) || delay < 0) throw new js__$Boot_HaxeError(new openfl_errors_Error("The delay specified is negative or not a finite number"));
openfl_events_EventDispatcher.call(this);
this.__delay = delay;
this.set_repeatCount(repeatCount);
this.running = false;
this.currentCount = 0;
};
$hxClasses["openfl.utils.Timer"] = openfl_utils_Timer;
openfl_utils_Timer.__name__ = ["openfl","utils","Timer"];
openfl_utils_Timer.__super__ = openfl_events_EventDispatcher;
openfl_utils_Timer.prototype = $extend(openfl_events_EventDispatcher.prototype,{
currentCount: null
,repeatCount: null
,running: null
,__delay: null
,__timer: null
,__timerID: null
,reset: function() {
if(this.running) this.stop();
this.currentCount = 0;
}
,start: function() {
if(!this.running) {
this.running = true;
this.__timerID = window.setInterval($bind(this,this.timer_onTimer),this.__delay | 0);
}
}
,stop: function() {
this.running = false;
if(this.__timerID != null) {
window.clearInterval(this.__timerID);
this.__timerID = null;
}
}
,get_delay: function() {
return this.__delay;
}
,set_delay: function(value) {
this.__delay = value;
if(this.running) {
this.stop();
this.start();
}
return this.__delay;
}
,set_repeatCount: function(v) {
if(this.running && v != 0 && v <= this.currentCount) this.stop();
this.repeatCount = v;
return v;
}
,timer_onTimer: function() {
this.currentCount++;
if(this.repeatCount > 0 && this.currentCount >= this.repeatCount) {
this.stop();
this.dispatchEvent(new openfl_events_TimerEvent("timer"));
this.dispatchEvent(new openfl_events_TimerEvent("timerComplete"));
} else this.dispatchEvent(new openfl_events_TimerEvent("timer"));
}
,__class__: openfl_utils_Timer
,__properties__: {set_repeatCount:"set_repeatCount",set_delay:"set_delay",get_delay:"get_delay"}
});
var oaktree_utils_DataTimer = function(delay,repeatCount) {
if(repeatCount == null) repeatCount = 0;
this.data = { };
openfl_utils_Timer.call(this,delay,repeatCount);
};
$hxClasses["oaktree.utils.DataTimer"] = oaktree_utils_DataTimer;
oaktree_utils_DataTimer.__name__ = ["oaktree","utils","DataTimer"];
oaktree_utils_DataTimer.__super__ = openfl_utils_Timer;
oaktree_utils_DataTimer.prototype = $extend(openfl_utils_Timer.prototype,{
data: null
,__class__: oaktree_utils_DataTimer
});
var oaktree_utils_PicSize = $hxClasses["oaktree.utils.PicSize"] = { __ename__ : ["oaktree","utils","PicSize"], __constructs__ : ["Small","Square","Normal","Large","Custom"] };
oaktree_utils_PicSize.Small = ["Small",0];
oaktree_utils_PicSize.Small.toString = $estr;
oaktree_utils_PicSize.Small.__enum__ = oaktree_utils_PicSize;
oaktree_utils_PicSize.Square = ["Square",1];
oaktree_utils_PicSize.Square.toString = $estr;
oaktree_utils_PicSize.Square.__enum__ = oaktree_utils_PicSize;
oaktree_utils_PicSize.Normal = ["Normal",2];
oaktree_utils_PicSize.Normal.toString = $estr;
oaktree_utils_PicSize.Normal.__enum__ = oaktree_utils_PicSize;
oaktree_utils_PicSize.Large = ["Large",3];
oaktree_utils_PicSize.Large.toString = $estr;
oaktree_utils_PicSize.Large.__enum__ = oaktree_utils_PicSize;
oaktree_utils_PicSize.Custom = function(width,height) { var $x = ["Custom",4,width,height]; $x.__enum__ = oaktree_utils_PicSize; $x.toString = $estr; return $x; };
var oaktree_utils_FBUtils = function() { };
$hxClasses["oaktree.utils.FBUtils"] = oaktree_utils_FBUtils;
oaktree_utils_FBUtils.__name__ = ["oaktree","utils","FBUtils"];
oaktree_utils_FBUtils.getFBProfilePic = function(userId,size) {
var sizeStr;
var dimensionsStr = "";
switch(size[1]) {
case 0:
sizeStr = "small";
break;
case 2:
sizeStr = "normal";
break;
case 3:
sizeStr = "large";
break;
case 1:
sizeStr = "square";
break;
case 4:
var h = size[3];
var w = size[2];
sizeStr = "normal";
dimensionsStr = "&width=" + w + "&height=" + h;
break;
}
return "https://graph.facebook.com/" + userId + "/picture?type=" + sizeStr + dimensionsStr;
};
var oaktree_utils_FontUtils = function() { };
$hxClasses["oaktree.utils.FontUtils"] = oaktree_utils_FontUtils;
oaktree_utils_FontUtils.__name__ = ["oaktree","utils","FontUtils"];
oaktree_utils_FontUtils.registerFontOnHTML = function(id,fontUrl) {
var head = window.document.getElementsByTagName("head")[0];
var baseName = StringTools.replace(id,".ttf","");
var baseFontUrl = StringTools.replace(fontUrl,".ttf","");
var truetypeUrl = baseFontUrl + ".ttf";
var eotUrl = baseFontUrl + ".eot";
var woffFormat = baseFontUrl + ".woff";
var styleNode = window.document.createElement("style");
styleNode.setAttribute("type","text/css");
var styletext = "@font-face {\n";
styletext += " font-family: '" + baseName + "';\n";
styletext += " src: url('" + eotUrl + "') format('eot'), url('" + woffFormat + "') format('woff'), url('" + truetypeUrl + "') format('truetype');\n";
styletext += "}";
styleNode.innerHTML = styletext;
window.document.head.appendChild(styleNode);
var dummyNode = window.document.createElement("div");
dummyNode.setAttribute("style","font-family: \"" + baseName + "\"; position: absolute; left: -99999;");
dummyNode.innerHTML = " ";
window.document.body.appendChild(dummyNode);
};
var oaktree_utils_MCGraphics = function() { };
$hxClasses["oaktree.utils.MCGraphics"] = oaktree_utils_MCGraphics;
oaktree_utils_MCGraphics.__name__ = ["oaktree","utils","MCGraphics"];
oaktree_utils_MCGraphics.drawRoundRectComplex = function(_g,x,y,w,h,topLeftRadius,topRightRadius,bottomLeftRadius,bottomRightRadius) {
_g.moveTo(x + topLeftRadius,y);
_g.lineTo(x + w - topRightRadius,y);
_g.curveTo(x + w,y,w,y + topRightRadius);
_g.lineTo(x + w,y + h - bottomRightRadius);
_g.curveTo(x + w,y + h,x + w - bottomRightRadius,y + h);
_g.lineTo(x + bottomLeftRadius,y + h);
_g.curveTo(x,y + h,x,y + h - bottomLeftRadius);
_g.lineTo(x,y + topLeftRadius);
_g.curveTo(x,y,x + topLeftRadius,y);
};
var oaktree_utils_MacroUtils = function() { };
$hxClasses["oaktree.utils.MacroUtils"] = oaktree_utils_MacroUtils;
oaktree_utils_MacroUtils.__name__ = ["oaktree","utils","MacroUtils"];
var oaktree_utils_Maths = function() {
};
$hxClasses["oaktree.utils.Maths"] = oaktree_utils_Maths;
oaktree_utils_Maths.__name__ = ["oaktree","utils","Maths"];
oaktree_utils_Maths.fixed = function(value,precision) {
var n = Math.pow(10,precision);
return (value * n | 0) / n;
};
oaktree_utils_Maths.lerp = function(value,target,time) {
if(time < 0) time = 0; else if(time > 1) time = 1; else time = time;
return value + time * (target - value);
};
oaktree_utils_Maths.toFixed = function(x,decimalPlaces) {
if(isNaN(x)) return "NaN"; else {
var t = oaktree_utils_Maths.exp(10,decimalPlaces);
var s = Std.string(Math.round(x * t) / t);
var i = s.indexOf(".");
if(i != -1) {
var _g = HxOverrides.substr(s,i + 1,null).length;
while(_g < decimalPlaces) {
var i1 = _g++;
s += "0";
}
} else {
s += ".";
var _g1 = 0;
while(_g1 < decimalPlaces) {
var i2 = _g1++;
s += "0";
}
}
return s;
}
};
oaktree_utils_Maths.exp = function(a,n) {
var t = 1;
var r = 0;
while(true) {
if((n & 1) != 0) t = a * t;
n >>= 1;
if(n == 0) {
r = t;
break;
} else a *= a;
}
return r;
};
oaktree_utils_Maths.clamp = function(value,min,max) {
if(value < min) return min; else if(value > max) return max; else return value;
};
oaktree_utils_Maths.clampI = function(value,min,max) {
if(value < min) return min; else if(value > max) return max; else return value;
};
oaktree_utils_Maths.prototype = {
__class__: oaktree_utils_Maths
};
var oaktree_utils_ObjectUtility = function() { };
$hxClasses["oaktree.utils.ObjectUtility"] = oaktree_utils_ObjectUtility;
oaktree_utils_ObjectUtility.__name__ = ["oaktree","utils","ObjectUtility"];
oaktree_utils_ObjectUtility.copyProperties = function(src,dst,ignoreProperties) {
var _g = 0;
var _g1 = Reflect.fields(src);
while(_g < _g1.length) {
var k = _g1[_g];
++_g;
if(ignoreProperties == null || !(HxOverrides.indexOf(ignoreProperties,k,0) != -1)) Reflect.setProperty(dst,k,Reflect.field(src,k));
}
};
oaktree_utils_ObjectUtility.mergeObjects = function(obj1,obj2) {
var mergedObj = oaktree_utils_ObjectUtility.cloneObject(obj1);
oaktree_utils_ObjectUtility.copyProperties(obj2,mergedObj);
return mergedObj;
};
oaktree_utils_ObjectUtility.cloneObject = function(obj) {
var clone = { };
oaktree_utils_ObjectUtility.copyProperties(obj,clone);
return clone;
};
var openfl_display_Bitmap = function(bitmapData,pixelSnapping,smoothing) {
if(smoothing == null) smoothing = false;
openfl_display_DisplayObject.call(this);
this.set_bitmapData(bitmapData);
this.pixelSnapping = pixelSnapping;
this.smoothing = smoothing;
if(pixelSnapping == null) this.pixelSnapping = 1;
};
$hxClasses["openfl.display.Bitmap"] = openfl_display_Bitmap;
openfl_display_Bitmap.__name__ = ["openfl","display","Bitmap"];
openfl_display_Bitmap.__super__ = openfl_display_DisplayObject;
openfl_display_Bitmap.prototype = $extend(openfl_display_DisplayObject.prototype,{
bitmapData: null
,pixelSnapping: null
,smoothing: null
,__image: null
,__imageVersion: null
,__getBounds: function(rect,matrix) {
if(this.bitmapData != null) {
var bounds = openfl_geom_Rectangle.__pool.get();
bounds.setTo(0,0,this.bitmapData.width,this.bitmapData.height);
bounds.__transform(bounds,matrix);
rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
openfl_geom_Rectangle.__pool.release(bounds);
}
}
,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
if(!hitObject.get_visible() || this.__isMask || this.bitmapData == null) return false;
if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) return false;
this.__getRenderTransform();
var px = this.__renderTransform.__transformInverseX(x,y);
var py = this.__renderTransform.__transformInverseY(x,y);
if(px > 0 && py > 0 && px <= this.bitmapData.width && py <= this.bitmapData.height) {
if(this.__scrollRect != null && !this.__scrollRect.contains(px,py)) return false;
if(stack != null && !interactiveOnly) stack.push(hitObject);
return true;
}
return false;
}
,__hitTestMask: function(x,y) {
if(this.bitmapData == null) return false;
this.__getRenderTransform();
var px = this.__renderTransform.__transformInverseX(x,y);
var py = this.__renderTransform.__transformInverseY(x,y);
if(px > 0 && py > 0 && px <= this.bitmapData.width && py <= this.bitmapData.height) return true;
return false;
}
,__renderCairo: function(renderSession) {
}
,__renderCairoMask: function(renderSession) {
renderSession.cairo.rectangle(0,0,this.get_width(),this.get_height());
}
,__renderCanvas: function(renderSession) {
openfl__$internal_renderer_canvas_CanvasBitmap.render(this,renderSession);
}
,__renderCanvasMask: function(renderSession) {
renderSession.context.rect(0,0,this.get_width(),this.get_height());
}
,__renderDOM: function(renderSession) {
}
,__renderGL: function(renderSession) {
openfl__$internal_renderer_opengl_GLBitmap.render(this,renderSession);
}
,__updateMask: function(maskGraphics) {
if(this.bitmapData == null) return;
maskGraphics.__commands.overrideMatrix(this.__worldTransform);
maskGraphics.beginFill(0);
maskGraphics.drawRect(0,0,this.bitmapData.width,this.bitmapData.height);
if(maskGraphics.__bounds == null) maskGraphics.__bounds = new openfl_geom_Rectangle();
this.__getBounds(maskGraphics.__bounds,openfl_geom_Matrix.__identity);
openfl_display_DisplayObject.prototype.__updateMask.call(this,maskGraphics);
}
,set_bitmapData: function(value) {
this.bitmapData = value;
this.smoothing = false;
if(!this.__renderDirty) {
this.__renderDirty = true;
this.__setParentRenderDirty();
}
if(this.__filters != null && this.__filters.length > 0) {
}
return this.bitmapData;
}
,get_height: function() {
if(this.bitmapData != null) return this.bitmapData.height * Math.abs(this.get_scaleY());
return 0;
}
,set_height: function(value) {
if(this.bitmapData != null) {
if(value != this.bitmapData.height) {
if(!this.__renderDirty) {
this.__renderDirty = true;
this.__setParentRenderDirty();
}
this.set_scaleY(value / this.bitmapData.height);
}
return value;
}
return 0;
}
,get_width: function() {
if(this.bitmapData != null) return this.bitmapData.width * Math.abs(this.__scaleX);
return 0;
}
,set_width: function(value) {
if(this.bitmapData != null) {
if(value != this.bitmapData.width) {
if(!this.__renderDirty) {
this.__renderDirty = true;
this.__setParentRenderDirty();
}
this.set_scaleX(value / this.bitmapData.width);
}
return value;
}
return 0;
}
,__class__: openfl_display_Bitmap
,__properties__: $extend(openfl_display_DisplayObject.prototype.__properties__,{set_bitmapData:"set_bitmapData"})
});
var oaktree_utils_Slice9Bitmap = function(pSource,slice9Grid,pixelSnapping,smoothing) {
if(smoothing == null) smoothing = true;
this.isHorizontal = false;
this._sourceBitmapData = pSource;
this._slices = [];
if(pixelSnapping == null) pixelSnapping = 0;
openfl_display_Bitmap.call(this,null,pixelSnapping,smoothing);
this._grid = slice9Grid;
this._renderWidth = pSource.width;
this._renderHeight = pSource.height;
this.update();
this.render();
};
$hxClasses["oaktree.utils.Slice9Bitmap"] = oaktree_utils_Slice9Bitmap;
oaktree_utils_Slice9Bitmap.__name__ = ["oaktree","utils","Slice9Bitmap"];
oaktree_utils_Slice9Bitmap.fromFrameSpriteVO = function(pSource,config) {
return new oaktree_utils_Slice9Bitmap(pSource,new openfl_geom_Rectangle(config.leftX,config.topY,Math.max(pSource.width - config.rightX - config.leftX,1),Math.max(pSource.height - config.bottomY - config.topY,1)));
};
oaktree_utils_Slice9Bitmap.__super__ = openfl_display_Bitmap;
oaktree_utils_Slice9Bitmap.prototype = $extend(openfl_display_Bitmap.prototype,{
isHorizontal: null
,_sourceBitmapData: null
,_grid: null
,_renderWidth: null
,_renderHeight: null
,_slices: null
,update: function() {
var slice1X = 0.0;
var slice2X = this._grid.x;
var slice3X = this._grid.x + this._grid.width;
var slice1Y = 0.0;
var slice2Y = this._grid.y;
var slice3Y = this._grid.y + this._grid.height;
var slice1Width = this._grid.x;
var slice2Width = this._grid.width;
var slice3Width = this._sourceBitmapData.width - this._grid.width - this._grid.x;
var slice1Height = this._grid.y;
var slice2Height = this._grid.height;
var slice3Height = this._sourceBitmapData.height - this._grid.height - this._grid.y;
var tempGrid = new openfl_geom_Rectangle();
tempGrid.setTo(slice1X,slice1Y,slice1Width,slice1Height);
this._slices[0] = this.getSliceBitmapData(tempGrid);
tempGrid.setTo(slice2X,slice1Y,slice2Width,slice1Height);
this._slices[1] = this.getSliceBitmapData(tempGrid);
tempGrid.setTo(slice3X,slice1Y,slice3Width,slice1Height);
this._slices[2] = this.getSliceBitmapData(tempGrid);
tempGrid.setTo(slice1X,slice2Y,slice1Width,slice2Height);
this._slices[3] = this.getSliceBitmapData(tempGrid);
tempGrid.setTo(slice2X,slice2Y,slice2Width,slice2Height);
this._slices[4] = this.getSliceBitmapData(tempGrid);
tempGrid.setTo(slice3X,slice2Y,slice3Width,slice2Height);
this._slices[5] = this.getSliceBitmapData(tempGrid);
tempGrid.setTo(slice1X,slice3Y,slice1Width,slice3Height);
this._slices[6] = this.getSliceBitmapData(tempGrid);
tempGrid.setTo(slice2X,slice3Y,slice2Width,slice3Height);
this._slices[7] = this.getSliceBitmapData(tempGrid);
tempGrid.setTo(slice3X,slice3Y,slice3Width,slice3Height);
this._slices[8] = this.getSliceBitmapData(tempGrid);
}
,render: function() {
if(this._renderWidth <= 0 || this._renderHeight <= 0) return;
this.set_bitmapData(new openfl_display_BitmapData(this._renderWidth,this._renderHeight,true,16777215));
var destPoint = new openfl_geom_Point();
var column = 0;
var row = 0;
var sliceBitmapData;
var sliceBounds = new openfl_geom_Rectangle();
var _g = 0;
while(_g < 9) {
var i = _g++;
column = i % 3;
row = Math.floor(i / 3);
sliceBitmapData = this._slices[i];
if(sliceBitmapData != null) {
sliceBounds.width = sliceBitmapData.width;
sliceBounds.height = sliceBitmapData.height;
}
if((column == 0 || column == 2) && (row == 0 || row == 2)) {
if(sliceBitmapData != null) this.bitmapData.copyPixels(sliceBitmapData,sliceBitmapData.rect,destPoint);
} else {
if(column == 1) {
sliceBounds.width = this._renderWidth - this._grid.x - (this._sourceBitmapData.width - this._grid.width - this._grid.x);
sliceBounds.width = Math.max(0,sliceBounds.width);
}
if(row == 1) {
sliceBounds.height = this._renderHeight - this._grid.y - (this._sourceBitmapData.height - this._grid.height - this._grid.y);
sliceBounds.height = Math.max(0,sliceBounds.height);
}
if(sliceBitmapData != null) {
var transMatrix = new openfl_geom_Matrix();
transMatrix.scale(sliceBounds.width / sliceBitmapData.width,sliceBounds.height / sliceBitmapData.height);
transMatrix.translate(destPoint.x,destPoint.y);
this.bitmapData.draw(sliceBitmapData,transMatrix);
}
}
if(column == 2) {
destPoint.x = 0;
destPoint.y += sliceBounds.height;
} else destPoint.x += sliceBounds.width;
}
}
,setSize: function(pW,pH) {
pW = Math.round(pW);
pH = Math.round(pH);
if(pW > this._sourceBitmapData.width) this._renderWidth = pW;
if(pH > this._sourceBitmapData.height) this._renderHeight = pH;
this.update();
this.render();
}
,getSliceBitmapData: function(sourceRect) {
var sliceBitmapData = null;
if(sourceRect.width > 0 && sourceRect.height > 0) {
sliceBitmapData = new openfl_display_BitmapData(Math.floor(sourceRect.width),Math.floor(sourceRect.height),true,16777215);
sliceBitmapData.copyPixels(this._sourceBitmapData,sourceRect,oaktree_utils_Slice9Bitmap.POINT_ZERO);
}
return sliceBitmapData;
}
,__class__: oaktree_utils_Slice9Bitmap
});
var oaktree_utils_State = function(_options) {
this.inited = false;
this.active = false;
this.enabled = false;
this.name = "";
if(_options != null && _options.name != null) this.name = _options.name;
};
$hxClasses["oaktree.utils.State"] = oaktree_utils_State;
oaktree_utils_State.__name__ = ["oaktree","utils","State"];
oaktree_utils_State.prototype = {
name: null
,machine: null
,enabled: null
,active: null
,inited: null
,init: function() {
}
,enable: function(_enable_with) {
this.machine.enable(this.name,_enable_with);
}
,disable: function(_disable_with) {
this.machine.disable(this.name,_disable_with);
}
,destroy: function() {
this.machine.kill(this.name);
}
,onEnter: function(options) {
}
,onLeave: function(options) {
}
,onEnabled: function(options) {
}
,onDisabled: function(options) {
}
,onAdded: function() {
}
,onRemoved: function() {
}
,onDestroy: function() {
}
,_init: function() {
if(!this.inited) {
this.inited = true;
this.init();
}
}
,__class__: oaktree_utils_State
};
var oaktree_utils_States = function(_options) {
this.active_count = 0;
this._state_count = 0;
this.createOnGet = false;
this.name = "";
openfl_events_EventDispatcher.call(this);
if(_options != null && _options.name != null) this.name = _options.name;
this._states = new haxe_ds_StringMap();
this.active_states = [];
};
$hxClasses["oaktree.utils.States"] = oaktree_utils_States;
oaktree_utils_States.__name__ = ["oaktree","utils","States"];
oaktree_utils_States.__super__ = openfl_events_EventDispatcher;
oaktree_utils_States.prototype = $extend(openfl_events_EventDispatcher.prototype,{
name: null
,createOnGet: null
,_states: null
,_state_count: null
,active_states: null
,current_state: null
,active_count: null
,enter: function(_state,opts) {
_state.onEnter(opts);
this.active_states.push(_state);
this.active_count++;
_state.active = true;
}
,leave: function(_state,opts) {
_state.active = false;
HxOverrides.remove(this.active_states,_state);
this.active_count--;
_state.onLeave(opts);
}
,add: function(_state) {
this._states.set(_state.name,_state);
this._state_count++;
_state.machine = this;
_state.onAdded();
this.debugStates();
return _state;
}
,remove: function(_name,opts) {
if(this._states.exists(_name)) {
var _state = this._states.get(_name);
if(_state != null) {
if(_state.active) {
this.leave(_state,opts);
if(_state == this.current_state) this.current_state = null;
}
if(_state.enabled) this.disable(_state.name);
_state.onRemoved();
this._states.remove(_name);
this._state_count--;
}
return _state;
}
this.debugStates();
return null;
}
,kill: function(_name) {
if(this._state_count > 0) {
if(this._states.exists(_name)) {
var _state = this.remove(_name);
if(_state != null) _state.onDestroy();
}
}
}
,enable: function(_name,opts) {
if(!this.createOnGet && this._state_count == 0) return;
if(this.isEnabled(_name)) return;
var state = this.getState(_name,this.createOnGet);
if(state != null) {
state.onEnabled(opts);
state.active = true;
state.enabled = true;
this.active_states.push(state);
this.active_count++;
this.dispatchEvent(new oaktree_events_StateEvent("oaktree.utils.state_change",_name,true));
}
}
,disable: function(_name,opts) {
if(!this.createOnGet && this._state_count == 0) return;
var state = this.getState(_name,this.createOnGet);
if(state != null) {
state.onDisabled(opts);
state.active = false;
state.enabled = false;
HxOverrides.remove(this.active_states,state);
this.active_count--;
this.dispatchEvent(new oaktree_events_StateEvent("oaktree.utils.state_change",_name,false));
}
}
,set: function(name,enter_opts,leave_opts) {
if(this.current_state != null) {
this.leave(this.current_state,leave_opts);
this.current_state = null;
}
if(this._states.exists(name)) {
this.current_state = this._states.get(name);
this.enter(this.current_state,enter_opts);
}
}
,getState: function(_name,createIfNull) {
if(createIfNull == null) createIfNull = false;
if(this._states.exists(_name)) return this._states.get(_name); else if(createIfNull) {
var state = new oaktree_utils_State({ name : _name});
this.add(state);
return state;
}
return null;
}
,isTopState: function(name) {
if(this.getTopState() != null) return this.getTopState().name == name;
return false;
}
,getTopState: function() {
if(this.active_states.length > 0) return this.active_states[this.active_states.length - 1];
return null;
}
,isActive: function(name) {
var _g = 0;
var _g1 = this.active_states;
while(_g < _g1.length) {
var state = _g1[_g];
++_g;
if(state.name == name) return true;
}
return false;
}
,isEnabled: function(name) {
if(this._states.exists(name)) return this._states.get(name).enabled;
return false;
}
,debugStates: function() {
var _g = 0;
var _g1 = this.active_states;
while(_g < _g1.length) {
var state = _g1[_g];
++_g;
null;
}
}
,__class__: oaktree_utils_States
});
var oaktree_utils_StringUtility = function() {
throw new js__$Boot_HaxeError(new openfl_errors_Error("StringUtility is a static class. It should not be instantiated"));
};
$hxClasses["oaktree.utils.StringUtility"] = oaktree_utils_StringUtility;
oaktree_utils_StringUtility.__name__ = ["oaktree","utils","StringUtility"];
oaktree_utils_StringUtility.compareStrings = function(str1,str2) {
if(str1 == null) return -1; else if(str2 == null) return 1;
str1 = str1.toLowerCase();
str2 = str2.toLowerCase();
if(str1 < str2) return -1; else if(str1 > str2) return 1; else return 0;
};
oaktree_utils_StringUtility.isEmpty = function(str) {
return str == null || str == "";
};
oaktree_utils_StringUtility.isBlank = function(str) {
return str == null || str == "" || !new EReg("\\S","").match(str);
};
oaktree_utils_StringUtility.formatNumber = function(n,format,separatorChar) {
if(separatorChar == null) separatorChar = ",";
if(format == null || format == "") if(n == null) return "null"; else return "" + n;
if(format != null) switch(format) {
case "n":
return oaktree_utils_StringUtility.commaSeperateThousands(n,separatorChar);
case "p":
return oaktree_utils_StringUtility.formatPercentage(n);
}
var decimalIndex = format.indexOf(".");
if(decimalIndex >= 0) return oaktree_utils_StringUtility.formatInteger(Math.floor(n),HxOverrides.substr(format,0,decimalIndex)) + "." + oaktree_utils_StringUtility.formatNumberDecimal(n,HxOverrides.substr(format,decimalIndex + 1,null)); else return oaktree_utils_StringUtility.formatInteger(Math.floor(n),format);
};
oaktree_utils_StringUtility.commaSeperateThousands = function(n,separatorChar) {
if(separatorChar == null) separatorChar = ",";
var number = Std.string(Math.abs(n));
var decimalIndex = number.indexOf(".");
var str = "";
if(decimalIndex >= 0) {
str = "." + HxOverrides.substr(number,decimalIndex,null);
number = HxOverrides.substr(number,0,decimalIndex);
}
var numberLength = number.length;
var numberIndex = numberLength - 1;
var commaCount = Math.floor((numberLength - 1) / 3);
var _g = 0;
while(_g < commaCount) {
var j = _g++;
str = separatorChar + HxOverrides.substr(number,numberLength - (j + 1) * 3,3) + str;
}
str = HxOverrides.substr(number,0,numberLength - commaCount * 3) + str;
if(n < 0) str = "-" + str;
return str;
};
oaktree_utils_StringUtility.formatInteger = function(i,format) {
var number = Std.string(Math.floor(Math.abs(i)));
var numberLength = number.length;
var numberIndex = numberLength - 1;
var str = "";
var _g1 = 0;
var _g = format.length;
while(_g1 < _g) {
var k = _g1++;
var formatChar = format.charAt(format.length - k - 1);
switch(formatChar) {
case "#":
if(numberIndex >= 0) {
str = number.charAt(numberIndex) + str;
numberIndex--;
}
break;
case "0":
if(numberIndex >= 0) str = number.charAt(numberIndex) + str; else str = formatChar + str;
numberIndex--;
break;
default:
str = formatChar + str;
}
}
if(numberIndex >= 0) str = HxOverrides.substr(number,0,numberIndex + 1) + str;
if(i < 0) str = "-" + str;
return str;
};
oaktree_utils_StringUtility.formatNumberDecimal = function(n,format) {
var number;
if(n == null) number = "null"; else number = "" + n;
var decimalIndex = number.indexOf(".");
if(decimalIndex < 0) number = ""; else number = HxOverrides.substr(number,decimalIndex + 1,null);
var numberLength = number.length;
var numberIndex = 0;
var str = "";
var _g1 = 0;
var _g = format.length;
while(_g1 < _g) {
var k = _g1++;
var formatChar = format.charAt(k);
switch(formatChar) {
case "#":
if(numberIndex < numberLength) {
str += number.charAt(numberIndex);
numberIndex++;
}
break;
case "0":
if(numberIndex < numberLength) str += number.charAt(numberIndex); else str += formatChar;
numberIndex++;
break;
default:
str = formatChar + str;
}
}
return str;
};
oaktree_utils_StringUtility.formatPercentage = function(p) {
return Math.round(100 * p) + "%";
};
oaktree_utils_StringUtility.formatTime = function(totalSeconds) {
var seconds = totalSeconds % 60;
return Math.floor(totalSeconds / 60) + ":" + (seconds < 10?"0" + seconds:seconds == null?"null":"" + seconds);
};
oaktree_utils_StringUtility.formatFloat = function(n,decimalPlaces) {
if(decimalPlaces == null) decimalPlaces = -1;
if(decimalPlaces >= 0) {
var p = Std["int"](Math.pow(10,decimalPlaces));
n = Math.round(n * p) / p;
}
if(n == null) return "null"; else return "" + n;
};
oaktree_utils_StringUtility.withFormat = function(pSrc,pParams) {
var result = pSrc;
try {
if(pParams != null) {
if((pParams instanceof Array) && pParams.__enum__ == null) {
var arr = pParams;
var _g = 0;
while(_g < arr.length) {
var value = arr[_g];
++_g;
if(((value | 0) === value)) result = oaktree_utils_StringUtility.intReg.replace(result,value); else result = oaktree_utils_StringUtility.stringReg.replace(result,value);
}
} else {
var fields = Reflect.fields(pParams);
var _g1 = 0;
while(_g1 < fields.length) {
var field = fields[_g1];
++_g1;
result = StringTools.replace(result,"%" + field + "%",Reflect.field(pParams,field));
}
}
}
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
}
return result;
};
oaktree_utils_StringUtility.getFormattedAmountString = function(amount,rollUp,unbreakable,countryCode,minimumFormattingAmount,forceNumberOfFractionalDigits,roundingMode,dontRoundIfPresentingWrongNumber) {
if(dontRoundIfPresentingWrongNumber == null) dontRoundIfPresentingWrongNumber = true;
if(roundingMode == null) roundingMode = "up";
if(forceNumberOfFractionalDigits == null) forceNumberOfFractionalDigits = 0;
if(minimumFormattingAmount == null) minimumFormattingAmount = 1000;
if(unbreakable == null) unbreakable = false;
if(rollUp == null) rollUp = false;
if(amount == null) return null;
var formattedString = "";
var value = amount;
var groupingSeparator;
if(unbreakable) groupingSeparator = " "; else groupingSeparator = " ";
var divider = 1.0;
var presenterDivider = 1.0;
if(!rollUp || value < 1000 || value < minimumFormattingAmount) {
var numberFormatter = oaktree_utils_Accounting.formatNumber(amount,forceNumberOfFractionalDigits,groupingSeparator,",");
return numberFormatter;
} else {
var postfix = "";
if(countryCode == null) countryCode = "";
if(countryCode == "jp") {
if(value >= 10000) {
postfix = "万";
divider = 10000.0;
presenterDivider = 1000.0;
}
} else if(countryCode == "cn") {
if(value >= 1000000) {
postfix = "k";
divider = 1000.0;
presenterDivider = 100.0;
}
} else if(value >= 1000000000) {
postfix = "B";
divider = 1000000000.0;
presenterDivider = 100000000.0;
} else if(value >= 1000000) {
postfix = "M";
divider = 1000000.0;
presenterDivider = 100000.0;
} else if(value >= 1000) {
postfix = "k";
divider = 1000.0;
presenterDivider = 100.0;
}
var finalValue = amount / divider;
var roundPresenter = true;
if(dontRoundIfPresentingWrongNumber) {
roundPresenter = value % presenterDivider == 0;
if(!roundPresenter) finalValue = amount;
}
if(_$UInt_UInt_$Impl_$.gt(forceNumberOfFractionalDigits,0)) {
} else if(value % divider != 0 && roundPresenter) forceNumberOfFractionalDigits = 1;
var numberFormatter1 = oaktree_utils_Accounting.formatNumber(finalValue,forceNumberOfFractionalDigits,groupingSeparator,",");
if(!(postfix == null || postfix == "") && roundPresenter) formattedString += postfix;
}
return formattedString;
};
oaktree_utils_StringUtility.prototype = {
__class__: oaktree_utils_StringUtility
};
var oaktree_utils_WarehouseInstance = function() {
this._storage = new haxe_ds_StringMap();
};
$hxClasses["oaktree.utils.WarehouseInstance"] = oaktree_utils_WarehouseInstance;
oaktree_utils_WarehouseInstance.__name__ = ["oaktree","utils","WarehouseInstance"];
oaktree_utils_WarehouseInstance.prototype = {
_storage: null
,store: function(id,obj) {
var value = obj;
this._storage.set(id,value);
return obj;
}
,fetch: function(id) {
if(this._storage.get(id) == null) haxe_Log.trace("no object found with handle '" + id + "'",{ fileName : "Warehouse.hx", lineNumber : 30, className : "oaktree.utils.WarehouseInstance", methodName : "fetch"});
return this._storage.get(id);
}
,'delete': function(id) {
if(!this._storage.remove(id)) haxe_Log.trace("no object found with handle '" + id + "'",{ fileName : "Warehouse.hx", lineNumber : 42, className : "oaktree.utils.WarehouseInstance", methodName : "delete"});
}
,__class__: oaktree_utils_WarehouseInstance
};
var oaktree_utils_Warehouse = function() { };
$hxClasses["oaktree.utils.Warehouse"] = oaktree_utils_Warehouse;
oaktree_utils_Warehouse.__name__ = ["oaktree","utils","Warehouse"];
oaktree_utils_Warehouse.store = function(id,obj) {
return oaktree_utils_Warehouse._store.store(id,obj);
};
oaktree_utils_Warehouse.fetch = function(id) {
return oaktree_utils_Warehouse._store.fetch(id);
};
oaktree_utils_Warehouse["delete"] = function(id) {
oaktree_utils_Warehouse._store["delete"](id);
return;
};
var openfl_display_MovieClip = function() {
openfl_display_Sprite.call(this);
this.__currentFrame = 0;
this.__currentLabels = [];
this.__totalFrames = 0;
this.enabled = true;
if(openfl_display_MovieClip.__initSymbol != null) {
this.__swf = openfl_display_MovieClip.__initSWF;
this.__symbol = openfl_display_MovieClip.__initSymbol;
openfl_display_MovieClip.__initSWF = null;
openfl_display_MovieClip.__initSymbol = null;
this.__fromSymbol(this.__swf,this.__symbol);
}
};
$hxClasses["openfl.display.MovieClip"] = openfl_display_MovieClip;
openfl_display_MovieClip.__name__ = ["openfl","display","MovieClip"];
openfl_display_MovieClip.__super__ = openfl_display_Sprite;
openfl_display_MovieClip.prototype = $extend(openfl_display_Sprite.prototype,{
enabled: null
,__currentFrame: null
,__currentFrameLabel: null
,__currentLabel: null
,__currentLabels: null
,__frameScripts: null
,__frameTime: null
,__lastUpdate: null
,__maskCount: null
,__objectDepths: null
,__objects: null
,__playing: null
,__swf: null
,__symbol: null
,__timeElapsed: null
,__totalFrames: null
,__zeroSymbol: null
,addFrameScript: function(index,method) {
if(method != null) {
if(this.__frameScripts == null) this.__frameScripts = new haxe_ds_IntMap();
this.__frameScripts.h[index] = method;
} else if(this.__frameScripts != null) this.__frameScripts.remove(index);
}
,gotoAndPlay: function(frame,scene) {
if(this.__symbol != null) {
this.__currentFrame = this.__getFrame(frame);
this.__updateFrame();
this.play();
}
}
,gotoAndStop: function(frame,scene) {
if(this.__symbol != null) {
this.__currentFrame = this.__getFrame(frame);
this.__updateFrame();
this.stop();
}
}
,nextFrame: function() {
if(this.__symbol != null) {
var next = this.__currentFrame + 1;
if(next > this.__totalFrames) next = this.__totalFrames;
this.gotoAndStop(next);
}
}
,play: function() {
if(this.__symbol != null) {
if(!this.__playing && this.__totalFrames > 1) {
this.__playing = true;
this.__frameTime = 1000 / this.__swf.frameRate | 0;
this.__timeElapsed = 0;
}
}
}
,prevFrame: function() {
if(this.__symbol != null) {
var previous = this.__currentFrame - 1;
if(previous < 1) previous = 1;
this.gotoAndStop(previous);
}
}
,stop: function() {
if(this.__symbol != null) {
if(this.__playing) this.__playing = false;
}
}
,__applyTween: function(start,end,ratio) {
return start + (end - start) * ratio;
}
,__enterFrame: function(deltaTime) {
if(this.__symbol != null) {
if(this.__playing) {
this.__timeElapsed += deltaTime;
var advanceFrames = Math.floor(this.__timeElapsed / this.__frameTime);
this.__timeElapsed = this.__timeElapsed % this.__frameTime;
if(this.__frameScripts != null) {
var _g = 0;
while(_g < advanceFrames) {
var i = _g++;
this.__currentFrame++;
if(this.__currentFrame > this.__totalFrames) this.__currentFrame = 1;
if(this.__frameScripts.h.hasOwnProperty(this.__currentFrame - 1)) {
this.__frameScripts.h[this.__currentFrame - 1]();
if(!this.__playing) break;
}
}
} else {
this.__currentFrame += advanceFrames;
while(this.__currentFrame > this.__totalFrames) this.__currentFrame -= this.__totalFrames;
}
this.__updateFrame();
}
}
openfl_display_Sprite.prototype.__enterFrame.call(this,deltaTime);
}
,__fromSymbol: function(swf,symbol) {
if(this.__objects != null) return;
this.__swf = swf;
this.__symbol = symbol;
this.__lastUpdate = -1;
this.__maskCount = 0;
this.__objectDepths = [];
this.__objects = new haxe_ds_IntMap();
this.__zeroSymbol = -1;
this.__currentFrame = 1;
this.__totalFrames = this.__symbol.frames.length;
var _g1 = 0;
var _g = this.__symbol.frames.length;
while(_g1 < _g) {
var i = _g1++;
if(this.__symbol.frames[i].label != null) this.__currentLabels.push(new openfl_display_FrameLabel(this.__symbol.frames[i].label,i + 1));
}
this.__updateFrame();
var _g2 = 0;
var _g11 = Type.getInstanceFields(js_Boot.getClass(this));
while(_g2 < _g11.length) {
var field = _g11[_g2];
++_g2;
var _g21 = 0;
var _g3 = this.__children;
while(_g21 < _g3.length) {
var child = _g3[_g21];
++_g21;
if(child.get_name() == field) this[field] = child;
}
}
if(this.__totalFrames > 1) this.play();
}
,__getFrame: function(frame) {
if(((frame | 0) === frame)) {
var index = frame;
if(index < 1) return 1;
if(index > this.__totalFrames) return this.__totalFrames;
return index;
} else if(typeof(frame) == "string") {
var label = frame;
var _g = 0;
var _g1 = this.__currentLabels;
while(_g < _g1.length) {
var frameLabel = _g1[_g];
++_g;
if(frameLabel.get_name() == label) return frameLabel.get_frame();
}
}
return 1;
}
,__placeObject: function(displayObject,frameObject) {
if(frameObject.name != null) displayObject.set_name(frameObject.name);
if(frameObject.matrix != null) displayObject.get_transform().set_matrix(frameObject.matrix);
if(frameObject.colorTransform != null) displayObject.get_transform().set_colorTransform(frameObject.colorTransform);
if(frameObject.filters != null) {
var filters = [];
var _g = 0;
var _g1 = frameObject.filters;
while(_g < _g1.length) {
var filter = _g1[_g];
++_g;
switch(filter[1]) {
case 0:
var quality = filter[4];
var blurY = filter[3];
var blurX = filter[2];
filters.push(new openfl_filters_BlurFilter(blurX,blurY,quality));
break;
case 1:
var matrix = filter[2];
filters.push(new openfl_filters_ColorMatrixFilter(matrix));
break;
case 2:
var hideObject = filter[12];
var knockout = filter[11];
var inner = filter[10];
var quality1 = filter[9];
var strength = filter[8];
var blurY1 = filter[7];
var blurX1 = filter[6];
var alpha = filter[5];
var color = filter[4];
var angle = filter[3];
var distance = filter[2];
filters.push(new openfl_filters_DropShadowFilter(distance,angle,color,alpha,blurX1,blurY1,strength,quality1,inner,knockout,hideObject));
break;
case 3:
var knockout1 = filter[9];
var inner1 = filter[8];
var quality2 = filter[7];
var strength1 = filter[6];
var blurY2 = filter[5];
var blurX2 = filter[4];
var alpha1 = filter[3];
var color1 = filter[2];
filters.push(new openfl_filters_GlowFilter(color1,alpha1,blurX2,blurY2,strength1,quality2,inner1,knockout1));
break;
}
}
displayObject.set_filters(filters);
}
displayObject.set_visible(frameObject.visible);
}
,__renderFrame: function(index) {
var previousIndex = this.__lastUpdate - 1;
if(previousIndex > index) {
var timelineObject1;
var exists;
var i = 0;
while(i < this.__objectDepths.length) {
timelineObject1 = this.__objectDepths[i];
exists = false;
var _g = 0;
var _g1 = this.__symbol.frames[0].objects;
while(_g < _g1.length) {
var frameObject = _g1[_g];
++_g;
if(frameObject.id == timelineObject1.id) {
exists = true;
break;
}
}
if(!exists) {
if(timelineObject1.displayObject.parent == this) this.removeChild(timelineObject1.displayObject);
if(timelineObject1.clipDepth > 0) this.__maskCount--;
if(this.__maskCount < 0) this.__maskCount = 0;
this.__objectDepths.splice(i,1);
} else i++;
}
previousIndex = 0;
}
var frame;
var timelineObject;
var displayObject;
var depth;
var symbol;
var depthChange = false;
var _g11 = previousIndex;
var _g2 = index + 1;
while(_g11 < _g2) {
var i1 = _g11++;
if(i1 < 0) continue;
frame = this.__symbol.frames[i1];
var _g21 = 0;
var _g3 = frame.objects;
while(_g21 < _g3.length) {
var frameObject1 = _g3[_g21];
++_g21;
if(frameObject1.type != openfl__$internal_timeline_FrameObjectType.DESTROY) {
if(frameObject1.id == 0 && frameObject1.symbol != this.__zeroSymbol) {
timelineObject = this.__objects.h[0];
if(timelineObject != null && timelineObject.displayObject.parent == this) this.removeChild(timelineObject.displayObject);
var x = this.__objects.h[0];
HxOverrides.remove(this.__objectDepths,x);
timelineObject = null;
this.__zeroSymbol = frameObject1.symbol;
}
displayObject = null;
if(!this.__objects.h.hasOwnProperty(frameObject1.id)) {
if(this.__swf.symbols.h.hasOwnProperty(frameObject1.symbol)) {
symbol = this.__swf.symbols.h[frameObject1.symbol];
displayObject = symbol.__createObject(this.__swf);
}
if(displayObject != null) {
timelineObject = new openfl_display__$MovieClip_TimelineObject(frameObject1.id,frameObject1.depth,frameObject1.clipDepth,displayObject);
if(frameObject1.clipDepth > 0) this.__maskCount++;
this.__objectDepths.push(timelineObject);
this.__objects.h[frameObject1.id] = timelineObject;
depthChange = true;
}
} else {
timelineObject = this.__objects.h[frameObject1.id];
displayObject = timelineObject.displayObject;
if(timelineObject.displayObject.parent == null) {
if(frameObject1.clipDepth > 0) this.__maskCount++;
this.__objectDepths.push(timelineObject);
depthChange = true;
}
}
if(displayObject != null) this.__placeObject(displayObject,frameObject1);
} else if(this.__objects.h.hasOwnProperty(frameObject1.id)) {
timelineObject = this.__objects.h[frameObject1.id];
if(timelineObject != null) {
if(timelineObject.displayObject.parent == this) this.removeChild(timelineObject.displayObject);
if(timelineObject.clipDepth > 0) {
this.__maskCount--;
var _g4 = 0;
var _g5 = this.__objectDepths;
while(_g4 < _g5.length) {
var object = _g5[_g4];
++_g4;
if(object.displayObject.get_mask() == timelineObject.displayObject) object.displayObject.set_mask(null);
}
}
HxOverrides.remove(this.__objectDepths,timelineObject);
}
depthChange = true;
}
}
}
if(depthChange) {
this.__objectDepths.sort($bind(this,this.__sortTimelineDepth));
var i2 = this.__objectDepths.length - 1;
while(i2 >= 0) {
timelineObject = this.__objectDepths[i2];
this.addChildAt(timelineObject.displayObject,0);
i2--;
}
}
if(this.__maskCount > 0) {
var object1;
var mask;
var _g6 = 0;
var _g12 = this.__objectDepths;
while(_g6 < _g12.length) {
var timelineObject2 = _g12[_g6];
++_g6;
if(timelineObject2.clipDepth > 0) {
mask = timelineObject2.displayObject;
var _g22 = 0;
var _g31 = this.__objectDepths;
while(_g22 < _g31.length) {
var object2 = _g31[_g22];
++_g22;
if(object2.depth <= timelineObject2.clipDepth) {
if(object2.depth >= timelineObject2.depth) object2.displayObject.set_mask(mask);
} else break;
}
}
}
}
}
,__sortTimelineDepth: function(a,b) {
return a.depth - b.depth;
}
,__stopAllMovieClips: function() {
openfl_display_Sprite.prototype.__stopAllMovieClips.call(this);
this.stop();
}
,__updateFrame: function() {
if(this.__currentFrame != this.__lastUpdate) {
var frameIndex = this.__currentFrame - 1;
if(frameIndex > -1) {
if(this.__symbol.frames.length > frameIndex && this.__symbol.frames[frameIndex] != null) this.__currentFrameLabel = this.__symbol.frames[frameIndex].label; else this.__currentFrameLabel = null;
if(this.__currentFrameLabel != null) this.__currentLabel = this.__currentFrameLabel; else if(this.__currentFrame != this.__lastUpdate + 1) {
this.__currentLabel = null;
var _g = 0;
var _g1 = this.__currentLabels;
while(_g < _g1.length) {
var label = _g1[_g];
++_g;
if(label.get_frame() <= this.__currentFrame) this.__currentLabel = label.get_name(); else break;
}
}
this.__renderFrame(frameIndex);
}
}
this.__lastUpdate = this.__currentFrame;
}
,get_currentFrame: function() {
return this.__currentFrame;
}
,get_currentFrameLabel: function() {
return this.__currentFrameLabel;
}
,get_currentLabel: function() {
return this.__currentLabel;
}
,get_currentLabels: function() {
return this.__currentLabels;
}
,get_framesLoaded: function() {
return this.__totalFrames;
}
,get_isPlaying: function() {
return this.__playing;
}
,get_totalFrames: function() {
return this.__totalFrames;
}
,__class__: openfl_display_MovieClip
,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_isPlaying:"get_isPlaying",get_framesLoaded:"get_framesLoaded",get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",get_currentFrame:"get_currentFrame"})
});
var openfl__$Vector_Vector_$Impl_$ = {};
$hxClasses["openfl._Vector.Vector_Impl_"] = openfl__$Vector_Vector_$Impl_$;
openfl__$Vector_Vector_$Impl_$.__name__ = ["openfl","_Vector","Vector_Impl_"];
openfl__$Vector_Vector_$Impl_$.__properties__ = {set_length:"set_length",get_length:"get_length",set_fixed:"set_fixed",get_fixed:"get_fixed"}
openfl__$Vector_Vector_$Impl_$.concat = function(this1,a) {
return this1.concat(a);
};
openfl__$Vector_Vector_$Impl_$.copy = function(this1) {
return this1.copy();
};
openfl__$Vector_Vector_$Impl_$.get = function(this1,index) {
return this1.get(index);
};
openfl__$Vector_Vector_$Impl_$.indexOf = function(this1,x,from) {
if(from == null) from = 0;
return this1.indexOf(x,from);
};
openfl__$Vector_Vector_$Impl_$.insertAt = function(this1,index,element) {
this1.insertAt(index,element);
};
openfl__$Vector_Vector_$Impl_$.iterator = function(this1) {
return this1.iterator();
};
openfl__$Vector_Vector_$Impl_$.join = function(this1,sep) {
return this1.join(sep);
};
openfl__$Vector_Vector_$Impl_$.lastIndexOf = function(this1,x,from) {
if(from == null) from = 0;
return this1.lastIndexOf(x,from);
};
openfl__$Vector_Vector_$Impl_$.pop = function(this1) {
return this1.pop();
};
openfl__$Vector_Vector_$Impl_$.push = function(this1,x) {
return this1.push(x);
};
openfl__$Vector_Vector_$Impl_$.reverse = function(this1) {
return this1.reverse();
};
openfl__$Vector_Vector_$Impl_$.set = function(this1,index,value) {
return this1.set(index,value);
};
openfl__$Vector_Vector_$Impl_$.shift = function(this1) {
return this1.shift();
};
openfl__$Vector_Vector_$Impl_$.slice = function(this1,pos,end) {
return this1.slice(pos,end);
};
openfl__$Vector_Vector_$Impl_$.sort = function(this1,f) {
this1.sort(f);
};
openfl__$Vector_Vector_$Impl_$.splice = function(this1,pos,len) {
return this1.splice(pos,len);
};
openfl__$Vector_Vector_$Impl_$.toString = function(this1) {
if(this1 != null) return this1.toString(); else return null;
};
openfl__$Vector_Vector_$Impl_$.unshift = function(this1,x) {
this1.unshift(x);
};
openfl__$Vector_Vector_$Impl_$.ofArray = function(a) {
var vector = openfl__$Vector_Vector_$Impl_$.toObjectVector(null);
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a[i]);
}
return vector;
};
openfl__$Vector_Vector_$Impl_$.convert = function(v) {
return v;
};
openfl__$Vector_Vector_$Impl_$.toBoolVector = function(t,length,fixed) {
return new openfl__$Vector_BoolVector(length,fixed);
};
openfl__$Vector_Vector_$Impl_$.toIntVector = function(t,length,fixed) {
return new openfl__$Vector_IntVector(length,fixed);
};
openfl__$Vector_Vector_$Impl_$.toFloatVector = function(t,length,fixed) {
return new openfl__$Vector_FloatVector(length,fixed);
};
openfl__$Vector_Vector_$Impl_$.toFunctionVector = function(t,length,fixed) {
return new openfl__$Vector_FunctionVector(length,fixed);
};
openfl__$Vector_Vector_$Impl_$.toObjectVector = function(t,length,fixed) {
return new openfl__$Vector_ObjectVector(length,fixed);
};
openfl__$Vector_Vector_$Impl_$.fromBoolVector = function(vector) {
return vector;
};
openfl__$Vector_Vector_$Impl_$.fromIntVector = function(vector) {
return vector;
};
openfl__$Vector_Vector_$Impl_$.fromFloatVector = function(vector) {
return vector;
};
openfl__$Vector_Vector_$Impl_$.fromFunctionVector = function(vector) {
return vector;
};
openfl__$Vector_Vector_$Impl_$.fromObjectVector = function(vector) {
return vector;
};
openfl__$Vector_Vector_$Impl_$.get_fixed = function(this1) {
return this1.fixed;
};
openfl__$Vector_Vector_$Impl_$.set_fixed = function(this1,value) {
return this1.fixed = value;
};
openfl__$Vector_Vector_$Impl_$.get_length = function(this1) {
return this1.get_length();
};
openfl__$Vector_Vector_$Impl_$.set_length = function(this1,value) {
return this1.set_length(value);
};
var openfl_geom_ColorTransform = function(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier,redOffset,greenOffset,blueOffset,alphaOffset) {
if(alphaOffset == null) alphaOffset = 0;
if(blueOffset == null) blueOffset = 0;
if(greenOffset == null) greenOffset = 0;
if(redOffset == null) redOffset = 0;
if(alphaMultiplier == null) alphaMultiplier = 1;
if(blueMultiplier == null) blueMultiplier = 1;
if(greenMultiplier == null) greenMultiplier = 1;
if(redMultiplier == null) redMultiplier = 1;
this.redMultiplier = redMultiplier;
this.greenMultiplier = greenMultiplier;
this.blueMultiplier = blueMultiplier;
this.alphaMultiplier = alphaMultiplier;
this.redOffset = redOffset;
this.greenOffset = greenOffset;
this.blueOffset = blueOffset;
this.alphaOffset = alphaOffset;
};
$hxClasses["openfl.geom.ColorTransform"] = openfl_geom_ColorTransform;
openfl_geom_ColorTransform.__name__ = ["openfl","geom","ColorTransform"];
openfl_geom_ColorTransform.prototype = {
alphaMultiplier: null
,alphaOffset: null
,blueMultiplier: null
,blueOffset: null
,greenMultiplier: null
,greenOffset: null
,redMultiplier: null
,redOffset: null
,concat: function(second) {
this.redMultiplier *= second.redMultiplier;
this.greenMultiplier *= second.greenMultiplier;
this.blueMultiplier *= second.blueMultiplier;
this.alphaMultiplier *= second.alphaMultiplier;
this.redOffset = second.redMultiplier * this.redOffset + second.redOffset;
this.greenOffset = second.greenMultiplier * this.greenOffset + second.greenOffset;
this.blueOffset = second.blueMultiplier * this.blueOffset + second.blueOffset;
this.alphaOffset = second.alphaMultiplier * this.alphaOffset + second.alphaOffset;
}
,toString: function() {
return "(redMultiplier=" + this.redMultiplier + ", greenMultiplier=" + this.greenMultiplier + ", blueMultiplier=" + this.blueMultiplier + ", alphaMultiplier=" + this.alphaMultiplier + ", redOffset=" + this.redOffset + ", greenOffset=" + this.greenOffset + ", blueOffset=" + this.blueOffset + ", alphaOffset=" + this.alphaOffset + ")";
}
,__clone: function() {
return new openfl_geom_ColorTransform(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset);
}
,__copyFrom: function(ct) {
this.redMultiplier = ct.redMultiplier;
this.greenMultiplier = ct.greenMultiplier;
this.blueMultiplier = ct.blueMultiplier;
this.alphaMultiplier = ct.alphaMultiplier;
this.redOffset = ct.redOffset;
this.greenOffset = ct.greenOffset;
this.blueOffset = ct.blueOffset;
this.alphaOffset = ct.alphaOffset;
}
,__combine: function(ct) {
this.redMultiplier *= ct.redMultiplier;
this.greenMultiplier *= ct.greenMultiplier;
this.blueMultiplier *= ct.blueMultiplier;
this.alphaMultiplier *= ct.alphaMultiplier;
this.redOffset += ct.redOffset;
this.greenOffset += ct.greenOffset;
this.blueOffset += ct.blueOffset;
this.alphaOffset += ct.alphaOffset;
}
,__equals: function(ct,skipAlphaMultiplier) {
if(skipAlphaMultiplier == null) skipAlphaMultiplier = false;
return ct != null && this.redMultiplier == ct.redMultiplier && this.greenMultiplier == ct.greenMultiplier && this.blueMultiplier == ct.blueMultiplier && (skipAlphaMultiplier || this.alphaMultiplier == ct.alphaMultiplier) && this.redOffset == ct.redOffset && this.greenOffset == ct.greenOffset && this.blueOffset == ct.blueOffset && this.alphaOffset == ct.alphaOffset;
}
,__isDefault: function() {
return this.redMultiplier == 1 && this.greenMultiplier == 1 && this.blueMultiplier == 1 && this.alphaMultiplier == 1 && this.redOffset == 0 && this.greenOffset == 0 && this.blueOffset == 0 && this.alphaOffset == 0;
}
,get_color: function() {
return (this.redOffset | 0) << 16 | (this.greenOffset | 0) << 8 | (this.blueOffset | 0);
}
,set_color: function(value) {
this.redOffset = value >> 16 & 255;
this.greenOffset = value >> 8 & 255;
this.blueOffset = value & 255;
this.redMultiplier = 0;
this.greenMultiplier = 0;
this.blueMultiplier = 0;
return this.get_color();
}
,__toLimeColorMatrix: function() {
if(openfl_geom_ColorTransform.__limeColorMatrix == null) {
var this1;
this1 = new Float32Array(20);
openfl_geom_ColorTransform.__limeColorMatrix = this1;
}
openfl_geom_ColorTransform.__limeColorMatrix[0] = this.redMultiplier;
openfl_geom_ColorTransform.__limeColorMatrix[4] = this.redOffset / 255;
openfl_geom_ColorTransform.__limeColorMatrix[6] = this.greenMultiplier;
openfl_geom_ColorTransform.__limeColorMatrix[9] = this.greenOffset / 255;
openfl_geom_ColorTransform.__limeColorMatrix[12] = this.blueMultiplier;
openfl_geom_ColorTransform.__limeColorMatrix[14] = this.blueOffset / 255;
openfl_geom_ColorTransform.__limeColorMatrix[18] = this.alphaMultiplier;
openfl_geom_ColorTransform.__limeColorMatrix[19] = this.alphaOffset / 255;
return openfl_geom_ColorTransform.__limeColorMatrix;
}
,__class__: openfl_geom_ColorTransform
,__properties__: {set_color:"set_color",get_color:"get_color"}
};
var openfl_Lib = function() { };
$hxClasses["openfl.Lib"] = openfl_Lib;
openfl_Lib.__name__ = ["openfl","Lib"];
openfl_Lib["as"] = function(v,c) {
if(js_Boot.__instanceof(v,c)) return v; else return null;
};
openfl_Lib.attach = function(name) {
return new openfl_display_MovieClip();
};
openfl_Lib.getTimer = function() {
return lime_system_System.getTimer();
};
openfl_Lib.getURL = function(request,target) {
if(target == null) target = "_blank";
lime_system_System.openURL(request.url,target);
};
openfl_Lib.notImplemented = function(posInfo) {
var api = posInfo.className + "." + posInfo.methodName;
if(!openfl_Lib.__sentWarnings.exists(api)) {
openfl_Lib.__sentWarnings.set(api,true);
lime_utils_Log.warn(posInfo.methodName + " is not implemented",posInfo);
}
};
openfl_Lib.preventDefaultTouchMove = function() {
window.document.addEventListener("touchmove",function(evt) {
evt.preventDefault();
},false);
};
openfl_Lib.trace = function(arg) {
haxe_Log.trace(arg,{ fileName : "Lib.hx", lineNumber : 151, className : "openfl.Lib", methodName : "trace"});
};
var openfl__$Vector_IVector = function() { };
$hxClasses["openfl._Vector.IVector"] = openfl__$Vector_IVector;
openfl__$Vector_IVector.__name__ = ["openfl","_Vector","IVector"];
openfl__$Vector_IVector.prototype = {
get_length: null
,set_length: null
,fixed: null
,concat: null
,copy: null
,get: null
,indexOf: null
,insertAt: null
,iterator: null
,join: null
,lastIndexOf: null
,pop: null
,push: null
,reverse: null
,set: null
,shift: null
,slice: null
,sort: null
,splice: null
,toString: null
,unshift: null
,__class__: openfl__$Vector_IVector
,__properties__: {set_length:"set_length",get_length:"get_length"}
};
var openfl__$Vector_BoolVector = function(length,fixed,array) {
if(array == null) array = [];
this.__array = array;
if(length != null) this.set_length(length);
this.fixed = fixed == true;
};
$hxClasses["openfl._Vector.BoolVector"] = openfl__$Vector_BoolVector;
openfl__$Vector_BoolVector.__name__ = ["openfl","_Vector","BoolVector"];
openfl__$Vector_BoolVector.__interfaces__ = [openfl__$Vector_IVector];
openfl__$Vector_BoolVector.prototype = {
fixed: null
,__array: null
,concat: function(a) {
if(a == null) return new openfl__$Vector_BoolVector(null,null,this.__array.slice()); else return new openfl__$Vector_BoolVector(null,null,this.__array.concat((js_Boot.__cast(a , openfl__$Vector_BoolVector)).__array));
}
,copy: function() {
return new openfl__$Vector_BoolVector(null,this.fixed,this.__array.slice());
}
,get: function(index) {
if(index >= this.__array.length) return false; else return this.__array[index];
}
,indexOf: function(x,from) {
if(from == null) from = 0;
var _g1 = from;
var _g = this.__array.length;
while(_g1 < _g) {
var i = _g1++;
if(this.__array[i] == x) return i;
}
return -1;
}
,insertAt: function(index,element) {
if(!this.fixed || index < this.__array.length) this.__array.splice(index,0,element);
}
,iterator: function() {
return HxOverrides.iter(this.__array);
}
,join: function(sep) {
return this.__array.join(sep);
}
,lastIndexOf: function(x,from) {
if(from == null) from = 0;
var i = this.__array.length - 1;
while(i >= from) {
if(this.__array[i] == x) return i;
i--;
}
return -1;
}
,pop: function() {
if(!this.fixed) return this.__array.pop(); else return null;
}
,push: function(x) {
if(!this.fixed) return this.__array.push(x); else return this.__array.length;
}
,reverse: function() {
this.__array.reverse();
return this;
}
,set: function(index,value) {
if(!this.fixed || index < this.__array.length) return this.__array[index] = value; else return value;
}
,shift: function() {
if(!this.fixed) return this.__array.shift(); else return null;
}
,slice: function(startIndex,endIndex) {
if(endIndex == null) endIndex = 16777215;
if(startIndex == null) startIndex = 0;
return new openfl__$Vector_BoolVector(null,null,this.__array.slice(startIndex,endIndex));
}
,sort: function(f) {
this.__array.sort(f);
}
,splice: function(pos,len) {
return new openfl__$Vector_BoolVector(null,null,this.__array.splice(pos,len));
}
,toString: function() {
if(this.__array != null) return this.__array.toString(); else return null;
}
,unshift: function(x) {
if(!this.fixed) this.__array.unshift(x);
}
,get_length: function() {
return this.__array.length;
}
,set_length: function(value) {
if(!this.fixed) {
var currentLength = this.__array.length;
if(value < 0) value = 0;
if(value > currentLength) {
var _g = currentLength;
while(_g < value) {
var i = _g++;
this.__array[i] = false;
}
} else while(this.__array.length > value) this.__array.pop();
}
return this.__array.length;
}
,__class__: openfl__$Vector_BoolVector
,__properties__: {set_length:"set_length",get_length:"get_length"}
};
var openfl__$Vector_FloatVector = function(length,fixed,array) {
if(array == null) array = [];
this.__array = array;
if(length != null) this.set_length(length);
this.fixed = fixed == true;
};
$hxClasses["openfl._Vector.FloatVector"] = openfl__$Vector_FloatVector;
openfl__$Vector_FloatVector.__name__ = ["openfl","_Vector","FloatVector"];
openfl__$Vector_FloatVector.__interfaces__ = [openfl__$Vector_IVector];
openfl__$Vector_FloatVector.prototype = {
fixed: null
,__array: null
,concat: function(a) {
if(a == null) return new openfl__$Vector_FloatVector(null,null,this.__array.slice()); else return new openfl__$Vector_FloatVector(null,null,this.__array.concat((js_Boot.__cast(a , openfl__$Vector_FloatVector)).__array));
}
,copy: function() {
return new openfl__$Vector_FloatVector(null,this.fixed,this.__array.slice());
}
,get: function(index) {
return this.__array[index];
}
,indexOf: function(x,from) {
if(from == null) from = 0;
var _g1 = from;
var _g = this.__array.length;
while(_g1 < _g) {
var i = _g1++;
if(this.__array[i] == x) return i;
}
return -1;
}
,insertAt: function(index,element) {
if(!this.fixed || index < this.__array.length) this.__array.splice(index,0,element);
}
,iterator: function() {
return HxOverrides.iter(this.__array);
}
,join: function(sep) {
return this.__array.join(sep);
}
,lastIndexOf: function(x,from) {
if(from == null) from = 0;
var i = this.__array.length - 1;
while(i >= from) {
if(this.__array[i] == x) return i;
i--;
}
return -1;
}
,pop: function() {
if(!this.fixed) return this.__array.pop(); else return null;
}
,push: function(x) {
if(!this.fixed) return this.__array.push(x); else return this.__array.length;
}
,reverse: function() {
this.__array.reverse();
return this;
}
,set: function(index,value) {
if(!this.fixed || index < this.__array.length) return this.__array[index] = value; else return value;
}
,shift: function() {
if(!this.fixed) return this.__array.shift(); else return null;
}
,slice: function(startIndex,endIndex) {
if(endIndex == null) endIndex = 16777215;
if(startIndex == null) startIndex = 0;
return new openfl__$Vector_FloatVector(null,null,this.__array.slice(startIndex,endIndex));
}
,sort: function(f) {
this.__array.sort(f);
}
,splice: function(pos,len) {
return new openfl__$Vector_FloatVector(null,null,this.__array.splice(pos,len));
}
,toString: function() {
if(this.__array != null) return this.__array.toString(); else return null;
}
,unshift: function(x) {
if(!this.fixed) this.__array.unshift(x);
}
,get_length: function() {
return this.__array.length;
}
,set_length: function(value) {
if(!this.fixed) {
var currentLength = this.__array.length;
if(value < 0) value = 0;
if(value > currentLength) {
var _g = currentLength;
while(_g < value) {
var i = _g++;
this.__array[i] = 0;
}
} else while(this.__array.length > value) this.__array.pop();
}
return this.__array.length;
}
,__class__: openfl__$Vector_FloatVector
,__properties__: {set_length:"set_length",get_length:"get_length"}
};
var openfl__$Vector_FunctionVector = function(length,fixed,array) {
if(array == null) array = [];
this.__array = array;
if(length != null) this.set_length(length);
this.fixed = fixed == true;
};
$hxClasses["openfl._Vector.FunctionVector"] = openfl__$Vector_FunctionVector;
openfl__$Vector_FunctionVector.__name__ = ["openfl","_Vector","FunctionVector"];
openfl__$Vector_FunctionVector.__interfaces__ = [openfl__$Vector_IVector];
openfl__$Vector_FunctionVector.prototype = {
fixed: null
,__array: null
,concat: function(a) {
if(a == null) return new openfl__$Vector_FunctionVector(null,null,this.__array.slice()); else return new openfl__$Vector_FunctionVector(null,null,this.__array.concat((js_Boot.__cast(a , openfl__$Vector_FunctionVector)).__array));
}
,copy: function() {
return new openfl__$Vector_FunctionVector(null,this.fixed,this.__array.slice());
}
,get: function(index) {
if(index >= this.__array.length) return null; else return this.__array[index];
}
,indexOf: function(x,from) {
if(from == null) from = 0;
var _g1 = from;
var _g = this.__array.length;
while(_g1 < _g) {
var i = _g1++;
if(Reflect.compareMethods(this.__array[i],x)) return i;
}
return -1;
}
,insertAt: function(index,element) {
if(!this.fixed || index < this.__array.length) this.__array.splice(index,0,element);
}
,iterator: function() {
return HxOverrides.iter(this.__array);
}
,join: function(sep) {
return this.__array.join(sep);
}
,lastIndexOf: function(x,from) {
if(from == null) from = 0;
var i = this.__array.length - 1;
while(i >= from) {
if(Reflect.compareMethods(this.__array[i],x)) return i;
i--;
}
return -1;
}
,pop: function() {
if(!this.fixed) return this.__array.pop(); else return null;
}
,push: function(x) {
if(!this.fixed) return this.__array.push(x); else return this.__array.length;
}
,reverse: function() {
this.__array.reverse();
return this;
}
,set: function(index,value) {
if(!this.fixed || index < this.__array.length) return this.__array[index] = value; else return value;
}
,shift: function() {
if(!this.fixed) return this.__array.shift(); else return null;
}
,slice: function(startIndex,endIndex) {
if(endIndex == null) endIndex = 16777215;
if(startIndex == null) startIndex = 0;
return new openfl__$Vector_FunctionVector(null,null,this.__array.slice(startIndex,endIndex));
}
,sort: function(f) {
this.__array.sort(f);
}
,splice: function(pos,len) {
return new openfl__$Vector_FunctionVector(null,null,this.__array.splice(pos,len));
}
,toString: function() {
if(this.__array != null) return this.__array.toString(); else return null;
}
,unshift: function(x) {
if(!this.fixed) this.__array.unshift(x);
}
,get_length: function() {
return this.__array.length;
}
,set_length: function(value) {
if(!this.fixed) {
var currentLength = this.__array.length;
if(value < 0) value = 0;
if(value > currentLength) {
var _g = currentLength;
while(_g < value) {
var i = _g++;
this.__array[i] = null;
}
} else while(this.__array.length > value) this.__array.pop();
}
return this.__array.length;
}
,__class__: openfl__$Vector_FunctionVector
,__properties__: {set_length:"set_length",get_length:"get_length"}
};
var openfl__$Vector_IntVector = function(length,fixed,array) {
if(array == null) array = [];
this.__array = array;
if(length != null) this.set_length(length);
this.fixed = fixed == true;
};
$hxClasses["openfl._Vector.IntVector"] = openfl__$Vector_IntVector;
openfl__$Vector_IntVector.__name__ = ["openfl","_Vector","IntVector"];
openfl__$Vector_IntVector.__interfaces__ = [openfl__$Vector_IVector];
openfl__$Vector_IntVector.prototype = {
fixed: null
,__array: null
,concat: function(a) {
if(a == null) return new openfl__$Vector_IntVector(null,null,this.__array.slice()); else return new openfl__$Vector_IntVector(null,null,this.__array.concat((js_Boot.__cast(a , openfl__$Vector_IntVector)).__array));
}
,copy: function() {
return new openfl__$Vector_IntVector(null,this.fixed,this.__array.slice());
}
,get: function(index) {
return this.__array[index];
}
,indexOf: function(x,from) {
if(from == null) from = 0;
var _g1 = from;
var _g = this.__array.length;
while(_g1 < _g) {
var i = _g1++;
if(this.__array[i] == x) return i;
}
return -1;
}
,insertAt: function(index,element) {
if(!this.fixed || index < this.__array.length) this.__array.splice(index,0,element);
}
,iterator: function() {
return HxOverrides.iter(this.__array);
}
,join: function(sep) {
return this.__array.join(sep);
}
,lastIndexOf: function(x,from) {
if(from == null) from = 0;
var i = this.__array.length - 1;
while(i >= from) {
if(this.__array[i] == x) return i;
i--;
}
return -1;
}
,pop: function() {
if(!this.fixed) return this.__array.pop(); else return null;
}
,push: function(x) {
if(!this.fixed) return this.__array.push(x); else return this.__array.length;
}
,reverse: function() {
this.__array.reverse();
return this;
}
,set: function(index,value) {
if(!this.fixed || index < this.__array.length) return this.__array[index] = value; else return value;
}
,shift: function() {
if(!this.fixed) return this.__array.shift(); else return null;
}
,slice: function(startIndex,endIndex) {
if(endIndex == null) endIndex = 16777215;
if(startIndex == null) startIndex = 0;
return new openfl__$Vector_IntVector(null,null,this.__array.slice(startIndex,endIndex));
}
,sort: function(f) {
this.__array.sort(f);
}
,splice: function(pos,len) {
return new openfl__$Vector_IntVector(null,null,this.__array.splice(pos,len));
}
,toString: function() {
if(this.__array != null) return this.__array.toString(); else return null;
}
,unshift: function(x) {
if(!this.fixed) this.__array.unshift(x);
}
,get_length: function() {
return this.__array.length;
}
,set_length: function(value) {
if(!this.fixed) {
var currentLength = this.__array.length;
if(value < 0) value = 0;
if(value > currentLength) {
var _g = currentLength;
while(_g < value) {
var i = _g++;
this.__array[i] = 0;
}
} else while(this.__array.length > value) this.__array.pop();
}
return this.__array.length;
}
,__class__: openfl__$Vector_IntVector
,__properties__: {set_length:"set_length",get_length:"get_length"}
};
var openfl__$Vector_ObjectVector = function(length,fixed,array) {
if(array == null) array = [];
this.__array = array;
if(length != null) this.set_length(length);
this.fixed = fixed == true;
};
$hxClasses["openfl._Vector.ObjectVector"] = openfl__$Vector_ObjectVector;
openfl__$Vector_ObjectVector.__name__ = ["openfl","_Vector","ObjectVector"];
openfl__$Vector_ObjectVector.__interfaces__ = [openfl__$Vector_IVector];
openfl__$Vector_ObjectVector.prototype = {
fixed: null
,__array: null
,concat: function(a) {
if(a == null) return new openfl__$Vector_ObjectVector(null,null,this.__array.slice()); else return new openfl__$Vector_ObjectVector(null,null,this.__array.concat((js_Boot.__cast(a , openfl__$Vector_ObjectVector)).__array));
}
,copy: function() {
return new openfl__$Vector_ObjectVector(null,null,this.__array.slice());
}
,get: function(index) {
return this.__array[index];
}
,indexOf: function(x,from) {
if(from == null) from = 0;
var _g1 = from;
var _g = this.__array.length;
while(_g1 < _g) {
var i = _g1++;
if(this.__array[i] == x) return i;
}
return -1;
}
,insertAt: function(index,element) {
if(!this.fixed || index < this.__array.length) this.__array.splice(index,0,element);
}
,iterator: function() {
return HxOverrides.iter(this.__array);
}
,join: function(sep) {
return this.__array.join(sep);
}
,lastIndexOf: function(x,from) {
if(from == null) from = 0;
var i = this.__array.length - 1;
while(i >= from) {
if(this.__array[i] == x) return i;
i--;
}
return -1;
}
,pop: function() {
if(!this.fixed) return this.__array.pop(); else return null;
}
,push: function(x) {
if(!this.fixed) return this.__array.push(x); else return this.__array.length;
}
,reverse: function() {
this.__array.reverse();
return this;
}
,set: function(index,value) {
if(!this.fixed || index < this.__array.length) return this.__array[index] = value; else return value;
}
,shift: function() {
if(!this.fixed) return this.__array.shift(); else return null;
}
,slice: function(startIndex,endIndex) {
if(endIndex == null) endIndex = 16777215;
if(startIndex == null) startIndex = 0;
return new openfl__$Vector_ObjectVector(null,null,this.__array.slice(startIndex,endIndex));
}
,sort: function(f) {
this.__array.sort(f);
}
,splice: function(pos,len) {
return new openfl__$Vector_ObjectVector(null,null,this.__array.splice(pos,len));
}
,toString: function() {
if(this.__array != null) return this.__array.toString(); else return null;
}
,unshift: function(x) {
if(!this.fixed) this.__array.unshift(x);
}
,get_length: function() {
return this.__array.length;
}
,set_length: function(value) {
if(!this.fixed) {
var currentLength = this.__array.length;
if(value < 0) value = 0;
if(value > currentLength) {
var _g = currentLength;
while(_g < value) {
var i = _g++;
this.__array.push(null);
}
} else while(this.__array.length > value) this.__array.pop();
}
return this.__array.length;
}
,__class__: openfl__$Vector_ObjectVector
,__properties__: {set_length:"set_length",get_length:"get_length"}
};
var openfl__$internal_renderer_AbstractBlendModeManager = function() {
};
$hxClasses["openfl._internal.renderer.AbstractBlendModeManager"] = openfl__$internal_renderer_AbstractBlendModeManager;
openfl__$internal_renderer_AbstractBlendModeManager.__name__ = ["openfl","_internal","renderer","AbstractBlendModeManager"];
openfl__$internal_renderer_AbstractBlendModeManager.prototype = {
setBlendMode: function(blendMode) {
}
,__class__: openfl__$internal_renderer_AbstractBlendModeManager
};
var openfl__$internal_renderer_AbstractFilterManager = function(renderSession) {
this.renderSession = renderSession;
};
$hxClasses["openfl._internal.renderer.AbstractFilterManager"] = openfl__$internal_renderer_AbstractFilterManager;
openfl__$internal_renderer_AbstractFilterManager.__name__ = ["openfl","_internal","renderer","AbstractFilterManager"];
openfl__$internal_renderer_AbstractFilterManager.prototype = {
renderSession: null
,pushObject: function(object) {
return null;
}
,popObject: function(object) {
}
,__class__: openfl__$internal_renderer_AbstractFilterManager
};
var openfl__$internal_renderer_AbstractMaskManager = function(renderSession) {
this.renderSession = renderSession;
};
$hxClasses["openfl._internal.renderer.AbstractMaskManager"] = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_AbstractMaskManager.__name__ = ["openfl","_internal","renderer","AbstractMaskManager"];
openfl__$internal_renderer_AbstractMaskManager.prototype = {
renderSession: null
,pushMask: function(mask) {
}
,pushObject: function(object,handleScrollRect) {
if(handleScrollRect == null) handleScrollRect = true;
}
,pushRect: function(rect,transform) {
}
,popMask: function() {
}
,popObject: function(object,handleScrollRect) {
if(handleScrollRect == null) handleScrollRect = true;
}
,popRect: function() {
}
,saveState: function() {
}
,restoreState: function() {
}
,__class__: openfl__$internal_renderer_AbstractMaskManager
};
var openfl__$internal_renderer_AbstractRenderer = function(stage) {
this.stage = stage;
this.width = stage.stageWidth;
this.height = stage.stageHeight;
};
$hxClasses["openfl._internal.renderer.AbstractRenderer"] = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_AbstractRenderer.__name__ = ["openfl","_internal","renderer","AbstractRenderer"];
openfl__$internal_renderer_AbstractRenderer.prototype = {
height: null
,width: null
,transparent: null
,viewport: null
,renderSession: null
,stage: null
,clear: function() {
}
,render: function() {
}
,renderStage3D: function() {
}
,resize: function(width,height) {
this.width = width;
this.height = height;
}
,__class__: openfl__$internal_renderer_AbstractRenderer
};
var openfl__$internal_renderer_AbstractShaderManager = function() {
};
$hxClasses["openfl._internal.renderer.AbstractShaderManager"] = openfl__$internal_renderer_AbstractShaderManager;
openfl__$internal_renderer_AbstractShaderManager.__name__ = ["openfl","_internal","renderer","AbstractShaderManager"];
openfl__$internal_renderer_AbstractShaderManager.prototype = {
currentShader: null
,defaultShader: null
,setShader: function(shader) {
}
,__class__: openfl__$internal_renderer_AbstractShaderManager
};
var openfl__$internal_renderer_DrawCommandBuffer = function() {
if(openfl__$internal_renderer_DrawCommandBuffer.empty == null) {
this.types = [];
this.b = [];
this.i = [];
this.f = [];
this.o = [];
this.ff = [];
this.ii = [];
this.copyOnWrite = true;
} else this.clear();
};
$hxClasses["openfl._internal.renderer.DrawCommandBuffer"] = openfl__$internal_renderer_DrawCommandBuffer;
openfl__$internal_renderer_DrawCommandBuffer.__name__ = ["openfl","_internal","renderer","DrawCommandBuffer"];
openfl__$internal_renderer_DrawCommandBuffer.prototype = {
types: null
,b: null
,copyOnWrite: null
,f: null
,ff: null
,i: null
,ii: null
,o: null
,append: function(other) {
if(this.get_length() == 0) {
this.types = other.types;
this.b = other.b;
this.i = other.i;
this.f = other.f;
this.o = other.o;
this.ff = other.ff;
this.ii = other.ii;
this.copyOnWrite = other.copyOnWrite = true;
return other;
}
var data = new openfl__$internal_renderer_DrawCommandReader(other);
var _g = 0;
var _g1 = other.types;
while(_g < _g1.length) {
var type = _g1[_g];
++_g;
switch(type[1]) {
case 0:
var c;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
c = data;
this.beginBitmapFill(c.buffer.o[c.oPos],c.buffer.o[c.oPos + 1],c.buffer.b[c.bPos],c.buffer.b[c.bPos + 1]);
break;
case 1:
var c1;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
c1 = data;
this.beginFill(c1.buffer.i[c1.iPos],c1.buffer.f[c1.fPos]);
break;
case 2:
var c2;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
c2 = data;
this.beginGradientFill(c2.buffer.o[c2.oPos],c2.buffer.ii[c2.iiPos],c2.buffer.ff[c2.ffPos],c2.buffer.ii[c2.iiPos + 1],c2.buffer.o[c2.oPos + 1],c2.buffer.o[c2.oPos + 2],c2.buffer.o[c2.oPos + 3],c2.buffer.f[c2.fPos]);
break;
case 3:
var c3;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
c3 = data;
this.cubicCurveTo(c3.buffer.f[c3.fPos],c3.buffer.f[c3.fPos + 1],c3.buffer.f[c3.fPos + 2],c3.buffer.f[c3.fPos + 3],c3.buffer.f[c3.fPos + 4],c3.buffer.f[c3.fPos + 5]);
break;
case 4:
var c4;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
c4 = data;
this.curveTo(c4.buffer.f[c4.fPos],c4.buffer.f[c4.fPos + 1],c4.buffer.f[c4.fPos + 2],c4.buffer.f[c4.fPos + 3]);
break;
case 5:
var c5;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
c5 = data;
this.drawCircle(c5.buffer.f[c5.fPos],c5.buffer.f[c5.fPos + 1],c5.buffer.f[c5.fPos + 2]);
break;
case 6:
var c6;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
c6 = data;
this.drawEllipse(c6.buffer.f[c6.fPos],c6.buffer.f[c6.fPos + 1],c6.buffer.f[c6.fPos + 2],c6.buffer.f[c6.fPos + 3]);
break;
case 7:
var c7;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
c7 = data;
this.drawRect(c7.buffer.f[c7.fPos],c7.buffer.f[c7.fPos + 1],c7.buffer.f[c7.fPos + 2],c7.buffer.f[c7.fPos + 3]);
break;
case 8:
var c8;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
c8 = data;
this.drawRoundRect(c8.buffer.f[c8.fPos],c8.buffer.f[c8.fPos + 1],c8.buffer.f[c8.fPos + 2],c8.buffer.f[c8.fPos + 3],c8.buffer.f[c8.fPos + 4],c8.buffer.o[c8.oPos]);
break;
case 10:
var c9;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;
c9 = data;
this.drawTriangles(c9.buffer.o[c9.oPos],c9.buffer.o[c9.oPos + 1],c9.buffer.o[c9.oPos + 2],c9.buffer.o[c9.oPos + 3]);
break;
case 11:
var c10;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.END_FILL;
c10 = data;
this.endFill();
break;
case 12:
var c11;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
c11 = data;
this.lineBitmapStyle(c11.buffer.o[c11.oPos],c11.buffer.o[c11.oPos + 1],c11.buffer.b[c11.bPos],c11.buffer.b[c11.bPos + 1]);
break;
case 13:
var c12;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
c12 = data;
this.lineGradientStyle(c12.buffer.o[c12.oPos],c12.buffer.ii[c12.iiPos],c12.buffer.ff[c12.ffPos],c12.buffer.ii[c12.iiPos + 1],c12.buffer.o[c12.oPos + 1],c12.buffer.o[c12.oPos + 2],c12.buffer.o[c12.oPos + 3],c12.buffer.f[c12.fPos]);
break;
case 14:
var c13;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
c13 = data;
this.lineStyle(c13.buffer.o[c13.oPos],c13.buffer.i[c13.iPos],c13.buffer.f[c13.fPos],c13.buffer.b[c13.bPos],c13.buffer.o[c13.oPos + 1],c13.buffer.o[c13.oPos + 2],c13.buffer.o[c13.oPos + 3],c13.buffer.f[c13.fPos + 1]);
break;
case 15:
var c14;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
c14 = data;
this.lineTo(c14.buffer.f[c14.fPos],c14.buffer.f[c14.fPos + 1]);
break;
case 16:
var c15;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
c15 = data;
this.moveTo(c15.buffer.f[c15.fPos],c15.buffer.f[c15.fPos + 1]);
break;
case 17:
var c16;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX;
c16 = data;
this.overrideMatrix(c16.buffer.o[c16.oPos]);
break;
default:
}
}
data.destroy();
return other;
}
,beginBitmapFill: function(bitmap,matrix,repeat,smooth) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL);
this.o.push(bitmap);
this.o.push(matrix);
this.b.push(repeat);
this.b.push(smooth);
}
,beginFill: function(color,alpha) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_FILL);
this.i.push(color);
this.f.push(alpha);
}
,beginGradientFill: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL);
this.o.push(type);
this.ii.push(colors);
this.ff.push(alphas);
this.ii.push(ratios);
this.o.push(matrix);
this.o.push(spreadMethod);
this.o.push(interpolationMethod);
this.f.push(focalPointRatio);
}
,clear: function() {
this.types = openfl__$internal_renderer_DrawCommandBuffer.empty.types;
this.b = openfl__$internal_renderer_DrawCommandBuffer.empty.b;
this.i = openfl__$internal_renderer_DrawCommandBuffer.empty.i;
this.f = openfl__$internal_renderer_DrawCommandBuffer.empty.f;
this.o = openfl__$internal_renderer_DrawCommandBuffer.empty.o;
this.ff = openfl__$internal_renderer_DrawCommandBuffer.empty.ff;
this.ii = openfl__$internal_renderer_DrawCommandBuffer.empty.ii;
this.copyOnWrite = true;
}
,copy: function() {
var copy = new openfl__$internal_renderer_DrawCommandBuffer();
copy.append(this);
return copy;
}
,cubicCurveTo: function(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO);
this.f.push(controlX1);
this.f.push(controlY1);
this.f.push(controlX2);
this.f.push(controlY2);
this.f.push(anchorX);
this.f.push(anchorY);
}
,curveTo: function(controlX,controlY,anchorX,anchorY) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.CURVE_TO);
this.f.push(controlX);
this.f.push(controlY);
this.f.push(anchorX);
this.f.push(anchorY);
}
,destroy: function() {
this.clear();
this.types = null;
this.b = null;
this.i = null;
this.f = null;
this.o = null;
this.ff = null;
this.ii = null;
}
,drawCircle: function(x,y,radius) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE);
this.f.push(x);
this.f.push(y);
this.f.push(radius);
}
,drawEllipse: function(x,y,width,height) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE);
this.f.push(x);
this.f.push(y);
this.f.push(width);
this.f.push(height);
}
,drawRect: function(x,y,width,height) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_RECT);
this.f.push(x);
this.f.push(y);
this.f.push(width);
this.f.push(height);
}
,drawRoundRect: function(x,y,width,height,ellipseWidth,ellipseHeight) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT);
this.f.push(x);
this.f.push(y);
this.f.push(width);
this.f.push(height);
this.f.push(ellipseWidth);
this.o.push(ellipseHeight);
}
,drawTriangles: function(vertices,indices,uvtData,culling) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES);
this.o.push(vertices);
this.o.push(indices);
this.o.push(uvtData);
this.o.push(culling);
}
,endFill: function() {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.END_FILL);
}
,lineBitmapStyle: function(bitmap,matrix,repeat,smooth) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE);
this.o.push(bitmap);
this.o.push(matrix);
this.b.push(repeat);
this.b.push(smooth);
}
,lineGradientStyle: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE);
this.o.push(type);
this.ii.push(colors);
this.ff.push(alphas);
this.ii.push(ratios);
this.o.push(matrix);
this.o.push(spreadMethod);
this.o.push(interpolationMethod);
this.f.push(focalPointRatio);
}
,lineStyle: function(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_STYLE);
this.o.push(thickness);
this.i.push(color);
this.f.push(alpha);
this.b.push(pixelHinting);
this.o.push(scaleMode);
this.o.push(caps);
this.o.push(joints);
this.f.push(miterLimit);
}
,lineTo: function(x,y) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_TO);
this.f.push(x);
this.f.push(y);
}
,moveTo: function(x,y) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.MOVE_TO);
this.f.push(x);
this.f.push(y);
}
,prepareWrite: function() {
if(this.copyOnWrite) {
this.types = this.types.slice();
this.b = this.b.slice();
this.i = this.i.slice();
this.f = this.f.slice();
this.o = this.o.slice();
this.ff = this.ff.slice();
this.ii = this.ii.slice();
this.copyOnWrite = false;
}
}
,overrideMatrix: function(matrix) {
this.prepareWrite();
this.types.push(openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX);
this.o.push(matrix);
}
,get_length: function() {
return this.types.length;
}
,__class__: openfl__$internal_renderer_DrawCommandBuffer
,__properties__: {get_length:"get_length"}
};
var openfl__$internal_renderer_DrawCommandReader = function(buffer) {
this.buffer = buffer;
this.bPos = this.iPos = this.fPos = this.oPos = this.ffPos = this.iiPos = this.tsPos = 0;
this.prev = openfl__$internal_renderer_DrawCommandType.UNKNOWN;
};
$hxClasses["openfl._internal.renderer.DrawCommandReader"] = openfl__$internal_renderer_DrawCommandReader;
openfl__$internal_renderer_DrawCommandReader.__name__ = ["openfl","_internal","renderer","DrawCommandReader"];
openfl__$internal_renderer_DrawCommandReader.prototype = {
buffer: null
,bPos: null
,iiPos: null
,iPos: null
,ffPos: null
,fPos: null
,oPos: null
,prev: null
,tsPos: null
,advance: function() {
var _g = this.prev;
switch(_g[1]) {
case 0:
this.oPos += 2;
this.bPos += 2;
break;
case 1:
this.iPos += 1;
this.fPos += 1;
break;
case 2:
this.oPos += 4;
this.iiPos += 2;
this.ffPos += 1;
this.fPos += 1;
break;
case 3:
this.fPos += 6;
break;
case 4:
this.fPos += 4;
break;
case 5:
this.fPos += 3;
break;
case 6:
this.fPos += 4;
break;
case 7:
this.fPos += 4;
break;
case 8:
this.fPos += 5;
this.oPos += 1;
break;
case 10:
this.oPos += 4;
break;
case 11:
break;
case 12:
this.oPos += 2;
this.bPos += 2;
break;
case 13:
this.oPos += 4;
this.iiPos += 2;
this.ffPos += 1;
this.fPos += 1;
break;
case 14:
this.oPos += 4;
this.iPos += 1;
this.fPos += 2;
this.bPos += 1;
break;
case 15:
this.fPos += 2;
break;
case 16:
this.fPos += 2;
break;
case 17:
this.oPos += 1;
break;
default:
}
}
,bool: function(index) {
return this.buffer.b[this.bPos + index];
}
,destroy: function() {
this.buffer = null;
this.reset();
}
,fArr: function(index) {
return this.buffer.ff[this.ffPos + index];
}
,'float': function(index) {
return this.buffer.f[this.fPos + index];
}
,iArr: function(index) {
return this.buffer.ii[this.iiPos + index];
}
,'int': function(index) {
return this.buffer.i[this.iPos + index];
}
,obj: function(index) {
return this.buffer.o[this.oPos + index];
}
,readBeginBitmapFill: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
return this;
}
,readBeginFill: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
return this;
}
,readBeginGradientFill: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
return this;
}
,readCubicCurveTo: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
return this;
}
,readCurveTo: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
return this;
}
,readDrawCircle: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
return this;
}
,readDrawEllipse: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
return this;
}
,readDrawRect: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
return this;
}
,readDrawRoundRect: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
return this;
}
,readDrawTriangles: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;
return this;
}
,readEndFill: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.END_FILL;
return this;
}
,readLineBitmapStyle: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
return this;
}
,readLineGradientStyle: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
return this;
}
,readLineStyle: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
return this;
}
,readLineTo: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
return this;
}
,readMoveTo: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
return this;
}
,readOverrideMatrix: function() {
this.advance();
this.prev = openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX;
return this;
}
,reset: function() {
this.bPos = this.iPos = this.fPos = this.oPos = this.ffPos = this.iiPos = this.tsPos = 0;
}
,skip: function(type) {
this.advance();
this.prev = type;
}
,__class__: openfl__$internal_renderer_DrawCommandReader
};
var openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginBitmapFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginBitmapFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.__properties__ = {get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"}
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap = function(this1) {
return this1.buffer.o[this1.oPos];
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix = function(this1) {
return this1.buffer.o[this1.oPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat = function(this1) {
return this1.buffer.b[this1.bPos];
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth = function(this1) {
return this1.buffer.b[this1.bPos + 1];
};
var openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.__properties__ = {get_alpha:"get_alpha",get_color:"get_color"}
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color = function(this1) {
return this1.buffer.i[this1.iPos];
};
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha = function(this1) {
return this1.buffer.f[this1.fPos];
};
var openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginGradientFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginGradientFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.__properties__ = {get_focalPointRatio:"get_focalPointRatio",get_interpolationMethod:"get_interpolationMethod",get_spreadMethod:"get_spreadMethod",get_matrix:"get_matrix",get_ratios:"get_ratios",get_alphas:"get_alphas",get_colors:"get_colors",get_type:"get_type"}
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type = function(this1) {
return this1.buffer.o[this1.oPos];
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors = function(this1) {
return this1.buffer.ii[this1.iiPos];
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas = function(this1) {
return this1.buffer.ff[this1.ffPos];
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios = function(this1) {
return this1.buffer.ii[this1.iiPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix = function(this1) {
return this1.buffer.o[this1.oPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod = function(this1) {
return this1.buffer.o[this1.oPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod = function(this1) {
return this1.buffer.o[this1.oPos + 3];
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio = function(this1) {
return this1.buffer.f[this1.fPos];
};
var openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.CubicCurveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","CubicCurveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.__properties__ = {get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",get_controlY2:"get_controlY2",get_controlX2:"get_controlX2",get_controlY1:"get_controlY1",get_controlX1:"get_controlX1"}
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1 = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1 = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2 = function(this1) {
return this1.buffer.f[this1.fPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2 = function(this1) {
return this1.buffer.f[this1.fPos + 3];
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX = function(this1) {
return this1.buffer.f[this1.fPos + 4];
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY = function(this1) {
return this1.buffer.f[this1.fPos + 5];
};
var openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.CurveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","CurveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.__properties__ = {get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",get_controlY:"get_controlY",get_controlX:"get_controlX"}
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX = function(this1) {
return this1.buffer.f[this1.fPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY = function(this1) {
return this1.buffer.f[this1.fPos + 3];
};
var openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawCircleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawCircleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.__properties__ = {get_radius:"get_radius",get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius = function(this1) {
return this1.buffer.f[this1.fPos + 2];
};
var openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawEllipseView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawEllipseView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.__properties__ = {get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width = function(this1) {
return this1.buffer.f[this1.fPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height = function(this1) {
return this1.buffer.f[this1.fPos + 3];
};
var openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawRectView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawRectView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.__properties__ = {get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width = function(this1) {
return this1.buffer.f[this1.fPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height = function(this1) {
return this1.buffer.f[this1.fPos + 3];
};
var openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawRoundRectView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawRoundRectView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.__properties__ = {get_ellipseHeight:"get_ellipseHeight",get_ellipseWidth:"get_ellipseWidth",get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width = function(this1) {
return this1.buffer.f[this1.fPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height = function(this1) {
return this1.buffer.f[this1.fPos + 3];
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth = function(this1) {
return this1.buffer.f[this1.fPos + 4];
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight = function(this1) {
return this1.buffer.o[this1.oPos];
};
var openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawTrianglesView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawTrianglesView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.__properties__ = {get_culling:"get_culling",get_uvtData:"get_uvtData",get_indices:"get_indices",get_vertices:"get_vertices"}
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices = function(this1) {
return this1.buffer.o[this1.oPos];
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices = function(this1) {
return this1.buffer.o[this1.oPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData = function(this1) {
return this1.buffer.o[this1.oPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling = function(this1) {
return this1.buffer.o[this1.oPos + 3];
};
var openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.EndFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","EndFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$._new = function(d) {
return d;
};
var openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineBitmapStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineBitmapStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.__properties__ = {get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"}
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap = function(this1) {
return this1.buffer.o[this1.oPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix = function(this1) {
return this1.buffer.o[this1.oPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat = function(this1) {
return this1.buffer.b[this1.bPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth = function(this1) {
return this1.buffer.b[this1.bPos + 1];
};
var openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineGradientStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineGradientStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.__properties__ = {get_focalPointRatio:"get_focalPointRatio",get_interpolationMethod:"get_interpolationMethod",get_spreadMethod:"get_spreadMethod",get_matrix:"get_matrix",get_ratios:"get_ratios",get_alphas:"get_alphas",get_colors:"get_colors",get_type:"get_type"}
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type = function(this1) {
return this1.buffer.o[this1.oPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors = function(this1) {
return this1.buffer.ii[this1.iiPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas = function(this1) {
return this1.buffer.ff[this1.ffPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios = function(this1) {
return this1.buffer.ii[this1.iiPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix = function(this1) {
return this1.buffer.o[this1.oPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod = function(this1) {
return this1.buffer.o[this1.oPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod = function(this1) {
return this1.buffer.o[this1.oPos + 3];
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio = function(this1) {
return this1.buffer.f[this1.fPos];
};
var openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.__properties__ = {get_miterLimit:"get_miterLimit",get_joints:"get_joints",get_caps:"get_caps",get_scaleMode:"get_scaleMode",get_pixelHinting:"get_pixelHinting",get_alpha:"get_alpha",get_color:"get_color",get_thickness:"get_thickness"}
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness = function(this1) {
return this1.buffer.o[this1.oPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color = function(this1) {
return this1.buffer.i[this1.iPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting = function(this1) {
return this1.buffer.b[this1.bPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode = function(this1) {
return this1.buffer.o[this1.oPos + 1];
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps = function(this1) {
return this1.buffer.o[this1.oPos + 2];
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints = function(this1) {
return this1.buffer.o[this1.oPos + 3];
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
var openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.__properties__ = {get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
var openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.MoveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","MoveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.__properties__ = {get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x = function(this1) {
return this1.buffer.f[this1.fPos];
};
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y = function(this1) {
return this1.buffer.f[this1.fPos + 1];
};
var openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.OverrideMatrixView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","OverrideMatrixView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.__properties__ = {get_matrix:"get_matrix"}
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$._new = function(d) {
return d;
};
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.get_matrix = function(this1) {
return this1.buffer.o[this1.oPos];
};
var openfl__$internal_renderer_DrawCommandType = $hxClasses["openfl._internal.renderer.DrawCommandType"] = { __ename__ : ["openfl","_internal","renderer","DrawCommandType"], __constructs__ : ["BEGIN_BITMAP_FILL","BEGIN_FILL","BEGIN_GRADIENT_FILL","CUBIC_CURVE_TO","CURVE_TO","DRAW_CIRCLE","DRAW_ELLIPSE","DRAW_RECT","DRAW_ROUND_RECT","DRAW_TILES","DRAW_TRIANGLES","END_FILL","LINE_BITMAP_STYLE","LINE_GRADIENT_STYLE","LINE_STYLE","LINE_TO","MOVE_TO","OVERRIDE_MATRIX","UNKNOWN"] };
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL = ["BEGIN_BITMAP_FILL",0];
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL = ["BEGIN_FILL",1];
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL = ["BEGIN_GRADIENT_FILL",2];
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO = ["CUBIC_CURVE_TO",3];
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.CURVE_TO = ["CURVE_TO",4];
openfl__$internal_renderer_DrawCommandType.CURVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.CURVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE = ["DRAW_CIRCLE",5];
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE = ["DRAW_ELLIPSE",6];
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_RECT = ["DRAW_RECT",7];
openfl__$internal_renderer_DrawCommandType.DRAW_RECT.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_RECT.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT = ["DRAW_ROUND_RECT",8];
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_TILES = ["DRAW_TILES",9];
openfl__$internal_renderer_DrawCommandType.DRAW_TILES.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_TILES.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES = ["DRAW_TRIANGLES",10];
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.END_FILL = ["END_FILL",11];
openfl__$internal_renderer_DrawCommandType.END_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.END_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE = ["LINE_BITMAP_STYLE",12];
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE = ["LINE_GRADIENT_STYLE",13];
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_STYLE = ["LINE_STYLE",14];
openfl__$internal_renderer_DrawCommandType.LINE_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_TO = ["LINE_TO",15];
openfl__$internal_renderer_DrawCommandType.LINE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.MOVE_TO = ["MOVE_TO",16];
openfl__$internal_renderer_DrawCommandType.MOVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.MOVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX = ["OVERRIDE_MATRIX",17];
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX.toString = $estr;
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.UNKNOWN = ["UNKNOWN",18];
openfl__$internal_renderer_DrawCommandType.UNKNOWN.toString = $estr;
openfl__$internal_renderer_DrawCommandType.UNKNOWN.__enum__ = openfl__$internal_renderer_DrawCommandType;
var openfl__$internal_renderer_RenderSession = function() {
this.activeTextures = 0;
this.allowSmoothing = true;
this.clearDirtyFlags = false;
};
$hxClasses["openfl._internal.renderer.RenderSession"] = openfl__$internal_renderer_RenderSession;
openfl__$internal_renderer_RenderSession.__name__ = ["openfl","_internal","renderer","RenderSession"];
openfl__$internal_renderer_RenderSession.prototype = {
allowSmoothing: null
,cairo: null
,clearDirtyFlags: null
,context: null
,element: null
,gl: null
,renderer: null
,roundPixels: null
,transformProperty: null
,transformOriginProperty: null
,upscaled: null
,vendorPrefix: null
,projectionMatrix: null
,z: null
,drawCount: null
,currentBlendMode: null
,activeTextures: null
,blendModeManager: null
,filterManager: null
,maskManager: null
,shaderManager: null
,__class__: openfl__$internal_renderer_RenderSession
};
var openfl__$internal_renderer_cairo_CairoBitmap = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoBitmap"] = openfl__$internal_renderer_cairo_CairoBitmap;
openfl__$internal_renderer_cairo_CairoBitmap.__name__ = ["openfl","_internal","renderer","cairo","CairoBitmap"];
openfl__$internal_renderer_cairo_CairoBitmap.render = function(bitmap,renderSession) {
if(!bitmap.__renderable || bitmap.__worldAlpha <= 0) return;
var cairo = renderSession.cairo;
if(bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
renderSession.maskManager.pushObject(bitmap);
var transform = bitmap.__renderTransform;
if(renderSession.roundPixels) {
var matrix = transform.__toMatrix3();
matrix.tx = Math.round(matrix.tx);
matrix.ty = Math.round(matrix.ty);
cairo.set_matrix(matrix);
} else cairo.set_matrix(transform.__toMatrix3());
var surface = bitmap.bitmapData.getSurface();
if(surface != null) {
var pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface(surface);
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter(pattern,renderSession.allowSmoothing && bitmap.smoothing?1:3);
cairo.set_source(pattern);
if(bitmap.__worldAlpha == 1) cairo.paint(); else cairo.paintWithAlpha(bitmap.__worldAlpha);
}
renderSession.maskManager.popObject(bitmap);
}
};
var openfl__$internal_renderer_cairo_CairoDisplayObject = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoDisplayObject"] = openfl__$internal_renderer_cairo_CairoDisplayObject;
openfl__$internal_renderer_cairo_CairoDisplayObject.__name__ = ["openfl","_internal","renderer","cairo","CairoDisplayObject"];
openfl__$internal_renderer_cairo_CairoDisplayObject.render = function(displayObject,renderSession) {
};
var openfl__$internal_renderer_cairo_CairoGraphics = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoGraphics"] = openfl__$internal_renderer_cairo_CairoGraphics;
openfl__$internal_renderer_cairo_CairoGraphics.__name__ = ["openfl","_internal","renderer","cairo","CairoGraphics"];
openfl__$internal_renderer_cairo_CairoGraphics.closePath = function(strokeBefore) {
if(strokeBefore == null) strokeBefore = false;
if(openfl__$internal_renderer_cairo_CairoGraphics.strokePattern == null) return;
if(!strokeBefore) openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_source(openfl__$internal_renderer_cairo_CairoGraphics.strokePattern);
if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) openfl__$internal_renderer_cairo_CairoGraphics.cairo.strokePreserve();
if(strokeBefore) openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
};
openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
var pattern = null;
switch(type) {
case 1:
if(matrix == null) matrix = new openfl_geom_Matrix();
var point = matrix.transformPoint(new openfl_geom_Point(1638.4,0));
var x = matrix.tx + openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
var y = matrix.ty + openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRadial(x,y,0,x,y,Math.abs((point.x - matrix.tx) / 2));
break;
case 0:
if(matrix == null) matrix = new openfl_geom_Matrix();
var point1 = matrix.transformPoint(new openfl_geom_Point(-819.2,0));
var point2 = matrix.transformPoint(new openfl_geom_Point(819.2,0));
point1.x += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
point2.x += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
point1.y += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
point2.y += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createLinear(point1.x,point1.y,point2.x,point2.y);
break;
}
var _g1 = 0;
var _g = colors.length;
while(_g1 < _g) {
var i = _g1++;
var rgb = colors[i];
var alpha = alphas[i];
var r = ((rgb & 16711680) >>> 16) / 255;
var g = ((rgb & 65280) >>> 8) / 255;
var b = (rgb & 255) / 255;
var ratio = ratios[i] / 255;
if(ratio < 0) ratio = 0;
if(ratio > 1) ratio = 1;
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.addColorStopRGBA(pattern,ratio,r,g,b,alpha);
}
var mat = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_matrix(pattern);
mat.tx = openfl__$internal_renderer_cairo_CairoGraphics.bounds.x;
mat.ty = openfl__$internal_renderer_cairo_CairoGraphics.bounds.y;
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_matrix(pattern,mat);
return pattern;
};
openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern = function(bitmapFill,matrix,bitmapRepeat,smooth) {
var pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface(bitmapFill.getSurface());
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter(pattern,smooth && openfl__$internal_renderer_cairo_CairoGraphics.allowSmoothing?1:3);
if(bitmapRepeat) lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_extend(pattern,1);
openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = matrix;
return pattern;
};
openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect = function(x,y,width,height,ellipseWidth,ellipseHeight) {
if(ellipseHeight == null) ellipseHeight = ellipseWidth;
ellipseWidth *= 0.5;
ellipseHeight *= 0.5;
if(ellipseWidth > width / 2) ellipseWidth = width / 2;
if(ellipseHeight > height / 2) ellipseHeight = height / 2;
var xe = x + width;
var ye = y + height;
var cx1 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_cairo_CairoGraphics.SIN45;
var cx2 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_cairo_CairoGraphics.TAN22;
var cy1 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_cairo_CairoGraphics.SIN45;
var cy2 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_cairo_CairoGraphics.TAN22;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(xe,ye - ellipseHeight);
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe,ye + cy2,xe + cx1,ye + cy1);
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe + cx2,ye,xe - ellipseWidth,ye);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x + ellipseWidth,ye);
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x - cx2,ye,x - cx1,ye + cy1);
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x,ye + cy2,x,ye - ellipseHeight);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x,y + ellipseHeight);
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x,y - cy2,x - cx1,y - cy1);
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x - cx2,y,x + ellipseWidth,y);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(xe - ellipseWidth,y);
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe + cx2,y,xe + cx1,y - cy1);
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe,y - cy2,xe,y + ellipseHeight);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(xe,ye - ellipseHeight);
};
openfl__$internal_renderer_cairo_CairoGraphics.endFill = function() {
openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
openfl__$internal_renderer_cairo_CairoGraphics.playCommands(openfl__$internal_renderer_cairo_CairoGraphics.fillCommands,false);
openfl__$internal_renderer_cairo_CairoGraphics.fillCommands.clear();
};
openfl__$internal_renderer_cairo_CairoGraphics.endStroke = function() {
openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
openfl__$internal_renderer_cairo_CairoGraphics.playCommands(openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands,true);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands.clear();
};
openfl__$internal_renderer_cairo_CairoGraphics.hitTest = function(graphics,x,y) {
return false;
};
openfl__$internal_renderer_cairo_CairoGraphics.isCCW = function(x1,y1,x2,y2,x3,y3) {
return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0;
};
openfl__$internal_renderer_cairo_CairoGraphics.normalizeUVT = function(uvt,skipT) {
if(skipT == null) skipT = false;
var max = -Infinity;
var tmp = -Infinity;
var len = uvt.get_length();
var _g1 = 1;
var _g = len + 1;
while(_g1 < _g) {
var t = _g1++;
if(skipT && t % 3 == 0) continue;
tmp = uvt.get(t - 1);
if(max < tmp) max = tmp;
}
if(!skipT) return { max : max, uvt : uvt};
var result = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
var _g11 = 1;
var _g2 = len + 1;
while(_g11 < _g2) {
var t1 = _g11++;
if(skipT && t1 % 3 == 0) continue;
var x = uvt.get(t1 - 1);
result.push(x);
}
return { max : max, uvt : result};
};
openfl__$internal_renderer_cairo_CairoGraphics.playCommands = function(commands,stroke) {
if(stroke == null) stroke = false;
if(commands.get_length() == 0) return;
openfl__$internal_renderer_cairo_CairoGraphics.bounds = openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds;
var offsetX = openfl__$internal_renderer_cairo_CairoGraphics.bounds.x;
var offsetY = openfl__$internal_renderer_cairo_CairoGraphics.bounds.y;
var positionX = 0.0;
var positionY = 0.0;
var closeGap = false;
var startX = 0.0;
var startY = 0.0;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_fillRule(1);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_antialias(3);
var hasPath = false;
var data = new openfl__$internal_renderer_DrawCommandReader(commands);
var _g = 0;
var _g1 = commands.types;
try {
while(_g < _g1.length) {
var type = _g1[_g];
++_g;
switch(type[1]) {
case 3:
var c;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
c = data;
hasPath = true;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(c.buffer.f[c.fPos] - offsetX,c.buffer.f[c.fPos + 1] - offsetY,c.buffer.f[c.fPos + 2] - offsetX,c.buffer.f[c.fPos + 3] - offsetY,c.buffer.f[c.fPos + 4] - offsetX,c.buffer.f[c.fPos + 5] - offsetY);
break;
case 4:
var c1;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
c1 = data;
hasPath = true;
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(c1.buffer.f[c1.fPos] - offsetX,c1.buffer.f[c1.fPos + 1] - offsetY,c1.buffer.f[c1.fPos + 2] - offsetX,c1.buffer.f[c1.fPos + 3] - offsetY);
break;
case 5:
var c2;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
c2 = data;
hasPath = true;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(c2.buffer.f[c2.fPos] - offsetX + c2.buffer.f[c2.fPos + 2],c2.buffer.f[c2.fPos + 1] - offsetY);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.arc(c2.buffer.f[c2.fPos] - offsetX,c2.buffer.f[c2.fPos + 1] - offsetY,c2.buffer.f[c2.fPos + 2],0,Math.PI * 2);
break;
case 7:
var c3;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
c3 = data;
hasPath = true;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.rectangle(c3.buffer.f[c3.fPos] - offsetX,c3.buffer.f[c3.fPos + 1] - offsetY,c3.buffer.f[c3.fPos + 2],c3.buffer.f[c3.fPos + 3]);
break;
case 6:
var c4;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
c4 = data;
hasPath = true;
var x = c4.buffer.f[c4.fPos];
var y = c4.buffer.f[c4.fPos + 1];
var width = c4.buffer.f[c4.fPos + 2];
var height = c4.buffer.f[c4.fPos + 3];
x -= offsetX;
y -= offsetY;
var kappa = .5522848;
var ox = width / 2 * kappa;
var oy = height / 2 * kappa;
var xe = x + width;
var ye = y + height;
var xm = x + width / 2;
var ym = y + height / 2;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(x,ym);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(x,ym - oy,xm - ox,y,xm,y);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(xm + ox,y,xe,ym - oy,xe,ym);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(xe,ym + oy,xm + ox,ye,xm,ye);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(xm - ox,ye,x,ym + oy,x,ym);
break;
case 8:
var c5;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
c5 = data;
hasPath = true;
openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect(c5.buffer.f[c5.fPos] - offsetX,c5.buffer.f[c5.fPos + 1] - offsetY,c5.buffer.f[c5.fPos + 2],c5.buffer.f[c5.fPos + 3],c5.buffer.f[c5.fPos + 4],c5.buffer.o[c5.oPos]);
break;
case 15:
var c6;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
c6 = data;
hasPath = true;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(c6.buffer.f[c6.fPos] - offsetX,c6.buffer.f[c6.fPos + 1] - offsetY);
positionX = c6.buffer.f[c6.fPos];
positionY = c6.buffer.f[c6.fPos + 1];
break;
case 16:
var c7;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
c7 = data;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(c7.buffer.f[c7.fPos] - offsetX,c7.buffer.f[c7.fPos + 1] - offsetY);
positionX = c7.buffer.f[c7.fPos];
positionY = c7.buffer.f[c7.fPos + 1];
closeGap = true;
startX = c7.buffer.f[c7.fPos];
startY = c7.buffer.f[c7.fPos + 1];
break;
case 14:
var c8;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
c8 = data;
if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) openfl__$internal_renderer_cairo_CairoGraphics.closePath(true);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(positionX - offsetX,positionY - offsetY);
if(c8.buffer.o[c8.oPos] == null) openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = false; else {
openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_lineWidth(c8.buffer.o[c8.oPos] > 0?c8.buffer.o[c8.oPos]:1);
if(c8.buffer.o[c8.oPos + 3] == null) openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_lineJoin(1); else openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_lineJoin((function($this) {
var $r;
var _g2 = c8.buffer.o[c8.oPos + 3];
$r = (function($this) {
var $r;
switch(_g2) {
case 1:
$r = 0;
break;
case 0:
$r = 2;
break;
default:
$r = 1;
}
return $r;
}($this));
return $r;
}(this)));
if(c8.buffer.o[c8.oPos + 2] == null) openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_lineCap(1); else openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_lineCap((function($this) {
var $r;
var _g21 = c8.buffer.o[c8.oPos + 2];
$r = (function($this) {
var $r;
switch(_g21) {
case 0:
$r = 0;
break;
case 2:
$r = 2;
break;
default:
$r = 1;
}
return $r;
}($this));
return $r;
}(this)));
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_miterLimit(c8.buffer.f[c8.fPos + 1]);
var r = ((c8.buffer.i[c8.iPos] & 16711680) >>> 16) / 255;
var g = ((c8.buffer.i[c8.iPos] & 65280) >>> 8) / 255;
var b = (c8.buffer.i[c8.iPos] & 255) / 255;
if(c8.buffer.f[c8.fPos] == 1) openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGB(r,g,b); else openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA(r,g,b,c8.buffer.f[c8.fPos]);
}
break;
case 13:
var c9;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
c9 = data;
if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) openfl__$internal_renderer_cairo_CairoGraphics.closePath();
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(positionX - offsetX,positionY - offsetY);
openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern(c9.buffer.o[c9.oPos],c9.buffer.ii[c9.iiPos],c9.buffer.ff[c9.ffPos],c9.buffer.ii[c9.iiPos + 1],c9.buffer.o[c9.oPos + 1],c9.buffer.o[c9.oPos + 2],c9.buffer.o[c9.oPos + 3],c9.buffer.f[c9.fPos]);
openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
break;
case 12:
var c10;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
c10 = data;
if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) openfl__$internal_renderer_cairo_CairoGraphics.closePath();
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(positionX - offsetX,positionY - offsetY);
openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern(c10.buffer.o[c10.oPos],c10.buffer.o[c10.oPos + 1],c10.buffer.b[c10.bPos],c10.buffer.b[c10.bPos + 1]);
openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
break;
case 0:
var c11;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
c11 = data;
openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern(c11.buffer.o[c11.oPos],c11.buffer.o[c11.oPos + 1],c11.buffer.b[c11.bPos],c11.buffer.b[c11.bPos + 1]);
openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = c11.buffer.o[c11.oPos];
openfl__$internal_renderer_cairo_CairoGraphics.bitmapRepeat = c11.buffer.b[c11.bPos];
openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
break;
case 1:
var c12;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
c12 = data;
if(c12.buffer.f[c12.fPos] < 0.005) openfl__$internal_renderer_cairo_CairoGraphics.hasFill = false; else {
if(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern != null) openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = null;
openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA(((c12.buffer.i[c12.iPos] & 16711680) >>> 16) / 255,((c12.buffer.i[c12.iPos] & 65280) >>> 8) / 255,(c12.buffer.i[c12.iPos] & 255) / 255,c12.buffer.f[c12.fPos]);
openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
}
openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = null;
break;
case 2:
var c13;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
c13 = data;
if(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern != null) openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = null;
openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern(c13.buffer.o[c13.oPos],c13.buffer.ii[c13.iiPos],c13.buffer.ff[c13.ffPos],c13.buffer.ii[c13.iiPos + 1],c13.buffer.o[c13.oPos + 1],c13.buffer.o[c13.oPos + 2],c13.buffer.o[c13.oPos + 3],c13.buffer.f[c13.fPos]);
openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = null;
break;
case 10:
var c14;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;
c14 = data;
var v = c14.buffer.o[c14.oPos];
var ind = c14.buffer.o[c14.oPos + 1];
var uvt = c14.buffer.o[c14.oPos + 2];
var colorFill = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill == null;
if(colorFill && uvt != null) throw "__break__";
var width1 = 0;
var height1 = 0;
var currentMatrix = openfl__$internal_renderer_cairo_CairoGraphics.graphics.__renderTransform.__toMatrix3();
if(!colorFill) {
if(uvt == null) {
uvt = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
var _g3 = 0;
var _g22 = Std["int"](v.get_length() / 2);
while(_g3 < _g22) {
var i1 = _g3++;
var x4 = v.get(i1 * 2) / openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.width;
uvt.push(x4);
var x5 = v.get(i1 * 2 + 1) / openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.height;
uvt.push(x5);
}
}
var skipT = c14.buffer.o[c14.oPos + 2].get_length() != v.get_length();
var normalizedUVT = openfl__$internal_renderer_cairo_CairoGraphics.normalizeUVT(uvt,skipT);
var maxUVT = normalizedUVT.max;
uvt = normalizedUVT.uvt;
if(maxUVT > 1) {
width1 = openfl__$internal_renderer_cairo_CairoGraphics.bounds.width | 0;
height1 = openfl__$internal_renderer_cairo_CairoGraphics.bounds.height | 0;
} else {
width1 = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.width;
height1 = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.height;
}
}
var i = 0;
var l = ind.get_length();
var a_;
var b_;
var c_;
var iax;
var iay;
var ibx;
var iby;
var icx;
var icy;
var x1;
var y1;
var x2;
var y2;
var x3;
var y3;
var uvx1;
var uvy1;
var uvx2;
var uvy2;
var uvx3;
var uvy3;
var denom;
var t1;
var t2;
var t3;
var t4;
var dx;
var dy;
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_antialias(1);
while(i < l) {
a_ = i;
b_ = i + 1;
c_ = i + 2;
iax = ind.get(a_) * 2;
iay = ind.get(a_) * 2 + 1;
ibx = ind.get(b_) * 2;
iby = ind.get(b_) * 2 + 1;
icx = ind.get(c_) * 2;
icy = ind.get(c_) * 2 + 1;
x1 = v.get(iax);
y1 = v.get(iay);
x2 = v.get(ibx);
y2 = v.get(iby);
x3 = v.get(icx);
y3 = v.get(icy);
var _g23 = c14.buffer.o[c14.oPos + 3];
switch(_g23) {
case 2:
if(!((x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0)) {
i += 3;
continue;
}
break;
case 0:
if((x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0) {
i += 3;
continue;
}
break;
default:
}
if(colorFill) {
openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(x1,y1);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x2,y2);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x3,y3);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) openfl__$internal_renderer_cairo_CairoGraphics.cairo.fillPreserve();
i += 3;
continue;
}
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_matrix(openfl__$internal_renderer_cairo_CairoGraphics.graphics.__renderTransform.__toMatrix3());
openfl__$internal_renderer_cairo_CairoGraphics.cairo.newPath();
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(x1,y1);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x2,y2);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(x3,y3);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
uvx1 = uvt.get(iax) * width1;
uvx2 = uvt.get(ibx) * width1;
uvx3 = uvt.get(icx) * width1;
uvy1 = uvt.get(iay) * height1;
uvy2 = uvt.get(iby) * height1;
uvy3 = uvt.get(icy) * height1;
denom = uvx1 * (uvy3 - uvy2) - uvx2 * uvy3 + uvx3 * uvy2 + (uvx2 - uvx3) * uvy1;
if(denom == 0) {
i += 3;
continue;
}
x1 *= currentMatrix.a;
x2 *= currentMatrix.a;
x3 *= currentMatrix.a;
y1 *= currentMatrix.d;
y2 *= currentMatrix.d;
y3 *= currentMatrix.d;
t1 = -(uvy1 * (x3 - x2) - uvy2 * x3 + uvy3 * x2 + (uvy2 - uvy3) * x1) / denom;
t2 = (uvy2 * y3 + uvy1 * (y2 - y3) - uvy3 * y2 + (uvy3 - uvy2) * y1) / denom;
t3 = (uvx1 * (x3 - x2) - uvx2 * x3 + uvx3 * x2 + (uvx2 - uvx3) * x1) / denom;
t4 = -(uvx2 * y3 + uvx1 * (y2 - y3) - uvx3 * y2 + (uvx3 - uvx2) * y1) / denom;
dx = (uvx1 * (uvy3 * x2 - uvy2 * x3) + uvy1 * (uvx2 * x3 - uvx3 * x2) + (uvx3 * uvy2 - uvx2 * uvy3) * x1) / denom;
dy = (uvx1 * (uvy3 * y2 - uvy2 * y3) + uvy1 * (uvx2 * y3 - uvx3 * y2) + (uvx3 * uvy2 - uvx2 * uvy3) * y1) / denom;
var matrix = new lime_math_Matrix3(t1,t2,t3,t4,dx,dy);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_matrix(matrix);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_source(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern);
if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) openfl__$internal_renderer_cairo_CairoGraphics.cairo.fill();
i += 3;
}
break;
default:
data.advance();
data.prev = type;
}
}
} catch( e ) { if( e != "__break__" ) throw e; }
data.destroy();
if(hasPath) {
if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
if(openfl__$internal_renderer_cairo_CairoGraphics.hasFill && closeGap) openfl__$internal_renderer_cairo_CairoGraphics.cairo.lineTo(startX - offsetX,startY - offsetY); else if(closeGap && positionX == startX && positionY == startY) openfl__$internal_renderer_cairo_CairoGraphics.closePath(true);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_source(openfl__$internal_renderer_cairo_CairoGraphics.strokePattern);
if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) openfl__$internal_renderer_cairo_CairoGraphics.cairo.strokePreserve();
}
if(!stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasFill) {
openfl__$internal_renderer_cairo_CairoGraphics.cairo.translate(-openfl__$internal_renderer_cairo_CairoGraphics.bounds.x,-openfl__$internal_renderer_cairo_CairoGraphics.bounds.y);
if(openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix != null) {
var matrix1 = openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix.clone();
matrix1.invert();
if(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix != null) matrix1.concat(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix);
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_matrix(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern,matrix1.__toMatrix3());
}
openfl__$internal_renderer_cairo_CairoGraphics.cairo.set_source(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern);
if(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix != null) {
openfl__$internal_renderer_cairo_CairoGraphics.cairo.transform(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix.__toMatrix3());
if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) openfl__$internal_renderer_cairo_CairoGraphics.cairo.fillPreserve();
openfl__$internal_renderer_cairo_CairoGraphics.cairo.transform(openfl__$internal_renderer_cairo_CairoGraphics.inversePendingMatrix.__toMatrix3());
} else if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) openfl__$internal_renderer_cairo_CairoGraphics.cairo.fillPreserve();
openfl__$internal_renderer_cairo_CairoGraphics.cairo.translate(openfl__$internal_renderer_cairo_CairoGraphics.bounds.x,openfl__$internal_renderer_cairo_CairoGraphics.bounds.y);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.closePath();
}
}
};
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo = function(cx,cy,x,y) {
var current = null;
if(!openfl__$internal_renderer_cairo_CairoGraphics.cairo.get_hasCurrentPoint()) {
openfl__$internal_renderer_cairo_CairoGraphics.cairo.moveTo(cx,cy);
current = new lime_math_Vector2(cx,cy);
} else current = openfl__$internal_renderer_cairo_CairoGraphics.cairo.get_currentPoint();
var cx1 = current.x + 0.66666666666666663 * (cx - current.x);
var cy1 = current.y + 0.66666666666666663 * (cy - current.y);
var cx2 = x + 0.66666666666666663 * (cx - x);
var cy2 = y + 0.66666666666666663 * (cy - y);
openfl__$internal_renderer_cairo_CairoGraphics.cairo.curveTo(cx1,cy1,cx2,cy2,x,y);
};
openfl__$internal_renderer_cairo_CairoGraphics.render = function(graphics,renderSession,parentTransform) {
};
openfl__$internal_renderer_cairo_CairoGraphics.renderMask = function(graphics,renderSession) {
if(graphics.__commands.get_length() != 0) {
var cairo = renderSession.cairo;
var positionX = 0.0;
var positionY = 0.0;
var offsetX = 0;
var offsetY = 0;
var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
var _g = 0;
var _g1 = graphics.__commands.types;
while(_g < _g1.length) {
var type = _g1[_g];
++_g;
switch(type[1]) {
case 3:
var c;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
c = data;
cairo.curveTo(c.buffer.f[c.fPos] - offsetX,c.buffer.f[c.fPos + 1] - offsetY,c.buffer.f[c.fPos + 2] - offsetX,c.buffer.f[c.fPos + 3] - offsetY,c.buffer.f[c.fPos + 4] - offsetX,c.buffer.f[c.fPos + 5] - offsetY);
positionX = c.buffer.f[c.fPos + 4];
positionY = c.buffer.f[c.fPos + 4];
break;
case 4:
var c1;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
c1 = data;
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(c1.buffer.f[c1.fPos] - offsetX,c1.buffer.f[c1.fPos + 1] - offsetY,c1.buffer.f[c1.fPos + 2] - offsetX,c1.buffer.f[c1.fPos + 3] - offsetY);
positionX = c1.buffer.f[c1.fPos + 2];
positionY = c1.buffer.f[c1.fPos + 3];
break;
case 5:
var c2;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
c2 = data;
cairo.arc(c2.buffer.f[c2.fPos] - offsetX,c2.buffer.f[c2.fPos + 1] - offsetY,c2.buffer.f[c2.fPos + 2],0,Math.PI * 2);
break;
case 6:
var c3;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
c3 = data;
var x = c3.buffer.f[c3.fPos];
var y = c3.buffer.f[c3.fPos + 1];
var width = c3.buffer.f[c3.fPos + 2];
var height = c3.buffer.f[c3.fPos + 3];
x -= offsetX;
y -= offsetY;
var kappa = .5522848;
var ox = width / 2 * kappa;
var oy = height / 2 * kappa;
var xe = x + width;
var ye = y + height;
var xm = x + width / 2;
var ym = y + height / 2;
cairo.moveTo(x,ym);
cairo.curveTo(x,ym - oy,xm - ox,y,xm,y);
cairo.curveTo(xm + ox,y,xe,ym - oy,xe,ym);
cairo.curveTo(xe,ym + oy,xm + ox,ye,xm,ye);
cairo.curveTo(xm - ox,ye,x,ym + oy,x,ym);
break;
case 7:
var c4;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
c4 = data;
cairo.rectangle(c4.buffer.f[c4.fPos] - offsetX,c4.buffer.f[c4.fPos + 1] - offsetY,c4.buffer.f[c4.fPos + 2],c4.buffer.f[c4.fPos + 3]);
break;
case 8:
var c5;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
c5 = data;
openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect(c5.buffer.f[c5.fPos] - offsetX,c5.buffer.f[c5.fPos + 1] - offsetY,c5.buffer.f[c5.fPos + 2],c5.buffer.f[c5.fPos + 3],c5.buffer.f[c5.fPos + 4],c5.buffer.o[c5.oPos]);
break;
case 15:
var c6;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
c6 = data;
cairo.lineTo(c6.buffer.f[c6.fPos] - offsetX,c6.buffer.f[c6.fPos + 1] - offsetY);
positionX = c6.buffer.f[c6.fPos];
positionY = c6.buffer.f[c6.fPos + 1];
break;
case 16:
var c7;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
c7 = data;
cairo.moveTo(c7.buffer.f[c7.fPos] - offsetX,c7.buffer.f[c7.fPos + 1] - offsetY);
positionX = c7.buffer.f[c7.fPos];
positionY = c7.buffer.f[c7.fPos + 1];
break;
default:
data.advance();
data.prev = type;
}
}
data.destroy();
}
};
var openfl__$internal_renderer_cairo_CairoRenderer = function(stage,cairo) {
openfl__$internal_renderer_AbstractRenderer.call(this,stage);
};
$hxClasses["openfl._internal.renderer.cairo.CairoRenderer"] = openfl__$internal_renderer_cairo_CairoRenderer;
openfl__$internal_renderer_cairo_CairoRenderer.__name__ = ["openfl","_internal","renderer","cairo","CairoRenderer"];
openfl__$internal_renderer_cairo_CairoRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_cairo_CairoRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
cairo: null
,clear: function() {
this.cairo.identityMatrix();
if(this.stage.__clearBeforeRender) {
this.cairo.setSourceRGB(this.stage.__colorSplit[0],this.stage.__colorSplit[1],this.stage.__colorSplit[2]);
this.cairo.paint();
}
}
,render: function() {
this.renderSession.allowSmoothing = this.stage.quality != 2;
this.stage.__renderCairo(this.renderSession);
}
,renderStage3D: function() {
var _g = 0;
var _g1 = this.stage.stage3Ds;
while(_g < _g1.get_length()) {
var stage3D = _g1.get(_g);
++_g;
stage3D.__renderCairo(this.stage,this.renderSession);
}
}
,__class__: openfl__$internal_renderer_cairo_CairoRenderer
});
var openfl__$internal_renderer_cairo_CairoTextField = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoTextField"] = openfl__$internal_renderer_cairo_CairoTextField;
openfl__$internal_renderer_cairo_CairoTextField.__name__ = ["openfl","_internal","renderer","cairo","CairoTextField"];
openfl__$internal_renderer_cairo_CairoTextField.render = function(textField,renderSession,transform) {
};
var openfl__$internal_renderer_canvas_CanvasBitmap = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasBitmap"] = openfl__$internal_renderer_canvas_CanvasBitmap;
openfl__$internal_renderer_canvas_CanvasBitmap.__name__ = ["openfl","_internal","renderer","canvas","CanvasBitmap"];
openfl__$internal_renderer_canvas_CanvasBitmap.render = function(bitmap,renderSession) {
if(!bitmap.__renderable || bitmap.__worldAlpha <= 0) return;
var context = renderSession.context;
if(bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
renderSession.maskManager.pushObject(bitmap,false);
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(bitmap.bitmapData.image);
context.globalAlpha = bitmap.__worldAlpha;
var transform = bitmap.__renderTransform;
var scrollRect = bitmap.__scrollRect;
if(renderSession.roundPixels) context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0); else context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
if(!renderSession.allowSmoothing || !bitmap.smoothing) {
context.mozImageSmoothingEnabled = false;
context.msImageSmoothingEnabled = false;
context.imageSmoothingEnabled = false;
}
if(scrollRect == null) context.drawImage(bitmap.bitmapData.image.get_src(),0,0); else context.drawImage(bitmap.bitmapData.image.get_src(),scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height,scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);
if(!renderSession.allowSmoothing || !bitmap.smoothing) {
context.mozImageSmoothingEnabled = true;
context.msImageSmoothingEnabled = true;
context.imageSmoothingEnabled = true;
}
renderSession.maskManager.popObject(bitmap,false);
}
};
var openfl__$internal_renderer_canvas_CanvasDisplayObject = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasDisplayObject"] = openfl__$internal_renderer_canvas_CanvasDisplayObject;
openfl__$internal_renderer_canvas_CanvasDisplayObject.__name__ = ["openfl","_internal","renderer","canvas","CanvasDisplayObject"];
openfl__$internal_renderer_canvas_CanvasDisplayObject.render = function(displayObject,renderSession) {
if(displayObject.opaqueBackground == null && displayObject.__graphics == null) return;
if(!displayObject.__renderable || displayObject.__worldAlpha <= 0) return;
if(displayObject.opaqueBackground != null && !displayObject.__cacheBitmapRender && displayObject.get_width() > 0 && displayObject.get_height() > 0) {
renderSession.maskManager.pushObject(displayObject);
var context = renderSession.context;
var transform = displayObject.__renderTransform;
if(renderSession.roundPixels) context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0); else context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
var color = displayObject.opaqueBackground;
context.fillStyle = "rgb(" + (color >> 16 & 255) + "," + (color >> 8 & 255) + "," + (color & 255) + ")";
context.fillRect(0,0,displayObject.get_width(),displayObject.get_height());
renderSession.maskManager.popObject(displayObject);
}
if(displayObject.__graphics != null) openfl__$internal_renderer_canvas_CanvasShape.render(displayObject,renderSession);
};
var openfl__$internal_renderer_canvas_CanvasGraphics = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasGraphics"] = openfl__$internal_renderer_canvas_CanvasGraphics;
openfl__$internal_renderer_canvas_CanvasGraphics.__name__ = ["openfl","_internal","renderer","canvas","CanvasGraphics"];
openfl__$internal_renderer_canvas_CanvasGraphics.closePath = function(strokeBefore) {
if(strokeBefore == null) strokeBefore = false;
if(openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle == null) return;
if(!strokeBefore) openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();
if(strokeBefore) openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
};
openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill = function(bitmap,bitmapRepeat,smooth) {
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(bitmap.image);
openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(smooth);
return openfl__$internal_renderer_canvas_CanvasGraphics.context.createPattern(bitmap.image.get_src(),bitmapRepeat?"repeat":"no-repeat");
};
openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
var gradientFill = null;
switch(type) {
case 1:
if(matrix == null) matrix = new openfl_geom_Matrix();
var point = matrix.transformPoint(new openfl_geom_Point(1638.4,0));
gradientFill = openfl__$internal_renderer_canvas_CanvasGraphics.context.createRadialGradient(matrix.tx,matrix.ty,0,matrix.tx,matrix.ty,Math.abs((point.x - matrix.tx) / 2));
break;
case 0:
var matrix1;
if(matrix != null) matrix1 = matrix; else matrix1 = new openfl_geom_Matrix();
var point1 = matrix1.transformPoint(new openfl_geom_Point(-819.2,0));
var point2 = matrix1.transformPoint(new openfl_geom_Point(819.2,0));
gradientFill = openfl__$internal_renderer_canvas_CanvasGraphics.context.createLinearGradient(point1.x,point1.y,point2.x,point2.y);
break;
}
var _g1 = 0;
var _g = colors.length;
while(_g1 < _g) {
var i = _g1++;
var rgb = colors[i];
var alpha = alphas[i];
var r = (rgb & 16711680) >>> 16;
var g = (rgb & 65280) >>> 8;
var b = rgb & 255;
var ratio = ratios[i] / 255;
if(ratio < 0) ratio = 0;
if(ratio > 1) ratio = 1;
gradientFill.addColorStop(ratio,"rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")");
}
return gradientFill;
};
openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas = function(bitmap,repeat,width,height) {
var canvas = window.document.createElement("canvas");
var context = canvas.getContext("2d");
canvas.width = width;
canvas.height = height;
context.fillStyle = context.createPattern(bitmap.image.get_src(),repeat?"repeat":"no-repeat");
context.beginPath();
context.moveTo(0,0);
context.lineTo(0,height);
context.lineTo(width,height);
context.lineTo(width,0);
context.lineTo(0,0);
context.closePath();
if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) context.fill();
return canvas;
};
openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect = function(x,y,width,height,ellipseWidth,ellipseHeight) {
if(ellipseHeight == null) ellipseHeight = ellipseWidth;
ellipseWidth *= 0.5;
ellipseHeight *= 0.5;
if(ellipseWidth > width / 2) ellipseWidth = width / 2;
if(ellipseHeight > height / 2) ellipseHeight = height / 2;
var xe = x + width;
var ye = y + height;
var cx1 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;
var cx2 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;
var cy1 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;
var cy2 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(xe,ye - ellipseHeight);
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe,ye + cy2,xe + cx1,ye + cy1);
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe + cx2,ye,xe - ellipseWidth,ye);
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x + ellipseWidth,ye);
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x - cx2,ye,x - cx1,ye + cy1);
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x,ye + cy2,x,ye - ellipseHeight);
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x,y + ellipseHeight);
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x,y - cy2,x - cx1,y - cy1);
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x - cx2,y,x + ellipseWidth,y);
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(xe - ellipseWidth,y);
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe + cx2,y,xe + cx1,y - cy1);
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe,y - cy2,xe,y + ellipseHeight);
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(xe,ye - ellipseHeight);
};
openfl__$internal_renderer_canvas_CanvasGraphics.endFill = function() {
openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands,false);
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
};
openfl__$internal_renderer_canvas_CanvasGraphics.endStroke = function() {
openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands,true);
openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
};
openfl__$internal_renderer_canvas_CanvasGraphics.hitTest = function(graphics,x,y) {
openfl__$internal_renderer_canvas_CanvasGraphics.bounds = graphics.__bounds;
openfl__$internal_renderer_canvas_CanvasGraphics.graphics = graphics;
if(graphics.__commands.get_length() == 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds == null || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width <= 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height <= 0) return false; else {
openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting = true;
var transform = graphics.__renderTransform;
var px = x * transform.a + y * transform.c + transform.tx;
var py = x * transform.b + y * transform.d + transform.ty;
x = px;
y = py;
x -= openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x * transform.a + openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y * transform.c + transform.tx;
y -= openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x * transform.b + openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y * transform.d + transform.ty;
var cacheCanvas = graphics.__canvas;
var cacheContext = graphics.__context;
graphics.__canvas = openfl__$internal_renderer_canvas_CanvasGraphics.hitTestCanvas;
graphics.__context = openfl__$internal_renderer_canvas_CanvasGraphics.hitTestContext;
openfl__$internal_renderer_canvas_CanvasGraphics.context = graphics.__context;
openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat = false;
var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
var _g = 0;
var _g1 = graphics.__commands.types;
while(_g < _g1.length) {
var type = _g1[_g];
++_g;
switch(type[1]) {
case 3:
var c;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
c = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.cubicCurveTo(c.buffer.f[c.fPos],c.buffer.f[c.fPos + 1],c.buffer.f[c.fPos + 2],c.buffer.f[c.fPos + 3],c.buffer.f[c.fPos + 4],c.buffer.f[c.fPos + 5]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.cubicCurveTo(c.buffer.f[c.fPos],c.buffer.f[c.fPos + 1],c.buffer.f[c.fPos + 2],c.buffer.f[c.fPos + 3],c.buffer.f[c.fPos + 4],c.buffer.f[c.fPos + 5]);
break;
case 4:
var c1;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
c1 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.curveTo(c1.buffer.f[c1.fPos],c1.buffer.f[c1.fPos + 1],c1.buffer.f[c1.fPos + 2],c1.buffer.f[c1.fPos + 3]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.curveTo(c1.buffer.f[c1.fPos],c1.buffer.f[c1.fPos + 1],c1.buffer.f[c1.fPos + 2],c1.buffer.f[c1.fPos + 3]);
break;
case 15:
var c2;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
c2 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.lineTo(c2.buffer.f[c2.fPos],c2.buffer.f[c2.fPos + 1]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineTo(c2.buffer.f[c2.fPos],c2.buffer.f[c2.fPos + 1]);
break;
case 16:
var c3;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
c3 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.moveTo(c3.buffer.f[c3.fPos],c3.buffer.f[c3.fPos + 1]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(c3.buffer.f[c3.fPos],c3.buffer.f[c3.fPos + 1]);
break;
case 13:
var c4;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
c4 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineGradientStyle(c4.buffer.o[c4.oPos],c4.buffer.ii[c4.iiPos],c4.buffer.ff[c4.ffPos],c4.buffer.ii[c4.iiPos + 1],c4.buffer.o[c4.oPos + 1],c4.buffer.o[c4.oPos + 2],c4.buffer.o[c4.oPos + 3],c4.buffer.f[c4.fPos]);
break;
case 12:
var c5;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
c5 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineBitmapStyle(c5.buffer.o[c5.oPos],c5.buffer.o[c5.oPos + 1],c5.buffer.b[c5.bPos],c5.buffer.b[c5.bPos + 1]);
break;
case 14:
var c6;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
c6 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineStyle(c6.buffer.o[c6.oPos],c6.buffer.i[c6.iPos],1,c6.buffer.b[c6.bPos],c6.buffer.o[c6.oPos + 1],c6.buffer.o[c6.oPos + 2],c6.buffer.o[c6.oPos + 3],c6.buffer.f[c6.fPos + 1]);
break;
case 11:
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.END_FILL;
data;
openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
data.destroy();
graphics.__canvas = cacheCanvas;
graphics.__context = cacheContext;
return true;
}
if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
data.destroy();
graphics.__canvas = cacheCanvas;
graphics.__context = cacheContext;
return true;
}
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
break;
case 0:case 1:case 2:
openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
data.destroy();
graphics.__canvas = cacheCanvas;
graphics.__context = cacheContext;
return true;
}
if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
data.destroy();
graphics.__canvas = cacheCanvas;
graphics.__context = cacheContext;
return true;
}
if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL) {
var c7;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
c7 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginBitmapFill(c7.buffer.o[c7.oPos],c7.buffer.o[c7.oPos + 1],c7.buffer.b[c7.bPos],c7.buffer.b[c7.bPos + 1]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginBitmapFill(c7.buffer.o[c7.oPos],c7.buffer.o[c7.oPos + 1],c7.buffer.b[c7.bPos],c7.buffer.b[c7.bPos + 1]);
} else if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL) {
var c8;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
c8 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginGradientFill(c8.buffer.o[c8.oPos],c8.buffer.ii[c8.iiPos],c8.buffer.ff[c8.ffPos],c8.buffer.ii[c8.iiPos + 1],c8.buffer.o[c8.oPos + 1],c8.buffer.o[c8.oPos + 2],c8.buffer.o[c8.oPos + 3],c8.buffer.f[c8.fPos]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginGradientFill(c8.buffer.o[c8.oPos],c8.buffer.ii[c8.iiPos],c8.buffer.ff[c8.ffPos],c8.buffer.ii[c8.iiPos + 1],c8.buffer.o[c8.oPos + 1],c8.buffer.o[c8.oPos + 2],c8.buffer.o[c8.oPos + 3],c8.buffer.f[c8.fPos]);
} else {
var c9;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
c9 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginFill(c9.buffer.i[c9.iPos],1);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginFill(c9.buffer.i[c9.iPos],1);
}
break;
case 5:
var c10;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
c10 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawCircle(c10.buffer.f[c10.fPos],c10.buffer.f[c10.fPos + 1],c10.buffer.f[c10.fPos + 2]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawCircle(c10.buffer.f[c10.fPos],c10.buffer.f[c10.fPos + 1],c10.buffer.f[c10.fPos + 2]);
break;
case 6:
var c11;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
c11 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawEllipse(c11.buffer.f[c11.fPos],c11.buffer.f[c11.fPos + 1],c11.buffer.f[c11.fPos + 2],c11.buffer.f[c11.fPos + 3]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawEllipse(c11.buffer.f[c11.fPos],c11.buffer.f[c11.fPos + 1],c11.buffer.f[c11.fPos + 2],c11.buffer.f[c11.fPos + 3]);
break;
case 7:
var c12;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
c12 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRect(c12.buffer.f[c12.fPos],c12.buffer.f[c12.fPos + 1],c12.buffer.f[c12.fPos + 2],c12.buffer.f[c12.fPos + 3]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRect(c12.buffer.f[c12.fPos],c12.buffer.f[c12.fPos + 1],c12.buffer.f[c12.fPos + 2],c12.buffer.f[c12.fPos + 3]);
break;
case 8:
var c13;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
c13 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRoundRect(c13.buffer.f[c13.fPos],c13.buffer.f[c13.fPos + 1],c13.buffer.f[c13.fPos + 2],c13.buffer.f[c13.fPos + 3],c13.buffer.f[c13.fPos + 4],c13.buffer.o[c13.oPos]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRoundRect(c13.buffer.f[c13.fPos],c13.buffer.f[c13.fPos + 1],c13.buffer.f[c13.fPos + 2],c13.buffer.f[c13.fPos + 3],c13.buffer.f[c13.fPos + 4],c13.buffer.o[c13.oPos]);
break;
default:
data.advance();
data.prev = type;
}
}
if(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.get_length() > 0) openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length() > 0) openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
data.destroy();
if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
graphics.__canvas = cacheCanvas;
graphics.__context = cacheContext;
return true;
}
if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
graphics.__canvas = cacheCanvas;
graphics.__context = cacheContext;
return true;
}
graphics.__canvas = cacheCanvas;
graphics.__context = cacheContext;
}
return false;
};
openfl__$internal_renderer_canvas_CanvasGraphics.isCCW = function(x1,y1,x2,y2,x3,y3) {
return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0;
};
openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT = function(uvt,skipT) {
if(skipT == null) skipT = false;
var max = -Infinity;
var tmp = -Infinity;
var len = uvt.get_length();
var _g1 = 1;
var _g = len + 1;
while(_g1 < _g) {
var t = _g1++;
if(skipT && t % 3 == 0) continue;
tmp = uvt.get(t - 1);
if(max < tmp) max = tmp;
}
if(!skipT) return { max : max, uvt : uvt};
var result = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
var _g11 = 1;
var _g2 = len + 1;
while(_g11 < _g2) {
var t1 = _g11++;
if(skipT && t1 % 3 == 0) continue;
var x = uvt.get(t1 - 1);
result.push(x);
}
return { max : max, uvt : result};
};
openfl__$internal_renderer_canvas_CanvasGraphics.playCommands = function(commands,stroke) {
if(stroke == null) stroke = false;
openfl__$internal_renderer_canvas_CanvasGraphics.bounds = openfl__$internal_renderer_canvas_CanvasGraphics.graphics.__bounds;
var offsetX = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x;
var offsetY = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y;
var positionX = 0.0;
var positionY = 0.0;
var closeGap = false;
var startX = 0.0;
var startY = 0.0;
openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);
var data = new openfl__$internal_renderer_DrawCommandReader(commands);
var _g = 0;
var _g1 = commands.types;
while(_g < _g1.length) {
var type = _g1[_g];
++_g;
switch(type[1]) {
case 3:
var c;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
c = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(c.buffer.f[c.fPos] - offsetX,c.buffer.f[c.fPos + 1] - offsetY,c.buffer.f[c.fPos + 2] - offsetX,c.buffer.f[c.fPos + 3] - offsetY,c.buffer.f[c.fPos + 4] - offsetX,c.buffer.f[c.fPos + 5] - offsetY);
break;
case 4:
var c1;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
c1 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(c1.buffer.f[c1.fPos] - offsetX,c1.buffer.f[c1.fPos + 1] - offsetY,c1.buffer.f[c1.fPos + 2] - offsetX,c1.buffer.f[c1.fPos + 3] - offsetY);
break;
case 5:
var c2;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
c2 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(c2.buffer.f[c2.fPos] - offsetX + c2.buffer.f[c2.fPos + 2],c2.buffer.f[c2.fPos + 1] - offsetY);
openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(c2.buffer.f[c2.fPos] - offsetX,c2.buffer.f[c2.fPos + 1] - offsetY,c2.buffer.f[c2.fPos + 2],0,Math.PI * 2,true);
break;
case 6:
var c3;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
c3 = data;
var x = c3.buffer.f[c3.fPos];
var y = c3.buffer.f[c3.fPos + 1];
var width = c3.buffer.f[c3.fPos + 2];
var height = c3.buffer.f[c3.fPos + 3];
x -= offsetX;
y -= offsetY;
var kappa = .5522848;
var ox = width / 2 * kappa;
var oy = height / 2 * kappa;
var xe = x + width;
var ye = y + height;
var xm = x + width / 2;
var ym = y + height / 2;
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x,ym);
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x,ym - oy,xm - ox,y,xm,y);
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm + ox,y,xe,ym - oy,xe,ym);
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xe,ym + oy,xm + ox,ye,xm,ye);
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm - ox,ye,x,ym + oy,x,ym);
break;
case 8:
var c4;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
c4 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(c4.buffer.f[c4.fPos] - offsetX,c4.buffer.f[c4.fPos + 1] - offsetY,c4.buffer.f[c4.fPos + 2],c4.buffer.f[c4.fPos + 3],c4.buffer.f[c4.fPos + 4],c4.buffer.o[c4.oPos]);
break;
case 15:
var c5;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
c5 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(c5.buffer.f[c5.fPos] - offsetX,c5.buffer.f[c5.fPos + 1] - offsetY);
positionX = c5.buffer.f[c5.fPos];
positionY = c5.buffer.f[c5.fPos + 1];
break;
case 16:
var c6;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
c6 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(c6.buffer.f[c6.fPos] - offsetX,c6.buffer.f[c6.fPos + 1] - offsetY);
positionX = c6.buffer.f[c6.fPos];
positionY = c6.buffer.f[c6.fPos + 1];
closeGap = true;
startX = c6.buffer.f[c6.fPos];
startY = c6.buffer.f[c6.fPos + 1];
break;
case 14:
var c7;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
c7 = data;
if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) openfl__$internal_renderer_canvas_CanvasGraphics.closePath(true);
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
if(c7.buffer.o[c7.oPos] == null) openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false; else {
if(c7.buffer.o[c7.oPos] > 0) openfl__$internal_renderer_canvas_CanvasGraphics.context.lineWidth = c7.buffer.o[c7.oPos]; else openfl__$internal_renderer_canvas_CanvasGraphics.context.lineWidth = 1;
if(c7.buffer.o[c7.oPos + 3] == null) openfl__$internal_renderer_canvas_CanvasGraphics.context.lineJoin = "round"; else openfl__$internal_renderer_canvas_CanvasGraphics.context.lineJoin = openfl_display__$JointStyle_JointStyle_$Impl_$.toString(c7.buffer.o[c7.oPos + 3]).toLowerCase();
if(c7.buffer.o[c7.oPos + 2] == null) openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap = "round"; else {
var _g2 = c7.buffer.o[c7.oPos + 2];
switch(_g2) {
case 0:
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap = "butt";
break;
default:
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap = openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString(c7.buffer.o[c7.oPos + 2]).toLowerCase();
}
}
openfl__$internal_renderer_canvas_CanvasGraphics.context.miterLimit = c7.buffer.f[c7.fPos + 1];
if(c7.buffer.f[c7.fPos] == 1) openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = "#" + StringTools.hex(c7.buffer.i[c7.iPos] & 16777215,6); else {
var r = (c7.buffer.i[c7.iPos] & 16711680) >>> 16;
var g = (c7.buffer.i[c7.iPos] & 65280) >>> 8;
var b = c7.buffer.i[c7.iPos] & 255;
openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = "rgba(" + r + ", " + g + ", " + b + ", " + c7.buffer.f[c7.fPos] + ")";
}
openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);
openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
}
break;
case 13:
var c8;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
c8 = data;
if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) openfl__$internal_renderer_canvas_CanvasGraphics.closePath();
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(c8.buffer.o[c8.oPos],c8.buffer.ii[c8.iiPos],c8.buffer.ff[c8.ffPos],c8.buffer.ii[c8.iiPos + 1],c8.buffer.o[c8.oPos + 1],c8.buffer.o[c8.oPos + 2],c8.buffer.o[c8.oPos + 3],c8.buffer.f[c8.fPos]);
openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);
openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
break;
case 12:
var c9;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
c9 = data;
if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) openfl__$internal_renderer_canvas_CanvasGraphics.closePath();
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(c9.buffer.o[c9.oPos],c9.buffer.b[c9.bPos],c9.buffer.b[c9.bPos + 1]);
openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
break;
case 0:
var c10;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
c10 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = c10.buffer.o[c10.oPos];
openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(c10.buffer.o[c10.oPos],true,c10.buffer.b[c10.bPos + 1]);
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
if(c10.buffer.o[c10.oPos + 1] != null) {
openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix = c10.buffer.o[c10.oPos + 1];
openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix = c10.buffer.o[c10.oPos + 1].clone();
openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.invert();
} else {
openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix = null;
openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix = null;
}
break;
case 1:
var c11;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
c11 = data;
if(c11.buffer.f[c11.fPos] < 0.005) openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false; else {
if(c11.buffer.f[c11.fPos] == 1) openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = "#" + StringTools.hex(c11.buffer.i[c11.iPos] & 16777215,6); else {
var r1 = (c11.buffer.i[c11.iPos] & 16711680) >>> 16;
var g1 = (c11.buffer.i[c11.iPos] & 65280) >>> 8;
var b1 = c11.buffer.i[c11.iPos] & 255;
openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = "rgba(" + r1 + ", " + g1 + ", " + b1 + ", " + c11.buffer.f[c11.fPos] + ")";
}
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
}
break;
case 2:
var c12;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
c12 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(c12.buffer.o[c12.oPos],c12.buffer.ii[c12.iiPos],c12.buffer.ff[c12.ffPos],c12.buffer.ii[c12.iiPos + 1],c12.buffer.o[c12.oPos + 1],c12.buffer.o[c12.oPos + 2],c12.buffer.o[c12.oPos + 3],c12.buffer.f[c12.fPos]);
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
break;
case 7:
var c13;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
c13 = data;
var optimizationUsed = false;
if(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill != null && !openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
var st = 0;
var sr = 0;
var sb = 0;
var sl = 0;
var canOptimizeMatrix = true;
if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix != null) {
if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b != 0 || openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c != 0) canOptimizeMatrix = false; else {
var stl = openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.transformPoint(new openfl_geom_Point(c13.buffer.f[c13.fPos],c13.buffer.f[c13.fPos + 1]));
var sbr = openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.transformPoint(new openfl_geom_Point(c13.buffer.f[c13.fPos] + c13.buffer.f[c13.fPos + 2],c13.buffer.f[c13.fPos + 1] + c13.buffer.f[c13.fPos + 3]));
st = stl.y;
sl = stl.x;
sb = sbr.y;
sr = sbr.x;
}
} else {
st = c13.buffer.f[c13.fPos + 1];
sl = c13.buffer.f[c13.fPos];
sb = c13.buffer.f[c13.fPos + 1] + c13.buffer.f[c13.fPos + 3];
sr = c13.buffer.f[c13.fPos] + c13.buffer.f[c13.fPos + 2];
}
if(canOptimizeMatrix && st >= 0 && sl >= 0 && sr <= openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width && sb <= openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height) {
optimizationUsed = true;
if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.image.get_src(),sl,st,sr - sl,sb - st,c13.buffer.f[c13.fPos] - offsetX,c13.buffer.f[c13.fPos + 1] - offsetY,c13.buffer.f[c13.fPos + 2],c13.buffer.f[c13.fPos + 3]);
}
}
if(!optimizationUsed) openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(c13.buffer.f[c13.fPos] - offsetX,c13.buffer.f[c13.fPos + 1] - offsetY,c13.buffer.f[c13.fPos + 2],c13.buffer.f[c13.fPos + 3]);
break;
default:
data.advance();
data.prev = type;
}
}
data.destroy();
if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && closeGap) openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(startX - offsetX,startY - offsetY); else if(closeGap && positionX == startX && positionY == startY) openfl__$internal_renderer_canvas_CanvasGraphics.closePath(true);
if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();
}
if(!stroke) {
if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill || openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill != null) {
openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);
if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix != null) {
openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.ty);
if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.ty);
} else if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);
openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
}
}
};
openfl__$internal_renderer_canvas_CanvasGraphics.render = function(graphics,renderSession,parentTransform) {
graphics.__update();
if(graphics.__dirty) {
openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting = false;
openfl__$internal_renderer_canvas_CanvasGraphics.graphics = graphics;
openfl__$internal_renderer_canvas_CanvasGraphics.allowSmoothing = renderSession.allowSmoothing;
openfl__$internal_renderer_canvas_CanvasGraphics.bounds = graphics.__bounds;
var width = graphics.__width;
var height = graphics.__height;
if(!graphics.__visible || graphics.__commands.get_length() == 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds == null || width < 1 || height < 1) {
graphics.__canvas = null;
graphics.__context = null;
graphics.__bitmap = null;
} else {
if(graphics.__canvas == null) {
graphics.__canvas = window.document.createElement("canvas");
graphics.__context = graphics.__canvas.getContext("2d");
}
openfl__$internal_renderer_canvas_CanvasGraphics.context = graphics.__context;
var transform = graphics.__renderTransform;
var canvas = graphics.__canvas;
var devicePixelRatio = window.devicePixelRatio || 1;
var scaledWidth = width * devicePixelRatio | 0;
var scaledHeight = height * devicePixelRatio | 0;
if(canvas.width == scaledWidth && canvas.height == scaledHeight) openfl__$internal_renderer_canvas_CanvasGraphics.context.clearRect(0,0,scaledWidth,scaledHeight); else {
canvas.width = width;
canvas.height = height;
}
openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat = false;
var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
var _g = 0;
var _g1 = graphics.__commands.types;
try {
while(_g < _g1.length) {
var type = _g1[_g];
++_g;
switch(type[1]) {
case 3:
var c;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
c = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.cubicCurveTo(c.buffer.f[c.fPos],c.buffer.f[c.fPos + 1],c.buffer.f[c.fPos + 2],c.buffer.f[c.fPos + 3],c.buffer.f[c.fPos + 4],c.buffer.f[c.fPos + 5]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.cubicCurveTo(c.buffer.f[c.fPos],c.buffer.f[c.fPos + 1],c.buffer.f[c.fPos + 2],c.buffer.f[c.fPos + 3],c.buffer.f[c.fPos + 4],c.buffer.f[c.fPos + 5]);
break;
case 4:
var c1;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
c1 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.curveTo(c1.buffer.f[c1.fPos],c1.buffer.f[c1.fPos + 1],c1.buffer.f[c1.fPos + 2],c1.buffer.f[c1.fPos + 3]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.curveTo(c1.buffer.f[c1.fPos],c1.buffer.f[c1.fPos + 1],c1.buffer.f[c1.fPos + 2],c1.buffer.f[c1.fPos + 3]);
break;
case 15:
var c2;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
c2 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.lineTo(c2.buffer.f[c2.fPos],c2.buffer.f[c2.fPos + 1]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineTo(c2.buffer.f[c2.fPos],c2.buffer.f[c2.fPos + 1]);
break;
case 16:
var c3;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
c3 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.moveTo(c3.buffer.f[c3.fPos],c3.buffer.f[c3.fPos + 1]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(c3.buffer.f[c3.fPos],c3.buffer.f[c3.fPos + 1]);
break;
case 11:
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.END_FILL;
data;
openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
break;
case 14:
var c4;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
c4 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineStyle(c4.buffer.o[c4.oPos],c4.buffer.i[c4.iPos],c4.buffer.f[c4.fPos],c4.buffer.b[c4.bPos],c4.buffer.o[c4.oPos + 1],c4.buffer.o[c4.oPos + 2],c4.buffer.o[c4.oPos + 3],c4.buffer.f[c4.fPos + 1]);
break;
case 13:
var c5;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
c5 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineGradientStyle(c5.buffer.o[c5.oPos],c5.buffer.ii[c5.iiPos],c5.buffer.ff[c5.ffPos],c5.buffer.ii[c5.iiPos + 1],c5.buffer.o[c5.oPos + 1],c5.buffer.o[c5.oPos + 2],c5.buffer.o[c5.oPos + 3],c5.buffer.f[c5.fPos]);
break;
case 12:
var c6;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
c6 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineBitmapStyle(c6.buffer.o[c6.oPos],c6.buffer.o[c6.oPos + 1],c6.buffer.b[c6.bPos],c6.buffer.b[c6.bPos + 1]);
break;
case 0:case 1:case 2:
openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL) {
var c7;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
c7 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginBitmapFill(c7.buffer.o[c7.oPos],c7.buffer.o[c7.oPos + 1],c7.buffer.b[c7.bPos],c7.buffer.b[c7.bPos + 1]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginBitmapFill(c7.buffer.o[c7.oPos],c7.buffer.o[c7.oPos + 1],c7.buffer.b[c7.bPos],c7.buffer.b[c7.bPos + 1]);
} else if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL) {
var c8;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
c8 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginGradientFill(c8.buffer.o[c8.oPos],c8.buffer.ii[c8.iiPos],c8.buffer.ff[c8.ffPos],c8.buffer.ii[c8.iiPos + 1],c8.buffer.o[c8.oPos + 1],c8.buffer.o[c8.oPos + 2],c8.buffer.o[c8.oPos + 3],c8.buffer.f[c8.fPos]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginGradientFill(c8.buffer.o[c8.oPos],c8.buffer.ii[c8.iiPos],c8.buffer.ff[c8.ffPos],c8.buffer.ii[c8.iiPos + 1],c8.buffer.o[c8.oPos + 1],c8.buffer.o[c8.oPos + 2],c8.buffer.o[c8.oPos + 3],c8.buffer.f[c8.fPos]);
} else {
var c9;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
c9 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginFill(c9.buffer.i[c9.iPos],c9.buffer.f[c9.fPos]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginFill(c9.buffer.i[c9.iPos],c9.buffer.f[c9.fPos]);
}
break;
case 5:
var c10;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
c10 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawCircle(c10.buffer.f[c10.fPos],c10.buffer.f[c10.fPos + 1],c10.buffer.f[c10.fPos + 2]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawCircle(c10.buffer.f[c10.fPos],c10.buffer.f[c10.fPos + 1],c10.buffer.f[c10.fPos + 2]);
break;
case 6:
var c11;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
c11 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawEllipse(c11.buffer.f[c11.fPos],c11.buffer.f[c11.fPos + 1],c11.buffer.f[c11.fPos + 2],c11.buffer.f[c11.fPos + 3]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawEllipse(c11.buffer.f[c11.fPos],c11.buffer.f[c11.fPos + 1],c11.buffer.f[c11.fPos + 2],c11.buffer.f[c11.fPos + 3]);
break;
case 7:
var c12;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
c12 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRect(c12.buffer.f[c12.fPos],c12.buffer.f[c12.fPos + 1],c12.buffer.f[c12.fPos + 2],c12.buffer.f[c12.fPos + 3]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRect(c12.buffer.f[c12.fPos],c12.buffer.f[c12.fPos + 1],c12.buffer.f[c12.fPos + 2],c12.buffer.f[c12.fPos + 3]);
break;
case 8:
var c13;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
c13 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRoundRect(c13.buffer.f[c13.fPos],c13.buffer.f[c13.fPos + 1],c13.buffer.f[c13.fPos + 2],c13.buffer.f[c13.fPos + 3],c13.buffer.f[c13.fPos + 4],c13.buffer.o[c13.oPos]);
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRoundRect(c13.buffer.f[c13.fPos],c13.buffer.f[c13.fPos + 1],c13.buffer.f[c13.fPos + 2],c13.buffer.f[c13.fPos + 3],c13.buffer.f[c13.fPos + 4],c13.buffer.o[c13.oPos]);
break;
case 10:
openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
var c14;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;
c14 = data;
var v = c14.buffer.o[c14.oPos];
var ind = c14.buffer.o[c14.oPos + 1];
var uvt = c14.buffer.o[c14.oPos + 2];
var pattern = null;
var colorFill = openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill == null;
if(colorFill && uvt != null) throw "__break__";
if(!colorFill) {
if(uvt == null) {
uvt = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
var _g3 = 0;
var _g2 = Std["int"](v.get_length() / 2);
while(_g3 < _g2) {
var i1 = _g3++;
var x = v.get(i1 * 2) / openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width;
uvt.push(x);
var x4 = v.get(i1 * 2 + 1) / openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height;
uvt.push(x4);
}
}
var skipT = uvt.get_length() != v.get_length();
var normalizedUVT = openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT(uvt,skipT);
var maxUVT = normalizedUVT.max;
uvt = normalizedUVT.uvt;
if(maxUVT > 1) pattern = openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width | 0,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height | 0); else pattern = openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height);
}
var i = 0;
var l = ind.get_length();
var a_;
var b_;
var c_;
var iax;
var iay;
var ibx;
var iby;
var icx;
var icy;
var x1;
var y1;
var x2;
var y2;
var x3;
var y3;
var uvx1;
var uvy1;
var uvx2;
var uvy2;
var uvx3;
var uvy3;
var denom;
var t1;
var t2;
var t3;
var t4;
var dx;
var dy;
while(i < l) {
a_ = i;
b_ = i + 1;
c_ = i + 2;
iax = ind.get(a_) * 2;
iay = ind.get(a_) * 2 + 1;
ibx = ind.get(b_) * 2;
iby = ind.get(b_) * 2 + 1;
icx = ind.get(c_) * 2;
icy = ind.get(c_) * 2 + 1;
x1 = v.get(iax);
y1 = v.get(iay);
x2 = v.get(ibx);
y2 = v.get(iby);
x3 = v.get(icx);
y3 = v.get(icy);
var _g21 = c14.buffer.o[c14.oPos + 3];
switch(_g21) {
case 2:
if(!((x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0)) {
i += 3;
continue;
}
break;
case 0:
if((x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0) {
i += 3;
continue;
}
break;
default:
}
if(colorFill) {
openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x1,y1);
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x2,y2);
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x3,y3);
openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
i += 3;
continue;
}
openfl__$internal_renderer_canvas_CanvasGraphics.context.save();
openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x1,y1);
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x2,y2);
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x3,y3);
openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
openfl__$internal_renderer_canvas_CanvasGraphics.context.clip();
uvx1 = uvt.get(iax) * pattern.width;
uvx2 = uvt.get(ibx) * pattern.width;
uvx3 = uvt.get(icx) * pattern.width;
uvy1 = uvt.get(iay) * pattern.height;
uvy2 = uvt.get(iby) * pattern.height;
uvy3 = uvt.get(icy) * pattern.height;
denom = uvx1 * (uvy3 - uvy2) - uvx2 * uvy3 + uvx3 * uvy2 + (uvx2 - uvx3) * uvy1;
if(denom == 0) {
i += 3;
continue;
}
t1 = -(uvy1 * (x3 - x2) - uvy2 * x3 + uvy3 * x2 + (uvy2 - uvy3) * x1) / denom;
t2 = (uvy2 * y3 + uvy1 * (y2 - y3) - uvy3 * y2 + (uvy3 - uvy2) * y1) / denom;
t3 = (uvx1 * (x3 - x2) - uvx2 * x3 + uvx3 * x2 + (uvx2 - uvx3) * x1) / denom;
t4 = -(uvx2 * y3 + uvx1 * (y2 - y3) - uvx3 * y2 + (uvx3 - uvx2) * y1) / denom;
dx = (uvx1 * (uvy3 * x2 - uvy2 * x3) + uvy1 * (uvx2 * x3 - uvx3 * x2) + (uvx3 * uvy2 - uvx2 * uvy3) * x1) / denom;
dy = (uvx1 * (uvy3 * y2 - uvy2 * y3) + uvy1 * (uvx2 * y3 - uvx3 * y2) + (uvx3 * uvy2 - uvx2 * uvy3) * y1) / denom;
openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(t1,t2,t3,t4,dx,dy);
openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(pattern,0,0);
openfl__$internal_renderer_canvas_CanvasGraphics.context.restore();
i += 3;
}
break;
default:
data.advance();
data.prev = type;
}
}
} catch( e ) { if( e != "__break__" ) throw e; }
if(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.get_length() > 0) openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length() > 0) openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
data.destroy();
graphics.__bitmap = openfl_display_BitmapData.fromCanvas(graphics.__canvas);
}
graphics.set___dirty(false);
}
};
openfl__$internal_renderer_canvas_CanvasGraphics.renderMask = function(graphics,renderSession) {
if(graphics.__commands.get_length() != 0) {
openfl__$internal_renderer_canvas_CanvasGraphics.context = renderSession.context;
var positionX = 0.0;
var positionY = 0.0;
var offsetX = 0;
var offsetY = 0;
var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
var _g = 0;
var _g1 = graphics.__commands.types;
while(_g < _g1.length) {
var type = _g1[_g];
++_g;
switch(type[1]) {
case 3:
var c;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
c = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(c.buffer.f[c.fPos] - offsetX,c.buffer.f[c.fPos + 1] - offsetY,c.buffer.f[c.fPos + 2] - offsetX,c.buffer.f[c.fPos + 3] - offsetY,c.buffer.f[c.fPos + 4] - offsetX,c.buffer.f[c.fPos + 5] - offsetY);
positionX = c.buffer.f[c.fPos + 4];
positionY = c.buffer.f[c.fPos + 5];
break;
case 4:
var c1;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
c1 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(c1.buffer.f[c1.fPos] - offsetX,c1.buffer.f[c1.fPos + 1] - offsetY,c1.buffer.f[c1.fPos + 2] - offsetX,c1.buffer.f[c1.fPos + 3] - offsetY);
positionX = c1.buffer.f[c1.fPos + 2];
positionY = c1.buffer.f[c1.fPos + 3];
break;
case 5:
var c2;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
c2 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(c2.buffer.f[c2.fPos] - offsetX,c2.buffer.f[c2.fPos + 1] - offsetY,c2.buffer.f[c2.fPos + 2],0,Math.PI * 2,true);
break;
case 6:
var c3;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
c3 = data;
var x = c3.buffer.f[c3.fPos];
var y = c3.buffer.f[c3.fPos + 1];
var width = c3.buffer.f[c3.fPos + 2];
var height = c3.buffer.f[c3.fPos + 3];
x -= offsetX;
y -= offsetY;
var kappa = .5522848;
var ox = width / 2 * kappa;
var oy = height / 2 * kappa;
var xe = x + width;
var ye = y + height;
var xm = x + width / 2;
var ym = y + height / 2;
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x,ym);
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x,ym - oy,xm - ox,y,xm,y);
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm + ox,y,xe,ym - oy,xe,ym);
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xe,ym + oy,xm + ox,ye,xm,ye);
openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm - ox,ye,x,ym + oy,x,ym);
break;
case 7:
var c4;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
c4 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(c4.buffer.f[c4.fPos] - offsetX,c4.buffer.f[c4.fPos + 1] - offsetY,c4.buffer.f[c4.fPos + 2],c4.buffer.f[c4.fPos + 3]);
break;
case 8:
var c5;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
c5 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(c5.buffer.f[c5.fPos] - offsetX,c5.buffer.f[c5.fPos + 1] - offsetY,c5.buffer.f[c5.fPos + 2],c5.buffer.f[c5.fPos + 3],c5.buffer.f[c5.fPos + 4],c5.buffer.o[c5.oPos]);
break;
case 15:
var c6;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
c6 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(c6.buffer.f[c6.fPos] - offsetX,c6.buffer.f[c6.fPos + 1] - offsetY);
positionX = c6.buffer.f[c6.fPos];
positionY = c6.buffer.f[c6.fPos + 1];
break;
case 16:
var c7;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
c7 = data;
openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(c7.buffer.f[c7.fPos] - offsetX,c7.buffer.f[c7.fPos + 1] - offsetY);
positionX = c7.buffer.f[c7.fPos];
positionY = c7.buffer.f[c7.fPos + 1];
break;
default:
data.advance();
data.prev = type;
}
}
data.destroy();
}
};
openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing = function(smooth) {
if(!openfl__$internal_renderer_canvas_CanvasGraphics.allowSmoothing) smooth = false;
if(openfl__$internal_renderer_canvas_CanvasGraphics.context.imageSmoothingEnabled != smooth) {
openfl__$internal_renderer_canvas_CanvasGraphics.context.mozImageSmoothingEnabled = smooth;
openfl__$internal_renderer_canvas_CanvasGraphics.context.msImageSmoothingEnabled = smooth;
openfl__$internal_renderer_canvas_CanvasGraphics.context.imageSmoothingEnabled = smooth;
}
};
var openfl__$internal_renderer_canvas_CanvasMaskManager = function(renderSession) {
openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
};
$hxClasses["openfl._internal.renderer.canvas.CanvasMaskManager"] = openfl__$internal_renderer_canvas_CanvasMaskManager;
openfl__$internal_renderer_canvas_CanvasMaskManager.__name__ = ["openfl","_internal","renderer","canvas","CanvasMaskManager"];
openfl__$internal_renderer_canvas_CanvasMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_canvas_CanvasMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
pushMask: function(mask) {
var context = this.renderSession.context;
context.save();
var transform = mask.__getRenderTransform();
context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
context.beginPath();
mask.__renderCanvasMask(this.renderSession);
context.clip();
}
,pushObject: function(object,handleScrollRect) {
if(handleScrollRect == null) handleScrollRect = true;
if(handleScrollRect && object.__scrollRect != null) this.pushRect(object.__scrollRect,object.__renderTransform);
if(object.__mask != null) this.pushMask(object.__mask);
}
,pushRect: function(rect,transform) {
var context = this.renderSession.context;
context.save();
context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
context.beginPath();
context.rect(rect.x,rect.y,rect.width,rect.height);
context.clip();
}
,popMask: function() {
this.renderSession.context.restore();
}
,popObject: function(object,handleScrollRect) {
if(handleScrollRect == null) handleScrollRect = true;
if(object.__mask != null) this.popMask();
if(handleScrollRect && object.__scrollRect != null) this.popRect();
}
,popRect: function() {
this.renderSession.context.restore();
}
,__class__: openfl__$internal_renderer_canvas_CanvasMaskManager
});
var openfl__$internal_renderer_canvas_CanvasRenderer = function(stage,context) {
openfl__$internal_renderer_AbstractRenderer.call(this,stage);
this.context = context;
this.renderSession = new openfl__$internal_renderer_RenderSession();
this.renderSession.clearDirtyFlags = true;
this.renderSession.context = context;
this.renderSession.renderer = this;
this.renderSession.maskManager = new openfl__$internal_renderer_canvas_CanvasMaskManager(this.renderSession);
};
$hxClasses["openfl._internal.renderer.canvas.CanvasRenderer"] = openfl__$internal_renderer_canvas_CanvasRenderer;
openfl__$internal_renderer_canvas_CanvasRenderer.__name__ = ["openfl","_internal","renderer","canvas","CanvasRenderer"];
openfl__$internal_renderer_canvas_CanvasRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_canvas_CanvasRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
context: null
,clear: function() {
this.context.setTransform(1,0,0,1,0,0);
this.context.globalAlpha = 1;
if(!this.stage.__transparent && this.stage.__clearBeforeRender) {
this.context.fillStyle = this.stage.__colorString;
this.context.fillRect(0,0,this.stage.stageWidth * this.stage.window.__scale,this.stage.stageHeight * this.stage.window.__scale);
} else if(this.stage.__transparent && this.stage.__clearBeforeRender) this.context.clearRect(0,0,this.stage.stageWidth * this.stage.window.__scale,this.stage.stageHeight * this.stage.window.__scale);
}
,render: function() {
this.renderSession.allowSmoothing = this.stage.quality != 2;
this.stage.__renderCanvas(this.renderSession);
}
,renderStage3D: function() {
var _g = 0;
var _g1 = this.stage.stage3Ds;
while(_g < _g1.get_length()) {
var stage3D = _g1.get(_g);
++_g;
stage3D.__renderCanvas(this.stage,this.renderSession);
}
}
,__class__: openfl__$internal_renderer_canvas_CanvasRenderer
});
var openfl__$internal_renderer_canvas_CanvasShape = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasShape"] = openfl__$internal_renderer_canvas_CanvasShape;
openfl__$internal_renderer_canvas_CanvasShape.__name__ = ["openfl","_internal","renderer","canvas","CanvasShape"];
openfl__$internal_renderer_canvas_CanvasShape.render = function(shape,renderSession) {
if(!shape.__renderable || shape.__worldAlpha <= 0) return;
var graphics = shape.__graphics;
if(graphics != null) {
openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession,shape.__renderTransform);
var bounds = graphics.__bounds;
var width = graphics.__width;
var height = graphics.__height;
if(graphics.__canvas != null) {
var context = renderSession.context;
var scrollRect = shape.__scrollRect;
if(width > 0 && height > 0 && (scrollRect == null || scrollRect.width > 0 && scrollRect.height > 0)) {
renderSession.maskManager.pushObject(shape);
context.globalAlpha = shape.__worldAlpha;
var transform = graphics.__worldTransform;
if(renderSession.roundPixels) context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0); else context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
context.drawImage(graphics.__canvas,0,0);
renderSession.maskManager.popObject(shape);
}
}
}
};
var openfl__$internal_renderer_canvas_CanvasTextField = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasTextField"] = openfl__$internal_renderer_canvas_CanvasTextField;
openfl__$internal_renderer_canvas_CanvasTextField.__name__ = ["openfl","_internal","renderer","canvas","CanvasTextField"];
openfl__$internal_renderer_canvas_CanvasTextField.disableInputMode = function(textEngine) {
};
openfl__$internal_renderer_canvas_CanvasTextField.enableInputMode = function(textEngine) {
if(textEngine.__hiddenInput == null) {
textEngine.__hiddenInput = window.document.createElement("input");
var hiddenInput = textEngine.__hiddenInput;
hiddenInput.type = "text";
hiddenInput.style.position = "absolute";
hiddenInput.style.opacity = "0";
hiddenInput.style.color = "transparent";
hiddenInput.style.left = "0px";
hiddenInput.style.top = "50%";
if(new EReg("(iPad|iPhone|iPod).*OS 8_","gi").match(window.navigator.userAgent)) {
hiddenInput.style.fontSize = "0px";
hiddenInput.style.width = "0px";
hiddenInput.style.height = "0px";
} else {
hiddenInput.style.width = "1px";
hiddenInput.style.height = "1px";
}
hiddenInput.style.pointerEvents = "none";
hiddenInput.style.zIndex = "-10000000";
if(textEngine.maxChars > 0) hiddenInput.maxLength = textEngine.maxChars;
window.document.body.appendChild(hiddenInput);
hiddenInput.value = textEngine.text;
}
};
openfl__$internal_renderer_canvas_CanvasTextField.render = function(textField,renderSession,transform) {
var textEngine = textField.__textEngine;
var bounds = textEngine.bounds;
var graphics = textField.__graphics;
if(textField.__dirty) {
textField.__updateLayout();
if(graphics.__bounds == null) graphics.__bounds = new openfl_geom_Rectangle();
graphics.__bounds.copyFrom(bounds);
}
graphics.__update();
if(textField.__dirty || graphics.__dirty) {
var width = graphics.__width;
var height = graphics.__height;
if((textEngine.text == null || textEngine.text == "") && !textEngine.background && !textEngine.border && !textEngine.__hasFocus && (textEngine.type != 1 || !textEngine.selectable) || (textEngine.width <= 0 || textEngine.height <= 0) && textEngine.autoSize != 2) {
textField.__graphics.__canvas = null;
textField.__graphics.__context = null;
textField.__graphics.__bitmap = null;
textField.__graphics.set___dirty(false);
textField.__dirty = false;
} else {
if(textField.__graphics.__canvas == null) {
textField.__graphics.__canvas = window.document.createElement("canvas");
textField.__graphics.__context = textField.__graphics.__canvas.getContext("2d");
}
openfl__$internal_renderer_canvas_CanvasTextField.context = graphics.__context;
var transform1 = graphics.__renderTransform;
graphics.__canvas.width = width;
graphics.__canvas.height = height;
openfl__$internal_renderer_canvas_CanvasTextField.context.setTransform(transform1.a,transform1.b,transform1.c,transform1.d,transform1.tx,transform1.ty);
if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect == null) openfl__$internal_renderer_canvas_CanvasTextField.clearRect = (typeof navigator !== 'undefined' && typeof navigator['isCocoonJS'] !== 'undefined');
if(openfl__$internal_renderer_canvas_CanvasTextField.clearRect) openfl__$internal_renderer_canvas_CanvasTextField.context.clearRect(0,0,graphics.__canvas.width,graphics.__canvas.height);
if(textEngine.text != null && textEngine.text != "" || textEngine.__hasFocus) {
var text = textEngine.text;
if(!renderSession.allowSmoothing || textEngine.antiAliasType == 0 && textEngine.sharpness == 400) {
graphics.__context.mozImageSmoothingEnabled = false;
graphics.__context.msImageSmoothingEnabled = false;
graphics.__context.imageSmoothingEnabled = false;
} else {
graphics.__context.mozImageSmoothingEnabled = true;
graphics.__context.msImageSmoothingEnabled = true;
graphics.__context.imageSmoothingEnabled = true;
}
if(textEngine.border || textEngine.background) {
openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
if(textEngine.background) {
openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + StringTools.hex(textEngine.backgroundColor & 16777215,6);
openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
}
if(textEngine.border) {
openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + StringTools.hex(textEngine.borderColor & 16777215,6);
openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
}
}
openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline = "top";
openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign = "start";
var scrollX = -textField.get_scrollH();
var scrollY = 0.0;
var _g1 = 0;
var _g = textField.get_scrollV() - 1;
while(_g1 < _g) {
var i = _g1++;
scrollY -= textEngine.lineHeights.get(i);
}
var advance;
var offsetY = 0.0;
var isChrome = new EReg("(Chrome|Firefox)","g").match(window.navigator.userAgent);
var _g2 = 0;
var _g11 = textEngine.layoutGroups;
while(_g2 < _g11.get_length()) {
var group = _g11.get(_g2);
++_g2;
if(group.lineIndex < textField.get_scrollV() - 1) continue;
if(group.lineIndex > textField.get_scrollV() + textEngine.bottomScrollV - 2) break;
openfl__$internal_renderer_canvas_CanvasTextField.context.font = openfl__$internal_text_TextEngine.getFont(group.format);
openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + StringTools.hex(group.format.color & 16777215,6);
offsetY = group.format.size * 0.18;
if(!isChrome) offsetY = -offsetY;
if(Object.prototype.hasOwnProperty.call(textEngine,"outline") && Reflect.getProperty(textEngine,"outline")) {
var outlineColor = Reflect.getProperty(textEngine,"outlineColor");
var outlineWidth = Reflect.getProperty(textEngine,"outlineWidth");
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = outlineColor;
openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = outlineWidth;
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
}
if(Object.prototype.hasOwnProperty.call(textEngine,"outline") && Reflect.getProperty(textEngine,"outline")) {
var outlineColor1 = Reflect.getProperty(textEngine,"outlineColor");
var outlineWidth1 = Reflect.getProperty(textEngine,"outlineWidth");
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = outlineColor1;
openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = outlineWidth1;
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
}
if(textField.__filters != null && textField.__filters.length > 0) {
if(js_Boot.__instanceof(textField.__filters[0],openfl_filters_GlowFilter)) {
var glowFilter = textField.__filters[0];
var cacheAlpha = openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha;
openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha = cacheAlpha * glowFilter.alpha;
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + StringTools.hex(glowFilter.color & 16777215,6);
openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = Math.max(glowFilter.blurX,glowFilter.blurY);
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = null;
openfl__$internal_renderer_canvas_CanvasTextField.context.globalAlpha = cacheAlpha;
}
}
openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
if(textField.__caretIndex > -1 && textEngine.selectable) {
if(textField.__selectionIndex == textField.__caretIndex) {
if(textField.__showCursor && group.startIndex <= textField.__caretIndex && group.endIndex >= textField.__caretIndex) {
advance = 0.0;
var _g3 = 0;
var _g21 = textField.__caretIndex - group.startIndex;
while(_g3 < _g21) {
var i1 = _g3++;
if(group.advances.length <= i1) break;
advance += group.advances[i1];
}
openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(group.offsetX + advance,group.offsetY,1,group.height);
}
} else if(group.startIndex <= textField.__caretIndex && group.endIndex >= textField.__caretIndex || group.startIndex <= textField.__selectionIndex && group.endIndex >= textField.__selectionIndex || group.startIndex > textField.__caretIndex && group.endIndex < textField.__selectionIndex || group.startIndex > textField.__selectionIndex && group.endIndex < textField.__caretIndex) {
var selectionStart = Std["int"](Math.min(textField.__selectionIndex,textField.__caretIndex));
var selectionEnd = Std["int"](Math.max(textField.__selectionIndex,textField.__caretIndex));
if(group.startIndex > selectionStart) selectionStart = group.startIndex;
if(group.endIndex < selectionEnd) selectionEnd = group.endIndex;
var start;
var end;
start = textField.getCharBoundaries(selectionStart);
if(selectionEnd >= textEngine.text.length) {
end = textField.getCharBoundaries(textEngine.text.length - 1);
end.x += end.width + 2;
} else end = textField.getCharBoundaries(selectionEnd);
if(start != null && end != null) {
openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#000000";
openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(start.x,start.y,end.x - start.x,group.height);
openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#FFFFFF";
openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(selectionStart,selectionEnd),scrollX + start.x,group.offsetY + offsetY + scrollY);
}
}
}
}
} else {
if(textEngine.border || textEngine.background) {
if(textEngine.border) openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1); else openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,bounds.width,bounds.height);
if(textEngine.background) {
openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + StringTools.hex(textEngine.backgroundColor & 16777215,6);
openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
}
if(textEngine.border) {
openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap = "square";
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + StringTools.hex(textEngine.borderColor & 16777215,6);
openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
}
}
if(textField.__caretIndex > -1 && textEngine.selectable && textField.__showCursor) {
var scrollX1 = -textField.get_scrollH();
var scrollY1 = 0.0;
var _g12 = 0;
var _g4 = textField.get_scrollV() - 1;
while(_g12 < _g4) {
var i2 = _g12++;
scrollY1 -= textEngine.lineHeights.get(i2);
}
openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();
openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + StringTools.hex(textField.get_defaultTextFormat().color & 16777215,6);
openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(scrollX1 + 2.5,scrollY1 + 2.5);
openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(scrollX1 + 2.5,scrollY1 + openfl__$internal_text_TextEngine.getFormatHeight(textField.get_defaultTextFormat()) - 1);
openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
openfl__$internal_renderer_canvas_CanvasTextField.context.closePath();
}
}
graphics.__bitmap = openfl_display_BitmapData.fromCanvas(textField.__graphics.__canvas);
graphics.__visible = true;
textField.__dirty = false;
graphics.set___dirty(false);
}
}
};
var openfl__$internal_renderer_console_ConsoleRenderer = function(stage,ctx) {
openfl__$internal_renderer_AbstractRenderer.call(this,stage);
throw new js__$Boot_HaxeError("ConsoleRenderer not supported");
};
$hxClasses["openfl._internal.renderer.console.ConsoleRenderer"] = openfl__$internal_renderer_console_ConsoleRenderer;
openfl__$internal_renderer_console_ConsoleRenderer.__name__ = ["openfl","_internal","renderer","console","ConsoleRenderer"];
openfl__$internal_renderer_console_ConsoleRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_console_ConsoleRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
render: function() {
}
,__class__: openfl__$internal_renderer_console_ConsoleRenderer
});
var openfl__$internal_renderer_dom_DOMBitmap = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMBitmap"] = openfl__$internal_renderer_dom_DOMBitmap;
openfl__$internal_renderer_dom_DOMBitmap.__name__ = ["openfl","_internal","renderer","dom","DOMBitmap"];
openfl__$internal_renderer_dom_DOMBitmap.render = function(bitmap,renderSession) {
if(bitmap.stage != null && bitmap.__worldVisible && bitmap.__renderable && bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
renderSession.maskManager.pushObject(bitmap);
if(bitmap.bitmapData.image.buffer.__srcImage != null) openfl__$internal_renderer_dom_DOMBitmap.renderImage(bitmap,renderSession); else openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(bitmap,renderSession);
renderSession.maskManager.popObject(bitmap);
} else {
if(bitmap.__image != null) {
renderSession.element.removeChild(bitmap.__image);
bitmap.__image = null;
bitmap.__style = null;
}
if(bitmap.__canvas != null) {
renderSession.element.removeChild(bitmap.__canvas);
bitmap.__canvas = null;
bitmap.__style = null;
}
}
};
openfl__$internal_renderer_dom_DOMBitmap.renderCanvas = function(bitmap,renderSession) {
if(bitmap.__image != null) {
renderSession.element.removeChild(bitmap.__image);
bitmap.__image = null;
}
if(bitmap.__canvas == null) {
bitmap.__canvas = window.document.createElement("canvas");
bitmap.__context = bitmap.__canvas.getContext("2d");
bitmap.__imageVersion = -1;
if(!renderSession.allowSmoothing || !bitmap.smoothing) {
bitmap.__context.mozImageSmoothingEnabled = false;
bitmap.__context.msImageSmoothingEnabled = false;
bitmap.__context.imageSmoothingEnabled = false;
}
openfl__$internal_renderer_dom_DOMRenderer.initializeElement(bitmap,bitmap.__canvas,renderSession);
}
if(bitmap.__imageVersion != bitmap.bitmapData.image.version) {
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(bitmap.bitmapData.image);
bitmap.__canvas.width = bitmap.bitmapData.width;
bitmap.__canvas.height = bitmap.bitmapData.height;
bitmap.__context.drawImage(bitmap.bitmapData.image.buffer.__srcCanvas,0,0);
bitmap.__imageVersion = bitmap.bitmapData.image.version;
}
openfl__$internal_renderer_dom_DOMRenderer.updateClip(bitmap,renderSession);
openfl__$internal_renderer_dom_DOMRenderer.applyStyle(bitmap,renderSession,true,true,true);
};
openfl__$internal_renderer_dom_DOMBitmap.renderImage = function(bitmap,renderSession) {
if(bitmap.__canvas != null) {
renderSession.element.removeChild(bitmap.__canvas);
bitmap.__canvas = null;
}
if(bitmap.__image == null) {
bitmap.__image = window.document.createElement("img");
bitmap.__image.src = bitmap.bitmapData.image.buffer.__srcImage.src;
openfl__$internal_renderer_dom_DOMRenderer.initializeElement(bitmap,bitmap.__image,renderSession);
}
openfl__$internal_renderer_dom_DOMRenderer.updateClip(bitmap,renderSession);
openfl__$internal_renderer_dom_DOMRenderer.applyStyle(bitmap,renderSession,true,true,true);
};
var openfl__$internal_renderer_dom_DOMDisplayObject = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMDisplayObject"] = openfl__$internal_renderer_dom_DOMDisplayObject;
openfl__$internal_renderer_dom_DOMDisplayObject.__name__ = ["openfl","_internal","renderer","dom","DOMDisplayObject"];
openfl__$internal_renderer_dom_DOMDisplayObject.render = function(displayObject,renderSession) {
if(displayObject.opaqueBackground != null && !displayObject.__cacheBitmapRender && displayObject.get_width() > 0 && displayObject.get_height() > 0) {
}
openfl__$internal_renderer_dom_DOMShape.render(displayObject,renderSession);
};
var openfl__$internal_renderer_dom_DOMMaskManager = function(renderSession) {
openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
this.clipRects = [];
this.numClipRects = 0;
};
$hxClasses["openfl._internal.renderer.dom.DOMMaskManager"] = openfl__$internal_renderer_dom_DOMMaskManager;
openfl__$internal_renderer_dom_DOMMaskManager.__name__ = ["openfl","_internal","renderer","dom","DOMMaskManager"];
openfl__$internal_renderer_dom_DOMMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_dom_DOMMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
currentClipRect: null
,clipRects: null
,numClipRects: null
,pushMask: function(mask) {
this.pushRect(mask.getBounds(mask),mask.__getRenderTransform());
}
,pushObject: function(object,handleScrollRect) {
if(handleScrollRect == null) handleScrollRect = true;
if(handleScrollRect && object.__scrollRect != null) this.pushRect(object.__scrollRect,object.__renderTransform);
if(object.__mask != null) this.pushMask(object.__mask);
}
,pushRect: function(rect,transform) {
if(this.numClipRects == this.clipRects.length) this.clipRects[this.numClipRects] = new openfl_geom_Rectangle();
var clipRect = this.clipRects[this.numClipRects];
rect.__transform(clipRect,transform);
if(this.numClipRects > 0) {
var parentClipRect = this.clipRects[this.numClipRects - 1];
clipRect.__contract(parentClipRect.x,parentClipRect.y,parentClipRect.width,parentClipRect.height);
}
if(clipRect.height < 0) clipRect.height = 0;
if(clipRect.width < 0) clipRect.width = 0;
this.currentClipRect = clipRect;
this.numClipRects++;
}
,popMask: function() {
this.popRect();
}
,popObject: function(object,handleScrollRect) {
if(handleScrollRect == null) handleScrollRect = true;
if(object.__mask != null) this.popMask();
if(handleScrollRect && object.__scrollRect != null) this.popRect();
}
,popRect: function() {
if(this.numClipRects > 0) {
this.numClipRects--;
if(this.numClipRects > 0) this.currentClipRect = this.clipRects[this.numClipRects - 1]; else this.currentClipRect = null;
}
}
,updateClip: function(displayObject) {
if(this.currentClipRect == null) {
displayObject.__worldClipChanged = displayObject.__worldClip != null;
displayObject.__worldClip = null;
} else {
if(displayObject.__worldClip == null) displayObject.__worldClip = new openfl_geom_Rectangle();
var clip = openfl_geom_Rectangle.__pool.get();
var matrix = openfl_geom_Matrix.__pool.get();
matrix.copyFrom(displayObject.__renderTransform);
matrix.invert();
this.currentClipRect.__transform(clip,matrix);
if(clip.equals(displayObject.__worldClip)) displayObject.__worldClipChanged = false; else {
displayObject.__worldClip.copyFrom(clip);
displayObject.__worldClipChanged = true;
}
openfl_geom_Rectangle.__pool.release(clip);
openfl_geom_Matrix.__pool.release(matrix);
}
}
,__class__: openfl__$internal_renderer_dom_DOMMaskManager
});
var openfl__$internal_renderer_dom_DOMRenderer = function(stage,element) {
openfl__$internal_renderer_AbstractRenderer.call(this,stage);
};
$hxClasses["openfl._internal.renderer.dom.DOMRenderer"] = openfl__$internal_renderer_dom_DOMRenderer;
openfl__$internal_renderer_dom_DOMRenderer.__name__ = ["openfl","_internal","renderer","dom","DOMRenderer"];
openfl__$internal_renderer_dom_DOMRenderer.applyStyle = function(displayObject,renderSession,setTransform,setAlpha,setClip) {
var style = displayObject.__style;
if(setTransform && displayObject.__renderTransformChanged) style.setProperty(renderSession.transformProperty,displayObject.__renderTransform.to3DString(renderSession.roundPixels),null);
if(displayObject.__worldZ != ++renderSession.z) {
displayObject.__worldZ = renderSession.z;
style.setProperty("z-index",displayObject.__worldZ == null?"null":"" + displayObject.__worldZ,null);
}
if(setAlpha && displayObject.__worldAlphaChanged) {
if(displayObject.__worldAlpha < 1) style.setProperty("opacity",displayObject.__worldAlpha == null?"null":"" + displayObject.__worldAlpha,null); else style.removeProperty("opacity");
}
if(setClip && displayObject.__worldClipChanged) {
if(displayObject.__worldClip == null) style.removeProperty("clip"); else {
var clip = displayObject.__worldClip;
style.setProperty("clip","rect(" + clip.y + "px, " + clip.get_right() + "px, " + clip.get_bottom() + "px, " + clip.x + "px)",null);
}
}
};
openfl__$internal_renderer_dom_DOMRenderer.initializeElement = function(displayObject,element,renderSession) {
var style = displayObject.__style = element.style;
style.setProperty("position","absolute",null);
style.setProperty("top","0",null);
style.setProperty("left","0",null);
style.setProperty(renderSession.transformOriginProperty,"0 0 0",null);
renderSession.element.appendChild(element);
displayObject.__worldAlphaChanged = true;
displayObject.__renderTransformChanged = true;
displayObject.__worldVisibleChanged = true;
displayObject.__worldClipChanged = true;
displayObject.__worldClip = null;
displayObject.__worldZ = -1;
};
openfl__$internal_renderer_dom_DOMRenderer.updateClip = function(displayObject,renderSession) {
var maskManager = renderSession.maskManager;
maskManager.updateClip(displayObject);
};
openfl__$internal_renderer_dom_DOMRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_dom_DOMRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
element: null
,render: function() {
this.renderSession.allowSmoothing = this.stage.quality != 2;
if(!this.stage.__transparent) this.element.style.background = this.stage.__colorString; else this.element.style.background = "none";
this.renderSession.z = 1;
this.stage.__renderDOM(this.renderSession);
}
,renderStage3D: function() {
var _g = 0;
var _g1 = this.stage.stage3Ds;
while(_g < _g1.get_length()) {
var stage3D = _g1.get(_g);
++_g;
stage3D.__renderDOM(this.stage,this.renderSession);
}
}
,__class__: openfl__$internal_renderer_dom_DOMRenderer
});
var openfl__$internal_renderer_dom_DOMShape = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMShape"] = openfl__$internal_renderer_dom_DOMShape;
openfl__$internal_renderer_dom_DOMShape.__name__ = ["openfl","_internal","renderer","dom","DOMShape"];
openfl__$internal_renderer_dom_DOMShape.render = function(shape,renderSession) {
var graphics = shape.__graphics;
if(shape.stage != null && shape.__worldVisible && shape.__renderable && graphics != null) {
openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession,shape.__renderTransform);
if(graphics.__dirty || shape.__worldAlphaChanged || shape.__canvas != graphics.__canvas) {
if(graphics.__canvas != null) {
if(shape.__canvas != graphics.__canvas) {
if(shape.__canvas != null) renderSession.element.removeChild(shape.__canvas);
shape.__canvas = graphics.__canvas;
shape.__context = graphics.__context;
openfl__$internal_renderer_dom_DOMRenderer.initializeElement(shape,shape.__canvas,renderSession);
}
} else if(shape.__canvas != null) {
renderSession.element.removeChild(shape.__canvas);
shape.__canvas = null;
shape.__style = null;
}
}
if(shape.__canvas != null) {
renderSession.maskManager.pushObject(shape);
var cacheTransform = shape.__renderTransform;
shape.__renderTransform = graphics.__worldTransform;
if(graphics.__transformDirty) {
graphics.__transformDirty = false;
shape.__renderTransformChanged = true;
}
openfl__$internal_renderer_dom_DOMRenderer.updateClip(shape,renderSession);
openfl__$internal_renderer_dom_DOMRenderer.applyStyle(shape,renderSession,true,true,true);
shape.__renderTransform = cacheTransform;
renderSession.maskManager.popObject(shape);
}
} else if(shape.__canvas != null) {
renderSession.element.removeChild(shape.__canvas);
shape.__canvas = null;
shape.__style = null;
}
};
var openfl__$internal_renderer_dom_DOMTextField = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMTextField"] = openfl__$internal_renderer_dom_DOMTextField;
openfl__$internal_renderer_dom_DOMTextField.__name__ = ["openfl","_internal","renderer","dom","DOMTextField"];
openfl__$internal_renderer_dom_DOMTextField.measureText = function(textField) {
var textEngine = textField.__textEngine;
var div = textField.__div;
if(div == null) {
div = window.document.createElement("div");
div.innerHTML = new EReg("\n","g").replace(textEngine.text,"
");
div.style.setProperty("font",openfl__$internal_text_TextEngine.getFont(textField.__textFormat),null);
div.style.setProperty("pointer-events","none",null);
div.style.position = "absolute";
div.style.top = "110%";
window.document.body.appendChild(div);
}
textEngine.__measuredWidth = div.clientWidth;
if(textField.__div == null) div.style.width = Std.string(textEngine.width - 4) + "px";
textEngine.__measuredHeight = div.clientHeight;
if(textField.__div == null) window.document.body.removeChild(div);
};
openfl__$internal_renderer_dom_DOMTextField.render = function(textField,renderSession) {
var textEngine = textField.__textEngine;
if(textField.stage != null && textField.__worldVisible && textField.__renderable) {
if(textField.__dirty || textField.__renderTransformChanged || textField.__div == null) {
if(textEngine.text != "" || textEngine.background || textEngine.border || textEngine.type == 1) {
if(textField.__div == null) {
textField.__div = window.document.createElement("div");
openfl__$internal_renderer_dom_DOMRenderer.initializeElement(textField,textField.__div,renderSession);
textField.__style.setProperty("outline","none",null);
textField.__div.addEventListener("input",function(event) {
event.preventDefault();
if(textField.get_htmlText() != textField.__div.innerHTML) {
textField.set_htmlText(textField.__div.innerHTML);
if(textField.__displayAsPassword) {
}
textField.__dirty = false;
}
},true);
}
if(!textEngine.wordWrap) textField.__style.setProperty("white-space","nowrap",null); else textField.__style.setProperty("word-wrap","break-word",null);
textField.__style.setProperty("overflow","hidden",null);
if(textEngine.selectable) {
textField.__style.setProperty("cursor","text",null);
textField.__style.setProperty("-webkit-user-select","text",null);
textField.__style.setProperty("-moz-user-select","text",null);
textField.__style.setProperty("-ms-user-select","text",null);
textField.__style.setProperty("-o-user-select","text",null);
} else textField.__style.setProperty("cursor","inherit",null);
textField.__div.contentEditable = textEngine.type == 1;
var style = textField.__style;
if(textEngine.background) style.setProperty("background-color","#" + StringTools.hex(textEngine.backgroundColor & 16777215,6),null); else style.removeProperty("background-color");
var w = textEngine.width;
var h = textEngine.height;
var scale = 1;
var unscaledSize = textField.__textFormat.size;
var scaledSize = unscaledSize;
var t = textField.__renderTransform;
if(t.a != 1.0 || t.d != 1.0) {
if(t.a == t.d) {
scale = t.a;
t.a = t.d = 1.0;
} else if(t.a > t.d) {
scale = t.a;
t.d /= t.a;
t.a = 1.0;
} else {
scale = t.d;
t.a /= t.d;
t.d = 1.0;
}
scaledSize *= scale;
w = Math.ceil(w * scale);
h = Math.ceil(h * scale);
}
textField.__textFormat.size = scaledSize;
var text = textEngine.text;
var adjustment = 0;
if(!textField.__isHTML) text = StringTools.htmlEscape(text); else {
var matchText = text;
while(openfl__$internal_renderer_dom_DOMTextField.__regexFont.match(matchText)) {
var fontText = openfl__$internal_renderer_dom_DOMTextField.__regexFont.matched(0);
var style1 = "";
if(openfl__$internal_renderer_dom_DOMTextField.__regexFace.match(fontText)) style1 += "font-family:'" + openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexFace) + "';";
if(openfl__$internal_renderer_dom_DOMTextField.__regexColor.match(fontText)) style1 += "color:#" + openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexColor) + ";";
if(openfl__$internal_renderer_dom_DOMTextField.__regexSize.match(fontText)) {
var sizeAttr = openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexSize);
var firstChar = HxOverrides.cca(sizeAttr,0);
var size;
adjustment = parseFloat(sizeAttr) * scale;
if(firstChar == 43 || firstChar == 45) size = scaledSize + adjustment; else size = adjustment;
style1 += "font-size:" + size + "px;";
}
text = StringTools.replace(text,fontText,"");
matchText = openfl__$internal_renderer_dom_DOMTextField.__regexFont.matchedRight();
}
text = openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont.replace(text,"");
}
text = StringTools.replace(text,"");
textField.__div.innerHTML = new EReg("\n","g").replace(textField.__div.innerHTML,"
");
textField.__div.innerHTML = new EReg("\r","g").replace(textField.__div.innerHTML,"
");
style.setProperty("font",openfl__$internal_text_TextEngine.getFont(textField.__textFormat),null);
textField.__textFormat.size = unscaledSize;
textField.__textFormat.leading = unscaledLeading;
style.setProperty("top","3px",null);
if(textEngine.border) {
style.setProperty("border","solid 1px #" + StringTools.hex(textEngine.borderColor & 16777215,6),null);
textField.__renderTransform.translate(-1,-1);
textField.__renderTransformChanged = true;
textField.__transformDirty = true;
} else if(style.border != "") {
style.removeProperty("border");
textField.__renderTransformChanged = true;
}
style.setProperty("color","#" + StringTools.hex(textField.__textFormat.color & 16777215,6),null);
style.setProperty("width",w + "px",null);
style.setProperty("height",h + "px",null);
var _g = textField.__textFormat.align;
switch(_g) {
case 0:
style.setProperty("text-align","center",null);
break;
case 4:
style.setProperty("text-align","right",null);
break;
default:
style.setProperty("text-align","left",null);
}
textField.__dirty = false;
} else if(textField.__div != null) {
renderSession.element.removeChild(textField.__div);
textField.__div = null;
}
}
if(textField.__div != null) {
openfl__$internal_renderer_dom_DOMRenderer.updateClip(textField,renderSession);
openfl__$internal_renderer_dom_DOMRenderer.applyStyle(textField,renderSession,true,true,true);
}
} else if(textField.__div != null) {
renderSession.element.removeChild(textField.__div);
textField.__div = null;
textField.__style = null;
}
};
openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch = function(regex) {
if(regex.matched(2) != null) return regex.matched(2); else return regex.matched(3);
};
var openfl__$internal_renderer_opengl_GLBitmap = function() { };
$hxClasses["openfl._internal.renderer.opengl.GLBitmap"] = openfl__$internal_renderer_opengl_GLBitmap;
openfl__$internal_renderer_opengl_GLBitmap.__name__ = ["openfl","_internal","renderer","opengl","GLBitmap"];
openfl__$internal_renderer_opengl_GLBitmap.render = function(bitmap,renderSession) {
if(!bitmap.__renderable || bitmap.__worldAlpha <= 0) return;
if(bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
var renderer = renderSession.renderer;
var gl = renderSession.gl;
renderSession.blendModeManager.setBlendMode(bitmap.__worldBlendMode);
renderSession.maskManager.pushObject(bitmap);
var shader = renderSession.filterManager.pushObject(bitmap);
shader.get_data().uImage0.input = bitmap.bitmapData;
shader.get_data().uImage0.smoothing = renderSession.allowSmoothing && (bitmap.smoothing || renderSession.upscaled);
shader.get_data().uMatrix.value = renderer.getMatrix(bitmap.__renderTransform);
renderSession.shaderManager.setShader(shader);
gl.bindBuffer(gl.ARRAY_BUFFER,bitmap.bitmapData.getBuffer(gl,bitmap.__worldAlpha));
gl.vertexAttribPointer(shader.get_data().aPosition.index,3,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0));
gl.vertexAttribPointer(shader.get_data().aTexCoord.index,2,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(12));
gl.vertexAttribPointer(shader.get_data().aAlpha.index,1,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(20));
gl.__context.drawArrays(gl.TRIANGLE_STRIP,0,4);
renderSession.filterManager.popObject(bitmap);
renderSession.maskManager.popObject(bitmap);
}
};
var openfl__$internal_renderer_opengl_GLBlendModeManager = function(gl) {
openfl__$internal_renderer_AbstractBlendModeManager.call(this);
this.gl = gl;
this.setBlendMode(10);
gl.__context.enable(gl.BLEND);
};
$hxClasses["openfl._internal.renderer.opengl.GLBlendModeManager"] = openfl__$internal_renderer_opengl_GLBlendModeManager;
openfl__$internal_renderer_opengl_GLBlendModeManager.__name__ = ["openfl","_internal","renderer","opengl","GLBlendModeManager"];
openfl__$internal_renderer_opengl_GLBlendModeManager.__super__ = openfl__$internal_renderer_AbstractBlendModeManager;
openfl__$internal_renderer_opengl_GLBlendModeManager.prototype = $extend(openfl__$internal_renderer_AbstractBlendModeManager.prototype,{
currentBlendMode: null
,gl: null
,setBlendMode: function(blendMode) {
if(this.currentBlendMode == blendMode) return;
this.currentBlendMode = blendMode;
switch(blendMode) {
case 0:
this.gl.__context.blendEquation(this.gl.FUNC_ADD);
this.gl.__context.blendFunc(this.gl.ONE,this.gl.ONE);
break;
case 9:
this.gl.__context.blendEquation(this.gl.FUNC_ADD);
this.gl.__context.blendFunc(this.gl.DST_COLOR,this.gl.ONE_MINUS_SRC_ALPHA);
break;
case 12:
this.gl.__context.blendEquation(this.gl.FUNC_ADD);
this.gl.__context.blendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_COLOR);
break;
case 14:
this.gl.__context.blendEquation(this.gl.FUNC_REVERSE_SUBTRACT);
this.gl.__context.blendFunc(this.gl.ONE,this.gl.ONE);
break;
default:
this.gl.__context.blendEquation(this.gl.FUNC_ADD);
this.gl.__context.blendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA);
}
}
,__class__: openfl__$internal_renderer_opengl_GLBlendModeManager
});
var openfl__$internal_renderer_opengl_GLDisplayObject = function() { };
$hxClasses["openfl._internal.renderer.opengl.GLDisplayObject"] = openfl__$internal_renderer_opengl_GLDisplayObject;
openfl__$internal_renderer_opengl_GLDisplayObject.__name__ = ["openfl","_internal","renderer","opengl","GLDisplayObject"];
openfl__$internal_renderer_opengl_GLDisplayObject.render = function(displayObject,renderSession) {
if(displayObject.opaqueBackground == null && displayObject.__graphics == null) return;
if(!displayObject.__renderable || displayObject.__worldAlpha <= 0) return;
if(displayObject.opaqueBackground != null && !displayObject.__cacheBitmapRender && displayObject.get_width() > 0 && displayObject.get_height() > 0) {
renderSession.maskManager.pushObject(displayObject);
var gl = renderSession.gl;
var rect = openfl_geom_Rectangle.__pool.get();
rect.setTo(0,0,displayObject.get_width(),displayObject.get_height());
renderSession.maskManager.pushRect(rect,displayObject.__renderTransform);
var color = displayObject.opaqueBackground;
gl.__context.clearColor((color >> 16 & 255) / 255,(color >> 8 & 255) / 255,(color & 255) / 255,1);
gl.__context.clear(gl.COLOR_BUFFER_BIT);
renderSession.maskManager.popRect();
renderSession.maskManager.popObject(displayObject);
openfl_geom_Rectangle.__pool.release(rect);
}
if(displayObject.__graphics != null) openfl__$internal_renderer_opengl_GLShape.render(displayObject,renderSession);
};
var openfl__$internal_renderer_opengl_GLFilterManager = function(renderer,renderSession) {
openfl__$internal_renderer_AbstractFilterManager.call(this,renderSession);
this.renderer = renderer;
this.gl = renderSession.gl;
this.filterDepth = 0;
this.matrix = new openfl_geom_Matrix();
};
$hxClasses["openfl._internal.renderer.opengl.GLFilterManager"] = openfl__$internal_renderer_opengl_GLFilterManager;
openfl__$internal_renderer_opengl_GLFilterManager.__name__ = ["openfl","_internal","renderer","opengl","GLFilterManager"];
openfl__$internal_renderer_opengl_GLFilterManager.__super__ = openfl__$internal_renderer_AbstractFilterManager;
openfl__$internal_renderer_opengl_GLFilterManager.prototype = $extend(openfl__$internal_renderer_AbstractFilterManager.prototype,{
filterDepth: null
,gl: null
,matrix: null
,renderer: null
,pushObject: function(object) {
if(object.__filters != null && object.__filters.length > 0) {
if(js_Boot.__instanceof(object.__filters[0],openfl_filters_GlowFilter) && js_Boot.__instanceof(object,openfl_text_TextField)) return this.renderSession.shaderManager.defaultShader;
if(object.__filters.length == 1 && object.__filters[0].__numPasses == 0) return object.__filters[0].__initShader(this.renderSession,0); else this.renderer.getRenderTarget(true);
this.filterDepth++;
}
return this.renderSession.shaderManager.defaultShader;
}
,popObject: function(object) {
if(object.__filters != null && object.__filters.length > 0) {
if(js_Boot.__instanceof(object.__filters[0],openfl_filters_GlowFilter) && js_Boot.__instanceof(object,openfl_text_TextField)) return;
var numPasses = 0;
if(object.__filters.length > 1 || object.__filters[0].__numPasses > 0) {
numPasses = object.__filters.length;
var _g = 0;
var _g1 = object.__filters;
while(_g < _g1.length) {
var filter = _g1[_g];
++_g;
if(filter.__numPasses > 0) numPasses += filter.__numPasses - 1; else numPasses += 0;
}
}
if(numPasses > 0) {
var currentTarget;
var shader;
var _g2 = 0;
var _g11 = object.__filters;
while(_g2 < _g11.length) {
var filter1 = _g11[_g2];
++_g2;
if(filter1.__numPasses > 0) {
var _g3 = 0;
var _g21 = filter1.__numPasses;
while(_g3 < _g21) {
var i = _g3++;
currentTarget = this.renderer.currentRenderTarget;
this.renderer.getRenderTarget(true);
shader = filter1.__initShader(this.renderSession,i);
this.renderPass(currentTarget,shader);
}
} else {
currentTarget = this.renderer.currentRenderTarget;
this.renderer.getRenderTarget(true);
shader = filter1.__initShader(this.renderSession,0);
this.renderPass(currentTarget,shader);
}
this.filterDepth--;
this.renderer.getRenderTarget(this.filterDepth > 0);
this.renderPass(this.renderer.currentRenderTarget,this.renderSession.shaderManager.defaultShader);
}
} else this.filterDepth--;
}
}
,renderPass: function(target,shader) {
shader.get_data().uImage0.input = target;
shader.get_data().uImage0.smoothing = this.renderSession.allowSmoothing && this.renderSession.upscaled;
shader.get_data().uMatrix.value = this.renderer.getMatrix(this.matrix);
this.renderSession.shaderManager.setShader(shader);
this.gl.bindBuffer(this.gl.ARRAY_BUFFER,target.getBuffer(this.gl,1));
this.gl.vertexAttribPointer(shader.get_data().aPosition.index,3,this.gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0));
this.gl.vertexAttribPointer(shader.get_data().aTexCoord.index,2,this.gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(12));
this.gl.vertexAttribPointer(shader.get_data().aAlpha.index,1,this.gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(20));
this.gl.__context.drawArrays(this.gl.TRIANGLE_STRIP,0,4);
}
,__class__: openfl__$internal_renderer_opengl_GLFilterManager
});
var openfl__$internal_renderer_opengl_GLMaskManager = function(renderSession) {
openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
this.gl = renderSession.gl;
this.clipRects = [];
this.numClipRects = 0;
this.tempRect = new openfl_geom_Rectangle();
};
$hxClasses["openfl._internal.renderer.opengl.GLMaskManager"] = openfl__$internal_renderer_opengl_GLMaskManager;
openfl__$internal_renderer_opengl_GLMaskManager.__name__ = ["openfl","_internal","renderer","opengl","GLMaskManager"];
openfl__$internal_renderer_opengl_GLMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_opengl_GLMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
clipRects: null
,gl: null
,numClipRects: null
,tempRect: null
,pushMask: function(mask) {
this.pushRect(mask.getBounds(mask),mask.__getRenderTransform());
}
,pushObject: function(object,handleScrollRect) {
if(handleScrollRect == null) handleScrollRect = true;
if(handleScrollRect && object.__scrollRect != null) this.pushRect(object.__scrollRect,object.__renderTransform);
if(object.__mask != null) this.pushMask(object.__mask);
}
,pushRect: function(rect,transform) {
var stage = openfl_Lib.current.stage;
if(this.numClipRects == this.clipRects.length) this.clipRects[this.numClipRects] = new openfl_geom_Rectangle();
var clipRect = this.clipRects[this.numClipRects];
rect.__transform(clipRect,transform);
if(this.numClipRects > 0) {
var parentClipRect = this.clipRects[this.numClipRects - 1];
clipRect.__contract(parentClipRect.x,parentClipRect.y,parentClipRect.width,parentClipRect.height);
}
if(clipRect.height < 0) clipRect.height = 0;
if(clipRect.width < 0) clipRect.width = 0;
this.scissorRect(clipRect);
this.numClipRects++;
}
,popMask: function() {
this.popRect();
}
,popObject: function(object,handleScrollRect) {
if(handleScrollRect == null) handleScrollRect = true;
if(object.__mask != null) this.popMask();
if(handleScrollRect && object.__scrollRect != null) this.popRect();
}
,popRect: function() {
if(this.numClipRects > 0) {
this.numClipRects--;
if(this.numClipRects > 0) this.scissorRect(this.clipRects[this.numClipRects - 1]); else this.scissorRect();
}
}
,scissorRect: function(rect) {
if(rect != null) {
var renderer = this.renderSession.renderer;
this.gl.__context.enable(this.gl.SCISSOR_TEST);
var clipRect = this.tempRect;
rect.__transform(clipRect,renderer.displayMatrix);
var x = Math.floor(clipRect.x);
var y = Math.floor(renderer.height - clipRect.y - clipRect.height);
var width = Math.ceil(clipRect.width);
var height = Math.ceil(clipRect.height);
if(width < 0) width = 0;
if(height < 0) height = 0;
this.gl.__context.scissor(x,y,width,height);
} else this.gl.__context.disable(this.gl.SCISSOR_TEST);
}
,__class__: openfl__$internal_renderer_opengl_GLMaskManager
});
var openfl__$internal_renderer_opengl_GLRenderer = function(stage,gl,flipped) {
if(flipped == null) flipped = true;
openfl__$internal_renderer_AbstractRenderer.call(this,stage);
this.gl = gl;
this.flipped = flipped;
this.matrix = lime_math__$Matrix4_Matrix4_$Impl_$._new();
this.values = [];
this.renderSession = new openfl__$internal_renderer_RenderSession();
this.renderSession.clearDirtyFlags = true;
this.renderSession.gl = gl;
this.renderSession.renderer = this;
this.renderSession.blendModeManager = new openfl__$internal_renderer_opengl_GLBlendModeManager(gl);
this.renderSession.filterManager = new openfl__$internal_renderer_opengl_GLFilterManager(this,this.renderSession);
this.renderSession.shaderManager = new openfl__$internal_renderer_opengl_GLShaderManager(gl);
this.renderSession.maskManager = new openfl__$internal_renderer_opengl_GLMaskManager(this.renderSession);
if(stage.window != null) {
if(stage.stage3Ds.get(0).context3D == null) stage.stage3Ds.get(0).__createContext(stage,this.renderSession);
this.resize(Math.ceil(stage.window.__width * stage.window.__scale),Math.ceil(stage.window.__height * stage.window.__scale));
}
};
$hxClasses["openfl._internal.renderer.opengl.GLRenderer"] = openfl__$internal_renderer_opengl_GLRenderer;
openfl__$internal_renderer_opengl_GLRenderer.__name__ = ["openfl","_internal","renderer","opengl","GLRenderer"];
openfl__$internal_renderer_opengl_GLRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_opengl_GLRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
projection: null
,projectionFlipped: null
,currentRenderTarget: null
,displayHeight: null
,displayMatrix: null
,displayWidth: null
,flipped: null
,gl: null
,matrix: null
,renderTargetA: null
,renderTargetB: null
,offsetX: null
,offsetY: null
,values: null
,clear: function() {
if(this.stage.__transparent) this.gl.__context.clearColor(0,0,0,0); else this.gl.__context.clearColor(this.stage.__colorSplit[0],this.stage.__colorSplit[1],this.stage.__colorSplit[2],1);
this.gl.__context.clear(this.gl.COLOR_BUFFER_BIT);
}
,getCacheObject: function() {
}
,getMatrix: function(transform) {
var _matrix = openfl_geom_Matrix.__pool.get();
_matrix.copyFrom(transform);
_matrix.concat(this.displayMatrix);
if(this.renderSession.roundPixels) {
_matrix.tx = Math.round(_matrix.tx);
_matrix.ty = Math.round(_matrix.ty);
}
lime_math__$Matrix4_Matrix4_$Impl_$.identity(this.matrix);
lime_math__$Matrix4_Matrix4_$Impl_$.set(this.matrix,0,_matrix.a);
lime_math__$Matrix4_Matrix4_$Impl_$.set(this.matrix,1,_matrix.b);
lime_math__$Matrix4_Matrix4_$Impl_$.set(this.matrix,4,_matrix.c);
lime_math__$Matrix4_Matrix4_$Impl_$.set(this.matrix,5,_matrix.d);
lime_math__$Matrix4_Matrix4_$Impl_$.set(this.matrix,12,_matrix.tx);
lime_math__$Matrix4_Matrix4_$Impl_$.set(this.matrix,13,_matrix.ty);
lime_math__$Matrix4_Matrix4_$Impl_$.append(this.matrix,this.flipped?this.projectionFlipped:this.projection);
var _g = 0;
while(_g < 16) {
var i = _g++;
this.values[i] = lime_math__$Matrix4_Matrix4_$Impl_$.get(this.matrix,i);
}
openfl_geom_Matrix.__pool.release(_matrix);
return this.values;
}
,getRenderTarget: function(framebuffer) {
if(framebuffer) {
if(this.renderTargetA == null) {
this.renderTargetA = openfl_display_BitmapData.fromTexture(this.stage.stage3Ds.get(0).context3D.createRectangleTexture(this.width,this.height,1,true));
this.gl.bindTexture(this.gl.TEXTURE_2D,this.renderTargetA.getTexture(this.gl));
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE);
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE);
}
if(this.renderTargetB == null) {
this.renderTargetB = openfl_display_BitmapData.fromTexture(this.stage.stage3Ds.get(0).context3D.createRectangleTexture(this.width,this.height,1,true));
this.gl.bindTexture(this.gl.TEXTURE_2D,this.renderTargetB.getTexture(this.gl));
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE);
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE);
}
if(this.currentRenderTarget == this.renderTargetA) this.currentRenderTarget = this.renderTargetB; else this.currentRenderTarget = this.renderTargetA;
this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.currentRenderTarget.__getFramebuffer(this.gl));
this.gl.__context.viewport(0,0,this.width,this.height);
this.gl.__context.clearColor(0,0,0,0);
this.gl.__context.clear(this.gl.COLOR_BUFFER_BIT);
this.flipped = false;
} else {
this.gl.__context.bindFramebuffer(this.gl.FRAMEBUFFER,null);
this.flipped = true;
}
}
,render: function() {
this.gl.__context.viewport(this.offsetX,this.offsetY,this.displayWidth,this.displayHeight);
this.renderSession.allowSmoothing = this.stage.quality != 2;
this.renderSession.upscaled = this.displayMatrix.a != 1 || this.displayMatrix.d != 1;
this.stage.__renderGL(this.renderSession);
if(this.offsetX > 0 || this.offsetY > 0) {
this.gl.__context.clearColor(0,0,0,1);
this.gl.__context.enable(this.gl.SCISSOR_TEST);
if(this.offsetX > 0) {
this.gl.__context.scissor(0,0,this.offsetX,this.height);
this.gl.__context.clear(this.gl.COLOR_BUFFER_BIT);
this.gl.__context.scissor(this.offsetX + this.displayWidth,0,this.width,this.height);
this.gl.__context.clear(this.gl.COLOR_BUFFER_BIT);
}
if(this.offsetY > 0) {
this.gl.__context.scissor(0,0,this.width,this.offsetY);
this.gl.__context.clear(this.gl.COLOR_BUFFER_BIT);
this.gl.__context.scissor(0,this.offsetY + this.displayHeight,this.width,this.height);
this.gl.__context.clear(this.gl.COLOR_BUFFER_BIT);
}
this.gl.__context.disable(this.gl.SCISSOR_TEST);
}
}
,renderStage3D: function() {
var _g = 0;
var _g1 = this.stage.stage3Ds;
while(_g < _g1.get_length()) {
var stage3D = _g1.get(_g);
++_g;
stage3D.__renderGL(this.stage,this.renderSession);
}
}
,resize: function(width,height) {
openfl__$internal_renderer_AbstractRenderer.prototype.resize.call(this,width,height);
if(width > 0 && height > 0) {
if(this.renderTargetA != null && (this.renderTargetA.width != width || this.renderTargetA.height != height)) {
this.renderTargetA = openfl_display_BitmapData.fromTexture(this.stage.stage3Ds.get(0).context3D.createRectangleTexture(width,height,1,true));
this.gl.bindTexture(this.gl.TEXTURE_2D,this.renderTargetA.getTexture(this.gl));
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE);
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE);
}
if(this.renderTargetB != null && (this.renderTargetB.width != width || this.renderTargetB.height != height)) {
this.renderTargetB = openfl_display_BitmapData.fromTexture(this.stage.stage3Ds.get(0).context3D.createRectangleTexture(width,height,1,true));
this.gl.bindTexture(this.gl.TEXTURE_2D,this.renderTargetB.getTexture(this.gl));
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE);
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE);
}
}
this.displayMatrix = this.stage.__displayMatrix;
this.offsetX = Math.round(this.displayMatrix.__transformX(0,0));
this.offsetY = Math.round(this.displayMatrix.__transformY(0,0));
this.displayWidth = Math.round(this.displayMatrix.__transformX(this.stage.stageWidth,0) - this.offsetX);
this.displayHeight = Math.round(this.displayMatrix.__transformY(0,this.stage.stageHeight) - this.offsetY);
this.projection = lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho(this.offsetX,this.displayWidth + this.offsetX,this.offsetY,this.displayHeight + this.offsetY,-1000,1000);
this.projectionFlipped = lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho(this.offsetX,this.displayWidth + this.offsetX,this.displayHeight + this.offsetY,this.offsetY,-1000,1000);
}
,__class__: openfl__$internal_renderer_opengl_GLRenderer
});
var openfl__$internal_renderer_opengl_GLShaderManager = function(gl) {
openfl__$internal_renderer_AbstractShaderManager.call(this);
this.gl = gl;
this.defaultShader = new openfl_display_Shader();
this.defaultShader.gl = gl;
this.defaultShader.__init();
};
$hxClasses["openfl._internal.renderer.opengl.GLShaderManager"] = openfl__$internal_renderer_opengl_GLShaderManager;
openfl__$internal_renderer_opengl_GLShaderManager.__name__ = ["openfl","_internal","renderer","opengl","GLShaderManager"];
openfl__$internal_renderer_opengl_GLShaderManager.__super__ = openfl__$internal_renderer_AbstractShaderManager;
openfl__$internal_renderer_opengl_GLShaderManager.prototype = $extend(openfl__$internal_renderer_AbstractShaderManager.prototype,{
gl: null
,setShader: function(shader) {
if(this.currentShader == shader) {
if(this.currentShader != null) this.currentShader.__update();
return;
}
if(this.currentShader != null) this.currentShader.__disable();
if(shader == null) {
this.currentShader = null;
this.gl.__context.useProgram(null);
return;
}
this.currentShader = shader;
if(this.currentShader.gl == null) {
this.currentShader.gl = this.gl;
this.currentShader.__init();
}
this.gl.__context.useProgram(shader.glProgram);
this.currentShader.__enable();
this.currentShader.__update();
}
,__class__: openfl__$internal_renderer_opengl_GLShaderManager
});
var openfl__$internal_renderer_opengl_GLShape = function() { };
$hxClasses["openfl._internal.renderer.opengl.GLShape"] = openfl__$internal_renderer_opengl_GLShape;
openfl__$internal_renderer_opengl_GLShape.__name__ = ["openfl","_internal","renderer","opengl","GLShape"];
openfl__$internal_renderer_opengl_GLShape.render = function(shape,renderSession) {
if(!shape.__renderable || shape.__worldAlpha <= 0) return;
var graphics = shape.__graphics;
if(graphics != null) {
openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession,shape.__renderTransform);
var bounds = graphics.__bounds;
if(graphics.__bitmap != null && graphics.__visible) {
var renderer = renderSession.renderer;
var gl = renderSession.gl;
renderSession.blendModeManager.setBlendMode(shape.__worldBlendMode);
renderSession.maskManager.pushObject(shape);
var shader = renderSession.filterManager.pushObject(shape);
shader.get_data().uImage0.input = graphics.__bitmap;
shader.get_data().uImage0.smoothing = renderSession.allowSmoothing;
shader.get_data().uMatrix.value = renderer.getMatrix(graphics.__worldTransform);
renderSession.shaderManager.setShader(shader);
gl.bindBuffer(gl.ARRAY_BUFFER,graphics.__bitmap.getBuffer(gl,shape.__worldAlpha));
gl.vertexAttribPointer(shader.get_data().aPosition.index,3,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0));
gl.vertexAttribPointer(shader.get_data().aTexCoord.index,2,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(12));
gl.vertexAttribPointer(shader.get_data().aAlpha.index,1,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(20));
gl.__context.drawArrays(gl.TRIANGLE_STRIP,0,4);
renderSession.filterManager.popObject(shape);
renderSession.maskManager.popObject(shape);
}
}
};
var openfl__$internal_renderer_opengl_GLStage3D = function() { };
$hxClasses["openfl._internal.renderer.opengl.GLStage3D"] = openfl__$internal_renderer_opengl_GLStage3D;
openfl__$internal_renderer_opengl_GLStage3D.__name__ = ["openfl","_internal","renderer","opengl","GLStage3D"];
openfl__$internal_renderer_opengl_GLStage3D.render = function(stage3D,renderSession) {
if(stage3D.context3D != null) {
renderSession.blendModeManager.setBlendMode(null);
if(renderSession.shaderManager.currentShader != null) {
renderSession.shaderManager.setShader(null);
if(stage3D.context3D.__program != null) stage3D.context3D.__program.__use();
}
}
if(openfl__$internal_stage3D_GLUtils.debug) renderSession.gl.__context.getError();
};
var openfl__$internal_stage3D_AGALConverter = function() { };
$hxClasses["openfl._internal.stage3D.AGALConverter"] = openfl__$internal_stage3D_AGALConverter;
openfl__$internal_stage3D_AGALConverter.__name__ = ["openfl","_internal","stage3D","AGALConverter"];
openfl__$internal_stage3D_AGALConverter.prefixFromType = function(regType,programType) {
switch(regType) {
case 0:
return "va";
case 1:
if(programType == openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX) return "vc"; else return "fc";
break;
case 2:
if(programType == openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX) return "vt"; else return "ft";
break;
case 3:
return "output_";
case 4:
return "v";
case 5:
return "sampler";
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Invalid data!"));
}
};
openfl__$internal_stage3D_AGALConverter.readUInt64 = function(byteArray) {
var low = byteArray.readInt();
var high = byteArray.readInt();
var x = new haxe__$Int64__$_$_$Int64(high,low);
return x;
};
openfl__$internal_stage3D_AGALConverter.convertToGLSL = function(agal,samplerState) {
agal.position = 0;
agal.__endian = 1;
var magic = agal.readByte() & 255;
if(magic == 176) return agal.readUTF();
if(magic != 160) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Magic value must be 0xA0, may not be AGAL"));
var version = agal.readInt();
if(version != 1) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Version must be 1"));
var shaderTypeID = agal.readByte() & 255;
if(shaderTypeID != 161) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Shader type ID must be 0xA1"));
var programType;
if((agal.readByte() & 255) == 0) programType = openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX; else programType = openfl__$internal_stage3D__$AGALConverter_ProgramType.FRAGMENT;
var map = new openfl__$internal_stage3D_RegisterMap();
var sb = new StringBuf();
while(agal.position < openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(agal)) {
var opcode = agal.readInt();
var dest = agal.readUnsignedInt();
var source1 = openfl__$internal_stage3D_AGALConverter.readUInt64(agal);
var source2 = openfl__$internal_stage3D_AGALConverter.readUInt64(agal);
var dr = openfl__$internal_stage3D__$AGALConverter_DestRegister.parse(dest,programType);
var sr1 = openfl__$internal_stage3D__$AGALConverter_SourceRegister.parse(source1,programType,dr.mask);
var sr2 = openfl__$internal_stage3D__$AGALConverter_SourceRegister.parse(source2,programType,dr.mask);
sb.b += "\t";
switch(opcode) {
case 0:
sb.add(dr.toGLSL() + " = " + sr1.toGLSL() + "; // mov");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 1:
sb.add(dr.toGLSL() + " = " + sr1.toGLSL() + " + " + sr2.toGLSL() + "; // add");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 2:
sb.add(dr.toGLSL() + " = " + sr1.toGLSL() + " - " + sr2.toGLSL() + "; // sub");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 3:
sb.add(dr.toGLSL() + " = " + sr1.toGLSL() + " * " + sr2.toGLSL() + "; // mul");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 4:
sb.add(dr.toGLSL() + " = " + sr1.toGLSL() + " / " + sr2.toGLSL() + "; // div");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 5:
sb.add(dr.toGLSL() + " = vec4(1) / " + sr1.toGLSL() + ", " + sr2.toGLSL() + "; // rcp (untested)");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 6:
sb.add(dr.toGLSL() + " = min(" + sr1.toGLSL() + ", " + sr2.toGLSL() + "); // min");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 7:
sb.add(dr.toGLSL() + " = max(" + sr1.toGLSL() + ", " + sr2.toGLSL() + "); // max");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 8:
sb.add(dr.toGLSL() + " = fract(" + sr1.toGLSL() + "); // frc");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 9:
sb.add(dr.toGLSL() + " = sqrt(" + sr1.toGLSL() + "); // sqrt");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 10:
sb.add(dr.toGLSL() + " = inversesqrt(" + sr1.toGLSL() + "); // rsq");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 11:
sb.add(dr.toGLSL() + " = pow(" + sr1.toGLSL() + ", " + sr2.toGLSL() + "); // pow");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 12:
sb.add(dr.toGLSL() + " = log2(" + sr1.toGLSL() + "); // log");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 13:
sb.add(dr.toGLSL() + " = exp2(" + sr1.toGLSL() + "); // exp");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 14:
sb.add(dr.toGLSL() + " = normalize(" + sr1.toGLSL() + "); // normalize");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 15:
sb.add(dr.toGLSL() + " = sin(" + sr1.toGLSL() + "); // sin");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 16:
sb.add(dr.toGLSL() + " = cos(" + sr1.toGLSL() + "); // cos");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 17:
sr1.sourceMask = sr2.sourceMask = 7;
sb.add(dr.toGLSL() + " = cross(vec3(" + sr1.toGLSL() + "), vec3(" + sr2.toGLSL() + ")); // crs");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 18:
sr1.sourceMask = sr2.sourceMask = 7;
sb.add(dr.toGLSL() + " = vec4(dot(vec3(" + sr1.toGLSL() + "), vec3(" + sr2.toGLSL() + ")))" + dr.getWriteMask() + "; // dp3");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 19:
sr1.sourceMask = sr2.sourceMask = 15;
sb.add(dr.toGLSL() + " = vec4(dot(vec4(" + sr1.toGLSL() + "), vec4(" + sr2.toGLSL() + ")))" + dr.getWriteMask() + "; // dp4");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 20:
sb.add(dr.toGLSL() + " = abs(" + sr1.toGLSL() + "); // abs");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 21:
sb.add(dr.toGLSL() + " = -" + sr1.toGLSL() + "; // neg");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 22:
sb.add(dr.toGLSL() + " = clamp(" + sr1.toGLSL() + ", 0.0, 1.0); // saturate");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 23:
var existingUsage = map.getRegisterUsage(sr2);
if(existingUsage != openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4 && existingUsage != openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY) {
sb.add(dr.toGLSL() + " = " + sr1.toGLSL() + " * mat3(" + sr2.toGLSL(false) + "); // m33");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.MATRIX_4_4);
} else {
sr1.sourceMask = sr2.sourceMask = 7;
sb.add(dr.toGLSL() + " = vec3(" + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,0) + "), " + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,1) + ")," + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,2) + ")); // m33");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,0);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,1);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,2);
}
break;
case 24:
var existingUsage1 = map.getRegisterUsage(sr2);
if(existingUsage1 != openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4 && existingUsage1 != openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY) {
sb.add(dr.toGLSL() + " = " + sr1.toGLSL() + " * " + sr2.toGLSL(false) + "; // m44");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.MATRIX_4_4);
} else {
sr1.sourceMask = sr2.sourceMask = 15;
sb.add(dr.toGLSL() + " = vec4(" + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,0) + "), " + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,1) + "), " + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,2) + "), " + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,3) + ")); // m44");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,0);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,1);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,2);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,3);
}
break;
case 25:
dr.mask &= 7;
var existingUsage2 = map.getRegisterUsage(sr2);
if(existingUsage2 != openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4 && existingUsage2 != openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY) {
sb.add(dr.toGLSL() + " = " + sr1.toGLSL() + " * " + sr2.toGLSL(false) + "; // m34");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.MATRIX_4_4);
} else {
sr1.sourceMask = sr2.sourceMask = 15;
sb.add(dr.toGLSL() + " = vec3(" + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,0) + "), " + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,1) + ")," + "dot(" + sr1.toGLSL(true) + "," + sr2.toGLSL(true,2) + ")); // m34");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,0);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,1);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4,2);
}
break;
case 39:
sr1.sourceMask = 15;
sb.add("if (any(lessThan(" + sr1.toGLSL() + ", vec4(0)))) discard;");
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 40:
var sampler = openfl__$internal_stage3D__$AGALConverter_SamplerRegister.parse(source2,programType);
var _g = sampler.d;
switch(_g) {
case 0:
sr1.sourceMask = 3;
map.addSaR(sampler,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_2D);
sb.add(dr.toGLSL() + " = texture2D(" + sampler.toGLSL() + ", " + sr1.toGLSL() + "); // tex");
break;
case 1:
sr1.sourceMask = 7;
sb.add(dr.toGLSL() + " = textureCube(" + sampler.toGLSL() + ", " + sr1.toGLSL() + "); // tex");
map.addSaR(sampler,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_CUBE);
break;
}
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
if(samplerState != null) samplerState[sampler.n] = sampler.toSamplerState();
break;
case 41:
sr1.sourceMask = sr2.sourceMask = 15;
sb.add(dr.toGLSL() + " = vec4(greaterThanEqual(" + sr1.toGLSL() + ", " + sr2.toGLSL() + "))" + dr.getWriteMask() + "; // ste");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 42:
sr1.sourceMask = sr2.sourceMask = 15;
sb.add(dr.toGLSL() + " = vec4(lessThan(" + sr1.toGLSL() + ", " + sr2.toGLSL() + "))" + dr.getWriteMask() + "; // slt");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 44:
sr1.sourceMask = sr2.sourceMask = 15;
sb.add(dr.toGLSL() + " = vec4(equal(" + sr1.toGLSL() + ", " + sr2.toGLSL() + "))" + dr.getWriteMask() + "; // seq");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
case 45:
sr1.sourceMask = sr2.sourceMask = 15;
sb.add(dr.toGLSL() + " = vec4(notEqual(" + sr1.toGLSL() + ", " + sr2.toGLSL() + "))" + dr.getWriteMask() + "; // sne");
map.addDR(dr,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr1,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
map.addSR(sr2,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Opcode " + opcode));
}
sb.b += "\n";
}
if(openfl__$internal_stage3D_AGALConverter.limitedProfile == null) {
var version1 = lime_graphics_opengl_GL.context.__context.getParameter(7938);
openfl__$internal_stage3D_AGALConverter.limitedProfile = version1.indexOf("OpenGL ES") > -1 || version1.indexOf("WebGL") > -1;
}
var glsl = new StringBuf();
glsl.b += Std.string("// AGAL " + (programType == openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX?"vertex":"fragment") + " shader\n");
if(openfl__$internal_stage3D_AGALConverter.limitedProfile) {
glsl.b += "#version 100\n";
glsl.b += "precision highp float;\n";
} else glsl.b += "#version 120\n";
glsl.add(map.toGLSL(false));
if(programType == openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX) glsl.b += "uniform vec4 vcPositionScale;\n";
glsl.b += "void main() {\n";
glsl.add(map.toGLSL(true));
if(sb.b == null) glsl.b += "null"; else glsl.b += "" + sb.b;
if(programType == openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX) glsl.b += "\tgl_Position *= vcPositionScale;\n";
glsl.b += "}\n";
return glsl.b;
};
var openfl__$internal_stage3D__$AGALConverter_DestRegister = function() {
};
$hxClasses["openfl._internal.stage3D._AGALConverter.DestRegister"] = openfl__$internal_stage3D__$AGALConverter_DestRegister;
openfl__$internal_stage3D__$AGALConverter_DestRegister.__name__ = ["openfl","_internal","stage3D","_AGALConverter","DestRegister"];
openfl__$internal_stage3D__$AGALConverter_DestRegister.parse = function(v,programType) {
var dr = new openfl__$internal_stage3D__$AGALConverter_DestRegister();
dr.programType = programType;
dr.type = v >> 24 & 15;
dr.mask = v >> 16 & 15;
dr.n = v & 65535;
return dr;
};
openfl__$internal_stage3D__$AGALConverter_DestRegister.prototype = {
mask: null
,n: null
,programType: null
,type: null
,getWriteMask: function() {
var str = ".";
if((this.mask & 1) != 0) str += "x";
if((this.mask & 2) != 0) str += "y";
if((this.mask & 4) != 0) str += "z";
if((this.mask & 8) != 0) str += "w";
return str;
}
,toGLSL: function(useMask) {
if(useMask == null) useMask = true;
var str;
if(this.type == 3) if(this.programType == openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX) str = "gl_Position"; else str = "gl_FragColor"; else str = openfl__$internal_stage3D_AGALConverter.prefixFromType(this.type,this.programType) + this.n;
if(useMask && this.mask != 15) str += this.getWriteMask();
return str;
}
,__class__: openfl__$internal_stage3D__$AGALConverter_DestRegister
};
var openfl__$internal_stage3D__$AGALConverter_ProgramType = $hxClasses["openfl._internal.stage3D._AGALConverter.ProgramType"] = { __ename__ : ["openfl","_internal","stage3D","_AGALConverter","ProgramType"], __constructs__ : ["VERTEX","FRAGMENT"] };
openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX = ["VERTEX",0];
openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX.__enum__ = openfl__$internal_stage3D__$AGALConverter_ProgramType;
openfl__$internal_stage3D__$AGALConverter_ProgramType.FRAGMENT = ["FRAGMENT",1];
openfl__$internal_stage3D__$AGALConverter_ProgramType.FRAGMENT.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_ProgramType.FRAGMENT.__enum__ = openfl__$internal_stage3D__$AGALConverter_ProgramType;
var openfl__$internal_stage3D_RegisterMap = function() {
this.mEntries = [];
};
$hxClasses["openfl._internal.stage3D.RegisterMap"] = openfl__$internal_stage3D_RegisterMap;
openfl__$internal_stage3D_RegisterMap.__name__ = ["openfl","_internal","stage3D","RegisterMap"];
openfl__$internal_stage3D_RegisterMap.prototype = {
mEntries: null
,add: function(type,name,number,usage) {
var _g = 0;
var _g1 = this.mEntries;
while(_g < _g1.length) {
var entry1 = _g1[_g];
++_g;
if(entry1.type == type && entry1.name == name && entry1.number == number) {
if(entry1.usage != usage) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Cannot use register in multiple ways yet (mat4/vec4)"));
return;
}
}
var entry = new openfl__$internal_stage3D__$AGALConverter_RegisterMapEntry();
entry.type = type;
entry.name = name;
entry.number = number;
entry.usage = usage;
this.mEntries.push(entry);
}
,addDR: function(dr,usage) {
this.add(dr.type,dr.toGLSL(false),dr.n,usage);
}
,addSaR: function(sr,usage) {
this.add(sr.type,sr.toGLSL(),sr.n,usage);
}
,addSR: function(sr,usage,offset) {
if(offset == null) offset = 0;
if(sr.d != 0) {
this.add(sr.itype,openfl__$internal_stage3D_AGALConverter.prefixFromType(sr.itype,sr.programType) + sr.n,sr.n,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4);
this.add(sr.type,openfl__$internal_stage3D_AGALConverter.prefixFromType(sr.type,sr.programType) + sr.o,sr.o,openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY);
return;
}
this.add(sr.type,sr.toGLSL(false,offset),sr.n + offset,usage);
}
,getRegisterUsage: function(sr) {
if(sr.d != 0) return openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY;
return this.getUsage(sr.type,sr.toGLSL(false),sr.n);
}
,getUsage: function(type,name,number) {
var _g = 0;
var _g1 = this.mEntries;
while(_g < _g1.length) {
var entry = _g1[_g];
++_g;
if(entry.type == type && entry.name == name && entry.number == number) return entry.usage;
}
return openfl__$internal_stage3D__$AGALConverter_RegisterUsage.UNUSED;
}
,toGLSL: function(tempRegistersOnly) {
this.mEntries.sort(function(a,b) {
return a.number - b.number;
});
var arrayCount = new haxe_ds_ObjectMap();
var entry;
var _g1 = 0;
var _g = this.mEntries.length;
while(_g1 < _g) {
var i = _g1++;
entry = this.mEntries[i];
if(entry.usage == openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY) {
if(i < this.mEntries.length - 1) {
var v = this.mEntries[i + 1].number - entry.number;
arrayCount.set(entry,v);
v;
} else {
arrayCount.set(entry,128);
128;
}
}
}
this.mEntries.sort(function(a1,b1) {
return js_Boot.__cast(a1.type , Int) - js_Boot.__cast(b1.type , Int);
});
var sb = new StringBuf();
var _g11 = 0;
var _g2 = this.mEntries.length;
while(_g11 < _g2) {
var i1 = _g11++;
entry = this.mEntries[i1];
if(tempRegistersOnly && entry.type != 2 || !tempRegistersOnly && entry.type == 2) continue;
if(entry.type == 3) continue;
var _g21 = entry.type;
switch(_g21) {
case 0:
sb.b += "attribute ";
break;
case 1:
sb.b += "uniform ";
break;
case 2:
sb.b += "\t";
break;
case 3:
break;
case 4:
sb.b += "varying ";
break;
case 5:
sb.b += "uniform ";
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
var _g22 = entry.usage;
switch(_g22[1]) {
case 1:
sb.b += "vec4 ";
break;
case 6:
sb.b += "vec4 ";
break;
case 2:
sb.b += "mat4 ";
break;
case 3:
sb.b += "sampler2D ";
break;
case 5:
sb.b += "samplerCube ";
break;
case 0:
haxe_Log.trace("Missing switch patten: RegisterUsage.UNUSED",{ fileName : "AGALConverter.hx", lineNumber : 800, className : "openfl._internal.stage3D.RegisterMap", methodName : "toGLSL"});
break;
case 4:
haxe_Log.trace("Missing switch patten: RegisterUsage.SAMPLER_2D_ALPHA",{ fileName : "AGALConverter.hx", lineNumber : 804, className : "openfl._internal.stage3D.RegisterMap", methodName : "toGLSL"});
break;
}
if(entry.usage == openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA) {
sb.b += "sampler2D ";
if(entry.name == null) sb.b += "null"; else sb.b += "" + entry.name;
sb.b += ";\n";
sb.b += "uniform ";
sb.b += "sampler2D ";
sb.b += Std.string(entry.name + "_alpha");
sb.b += ";\n";
} else if(entry.usage == openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY) {
sb.add(entry.name + "[" + arrayCount.h[entry.__id__] + "]");
sb.b += ";\n";
} else {
if(entry.name == null) sb.b += "null"; else sb.b += "" + entry.name;
sb.b += ";\n";
}
}
return sb.b;
}
,__class__: openfl__$internal_stage3D_RegisterMap
};
var openfl__$internal_stage3D__$AGALConverter_RegisterMapEntry = function() {
};
$hxClasses["openfl._internal.stage3D._AGALConverter.RegisterMapEntry"] = openfl__$internal_stage3D__$AGALConverter_RegisterMapEntry;
openfl__$internal_stage3D__$AGALConverter_RegisterMapEntry.__name__ = ["openfl","_internal","stage3D","_AGALConverter","RegisterMapEntry"];
openfl__$internal_stage3D__$AGALConverter_RegisterMapEntry.prototype = {
name: null
,number: null
,type: null
,usage: null
,__class__: openfl__$internal_stage3D__$AGALConverter_RegisterMapEntry
};
var openfl__$internal_stage3D__$AGALConverter_RegisterUsage = $hxClasses["openfl._internal.stage3D._AGALConverter.RegisterUsage"] = { __ename__ : ["openfl","_internal","stage3D","_AGALConverter","RegisterUsage"], __constructs__ : ["UNUSED","VECTOR_4","MATRIX_4_4","SAMPLER_2D","SAMPLER_2D_ALPHA","SAMPLER_CUBE","VECTOR_4_ARRAY"] };
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.UNUSED = ["UNUSED",0];
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.UNUSED.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.UNUSED.__enum__ = openfl__$internal_stage3D__$AGALConverter_RegisterUsage;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4 = ["VECTOR_4",1];
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4.__enum__ = openfl__$internal_stage3D__$AGALConverter_RegisterUsage;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.MATRIX_4_4 = ["MATRIX_4_4",2];
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.MATRIX_4_4.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.MATRIX_4_4.__enum__ = openfl__$internal_stage3D__$AGALConverter_RegisterUsage;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_2D = ["SAMPLER_2D",3];
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_2D.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_2D.__enum__ = openfl__$internal_stage3D__$AGALConverter_RegisterUsage;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA = ["SAMPLER_2D_ALPHA",4];
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA.__enum__ = openfl__$internal_stage3D__$AGALConverter_RegisterUsage;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_CUBE = ["SAMPLER_CUBE",5];
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_CUBE.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.SAMPLER_CUBE.__enum__ = openfl__$internal_stage3D__$AGALConverter_RegisterUsage;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY = ["VECTOR_4_ARRAY",6];
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY.toString = $estr;
openfl__$internal_stage3D__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY.__enum__ = openfl__$internal_stage3D__$AGALConverter_RegisterUsage;
var openfl__$internal_stage3D__$AGALConverter_SamplerRegister = function() {
};
$hxClasses["openfl._internal.stage3D._AGALConverter.SamplerRegister"] = openfl__$internal_stage3D__$AGALConverter_SamplerRegister;
openfl__$internal_stage3D__$AGALConverter_SamplerRegister.__name__ = ["openfl","_internal","stage3D","_AGALConverter","SamplerRegister"];
openfl__$internal_stage3D__$AGALConverter_SamplerRegister.parse = function(v,programType) {
var sr = new openfl__$internal_stage3D__$AGALConverter_SamplerRegister();
sr.programType = programType;
var this1;
var a;
var b1 = 60;
b1 &= 63;
if(b1 == 0) {
var x1 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a = x1;
} else if(b1 < 32) {
var x2 = new haxe__$Int64__$_$_$Int64(v.high >> b1,v.high << 32 - b1 | v.low >>> b1);
a = x2;
} else {
var x3 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b1 - 32);
a = x3;
}
var b;
{
var x4 = new haxe__$Int64__$_$_$Int64(0,15);
b = x4;
}
var x = new haxe__$Int64__$_$_$Int64(a.high & b.high,a.low & b.low);
this1 = x;
sr.f = this1.low;
var this2;
var a1;
var b3 = 56;
b3 &= 63;
if(b3 == 0) {
var x6 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a1 = x6;
} else if(b3 < 32) {
var x7 = new haxe__$Int64__$_$_$Int64(v.high >> b3,v.high << 32 - b3 | v.low >>> b3);
a1 = x7;
} else {
var x8 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b3 - 32);
a1 = x8;
}
var b2;
{
var x9 = new haxe__$Int64__$_$_$Int64(0,15);
b2 = x9;
}
var x5 = new haxe__$Int64__$_$_$Int64(a1.high & b2.high,a1.low & b2.low);
this2 = x5;
sr.m = this2.low;
var this3;
var a2;
var b5 = 52;
b5 &= 63;
if(b5 == 0) {
var x11 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a2 = x11;
} else if(b5 < 32) {
var x12 = new haxe__$Int64__$_$_$Int64(v.high >> b5,v.high << 32 - b5 | v.low >>> b5);
a2 = x12;
} else {
var x13 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b5 - 32);
a2 = x13;
}
var b4;
{
var x14 = new haxe__$Int64__$_$_$Int64(0,15);
b4 = x14;
}
var x10 = new haxe__$Int64__$_$_$Int64(a2.high & b4.high,a2.low & b4.low);
this3 = x10;
sr.w = this3.low;
var this4;
var a3;
var b7 = 48;
b7 &= 63;
if(b7 == 0) {
var x16 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a3 = x16;
} else if(b7 < 32) {
var x17 = new haxe__$Int64__$_$_$Int64(v.high >> b7,v.high << 32 - b7 | v.low >>> b7);
a3 = x17;
} else {
var x18 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b7 - 32);
a3 = x18;
}
var b6;
{
var x19 = new haxe__$Int64__$_$_$Int64(0,15);
b6 = x19;
}
var x15 = new haxe__$Int64__$_$_$Int64(a3.high & b6.high,a3.low & b6.low);
this4 = x15;
sr.s = this4.low;
var this5;
var a4;
var b9 = 44;
b9 &= 63;
if(b9 == 0) {
var x21 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a4 = x21;
} else if(b9 < 32) {
var x22 = new haxe__$Int64__$_$_$Int64(v.high >> b9,v.high << 32 - b9 | v.low >>> b9);
a4 = x22;
} else {
var x23 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b9 - 32);
a4 = x23;
}
var b8;
{
var x24 = new haxe__$Int64__$_$_$Int64(0,15);
b8 = x24;
}
var x20 = new haxe__$Int64__$_$_$Int64(a4.high & b8.high,a4.low & b8.low);
this5 = x20;
sr.d = this5.low;
var this6;
var a5;
var b11 = 40;
b11 &= 63;
if(b11 == 0) {
var x26 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a5 = x26;
} else if(b11 < 32) {
var x27 = new haxe__$Int64__$_$_$Int64(v.high >> b11,v.high << 32 - b11 | v.low >>> b11);
a5 = x27;
} else {
var x28 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b11 - 32);
a5 = x28;
}
var b10;
{
var x29 = new haxe__$Int64__$_$_$Int64(0,15);
b10 = x29;
}
var x25 = new haxe__$Int64__$_$_$Int64(a5.high & b10.high,a5.low & b10.low);
this6 = x25;
sr.t = this6.low;
sr.type = (function($this) {
var $r;
var this7;
{
var a6;
var b13 = 32;
b13 &= 63;
if(b13 == 0) {
var x31 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a6 = x31;
} else if(b13 < 32) {
var x32 = new haxe__$Int64__$_$_$Int64(v.high >> b13,v.high << 32 - b13 | v.low >>> b13);
a6 = x32;
} else {
var x33 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b13 - 32);
a6 = x33;
}
var b12;
{
var x34 = new haxe__$Int64__$_$_$Int64(0,15);
b12 = x34;
}
var x30 = new haxe__$Int64__$_$_$Int64(a6.high & b12.high,a6.low & b12.low);
this7 = x30;
}
$r = this7.low;
return $r;
}(this));
var this8;
var a7;
var b15 = 16;
b15 &= 63;
if(b15 == 0) {
var x36 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a7 = x36;
} else if(b15 < 32) {
var x37 = new haxe__$Int64__$_$_$Int64(v.high >> b15,v.high << 32 - b15 | v.low >>> b15);
a7 = x37;
} else {
var x38 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b15 - 32);
a7 = x38;
}
var b14;
{
var x39 = new haxe__$Int64__$_$_$Int64(0,255);
b14 = x39;
}
var x35 = new haxe__$Int64__$_$_$Int64(a7.high & b14.high,a7.low & b14.low);
this8 = x35;
sr.b = this8.low;
var this9;
var b16;
{
var x41 = new haxe__$Int64__$_$_$Int64(0,65535);
b16 = x41;
}
var x40 = new haxe__$Int64__$_$_$Int64(v.high & b16.high,v.low & b16.low);
this9 = x40;
sr.n = this9.low;
return sr;
};
openfl__$internal_stage3D__$AGALConverter_SamplerRegister.prototype = {
b: null
,d: null
,f: null
,m: null
,n: null
,programType: null
,s: null
,t: null
,type: null
,w: null
,toGLSL: function() {
var str = openfl__$internal_stage3D_AGALConverter.prefixFromType(this.type,this.programType) + this.n;
return str;
}
,toSamplerState: function() {
var magFilter = 0;
var minFilter = 0;
var wrapModeS = 0;
var wrapModeT = 0;
var _g = this.f;
switch(_g) {
case 0:
magFilter = 9728;
break;
case 1:
magFilter = 9729;
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
var _g1 = this.m;
switch(_g1) {
case 0:
if(this.f != 0) minFilter = 9729; else minFilter = 9728;
break;
case 1:
if(this.f != 0) minFilter = 9985; else minFilter = 9984;
break;
case 2:
if(this.f != 0) minFilter = 9987; else minFilter = 9986;
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
var _g2 = this.w;
switch(_g2) {
case 0:
wrapModeS = 33071;
wrapModeT = 33071;
break;
case 1:
wrapModeS = 10497;
wrapModeT = 10497;
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
var ignoreSampler = (this.s & 4) == 4;
var centroid = (this.s & 1) == 1;
var lodBias = (this.b << 24 >> 24) / 8.0;
var maxAniso = 0.0;
return new openfl__$internal_stage3D_SamplerState(minFilter,magFilter,wrapModeS,wrapModeT,lodBias,maxAniso,ignoreSampler,centroid);
}
,__class__: openfl__$internal_stage3D__$AGALConverter_SamplerRegister
};
var openfl__$internal_stage3D__$AGALConverter_SourceRegister = function() {
};
$hxClasses["openfl._internal.stage3D._AGALConverter.SourceRegister"] = openfl__$internal_stage3D__$AGALConverter_SourceRegister;
openfl__$internal_stage3D__$AGALConverter_SourceRegister.__name__ = ["openfl","_internal","stage3D","_AGALConverter","SourceRegister"];
openfl__$internal_stage3D__$AGALConverter_SourceRegister.parse = function(v,programType,sourceMask) {
var sr = new openfl__$internal_stage3D__$AGALConverter_SourceRegister();
sr.programType = programType;
var this1;
var a;
var b1 = 63;
b1 &= 63;
if(b1 == 0) {
var x1 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a = x1;
} else if(b1 < 32) {
var x2 = new haxe__$Int64__$_$_$Int64(v.high >> b1,v.high << 32 - b1 | v.low >>> b1);
a = x2;
} else {
var x3 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b1 - 32);
a = x3;
}
var b;
{
var x4 = new haxe__$Int64__$_$_$Int64(0,1);
b = x4;
}
var x = new haxe__$Int64__$_$_$Int64(a.high & b.high,a.low & b.low);
this1 = x;
sr.d = this1.low;
var this2;
var a1;
var b3 = 48;
b3 &= 63;
if(b3 == 0) {
var x6 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a1 = x6;
} else if(b3 < 32) {
var x7 = new haxe__$Int64__$_$_$Int64(v.high >> b3,v.high << 32 - b3 | v.low >>> b3);
a1 = x7;
} else {
var x8 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b3 - 32);
a1 = x8;
}
var b2;
{
var x9 = new haxe__$Int64__$_$_$Int64(0,3);
b2 = x9;
}
var x5 = new haxe__$Int64__$_$_$Int64(a1.high & b2.high,a1.low & b2.low);
this2 = x5;
sr.q = this2.low;
sr.itype = (function($this) {
var $r;
var this3;
{
var a2;
var b5 = 40;
b5 &= 63;
if(b5 == 0) {
var x11 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a2 = x11;
} else if(b5 < 32) {
var x12 = new haxe__$Int64__$_$_$Int64(v.high >> b5,v.high << 32 - b5 | v.low >>> b5);
a2 = x12;
} else {
var x13 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b5 - 32);
a2 = x13;
}
var b4;
{
var x14 = new haxe__$Int64__$_$_$Int64(0,15);
b4 = x14;
}
var x10 = new haxe__$Int64__$_$_$Int64(a2.high & b4.high,a2.low & b4.low);
this3 = x10;
}
$r = this3.low;
return $r;
}(this));
sr.type = (function($this) {
var $r;
var this4;
{
var a3;
var b7 = 32;
b7 &= 63;
if(b7 == 0) {
var x16 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a3 = x16;
} else if(b7 < 32) {
var x17 = new haxe__$Int64__$_$_$Int64(v.high >> b7,v.high << 32 - b7 | v.low >>> b7);
a3 = x17;
} else {
var x18 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b7 - 32);
a3 = x18;
}
var b6;
{
var x19 = new haxe__$Int64__$_$_$Int64(0,15);
b6 = x19;
}
var x15 = new haxe__$Int64__$_$_$Int64(a3.high & b6.high,a3.low & b6.low);
this4 = x15;
}
$r = this4.low;
return $r;
}(this));
var this5;
var a4;
var b9 = 24;
b9 &= 63;
if(b9 == 0) {
var x21 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a4 = x21;
} else if(b9 < 32) {
var x22 = new haxe__$Int64__$_$_$Int64(v.high >> b9,v.high << 32 - b9 | v.low >>> b9);
a4 = x22;
} else {
var x23 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b9 - 32);
a4 = x23;
}
var b8;
{
var x24 = new haxe__$Int64__$_$_$Int64(0,255);
b8 = x24;
}
var x20 = new haxe__$Int64__$_$_$Int64(a4.high & b8.high,a4.low & b8.low);
this5 = x20;
sr.s = this5.low;
var this6;
var a5;
var b11 = 16;
b11 &= 63;
if(b11 == 0) {
var x26 = new haxe__$Int64__$_$_$Int64(v.high,v.low);
a5 = x26;
} else if(b11 < 32) {
var x27 = new haxe__$Int64__$_$_$Int64(v.high >> b11,v.high << 32 - b11 | v.low >>> b11);
a5 = x27;
} else {
var x28 = new haxe__$Int64__$_$_$Int64(v.high >> 31,v.high >> b11 - 32);
a5 = x28;
}
var b10;
{
var x29 = new haxe__$Int64__$_$_$Int64(0,255);
b10 = x29;
}
var x25 = new haxe__$Int64__$_$_$Int64(a5.high & b10.high,a5.low & b10.low);
this6 = x25;
sr.o = this6.low;
var this7;
var b12;
{
var x31 = new haxe__$Int64__$_$_$Int64(0,65535);
b12 = x31;
}
var x30 = new haxe__$Int64__$_$_$Int64(v.high & b12.high,v.low & b12.low);
this7 = x30;
sr.n = this7.low;
sr.sourceMask = sourceMask;
return sr;
};
openfl__$internal_stage3D__$AGALConverter_SourceRegister.prototype = {
d: null
,itype: null
,n: null
,o: null
,programType: null
,q: null
,s: null
,sourceMask: null
,type: null
,toGLSL: function(emitSwizzle,offset) {
if(offset == null) offset = 0;
if(emitSwizzle == null) emitSwizzle = true;
if(this.type == 3) if(this.programType == openfl__$internal_stage3D__$AGALConverter_ProgramType.VERTEX) return "gl_Position"; else return "gl_FragColor";
var fullxyzw = this.s == 228 && this.sourceMask == 15;
var swizzle = "";
if(this.type != 5 && !fullxyzw) {
var _g = 0;
while(_g < 4) {
var i = _g++;
if((this.sourceMask & 1 << i) != 0) {
var _g1 = this.s >> i * 2 & 3;
switch(_g1) {
case 0:
swizzle += "x";
break;
case 1:
swizzle += "y";
break;
case 2:
swizzle += "z";
break;
case 3:
swizzle += "w";
break;
}
}
}
}
var str = openfl__$internal_stage3D_AGALConverter.prefixFromType(this.type,this.programType);
if(this.d == 0) str += this.n + offset; else {
str += this.o;
var indexComponent = String.fromCharCode(HxOverrides.cca("x",0) + this.q);
var indexRegister = openfl__$internal_stage3D_AGALConverter.prefixFromType(this.itype,this.programType) + this.n + "." + indexComponent;
str += "[ int(" + indexRegister + ") +" + offset + "]";
}
if(emitSwizzle && swizzle != "") str += "." + swizzle;
return str;
}
,__class__: openfl__$internal_stage3D__$AGALConverter_SourceRegister
};
var openfl__$internal_stage3D_Context3DStateCache = function() {
this._registers = openfl__$Vector_Vector_$Impl_$.toFloatVector(null,4096);
this.clearSettings();
};
$hxClasses["openfl._internal.stage3D.Context3DStateCache"] = openfl__$internal_stage3D_Context3DStateCache;
openfl__$internal_stage3D_Context3DStateCache.__name__ = ["openfl","_internal","stage3D","Context3DStateCache"];
openfl__$internal_stage3D_Context3DStateCache.prototype = {
_activeTexture: null
,_activeVertexArray: null
,_cullingMode: null
,_depthTestCompareMode: null
,_depthTestEnabled: null
,_depthTestMask: null
,_destBlendFactor: null
,_program: null
,_registers: null
,_srcBlendFactor: null
,_viewportHeight: null
,_viewportOriginX: null
,_viewportOriginY: null
,_viewportWidth: null
,clearRegisters: function() {
var numFloats = 4096;
var _g = 0;
while(_g < numFloats) {
var c = _g++;
this._registers.set(c,-999999999.0);
}
}
,clearSettings: function() {
this._srcBlendFactor = null;
this._destBlendFactor = null;
this._depthTestEnabled = false;
this._depthTestMask = false;
this._depthTestCompareMode = null;
this._program = null;
this._cullingMode = null;
this._activeTexture = -1;
this._activeVertexArray = -1;
this._viewportOriginX = -1;
this._viewportOriginY = -1;
this._viewportWidth = -1;
this._viewportHeight = -1;
this.clearRegisters();
}
,updateActiveTextureSample: function(texture) {
this._activeTexture = texture;
return true;
}
,updateActiveVertexArray: function(vertexArray) {
this._activeVertexArray = vertexArray;
return true;
}
,updateBlendDestFactor: function(factor) {
this._destBlendFactor = factor;
return true;
}
,updateBlendSrcFactor: function(factor) {
this._srcBlendFactor = factor;
return true;
}
,updateCullingMode: function(cullMode) {
this._cullingMode = cullMode;
return true;
}
,updateDepthCompareMode: function(mode) {
this._depthTestCompareMode = mode;
return true;
}
,updateDepthTestEnabled: function(test) {
this._depthTestEnabled = test;
return true;
}
,updateDepthTestMask: function(mask) {
this._depthTestMask = mask;
return true;
}
,updateProgram3D: function(program3d) {
this._program = program3d;
return true;
}
,updateRegisters: function(mTemp,startRegister,numRegisters) {
return true;
}
,updateViewport: function(originX,originY,width,height) {
this._viewportOriginX = originX;
this._viewportOriginY = originY;
this._viewportWidth = width;
this._viewportHeight = height;
return true;
}
,__class__: openfl__$internal_stage3D_Context3DStateCache
};
var openfl__$internal_stage3D_GLUtils = function() { };
$hxClasses["openfl._internal.stage3D.GLUtils"] = openfl__$internal_stage3D_GLUtils;
openfl__$internal_stage3D_GLUtils.__name__ = ["openfl","_internal","stage3D","GLUtils"];
openfl__$internal_stage3D_GLUtils.CheckGLError = function() {
if(!openfl__$internal_stage3D_GLUtils.debug) return;
var error = lime_graphics_opengl_GL.context.__context.getError();
if(error != 0) {
var errorText;
switch(error) {
case 0:
errorText = "GL_NO_ERROR";
break;
case 1280:
errorText = "GL_INVALID_ENUM";
break;
case 1282:
errorText = "GL_INVALID_OPERATION";
break;
case 1286:
errorText = "GL_INVALID_FRAMEBUFFER_OPERATION";
break;
case 1281:
errorText = "GL_INVALID_VALUE";
break;
case 1285:
errorText = "GL_OUT_OF_MEMORY";
break;
default:
if(error == null) errorText = "null"; else errorText = "" + error;
}
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Error calling openGL api. Error: " + errorText + "\n"));
}
};
var openfl__$internal_stage3D_SamplerState = function(minFilter,magFilter,wrapModeS,wrapModeT,lodBias,maxAniso,ignoreSampler,centroid,mipmapGenerated) {
if(mipmapGenerated == null) mipmapGenerated = false;
if(centroid == null) centroid = false;
if(ignoreSampler == null) ignoreSampler = false;
if(maxAniso == null) maxAniso = 0.0;
if(lodBias == null) lodBias = 0.0;
this.set_minFilter(minFilter);
this.set_magFilter(magFilter);
this.set_wrapModeS(wrapModeS);
this.set_wrapModeT(wrapModeT);
this.set_lodBias(lodBias);
this.set_maxAniso(maxAniso);
this.ignoreSampler = ignoreSampler;
this.centroid = centroid;
this.mipmapGenerated = mipmapGenerated;
this.__samplerDirty = true;
};
$hxClasses["openfl._internal.stage3D.SamplerState"] = openfl__$internal_stage3D_SamplerState;
openfl__$internal_stage3D_SamplerState.__name__ = ["openfl","_internal","stage3D","SamplerState"];
openfl__$internal_stage3D_SamplerState.prototype = {
lodBias: null
,magFilter: null
,maxAniso: null
,minFilter: null
,wrapModeS: null
,wrapModeT: null
,centroid: null
,ignoreSampler: null
,mipmapGenerated: null
,__samplerDirty: null
,copyFrom: function(other) {
if(other == null || other.ignoreSampler) return;
this.set_minFilter(other.minFilter);
this.set_magFilter(other.magFilter);
this.set_wrapModeS(other.wrapModeS);
this.set_wrapModeT(other.wrapModeT);
this.set_lodBias(other.lodBias);
this.set_maxAniso(other.maxAniso);
this.centroid = other.centroid;
this.mipmapGenerated = other.mipmapGenerated;
}
,equals: function(other) {
if(this == other) return !this.__samplerDirty;
if(other == null) return false;
return this.minFilter == other.minFilter && this.magFilter == other.magFilter && this.wrapModeS == other.wrapModeS && this.wrapModeT == other.wrapModeT && this.lodBias == other.lodBias && this.maxAniso == other.maxAniso && this.mipmapGenerated == other.mipmapGenerated;
}
,set_lodBias: function(value) {
if(this.lodBias != value) this.__samplerDirty = true;
return this.lodBias = value;
}
,set_magFilter: function(value) {
if(this.magFilter != value) this.__samplerDirty = true;
return this.magFilter = value;
}
,set_maxAniso: function(value) {
if(this.maxAniso != value) this.__samplerDirty = true;
return this.maxAniso = value;
}
,set_minFilter: function(value) {
if(this.minFilter != value) this.__samplerDirty = true;
return this.minFilter = value;
}
,set_wrapModeS: function(value) {
if(this.wrapModeS != value) this.__samplerDirty = true;
return this.wrapModeS = value;
}
,set_wrapModeT: function(value) {
if(this.wrapModeT != value) this.__samplerDirty = true;
return this.wrapModeT = value;
}
,__class__: openfl__$internal_stage3D_SamplerState
,__properties__: {set_wrapModeT:"set_wrapModeT",set_wrapModeS:"set_wrapModeS",set_minFilter:"set_minFilter",set_maxAniso:"set_maxAniso",set_magFilter:"set_magFilter",set_lodBias:"set_lodBias"}
};
var openfl__$internal_swf_FilterType = $hxClasses["openfl._internal.swf.FilterType"] = { __ename__ : ["openfl","_internal","swf","FilterType"], __constructs__ : ["BlurFilter","ColorMatrixFilter","DropShadowFilter","GlowFilter"] };
openfl__$internal_swf_FilterType.BlurFilter = function(blurX,blurY,quality) { var $x = ["BlurFilter",0,blurX,blurY,quality]; $x.__enum__ = openfl__$internal_swf_FilterType; $x.toString = $estr; return $x; };
openfl__$internal_swf_FilterType.ColorMatrixFilter = function(matrix) { var $x = ["ColorMatrixFilter",1,matrix]; $x.__enum__ = openfl__$internal_swf_FilterType; $x.toString = $estr; return $x; };
openfl__$internal_swf_FilterType.DropShadowFilter = function(distance,angle,color,alpha,blurX,blurY,strength,quality,inner,knockout,hideObject) { var $x = ["DropShadowFilter",2,distance,angle,color,alpha,blurX,blurY,strength,quality,inner,knockout,hideObject]; $x.__enum__ = openfl__$internal_swf_FilterType; $x.toString = $estr; return $x; };
openfl__$internal_swf_FilterType.GlowFilter = function(color,alpha,blurX,blurY,strength,quality,inner,knockout) { var $x = ["GlowFilter",3,color,alpha,blurX,blurY,strength,quality,inner,knockout]; $x.__enum__ = openfl__$internal_swf_FilterType; $x.toString = $estr; return $x; };
var openfl__$internal_swf_SWFLite = function() {
this.symbols = new haxe_ds_IntMap();
};
$hxClasses["openfl._internal.swf.SWFLite"] = openfl__$internal_swf_SWFLite;
openfl__$internal_swf_SWFLite.__name__ = ["openfl","_internal","swf","SWFLite"];
openfl__$internal_swf_SWFLite.resolveClass = function(name) {
var value = Type.resolveClass(name);
if(value == null) value = Type.resolveClass(StringTools.replace(name,"openfl._legacy","openfl"));
if(value == null) value = Type.resolveClass(StringTools.replace(name,"openfl._v2","openfl"));
return value;
};
openfl__$internal_swf_SWFLite.resolveEnum = function(name) {
var value = Type.resolveEnum(name);
if(value == null) value = Type.resolveEnum(StringTools.replace(name,"openfl._legacy","openfl"));
if(value == null) value = Type.resolveEnum(StringTools.replace(name,"openfl._v2","openfl"));
return value;
};
openfl__$internal_swf_SWFLite.unserialize = function(data) {
if(data == null) return null;
var unserializer = new haxe_Unserializer(data);
unserializer.setResolver({ resolveClass : openfl__$internal_swf_SWFLite.resolveClass, resolveEnum : openfl__$internal_swf_SWFLite.resolveEnum});
return unserializer.unserialize();
};
openfl__$internal_swf_SWFLite.prototype = {
frameRate: null
,library: null
,root: null
,symbols: null
,createButton: function(className) {
return null;
}
,createMovieClip: function(className) {
if(className == null) className = "";
if(className == "") return this.root.__createObject(this); else {
var $it0 = this.symbols.iterator();
while( $it0.hasNext() ) {
var symbol = $it0.next();
if(symbol.className == className) {
if(js_Boot.__instanceof(symbol,openfl__$internal_symbols_SpriteSymbol)) return (js_Boot.__cast(symbol , openfl__$internal_symbols_SpriteSymbol)).__createObject(this);
}
}
}
return null;
}
,getBitmapData: function(className) {
var $it0 = this.symbols.iterator();
while( $it0.hasNext() ) {
var symbol = $it0.next();
if(symbol.className == className) {
if(js_Boot.__instanceof(symbol,openfl__$internal_symbols_BitmapSymbol)) {
var bitmap = symbol;
return openfl_utils_Assets.getBitmapData(bitmap.path);
}
}
}
return null;
}
,hasSymbol: function(className) {
var $it0 = this.symbols.iterator();
while( $it0.hasNext() ) {
var symbol = $it0.next();
if(symbol.className == className) return true;
}
return false;
}
,serialize: function() {
var serializer = new haxe_Serializer();
serializer.serialize(this);
return serializer.toString();
}
,__class__: openfl__$internal_swf_SWFLite
};
var openfl_utils_AssetLibrary = function() {
lime_utils_AssetLibrary.call(this);
};
$hxClasses["openfl.utils.AssetLibrary"] = openfl_utils_AssetLibrary;
openfl_utils_AssetLibrary.__name__ = ["openfl","utils","AssetLibrary"];
openfl_utils_AssetLibrary.fromBytes = function(bytes,rootPath) {
return openfl_utils_AssetLibrary.fromManifest(lime_utils_AssetManifest.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes),rootPath));
};
openfl_utils_AssetLibrary.fromFile = function(path,rootPath) {
return openfl_utils_AssetLibrary.fromManifest(lime_utils_AssetManifest.fromFile(path,rootPath));
};
openfl_utils_AssetLibrary.fromManifest = function(manifest) {
var library = lime_utils_AssetLibrary.fromManifest(manifest);
if(library != null && js_Boot.__instanceof(library,openfl_utils_AssetLibrary)) return library; else return null;
};
openfl_utils_AssetLibrary.loadFromBytes = function(bytes,rootPath) {
return lime_utils_AssetManifest.loadFromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes),rootPath).then(function(manifest) {
return openfl_utils_AssetLibrary.loadFromManifest(manifest);
});
};
openfl_utils_AssetLibrary.loadFromFile = function(path,rootPath) {
return lime_utils_AssetManifest.loadFromFile(path,rootPath).then(function(manifest) {
return openfl_utils_AssetLibrary.loadFromManifest(manifest);
});
};
openfl_utils_AssetLibrary.loadFromManifest = function(manifest) {
var library = openfl_utils_AssetLibrary.fromManifest(manifest);
if(library != null && js_Boot.__instanceof(library,openfl_utils_AssetLibrary)) return library.load().then(function(library1) {
return lime_app_Future.withValue(library1);
}); else return lime_app_Future.withError("Could not load asset manifest");
};
openfl_utils_AssetLibrary.__super__ = lime_utils_AssetLibrary;
openfl_utils_AssetLibrary.prototype = $extend(lime_utils_AssetLibrary.prototype,{
getMovieClip: function(id) {
return null;
}
,loadMovieClip: function(id) {
var _g = this;
return new lime_app_Future(function() {
return _g.getMovieClip(id);
});
}
,__class__: openfl_utils_AssetLibrary
});
var openfl__$internal_swf_SWFLiteLibrary = function(id) {
openfl_utils_AssetLibrary.call(this);
this.id = id;
this.alphaCheck = new haxe_ds_StringMap();
this.imageClassNames = new haxe_ds_StringMap();
this.rootPath = "";
};
$hxClasses["openfl._internal.swf.SWFLiteLibrary"] = openfl__$internal_swf_SWFLiteLibrary;
openfl__$internal_swf_SWFLiteLibrary.__name__ = ["openfl","_internal","swf","SWFLiteLibrary"];
openfl__$internal_swf_SWFLiteLibrary.__super__ = openfl_utils_AssetLibrary;
openfl__$internal_swf_SWFLiteLibrary.prototype = $extend(openfl_utils_AssetLibrary.prototype,{
alphaCheck: null
,id: null
,imageClassNames: null
,preloading: null
,rootPath: null
,swf: null
,exists: function(id,type) {
if(this.swf == null) return false;
if(id == "" && type == "MOVIE_CLIP") return true;
if(type == "IMAGE" || type == "MOVIE_CLIP") return this.swf != null && this.swf.hasSymbol(id);
return false;
}
,getImage: function(id) {
if(this.imageClassNames.exists(id)) id = this.imageClassNames.get(id);
if(!this.alphaCheck.exists(id)) {
var $it0 = this.swf.symbols.iterator();
while( $it0.hasNext() ) {
var symbol = $it0.next();
if(js_Boot.__instanceof(symbol,openfl__$internal_symbols_BitmapSymbol) && (js_Boot.__cast(symbol , openfl__$internal_symbols_BitmapSymbol)).path == id) {
var bitmapSymbol = symbol;
if(bitmapSymbol.alpha != null) {
var image = openfl_utils_AssetLibrary.prototype.getImage.call(this,id);
var alpha = openfl_utils_AssetLibrary.prototype.getImage.call(this,bitmapSymbol.alpha);
this.__copyChannel(image,alpha);
this.cachedImages.set(id,image);
this.alphaCheck.set(id,true);
return image;
}
}
}
}
return openfl_utils_AssetLibrary.prototype.getImage.call(this,id);
}
,getMovieClip: function(id) {
if(this.swf != null) return this.swf.createMovieClip(id); else return null;
}
,isLocal: function(id,type) {
return true;
}
,load: function() {
var _g = this;
if(this.id != null) this.preload.set(this.id,true);
var promise = new lime_app_Promise();
this.preloading = true;
var onComplete = function(data) {
_g.cachedText.set(_g.id,data);
_g.swf = openfl__$internal_swf_SWFLite.unserialize(data);
_g.swf.library = _g;
var bitmapSymbol;
var $it0 = _g.swf.symbols.iterator();
while( $it0.hasNext() ) {
var symbol = $it0.next();
if(js_Boot.__instanceof(symbol,openfl__$internal_symbols_BitmapSymbol)) {
bitmapSymbol = symbol;
if(bitmapSymbol.className != null) _g.imageClassNames.set(bitmapSymbol.className,bitmapSymbol.path);
}
}
openfl__$internal_swf_SWFLite.instances.set(_g.id,_g.swf);
_g.__load().onProgress($bind(promise,promise.progress)).onError($bind(promise,promise.error)).onComplete(function(_) {
_g.preloading = false;
promise.complete(_g);
});
};
if(openfl_utils_Assets.exists(this.id)) {
var $it1 = this.paths.keys();
while( $it1.hasNext() ) {
var id = $it1.next();
this.preload.set(id,true);
}
this.loadText(this.id).onError($bind(promise,promise.error)).onComplete(onComplete);
} else {
var $it2 = this.paths.keys();
while( $it2.hasNext() ) {
var id1 = $it2.next();
this.preload.set(id1,true);
}
var path;
if(this.rootPath != null && this.rootPath != "") path = this.rootPath + "/" + this.id; else path = this.id;
var loader = new openfl_net_URLLoader();
loader.addEventListener("complete",function(_1) {
onComplete(loader.data);
});
loader.addEventListener("ioError",function(e) {
promise.error(e);
});
loader.load(new openfl_net_URLRequest(path));
}
return promise.future;
}
,loadImage: function(id) {
var _g = this;
if(this.imageClassNames.exists(id)) id = this.imageClassNames.get(id);
if(!this.preloading && !this.alphaCheck.exists(id)) {
var $it0 = this.swf.symbols.iterator();
while( $it0.hasNext() ) {
var symbol = $it0.next();
if(js_Boot.__instanceof(symbol,openfl__$internal_symbols_BitmapSymbol) && (js_Boot.__cast(symbol , openfl__$internal_symbols_BitmapSymbol)).path == id) {
var bitmapSymbol = [symbol];
if(bitmapSymbol[0].alpha != null) {
var promise = [new lime_app_Promise()];
this.__loadImage(id).onError(($_=promise[0],$bind($_,$_.error))).onComplete((function(promise,bitmapSymbol) {
return function(image) {
_g.__loadImage(bitmapSymbol[0].alpha).onError(($_=promise[0],$bind($_,$_.error))).onComplete((function(promise) {
return function(alpha) {
_g.__copyChannel(image,alpha);
_g.cachedImages.set(id,image);
_g.alphaCheck.set(id,true);
promise[0].complete(image);
};
})(promise));
};
})(promise,bitmapSymbol));
return promise[0].future;
}
}
}
}
return openfl_utils_AssetLibrary.prototype.loadImage.call(this,id);
}
,unload: function() {
var bitmap;
var $it0 = this.swf.symbols.iterator();
while( $it0.hasNext() ) {
var symbol = $it0.next();
if(js_Boot.__instanceof(symbol,openfl__$internal_symbols_BitmapSymbol)) {
bitmap = symbol;
openfl_utils_Assets.cache.removeBitmapData(bitmap.path);
}
}
}
,__copyChannel: function(image,alpha) {
if(alpha != null) image.copyChannel(alpha,alpha.get_rect(),new lime_math_Vector2(),lime_graphics_ImageChannel.RED,lime_graphics_ImageChannel.ALPHA);
image.buffer.premultiplied = true;
image.set_premultiplied(false);
}
,__fromManifest: function(manifest) {
this.rootPath = manifest.rootPath;
openfl_utils_AssetLibrary.prototype.__fromManifest.call(this,manifest);
}
,__load: function() {
return openfl_utils_AssetLibrary.prototype.load.call(this);
}
,__loadImage: function(id) {
return openfl_utils_AssetLibrary.prototype.loadImage.call(this,id);
}
,__class__: openfl__$internal_swf_SWFLiteLibrary
});
var openfl__$internal_swf_ShapeCommand = $hxClasses["openfl._internal.swf.ShapeCommand"] = { __ename__ : ["openfl","_internal","swf","ShapeCommand"], __constructs__ : ["BeginBitmapFill","BeginFill","BeginGradientFill","CurveTo","EndFill","LineStyle","LineTo","MoveTo"] };
openfl__$internal_swf_ShapeCommand.BeginBitmapFill = function(bitmap,matrix,repeat,smooth) { var $x = ["BeginBitmapFill",0,bitmap,matrix,repeat,smooth]; $x.__enum__ = openfl__$internal_swf_ShapeCommand; $x.toString = $estr; return $x; };
openfl__$internal_swf_ShapeCommand.BeginFill = function(color,alpha) { var $x = ["BeginFill",1,color,alpha]; $x.__enum__ = openfl__$internal_swf_ShapeCommand; $x.toString = $estr; return $x; };
openfl__$internal_swf_ShapeCommand.BeginGradientFill = function(fillType,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) { var $x = ["BeginGradientFill",2,fillType,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio]; $x.__enum__ = openfl__$internal_swf_ShapeCommand; $x.toString = $estr; return $x; };
openfl__$internal_swf_ShapeCommand.CurveTo = function(controlX,controlY,anchorX,anchorY) { var $x = ["CurveTo",3,controlX,controlY,anchorX,anchorY]; $x.__enum__ = openfl__$internal_swf_ShapeCommand; $x.toString = $estr; return $x; };
openfl__$internal_swf_ShapeCommand.EndFill = ["EndFill",4];
openfl__$internal_swf_ShapeCommand.EndFill.toString = $estr;
openfl__$internal_swf_ShapeCommand.EndFill.__enum__ = openfl__$internal_swf_ShapeCommand;
openfl__$internal_swf_ShapeCommand.LineStyle = function(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit) { var $x = ["LineStyle",5,thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit]; $x.__enum__ = openfl__$internal_swf_ShapeCommand; $x.toString = $estr; return $x; };
openfl__$internal_swf_ShapeCommand.LineTo = function(x,y) { var $x = ["LineTo",6,x,y]; $x.__enum__ = openfl__$internal_swf_ShapeCommand; $x.toString = $estr; return $x; };
openfl__$internal_swf_ShapeCommand.MoveTo = function(x,y) { var $x = ["MoveTo",7,x,y]; $x.__enum__ = openfl__$internal_swf_ShapeCommand; $x.toString = $estr; return $x; };
var openfl__$internal_symbols_SWFSymbol = function() {
};
$hxClasses["openfl._internal.symbols.SWFSymbol"] = openfl__$internal_symbols_SWFSymbol;
openfl__$internal_symbols_SWFSymbol.__name__ = ["openfl","_internal","symbols","SWFSymbol"];
openfl__$internal_symbols_SWFSymbol.prototype = {
className: null
,id: null
,__createObject: function(swf) {
return null;
}
,__class__: openfl__$internal_symbols_SWFSymbol
};
var openfl__$internal_symbols_BitmapSymbol = function() {
openfl__$internal_symbols_SWFSymbol.call(this);
};
$hxClasses["openfl._internal.symbols.BitmapSymbol"] = openfl__$internal_symbols_BitmapSymbol;
openfl__$internal_symbols_BitmapSymbol.__name__ = ["openfl","_internal","symbols","BitmapSymbol"];
openfl__$internal_symbols_BitmapSymbol.__super__ = openfl__$internal_symbols_SWFSymbol;
openfl__$internal_symbols_BitmapSymbol.prototype = $extend(openfl__$internal_symbols_SWFSymbol.prototype,{
alpha: null
,path: null
,smooth: null
,__createObject: function(swf) {
return new openfl_display_Bitmap(openfl_display_BitmapData.fromImage(swf.library.getImage(this.path)),1,this.smooth != false);
}
,__class__: openfl__$internal_symbols_BitmapSymbol
});
var openfl__$internal_symbols_ButtonSymbol = function() {
openfl__$internal_symbols_SWFSymbol.call(this);
};
$hxClasses["openfl._internal.symbols.ButtonSymbol"] = openfl__$internal_symbols_ButtonSymbol;
openfl__$internal_symbols_ButtonSymbol.__name__ = ["openfl","_internal","symbols","ButtonSymbol"];
openfl__$internal_symbols_ButtonSymbol.__super__ = openfl__$internal_symbols_SWFSymbol;
openfl__$internal_symbols_ButtonSymbol.prototype = $extend(openfl__$internal_symbols_SWFSymbol.prototype,{
downState: null
,hitState: null
,overState: null
,upState: null
,__createObject: function(swf) {
var simpleButton = null;
openfl_display_SimpleButton.__initSWF = swf;
openfl_display_SimpleButton.__initSymbol = this;
if(this.className != null) {
var symbolType = Type.resolveClass(this.className);
if(symbolType != null) simpleButton = Type.createInstance(symbolType,[]); else {
}
}
if(simpleButton == null) simpleButton = new openfl_display_SimpleButton();
return simpleButton;
}
,__class__: openfl__$internal_symbols_ButtonSymbol
});
var openfl__$internal_symbols_DynamicTextSymbol = function() {
openfl__$internal_symbols_SWFSymbol.call(this);
};
$hxClasses["openfl._internal.symbols.DynamicTextSymbol"] = openfl__$internal_symbols_DynamicTextSymbol;
openfl__$internal_symbols_DynamicTextSymbol.__name__ = ["openfl","_internal","symbols","DynamicTextSymbol"];
openfl__$internal_symbols_DynamicTextSymbol.__super__ = openfl__$internal_symbols_SWFSymbol;
openfl__$internal_symbols_DynamicTextSymbol.prototype = $extend(openfl__$internal_symbols_SWFSymbol.prototype,{
align: null
,border: null
,color: null
,fontHeight: null
,fontID: null
,fontName: null
,height: null
,html: null
,indent: null
,input: null
,leading: null
,leftMargin: null
,multiline: null
,password: null
,rightMargin: null
,selectable: null
,text: null
,width: null
,wordWrap: null
,x: null
,y: null
,__createObject: function(swf) {
var textField = new openfl_text_TextField();
textField.__fromSymbol(swf,this);
return textField;
}
,__class__: openfl__$internal_symbols_DynamicTextSymbol
});
var openfl__$internal_symbols_FontSymbol = function() {
openfl__$internal_symbols_SWFSymbol.call(this);
};
$hxClasses["openfl._internal.symbols.FontSymbol"] = openfl__$internal_symbols_FontSymbol;
openfl__$internal_symbols_FontSymbol.__name__ = ["openfl","_internal","symbols","FontSymbol"];
openfl__$internal_symbols_FontSymbol.__super__ = openfl__$internal_symbols_SWFSymbol;
openfl__$internal_symbols_FontSymbol.prototype = $extend(openfl__$internal_symbols_SWFSymbol.prototype,{
advances: null
,bold: null
,codes: null
,glyphs: null
,italic: null
,leading: null
,name: null
,__class__: openfl__$internal_symbols_FontSymbol
});
var openfl__$internal_symbols_ShapeSymbol = function() {
openfl__$internal_symbols_SWFSymbol.call(this);
};
$hxClasses["openfl._internal.symbols.ShapeSymbol"] = openfl__$internal_symbols_ShapeSymbol;
openfl__$internal_symbols_ShapeSymbol.__name__ = ["openfl","_internal","symbols","ShapeSymbol"];
openfl__$internal_symbols_ShapeSymbol.__super__ = openfl__$internal_symbols_SWFSymbol;
openfl__$internal_symbols_ShapeSymbol.prototype = $extend(openfl__$internal_symbols_SWFSymbol.prototype,{
commands: null
,rendered: null
,__createObject: function(swf) {
var shape = new openfl_display_Shape();
var graphics = shape.get_graphics();
if(this.rendered != null) {
graphics.copyFrom(this.rendered.get_graphics());
return shape;
}
var _g = 0;
var _g1 = this.commands;
while(_g < _g1.length) {
var command = _g1[_g];
++_g;
switch(command[1]) {
case 1:
var alpha = command[3];
var color = command[2];
graphics.beginFill(color,alpha);
break;
case 0:
var smooth = command[5];
var repeat = command[4];
var matrix = command[3];
var bitmapID = command[2];
var bitmapSymbol = swf.symbols.h[bitmapID];
var bitmap = swf.library.getImage(bitmapSymbol.path);
if(bitmap != null) graphics.beginBitmapFill(openfl_display_BitmapData.fromImage(bitmap),matrix,repeat,smooth);
break;
case 2:
var focalPointRatio = command[9];
var interpolationMethod = command[8];
var spreadMethod = command[7];
var matrix1 = command[6];
var ratios = command[5];
var alphas = command[4];
var colors = command[3];
var fillType = command[2];
graphics.beginGradientFill(fillType,colors,alphas,ratios,matrix1,spreadMethod,interpolationMethod,focalPointRatio);
break;
case 3:
var anchorY = command[5];
var anchorX = command[4];
var controlY = command[3];
var controlX = command[2];
graphics.curveTo(controlX,controlY,anchorX,anchorY);
break;
case 4:
graphics.endFill();
break;
case 5:
var miterLimit = command[9];
var joints = command[8];
var caps = command[7];
var scaleMode = command[6];
var pixelHinting = command[5];
var alpha1 = command[4];
var color1 = command[3];
var thickness = command[2];
if(thickness != null) graphics.lineStyle(thickness,color1,alpha1,pixelHinting,scaleMode,caps,joints,miterLimit); else graphics.lineStyle();
break;
case 6:
var y = command[3];
var x = command[2];
graphics.lineTo(x,y);
break;
case 7:
var y1 = command[3];
var x1 = command[2];
graphics.moveTo(x1,y1);
break;
}
}
this.commands = null;
this.rendered = new openfl_display_Shape();
this.rendered.get_graphics().copyFrom(shape.get_graphics());
return shape;
}
,__class__: openfl__$internal_symbols_ShapeSymbol
});
var openfl__$internal_symbols_SpriteSymbol = function() {
openfl__$internal_symbols_SWFSymbol.call(this);
this.frames = [];
};
$hxClasses["openfl._internal.symbols.SpriteSymbol"] = openfl__$internal_symbols_SpriteSymbol;
openfl__$internal_symbols_SpriteSymbol.__name__ = ["openfl","_internal","symbols","SpriteSymbol"];
openfl__$internal_symbols_SpriteSymbol.__super__ = openfl__$internal_symbols_SWFSymbol;
openfl__$internal_symbols_SpriteSymbol.prototype = $extend(openfl__$internal_symbols_SWFSymbol.prototype,{
frames: null
,__createObject: function(swf) {
var movieClip = null;
openfl_display_MovieClip.__initSWF = swf;
openfl_display_MovieClip.__initSymbol = this;
if(this.className != null) {
var symbolType = Type.resolveClass(this.className);
if(symbolType != null) movieClip = Type.createInstance(symbolType,[]); else {
}
}
if(movieClip == null) movieClip = new openfl_display_MovieClip();
return movieClip;
}
,__class__: openfl__$internal_symbols_SpriteSymbol
});
var openfl__$internal_symbols_StaticTextSymbol = function() {
openfl__$internal_symbols_SWFSymbol.call(this);
};
$hxClasses["openfl._internal.symbols.StaticTextSymbol"] = openfl__$internal_symbols_StaticTextSymbol;
openfl__$internal_symbols_StaticTextSymbol.__name__ = ["openfl","_internal","symbols","StaticTextSymbol"];
openfl__$internal_symbols_StaticTextSymbol.__super__ = openfl__$internal_symbols_SWFSymbol;
openfl__$internal_symbols_StaticTextSymbol.prototype = $extend(openfl__$internal_symbols_SWFSymbol.prototype,{
matrix: null
,records: null
,rendered: null
,__createObject: function(swf) {
var staticText = new openfl_text_StaticText();
var graphics = staticText.__graphics;
if(this.rendered != null) {
staticText.text = this.rendered.text;
graphics.copyFrom(this.rendered.__graphics);
return staticText;
}
var text = "";
if(this.records != null) {
var font = null;
var color = 16777215;
var offsetX = this.matrix.tx;
var offsetY = this.matrix.ty;
var scale;
var index;
var code;
var _g = 0;
var _g1 = this.records;
while(_g < _g1.length) {
var record = _g1[_g];
++_g;
if(record.fontID != null) font = swf.symbols.h[record.fontID];
if(record.offsetX != null) offsetX = this.matrix.tx + record.offsetX * 0.05;
if(record.offsetY != null) offsetY = this.matrix.ty + record.offsetY * 0.05;
if(record.color != null) color = record.color;
if(font != null) {
scale = record.fontHeight / 1024 * 0.05;
var _g3 = 0;
var _g2 = record.glyphs.length;
while(_g3 < _g2) {
var i = _g3++;
index = record.glyphs[i];
text += String.fromCharCode(font.codes[index]);
var _g4 = 0;
var _g5 = font.glyphs[index];
while(_g4 < _g5.length) {
var command = _g5[_g4];
++_g4;
switch(command[1]) {
case 1:
var alpha = command[3];
graphics.beginFill(color & 16777215,(color >> 24 & 255) / 255);
break;
case 3:
var anchorY = command[5];
var anchorX = command[4];
var controlY = command[3];
var controlX = command[2];
graphics.curveTo(controlX * scale + offsetX,controlY * scale + offsetY,anchorX * scale + offsetX,anchorY * scale + offsetY);
break;
case 4:
graphics.endFill();
break;
case 5:
var miterLimit = command[9];
var joints = command[8];
var caps = command[7];
var scaleMode = command[6];
var pixelHinting = command[5];
var alpha1 = command[4];
var color1 = command[3];
var thickness = command[2];
if(thickness != null) graphics.lineStyle(thickness,color1,alpha1,pixelHinting,scaleMode,caps,joints,miterLimit); else graphics.lineStyle();
break;
case 6:
var y = command[3];
var x = command[2];
graphics.lineTo(x * scale + offsetX,y * scale + offsetY);
break;
case 7:
var y1 = command[3];
var x1 = command[2];
graphics.moveTo(x1 * scale + offsetX,y1 * scale + offsetY);
break;
default:
}
}
offsetX += record.advances[i] * 0.05;
}
}
}
}
staticText.text = text;
this.records = null;
this.rendered = new openfl_text_StaticText();
this.rendered.text = text;
this.rendered.__graphics.copyFrom(staticText.__graphics);
return staticText;
}
,__class__: openfl__$internal_symbols_StaticTextSymbol
});
var openfl__$internal_symbols_StaticTextRecord = function() {
};
$hxClasses["openfl._internal.symbols.StaticTextRecord"] = openfl__$internal_symbols_StaticTextRecord;
openfl__$internal_symbols_StaticTextRecord.__name__ = ["openfl","_internal","symbols","StaticTextRecord"];
openfl__$internal_symbols_StaticTextRecord.prototype = {
advances: null
,color: null
,fontHeight: null
,fontID: null
,glyphs: null
,offsetX: null
,offsetY: null
,__class__: openfl__$internal_symbols_StaticTextRecord
};
var openfl__$internal_text_TextFormatRange = function(format,start,end) {
this.format = format;
this.start = start;
this.end = end;
};
$hxClasses["openfl._internal.text.TextFormatRange"] = openfl__$internal_text_TextFormatRange;
openfl__$internal_text_TextFormatRange.__name__ = ["openfl","_internal","text","TextFormatRange"];
openfl__$internal_text_TextFormatRange.prototype = {
end: null
,format: null
,start: null
,__class__: openfl__$internal_text_TextFormatRange
};
var openfl__$internal_text_TextLayoutGroup = function(format,startIndex,endIndex) {
this.format = format;
this.startIndex = startIndex;
this.endIndex = endIndex;
};
$hxClasses["openfl._internal.text.TextLayoutGroup"] = openfl__$internal_text_TextLayoutGroup;
openfl__$internal_text_TextLayoutGroup.__name__ = ["openfl","_internal","text","TextLayoutGroup"];
openfl__$internal_text_TextLayoutGroup.prototype = {
advances: null
,ascent: null
,descent: null
,endIndex: null
,format: null
,height: null
,leading: null
,lineIndex: null
,offsetX: null
,offsetY: null
,startIndex: null
,width: null
,__class__: openfl__$internal_text_TextLayoutGroup
};
var openfl__$internal_timeline_Frame = function() {
this.objects = [];
};
$hxClasses["openfl._internal.timeline.Frame"] = openfl__$internal_timeline_Frame;
openfl__$internal_timeline_Frame.__name__ = ["openfl","_internal","timeline","Frame"];
openfl__$internal_timeline_Frame.prototype = {
label: null
,objects: null
,__class__: openfl__$internal_timeline_Frame
};
var openfl__$internal_timeline_FrameObject = function() {
};
$hxClasses["openfl._internal.timeline.FrameObject"] = openfl__$internal_timeline_FrameObject;
openfl__$internal_timeline_FrameObject.__name__ = ["openfl","_internal","timeline","FrameObject"];
openfl__$internal_timeline_FrameObject.prototype = {
clipDepth: null
,colorTransform: null
,depth: null
,filters: null
,id: null
,matrix: null
,name: null
,symbol: null
,type: null
,visible: null
,__class__: openfl__$internal_timeline_FrameObject
};
var openfl__$internal_timeline_FrameObjectType = $hxClasses["openfl._internal.timeline.FrameObjectType"] = { __ename__ : ["openfl","_internal","timeline","FrameObjectType"], __constructs__ : ["CREATE","UPDATE","DESTROY"] };
openfl__$internal_timeline_FrameObjectType.CREATE = ["CREATE",0];
openfl__$internal_timeline_FrameObjectType.CREATE.toString = $estr;
openfl__$internal_timeline_FrameObjectType.CREATE.__enum__ = openfl__$internal_timeline_FrameObjectType;
openfl__$internal_timeline_FrameObjectType.UPDATE = ["UPDATE",1];
openfl__$internal_timeline_FrameObjectType.UPDATE.toString = $estr;
openfl__$internal_timeline_FrameObjectType.UPDATE.__enum__ = openfl__$internal_timeline_FrameObjectType;
openfl__$internal_timeline_FrameObjectType.DESTROY = ["DESTROY",2];
openfl__$internal_timeline_FrameObjectType.DESTROY.toString = $estr;
openfl__$internal_timeline_FrameObjectType.DESTROY.__enum__ = openfl__$internal_timeline_FrameObjectType;
var openfl__$internal_utils_NullUtils = function() { };
$hxClasses["openfl._internal.utils.NullUtils"] = openfl__$internal_utils_NullUtils;
openfl__$internal_utils_NullUtils.__name__ = ["openfl","_internal","utils","NullUtils"];
var openfl__$internal_utils_PerlinNoise = function(seed,octaves,falloff) {
if(seed == null) seed = 123;
if(falloff == null) falloff = .5;
if(octaves == null) this.octaves = 4; else this.octaves = octaves;
this.baseFactor = 0.015625;
this.seedOffset(seed);
this.octFreqPers(falloff);
};
$hxClasses["openfl._internal.utils.PerlinNoise"] = openfl__$internal_utils_PerlinNoise;
openfl__$internal_utils_PerlinNoise.__name__ = ["openfl","_internal","utils","PerlinNoise"];
openfl__$internal_utils_PerlinNoise.prototype = {
octaves: null
,aOctFreq: null
,aOctPers: null
,fPersMax: null
,iXoffset: null
,iYoffset: null
,iZoffset: null
,baseFactor: null
,fill: function(bitmap,_x,_y,_z,_) {
var baseX;
baseX = _x * this.baseFactor + this.iXoffset;
_y = _y * this.baseFactor + this.iYoffset;
_z = _z * this.baseFactor + this.iZoffset;
var width = bitmap.width;
var height = bitmap.height;
var p = openfl__$internal_utils_PerlinNoise.P;
var octaves = this.octaves;
var aOctFreq = this.aOctFreq;
var aOctPers = this.aOctPers;
var _g = 0;
while(_g < height) {
var py = _g++;
_x = baseX;
var _g1 = 0;
while(_g1 < width) {
var px = _g1++;
var s = 0.;
var _g2 = 0;
while(_g2 < octaves) {
var i = _g2++;
var fFreq = aOctFreq[i];
var fPers = aOctPers[i];
var x = _x * fFreq;
var y = _y * fFreq;
var z = _z * fFreq;
var xf = x - x % 1;
var yf = y - y % 1;
var zf = z - z % 1;
var X = (xf | 0) & 255;
var Y = (yf | 0) & 255;
var Z = (zf | 0) & 255;
x -= xf;
y -= yf;
z -= zf;
var u = x * x * x * (x * (x * 6 - 15) + 10);
var v = y * y * y * (y * (y * 6 - 15) + 10);
var w = z * z * z * (z * (z * 6 - 15) + 10);
var A = p[X] + Y;
var AA = p[A] + Z;
var AB = p[A + 1] + Z;
var B = p[X + 1] + Y;
var BA = p[B] + Z;
var BB = p[B + 1] + Z;
var x1 = x - 1;
var y1 = y - 1;
var z1 = z - 1;
var hash = p[BB + 1] & 15;
var g1;
g1 = ((hash & 1) == 0?hash < 8?x1:y1:hash < 8?-x1:-y1) + ((hash & 2) == 0?hash < 4?y1:hash == 12?x1:z1:hash < 4?-y1:hash == 14?-x1:-z1);
hash = p[AB + 1] & 15;
var g2;
g2 = ((hash & 1) == 0?hash < 8?x:y1:hash < 8?-x:-y1) + ((hash & 2) == 0?hash < 4?y1:hash == 12?x:z1:hash < 4?-y1:hash == 14?-x:-z1);
hash = p[BA + 1] & 15;
var g3;
g3 = ((hash & 1) == 0?hash < 8?x1:y:hash < 8?-x1:-y) + ((hash & 2) == 0?hash < 4?y:hash == 12?x1:z1:hash < 4?-y:hash == 14?-x1:-z1);
hash = p[AA + 1] & 15;
var g4;
g4 = ((hash & 1) == 0?hash < 8?x:y:hash < 8?-x:-y) + ((hash & 2) == 0?hash < 4?y:hash == 12?x:z1:hash < 4?-y:hash == 14?-x:-z1);
hash = p[BB] & 15;
var g5;
g5 = ((hash & 1) == 0?hash < 8?x1:y1:hash < 8?-x1:-y1) + ((hash & 2) == 0?hash < 4?y1:hash == 12?x1:z:hash < 4?-y1:hash == 14?-x1:-z);
hash = p[AB] & 15;
var g6;
g6 = ((hash & 1) == 0?hash < 8?x:y1:hash < 8?-x:-y1) + ((hash & 2) == 0?hash < 4?y1:hash == 12?x:z:hash < 4?-y1:hash == 14?-x:-z);
hash = p[BA] & 15;
var g7;
g7 = ((hash & 1) == 0?hash < 8?x1:y:hash < 8?-x1:-y) + ((hash & 2) == 0?hash < 4?y:hash == 12?x1:z:hash < 4?-y:hash == 14?-x1:-z);
hash = p[AA] & 15;
var g8;
g8 = ((hash & 1) == 0?hash < 8?x:y:hash < 8?-x:-y) + ((hash & 2) == 0?hash < 4?y:hash == 12?x:z:hash < 4?-y:hash == 14?-x:-z);
g2 += u * (g1 - g2);
g4 += u * (g3 - g4);
g6 += u * (g5 - g6);
g8 += u * (g7 - g8);
g4 += v * (g2 - g4);
g8 += v * (g6 - g8);
s += (g8 + w * (g4 - g8)) * fPers;
}
var color = (s * this.fPersMax + 1) * 128 | 0;
bitmap.setPixel32(px,py,-16777216 | color << 16 | color << 8 | color);
_x += this.baseFactor;
}
_y += this.baseFactor;
}
}
,octFreqPers: function(fPersistence) {
var fFreq;
var fPers;
this.aOctFreq = [];
this.aOctPers = [];
this.fPersMax = 0;
var _g1 = 0;
var _g = this.octaves;
while(_g1 < _g) {
var i = _g1++;
fFreq = Math.pow(2,i);
fPers = Math.pow(fPersistence,i);
this.fPersMax += fPers;
this.aOctFreq.push(fFreq);
this.aOctPers.push(fPers);
}
this.fPersMax = 1 / this.fPersMax;
}
,seedOffset: function(iSeed) {
this.iXoffset = iSeed = iSeed * 16807. % 2147483647 | 0;
this.iYoffset = iSeed = iSeed * 16807. % 2147483647 | 0;
this.iZoffset = iSeed = iSeed * 16807. % 2147483647 | 0;
}
,__class__: openfl__$internal_utils_PerlinNoise
};
var openfl_display_Application = function() {
lime_app_Application.call(this);
if(openfl_Lib.application == null) openfl_Lib.application = this;
};
$hxClasses["openfl.display.Application"] = openfl_display_Application;
openfl_display_Application.__name__ = ["openfl","display","Application"];
openfl_display_Application.__super__ = lime_app_Application;
openfl_display_Application.prototype = $extend(lime_app_Application.prototype,{
create: function(config) {
this.config = config;
this.backend.create(config);
openfl_Lib.current.__loaderInfo = openfl_display_LoaderInfo.create(null);
openfl_Lib.current.__loaderInfo.content = openfl_Lib.current;
if(config != null) {
if(Object.prototype.hasOwnProperty.call(config,"fps")) this.backend.setFrameRate(config.fps);
if(Object.prototype.hasOwnProperty.call(config,"windows")) {
var _g = 0;
var _g1 = config.windows;
while(_g < _g1.length) {
var windowConfig = _g1[_g];
++_g;
var $window = new openfl_display_Window(windowConfig);
this.createWindow($window);
break;
}
}
if(this.__preloader == null || this.__preloader.complete) this.onPreloadComplete();
}
}
,__class__: openfl_display_Application
});
var openfl_display_BitmapData = function(width,height,transparent,fillColor) {
if(fillColor == null) fillColor = -1;
if(transparent == null) transparent = true;
this.transparent = transparent;
if(width == null) width = 0; else width = width;
if(height == null) height = 0; else height = height;
if(width < 0) width = 0; else width = width;
if(height < 0) height = 0; else height = height;
this.width = width;
this.height = height;
this.rect = new openfl_geom_Rectangle(0,0,width,height);
if(width > 0 && height > 0) {
if(transparent) {
if((fillColor & -16777216) == 0) fillColor = 0;
} else fillColor = -16777216 | fillColor & 16777215;
fillColor = fillColor << 8 | fillColor >> 24 & 255;
this.image = new lime_graphics_Image(null,0,0,width,height,fillColor);
this.image.set_transparent(transparent);
this.__isValid = true;
this.readable = true;
}
this.__worldTransform = new openfl_geom_Matrix();
this.__worldColorTransform = new openfl_geom_ColorTransform();
};
$hxClasses["openfl.display.BitmapData"] = openfl_display_BitmapData;
openfl_display_BitmapData.__name__ = ["openfl","display","BitmapData"];
openfl_display_BitmapData.__interfaces__ = [openfl_display_IBitmapDrawable];
openfl_display_BitmapData.fromBase64 = function(base64,type) {
var bitmapData = new openfl_display_BitmapData(0,0,true,0);
bitmapData.__fromBase64(base64,type);
return bitmapData;
};
openfl_display_BitmapData.fromBytes = function(bytes,rawAlpha) {
var bitmapData = new openfl_display_BitmapData(0,0,true,0);
bitmapData.__fromBytes(bytes,rawAlpha);
return bitmapData;
};
openfl_display_BitmapData.fromCanvas = function(canvas,transparent) {
if(transparent == null) transparent = true;
if(canvas == null) return null;
var bitmapData = new openfl_display_BitmapData(0,0,transparent,0);
bitmapData.__fromImage(lime_graphics_Image.fromCanvas(canvas));
bitmapData.image.set_transparent(transparent);
return bitmapData;
};
openfl_display_BitmapData.fromFile = function(path) {
var bitmapData = new openfl_display_BitmapData(0,0,true,0);
bitmapData.__fromFile(path);
return bitmapData;
};
openfl_display_BitmapData.fromImage = function(image,transparent) {
if(transparent == null) transparent = true;
if(image == null || image.buffer == null) return null;
var bitmapData = new openfl_display_BitmapData(0,0,transparent,0);
bitmapData.__fromImage(image);
bitmapData.image.set_transparent(transparent);
return bitmapData;
};
openfl_display_BitmapData.fromTexture = function(texture) {
if(texture == null) return null;
var bitmapData = new openfl_display_BitmapData(texture.__width,texture.__height,true,0);
bitmapData.readable = false;
bitmapData.__texture = texture.__textureID;
bitmapData.__textureContext = texture.__textureContext;
bitmapData.image = null;
return bitmapData;
};
openfl_display_BitmapData.loadFromBase64 = function(base64,type) {
return lime_graphics_Image.loadFromBase64(base64,type).then(function(image) {
return lime_app_Future.withValue(openfl_display_BitmapData.fromImage(image));
});
};
openfl_display_BitmapData.loadFromBytes = function(bytes,rawAlpha) {
return lime_graphics_Image.loadFromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes)).then(function(image) {
var bitmapData = openfl_display_BitmapData.fromImage(image);
if(rawAlpha != null) bitmapData.__applyAlpha(rawAlpha);
return lime_app_Future.withValue(bitmapData);
});
};
openfl_display_BitmapData.loadFromFile = function(path) {
return lime_graphics_Image.loadFromFile(path).then(function(image) {
return lime_app_Future.withValue(openfl_display_BitmapData.fromImage(image));
});
};
openfl_display_BitmapData.prototype = {
height: null
,image: null
,readable: null
,rect: null
,transparent: null
,width: null
,__blendMode: null
,__buffer: null
,__bufferContext: null
,__bufferAlpha: null
,__bufferData: null
,__framebuffer: null
,__framebufferContext: null
,__isValid: null
,__surface: null
,__texture: null
,__textureContext: null
,__textureVersion: null
,__transform: null
,__worldColorTransform: null
,__worldTransform: null
,applyFilter: function(sourceBitmapData,sourceRect,destPoint,filter) {
if(!this.readable || sourceBitmapData == null || !sourceBitmapData.readable) return;
filter.__applyFilter(sourceBitmapData,this,sourceRect,destPoint);
}
,clone: function() {
if(!this.__isValid) return new openfl_display_BitmapData(this.width,this.height,this.transparent,0); else if(!this.readable && this.image == null) {
var bitmapData = new openfl_display_BitmapData(0,0,this.transparent,0);
bitmapData.width = this.width;
bitmapData.height = this.height;
bitmapData.rect.copyFrom(this.rect);
bitmapData.__framebuffer = this.__framebuffer;
bitmapData.__framebufferContext = this.__framebufferContext;
bitmapData.__texture = this.__texture;
bitmapData.__textureContext = this.__textureContext;
bitmapData.__isValid = true;
return bitmapData;
} else return openfl_display_BitmapData.fromImage(this.image.clone(),this.transparent);
}
,colorTransform: function(rect,colorTransform) {
if(!this.readable) return;
this.image.colorTransform(rect.__toLimeRectangle(),colorTransform.__toLimeColorMatrix());
}
,compare: function(otherBitmapData) {
if(otherBitmapData == this) return 0; else if(otherBitmapData == null) return -1; else if(this.readable == false || otherBitmapData.readable == false) return -2; else if(this.width != otherBitmapData.width) return -3; else if(this.height != otherBitmapData.height) return -4;
if(this.image != null && otherBitmapData.image != null && this.image.get_format() == otherBitmapData.image.get_format()) {
var bytes = this.image.get_data();
var otherBytes = otherBitmapData.image.get_data();
var equal = true;
var _g1 = 0;
var _g = bytes.length;
while(_g1 < _g) {
var i = _g1++;
if(bytes[i] != otherBytes[i]) {
equal = false;
break;
}
}
if(equal) return 0;
}
var bitmapData = null;
var foundDifference;
var pixel;
var otherPixel;
var comparePixel;
var r;
var g;
var b;
var a;
var _g11 = 0;
var _g2 = this.height;
while(_g11 < _g2) {
var y = _g11++;
var _g3 = 0;
var _g21 = this.width;
while(_g3 < _g21) {
var x = _g3++;
foundDifference = false;
pixel = this.getPixel32(x,y);
otherPixel = otherBitmapData.getPixel32(x,y);
comparePixel = 0;
if(pixel != otherPixel) {
r = (pixel >> 16 & 255) - (otherPixel >> 16 & 255);
g = (pixel >> 8 & 255) - (otherPixel >> 8 & 255);
b = (pixel & 255) - (otherPixel & 255);
if(r < 0) r *= -1;
if(g < 0) g *= -1;
if(b < 0) b *= -1;
if(r == 0 && g == 0 && b == 0) {
a = (pixel >> 24 & 255) - (otherPixel >> 24 & 255);
if(a != 0) {
comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | 16711680 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
255;
comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | 65280 | comparePixel & 255 & 255;
255;
comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | 255;
255;
comparePixel = (a & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
a;
foundDifference = true;
}
} else {
comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (r & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
r;
comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (g & 255) << 8 | comparePixel & 255 & 255;
g;
comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | b & 255;
b;
comparePixel = -16777216 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
255;
foundDifference = true;
}
}
if(foundDifference) {
if(bitmapData == null) bitmapData = new openfl_display_BitmapData(this.width,this.height,this.transparent || otherBitmapData.transparent,0);
bitmapData.setPixel32(x,y,comparePixel);
}
}
}
if(bitmapData == null) return 0;
return bitmapData;
}
,copyChannel: function(sourceBitmapData,sourceRect,destPoint,sourceChannel,destChannel) {
if(!this.readable) return;
var sourceChannel1;
switch(sourceChannel) {
case 1:
sourceChannel1 = lime_graphics_ImageChannel.RED;
break;
case 2:
sourceChannel1 = lime_graphics_ImageChannel.GREEN;
break;
case 4:
sourceChannel1 = lime_graphics_ImageChannel.BLUE;
break;
case 8:
sourceChannel1 = lime_graphics_ImageChannel.ALPHA;
break;
default:
return;
}
var destChannel1;
switch(destChannel) {
case 1:
destChannel1 = lime_graphics_ImageChannel.RED;
break;
case 2:
destChannel1 = lime_graphics_ImageChannel.GREEN;
break;
case 4:
destChannel1 = lime_graphics_ImageChannel.BLUE;
break;
case 8:
destChannel1 = lime_graphics_ImageChannel.ALPHA;
break;
default:
return;
}
this.image.copyChannel(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),sourceChannel1,destChannel1);
}
,copyPixels: function(sourceBitmapData,sourceRect,destPoint,alphaBitmapData,alphaPoint,mergeAlpha) {
if(mergeAlpha == null) mergeAlpha = false;
if(!this.readable || sourceBitmapData == null) return;
this.image.copyPixels(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),alphaBitmapData != null?alphaBitmapData.image:null,alphaPoint != null?alphaPoint.__toLimeVector2():null,mergeAlpha);
}
,dispose: function() {
this.image = null;
this.width = 0;
this.height = 0;
this.rect = null;
this.__isValid = false;
this.readable = false;
this.__surface = null;
this.__buffer = null;
this.__framebuffer = null;
this.__framebufferContext = null;
this.__texture = null;
this.__textureContext = null;
}
,disposeImage: function() {
this.readable = false;
}
,draw: function(source,matrix,colorTransform,blendMode,clipRect,smoothing) {
if(smoothing == null) smoothing = false;
if(matrix == null) {
matrix = new openfl_geom_Matrix();
if(source.__transform != null) {
matrix.copyFrom(source.__transform);
matrix.tx = 0;
matrix.ty = 0;
}
}
if(!this.readable) {
if(lime_graphics_opengl_GL.context != null) {
var gl = lime_graphics_opengl_GL.context;
gl.bindFramebuffer(gl.FRAMEBUFFER,this.__getFramebuffer(gl));
gl.__context.viewport(0,0,this.width,this.height);
var renderer = new openfl__$internal_renderer_opengl_GLRenderer(openfl_Lib.current.stage,gl,false);
renderer.resize(this.width,this.height);
var renderSession = renderer.renderSession;
renderSession.clearDirtyFlags = false;
renderSession.shaderManager = (js_Boot.__cast(openfl_Lib.current.stage.__renderer , openfl__$internal_renderer_opengl_GLRenderer)).renderSession.shaderManager;
var matrixCache = source.__worldTransform;
source.__updateTransforms(matrix);
source.__updateChildren(false);
source.__renderGL(renderer.renderSession);
source.__updateTransforms(matrixCache);
source.__updateChildren(true);
gl.__context.bindFramebuffer(gl.FRAMEBUFFER,null);
}
} else {
if(colorTransform != null) {
var bounds = openfl_geom_Rectangle.__pool.get();
var boundsMatrix = openfl_geom_Matrix.__pool.get();
source.__getBounds(bounds,boundsMatrix);
var width = Math.ceil(bounds.width);
var height = Math.ceil(bounds.height);
var copy = new openfl_display_BitmapData(width,height,true,0);
copy.draw(source);
copy.colorTransform(copy.rect,colorTransform);
source = copy;
openfl_geom_Rectangle.__pool.release(bounds);
openfl_geom_Matrix.__pool.release(boundsMatrix);
}
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);
var buffer = this.image.buffer;
var renderSession1 = new openfl__$internal_renderer_RenderSession();
renderSession1.clearDirtyFlags = false;
renderSession1.context = buffer.__srcContext;
renderSession1.allowSmoothing = smoothing;
renderSession1.maskManager = new openfl__$internal_renderer_canvas_CanvasMaskManager(renderSession1);
if(!smoothing) {
buffer.__srcContext.mozImageSmoothingEnabled = false;
buffer.__srcContext.msImageSmoothingEnabled = false;
buffer.__srcContext.imageSmoothingEnabled = false;
}
if(clipRect != null) renderSession1.maskManager.pushRect(clipRect,new openfl_geom_Matrix());
var matrixCache1 = source.__worldTransform;
source.__updateTransforms(matrix);
source.__updateChildren(false);
source.__renderCanvas(renderSession1);
source.__updateTransforms(matrixCache1);
source.__updateChildren(true);
if(!smoothing) {
buffer.__srcContext.mozImageSmoothingEnabled = true;
buffer.__srcContext.msImageSmoothingEnabled = true;
buffer.__srcContext.imageSmoothingEnabled = true;
}
if(clipRect != null) renderSession1.maskManager.popRect();
buffer.__srcContext.setTransform(1,0,0,1,0,0);
buffer.__srcImageData = null;
buffer.data = null;
this.image.dirty = true;
this.image.version++;
}
}
,drawWithQuality: function(source,matrix,colorTransform,blendMode,clipRect,smoothing,quality) {
if(smoothing == null) smoothing = false;
this.draw(source,matrix,colorTransform,blendMode,clipRect,quality != 2?smoothing:false);
}
,encode: function(rect,compressor,byteArray) {
if(!this.readable || rect == null) return byteArray = null;
if(byteArray == null) byteArray = new openfl_utils_ByteArrayData(0);
var image = this.image;
if(!rect.equals(this.rect)) {
var matrix = openfl_geom_Matrix.__pool.get();
matrix.tx = Math.round(-rect.x);
matrix.ty = Math.round(-rect.y);
var bitmapData = new openfl_display_BitmapData(Math.ceil(rect.width),Math.ceil(rect.height),true,0);
bitmapData.draw(this,matrix);
image = bitmapData.image;
openfl_geom_Matrix.__pool.release(matrix);
}
if(js_Boot.__instanceof(compressor,openfl_display_PNGEncoderOptions)) {
byteArray.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(image.encode("png")));
return byteArray;
} else if(js_Boot.__instanceof(compressor,openfl_display_JPEGEncoderOptions)) {
byteArray.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(image.encode("jpg",(js_Boot.__cast(compressor , openfl_display_JPEGEncoderOptions)).quality)));
return byteArray;
}
return byteArray = null;
}
,fillRect: function(rect,color) {
if(rect == null) return;
if(this.transparent && (color & -16777216) == 0) color = 0;
if(this.readable) this.image.fillRect(rect.__toLimeRectangle(),color,1); else if(this.__framebuffer != null) {
var gl = lime_graphics_opengl_GL.context;
var color1 = color;
var useScissor = !this.rect.equals(rect);
gl.__context.bindFramebuffer(gl.FRAMEBUFFER,this.__framebuffer);
if(useScissor) {
gl.__context.enable(gl.SCISSOR_TEST);
gl.scissor(Math.round(rect.x),Math.round(rect.y),Math.round(rect.width),Math.round(rect.height));
}
gl.__context.clearColor((color1 >> 16 & 255) / 255,(color1 >> 8 & 255) / 255,(color1 & 255) / 255,(color1 >> 24 & 255) / 255);
gl.__context.clear(gl.COLOR_BUFFER_BIT);
if(useScissor) gl.__context.disable(gl.SCISSOR_TEST);
gl.__context.bindFramebuffer(gl.FRAMEBUFFER,null);
}
}
,floodFill: function(x,y,color) {
if(!this.readable) return;
this.image.floodFill(x,y,color,1);
}
,generateFilterRect: function(sourceRect,filter) {
return sourceRect.clone();
}
,getBuffer: function(gl,alpha) {
if(this.__buffer == null || this.__bufferContext != gl) {
var uvWidth = 1;
var uvHeight = 1;
var array = [this.width,this.height,0,uvWidth,uvHeight,alpha,0,this.height,0,0,uvHeight,alpha,this.width,0,0,uvWidth,0,alpha,0,0,0,0,0,alpha];
var this1;
if(array != null) this1 = new Float32Array(array); else this1 = null;
this.__bufferData = this1;
this.__bufferAlpha = alpha;
this.__bufferContext = gl;
this.__buffer = gl.__context.createBuffer();
gl.__context.bindBuffer(gl.ARRAY_BUFFER,this.__buffer);
gl.bufferData(gl.ARRAY_BUFFER,this.__bufferData.byteLength,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__bufferData),gl.STATIC_DRAW);
} else if(this.__bufferAlpha != alpha) {
this.__bufferData[5] = alpha;
this.__bufferData[11] = alpha;
this.__bufferData[17] = alpha;
this.__bufferData[23] = alpha;
this.__bufferAlpha = alpha;
gl.__context.bindBuffer(gl.ARRAY_BUFFER,this.__buffer);
gl.bufferData(gl.ARRAY_BUFFER,this.__bufferData.byteLength,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__bufferData),gl.STATIC_DRAW);
}
return this.__buffer;
}
,getColorBoundsRect: function(mask,color,findColor) {
if(findColor == null) findColor = true;
if(!this.readable) return new openfl_geom_Rectangle(0,0,this.width,this.height);
if(!this.transparent || (mask >> 24 & 255) > 0) {
var color1 = color;
if((color1 >> 24 & 255) == 0) color1 = 0;
}
var rect = this.image.getColorBoundsRect(mask,color,findColor,1);
return new openfl_geom_Rectangle(rect.x,rect.y,rect.width,rect.height);
}
,getPixel: function(x,y) {
if(!this.readable) return 0;
return this.image.getPixel(x,y,1);
}
,getPixel32: function(x,y) {
if(!this.readable) return 0;
return this.image.getPixel32(x,y,1);
}
,getPixels: function(rect) {
if(!this.readable) return null;
if(rect == null) rect = this.rect;
return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(this.image.getPixels(rect.__toLimeRectangle(),1));
}
,getSurface: function() {
if(!this.readable) return null;
if(this.__surface == null) this.__surface = lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.fromImage(this.image);
return this.__surface;
}
,getTexture: function(gl) {
if(!this.__isValid) return null;
if(this.__texture == null || this.__textureContext != gl) {
this.__textureContext = gl;
this.__texture = gl.__context.createTexture();
gl.__context.bindTexture(gl.TEXTURE_2D,this.__texture);
gl.__context.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);
gl.__context.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);
gl.__context.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST);
gl.__context.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST);
this.__textureVersion = -1;
}
lime_graphics_utils_ImageCanvasUtil.sync(this.image,false);
if(this.image != null && this.image.version != this.__textureVersion) {
var internalFormat;
var format;
if(this.__surface != null) lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush(this.__surface);
if(this.image.buffer.bitsPerPixel == 1) {
internalFormat = gl.ALPHA;
format = gl.ALPHA;
} else {
if(openfl_display_BitmapData.__supportsBGRA == null) {
openfl_display_BitmapData.__textureInternalFormat = gl.RGBA;
var bgraExtension = null;
if(bgraExtension != null) {
openfl_display_BitmapData.__supportsBGRA = true;
openfl_display_BitmapData.__textureFormat = bgraExtension.BGRA_EXT;
if(gl.type == lime_graphics_opengl_GLContextType.GLES) openfl_display_BitmapData.__textureInternalFormat = bgraExtension.BGRA_EXT;
} else {
openfl_display_BitmapData.__supportsBGRA = false;
openfl_display_BitmapData.__textureFormat = gl.RGBA;
}
}
internalFormat = openfl_display_BitmapData.__textureInternalFormat;
format = openfl_display_BitmapData.__textureFormat;
}
gl.__context.bindTexture(gl.TEXTURE_2D,this.__texture);
var textureImage = this.image;
if(textureImage.type != lime_graphics_ImageType.DATA && !textureImage.get_premultiplied()) gl.__context.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1); else if(!textureImage.get_premultiplied() && textureImage.get_transparent()) gl.__context.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);
if(!openfl_display_BitmapData.__supportsBGRA && textureImage.get_format() != 0) {
textureImage = textureImage.clone();
textureImage.set_format(0);
}
if(textureImage.type == lime_graphics_ImageType.DATA) gl.texImage2D(gl.TEXTURE_2D,0,internalFormat,textureImage.buffer.width,textureImage.buffer.height,0,format,gl.UNSIGNED_BYTE,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(textureImage.get_data())); else lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.texImage2D(gl,gl.TEXTURE_2D,0,internalFormat,format,gl.UNSIGNED_BYTE,textureImage.get_src());
gl.__context.bindTexture(gl.TEXTURE_2D,null);
this.__textureVersion = this.image.version;
}
if(!this.readable && this.image != null) {
this.__surface = null;
this.image = null;
}
return this.__texture;
}
,getVector: function(rect) {
var pixels = this.getPixels(rect);
var length = Std["int"](openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels) / 4);
var result = openfl__$Vector_Vector_$Impl_$.toIntVector(null,length,true);
var _g = 0;
while(_g < length) {
var i = _g++;
var value = pixels.readUnsignedInt();
result.set(i,value);
}
return result;
}
,histogram: function(hRect) {
var rect;
if(hRect != null) rect = hRect; else rect = new openfl_geom_Rectangle(0,0,this.width,this.height);
var pixels = this.getPixels(rect);
var result;
var _g = [];
var _g1 = 0;
while(_g1 < 4) {
var i = _g1++;
_g.push((function($this) {
var $r;
var _g2 = [];
{
var _g3 = 0;
while(_g3 < 256) {
var j = _g3++;
_g2.push(0);
}
}
$r = _g2;
return $r;
}(this)));
}
result = _g;
var _g21 = 0;
var _g11 = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels);
while(_g21 < _g11) {
var i1 = _g21++;
++result[i1 % 4][pixels.readUnsignedByte()];
}
return result;
}
,hitTest: function(firstPoint,firstAlphaThreshold,secondObject,secondBitmapDataPoint,secondAlphaThreshold) {
if(secondAlphaThreshold == null) secondAlphaThreshold = 1;
if(!this.readable) return false;
if(js_Boot.__instanceof(secondObject,openfl_display_Bitmap)) secondObject = (js_Boot.__cast(secondObject , openfl_display_Bitmap)).bitmapData;
if(js_Boot.__instanceof(secondObject,openfl_geom_Point)) {
var secondPoint = secondObject;
var x = secondPoint.x - firstPoint.x | 0;
var y = secondPoint.y - firstPoint.y | 0;
if(this.rect.contains(x,y)) {
var pixel = this.getPixel32(x,y);
if((pixel >> 24 & 255) > firstAlphaThreshold) return true;
}
} else if(js_Boot.__instanceof(secondObject,openfl_display_BitmapData)) {
var secondBitmapData = secondObject;
var x1;
var y1;
if(secondBitmapDataPoint == null) {
x1 = 0;
y1 = 0;
} else {
x1 = secondBitmapDataPoint.x - firstPoint.x | 0;
y1 = secondBitmapDataPoint.y - firstPoint.y | 0;
}
if(this.rect.contains(x1,y1)) {
var hitRect = openfl_geom_Rectangle.__pool.get();
hitRect.setTo(x1,y1,Math.min(secondBitmapData.width,this.width - x1),Math.min(secondBitmapData.height,this.height - y1));
var pixels = this.getPixels(hitRect);
hitRect.offset(-x1,-y1);
var testPixels = secondBitmapData.getPixels(hitRect);
var length = hitRect.width * hitRect.height | 0;
var pixel1;
var testPixel;
openfl_geom_Rectangle.__pool.release(hitRect);
var _g = 0;
while(_g < length) {
var i = _g++;
pixel1 = pixels.readUnsignedInt();
testPixel = testPixels.readUnsignedInt();
if((pixel1 >> 24 & 255) > firstAlphaThreshold && (testPixel >> 24 & 255) > secondAlphaThreshold) return true;
}
return false;
}
} else if(js_Boot.__instanceof(secondObject,openfl_geom_Rectangle)) {
var secondRectangle = openfl_geom_Rectangle.__pool.get();
secondRectangle.copyFrom(secondObject);
secondRectangle.offset(-firstPoint.x,-firstPoint.y);
secondRectangle.__contract(0,0,this.width,this.height);
if(secondRectangle.width > 0 && secondRectangle.height > 0) {
var pixels1 = this.getPixels(secondRectangle);
var length1 = Std["int"](openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels1) / 4);
var pixel2;
var _g1 = 0;
while(_g1 < length1) {
var i1 = _g1++;
pixel2 = pixels1.readUnsignedInt();
if((pixel2 >> 24 & 255) > firstAlphaThreshold) {
openfl_geom_Rectangle.__pool.release(secondRectangle);
return true;
}
}
}
openfl_geom_Rectangle.__pool.release(secondRectangle);
}
return false;
}
,lock: function() {
}
,merge: function(sourceBitmapData,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
if(!this.readable || sourceBitmapData == null || !sourceBitmapData.readable || sourceRect == null || destPoint == null) return;
this.image.merge(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
}
,noise: function(randomSeed,low,high,channelOptions,grayScale) {
if(grayScale == null) grayScale = false;
if(channelOptions == null) channelOptions = 7;
if(high == null) high = 255;
if(low == null) low = 0;
if(!this.readable) return;
var rand;
var func = function() {
randomSeed = randomSeed * 1103515245 + 12345;
return Std["int"](Math.abs(randomSeed / 65536)) % 32768;
};
rand = func;
rand();
var range = high - low;
var data = new openfl_utils_ByteArrayData(0);
var redChannel = (channelOptions & 1) == 1;
var greenChannel = (channelOptions & 2) >> 1 == 1;
var blueChannel = (channelOptions & 4) >> 2 == 1;
var alphaChannel = (channelOptions & 8) >> 3 == 1;
var _g1 = 0;
var _g = this.height;
while(_g1 < _g) {
var y = _g1++;
var _g3 = 0;
var _g2 = this.width;
while(_g3 < _g2) {
var x = _g3++;
var red = 0;
var blue = 0;
var green = 0;
var alpha = 255;
if(grayScale) {
red = green = blue = low + rand() % range;
alpha = 255;
} else {
if(redChannel) red = low + rand() % range;
if(greenChannel) green = low + rand() % range;
if(blueChannel) blue = low + rand() % range;
if(alphaChannel) alpha = low + rand() % range;
}
var rgb = alpha;
rgb = (rgb << 8) + red;
rgb = (rgb << 8) + green;
rgb = (rgb << 8) + blue;
this.setPixel32(x,y,rgb);
}
}
}
,paletteMap: function(sourceBitmapData,sourceRect,destPoint,redArray,greenArray,blueArray,alphaArray) {
var sw = sourceRect.width | 0;
var sh = sourceRect.height | 0;
var pixels = sourceBitmapData.getPixels(sourceRect);
var pixelValue;
var r;
var g;
var b;
var a;
var color;
var _g1 = 0;
var _g = sh * sw;
while(_g1 < _g) {
var i = _g1++;
pixelValue = pixels.readUnsignedInt();
if(alphaArray == null) a = pixelValue & -16777216; else a = alphaArray[pixelValue >> 24 & 255];
if(redArray == null) r = pixelValue & 16711680; else r = redArray[pixelValue >> 16 & 255];
if(greenArray == null) g = pixelValue & 65280; else g = greenArray[pixelValue >> 8 & 255];
if(blueArray == null) b = pixelValue & 255; else b = blueArray[pixelValue & 255];
color = a + r + g + b;
pixels.position = i * 4;
pixels.writeUnsignedInt(color);
}
pixels.position = 0;
var destRect = new openfl_geom_Rectangle(destPoint.x,destPoint.y,sw,sh);
this.setPixels(destRect,pixels);
}
,perlinNoise: function(baseX,baseY,numOctaves,randomSeed,stitch,fractalNoise,channelOptions,grayScale,offsets) {
if(grayScale == null) grayScale = false;
if(channelOptions == null) channelOptions = 7;
if(!this.readable) return;
var noise = new openfl__$internal_utils_PerlinNoise(randomSeed,numOctaves,0.01);
noise.fill(this,baseX,baseY,0);
}
,scroll: function(x,y) {
if(!this.readable) return;
this.image.scroll(x,y);
}
,setPixel: function(x,y,color) {
if(!this.readable) return;
this.image.setPixel(x,y,color,1);
}
,setPixel32: function(x,y,color) {
if(!this.readable) return;
this.image.setPixel32(x,y,color,1);
}
,setPixels: function(rect,byteArray) {
if(!this.readable || rect == null) return;
this.image.setPixels(rect.__toLimeRectangle(),openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(byteArray),1);
}
,setVector: function(rect,inputVector) {
var byteArray = new openfl_utils_ByteArrayData(0);
openfl_utils__$ByteArray_ByteArray_$Impl_$.set_length(byteArray,inputVector.get_length() * 4);
var _g = 0;
while(_g < inputVector.get_length()) {
var color = inputVector.get(_g);
++_g;
byteArray.writeUnsignedInt(color);
}
byteArray.position = 0;
this.setPixels(rect,byteArray);
}
,threshold: function(sourceBitmapData,sourceRect,destPoint,operation,threshold,color,mask,copySource) {
if(copySource == null) copySource = false;
if(mask == null) mask = -1;
if(color == null) color = 0;
if(sourceBitmapData == null || sourceRect == null || destPoint == null || sourceRect.x > sourceBitmapData.width || sourceRect.y > sourceBitmapData.height || destPoint.x > this.width || destPoint.y > this.height) return 0;
return this.image.threshold(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),operation,threshold,color,mask,copySource,1);
}
,unlock: function(changeRect) {
}
,__applyAlpha: function(alpha) {
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);
lime_graphics_utils_ImageCanvasUtil.createImageData(this.image);
var data = this.image.buffer.data;
var _g1 = 0;
var _g = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(alpha);
while(_g1 < _g) {
var i = _g1++;
var val = alpha.readUnsignedByte();
data[i * 4 + 3] = val;
}
this.image.version++;
}
,__draw: function(source,matrix,colorTransform,blendMode,clipRect,smoothing) {
if(smoothing == null) smoothing = false;
if(matrix == null) {
matrix = new openfl_geom_Matrix();
if(source.__transform != null) {
matrix.copyFrom(source.__transform);
matrix.tx = 0;
matrix.ty = 0;
}
}
if(!this.readable) {
if(lime_graphics_opengl_GL.context != null) {
var gl = lime_graphics_opengl_GL.context;
gl.bindFramebuffer(gl.FRAMEBUFFER,this.__getFramebuffer(gl));
gl.__context.viewport(0,0,this.width,this.height);
var renderer = new openfl__$internal_renderer_opengl_GLRenderer(openfl_Lib.current.stage,gl,false);
renderer.resize(this.width,this.height);
var renderSession = renderer.renderSession;
renderSession.clearDirtyFlags = true;
renderSession.shaderManager = (js_Boot.__cast(openfl_Lib.current.stage.__renderer , openfl__$internal_renderer_opengl_GLRenderer)).renderSession.shaderManager;
var matrixCache = source.__worldTransform;
source.__updateTransforms(matrix);
source.__updateChildren(false);
source.__renderGL(renderer.renderSession);
source.__updateTransforms(matrixCache);
source.__updateChildren(true);
gl.__context.bindFramebuffer(gl.FRAMEBUFFER,null);
}
} else {
if(colorTransform != null) {
var bounds = openfl_geom_Rectangle.__pool.get();
var boundsMatrix = openfl_geom_Matrix.__pool.get();
source.__getBounds(bounds,boundsMatrix);
var width = Math.ceil(bounds.width);
var height = Math.ceil(bounds.height);
var copy = new openfl_display_BitmapData(width,height,true,0);
copy.draw(source);
copy.colorTransform(copy.rect,colorTransform);
source = copy;
openfl_geom_Rectangle.__pool.release(bounds);
openfl_geom_Matrix.__pool.release(boundsMatrix);
}
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);
var buffer = this.image.buffer;
var renderSession1 = new openfl__$internal_renderer_RenderSession();
renderSession1.clearDirtyFlags = true;
renderSession1.context = buffer.__srcContext;
renderSession1.allowSmoothing = smoothing;
renderSession1.maskManager = new openfl__$internal_renderer_canvas_CanvasMaskManager(renderSession1);
if(!smoothing) {
buffer.__srcContext.mozImageSmoothingEnabled = false;
buffer.__srcContext.msImageSmoothingEnabled = false;
buffer.__srcContext.imageSmoothingEnabled = false;
}
if(clipRect != null) renderSession1.maskManager.pushRect(clipRect,new openfl_geom_Matrix());
var matrixCache1 = source.__worldTransform;
source.__updateTransforms(matrix);
source.__updateChildren(false);
source.__renderCanvas(renderSession1);
source.__updateTransforms(matrixCache1);
source.__updateChildren(true);
if(!smoothing) {
buffer.__srcContext.mozImageSmoothingEnabled = true;
buffer.__srcContext.msImageSmoothingEnabled = true;
buffer.__srcContext.imageSmoothingEnabled = true;
}
if(clipRect != null) renderSession1.maskManager.popRect();
buffer.__srcContext.setTransform(1,0,0,1,0,0);
buffer.__srcImageData = null;
buffer.data = null;
this.image.dirty = true;
this.image.version++;
}
}
,__fromBase64: function(base64,type) {
var image = lime_graphics_Image.fromBase64(base64,type);
this.__fromImage(image);
}
,__fromBytes: function(bytes,rawAlpha) {
var image = lime_graphics_Image.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes));
this.__fromImage(image);
if(rawAlpha != null) this.__applyAlpha(rawAlpha);
}
,__fromFile: function(path) {
var image = lime_graphics_Image.fromFile(path);
this.__fromImage(image);
}
,__fromImage: function(image) {
if(image != null && image.buffer != null) {
this.image = image;
this.width = image.width;
this.height = image.height;
this.rect = new openfl_geom_Rectangle(0,0,image.width,image.height);
this.readable = true;
this.__isValid = true;
}
}
,__getBounds: function(rect,matrix) {
var bounds = openfl_geom_Rectangle.__pool.get();
this.rect.__transform(bounds,matrix);
rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
openfl_geom_Rectangle.__pool.release(bounds);
}
,__getFramebuffer: function(gl) {
if(this.__framebuffer == null || this.__framebufferContext != gl) {
this.getTexture(gl);
this.__framebufferContext = gl;
this.__framebuffer = gl.__context.createFramebuffer();
gl.__context.bindFramebuffer(gl.FRAMEBUFFER,this.__framebuffer);
gl.__context.framebufferTexture2D(gl.FRAMEBUFFER,gl.COLOR_ATTACHMENT0,gl.TEXTURE_2D,this.__texture,0);
}
return this.__framebuffer;
}
,__loadFromBase64: function(base64,type) {
var _g = this;
return lime_graphics_Image.loadFromBase64(base64,type).then(function(image) {
_g.__fromImage(image);
return lime_app_Future.withValue(_g);
});
}
,__loadFromBytes: function(bytes,rawAlpha) {
var _g = this;
return lime_graphics_Image.loadFromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes)).then(function(image) {
_g.__fromImage(image);
if(rawAlpha != null) _g.__applyAlpha(rawAlpha);
return lime_app_Future.withValue(_g);
});
}
,__loadFromFile: function(path) {
var _g = this;
return lime_graphics_Image.loadFromFile(path).then(function(image) {
_g.__fromImage(image);
return lime_app_Future.withValue(_g);
});
}
,__renderCairo: function(renderSession) {
}
,__renderCairoMask: function(renderSession) {
}
,__renderCanvas: function(renderSession) {
if(!this.readable) return;
if(this.image.type == lime_graphics_ImageType.DATA) lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);
var context = renderSession.context;
if(this.__worldTransform == null) this.__worldTransform = new openfl_geom_Matrix();
context.globalAlpha = 1;
var transform = this.__worldTransform;
if(renderSession.roundPixels) context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0); else context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
context.drawImage(this.image.get_src(),0,0);
}
,__renderCanvasMask: function(renderSession) {
}
,__renderGL: function(renderSession) {
var renderer = renderSession.renderer;
var gl = renderSession.gl;
renderSession.blendModeManager.setBlendMode(10);
var shader = renderSession.shaderManager.defaultShader;
shader.get_data().uImage0.input = this;
shader.get_data().uImage0.smoothing = renderSession.allowSmoothing && renderSession.upscaled;
shader.get_data().uMatrix.value = renderer.getMatrix(this.__worldTransform);
renderSession.shaderManager.setShader(shader);
gl.bindBuffer(gl.ARRAY_BUFFER,this.getBuffer(gl,1));
gl.vertexAttribPointer(shader.get_data().aPosition.index,3,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0));
gl.vertexAttribPointer(shader.get_data().aTexCoord.index,2,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(12));
gl.vertexAttribPointer(shader.get_data().aAlpha.index,1,gl.FLOAT,false,24,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(20));
gl.__context.drawArrays(gl.TRIANGLE_STRIP,0,4);
}
,__resize: function(width,height) {
this.width = width;
this.height = height;
this.rect.width = width;
this.rect.height = height;
}
,__sync: function() {
lime_graphics_utils_ImageCanvasUtil.sync(this.image,false);
}
,__updateChildren: function(transformOnly) {
}
,__updateMask: function(maskGraphics) {
}
,__updateTransforms: function(overrideTransform) {
if(overrideTransform == null) this.__worldTransform.identity(); else this.__worldTransform = overrideTransform;
}
,__class__: openfl_display_BitmapData
};
var openfl_display__$BlendMode_BlendMode_$Impl_$ = {};
$hxClasses["openfl.display._BlendMode.BlendMode_Impl_"] = openfl_display__$BlendMode_BlendMode_$Impl_$;
openfl_display__$BlendMode_BlendMode_$Impl_$.__name__ = ["openfl","display","_BlendMode","BlendMode_Impl_"];
openfl_display__$BlendMode_BlendMode_$Impl_$.fromString = function(value) {
switch(value) {
case "add":
return 0;
case "alpha":
return 1;
case "darken":
return 2;
case "difference":
return 3;
case "erase":
return 4;
case "hardlight":
return 5;
case "invert":
return 6;
case "layer":
return 7;
case "lighten":
return 8;
case "multiply":
return 9;
case "normal":
return 10;
case "overlay":
return 11;
case "screen":
return 12;
case "shader":
return 13;
case "subtract":
return 14;
default:
return null;
}
};
openfl_display__$BlendMode_BlendMode_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "add";
case 1:
return "alpha";
case 2:
return "darken";
case 3:
return "difference";
case 4:
return "erase";
case 5:
return "hardlight";
case 6:
return "invert";
case 7:
return "layer";
case 8:
return "lighten";
case 9:
return "multiply";
case 10:
return "normal";
case 11:
return "overlay";
case 12:
return "screen";
case 13:
return "shader";
case 14:
return "subtract";
default:
return null;
}
};
var openfl_display__$CapsStyle_CapsStyle_$Impl_$ = {};
$hxClasses["openfl.display._CapsStyle.CapsStyle_Impl_"] = openfl_display__$CapsStyle_CapsStyle_$Impl_$;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.__name__ = ["openfl","display","_CapsStyle","CapsStyle_Impl_"];
openfl_display__$CapsStyle_CapsStyle_$Impl_$.fromString = function(value) {
switch(value) {
case "none":
return 0;
case "round":
return 1;
case "square":
return 2;
default:
return null;
}
};
openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "none";
case 1:
return "round";
case 2:
return "square";
default:
return null;
}
};
var openfl_display_FrameLabel = function(name,frame) {
openfl_events_EventDispatcher.call(this);
this.__name = name;
this.__frame = frame;
};
$hxClasses["openfl.display.FrameLabel"] = openfl_display_FrameLabel;
openfl_display_FrameLabel.__name__ = ["openfl","display","FrameLabel"];
openfl_display_FrameLabel.__super__ = openfl_events_EventDispatcher;
openfl_display_FrameLabel.prototype = $extend(openfl_events_EventDispatcher.prototype,{
__frame: null
,__name: null
,get_frame: function() {
return this.__frame;
}
,get_name: function() {
return this.__name;
}
,__class__: openfl_display_FrameLabel
,__properties__: {get_name:"get_name",get_frame:"get_frame"}
});
var openfl_display__$GradientType_GradientType_$Impl_$ = {};
$hxClasses["openfl.display._GradientType.GradientType_Impl_"] = openfl_display__$GradientType_GradientType_$Impl_$;
openfl_display__$GradientType_GradientType_$Impl_$.__name__ = ["openfl","display","_GradientType","GradientType_Impl_"];
openfl_display__$GradientType_GradientType_$Impl_$.fromString = function(value) {
switch(value) {
case "linear":
return 0;
case "radial":
return 1;
default:
return null;
}
};
openfl_display__$GradientType_GradientType_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "linear";
case 1:
return "radial";
default:
return null;
}
};
var openfl_display_Graphics = function(owner) {
this.__dirty = true;
this.__owner = owner;
this.__commands = new openfl__$internal_renderer_DrawCommandBuffer();
this.__strokePadding = 0;
this.__positionX = 0;
this.__positionY = 0;
this.__renderTransform = new openfl_geom_Matrix();
this.__worldTransform = new openfl_geom_Matrix();
this.__width = 0;
this.__height = 0;
this.moveTo(0,0);
};
$hxClasses["openfl.display.Graphics"] = openfl_display_Graphics;
openfl_display_Graphics.__name__ = ["openfl","display","Graphics"];
openfl_display_Graphics.prototype = {
__bounds: null
,__commands: null
,__dirty: null
,__height: null
,__managed: null
,__positionX: null
,__positionY: null
,__renderTransform: null
,__strokePadding: null
,__transformDirty: null
,__visible: null
,__owner: null
,__width: null
,__worldTransform: null
,__canvas: null
,__context: null
,__bitmap: null
,beginBitmapFill: function(bitmap,matrix,repeat,smooth) {
if(smooth == null) smooth = false;
if(repeat == null) repeat = true;
this.__commands.beginBitmapFill(bitmap,matrix != null?matrix.clone():null,repeat,smooth);
this.__visible = true;
}
,beginFill: function(color,alpha) {
if(alpha == null) alpha = 1;
if(color == null) color = 0;
this.__commands.beginFill(color & 16777215,alpha);
if(alpha > 0) this.__visible = true;
}
,beginGradientFill: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
if(focalPointRatio == null) focalPointRatio = 0;
if(interpolationMethod == null) interpolationMethod = 1;
if(spreadMethod == null) spreadMethod = 0;
this.__commands.beginGradientFill(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio);
var _g = 0;
while(_g < alphas.length) {
var alpha = alphas[_g];
++_g;
if(alpha > 0) {
this.__visible = true;
break;
}
}
}
,clear: function() {
this.__commands.clear();
this.__strokePadding = 0;
if(this.__bounds != null) {
this.set___dirty(true);
this.__transformDirty = true;
this.__bounds = null;
}
this.__visible = false;
this.moveTo(0,0);
}
,copyFrom: function(sourceGraphics) {
if(sourceGraphics.__bounds != null) this.__bounds = sourceGraphics.__bounds.clone(); else this.__bounds = null;
this.__commands = sourceGraphics.__commands.copy();
this.set___dirty(true);
this.__strokePadding = sourceGraphics.__strokePadding;
this.__positionX = sourceGraphics.__positionX;
this.__positionY = sourceGraphics.__positionY;
this.__transformDirty = true;
this.__visible = sourceGraphics.__visible;
}
,cubicCurveTo: function(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY) {
this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
var ix1;
var iy1;
var ix2;
var iy2;
ix1 = anchorX;
ix2 = anchorX;
if(!((controlX1 < anchorX && controlX1 > this.__positionX || controlX1 > anchorX && controlX1 < this.__positionX) && (controlX2 < anchorX && controlX2 > this.__positionX || controlX2 > anchorX && controlX2 < this.__positionX))) {
var u = 2 * this.__positionX - 4 * controlX1 + 2 * controlX2;
var v = controlX1 - this.__positionX;
var w = -this.__positionX + 3 * controlX1 + anchorX - 3 * controlX2;
var t1 = (-u + Math.sqrt(u * u - 4 * v * w)) / (2 * w);
var t2 = (-u - Math.sqrt(u * u - 4 * v * w)) / (2 * w);
if(t1 > 0 && t1 < 1) ix1 = this.__calculateBezierCubicPoint(t1,this.__positionX,controlX1,controlX2,anchorX);
if(t2 > 0 && t2 < 1) ix2 = this.__calculateBezierCubicPoint(t2,this.__positionX,controlX1,controlX2,anchorX);
}
iy1 = anchorY;
iy2 = anchorY;
if(!((controlY1 < anchorY && controlY1 > this.__positionX || controlY1 > anchorY && controlY1 < this.__positionX) && (controlY2 < anchorY && controlY2 > this.__positionX || controlY2 > anchorY && controlY2 < this.__positionX))) {
var u1 = 2 * this.__positionX - 4 * controlY1 + 2 * controlY2;
var v1 = controlY1 - this.__positionX;
var w1 = -this.__positionX + 3 * controlY1 + anchorY - 3 * controlY2;
var t11 = (-u1 + Math.sqrt(u1 * u1 - 4 * v1 * w1)) / (2 * w1);
var t21 = (-u1 - Math.sqrt(u1 * u1 - 4 * v1 * w1)) / (2 * w1);
if(t11 > 0 && t11 < 1) iy1 = this.__calculateBezierCubicPoint(t11,this.__positionX,controlY1,controlY2,anchorY);
if(t21 > 0 && t21 < 1) iy2 = this.__calculateBezierCubicPoint(t21,this.__positionX,controlY1,controlY2,anchorY);
}
this.__inflateBounds(ix1 - this.__strokePadding,iy1 - this.__strokePadding);
this.__inflateBounds(ix1 + this.__strokePadding,iy1 + this.__strokePadding);
this.__inflateBounds(ix2 - this.__strokePadding,iy2 - this.__strokePadding);
this.__inflateBounds(ix2 + this.__strokePadding,iy2 + this.__strokePadding);
this.__positionX = anchorX;
this.__positionY = anchorY;
this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
this.__commands.cubicCurveTo(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY);
this.set___dirty(true);
}
,curveTo: function(controlX,controlY,anchorX,anchorY) {
this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
var ix;
var iy;
if(controlX < anchorX && controlX > this.__positionX || controlX > anchorX && controlX < this.__positionX) ix = anchorX; else {
var tx = (this.__positionX - controlX) / (this.__positionX - 2 * controlX + anchorX);
ix = this.__calculateBezierQuadPoint(tx,this.__positionX,controlX,anchorX);
}
if(controlY < anchorY && controlY > this.__positionY || controlY > anchorY && controlY < this.__positionY) iy = anchorY; else {
var ty = (this.__positionY - controlY) / (this.__positionY - 2 * controlY + anchorY);
iy = this.__calculateBezierQuadPoint(ty,this.__positionY,controlY,anchorY);
}
this.__inflateBounds(ix - this.__strokePadding,iy - this.__strokePadding);
this.__inflateBounds(ix + this.__strokePadding,iy + this.__strokePadding);
this.__positionX = anchorX;
this.__positionY = anchorY;
this.__commands.curveTo(controlX,controlY,anchorX,anchorY);
this.set___dirty(true);
}
,drawCircle: function(x,y,radius) {
if(radius <= 0) return;
this.__inflateBounds(x - radius - this.__strokePadding,y - radius - this.__strokePadding);
this.__inflateBounds(x + radius + this.__strokePadding,y + radius + this.__strokePadding);
this.__commands.drawCircle(x,y,radius);
this.set___dirty(true);
}
,drawEllipse: function(x,y,width,height) {
if(width <= 0 || height <= 0) return;
this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
this.__commands.drawEllipse(x,y,width,height);
this.set___dirty(true);
}
,drawGraphicsData: function(graphicsData) {
var fill;
var bitmapFill;
var gradientFill;
var stroke;
var path;
var trianglePath;
var _g = 0;
while(_g < graphicsData.get_length()) {
var graphics = graphicsData.get(_g);
++_g;
switch(graphics.__graphicsDataType) {
case openfl_display_GraphicsDataType.SOLID:
fill = graphics;
this.beginFill(fill.color,fill.alpha);
break;
case openfl_display_GraphicsDataType.BITMAP:
bitmapFill = graphics;
this.beginBitmapFill(bitmapFill.bitmapData,bitmapFill.matrix,bitmapFill.repeat,bitmapFill.smooth);
break;
case openfl_display_GraphicsDataType.GRADIENT:
gradientFill = graphics;
this.beginGradientFill(gradientFill.type,gradientFill.colors,gradientFill.alphas,gradientFill.ratios,gradientFill.matrix,gradientFill.spreadMethod,gradientFill.interpolationMethod,gradientFill.focalPointRatio);
break;
case openfl_display_GraphicsDataType.STROKE:
stroke = graphics;
if(stroke.fill != null) {
var thickness = stroke.thickness;
if(isNaN(thickness)) thickness = null;
switch(stroke.fill.__graphicsFillType) {
case openfl_display_GraphicsFillType.SOLID_FILL:
fill = stroke.fill;
this.lineStyle(thickness,fill.color,fill.alpha,stroke.pixelHinting,stroke.scaleMode,stroke.caps,stroke.joints,stroke.miterLimit);
break;
case openfl_display_GraphicsFillType.BITMAP_FILL:
bitmapFill = stroke.fill;
this.lineStyle(thickness,0,1,stroke.pixelHinting,stroke.scaleMode,stroke.caps,stroke.joints,stroke.miterLimit);
this.lineBitmapStyle(bitmapFill.bitmapData,bitmapFill.matrix,bitmapFill.repeat,bitmapFill.smooth);
break;
case openfl_display_GraphicsFillType.GRADIENT_FILL:
gradientFill = stroke.fill;
this.lineStyle(thickness,0,1,stroke.pixelHinting,stroke.scaleMode,stroke.caps,stroke.joints,stroke.miterLimit);
this.lineGradientStyle(gradientFill.type,gradientFill.colors,gradientFill.alphas,gradientFill.ratios,gradientFill.matrix,gradientFill.spreadMethod,gradientFill.interpolationMethod,gradientFill.focalPointRatio);
break;
default:
}
} else this.lineStyle();
break;
case openfl_display_GraphicsDataType.PATH:
path = graphics;
this.drawPath(path.commands,path.data,path.winding);
break;
case openfl_display_GraphicsDataType.TRIANGLE_PATH:
trianglePath = graphics;
this.drawTriangles(trianglePath.vertices,trianglePath.indices,trianglePath.uvtData,trianglePath.culling);
break;
case openfl_display_GraphicsDataType.END:
this.endFill();
break;
}
}
}
,drawPath: function(commands,data,winding) {
if(winding == null) winding = 0;
var dataIndex = 0;
var _g = 0;
try {
while(_g < commands.get_length()) {
var command = commands.get(_g);
++_g;
switch(command) {
case 1:
this.moveTo(data.get(dataIndex),data.get(dataIndex + 1));
dataIndex += 2;
break;
case 2:
this.lineTo(data.get(dataIndex),data.get(dataIndex + 1));
dataIndex += 2;
break;
case 4:
this.moveTo(data.get(dataIndex + 2),data.get(dataIndex + 3));
throw "__break__";
dataIndex += 4;
break;
case 5:
this.lineTo(data.get(dataIndex + 2),data.get(dataIndex + 3));
throw "__break__";
dataIndex += 4;
break;
case 3:
this.curveTo(data.get(dataIndex),data.get(dataIndex + 1),data.get(dataIndex + 2),data.get(dataIndex + 3));
dataIndex += 4;
break;
case 6:
this.cubicCurveTo(data.get(dataIndex),data.get(dataIndex + 1),data.get(dataIndex + 2),data.get(dataIndex + 3),data.get(dataIndex + 4),data.get(dataIndex + 5));
dataIndex += 6;
break;
default:
}
}
} catch( e ) { if( e != "__break__" ) throw e; }
}
,drawRect: function(x,y,width,height) {
if(width <= 0 || height <= 0) return;
this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
this.__commands.drawRect(x,y,width,height);
this.set___dirty(true);
}
,drawRoundRect: function(x,y,width,height,ellipseWidth,ellipseHeight) {
if(width <= 0 || height <= 0) return;
this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
this.__commands.drawRoundRect(x,y,width,height,ellipseWidth,ellipseHeight);
this.set___dirty(true);
}
,drawRoundRectComplex: function(x,y,width,height,topLeftRadius,topRightRadius,bottomLeftRadius,bottomRightRadius) {
if(width <= 0 || height <= 0) return;
this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
var xw = x + width;
var yh = y + height;
var minSize;
if(width < height) minSize = width * 2; else minSize = height * 2;
if(topLeftRadius < minSize) topLeftRadius = topLeftRadius; else topLeftRadius = minSize;
if(topRightRadius < minSize) topRightRadius = topRightRadius; else topRightRadius = minSize;
if(bottomLeftRadius < minSize) bottomLeftRadius = bottomLeftRadius; else bottomLeftRadius = minSize;
if(bottomRightRadius < minSize) bottomRightRadius = bottomRightRadius; else bottomRightRadius = minSize;
var anchor = 1 - Math.sin(45 * (Math.PI / 180));
var control = 1 - Math.tan(22.5 * (Math.PI / 180));
var a = bottomRightRadius * anchor;
var s = bottomRightRadius * control;
this.moveTo(xw,yh - bottomRightRadius);
this.curveTo(xw,yh - s,xw - a,yh - a);
this.curveTo(xw - s,yh,xw - bottomRightRadius,yh);
a = bottomLeftRadius * anchor;
s = bottomLeftRadius * control;
this.lineTo(x + bottomLeftRadius,yh);
this.curveTo(x + s,yh,x + a,yh - a);
this.curveTo(x,yh - s,x,yh - bottomLeftRadius);
a = topLeftRadius * anchor;
s = topLeftRadius * control;
this.lineTo(x,y + topLeftRadius);
this.curveTo(x,y + s,x + a,y + a);
this.curveTo(x + s,y,x + topLeftRadius,y);
a = topRightRadius * anchor;
s = topRightRadius * control;
this.lineTo(xw - topRightRadius,y);
this.curveTo(xw - s,y,xw - a,y + a);
this.curveTo(xw,y + s,xw,y + topRightRadius);
this.lineTo(xw,yh - bottomRightRadius);
this.set___dirty(true);
}
,drawTriangles: function(vertices,indices,uvtData,culling) {
if(culling == null) culling = 1;
if(vertices == null || indices == null || uvtData == null) return;
var vlen = Std["int"](vertices.get_length() / 2);
if(culling == null) culling = 1;
if(indices == null) {
if(vlen % 3 != 0) throw new js__$Boot_HaxeError(new openfl_errors_ArgumentError("Not enough vertices to close a triangle."));
indices = openfl__$Vector_Vector_$Impl_$.toIntVector(null);
var _g = 0;
while(_g < vlen) {
var i = _g++;
indices.push(i);
}
}
this.__inflateBounds(0,0);
var tmpx = -Infinity;
var tmpy = -Infinity;
var maxX = -Infinity;
var maxY = -Infinity;
var _g1 = 0;
while(_g1 < vlen) {
var i1 = _g1++;
tmpx = vertices.get(i1 * 2);
tmpy = vertices.get(i1 * 2 + 1);
if(maxX < tmpx) maxX = tmpx;
if(maxY < tmpy) maxY = tmpy;
}
this.__inflateBounds(maxX,maxY);
this.__commands.drawTriangles(vertices,indices,uvtData,culling);
this.set___dirty(true);
this.__visible = true;
}
,endFill: function() {
this.__commands.endFill();
}
,lineBitmapStyle: function(bitmap,matrix,repeat,smooth) {
if(smooth == null) smooth = false;
if(repeat == null) repeat = true;
this.__commands.lineBitmapStyle(bitmap,matrix != null?matrix.clone():null,repeat,smooth);
}
,lineGradientStyle: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
if(focalPointRatio == null) focalPointRatio = 0;
if(interpolationMethod == null) interpolationMethod = 1;
if(spreadMethod == null) spreadMethod = 0;
this.__commands.lineGradientStyle(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio);
}
,lineStyle: function(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit) {
if(miterLimit == null) miterLimit = 3;
if(scaleMode == null) scaleMode = 2;
if(pixelHinting == null) pixelHinting = false;
if(alpha == null) alpha = 1;
if(color == null) color = 0;
if(thickness != null) {
if(joints == 1) {
if(thickness > this.__strokePadding) this.__strokePadding = thickness;
} else if(thickness / 2 > this.__strokePadding) this.__strokePadding = thickness / 2;
}
this.__commands.lineStyle(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit);
if(thickness != null) this.__visible = true;
}
,lineTo: function(x,y) {
if(!isFinite(x) || !isFinite(y)) return;
this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
this.__positionX = x;
this.__positionY = y;
this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
this.__inflateBounds(this.__positionX + this.__strokePadding * 2,this.__positionY + this.__strokePadding);
this.__commands.lineTo(x,y);
this.set___dirty(true);
}
,moveTo: function(x,y) {
this.__positionX = x;
this.__positionY = y;
this.__commands.moveTo(x,y);
}
,readGraphicsData: function(recurse) {
if(recurse == null) recurse = true;
var graphicsData = openfl__$Vector_Vector_$Impl_$.toObjectVector(null);
this.__owner.__readGraphicsData(graphicsData,recurse);
return graphicsData;
}
,__calculateBezierCubicPoint: function(t,p1,p2,p3,p4) {
var iT = 1 - t;
return p1 * (iT * iT * iT) + 3 * p2 * t * (iT * iT) + 3 * p3 * iT * (t * t) + p4 * (t * t * t);
}
,__calculateBezierQuadPoint: function(t,p1,p2,p3) {
var iT = 1 - t;
return iT * iT * p1 + 2 * iT * t * p2 + t * t * p3;
}
,__cleanup: function() {
if(this.__bounds != null) {
this.set___dirty(true);
this.__transformDirty = true;
}
this.__bitmap = null;
this.__canvas = null;
this.__context = null;
}
,__getBounds: function(rect,matrix) {
if(this.__bounds == null) return;
var bounds = openfl_geom_Rectangle.__pool.get();
this.__bounds.__transform(bounds,matrix);
rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
openfl_geom_Rectangle.__pool.release(bounds);
}
,__hitTest: function(x,y,shapeFlag,matrix) {
if(this.__bounds == null) return false;
var px = matrix.__transformInverseX(x,y);
var py = matrix.__transformInverseY(x,y);
if(px > this.__bounds.x && py > this.__bounds.y && this.__bounds.contains(px,py)) {
if(shapeFlag) return openfl__$internal_renderer_canvas_CanvasGraphics.hitTest(this,px,py);
return true;
}
return false;
}
,__inflateBounds: function(x,y) {
if(this.__bounds == null) {
this.__bounds = new openfl_geom_Rectangle(x,y,0,0);
this.__transformDirty = true;
return;
}
if(x < this.__bounds.x) {
this.__bounds.width += this.__bounds.x - x;
this.__bounds.x = x;
this.__transformDirty = true;
}
if(y < this.__bounds.y) {
this.__bounds.height += this.__bounds.y - y;
this.__bounds.y = y;
this.__transformDirty = true;
}
if(x > this.__bounds.x + this.__bounds.width) this.__bounds.width = x - this.__bounds.x;
if(y > this.__bounds.y + this.__bounds.height) this.__bounds.height = y - this.__bounds.y;
}
,__readGraphicsData: function(graphicsData) {
var data = new openfl__$internal_renderer_DrawCommandReader(this.__commands);
var path = null;
var stroke;
var _g = 0;
var _g1 = this.__commands.types;
while(_g < _g1.length) {
var type = _g1[_g];
++_g;
switch(type[1]) {
case 3:case 4:case 15:case 16:case 5:case 6:case 7:case 8:
if(path == null) path = new openfl_display_GraphicsPath();
break;
default:
if(path != null) {
graphicsData.push(path);
path = null;
}
}
switch(type[1]) {
case 3:
var c;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
c = data;
path.cubicCurveTo(c.buffer.f[c.fPos],c.buffer.f[c.fPos + 1],c.buffer.f[c.fPos + 2],c.buffer.f[c.fPos + 3],c.buffer.f[c.fPos + 4],c.buffer.f[c.fPos + 5]);
break;
case 4:
var c1;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
c1 = data;
path.curveTo(c1.buffer.f[c1.fPos],c1.buffer.f[c1.fPos + 1],c1.buffer.f[c1.fPos + 2],c1.buffer.f[c1.fPos + 3]);
break;
case 15:
var c2;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
c2 = data;
path.lineTo(c2.buffer.f[c2.fPos],c2.buffer.f[c2.fPos + 1]);
break;
case 16:
var c3;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
c3 = data;
path.moveTo(c3.buffer.f[c3.fPos],c3.buffer.f[c3.fPos + 1]);
break;
case 5:
var c4;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
c4 = data;
path.__drawCircle(c4.buffer.f[c4.fPos],c4.buffer.f[c4.fPos + 1],c4.buffer.f[c4.fPos + 2]);
break;
case 6:
var c5;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
c5 = data;
path.__drawEllipse(c5.buffer.f[c5.fPos],c5.buffer.f[c5.fPos + 1],c5.buffer.f[c5.fPos + 2],c5.buffer.f[c5.fPos + 3]);
break;
case 7:
var c6;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
c6 = data;
path.__drawRect(c6.buffer.f[c6.fPos],c6.buffer.f[c6.fPos + 1],c6.buffer.f[c6.fPos + 2],c6.buffer.f[c6.fPos + 3]);
break;
case 8:
var c7;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
c7 = data;
path.__drawRoundRect(c7.buffer.f[c7.fPos],c7.buffer.f[c7.fPos + 1],c7.buffer.f[c7.fPos + 2],c7.buffer.f[c7.fPos + 3],c7.buffer.f[c7.fPos + 4],c7.buffer.o[c7.oPos] != null?c7.buffer.o[c7.oPos]:c7.buffer.f[c7.fPos + 4]);
break;
case 13:
var c8;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
c8 = data;
break;
case 12:
var c9;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
c9 = data;
path = null;
break;
case 14:
var c10;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
c10 = data;
stroke = new openfl_display_GraphicsStroke(c10.buffer.o[c10.oPos],c10.buffer.b[c10.bPos],c10.buffer.o[c10.oPos + 1],c10.buffer.o[c10.oPos + 2],c10.buffer.o[c10.oPos + 3],c10.buffer.f[c10.fPos + 1]);
stroke.fill = new openfl_display_GraphicsSolidFill(c10.buffer.i[c10.iPos],c10.buffer.f[c10.fPos]);
graphicsData.push(stroke);
break;
case 11:
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.END_FILL;
data;
var x = new openfl_display_GraphicsEndFill();
graphicsData.push(x);
break;
case 0:
var c11;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
c11 = data;
var x1 = new openfl_display_GraphicsBitmapFill(c11.buffer.o[c11.oPos],c11.buffer.o[c11.oPos + 1],c11.buffer.b[c11.bPos],c11.buffer.b[c11.bPos + 1]);
graphicsData.push(x1);
break;
case 1:
var c12;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
c12 = data;
var x2 = new openfl_display_GraphicsSolidFill(c12.buffer.i[c12.iPos],1);
graphicsData.push(x2);
break;
case 2:
var c13;
data.advance();
data.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
c13 = data;
var x3 = new openfl_display_GraphicsGradientFill(c13.buffer.o[c13.oPos],c13.buffer.ii[c13.iiPos],c13.buffer.ff[c13.ffPos],c13.buffer.ii[c13.iiPos + 1],c13.buffer.o[c13.oPos + 1],c13.buffer.o[c13.oPos + 2],c13.buffer.o[c13.oPos + 3],c13.buffer.f[c13.fPos]);
graphicsData.push(x3);
break;
default:
data.advance();
data.prev = type;
}
}
if(path != null) graphicsData.push(path);
}
,__update: function() {
if(this.__bounds == null || this.__bounds.width <= 0 || this.__bounds.height <= 0) return;
var parentTransform = this.__owner.__renderTransform;
var scaleX = 1.0;
var scaleY = 1.0;
if(parentTransform != null) {
if(parentTransform.b == 0) scaleX = Math.abs(parentTransform.a); else scaleX = Math.sqrt(parentTransform.a * parentTransform.a + parentTransform.b * parentTransform.b);
if(parentTransform.c == 0) scaleY = Math.abs(parentTransform.d); else scaleY = Math.sqrt(parentTransform.c * parentTransform.c + parentTransform.d * parentTransform.d);
} else return;
var width = this.__bounds.width * scaleX;
var height = this.__bounds.height * scaleY;
if(width < 1 || height < 1) {
if(this.__width >= 1 || this.__height >= 1) this.set___dirty(true);
this.__width = 0;
this.__height = 0;
return;
}
this.__renderTransform.a = width / this.__bounds.width;
this.__renderTransform.d = height / this.__bounds.height;
var inverseA = 1 / this.__renderTransform.a;
var inverseD = 1 / this.__renderTransform.d;
this.__worldTransform.a = inverseA * parentTransform.a;
this.__worldTransform.b = inverseA * parentTransform.b;
this.__worldTransform.c = inverseD * parentTransform.c;
this.__worldTransform.d = inverseD * parentTransform.d;
var x = this.__bounds.x;
var y = this.__bounds.y;
var tx = x * parentTransform.a + y * parentTransform.c + parentTransform.tx;
var ty = x * parentTransform.b + y * parentTransform.d + parentTransform.ty;
this.__worldTransform.tx = Math.floor(tx);
this.__worldTransform.ty = Math.floor(ty);
this.__renderTransform.tx = this.__worldTransform.__transformInverseX(tx,ty);
this.__renderTransform.ty = this.__worldTransform.__transformInverseY(tx,ty);
var newWidth = Math.ceil(width + this.__renderTransform.tx);
var newHeight = Math.ceil(height + this.__renderTransform.ty);
if(newWidth != this.__width || newHeight != this.__height) this.set___dirty(true);
this.__width = newWidth;
this.__height = newHeight;
}
,set___dirty: function(value) {
if(value && this.__owner != null) this.__owner.__setRenderDirty();
return this.__dirty = value;
}
,__class__: openfl_display_Graphics
,__properties__: {set___dirty:"set___dirty"}
};
var openfl_display_IGraphicsFill = function() { };
$hxClasses["openfl.display.IGraphicsFill"] = openfl_display_IGraphicsFill;
openfl_display_IGraphicsFill.__name__ = ["openfl","display","IGraphicsFill"];
openfl_display_IGraphicsFill.prototype = {
__graphicsFillType: null
,__class__: openfl_display_IGraphicsFill
};
var openfl_display_IGraphicsData = function() { };
$hxClasses["openfl.display.IGraphicsData"] = openfl_display_IGraphicsData;
openfl_display_IGraphicsData.__name__ = ["openfl","display","IGraphicsData"];
openfl_display_IGraphicsData.prototype = {
__graphicsDataType: null
,__class__: openfl_display_IGraphicsData
};
var openfl_display_GraphicsBitmapFill = function(bitmapData,matrix,repeat,smooth) {
if(smooth == null) smooth = false;
if(repeat == null) repeat = true;
this.bitmapData = bitmapData;
this.matrix = matrix;
this.repeat = repeat;
this.smooth = smooth;
this.__graphicsDataType = openfl_display_GraphicsDataType.BITMAP;
this.__graphicsFillType = openfl_display_GraphicsFillType.BITMAP_FILL;
};
$hxClasses["openfl.display.GraphicsBitmapFill"] = openfl_display_GraphicsBitmapFill;
openfl_display_GraphicsBitmapFill.__name__ = ["openfl","display","GraphicsBitmapFill"];
openfl_display_GraphicsBitmapFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsBitmapFill.prototype = {
bitmapData: null
,matrix: null
,repeat: null
,smooth: null
,__graphicsDataType: null
,__graphicsFillType: null
,__class__: openfl_display_GraphicsBitmapFill
};
var openfl_display_GraphicsEndFill = function() {
this.__graphicsDataType = openfl_display_GraphicsDataType.END;
this.__graphicsFillType = openfl_display_GraphicsFillType.END_FILL;
};
$hxClasses["openfl.display.GraphicsEndFill"] = openfl_display_GraphicsEndFill;
openfl_display_GraphicsEndFill.__name__ = ["openfl","display","GraphicsEndFill"];
openfl_display_GraphicsEndFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsEndFill.prototype = {
__graphicsDataType: null
,__graphicsFillType: null
,__class__: openfl_display_GraphicsEndFill
};
var openfl_display_GraphicsGradientFill = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
if(focalPointRatio == null) focalPointRatio = 0;
if(type == null) type = 0;
if(spreadMethod == null) spreadMethod = 0;
if(interpolationMethod == null) interpolationMethod = 1;
this.type = type;
this.colors = colors;
this.alphas = alphas;
this.ratios = ratios;
this.matrix = matrix;
this.spreadMethod = spreadMethod;
this.interpolationMethod = interpolationMethod;
this.focalPointRatio = focalPointRatio;
this.__graphicsDataType = openfl_display_GraphicsDataType.GRADIENT;
this.__graphicsFillType = openfl_display_GraphicsFillType.GRADIENT_FILL;
};
$hxClasses["openfl.display.GraphicsGradientFill"] = openfl_display_GraphicsGradientFill;
openfl_display_GraphicsGradientFill.__name__ = ["openfl","display","GraphicsGradientFill"];
openfl_display_GraphicsGradientFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsGradientFill.prototype = {
alphas: null
,colors: null
,focalPointRatio: null
,interpolationMethod: null
,matrix: null
,ratios: null
,spreadMethod: null
,type: null
,__graphicsDataType: null
,__graphicsFillType: null
,__class__: openfl_display_GraphicsGradientFill
};
var openfl_display_IGraphicsPath = function() { };
$hxClasses["openfl.display.IGraphicsPath"] = openfl_display_IGraphicsPath;
openfl_display_IGraphicsPath.__name__ = ["openfl","display","IGraphicsPath"];
var openfl_display_GraphicsPath = function(commands,data,winding) {
if(winding == null) winding = 0;
this.commands = commands;
this.data = data;
this.winding = winding;
this.__graphicsDataType = openfl_display_GraphicsDataType.PATH;
};
$hxClasses["openfl.display.GraphicsPath"] = openfl_display_GraphicsPath;
openfl_display_GraphicsPath.__name__ = ["openfl","display","GraphicsPath"];
openfl_display_GraphicsPath.__interfaces__ = [openfl_display_IGraphicsPath,openfl_display_IGraphicsData];
openfl_display_GraphicsPath.prototype = {
commands: null
,data: null
,winding: null
,__graphicsDataType: null
,cubicCurveTo: function(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY) {
if(this.commands == null) this.commands = openfl__$Vector_Vector_$Impl_$.toIntVector(null);
if(this.data == null) this.data = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.commands.push(6);
this.data.push(controlX1);
this.data.push(controlY1);
this.data.push(controlX2);
this.data.push(controlY2);
this.data.push(anchorX);
this.data.push(anchorY);
}
,curveTo: function(controlX,controlY,anchorX,anchorY) {
if(this.commands == null) this.commands = openfl__$Vector_Vector_$Impl_$.toIntVector(null);
if(this.data == null) this.data = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.commands.push(3);
this.data.push(controlX);
this.data.push(controlY);
this.data.push(anchorX);
this.data.push(anchorY);
}
,lineTo: function(x,y) {
if(this.commands == null) this.commands = openfl__$Vector_Vector_$Impl_$.toIntVector(null);
if(this.data == null) this.data = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.commands.push(2);
this.data.push(x);
this.data.push(y);
}
,moveTo: function(x,y) {
if(this.commands == null) this.commands = openfl__$Vector_Vector_$Impl_$.toIntVector(null);
if(this.data == null) this.data = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.commands.push(1);
this.data.push(x);
this.data.push(y);
}
,wideLineTo: function(x,y) {
if(this.commands == null) this.commands = openfl__$Vector_Vector_$Impl_$.toIntVector(null);
if(this.data == null) this.data = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.commands.push(2);
this.data.push(x);
this.data.push(y);
}
,wideMoveTo: function(x,y) {
if(this.commands == null) this.commands = openfl__$Vector_Vector_$Impl_$.toIntVector(null);
if(this.data == null) this.data = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
this.commands.push(1);
this.data.push(x);
this.data.push(y);
}
,__drawCircle: function(x,y,radius) {
this.__drawRoundRect(x - radius,y - radius,radius * 2,radius * 2,radius * 2,radius * 2);
}
,__drawEllipse: function(x,y,width,height) {
this.__drawRoundRect(x,y,width,height,width,height);
}
,__drawRect: function(x,y,width,height) {
this.moveTo(x,y);
this.lineTo(x + width,y);
this.lineTo(x + width,y + height);
this.lineTo(x,y + height);
this.lineTo(x,y);
}
,__drawRoundRect: function(x,y,width,height,ellipseWidth,ellipseHeight) {
ellipseWidth *= 0.5;
ellipseHeight *= 0.5;
if(ellipseWidth > width / 2) ellipseWidth = width / 2;
if(ellipseHeight > height / 2) ellipseHeight = height / 2;
var xe = x + width;
var ye = y + height;
var cx1 = -ellipseWidth + ellipseWidth * openfl_display_GraphicsPath.SIN45;
var cx2 = -ellipseWidth + ellipseWidth * openfl_display_GraphicsPath.TAN22;
var cy1 = -ellipseHeight + ellipseHeight * openfl_display_GraphicsPath.SIN45;
var cy2 = -ellipseHeight + ellipseHeight * openfl_display_GraphicsPath.TAN22;
this.moveTo(xe,ye - ellipseHeight);
this.curveTo(xe,ye + cy2,xe + cx1,ye + cy1);
this.curveTo(xe + cx2,ye,xe - ellipseWidth,ye);
this.lineTo(x + ellipseWidth,ye);
this.curveTo(x - cx2,ye,x - cx1,ye + cy1);
this.curveTo(x,ye + cy2,x,ye - ellipseHeight);
this.lineTo(x,y + ellipseHeight);
this.curveTo(x,y - cy2,x - cx1,y - cy1);
this.curveTo(x - cx2,y,x + ellipseWidth,y);
this.lineTo(xe - ellipseWidth,y);
this.curveTo(xe + cx2,y,xe + cx1,y - cy1);
this.curveTo(xe,y - cy2,xe,y + ellipseHeight);
this.lineTo(xe,ye - ellipseHeight);
}
,__class__: openfl_display_GraphicsPath
};
var openfl_display__$GraphicsPathWinding_GraphicsPathWinding_$Impl_$ = {};
$hxClasses["openfl.display._GraphicsPathWinding.GraphicsPathWinding_Impl_"] = openfl_display__$GraphicsPathWinding_GraphicsPathWinding_$Impl_$;
openfl_display__$GraphicsPathWinding_GraphicsPathWinding_$Impl_$.__name__ = ["openfl","display","_GraphicsPathWinding","GraphicsPathWinding_Impl_"];
openfl_display__$GraphicsPathWinding_GraphicsPathWinding_$Impl_$.fromString = function(value) {
switch(value) {
case "evenOdd":
return 0;
case "nonZero":
return 1;
default:
return null;
}
};
openfl_display__$GraphicsPathWinding_GraphicsPathWinding_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "evenOdd";
case 1:
return "nonZero";
default:
return null;
}
};
var openfl_display_GraphicsSolidFill = function(color,alpha) {
if(alpha == null) alpha = 1;
if(color == null) color = 0;
this.alpha = alpha;
this.color = color;
this.__graphicsDataType = openfl_display_GraphicsDataType.SOLID;
this.__graphicsFillType = openfl_display_GraphicsFillType.SOLID_FILL;
};
$hxClasses["openfl.display.GraphicsSolidFill"] = openfl_display_GraphicsSolidFill;
openfl_display_GraphicsSolidFill.__name__ = ["openfl","display","GraphicsSolidFill"];
openfl_display_GraphicsSolidFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsSolidFill.prototype = {
alpha: null
,color: null
,__graphicsDataType: null
,__graphicsFillType: null
,__class__: openfl_display_GraphicsSolidFill
};
var openfl_display_IGraphicsStroke = function() { };
$hxClasses["openfl.display.IGraphicsStroke"] = openfl_display_IGraphicsStroke;
openfl_display_IGraphicsStroke.__name__ = ["openfl","display","IGraphicsStroke"];
var openfl_display_GraphicsStroke = function(thickness,pixelHinting,scaleMode,caps,joints,miterLimit,fill) {
if(miterLimit == null) miterLimit = 3;
if(joints == null) joints = 2;
if(caps == null) caps = 0;
if(scaleMode == null) scaleMode = 2;
if(pixelHinting == null) pixelHinting = false;
if(thickness == null) thickness = NaN;
this.caps = caps;
this.fill = fill;
this.joints = joints;
this.miterLimit = miterLimit;
this.pixelHinting = pixelHinting;
this.scaleMode = scaleMode;
this.thickness = thickness;
this.__graphicsDataType = openfl_display_GraphicsDataType.STROKE;
};
$hxClasses["openfl.display.GraphicsStroke"] = openfl_display_GraphicsStroke;
openfl_display_GraphicsStroke.__name__ = ["openfl","display","GraphicsStroke"];
openfl_display_GraphicsStroke.__interfaces__ = [openfl_display_IGraphicsStroke,openfl_display_IGraphicsData];
openfl_display_GraphicsStroke.prototype = {
caps: null
,fill: null
,joints: null
,miterLimit: null
,pixelHinting: null
,scaleMode: null
,thickness: null
,__graphicsDataType: null
,__class__: openfl_display_GraphicsStroke
};
var openfl_display_GraphicsTrianglePath = function(vertices,indices,uvtData,culling) {
if(culling == null) culling = 1;
this.vertices = vertices;
this.indices = indices;
this.uvtData = uvtData;
this.culling = culling;
this.__graphicsDataType = openfl_display_GraphicsDataType.TRIANGLE_PATH;
};
$hxClasses["openfl.display.GraphicsTrianglePath"] = openfl_display_GraphicsTrianglePath;
openfl_display_GraphicsTrianglePath.__name__ = ["openfl","display","GraphicsTrianglePath"];
openfl_display_GraphicsTrianglePath.__interfaces__ = [openfl_display_IGraphicsPath,openfl_display_IGraphicsData];
openfl_display_GraphicsTrianglePath.prototype = {
culling: null
,indices: null
,uvtData: null
,vertices: null
,__graphicsDataType: null
,__class__: openfl_display_GraphicsTrianglePath
};
var openfl_display_GraphicsDataType = $hxClasses["openfl.display.GraphicsDataType"] = { __ename__ : ["openfl","display","GraphicsDataType"], __constructs__ : ["STROKE","SOLID","GRADIENT","PATH","BITMAP","END","TRIANGLE_PATH"] };
openfl_display_GraphicsDataType.STROKE = ["STROKE",0];
openfl_display_GraphicsDataType.STROKE.toString = $estr;
openfl_display_GraphicsDataType.STROKE.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.SOLID = ["SOLID",1];
openfl_display_GraphicsDataType.SOLID.toString = $estr;
openfl_display_GraphicsDataType.SOLID.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.GRADIENT = ["GRADIENT",2];
openfl_display_GraphicsDataType.GRADIENT.toString = $estr;
openfl_display_GraphicsDataType.GRADIENT.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.PATH = ["PATH",3];
openfl_display_GraphicsDataType.PATH.toString = $estr;
openfl_display_GraphicsDataType.PATH.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.BITMAP = ["BITMAP",4];
openfl_display_GraphicsDataType.BITMAP.toString = $estr;
openfl_display_GraphicsDataType.BITMAP.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.END = ["END",5];
openfl_display_GraphicsDataType.END.toString = $estr;
openfl_display_GraphicsDataType.END.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.TRIANGLE_PATH = ["TRIANGLE_PATH",6];
openfl_display_GraphicsDataType.TRIANGLE_PATH.toString = $estr;
openfl_display_GraphicsDataType.TRIANGLE_PATH.__enum__ = openfl_display_GraphicsDataType;
var openfl_display_GraphicsFillType = $hxClasses["openfl.display.GraphicsFillType"] = { __ename__ : ["openfl","display","GraphicsFillType"], __constructs__ : ["SOLID_FILL","GRADIENT_FILL","BITMAP_FILL","END_FILL"] };
openfl_display_GraphicsFillType.SOLID_FILL = ["SOLID_FILL",0];
openfl_display_GraphicsFillType.SOLID_FILL.toString = $estr;
openfl_display_GraphicsFillType.SOLID_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.GRADIENT_FILL = ["GRADIENT_FILL",1];
openfl_display_GraphicsFillType.GRADIENT_FILL.toString = $estr;
openfl_display_GraphicsFillType.GRADIENT_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.BITMAP_FILL = ["BITMAP_FILL",2];
openfl_display_GraphicsFillType.BITMAP_FILL.toString = $estr;
openfl_display_GraphicsFillType.BITMAP_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.END_FILL = ["END_FILL",3];
openfl_display_GraphicsFillType.END_FILL.toString = $estr;
openfl_display_GraphicsFillType.END_FILL.__enum__ = openfl_display_GraphicsFillType;
var openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$ = {};
$hxClasses["openfl.display._InterpolationMethod.InterpolationMethod_Impl_"] = openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.__name__ = ["openfl","display","_InterpolationMethod","InterpolationMethod_Impl_"];
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.fromString = function(value) {
switch(value) {
case "linearRGB":
return 0;
case "rgb":
return 1;
default:
return null;
}
};
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "linearRGB";
case 1:
return "rgb";
default:
return null;
}
};
var openfl_display_JPEGEncoderOptions = function(quality) {
if(quality == null) quality = 80;
this.quality = quality;
};
$hxClasses["openfl.display.JPEGEncoderOptions"] = openfl_display_JPEGEncoderOptions;
openfl_display_JPEGEncoderOptions.__name__ = ["openfl","display","JPEGEncoderOptions"];
openfl_display_JPEGEncoderOptions.prototype = {
quality: null
,__class__: openfl_display_JPEGEncoderOptions
};
var openfl_display__$JointStyle_JointStyle_$Impl_$ = {};
$hxClasses["openfl.display._JointStyle.JointStyle_Impl_"] = openfl_display__$JointStyle_JointStyle_$Impl_$;
openfl_display__$JointStyle_JointStyle_$Impl_$.__name__ = ["openfl","display","_JointStyle","JointStyle_Impl_"];
openfl_display__$JointStyle_JointStyle_$Impl_$.fromString = function(value) {
switch(value) {
case "bevel":
return 0;
case "miter":
return 1;
case "round":
return 2;
default:
return null;
}
};
openfl_display__$JointStyle_JointStyle_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "bevel";
case 1:
return "miter";
case 2:
return "round";
default:
return null;
}
};
var openfl_display__$LineScaleMode_LineScaleMode_$Impl_$ = {};
$hxClasses["openfl.display._LineScaleMode.LineScaleMode_Impl_"] = openfl_display__$LineScaleMode_LineScaleMode_$Impl_$;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.__name__ = ["openfl","display","_LineScaleMode","LineScaleMode_Impl_"];
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.fromString = function(value) {
switch(value) {
case "horizontal":
return 0;
case "none":
return 1;
case "normal":
return 2;
case "vertical":
return 3;
default:
return null;
}
};
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "horizontal";
case 1:
return "none";
case 2:
return "normal";
case 3:
return "vertical";
default:
return null;
}
};
var openfl_display_Loader = function() {
openfl_display_DisplayObjectContainer.call(this);
this.contentLoaderInfo = openfl_display_LoaderInfo.create(this);
};
$hxClasses["openfl.display.Loader"] = openfl_display_Loader;
openfl_display_Loader.__name__ = ["openfl","display","Loader"];
openfl_display_Loader.__super__ = openfl_display_DisplayObjectContainer;
openfl_display_Loader.prototype = $extend(openfl_display_DisplayObjectContainer.prototype,{
content: null
,contentLoaderInfo: null
,__path: null
,close: function() {
openfl_Lib.notImplemented({ fileName : "Loader.hx", lineNumber : 54, className : "openfl.display.Loader", methodName : "close"});
}
,load: function(request,context) {
this.contentLoaderInfo.url = request.url;
if(request.contentType == null || request.contentType == "") {
var extension = "";
this.__path = request.url;
var queryIndex = this.__path.indexOf("?");
if(queryIndex > -1) this.__path = this.__path.substring(0,queryIndex);
while(StringTools.endsWith(this.__path,"/")) this.__path = this.__path.substring(0,this.__path.length - 1);
if(StringTools.endsWith(this.__path,".bundle")) {
this.__path += "/library.json";
if(queryIndex > -1) request.url = this.__path + request.url.substring(queryIndex); else request.url = this.__path;
}
var extIndex = this.__path.lastIndexOf(".");
if(extIndex > -1) extension = this.__path.substring(extIndex + 1);
switch(extension) {
case "json":
this.contentLoaderInfo.contentType = "application/json";
break;
case "swf":
this.contentLoaderInfo.contentType = "application/x-shockwave-flash";
break;
case "jpg":case "jpeg":
this.contentLoaderInfo.contentType = "image/jpeg";
break;
case "png":
this.contentLoaderInfo.contentType = "image/png";
break;
case "gif":
this.contentLoaderInfo.contentType = "image/gif";
break;
case "js":
this.contentLoaderInfo.contentType = "application/javascript";
break;
default:
this.contentLoaderInfo.contentType = "application/x-www-form-urlencoded";
}
} else this.contentLoaderInfo.contentType = request.contentType;
if(this.contentLoaderInfo.contentType.indexOf("image/") > -1 && request.method == "GET" && (request.requestHeaders == null || request.requestHeaders.length == 0) && request.userAgent == null) {
openfl_display_BitmapData.loadFromFile(request.url).onComplete($bind(this,this.BitmapData_onLoad)).onError($bind(this,this.BitmapData_onError)).onProgress($bind(this,this.BitmapData_onProgress));
return;
}
var loader = new openfl_net_URLLoader();
loader.dataFormat = 0;
if(this.contentLoaderInfo.contentType.indexOf("/json") > -1 || this.contentLoaderInfo.contentType.indexOf("/javascript") > -1 || this.contentLoaderInfo.contentType.indexOf("/ecmascript") > -1) loader.dataFormat = 1;
loader.addEventListener("complete",$bind(this,this.loader_onComplete));
loader.addEventListener("ioError",$bind(this,this.loader_onError));
loader.addEventListener("progress",$bind(this,this.loader_onProgress));
loader.load(request);
}
,loadBytes: function(buffer,context) {
openfl_display_BitmapData.loadFromBytes(buffer).onComplete($bind(this,this.BitmapData_onLoad)).onError($bind(this,this.BitmapData_onError));
}
,unload: function() {
if(this.get_numChildren() > 0) {
while(this.get_numChildren() > 0) this.removeChildAt(0);
this.content = null;
this.contentLoaderInfo.url = null;
this.contentLoaderInfo.contentType = null;
this.contentLoaderInfo.content = null;
this.contentLoaderInfo.bytesLoaded = 0;
this.contentLoaderInfo.bytesTotal = 0;
this.contentLoaderInfo.width = 0;
this.contentLoaderInfo.height = 0;
this.dispatchEvent(new openfl_events_Event("unload"));
}
}
,unloadAndStop: function(gc) {
if(gc == null) gc = true;
if(this.content != null) this.content.__stopAllMovieClips();
var _g1 = 0;
var _g = this.get_numChildren();
while(_g1 < _g) {
var i = _g1++;
this.getChildAt(i).__stopAllMovieClips();
}
this.unload();
if(gc) {
}
}
,__dispatchError: function(text) {
var event = new openfl_events_IOErrorEvent("ioError");
event.text = text;
this.contentLoaderInfo.dispatchEvent(event);
}
,BitmapData_onError: function(error) {
this.__dispatchError(Std.string(error));
}
,BitmapData_onLoad: function(bitmapData) {
this.contentLoaderInfo.content = new openfl_display_Bitmap(bitmapData);
this.content = this.contentLoaderInfo.content;
this.addChild(this.content);
this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"));
}
,BitmapData_onProgress: function(bytesLoaded,bytesTotal) {
var event = new openfl_events_ProgressEvent("progress");
event.bytesLoaded = bytesLoaded;
event.bytesTotal = bytesTotal;
this.contentLoaderInfo.dispatchEvent(event);
}
,loader_onComplete: function(event) {
var _g = this;
var loader = event.target;
if(this.contentLoaderInfo.contentType.indexOf("/json") > -1) {
var manifest = lime_utils_AssetManifest.parse(loader.data,haxe_io_Path.directory(this.__path));
if(manifest == null) {
this.__dispatchError("Cannot parse asset manifest");
return;
}
var library = lime_utils_AssetLibrary.fromManifest(manifest);
if(library == null) {
this.__dispatchError("Cannot open library");
return;
}
if(js_Boot.__instanceof(library,openfl_utils_AssetLibrary)) library.load().onComplete(function(_) {
_g.contentLoaderInfo.content = (js_Boot.__cast(library , openfl_utils_AssetLibrary)).getMovieClip("");
_g.addChild(_g.contentLoaderInfo.content);
_g.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"));
}).onError(function(e) {
_g.__dispatchError(e);
});
} else if(this.contentLoaderInfo.contentType.indexOf("/javascript") > -1 || this.contentLoaderInfo.contentType.indexOf("/ecmascript") > -1) {
this.contentLoaderInfo.content = new openfl_display_Sprite();
this.addChild(this.contentLoaderInfo.content);
eval("(function () {" + Std.string(loader.data) + "})()");
this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"));
} else openfl_display_BitmapData.loadFromBytes(loader.data).onComplete($bind(this,this.BitmapData_onLoad)).onError($bind(this,this.BitmapData_onError));
}
,loader_onError: function(event) {
event.target = this.contentLoaderInfo;
this.contentLoaderInfo.dispatchEvent(event);
}
,loader_onProgress: function(event) {
event.target = this.contentLoaderInfo;
this.contentLoaderInfo.dispatchEvent(event);
}
,__class__: openfl_display_Loader
});
var openfl_display_LoaderInfo = function() {
openfl_events_EventDispatcher.call(this);
this.applicationDomain = openfl_system_ApplicationDomain.currentDomain;
this.bytesLoaded = 0;
this.bytesTotal = 0;
this.childAllowsParent = true;
this.parameters = { };
};
$hxClasses["openfl.display.LoaderInfo"] = openfl_display_LoaderInfo;
openfl_display_LoaderInfo.__name__ = ["openfl","display","LoaderInfo"];
openfl_display_LoaderInfo.create = function(loader) {
var loaderInfo = new openfl_display_LoaderInfo();
loaderInfo.uncaughtErrorEvents = new openfl_events_UncaughtErrorEvents();
if(loader != null) loaderInfo.loader = loader; else loaderInfo.url = openfl_display_LoaderInfo.__rootURL;
return loaderInfo;
};
openfl_display_LoaderInfo.__super__ = openfl_events_EventDispatcher;
openfl_display_LoaderInfo.prototype = $extend(openfl_events_EventDispatcher.prototype,{
applicationDomain: null
,bytes: null
,bytesLoaded: null
,bytesTotal: null
,childAllowsParent: null
,content: null
,contentType: null
,frameRate: null
,height: null
,loader: null
,loaderURL: null
,parameters: null
,parentAllowsChild: null
,sameDomain: null
,sharedEvents: null
,uncaughtErrorEvents: null
,url: null
,width: null
,__completed: null
,__complete: function() {
if(!this.__completed) {
if(this.bytesLoaded < this.bytesTotal) this.bytesLoaded = this.bytesTotal;
this.__update(this.bytesLoaded,this.bytesTotal);
this.__completed = true;
this.dispatchEvent(new openfl_events_Event("complete"));
}
}
,__update: function(bytesLoaded,bytesTotal) {
this.bytesLoaded = bytesLoaded;
this.bytesTotal = bytesTotal;
this.dispatchEvent(new openfl_events_ProgressEvent("progress",false,false,bytesLoaded,bytesTotal));
}
,__class__: openfl_display_LoaderInfo
});
var openfl_display__$MovieClip_TimelineObject = function(id,depth,clipDepth,displayObject) {
this.id = id;
this.depth = depth;
this.clipDepth = clipDepth;
this.displayObject = displayObject;
};
$hxClasses["openfl.display._MovieClip.TimelineObject"] = openfl_display__$MovieClip_TimelineObject;
openfl_display__$MovieClip_TimelineObject.__name__ = ["openfl","display","_MovieClip","TimelineObject"];
openfl_display__$MovieClip_TimelineObject.prototype = {
clipDepth: null
,depth: null
,displayObject: null
,id: null
,__class__: openfl_display__$MovieClip_TimelineObject
};
var openfl_display_PNGEncoderOptions = function(fastCompression) {
if(fastCompression == null) fastCompression = false;
this.fastCompression = fastCompression;
};
$hxClasses["openfl.display.PNGEncoderOptions"] = openfl_display_PNGEncoderOptions;
openfl_display_PNGEncoderOptions.__name__ = ["openfl","display","PNGEncoderOptions"];
openfl_display_PNGEncoderOptions.prototype = {
fastCompression: null
,__class__: openfl_display_PNGEncoderOptions
};
var openfl_display__$PixelSnapping_PixelSnapping_$Impl_$ = {};
$hxClasses["openfl.display._PixelSnapping.PixelSnapping_Impl_"] = openfl_display__$PixelSnapping_PixelSnapping_$Impl_$;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.__name__ = ["openfl","display","_PixelSnapping","PixelSnapping_Impl_"];
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.fromString = function(value) {
switch(value) {
case "always":
return 0;
case "auto":
return 1;
case "never":
return 2;
default:
return null;
}
};
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "always";
case 1:
return "auto";
case 2:
return "never";
default:
return null;
}
};
var openfl_display_Preloader = function(display) {
lime_app_Preloader.call(this);
this.display = display;
if(display != null) {
display.addEventListener("unload",$bind(this,this.display_onUnload));
openfl_Lib.current.addChild(display);
}
};
$hxClasses["openfl.display.Preloader"] = openfl_display_Preloader;
openfl_display_Preloader.__name__ = ["openfl","display","Preloader"];
openfl_display_Preloader.__super__ = lime_app_Preloader;
openfl_display_Preloader.prototype = $extend(lime_app_Preloader.prototype,{
display: null
,ready: null
,start: function() {
if(this.simulateProgress) return;
this.ready = true;
openfl_Lib.current.get_loaderInfo().__complete();
if(this.display != null) {
var complete = new openfl_events_Event("complete",true,true);
this.display.dispatchEvent(complete);
if(!complete.isDefaultPrevented()) this.display.dispatchEvent(new openfl_events_Event("unload"));
} else lime_app_Preloader.prototype.start.call(this);
}
,update: function(loaded,total) {
openfl_Lib.current.get_loaderInfo().__update(loaded,total);
if(this.display != null) this.display.dispatchEvent(new openfl_events_ProgressEvent("progress",true,true,loaded,total));
}
,display_onUnload: function(event) {
if(this.display != null) {
this.display.removeEventListener("unload",$bind(this,this.display_onUnload));
if(this.display.parent == openfl_Lib.current) openfl_Lib.current.removeChild(this.display);
openfl_Lib.current.stage.set_focus(null);
this.display = null;
}
if(this.ready && !this.simulateProgress) lime_app_Preloader.prototype.start.call(this);
}
,__class__: openfl_display_Preloader
});
var openfl_display_DefaultPreloader = function() {
openfl_display_Sprite.call(this);
var backgroundColor = this.getBackgroundColor();
var r = backgroundColor >> 16 & 255;
var g = backgroundColor >> 8 & 255;
var b = backgroundColor & 255;
var perceivedLuminosity = 0.299 * r + 0.587 * g + 0.114 * b;
var color = 0;
if(perceivedLuminosity < 70) color = 16777215;
var x = 30;
var height = 7;
var y = this.getHeight() / 2 - height / 2;
var width = this.getWidth() - x * 2;
var padding = 2;
this.outline = new openfl_display_Sprite();
this.outline.get_graphics().beginFill(color,0.07);
this.outline.get_graphics().drawRect(0,0,width,height);
this.outline.set_x(x);
this.outline.set_y(y);
this.outline.set_alpha(0);
this.addChild(this.outline);
this.progress = new openfl_display_Sprite();
this.progress.get_graphics().beginFill(color,0.35);
this.progress.get_graphics().drawRect(0,0,width - padding * 2,height - padding * 2);
this.progress.set_x(x + padding);
this.progress.set_y(y + padding);
this.progress.set_scaleX(0);
this.progress.set_alpha(0);
this.addChild(this.progress);
this.startAnimation = openfl_Lib.getTimer() + 100;
this.endAnimation = this.startAnimation + 1000;
this.addEventListener("addedToStage",$bind(this,this.this_onAddedToStage));
};
$hxClasses["openfl.display.DefaultPreloader"] = openfl_display_DefaultPreloader;
openfl_display_DefaultPreloader.__name__ = ["openfl","display","DefaultPreloader"];
openfl_display_DefaultPreloader.__super__ = openfl_display_Sprite;
openfl_display_DefaultPreloader.prototype = $extend(openfl_display_Sprite.prototype,{
endAnimation: null
,outline: null
,progress: null
,startAnimation: null
,getBackgroundColor: function() {
return openfl_Lib.current.stage.window.config.background;
}
,getHeight: function() {
var height = openfl_Lib.current.stage.window.config.height;
if(height > 0) return height; else return openfl_Lib.current.stage.stageHeight;
}
,getWidth: function() {
var width = openfl_Lib.current.stage.window.config.width;
if(width > 0) return width; else return openfl_Lib.current.stage.stageWidth;
}
,onInit: function() {
this.addEventListener("enterFrame",$bind(this,this.this_onEnterFrame));
}
,onLoaded: function() {
this.removeEventListener("enterFrame",$bind(this,this.this_onEnterFrame));
this.dispatchEvent(new openfl_events_Event("unload"));
}
,onUpdate: function(bytesLoaded,bytesTotal) {
var percentLoaded = 0.0;
if(bytesTotal > 0) {
percentLoaded = bytesLoaded / bytesTotal;
if(percentLoaded > 1) percentLoaded = 1;
}
this.progress.set_scaleX(percentLoaded);
}
,this_onAddedToStage: function(event) {
this.removeEventListener("addedToStage",$bind(this,this.this_onAddedToStage));
this.onInit();
this.onUpdate(this.get_loaderInfo().bytesLoaded,this.get_loaderInfo().bytesTotal);
this.addEventListener("progress",$bind(this,this.this_onProgress));
this.addEventListener("complete",$bind(this,this.this_onComplete));
}
,this_onComplete: function(event) {
event.preventDefault();
this.removeEventListener("progress",$bind(this,this.this_onProgress));
this.removeEventListener("complete",$bind(this,this.this_onComplete));
this.onLoaded();
}
,this_onEnterFrame: function(event) {
var elapsed = openfl_Lib.getTimer() - this.startAnimation;
var total = this.endAnimation - this.startAnimation;
var percent = elapsed / total;
if(percent < 0) percent = 0;
if(percent > 1) percent = 1;
this.outline.set_alpha(percent);
this.progress.set_alpha(percent);
}
,this_onProgress: function(event) {
this.onUpdate(event.bytesLoaded | 0,event.bytesTotal | 0);
}
,__class__: openfl_display_DefaultPreloader
});
var openfl_display_Shader = function(code) {
this.__data = new openfl_display_ShaderData(null);
if(this.__glFragmentSource == null) this.__glFragmentSource = "varying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\tuniform sampler2D uImage0;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 color = texture2D (uImage0, vTexCoord);\n\t\t\t\n\t\t\tif (color.a == 0.0) {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tgl_FragColor = color * vAlpha;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}";
if(this.__glVertexSource == null) this.__glVertexSource = "attribute float aAlpha;\n\t\tattribute vec4 aPosition;\n\t\tattribute vec2 aTexCoord;\n\t\tvarying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\t\n\t\tuniform mat4 uMatrix;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvAlpha = aAlpha;\n\t\t\tvTexCoord = aTexCoord;\n\t\t\tgl_Position = uMatrix * aPosition;\n\t\t\t\n\t\t}";
this.byteCode = code;
this.precisionHint = 1;
this.__glSourceDirty = true;
this.__numPasses = 1;
};
$hxClasses["openfl.display.Shader"] = openfl_display_Shader;
openfl_display_Shader.__name__ = ["openfl","display","Shader"];
openfl_display_Shader.prototype = {
byteCode: null
,glProgram: null
,precisionHint: null
,gl: null
,__data: null
,__glFragmentSource: null
,__glSourceDirty: null
,__glVertexSource: null
,__isUniform: null
,__inputBitmapData: null
,__numPasses: null
,__paramBool: null
,__paramFloat: null
,__paramInt: null
,__uniformMatrix2: null
,__uniformMatrix3: null
,__uniformMatrix4: null
,__disable: function() {
if(this.glProgram != null) this.__disableGL();
}
,__disableGL: function() {
if(this.get_data().uImage0 != null) this.get_data().uImage0.input = null;
var _g = 0;
var _g1 = this.__paramBool;
while(_g < _g1.length) {
var parameter = _g1[_g];
++_g;
this.gl.disableVertexAttribArray(parameter.index);
}
var _g2 = 0;
var _g11 = this.__paramFloat;
while(_g2 < _g11.length) {
var parameter1 = _g11[_g2];
++_g2;
this.gl.disableVertexAttribArray(parameter1.index);
}
var _g3 = 0;
var _g12 = this.__paramInt;
while(_g3 < _g12.length) {
var parameter2 = _g12[_g3];
++_g3;
this.gl.disableVertexAttribArray(parameter2.index);
}
this.gl.__context.bindBuffer(this.gl.ARRAY_BUFFER,null);
this.gl.__context.bindTexture(this.gl.TEXTURE_2D,null);
if(this.gl.type == lime_graphics_opengl_GLContextType.OPENGL) this.gl.__context.disable(this.gl.TEXTURE_2D);
}
,__enable: function() {
this.__init();
if(this.glProgram != null) this.__enableGL();
}
,__enableGL: function() {
var textureCount = 0;
var _g = 0;
var _g1 = this.__inputBitmapData;
while(_g < _g1.length) {
var input = _g1[_g];
++_g;
this.gl.uniform1i(input.index,textureCount);
textureCount++;
}
if(this.gl.type == lime_graphics_opengl_GLContextType.OPENGL && textureCount > 0) this.gl.__context.enable(this.gl.TEXTURE_2D);
}
,__init: function() {
if(this.__data == null) this.__data = new openfl_display_ShaderData(null);
if(this.__glFragmentSource != null && this.__glVertexSource != null && (this.glProgram == null || this.__glSourceDirty)) this.__initGL();
}
,__initGL: function() {
if(this.__glSourceDirty || this.__isUniform == null) {
this.__glSourceDirty = false;
this.glProgram = null;
this.__isUniform = new haxe_ds_StringMap();
this.__inputBitmapData = [];
this.__paramBool = [];
this.__paramFloat = [];
this.__paramInt = [];
var this1;
this1 = new Float32Array(4);
this.__uniformMatrix2 = this1;
var this2;
this2 = new Float32Array(9);
this.__uniformMatrix3 = this2;
var this3;
this3 = new Float32Array(16);
this.__uniformMatrix4 = this3;
this.__processGLData(this.get_glVertexSource(),"attribute");
this.__processGLData(this.get_glVertexSource(),"uniform");
this.__processGLData(this.get_glFragmentSource(),"uniform");
}
if(this.gl != null && this.glProgram == null) {
var fragment;
fragment = "#ifdef GL_ES\n\t\t\t\tprecision " + (this.precisionHint == 1?"mediump":"lowp") + " float;\n\t\t\t\t#endif\n\t\t\t\t" + this.get_glFragmentSource();
this.glProgram = lime_utils_GLUtils.createProgram(this.get_glVertexSource(),fragment);
if(this.glProgram != null) {
var _g = 0;
var _g1 = this.__inputBitmapData;
while(_g < _g1.length) {
var input = _g1[_g];
++_g;
if(this.__isUniform.get(input.name)) input.index = this.gl.__context.getUniformLocation(this.glProgram,input.name); else input.index = this.gl.__context.getAttribLocation(this.glProgram,input.name);
}
var _g2 = 0;
var _g11 = this.__paramBool;
while(_g2 < _g11.length) {
var parameter = _g11[_g2];
++_g2;
if(this.__isUniform.get(parameter.name)) parameter.index = this.gl.__context.getUniformLocation(this.glProgram,parameter.name); else parameter.index = this.gl.__context.getAttribLocation(this.glProgram,parameter.name);
}
var _g3 = 0;
var _g12 = this.__paramFloat;
while(_g3 < _g12.length) {
var parameter1 = _g12[_g3];
++_g3;
if(this.__isUniform.get(parameter1.name)) parameter1.index = this.gl.__context.getUniformLocation(this.glProgram,parameter1.name); else parameter1.index = this.gl.__context.getAttribLocation(this.glProgram,parameter1.name);
}
var _g4 = 0;
var _g13 = this.__paramInt;
while(_g4 < _g13.length) {
var parameter2 = _g13[_g4];
++_g4;
if(this.__isUniform.get(parameter2.name)) parameter2.index = this.gl.__context.getUniformLocation(this.glProgram,parameter2.name); else parameter2.index = this.gl.__context.getAttribLocation(this.glProgram,parameter2.name);
}
}
}
}
,__processGLData: function(source,storageType) {
var lastMatch = 0;
var position;
var regex;
var name;
var type;
if(storageType == "uniform") regex = new EReg("uniform ([A-Za-z0-9]+) ([A-Za-z0-9]+)",""); else regex = new EReg("attribute ([A-Za-z0-9]+) ([A-Za-z0-9]+)","");
while(regex.matchSub(source,lastMatch)) {
type = regex.matched(1);
name = regex.matched(2);
if(StringTools.startsWith(type,"sampler")) {
var input = new openfl_display_ShaderInput();
input.name = name;
this.__inputBitmapData.push(input);
Reflect.setField(this.get_data(),name,input);
} else {
var parameterType;
switch(type) {
case "bool":
parameterType = 0;
break;
case "double":case "float":
parameterType = 4;
break;
case "int":case "uint":
parameterType = 8;
break;
case "bvec2":
parameterType = 1;
break;
case "bvec3":
parameterType = 2;
break;
case "bvec4":
parameterType = 3;
break;
case "ivec2":case "uvec2":
parameterType = 9;
break;
case "ivec3":case "uvec3":
parameterType = 10;
break;
case "ivec4":case "uvec4":
parameterType = 11;
break;
case "vec2":case "dvec2":
parameterType = 5;
break;
case "vec3":case "dvec3":
parameterType = 6;
break;
case "vec4":case "dvec4":
parameterType = 7;
break;
case "mat2":case "mat2x2":
parameterType = 12;
break;
case "mat2x3":
parameterType = 13;
break;
case "mat2x4":
parameterType = 14;
break;
case "mat3x2":
parameterType = 15;
break;
case "mat3":case "mat3x3":
parameterType = 16;
break;
case "mat3x4":
parameterType = 17;
break;
case "mat4x2":
parameterType = 18;
break;
case "mat4x3":
parameterType = 19;
break;
case "mat4":case "mat4x4":
parameterType = 20;
break;
default:
parameterType = null;
}
switch(parameterType) {
case 0:case 1:case 2:case 3:
var parameter = new openfl_display_ShaderParameter();
parameter.name = name;
parameter.type = parameterType;
this.__paramBool.push(parameter);
Reflect.setField(this.get_data(),name,parameter);
break;
case 8:case 9:case 10:case 11:
var parameter1 = new openfl_display_ShaderParameter();
parameter1.name = name;
parameter1.type = parameterType;
this.__paramInt.push(parameter1);
Reflect.setField(this.get_data(),name,parameter1);
break;
default:
var parameter2 = new openfl_display_ShaderParameter();
parameter2.name = name;
parameter2.type = parameterType;
this.__paramFloat.push(parameter2);
Reflect.setField(this.get_data(),name,parameter2);
}
}
this.__isUniform.set(name,storageType == "uniform");
position = regex.matchedPos();
lastMatch = position.pos + position.len;
}
}
,__update: function() {
if(this.glProgram != null) this.__updateGL();
}
,__updateGL: function() {
var textureCount = 0;
var _g = 0;
var _g1 = this.__inputBitmapData;
while(_g < _g1.length) {
var input = _g1[_g];
++_g;
if(input.input != null) {
this.gl.__context.activeTexture(this.gl.TEXTURE0 + textureCount);
this.gl.bindTexture(this.gl.TEXTURE_2D,input.input.getTexture(this.gl));
if(input.smoothing) {
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR);
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR);
} else {
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST);
this.gl.__context.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST);
}
}
textureCount++;
}
var value;
var index;
var _g2 = 0;
var _g11 = this.__paramBool;
while(_g2 < _g11.length) {
var parameter = _g11[_g2];
++_g2;
value = parameter.value;
index = parameter.index;
if(value != null) {
var _g21 = parameter.type;
switch(_g21) {
case 0:
this.gl.__context.uniform1i(index,value[0]?1:0);
break;
case 1:
this.gl.__context.uniform2i(index,value[0]?1:0,value[1]?1:0);
break;
case 2:
this.gl.__context.uniform3i(index,value[0]?1:0,value[1]?1:0,value[2]?1:0);
break;
case 3:
this.gl.__context.uniform4i(index,value[0]?1:0,value[1]?1:0,value[2]?1:0,value[3]?1:0);
break;
default:
}
} else if(!this.__isUniform.get(parameter.name)) this.gl.enableVertexAttribArray(parameter.index);
}
var value1;
var index1;
var _g3 = 0;
var _g12 = this.__paramFloat;
while(_g3 < _g12.length) {
var parameter1 = _g12[_g3];
++_g3;
value1 = parameter1.value;
index1 = parameter1.index;
if(value1 != null) {
var _g22 = parameter1.type;
switch(_g22) {
case 4:
this.gl.__context.uniform1f(index1,value1[0]);
break;
case 5:
this.gl.__context.uniform2f(index1,value1[0],value1[1]);
break;
case 6:
this.gl.__context.uniform3f(index1,value1[0],value1[1],value1[2]);
break;
case 7:
this.gl.__context.uniform4f(index1,value1[0],value1[1],value1[2],value1[3]);
break;
case 12:
var _g31 = 0;
while(_g31 < 4) {
var i = _g31++;
this.__uniformMatrix2[i] = value1[i];
}
this.gl.uniformMatrix2fv(index1,1,false,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix2));
break;
case 16:
var _g32 = 0;
while(_g32 < 9) {
var i1 = _g32++;
this.__uniformMatrix3[i1] = value1[i1];
}
this.gl.uniformMatrix3fv(index1,1,false,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix3));
break;
case 20:
var _g33 = 0;
while(_g33 < 16) {
var i2 = _g33++;
this.__uniformMatrix4[i2] = value1[i2];
}
this.gl.uniformMatrix4fv(index1,1,false,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__uniformMatrix4));
break;
default:
}
} else if(!this.__isUniform.get(parameter1.name)) this.gl.enableVertexAttribArray(parameter1.index);
}
var value2;
var index2;
var _g4 = 0;
var _g13 = this.__paramInt;
while(_g4 < _g13.length) {
var parameter2 = _g13[_g4];
++_g4;
value2 = parameter2.value;
index2 = parameter2.index;
if(value2 != null) {
var _g23 = parameter2.type;
switch(_g23) {
case 8:
this.gl.__context.uniform1i(index2,value2[0]);
break;
case 9:
this.gl.__context.uniform2i(index2,value2[0],value2[1]);
break;
case 10:
this.gl.__context.uniform3i(index2,value2[0],value2[1],value2[2]);
break;
case 11:
this.gl.__context.uniform4i(index2,value2[0],value2[1],value2[2],value2[3]);
break;
default:
}
} else if(!this.__isUniform.get(parameter2.name)) this.gl.enableVertexAttribArray(parameter2.index);
}
}
,get_data: function() {
if(this.__glSourceDirty || this.__data == null) this.__init();
return this.__data;
}
,set_data: function(value) {
return this.__data = value;
}
,get_glFragmentSource: function() {
return this.__glFragmentSource;
}
,set_glFragmentSource: function(value) {
if(value != this.__glFragmentSource) this.__glSourceDirty = true;
return this.__glFragmentSource = value;
}
,get_glVertexSource: function() {
return this.__glVertexSource;
}
,set_glVertexSource: function(value) {
if(value != this.__glFragmentSource) this.__glSourceDirty = true;
return this.__glFragmentSource = value;
}
,__class__: openfl_display_Shader
,__properties__: {set_glVertexSource:"set_glVertexSource",get_glVertexSource:"get_glVertexSource",set_glFragmentSource:"set_glFragmentSource",get_glFragmentSource:"get_glFragmentSource",set_data:"set_data",get_data:"get_data"}
};
var openfl_display_ShaderData = function(byteArray) {
};
$hxClasses["openfl.display.ShaderData"] = openfl_display_ShaderData;
openfl_display_ShaderData.__name__ = ["openfl","display","ShaderData"];
openfl_display_ShaderData.prototype = {
aAlpha: null
,aPosition: null
,aTexCoord: null
,uImage0: null
,uMatrix: null
,__class__: openfl_display_ShaderData
};
var openfl_display_ShaderInput = function() {
this.channels = 0;
this.height = 0;
this.index = 0;
this.width = 0;
};
$hxClasses["openfl.display.ShaderInput"] = openfl_display_ShaderInput;
openfl_display_ShaderInput.__name__ = ["openfl","display","ShaderInput"];
openfl_display_ShaderInput.prototype = {
channels: null
,height: null
,index: null
,input: null
,name: null
,smoothing: null
,width: null
,__class__: openfl_display_ShaderInput
};
var openfl_display_ShaderParameter = function() {
this.index = 0;
};
$hxClasses["openfl.display.ShaderParameter"] = openfl_display_ShaderParameter;
openfl_display_ShaderParameter.__name__ = ["openfl","display","ShaderParameter"];
openfl_display_ShaderParameter.prototype = {
index: null
,name: null
,type: null
,value: null
,__class__: openfl_display_ShaderParameter
};
var openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$ = {};
$hxClasses["openfl.display._ShaderParameterType.ShaderParameterType_Impl_"] = openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.__name__ = ["openfl","display","_ShaderParameterType","ShaderParameterType_Impl_"];
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.fromString = function(value) {
switch(value) {
case "bool":
return 0;
case "bool2":
return 1;
case "bool3":
return 1;
case "bool4":
return 1;
case "float":
return 4;
case "float2":
return 5;
case "float3":
return 6;
case "float4":
return 7;
case "int":
return 8;
case "int2":
return 9;
case "int3":
return 10;
case "int4":
return 11;
case "matrix2x2":
return 12;
case "matrix2x3":
return 13;
case "matrix2x4":
return 14;
case "matrix3x2":
return 15;
case "matrix3x3":
return 16;
case "matrix3x4":
return 17;
case "matrix4x2":
return 18;
case "matrix4x3":
return 19;
case "matrix4x4":
return 20;
default:
return null;
}
};
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "bool";
case 1:
return "bool2";
case 2:
return "bool3";
case 3:
return "bool4";
case 4:
return "float";
case 5:
return "float2";
case 6:
return "float3";
case 7:
return "float4";
case 8:
return "int";
case 9:
return "int2";
case 10:
return "int3";
case 11:
return "int4";
case 12:
return "matrix2x2";
case 13:
return "matrix2x3";
case 14:
return "matrix2x4";
case 15:
return "matrix3x2";
case 16:
return "matrix3x3";
case 17:
return "matrix3x4";
case 18:
return "matrix4x2";
case 19:
return "matrix4x3";
case 20:
return "matrix4x4";
default:
return null;
}
};
var openfl_display__$ShaderPrecision_ShaderPrecision_$Impl_$ = {};
$hxClasses["openfl.display._ShaderPrecision.ShaderPrecision_Impl_"] = openfl_display__$ShaderPrecision_ShaderPrecision_$Impl_$;
openfl_display__$ShaderPrecision_ShaderPrecision_$Impl_$.__name__ = ["openfl","display","_ShaderPrecision","ShaderPrecision_Impl_"];
openfl_display__$ShaderPrecision_ShaderPrecision_$Impl_$.fromString = function(value) {
switch(value) {
case "fast":
return 0;
case "full":
return 1;
default:
return null;
}
};
openfl_display__$ShaderPrecision_ShaderPrecision_$Impl_$.toString = function(value) {
switch(value) {
case 1:
return "full";
case 0:
return "fast";
default:
return null;
}
};
var openfl_display_Shape = function() {
openfl_display_DisplayObject.call(this);
};
$hxClasses["openfl.display.Shape"] = openfl_display_Shape;
openfl_display_Shape.__name__ = ["openfl","display","Shape"];
openfl_display_Shape.__super__ = openfl_display_DisplayObject;
openfl_display_Shape.prototype = $extend(openfl_display_DisplayObject.prototype,{
get_graphics: function() {
if(this.__graphics == null) this.__graphics = new openfl_display_Graphics(this);
return this.__graphics;
}
,__class__: openfl_display_Shape
,__properties__: $extend(openfl_display_DisplayObject.prototype.__properties__,{get_graphics:"get_graphics"})
});
var openfl_display_SimpleButton = function(upState,overState,downState,hitTestState) {
openfl_display_InteractiveObject.call(this);
this.enabled = true;
this.trackAsMenu = false;
this.useHandCursor = true;
this.set_upState(upState != null?upState:new openfl_display_DisplayObject());
this.set_overState(overState);
this.set_downState(downState);
this.set_hitTestState(hitTestState != null?hitTestState:new openfl_display_DisplayObject());
this.addEventListener("mouseDown",$bind(this,this.__this_onMouseDown));
this.addEventListener("mouseOut",$bind(this,this.__this_onMouseOut));
this.addEventListener("mouseOver",$bind(this,this.__this_onMouseOver));
this.addEventListener("mouseUp",$bind(this,this.__this_onMouseUp));
this.set___currentState(this.upState);
if(openfl_display_SimpleButton.__initSymbol != null) {
var swf = openfl_display_SimpleButton.__initSWF;
this.__symbol = openfl_display_SimpleButton.__initSymbol;
openfl_display_SimpleButton.__initSWF = null;
openfl_display_SimpleButton.__initSymbol = null;
this.__fromSymbol(swf,this.__symbol);
}
};
$hxClasses["openfl.display.SimpleButton"] = openfl_display_SimpleButton;
openfl_display_SimpleButton.__name__ = ["openfl","display","SimpleButton"];
openfl_display_SimpleButton.__super__ = openfl_display_InteractiveObject;
openfl_display_SimpleButton.prototype = $extend(openfl_display_InteractiveObject.prototype,{
downState: null
,enabled: null
,hitTestState: null
,overState: null
,trackAsMenu: null
,upState: null
,useHandCursor: null
,__currentState: null
,__ignoreEvent: null
,__previousStates: null
,__soundTransform: null
,__symbol: null
,__fromSymbol: function(swf,symbol) {
this.__symbol = symbol;
if(symbol.downState != null) this.set_downState(symbol.downState.__createObject(swf));
if(symbol.hitState != null) this.set_hitTestState(symbol.hitState.__createObject(swf));
if(symbol.overState != null) this.set_overState(symbol.overState.__createObject(swf));
if(symbol.upState != null) this.set_upState(symbol.upState.__createObject(swf));
}
,__getBounds: function(rect,matrix) {
openfl_display_InteractiveObject.prototype.__getBounds.call(this,rect,matrix);
if(matrix != null) {
this.__updateTransforms(matrix);
this.__updateChildren(true);
}
this.__currentState.__getBounds(rect,this.__currentState.__worldTransform);
if(matrix != null) {
this.__updateTransforms();
this.__updateChildren(true);
}
}
,__getRenderBounds: function(rect,matrix) {
if(this.__scrollRect != null) {
openfl_display_InteractiveObject.prototype.__getRenderBounds.call(this,rect,matrix);
return;
} else openfl_display_InteractiveObject.prototype.__getBounds.call(this,rect,matrix);
if(matrix != null) {
this.__updateTransforms(matrix);
this.__updateChildren(true);
}
this.__currentState.__getRenderBounds(rect,this.__currentState.__worldTransform);
if(matrix != null) {
this.__updateTransforms();
this.__updateChildren(true);
}
}
,__getCursor: function() {
if(this.useHandCursor && !this.__ignoreEvent) return lime_ui_MouseCursor.POINTER; else return null;
}
,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
var hitTest = false;
if(this.hitTestState != null) {
var cacheTransform = this.__updateTransform(this.hitTestState);
if(this.hitTestState.__hitTest(x,y,shapeFlag,stack,interactiveOnly,hitObject)) {
if(stack != null) stack[stack.length - 1] = hitObject;
hitTest = true;
}
this.__resetTransform(this.hitTestState,cacheTransform);
} else if(this.__currentState != null) {
if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled) return false;
if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) return false;
var cacheTransform1 = this.__updateTransform(this.__currentState);
if(this.__currentState.__hitTest(x,y,shapeFlag,stack,interactiveOnly,hitObject)) hitTest = interactiveOnly;
this.__resetTransform(this.__currentState,cacheTransform1);
}
if(stack != null) while(stack.length > 1 && stack[stack.length - 1] == stack[stack.length - 2]) stack.pop();
return hitTest;
}
,__hitTestMask: function(x,y) {
var hitTest = false;
var cacheTransform = this.__updateTransform(this.__currentState);
if(this.__currentState.__hitTestMask(x,y)) hitTest = true;
this.__resetTransform(this.__currentState,cacheTransform);
return hitTest;
}
,__renderCairo: function(renderSession) {
if(!this.__renderable || this.__worldAlpha <= 0) return;
renderSession.maskManager.pushObject(this);
this.__currentState.__renderCairo(renderSession);
renderSession.maskManager.popObject(this);
}
,__renderCairoMask: function(renderSession) {
this.__currentState.__renderCairoMask(renderSession);
}
,__renderCanvas: function(renderSession) {
if(!this.__renderable || this.__worldAlpha <= 0) return;
renderSession.maskManager.pushObject(this);
this.__currentState.__renderCanvas(renderSession);
renderSession.maskManager.popObject(this);
}
,__renderCanvasMask: function(renderSession) {
var bounds = new openfl_geom_Rectangle();
this.__getLocalBounds(bounds);
renderSession.context.rect(0,0,bounds.width,bounds.height);
this.__currentState.__renderCanvasMask(renderSession);
}
,__renderDOM: function(renderSession) {
renderSession.maskManager.pushObject(this);
var _g = 0;
var _g1 = this.__previousStates;
while(_g < _g1.get_length()) {
var previousState = _g1.get(_g);
++_g;
previousState.__renderDOM(renderSession);
}
this.__previousStates.set_length(0);
this.__currentState.__renderDOM(renderSession);
renderSession.maskManager.popObject(this);
}
,__renderGL: function(renderSession) {
if(!this.__renderable || this.__worldAlpha <= 0) return;
renderSession.maskManager.pushObject(this);
this.__currentState.__renderGL(renderSession);
renderSession.maskManager.popObject(this);
}
,__resetTransform: function(state,cacheTransform) {
state.__updateTransforms(cacheTransform);
state.__updateChildren(false);
}
,__setStageReference: function(stage) {
openfl_display_InteractiveObject.prototype.__setStageReference.call(this,stage);
if(this.__currentState != null) this.__currentState.__setStageReference(stage);
}
,__updateTransform: function(state) {
var cacheTransform = state.__worldTransform;
var local = state.__transform;
var parentTransform = this.__worldTransform;
var overrideTransform = openfl_geom_Matrix.__pool.get();
overrideTransform.a = local.a * parentTransform.a + local.b * parentTransform.c;
overrideTransform.b = local.a * parentTransform.b + local.b * parentTransform.d;
overrideTransform.c = local.c * parentTransform.a + local.d * parentTransform.c;
overrideTransform.d = local.c * parentTransform.b + local.d * parentTransform.d;
overrideTransform.tx = local.tx * parentTransform.a + local.ty * parentTransform.c + parentTransform.tx;
overrideTransform.ty = local.tx * parentTransform.b + local.ty * parentTransform.d + parentTransform.ty;
var cacheTransform1 = state.__transform;
state.__transform = overrideTransform;
state.__update(false,true);
state.__transform = cacheTransform1;
openfl_geom_Matrix.__pool.release(overrideTransform);
return cacheTransform1;
}
,__updateTransforms: function(overrideTransform) {
openfl_display_InteractiveObject.prototype.__updateTransforms.call(this,overrideTransform);
this.__updateTransform(this.__currentState);
}
,set_downState: function(downState) {
if(this.downState != null && this.__currentState == this.downState) this.set___currentState(downState);
return this.downState = downState;
}
,set_hitTestState: function(hitTestState) {
return this.hitTestState = hitTestState;
}
,set_overState: function(overState) {
if(this.overState != null && this.__currentState == this.overState) this.set___currentState(overState);
return this.overState = overState;
}
,get_soundTransform: function() {
if(this.__soundTransform == null) this.__soundTransform = new openfl_media_SoundTransform();
return new openfl_media_SoundTransform(this.__soundTransform.volume,this.__soundTransform.pan);
}
,set_soundTransform: function(value) {
this.__soundTransform = new openfl_media_SoundTransform(value.volume,value.pan);
return value;
}
,set_upState: function(upState) {
if(this.upState != null && this.__currentState == this.upState) this.set___currentState(upState);
return this.upState = upState;
}
,set___currentState: function(value) {
if(this.__currentState != null) this.__currentState.__renderParent = null;
if(value.parent != null) value.parent.removeChild(value);
value.__renderParent = this;
return this.__currentState = value;
}
,__this_onMouseDown: function(event) {
if(this.downState != null) this.set___currentState(this.downState);
}
,__this_onMouseOut: function(event) {
this.__ignoreEvent = false;
if(this.upState != this.__currentState) this.set___currentState(this.upState);
}
,__this_onMouseOver: function(event) {
if(event.buttonDown) this.__ignoreEvent = true;
if(this.overState != this.__currentState && this.overState != null && !this.__ignoreEvent) this.set___currentState(this.overState);
}
,__this_onMouseUp: function(event) {
this.__ignoreEvent = false;
if(this.overState != null) this.set___currentState(this.overState); else this.set___currentState(this.upState);
}
,__class__: openfl_display_SimpleButton
,__properties__: $extend(openfl_display_InteractiveObject.prototype.__properties__,{set___currentState:"set___currentState",set_upState:"set_upState",set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_overState:"set_overState",set_hitTestState:"set_hitTestState",set_downState:"set_downState"})
});
var openfl_display__$SpreadMethod_SpreadMethod_$Impl_$ = {};
$hxClasses["openfl.display._SpreadMethod.SpreadMethod_Impl_"] = openfl_display__$SpreadMethod_SpreadMethod_$Impl_$;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.__name__ = ["openfl","display","_SpreadMethod","SpreadMethod_Impl_"];
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.fromString = function(value) {
switch(value) {
case "pad":
return 0;
case "reflect":
return 1;
case "repeat":
return 2;
default:
return null;
}
};
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "pad";
case 1:
return "reflect";
case 2:
return "repeat";
default:
return null;
}
};
var openfl_display_Stage = function(window,color) {
openfl_display_DisplayObjectContainer.call(this);
this.application = window.application;
this.window = window;
if(color == null) {
this.__transparent = true;
this.set_color(0);
} else this.set_color(color);
this.set_name(null);
this.__deltaTime = 0;
this.__displayState = 2;
this.__mouseX = 0;
this.__mouseY = 0;
this.__lastClickTime = 0;
this.__logicalWidth = 0;
this.__logicalHeight = 0;
this.__displayMatrix = new openfl_geom_Matrix();
this.__renderDirty = true;
this.stage3Ds = openfl__$Vector_Vector_$Impl_$.toObjectVector(null);
var x = new openfl_display_Stage3D();
this.stage3Ds.push(x);
this.__resize();
this.stage = this;
this.align = 6;
this.allowsFullScreen = false;
this.allowsFullScreenInteractive = false;
this.quality = 1;
this.scaleMode = 2;
this.showDefaultContextMenu = true;
this.softKeyboardRect = new openfl_geom_Rectangle();
this.stageFocusRect = true;
this.__macKeyboard = /AppleWebKit/.test (navigator.userAgent) && /Mobile\/\w+/.test (navigator.userAgent) || /Mac/.test (navigator.platform);
this.__clearBeforeRender = true;
this.__stack = [];
this.__rollOutStack = [];
if(openfl_Lib.current.stage == null) this.stage.addChild(openfl_Lib.current);
};
$hxClasses["openfl.display.Stage"] = openfl_display_Stage;
openfl_display_Stage.__name__ = ["openfl","display","Stage"];
openfl_display_Stage.__interfaces__ = [lime_app_IModule];
openfl_display_Stage.__super__ = openfl_display_DisplayObjectContainer;
openfl_display_Stage.prototype = $extend(openfl_display_DisplayObjectContainer.prototype,{
align: null
,allowsFullScreen: null
,allowsFullScreenInteractive: null
,application: null
,quality: null
,scaleMode: null
,showDefaultContextMenu: null
,softKeyboardRect: null
,stage3Ds: null
,stageFocusRect: null
,stageHeight: null
,stageWidth: null
,window: null
,__cacheFocus: null
,__clearBeforeRender: null
,__color: null
,__colorSplit: null
,__colorString: null
,__deltaTime: null
,__dirty: null
,__displayMatrix: null
,__displayState: null
,__dragBounds: null
,__dragObject: null
,__dragOffsetX: null
,__dragOffsetY: null
,__focus: null
,__fullscreen: null
,__invalidated: null
,__lastClickTime: null
,__logicalWidth: null
,__logicalHeight: null
,__macKeyboard: null
,__mouseDownLeft: null
,__mouseDownMiddle: null
,__mouseDownRight: null
,__mouseOverTarget: null
,__mouseX: null
,__mouseY: null
,__primaryTouch: null
,__renderer: null
,__rendering: null
,__rollOutStack: null
,__stack: null
,__transparent: null
,__wasDirty: null
,addRenderer: function(renderer) {
renderer.onRender.add((function(f,a1) {
return function() {
f(a1);
};
})($bind(this,this.render),renderer));
renderer.onContextLost.add((function(f1,a11) {
return function() {
f1(a11);
};
})($bind(this,this.onRenderContextLost),renderer));
renderer.onContextRestored.add((function(f2,a12) {
return function(a2) {
f2(a12,a2);
};
})($bind(this,this.onRenderContextRestored),renderer));
}
,addWindow: function(window) {
if(this.window != window) return;
window.onActivate.add((function(f,a1) {
return function() {
f(a1);
};
})($bind(this,this.onWindowActivate),window));
window.onClose.add((function(f1,a11) {
return function() {
f1(a11);
};
})($bind(this,this.onWindowClose),window),false,-9000);
window.onCreate.add((function(f2,a12) {
return function() {
f2(a12);
};
})($bind(this,this.onWindowCreate),window));
window.onDeactivate.add((function(f3,a13) {
return function() {
f3(a13);
};
})($bind(this,this.onWindowDeactivate),window));
window.onDropFile.add((function(f4,a14) {
return function(a2) {
f4(a14,a2);
};
})($bind(this,this.onWindowDropFile),window));
window.onEnter.add((function(f5,a15) {
return function() {
f5(a15);
};
})($bind(this,this.onWindowEnter),window));
window.onFocusIn.add((function(f6,a16) {
return function() {
f6(a16);
};
})($bind(this,this.onWindowFocusIn),window));
window.onFocusOut.add((function(f7,a17) {
return function() {
f7(a17);
};
})($bind(this,this.onWindowFocusOut),window));
window.onFullscreen.add((function(f8,a18) {
return function() {
f8(a18);
};
})($bind(this,this.onWindowFullscreen),window));
window.onKeyDown.add((function(f9,a19) {
return function(a21,a3) {
f9(a19,a21,a3);
};
})($bind(this,this.onKeyDown),window));
window.onKeyUp.add((function(f10,a110) {
return function(a22,a31) {
f10(a110,a22,a31);
};
})($bind(this,this.onKeyUp),window));
window.onLeave.add((function(f11,a111) {
return function() {
f11(a111);
};
})($bind(this,this.onWindowLeave),window));
window.onMinimize.add((function(f12,a112) {
return function() {
f12(a112);
};
})($bind(this,this.onWindowMinimize),window));
window.onMouseDown.add((function(f13,a113) {
return function(x,y,a23) {
f13(a113,x,y,a23);
};
})($bind(this,this.onMouseDown),window));
window.onMouseMove.add((function(f14,a114) {
return function(x1,y1) {
f14(a114,x1,y1);
};
})($bind(this,this.onMouseMove),window));
window.onMouseMoveRelative.add((function(f15,a115) {
return function(x2,y2) {
f15(a115,x2,y2);
};
})($bind(this,this.onMouseMoveRelative),window));
window.onMouseUp.add((function(f16,a116) {
return function(x3,y3,a24) {
f16(a116,x3,y3,a24);
};
})($bind(this,this.onMouseUp),window));
window.onMouseWheel.add((function(f17,a117) {
return function(a25,a32) {
f17(a117,a25,a32);
};
})($bind(this,this.onMouseWheel),window));
window.onMove.add((function(f18,a118) {
return function(x4,y4) {
f18(a118,x4,y4);
};
})($bind(this,this.onWindowMove),window));
window.onResize.add((function(f19,a119) {
return function(a26,a33) {
f19(a119,a26,a33);
};
})($bind(this,this.onWindowResize),window));
window.onRestore.add((function(f20,a120) {
return function() {
f20(a120);
};
})($bind(this,this.onWindowRestore),window));
window.onTextEdit.add((function(f21,a121) {
return function(a27,a34,a4) {
f21(a121,a27,a34,a4);
};
})($bind(this,this.onTextEdit),window));
window.onTextInput.add((function(f22,a122) {
return function(a28) {
f22(a122,a28);
};
})($bind(this,this.onTextInput),window));
if(window.id > -1) this.onWindowCreate(window);
}
,registerModule: function(application) {
application.onExit.add($bind(this,this.onModuleExit),false,0);
application.onUpdate.add($bind(this,this.update));
var $it0 = lime_ui_Gamepad.devices.iterator();
while( $it0.hasNext() ) {
var gamepad = $it0.next();
this.__onGamepadConnect(gamepad);
}
lime_ui_Gamepad.onConnect.add($bind(this,this.__onGamepadConnect));
lime_ui_Touch.onStart.add($bind(this,this.onTouchStart));
lime_ui_Touch.onMove.add($bind(this,this.onTouchMove));
lime_ui_Touch.onEnd.add($bind(this,this.onTouchEnd));
}
,removeRenderer: function(renderer) {
}
,removeWindow: function(window) {
}
,setPreloader: function(preloader) {
}
,unregisterModule: function(application) {
application.onExit.remove($bind(this,this.onModuleExit));
application.onUpdate.remove($bind(this,this.update));
lime_ui_Gamepad.onConnect.remove($bind(this,this.__onGamepadConnect));
lime_ui_Touch.onStart.remove($bind(this,this.onTouchStart));
lime_ui_Touch.onMove.remove($bind(this,this.onTouchMove));
lime_ui_Touch.onEnd.remove($bind(this,this.onTouchEnd));
}
,globalToLocal: function(pos) {
return pos.clone();
}
,invalidate: function() {
this.__invalidated = true;
}
,localToGlobal: function(pos) {
return pos.clone();
}
,onGamepadAxisMove: function(gamepad,axis,value) {
try {
openfl_ui_GameInput.__onGamepadAxisMove(gamepad,axis,value);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onGamepadButtonDown: function(gamepad,button) {
try {
openfl_ui_GameInput.__onGamepadButtonDown(gamepad,button);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onGamepadButtonUp: function(gamepad,button) {
try {
openfl_ui_GameInput.__onGamepadButtonUp(gamepad,button);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onGamepadConnect: function(gamepad) {
try {
openfl_ui_GameInput.__onGamepadConnect(gamepad);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onGamepadDisconnect: function(gamepad) {
try {
openfl_ui_GameInput.__onGamepadDisconnect(gamepad);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onJoystickAxisMove: function(joystick,axis,value) {
}
,onJoystickButtonDown: function(joystick,button) {
}
,onJoystickButtonUp: function(joystick,button) {
}
,onJoystickConnect: function(joystick) {
}
,onJoystickDisconnect: function(joystick) {
}
,onJoystickHatMove: function(joystick,hat,position) {
}
,onJoystickTrackballMove: function(joystick,trackball,value) {
}
,onKeyDown: function(window,keyCode,modifier) {
if(this.window == null || this.window != window) return;
try {
this.__onKey("keyDown",keyCode,modifier);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onKeyUp: function(window,keyCode,modifier) {
if(this.window == null || this.window != window) return;
try {
this.__onKey("keyUp",keyCode,modifier);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onModuleExit: function(code) {
if(this.window != null) try {
this.__broadcastEvent(new openfl_events_Event("deactivate"));
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onMouseDown: function(window,x,y,button) {
if(this.window == null || this.window != window) return;
try {
var type;
switch(button) {
case 1:
type = "middleMouseDown";
break;
case 2:
type = "rightMouseDown";
break;
default:
type = "mouseDown";
}
this.__onMouse(type,x * window.__scale | 0,y * window.__scale | 0,button);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onMouseMove: function(window,x,y) {
if(this.window == null || this.window != window) return;
try {
this.__onMouse("mouseMove",x * window.__scale | 0,y * window.__scale | 0,0);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onMouseMoveRelative: function(window,x,y) {
}
,onMouseUp: function(window,x,y,button) {
if(this.window == null || this.window != window) return;
try {
var type;
switch(button) {
case 1:
type = "middleMouseUp";
break;
case 2:
type = "rightMouseUp";
break;
default:
type = "mouseUp";
}
this.__onMouse(type,x * window.__scale | 0,y * window.__scale | 0,button);
if(!this.showDefaultContextMenu && button == 2) window.onMouseUp.cancel();
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onMouseWheel: function(window,deltaX,deltaY) {
if(this.window == null || this.window != window) return;
try {
this.__onMouseWheel(deltaX * window.__scale | 0,deltaY * window.__scale | 0);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onPreloadComplete: function() {
}
,onPreloadProgress: function(loaded,total) {
}
,onRenderContextLost: function(renderer) {
this.__renderer = null;
}
,onRenderContextRestored: function(renderer,context) {
this.__createRenderer();
}
,onTextEdit: function(window,text,start,length) {
}
,onTextInput: function(window,text) {
if(this.window == null || this.window != window) return;
try {
var stack = [];
if(this.__focus == null) this.__getInteractive(stack); else this.__focus.__getInteractive(stack);
var event = new openfl_events_TextEvent("textInput",true,false,text);
if(stack.length > 0) {
stack.reverse();
this.__dispatchStack(event,stack);
} else this.__dispatchEvent(event);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onTouchMove: function(touch) {
try {
this.__onTouch("touchMove",touch);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onTouchEnd: function(touch) {
try {
if(this.__primaryTouch == touch) this.__primaryTouch = null;
this.__onTouch("touchEnd",touch);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onTouchStart: function(touch) {
try {
if(this.__primaryTouch == null) this.__primaryTouch = touch;
this.__onTouch("touchBegin",touch);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onWindowActivate: function(window) {
if(this.window == null || this.window != window) return;
}
,onWindowClose: function(window) {
if(this.window == window) this.window = null;
try {
this.__primaryTouch = null;
this.__broadcastEvent(new openfl_events_Event("deactivate"));
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onWindowCreate: function(window) {
if(this.window == null || this.window != window) return;
try {
if(window.renderer != null) this.__createRenderer();
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onWindowDeactivate: function(window) {
if(this.window == null || this.window != window) return;
}
,onWindowDropFile: function(window,file) {
}
,onWindowEnter: function(window) {
}
,onWindowFocusIn: function(window) {
if(this.window == null || this.window != window) return;
try {
this.__renderDirty = true;
this.__broadcastEvent(new openfl_events_Event("activate"));
this.set_focus(this.__cacheFocus);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onWindowFocusOut: function(window) {
if(this.window == null || this.window != window) return;
try {
this.__primaryTouch = null;
this.__broadcastEvent(new openfl_events_Event("deactivate"));
var currentFocus = this.get_focus();
this.set_focus(null);
this.__cacheFocus = currentFocus;
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onWindowFullscreen: function(window) {
if(this.window == null || this.window != window) return;
try {
this.__resize();
if(this.__displayState == 2) {
this.__displayState = 1;
this.__dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,false,true));
}
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onWindowLeave: function(window) {
if(this.window == null || this.window != window) return;
try {
this.__dispatchEvent(new openfl_events_Event("mouseLeave"));
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onWindowMinimize: function(window) {
if(this.window == null || this.window != window) return;
}
,onWindowMove: function(window,x,y) {
}
,onWindowResize: function(window,width,height) {
if(this.window == null || this.window != window) return;
try {
this.__renderDirty = true;
this.__resize();
if(this.__displayState != 2 && !window.__fullscreen) {
this.__displayState = 2;
this.__dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,true,true));
}
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,onWindowRestore: function(window) {
if(this.window == null || this.window != window) return;
}
,render: function(renderer) {
if(renderer.window == null || renderer.window != this.window) return;
try {
if(this.__rendering) return;
this.__rendering = true;
if(this.__renderer != null && openfl_display_Stage3D.__active) {
this.__renderer.clear();
this.__renderer.renderStage3D();
this.__renderDirty = true;
}
this.__broadcastEvent(new openfl_events_Event("enterFrame"));
this.__broadcastEvent(new openfl_events_Event("frameConstructed"));
this.__broadcastEvent(new openfl_events_Event("exitFrame"));
if(this.__invalidated) {
this.__invalidated = false;
this.__broadcastEvent(new openfl_events_Event("render"));
}
this.__renderable = true;
this.__enterFrame(this.__deltaTime);
this.__deltaTime = 0;
this.__update(false,true);
if(this.__renderer != null) {
if(!openfl_display_Stage3D.__active) this.__renderer.clear();
if(renderer.type == lime_graphics_RendererType.CAIRO) {
var _g = renderer.context;
switch(_g[1]) {
case 4:
var cairo = _g[2];
break;
default:
}
}
this.__renderer.render();
} else renderer.onRender.cancel();
this.__rendering = false;
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
this.__handleError(e);
}
}
,update: function(deltaTime) {
this.__deltaTime = deltaTime;
}
,__broadcastEvent: function(event) {
if(openfl_display_DisplayObject.__broadcastEvents.exists(event.type)) {
var dispatchers = openfl_display_DisplayObject.__broadcastEvents.get(event.type);
var _g = 0;
while(_g < dispatchers.length) {
var dispatcher = dispatchers[_g];
++_g;
dispatcher.__dispatch(event);
}
}
}
,__createRenderer: function() {
{
var _g = this.window.renderer.context;
switch(_g[1]) {
case 0:
var gl = _g[2];
this.__renderer = new openfl__$internal_renderer_opengl_GLRenderer(this,gl);
break;
case 1:
var context = _g[2];
this.__renderer = new openfl__$internal_renderer_canvas_CanvasRenderer(this,context);
break;
case 2:
var element = _g[2];
break;
case 4:
var cairo = _g[2];
break;
case 5:
var ctx = _g[2];
break;
default:
}
}
}
,__drag: function(mouse) {
var parent = this.__dragObject.parent;
if(parent != null) parent.__getWorldTransform().__transformInversePoint(mouse);
var x = mouse.x + this.__dragOffsetX;
var y = mouse.y + this.__dragOffsetY;
if(this.__dragBounds != null) {
if(x < this.__dragBounds.x) x = this.__dragBounds.x; else if(x > this.__dragBounds.get_right()) x = this.__dragBounds.get_right();
if(y < this.__dragBounds.y) y = this.__dragBounds.y; else if(y > this.__dragBounds.get_bottom()) y = this.__dragBounds.get_bottom();
}
this.__dragObject.set_x(x);
this.__dragObject.set_y(y);
}
,__getInteractive: function(stack) {
if(stack != null) stack.push(this);
return true;
}
,__handleError: function(e) {
var event = new openfl_events_UncaughtErrorEvent("uncaughtError",true,true,e);
openfl_Lib.current.__loaderInfo.uncaughtErrorEvents.dispatchEvent(event);
if(!event.__preventDefault) {
throw e;
}
}
,__onKey: function(type,keyCode,modifier) {
openfl_events_MouseEvent.__altKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(modifier);
openfl_events_MouseEvent.__commandKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier);
openfl_events_MouseEvent.__ctrlKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier);
openfl_events_MouseEvent.__shiftKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier);
var stack = [];
if(this.__focus == null) this.__getInteractive(stack); else this.__focus.__getInteractive(stack);
if(stack.length > 0) {
var keyLocation;
switch(keyCode) {
case 1073742048:case 1073742049:case 1073742050:case 1073742051:
keyLocation = 1;
break;
case 1073742052:case 1073742053:case 1073742054:case 1073742055:
keyLocation = 2;
break;
case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:
keyLocation = 3;
break;
default:
keyLocation = 0;
}
var keyCode1;
switch(keyCode) {
case 8:
keyCode1 = 8;
break;
case 9:
keyCode1 = 9;
break;
case 13:
keyCode1 = 13;
break;
case 27:
keyCode1 = 27;
break;
case 32:
keyCode1 = 32;
break;
case 33:
keyCode1 = 49;
break;
case 34:
keyCode1 = 222;
break;
case 35:
keyCode1 = 51;
break;
case 36:
keyCode1 = 52;
break;
case 37:
keyCode1 = 53;
break;
case 38:
keyCode1 = 55;
break;
case 39:
keyCode1 = 222;
break;
case 40:
keyCode1 = 57;
break;
case 41:
keyCode1 = 48;
break;
case 42:
keyCode1 = 56;
break;
case 44:
keyCode1 = 188;
break;
case 45:
keyCode1 = 189;
break;
case 46:
keyCode1 = 190;
break;
case 47:
keyCode1 = 191;
break;
case 48:
keyCode1 = 48;
break;
case 49:
keyCode1 = 49;
break;
case 50:
keyCode1 = 50;
break;
case 51:
keyCode1 = 51;
break;
case 52:
keyCode1 = 52;
break;
case 53:
keyCode1 = 53;
break;
case 54:
keyCode1 = 54;
break;
case 55:
keyCode1 = 55;
break;
case 56:
keyCode1 = 56;
break;
case 57:
keyCode1 = 57;
break;
case 58:
keyCode1 = 186;
break;
case 59:
keyCode1 = 186;
break;
case 60:
keyCode1 = 60;
break;
case 61:
keyCode1 = 187;
break;
case 62:
keyCode1 = 190;
break;
case 63:
keyCode1 = 191;
break;
case 64:
keyCode1 = 50;
break;
case 91:
keyCode1 = 219;
break;
case 92:
keyCode1 = 220;
break;
case 93:
keyCode1 = 221;
break;
case 94:
keyCode1 = 54;
break;
case 95:
keyCode1 = 189;
break;
case 96:
keyCode1 = 192;
break;
case 97:
keyCode1 = 65;
break;
case 98:
keyCode1 = 66;
break;
case 99:
keyCode1 = 67;
break;
case 100:
keyCode1 = 68;
break;
case 101:
keyCode1 = 69;
break;
case 102:
keyCode1 = 70;
break;
case 103:
keyCode1 = 71;
break;
case 104:
keyCode1 = 72;
break;
case 105:
keyCode1 = 73;
break;
case 106:
keyCode1 = 74;
break;
case 107:
keyCode1 = 75;
break;
case 108:
keyCode1 = 76;
break;
case 109:
keyCode1 = 77;
break;
case 110:
keyCode1 = 78;
break;
case 111:
keyCode1 = 79;
break;
case 112:
keyCode1 = 80;
break;
case 113:
keyCode1 = 81;
break;
case 114:
keyCode1 = 82;
break;
case 115:
keyCode1 = 83;
break;
case 116:
keyCode1 = 84;
break;
case 117:
keyCode1 = 85;
break;
case 118:
keyCode1 = 86;
break;
case 119:
keyCode1 = 87;
break;
case 120:
keyCode1 = 88;
break;
case 121:
keyCode1 = 89;
break;
case 122:
keyCode1 = 90;
break;
case 127:
keyCode1 = 46;
break;
case 1073741881:
keyCode1 = 20;
break;
case 1073741882:
keyCode1 = 112;
break;
case 1073741883:
keyCode1 = 113;
break;
case 1073741884:
keyCode1 = 114;
break;
case 1073741885:
keyCode1 = 115;
break;
case 1073741886:
keyCode1 = 116;
break;
case 1073741887:
keyCode1 = 117;
break;
case 1073741888:
keyCode1 = 118;
break;
case 1073741889:
keyCode1 = 119;
break;
case 1073741890:
keyCode1 = 120;
break;
case 1073741891:
keyCode1 = 121;
break;
case 1073741892:
keyCode1 = 122;
break;
case 1073741893:
keyCode1 = 123;
break;
case 1073741894:
keyCode1 = 301;
break;
case 1073741895:
keyCode1 = 145;
break;
case 1073741896:
keyCode1 = 19;
break;
case 1073741897:
keyCode1 = 45;
break;
case 1073741898:
keyCode1 = 36;
break;
case 1073741899:
keyCode1 = 33;
break;
case 1073741901:
keyCode1 = 35;
break;
case 1073741902:
keyCode1 = 34;
break;
case 1073741903:
keyCode1 = 39;
break;
case 1073741904:
keyCode1 = 37;
break;
case 1073741905:
keyCode1 = 40;
break;
case 1073741906:
keyCode1 = 38;
break;
case 1073741907:
keyCode1 = 144;
break;
case 1073741908:
keyCode1 = 111;
break;
case 1073741909:
keyCode1 = 106;
break;
case 1073741910:
keyCode1 = 109;
break;
case 1073741911:
keyCode1 = 107;
break;
case 1073741912:
keyCode1 = 108;
break;
case 1073741913:
keyCode1 = 97;
break;
case 1073741914:
keyCode1 = 98;
break;
case 1073741915:
keyCode1 = 99;
break;
case 1073741916:
keyCode1 = 100;
break;
case 1073741917:
keyCode1 = 101;
break;
case 1073741918:
keyCode1 = 102;
break;
case 1073741919:
keyCode1 = 103;
break;
case 1073741920:
keyCode1 = 104;
break;
case 1073741921:
keyCode1 = 105;
break;
case 1073741922:
keyCode1 = 96;
break;
case 1073741923:
keyCode1 = 110;
break;
case 1073741925:
keyCode1 = 302;
break;
case 1073741928:
keyCode1 = 124;
break;
case 1073741929:
keyCode1 = 125;
break;
case 1073741930:
keyCode1 = 126;
break;
case 1073741982:
keyCode1 = 13;
break;
case 1073742044:
keyCode1 = 110;
break;
case 1073742048:
keyCode1 = 17;
break;
case 1073742049:
keyCode1 = 16;
break;
case 1073742050:
keyCode1 = 18;
break;
case 1073742051:
keyCode1 = 15;
break;
case 1073742052:
keyCode1 = 17;
break;
case 1073742053:
keyCode1 = 16;
break;
case 1073742054:
keyCode1 = 18;
break;
case 1073742055:
keyCode1 = 15;
break;
default:
keyCode1 = keyCode;
}
var charCode = openfl_ui_Keyboard.__getCharCode(keyCode1,lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier));
var event = new openfl_events_KeyboardEvent(type,true,true,charCode,keyCode1,keyLocation,this.__macKeyboard?lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier) || lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier):lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier));
stack.reverse();
this.__dispatchStack(event,stack);
if(event.__preventDefault) {
if(type == "keyDown") this.window.onKeyDown.cancel(); else this.window.onKeyUp.cancel();
}
}
}
,__onGamepadConnect: function(gamepad) {
this.onGamepadConnect(gamepad);
gamepad.onAxisMove.add((function(f,a1) {
return function(a2,a3) {
f(a1,a2,a3);
};
})($bind(this,this.onGamepadAxisMove),gamepad));
gamepad.onButtonDown.add((function(f1,a11) {
return function(a21) {
f1(a11,a21);
};
})($bind(this,this.onGamepadButtonDown),gamepad));
gamepad.onButtonUp.add((function(f2,a12) {
return function(a22) {
f2(a12,a22);
};
})($bind(this,this.onGamepadButtonUp),gamepad));
gamepad.onDisconnect.add((function(f3,a13) {
return function() {
f3(a13);
};
})($bind(this,this.onGamepadDisconnect),gamepad));
}
,__onMouse: function(type,x,y,button) {
if(button > 2) return;
var targetPoint = new openfl_geom_Point(x,y);
this.__displayMatrix.__transformInversePoint(targetPoint);
this.__mouseX = targetPoint.x;
this.__mouseY = targetPoint.y;
var stack = [];
var target = null;
if(this.__hitTest(this.__mouseX,this.__mouseY,true,stack,true,this)) target = stack[stack.length - 1]; else {
target = this;
stack = [this];
}
if(target == null) target = this;
var clickType = null;
switch(type) {
case "mouseDown":
if(target.get_tabEnabled()) this.set_focus(target); else this.set_focus(null);
this.__mouseDownLeft = target;
break;
case "middleMouseDown":
this.__mouseDownMiddle = target;
break;
case "rightMouseDown":
this.__mouseDownRight = target;
break;
case "mouseUp":
if(this.__mouseDownLeft == target) clickType = "click";
this.__mouseDownLeft = null;
break;
case "middleMouseUp":
if(this.__mouseDownMiddle == target) clickType = "middleClick";
this.__mouseDownMiddle = null;
break;
case "rightMouseUp":
if(this.__mouseDownRight == target) clickType = "rightClick";
this.__mouseDownRight = null;
break;
default:
}
this.__dispatchStack(openfl_events_MouseEvent.__create(type,button,this.__mouseX,this.__mouseY,target == this?targetPoint:target.globalToLocal(targetPoint),target),stack);
if(clickType != null) {
this.__dispatchStack(openfl_events_MouseEvent.__create(clickType,button,this.__mouseX,this.__mouseY,target == this?targetPoint:target.globalToLocal(targetPoint),target),stack);
if(type == "mouseUp" && (js_Boot.__cast(target , openfl_display_InteractiveObject)).doubleClickEnabled) {
var currentTime = openfl_Lib.getTimer();
if(currentTime - this.__lastClickTime < 500) {
this.__dispatchStack(openfl_events_MouseEvent.__create("doubleClick",button,this.__mouseX,this.__mouseY,target == this?targetPoint:target.globalToLocal(targetPoint),target),stack);
this.__lastClickTime = 0;
} else this.__lastClickTime = currentTime;
}
}
if(openfl_ui_Mouse.__cursor == "auto") {
var cursor = null;
if(this.__mouseDownLeft != null) cursor = this.__mouseDownLeft.__getCursor(); else {
var _g = 0;
while(_g < stack.length) {
var target1 = stack[_g];
++_g;
cursor = target1.__getCursor();
if(cursor != null) {
lime_ui_Mouse.set_cursor(cursor);
break;
}
}
}
if(cursor == null) lime_ui_Mouse.set_cursor(lime_ui_MouseCursor.ARROW);
}
var event;
var localPoint;
if(target != this.__mouseOverTarget) {
if(this.__mouseOverTarget != null) {
if(this.__mouseOverTarget == this) localPoint = targetPoint; else localPoint = this.__mouseOverTarget.globalToLocal(targetPoint);
event = openfl_events_MouseEvent.__create("mouseOut",button,this.__mouseX,this.__mouseY,localPoint,this.__mouseOverTarget);
this.__mouseOverTarget.__dispatchEvent(event);
}
}
var _g1 = 0;
var _g11 = this.__rollOutStack;
while(_g1 < _g11.length) {
var target2 = _g11[_g1];
++_g1;
if(HxOverrides.indexOf(stack,target2,0) == -1) {
HxOverrides.remove(this.__rollOutStack,target2);
localPoint = this.__mouseOverTarget.globalToLocal(targetPoint);
event = openfl_events_MouseEvent.__create("rollOut",button,this.__mouseX,this.__mouseY,localPoint,this.__mouseOverTarget);
event.bubbles = false;
target2.__dispatchEvent(event);
}
}
var _g2 = 0;
while(_g2 < stack.length) {
var target3 = stack[_g2];
++_g2;
if(HxOverrides.indexOf(this.__rollOutStack,target3,0) == -1) {
if(target3.hasEventListener("rollOver")) {
localPoint = target3.globalToLocal(targetPoint);
event = openfl_events_MouseEvent.__create("rollOver",button,this.__mouseX,this.__mouseY,localPoint,target3);
event.bubbles = false;
target3.__dispatchEvent(event);
}
if(target3.hasEventListener("rollOut")) this.__rollOutStack.push(target3);
}
}
if(target != this.__mouseOverTarget) {
if(target != null) {
if(target == this) localPoint = targetPoint; else localPoint = target.globalToLocal(targetPoint);
event = openfl_events_MouseEvent.__create("mouseOver",button,this.__mouseX,this.__mouseY,localPoint,target);
event.bubbles = true;
target.__dispatchEvent(event);
}
this.__mouseOverTarget = target;
}
if(this.__dragObject != null) {
this.__drag(targetPoint);
var dropTarget = null;
if(this.__mouseOverTarget == this.__dragObject) {
var cacheMouseEnabled = this.__dragObject.mouseEnabled;
var cacheMouseChildren = this.__dragObject.mouseChildren;
this.__dragObject.mouseEnabled = false;
this.__dragObject.mouseChildren = false;
var stack1 = [];
if(this.__hitTest(this.__mouseX,this.__mouseY,true,stack1,true,this)) dropTarget = stack1[stack1.length - 1];
this.__dragObject.mouseEnabled = cacheMouseEnabled;
this.__dragObject.mouseChildren = cacheMouseChildren;
} else if(this.__mouseOverTarget != this) dropTarget = this.__mouseOverTarget;
this.__dragObject.dropTarget = dropTarget;
}
}
,__onMouseWheel: function(deltaX,deltaY) {
var x = this.__mouseX;
var y = this.__mouseY;
var stack = [];
var target = null;
if(this.__hitTest(this.__mouseX,this.__mouseY,true,stack,true,this)) target = stack[stack.length - 1]; else {
target = this;
stack = [this];
}
if(target == null) target = this;
var targetPoint = new openfl_geom_Point(x,y);
this.__displayMatrix.__transformInversePoint(targetPoint);
var delta = deltaY | 0;
this.__dispatchStack(openfl_events_MouseEvent.__create("mouseWheel",0,this.__mouseX,this.__mouseY,target == this?targetPoint:target.globalToLocal(targetPoint),target,delta),stack);
}
,__onTouch: function(type,touch) {
var point = new openfl_geom_Point(Math.round(touch.x * this.window.__width * this.window.__scale),Math.round(touch.y * this.window.__height * this.window.__scale));
this.__displayMatrix.__transformInversePoint(point);
var touchX = point.x;
var touchY = point.y;
var __stack = [];
if(this.__hitTest(touchX,touchY,false,__stack,true,this)) {
var target = __stack[__stack.length - 1];
if(target == null) target = this;
var localPoint = target.globalToLocal(point);
var touchEvent = openfl_events_TouchEvent.__create(type,null,touchX,touchY,localPoint,target);
touchEvent.touchPointID = touch.id;
touchEvent.isPrimaryTouchPoint = this.__primaryTouch == touch;
this.__dispatchStack(touchEvent,__stack);
} else {
var touchEvent1 = openfl_events_TouchEvent.__create(type,null,touchX,touchY,point,this);
touchEvent1.touchPointID = touch.id;
touchEvent1.isPrimaryTouchPoint = this.__primaryTouch == touch;
this.__dispatchStack(touchEvent1,[this.stage]);
}
}
,__resize: function() {
var cacheWidth = this.stageWidth;
var cacheHeight = this.stageHeight;
var windowWidth = this.window.__width * this.window.__scale | 0;
var windowHeight = this.window.__height * this.window.__scale | 0;
this.__logicalWidth = windowWidth;
this.__logicalHeight = windowHeight;
this.__displayMatrix.identity();
if(this.__logicalWidth == 0 && this.__logicalHeight == 0) {
this.stageWidth = windowWidth;
this.stageHeight = windowHeight;
} else {
this.stageWidth = this.__logicalWidth;
this.stageHeight = this.__logicalHeight;
var scaleX = windowWidth / this.stageWidth;
var scaleY = windowHeight / this.stageHeight;
var targetScale = Math.min(scaleX,scaleY);
var offsetX = Math.round((windowWidth - this.stageWidth * targetScale) / 2);
var offsetY = Math.round((windowHeight - this.stageHeight * targetScale) / 2);
this.__displayMatrix.scale(targetScale,targetScale);
this.__displayMatrix.translate(offsetX,offsetY);
}
var _g = 0;
var _g1 = this.stage3Ds;
while(_g < _g1.get_length()) {
var stage3D = _g1.get(_g);
++_g;
stage3D.__resize(this.stageWidth,this.stageHeight);
}
if(this.__renderer != null) this.__renderer.resize(windowWidth,windowHeight);
if(this.stageWidth != cacheWidth || this.stageHeight != cacheHeight) this.__dispatchEvent(new openfl_events_Event("resize"));
}
,__setLogicalSize: function(width,height) {
this.__logicalWidth = width;
this.__logicalHeight = height;
this.__resize();
}
,__startDrag: function(sprite,lockCenter,bounds) {
if(bounds == null) this.__dragBounds = null; else this.__dragBounds = bounds.clone();
this.__dragObject = sprite;
if(this.__dragObject != null) {
if(lockCenter) {
this.__dragOffsetX = 0;
this.__dragOffsetY = 0;
} else {
var mouse = new openfl_geom_Point(this.get_mouseX(),this.get_mouseY());
var parent = this.__dragObject.parent;
if(parent != null) parent.__getWorldTransform().__transformInversePoint(mouse);
this.__dragOffsetX = this.__dragObject.get_x() - mouse.x;
this.__dragOffsetY = this.__dragObject.get_y() - mouse.y;
}
}
}
,__stopDrag: function(sprite) {
this.__dragBounds = null;
this.__dragObject = null;
}
,__update: function(transformOnly,updateChildren,maskGraphics) {
if(transformOnly) {
if(this.__transformDirty) {
openfl_display_DisplayObjectContainer.prototype.__update.call(this,true,updateChildren,maskGraphics);
if(updateChildren) this.__transformDirty = false;
}
} else if(this.__transformDirty || this.__renderDirty) {
openfl_display_DisplayObjectContainer.prototype.__update.call(this,false,updateChildren,maskGraphics);
if(updateChildren) {
}
}
}
,get_color: function() {
return this.__color;
}
,set_color: function(value) {
var r = (value & 16711680) >>> 16;
var g = (value & 65280) >>> 8;
var b = value & 255;
this.__colorSplit = [r / 255,g / 255,b / 255];
this.__colorString = "#" + StringTools.hex(value & 16777215,6);
return this.__color = value;
}
,get_displayState: function() {
return this.__displayState;
}
,set_displayState: function(value) {
if(this.window != null) switch(value) {
case 2:
if(this.window.__fullscreen) this.window.set_fullscreen(false);
break;
default:
if(!this.window.__fullscreen) this.window.set_fullscreen(true);
}
return this.__displayState = value;
}
,get_focus: function() {
return this.__focus;
}
,set_focus: function(value) {
if(value != this.__focus) {
var oldFocus = this.__focus;
this.__focus = value;
this.__cacheFocus = value;
if(oldFocus != null) {
var event = new openfl_events_FocusEvent("focusOut",true,false,this.__focus,false,0);
var stack = [];
oldFocus.__getInteractive(stack);
stack.reverse();
this.__dispatchStack(event,stack);
}
if(this.__focus != null) {
var event1 = new openfl_events_FocusEvent("focusIn",true,false,oldFocus,false,0);
var stack1 = [];
value.__getInteractive(stack1);
stack1.reverse();
this.__dispatchStack(event1,stack1);
}
}
return this.__focus;
}
,get_frameRate: function() {
if(this.application != null) return this.application.backend.getFrameRate();
return 0;
}
,set_frameRate: function(value) {
if(this.application != null) return this.application.backend.setFrameRate(value);
return value;
}
,get_fullScreenHeight: function() {
return this.window.get_display().currentMode.height;
}
,get_fullScreenWidth: function() {
return this.window.get_display().currentMode.width;
}
,set_height: function(value) {
return this.get_height();
}
,get_mouseX: function() {
return this.__mouseX;
}
,get_mouseY: function() {
return this.__mouseY;
}
,set_rotation: function(value) {
return 0;
}
,set_scaleX: function(value) {
return 0;
}
,set_scaleY: function(value) {
return 0;
}
,set_transform: function(value) {
return this.get_transform();
}
,set_width: function(value) {
return this.get_width();
}
,set_x: function(value) {
return 0;
}
,set_y: function(value) {
return 0;
}
,__class__: openfl_display_Stage
,__properties__: $extend(openfl_display_DisplayObjectContainer.prototype.__properties__,{get_fullScreenWidth:"get_fullScreenWidth",get_fullScreenHeight:"get_fullScreenHeight",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",set_color:"set_color",get_color:"get_color"})
});
var openfl_display_Stage3D = function() {
openfl_events_EventDispatcher.call(this);
this.set_x(0);
this.set_y(0);
this.visible = true;
};
$hxClasses["openfl.display.Stage3D"] = openfl_display_Stage3D;
openfl_display_Stage3D.__name__ = ["openfl","display","Stage3D"];
openfl_display_Stage3D.__super__ = openfl_events_EventDispatcher;
openfl_display_Stage3D.prototype = $extend(openfl_events_EventDispatcher.prototype,{
context3D: null
,visible: null
,x: null
,y: null
,__contextRequested: null
,__stage: null
,__canvas: null
,__renderContext: null
,__style: null
,__webgl: null
,requestContext3D: function(context3DRenderMode,profile) {
if(profile == null) profile = 0;
if(context3DRenderMode == null) context3DRenderMode = 0;
this.__contextRequested = true;
if(this.context3D != null) haxe_Timer.delay($bind(this,this.__dispatchCreate),1);
}
,requestContext3DMatchingProfiles: function(profiles) {
this.requestContext3D();
}
,__createContext: function(stage,renderSession) {
this.__stage = stage;
if(renderSession.gl != null) {
this.context3D = new openfl_display3D_Context3D(this,renderSession);
this.__dispatchCreate();
} else {
this.__canvas = window.document.createElement("canvas");
this.__canvas.width = stage.stageWidth;
this.__canvas.height = stage.stageHeight;
var $window = stage.window;
var options = { alpha : Object.prototype.hasOwnProperty.call($window.config,"background") && $window.config.background == null?true:false, antialias : Object.prototype.hasOwnProperty.call($window.config,"antialiasing")?$window.config.antialiasing > 0:false, depth : Object.prototype.hasOwnProperty.call($window.config,"depthBuffer")?$window.config.depthBuffer:true, premultipliedAlpha : true, stencil : Object.prototype.hasOwnProperty.call($window.config,"stencilBuffer")?$window.config.stencilBuffer:false, preserveDrawingBuffer : false};
this.__webgl = js_html__$CanvasElement_CanvasUtil.getContextWebGL(this.__canvas,options);
if(this.__webgl != null) {
this.__renderContext = new lime__$backend_html5_HTML5GLRenderContext(this.__webgl);
lime_graphics_opengl_GL.context = this.__renderContext;
this.context3D = new openfl_display3D_Context3D(this,renderSession);
renderSession.element.appendChild(this.__canvas);
this.__style = this.__canvas.style;
this.__style.setProperty("position","absolute",null);
this.__style.setProperty("top","0",null);
this.__style.setProperty("left","0",null);
this.__style.setProperty(renderSession.transformOriginProperty,"0 0 0",null);
this.__style.setProperty("z-index","-1",null);
this.__dispatchCreate();
} else this.__dispatchError();
}
}
,__dispatchError: function() {
this.__contextRequested = false;
this.dispatchEvent(new openfl_events_ErrorEvent("error",false,false,"Context3D not available"));
}
,__dispatchCreate: function() {
if(this.__contextRequested) {
this.__contextRequested = false;
this.dispatchEvent(new openfl_events_Event("context3DCreate"));
}
}
,__renderCairo: function(stage,renderSession) {
if(!this.visible) return;
if(this.__contextRequested) {
this.__dispatchError();
this.__contextRequested = false;
}
}
,__renderCanvas: function(stage,renderSession) {
if(!this.visible) return;
if(this.__contextRequested) {
this.__dispatchError();
this.__contextRequested = false;
}
}
,__renderDOM: function(stage,renderSession) {
if(!this.visible) return;
if(this.__contextRequested && this.context3D == null) this.__createContext(stage,renderSession);
if(this.context3D != null) {
lime_graphics_opengl_GL.context = this.__renderContext;
this.__resetContext3DStates();
}
}
,__renderGL: function(stage,renderSession) {
if(!this.visible) return;
if(this.__contextRequested && this.context3D == null) this.__createContext(stage,renderSession);
if(this.context3D != null) {
this.__resetContext3DStates();
if(this.context3D != null) {
renderSession.blendModeManager.setBlendMode(null);
if(renderSession.shaderManager.currentShader != null) {
renderSession.shaderManager.setShader(null);
if(this.context3D.__program != null) this.context3D.__program.__use();
}
}
if(openfl__$internal_stage3D_GLUtils.debug) renderSession.gl.__context.getError();
}
}
,__resize: function(width,height) {
if(this.__canvas != null) {
this.__canvas.width = width;
this.__canvas.height = height;
}
}
,__resetContext3DStates: function() {
this.context3D.__updateBlendFactors();
this.context3D.__updateBackbufferViewport();
}
,set_x: function(value) {
if(this.x == value) return value;
this.x = value;
if(this.context3D != null) this.context3D.__updateBackbufferViewport();
return value;
}
,set_y: function(value) {
if(this.y == value) return value;
this.y = value;
if(this.context3D != null) this.context3D.__updateBackbufferViewport();
return value;
}
,__class__: openfl_display_Stage3D
,__properties__: {set_y:"set_y",set_x:"set_x"}
});
var openfl_display__$StageAlign_StageAlign_$Impl_$ = {};
$hxClasses["openfl.display._StageAlign.StageAlign_Impl_"] = openfl_display__$StageAlign_StageAlign_$Impl_$;
openfl_display__$StageAlign_StageAlign_$Impl_$.__name__ = ["openfl","display","_StageAlign","StageAlign_Impl_"];
openfl_display__$StageAlign_StageAlign_$Impl_$.fromString = function(value) {
switch(value) {
case "bottom":
return 0;
case "bottomLeft":
return 1;
case "bottomRight":
return 2;
case "left":
return 3;
case "right":
return 4;
case "top":
return 5;
case "topLeft":
return 6;
case "topRight":
return 7;
default:
return null;
}
};
openfl_display__$StageAlign_StageAlign_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "bottom";
case 1:
return "bottomLeft";
case 2:
return "bottomRight";
case 3:
return "left";
case 4:
return "right";
case 5:
return "top";
case 6:
return "topLeft";
case 7:
return "topRight";
default:
return null;
}
};
var openfl_display__$StageDisplayState_StageDisplayState_$Impl_$ = {};
$hxClasses["openfl.display._StageDisplayState.StageDisplayState_Impl_"] = openfl_display__$StageDisplayState_StageDisplayState_$Impl_$;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.__name__ = ["openfl","display","_StageDisplayState","StageDisplayState_Impl_"];
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.fromString = function(value) {
switch(value) {
case "fullScreen":
return 0;
case "fullScreenInteractive":
return 1;
case "normal":
return 2;
default:
return null;
}
};
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "fullScreen";
case 1:
return "fullScreenInteractive";
case 2:
return "normal";
default:
return null;
}
};
var openfl_display__$StageQuality_StageQuality_$Impl_$ = {};
$hxClasses["openfl.display._StageQuality.StageQuality_Impl_"] = openfl_display__$StageQuality_StageQuality_$Impl_$;
openfl_display__$StageQuality_StageQuality_$Impl_$.__name__ = ["openfl","display","_StageQuality","StageQuality_Impl_"];
openfl_display__$StageQuality_StageQuality_$Impl_$.fromString = function(value) {
switch(value) {
case "best":
return 0;
case "high":
return 1;
case "low":
return 2;
case "medium":
return 3;
default:
return null;
}
};
openfl_display__$StageQuality_StageQuality_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "best";
case 1:
return "high";
case 2:
return "low";
case 3:
return "medium";
default:
return null;
}
};
var openfl_display__$StageScaleMode_StageScaleMode_$Impl_$ = {};
$hxClasses["openfl.display._StageScaleMode.StageScaleMode_Impl_"] = openfl_display__$StageScaleMode_StageScaleMode_$Impl_$;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.__name__ = ["openfl","display","_StageScaleMode","StageScaleMode_Impl_"];
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.fromString = function(value) {
switch(value) {
case "exactFit":
return 0;
case "noBorder":
return 1;
case "noScale":
return 2;
case "showAll":
return 3;
default:
return null;
}
};
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "exactFit";
case 1:
return "noBorder";
case 2:
return "noScale";
case 3:
return "showAll";
default:
return null;
}
};
var openfl_display__$TriangleCulling_TriangleCulling_$Impl_$ = {};
$hxClasses["openfl.display._TriangleCulling.TriangleCulling_Impl_"] = openfl_display__$TriangleCulling_TriangleCulling_$Impl_$;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.__name__ = ["openfl","display","_TriangleCulling","TriangleCulling_Impl_"];
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.fromString = function(value) {
switch(value) {
case "negative":
return 0;
case "none":
return 1;
case "positive":
return 2;
default:
return null;
}
};
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "negative";
case 1:
return "none";
case 2:
return "positive";
default:
return null;
}
};
var openfl_display_Window = function(config) {
lime_ui_Window.call(this,config);
};
$hxClasses["openfl.display.Window"] = openfl_display_Window;
openfl_display_Window.__name__ = ["openfl","display","Window"];
openfl_display_Window.__super__ = lime_ui_Window;
openfl_display_Window.prototype = $extend(lime_ui_Window.prototype,{
create: function(application) {
lime_ui_Window.prototype.create.call(this,application);
this.stage = new openfl_display_Stage(this,Object.prototype.hasOwnProperty.call(this.config,"background")?this.config.background:16777215);
if(Object.prototype.hasOwnProperty.call(this.config,"parameters")) try {
this.stage.get_loaderInfo().parameters = this.config.parameters;
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
}
if(Object.prototype.hasOwnProperty.call(this.config,"resizable") && !this.config.resizable) this.stage.__setLogicalSize(this.config.width,this.config.height);
application.addModule(this.stage);
}
,__class__: openfl_display_Window
});
var openfl_display3D_Context3D = function(stage3D,renderSession) {
this.totalGPUMemory = 0;
this.profile = 0;
this.enableErrorChecking = false;
this.driverInfo = "OpenGL (Direct blitting)";
this.backBufferWidth = 0;
this.backBufferHeight = 0;
openfl_events_EventDispatcher.call(this);
this.__stage3D = stage3D;
this.__renderSession = renderSession;
var this1;
this1 = new Float32Array(512);
this.__vertexConstants = this1;
var this2;
this2 = new Float32Array(512);
this.__fragmentConstants = this2;
var array = [1.0,1.0,1.0,1.0];
var this3;
if(array != null) this3 = new Float32Array(array); else this3 = null;
this.__positionScale = this3;
this.__samplerDirty = 0;
this.__samplerTextures = openfl__$Vector_Vector_$Impl_$.toObjectVector(null,8);
this.__samplerStates = [];
var _g = 0;
while(_g < 8) {
var i = _g++;
this.__samplerStates[i] = new openfl__$internal_stage3D_SamplerState(9729,9729,33071,33071);
}
this.maxBackBufferHeight = this.maxBackBufferWidth = lime_graphics_opengl_GL.context.__context.getParameter(3386);
this.__backBufferAntiAlias = 0;
this.__backBufferEnableDepthAndStencil = true;
this.__backBufferWantsBestResolution = false;
this.__frameCount = 0;
this.__rttDepthAndStencil = false;
this.__samplerDirty = 0;
this.__stencilCompareMode = 0;
this.__stencilRef = 0;
this.__stencilReadMask = 255;
var anisoExtension = lime_graphics_opengl_GL.context.__context.getExtension("EXT_texture_filter_anisotropic");
if(anisoExtension == null || !Object.prototype.hasOwnProperty.call(anisoExtension,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")) anisoExtension = lime_graphics_opengl_GL.context.__context.getExtension("MOZ_EXT_texture_filter_anisotropic");
if(anisoExtension == null || !Object.prototype.hasOwnProperty.call(anisoExtension,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")) anisoExtension = lime_graphics_opengl_GL.context.__context.getExtension("WEBKIT_EXT_texture_filter_anisotropic");
this.__supportsPackedDepthStencil = true;
openfl_display3D_Context3D.DEPTH_STENCIL = 34041;
this.__supportsAnisotropicFiltering = anisoExtension != null;
if(this.__supportsAnisotropicFiltering) {
openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT = anisoExtension.TEXTURE_MAX_ANISOTROPY_EXT;
var maxAnisotropy = lime_graphics_opengl_GL.getParameter(anisoExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
this.__maxAnisotropyTexture2D = maxAnisotropy;
this.__maxAnisotropyTexture2D = maxAnisotropy;
}
this.__stats = openfl__$Vector_Vector_$Impl_$.toIntVector(null,11);
this.__statsCache = openfl__$Vector_Vector_$Impl_$.toIntVector(null,11);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var vendor = lime_graphics_opengl_GL.context.__context.getParameter(7936);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var version = lime_graphics_opengl_GL.context.__context.getParameter(7938);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var renderer = lime_graphics_opengl_GL.context.__context.getParameter(7937);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var glslVersion = lime_graphics_opengl_GL.context.__context.getParameter(35724);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.driverInfo = "OpenGL" + " Vendor=" + vendor + " Version=" + version + " Renderer=" + renderer + " GLSL=" + glslVersion;
var _g1 = 0;
var _g2 = this.__stats.get_length();
while(_g1 < _g2) {
var i1 = _g1++;
this.__stats.set(i1,0);
}
openfl_display3D_Context3D.__stateCache.clearSettings();
};
$hxClasses["openfl.display3D.Context3D"] = openfl_display3D_Context3D;
openfl_display3D_Context3D.__name__ = ["openfl","display3D","Context3D"];
openfl_display3D_Context3D.__super__ = openfl_events_EventDispatcher;
openfl_display3D_Context3D.prototype = $extend(openfl_events_EventDispatcher.prototype,{
backBufferHeight: null
,backBufferWidth: null
,driverInfo: null
,enableErrorChecking: null
,maxBackBufferHeight: null
,maxBackBufferWidth: null
,profile: null
,totalGPUMemory: null
,__backBufferAntiAlias: null
,__backBufferEnableDepthAndStencil: null
,__backBufferWantsBestResolution: null
,__depthRenderBuffer: null
,__depthStencilRenderBuffer: null
,__fragmentConstants: null
,__framebuffer: null
,__frameCount: null
,__maxAnisotropyCubeTexture: null
,__maxAnisotropyTexture2D: null
,__positionScale: null
,__program: null
,__renderSession: null
,__renderToTexture: null
,__rttDepthAndStencil: null
,__samplerDirty: null
,__samplerTextures: null
,__samplerStates: null
,__scissorRectangle: null
,__stage3D: null
,__stats: null
,__statsCache: null
,__stencilCompareMode: null
,__stencilRef: null
,__stencilReadMask: null
,__stencilRenderBuffer: null
,__supportsAnisotropicFiltering: null
,__supportsPackedDepthStencil: null
,__vertexConstants: null
,clear: function(red,green,blue,alpha,depth,stencil,mask) {
if(mask == null) mask = 7;
if(stencil == null) stencil = 0;
if(depth == null) depth = 1;
if(alpha == null) alpha = 1;
if(blue == null) blue = 0;
if(green == null) green = 0;
if(red == null) red = 0;
var clearMask = 0;
if((mask & 1) != 0) {
clearMask |= 16384;
lime_graphics_opengl_GL.context.__context.clearColor(red,green,blue,alpha);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
if((mask & 2) != 0) {
clearMask |= 256;
lime_graphics_opengl_GL.context.__context.depthMask(true);
lime_graphics_opengl_GL.context.__context.clearDepth(depth);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
if((mask & 4) != 0) {
clearMask |= 1024;
lime_graphics_opengl_GL.context.__context.clearStencil(stencil);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
lime_graphics_opengl_GL.context.__context.clear(clearMask);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
,configureBackBuffer: function(width,height,antiAlias,enableDepthAndStencil,wantsBestResolution,wantsBestResolutionOnBrowserZoom) {
if(wantsBestResolutionOnBrowserZoom == null) wantsBestResolutionOnBrowserZoom = false;
if(wantsBestResolution == null) wantsBestResolution = false;
if(enableDepthAndStencil == null) enableDepthAndStencil = true;
this.__updateBackbufferViewport();
this.backBufferWidth = width;
this.backBufferHeight = height;
this.__backBufferAntiAlias = antiAlias;
this.__backBufferEnableDepthAndStencil = enableDepthAndStencil;
this.__backBufferWantsBestResolution = wantsBestResolution;
openfl_display3D_Context3D.__stateCache.clearSettings();
}
,createCubeTexture: function(size,format,optimizeForRenderToTexture,streamingLevels) {
if(streamingLevels == null) streamingLevels = 0;
return new openfl_display3D_textures_CubeTexture(this,size,format,optimizeForRenderToTexture,streamingLevels);
}
,createIndexBuffer: function(numIndices,bufferUsage) {
if(bufferUsage == null) bufferUsage = 1;
return new openfl_display3D_IndexBuffer3D(this,numIndices,openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.toString(bufferUsage));
}
,createProgram: function() {
return new openfl_display3D_Program3D(this);
}
,createRectangleTexture: function(width,height,format,optimizeForRenderToTexture) {
return new openfl_display3D_textures_RectangleTexture(this,width,height,openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.toString(format),optimizeForRenderToTexture);
}
,createTexture: function(width,height,format,optimizeForRenderToTexture,streamingLevels) {
if(streamingLevels == null) streamingLevels = 0;
return new openfl_display3D_textures_Texture(this,width,height,format,optimizeForRenderToTexture,streamingLevels);
}
,createVertexBuffer: function(numVertices,data32PerVertex,bufferUsage) {
if(bufferUsage == null) bufferUsage = 1;
return new openfl_display3D_VertexBuffer3D(this,numVertices,data32PerVertex,openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.toString(bufferUsage));
}
,createVideoTexture: function() {
return new openfl_display3D_textures_VideoTexture(this);
}
,dispose: function() {
}
,drawToBitmapData: function(destination) {
if(destination == null) return;
var $window = this.__stage3D.__stage.window;
if($window != null) {
var image = $window.renderer.readPixels();
destination.image.copyPixels(image,image.get_rect(),new lime_math_Vector2());
}
}
,drawTriangles: function(indexBuffer,firstIndex,numTriangles) {
if(numTriangles == null) numTriangles = -1;
if(firstIndex == null) firstIndex = 0;
if(this.__program == null) return;
this.__flushSamplerState();
this.__program.__flush();
var count;
if(numTriangles == -1) count = indexBuffer.__numIndices; else count = numTriangles * 3;
lime_graphics_opengl_GL.context.__context.bindBuffer(34963,indexBuffer.__id);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.drawElements(4,count,indexBuffer.__elementType,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(firstIndex));
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__statsIncrement(0);
}
,present: function() {
this.__statsSendToTelemetry();
this.__statsClear(0);
this.__frameCount++;
}
,setBlendFactors: function(sourceFactor,destinationFactor) {
var updateSrc = openfl_display3D_Context3D.__stateCache.updateBlendSrcFactor(sourceFactor);
var updateDest = openfl_display3D_Context3D.__stateCache.updateBlendDestFactor(destinationFactor);
if(updateSrc || updateDest) this.__updateBlendFactors();
}
,setColorMask: function(red,green,blue,alpha) {
lime_graphics_opengl_GL.context.__context.colorMask(red,green,blue,alpha);
}
,setCulling: function(triangleFaceToCull) {
if(openfl_display3D_Context3D.__stateCache.updateCullingMode(triangleFaceToCull)) switch(triangleFaceToCull) {
case 3:
lime_graphics_opengl_GL.context.__context.disable(2884);
break;
case 0:
lime_graphics_opengl_GL.context.__context.enable(2884);
lime_graphics_opengl_GL.context.__context.cullFace(1028);
break;
case 1:
lime_graphics_opengl_GL.context.__context.enable(2884);
lime_graphics_opengl_GL.context.__context.cullFace(1029);
break;
case 2:
lime_graphics_opengl_GL.context.__context.enable(2884);
lime_graphics_opengl_GL.context.__context.cullFace(1032);
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
}
,setDepthTest: function(depthMask,passCompareMode) {
var depthTestEnabled = this.__backBufferEnableDepthAndStencil;
if(openfl_display3D_Context3D.__stateCache.updateDepthTestEnabled(depthTestEnabled)) {
if(depthTestEnabled) lime_graphics_opengl_GL.context.__context.enable(2929); else lime_graphics_opengl_GL.context.__context.disable(2929);
}
if(openfl_display3D_Context3D.__stateCache.updateDepthTestMask(depthMask)) lime_graphics_opengl_GL.context.__context.depthMask(depthMask);
if(openfl_display3D_Context3D.__stateCache.updateDepthCompareMode(passCompareMode)) switch(passCompareMode) {
case 0:
lime_graphics_opengl_GL.context.__context.depthFunc(519);
break;
case 1:
lime_graphics_opengl_GL.context.__context.depthFunc(514);
break;
case 2:
lime_graphics_opengl_GL.context.__context.depthFunc(516);
break;
case 3:
lime_graphics_opengl_GL.context.__context.depthFunc(518);
break;
case 4:
lime_graphics_opengl_GL.context.__context.depthFunc(513);
break;
case 5:
lime_graphics_opengl_GL.context.__context.depthFunc(515);
break;
case 6:
lime_graphics_opengl_GL.context.__context.depthFunc(512);
break;
case 7:
lime_graphics_opengl_GL.context.__context.depthFunc(517);
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
}
,setProgram: function(program) {
if(program == null) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
if(openfl_display3D_Context3D.__stateCache.updateProgram3D(program)) {
program.__use();
program.__setPositionScale(this.__positionScale);
this.__program = program;
this.__samplerDirty |= this.__program.__samplerUsageMask;
var _g = 0;
while(_g < 8) {
var i = _g++;
this.__samplerStates[i].copyFrom(this.__program.__getSamplerState(i));
}
}
}
,setProgramConstantsFromByteArray: function(programType,firstRegister,numRegisters,data,byteArrayOffset) {
if(numRegisters == 0) return;
if(numRegisters == -1) {
var a = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data) >> 2;
numRegisters = a - byteArrayOffset;
}
var isVertex = programType == 1;
var dest;
if(isVertex) dest = this.__vertexConstants; else dest = this.__fragmentConstants;
var floatData;
var bytes = openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(data);
var len = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data);
if(len == null) floatData = new Float32Array(bytes.b.bufferValue,0); else floatData = new Float32Array(bytes.b.bufferValue,0,len);
var outOffset = firstRegister * 4;
var inOffset = Std["int"](_$UInt_UInt_$Impl_$.toFloat(byteArrayOffset) / _$UInt_UInt_$Impl_$.toFloat(4));
var _g1 = 0;
var _g = numRegisters * 4;
while(_g1 < _g) {
var i = _g1++;
dest[outOffset + i] = floatData[inOffset + i];
}
if(this.__program != null) this.__program.__markDirty(isVertex,firstRegister,numRegisters);
}
,setProgramConstantsFromMatrix: function(programType,firstRegister,matrix,transposedMatrix) {
if(transposedMatrix == null) transposedMatrix = false;
var isVertex = programType == 1;
var dest;
if(isVertex) dest = this.__vertexConstants; else dest = this.__fragmentConstants;
var source = matrix.rawData;
var i = firstRegister * 4;
if(transposedMatrix) {
var idx = i++;
var val = source.get(0);
dest[idx] = val;
var idx1 = i++;
var val1 = source.get(4);
dest[idx1] = val1;
var idx2 = i++;
var val2 = source.get(8);
dest[idx2] = val2;
var idx3 = i++;
var val3 = source.get(12);
dest[idx3] = val3;
var idx4 = i++;
var val4 = source.get(1);
dest[idx4] = val4;
var idx5 = i++;
var val5 = source.get(5);
dest[idx5] = val5;
var idx6 = i++;
var val6 = source.get(9);
dest[idx6] = val6;
var idx7 = i++;
var val7 = source.get(13);
dest[idx7] = val7;
var idx8 = i++;
var val8 = source.get(2);
dest[idx8] = val8;
var idx9 = i++;
var val9 = source.get(6);
dest[idx9] = val9;
var idx10 = i++;
var val10 = source.get(10);
dest[idx10] = val10;
var idx11 = i++;
var val11 = source.get(14);
dest[idx11] = val11;
var idx12 = i++;
var val12 = source.get(3);
dest[idx12] = val12;
var idx13 = i++;
var val13 = source.get(7);
dest[idx13] = val13;
var idx14 = i++;
var val14 = source.get(11);
dest[idx14] = val14;
var idx15 = i++;
var val15 = source.get(15);
dest[idx15] = val15;
} else {
var idx16 = i++;
var val16 = source.get(0);
dest[idx16] = val16;
var idx17 = i++;
var val17 = source.get(1);
dest[idx17] = val17;
var idx18 = i++;
var val18 = source.get(2);
dest[idx18] = val18;
var idx19 = i++;
var val19 = source.get(3);
dest[idx19] = val19;
var idx20 = i++;
var val20 = source.get(4);
dest[idx20] = val20;
var idx21 = i++;
var val21 = source.get(5);
dest[idx21] = val21;
var idx22 = i++;
var val22 = source.get(6);
dest[idx22] = val22;
var idx23 = i++;
var val23 = source.get(7);
dest[idx23] = val23;
var idx24 = i++;
var val24 = source.get(8);
dest[idx24] = val24;
var idx25 = i++;
var val25 = source.get(9);
dest[idx25] = val25;
var idx26 = i++;
var val26 = source.get(10);
dest[idx26] = val26;
var idx27 = i++;
var val27 = source.get(11);
dest[idx27] = val27;
var idx28 = i++;
var val28 = source.get(12);
dest[idx28] = val28;
var idx29 = i++;
var val29 = source.get(13);
dest[idx29] = val29;
var idx30 = i++;
var val30 = source.get(14);
dest[idx30] = val30;
var idx31 = i++;
var val31 = source.get(15);
dest[idx31] = val31;
}
if(this.__program != null) this.__program.__markDirty(isVertex,firstRegister,4);
}
,setProgramConstantsFromVector: function(programType,firstRegister,data,numRegisters) {
if(numRegisters == null) numRegisters = -1;
if(numRegisters == 0) return;
if(numRegisters == -1) numRegisters = data.get_length() >> 2;
var isVertex = programType == 1;
var dest;
if(isVertex) dest = this.__vertexConstants; else dest = this.__fragmentConstants;
var source = data;
var sourceIndex = 0;
var destIndex = firstRegister * 4;
var _g = 0;
while(_g < numRegisters) {
var i = _g++;
var idx = destIndex++;
var val;
var index = sourceIndex++;
val = source.get(index);
dest[idx] = val;
var idx1 = destIndex++;
var val1;
var index1 = sourceIndex++;
val1 = source.get(index1);
dest[idx1] = val1;
var idx2 = destIndex++;
var val2;
var index2 = sourceIndex++;
val2 = source.get(index2);
dest[idx2] = val2;
var idx3 = destIndex++;
var val3;
var index3 = sourceIndex++;
val3 = source.get(index3);
dest[idx3] = val3;
}
if(this.__program != null) this.__program.__markDirty(isVertex,firstRegister,numRegisters);
}
,setRenderToBackBuffer: function() {
lime_graphics_opengl_GL.context.__context.bindFramebuffer(36160,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.frontFace(2305);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__renderToTexture = null;
this.__scissorRectangle = null;
this.__updateBackbufferViewport();
this.__updateScissorRectangle();
this.__updateDepthAndStencilState();
this.__positionScale[1] = 1.0;
if(this.__program != null) this.__program.__setPositionScale(this.__positionScale);
}
,setRenderToTexture: function(texture,enableDepthAndStencil,antiAlias,surfaceSelector) {
if(surfaceSelector == null) surfaceSelector = 0;
if(antiAlias == null) antiAlias = 0;
if(enableDepthAndStencil == null) enableDepthAndStencil = false;
var width = 0;
var height = 0;
if(this.__framebuffer == null) {
this.__framebuffer = lime_graphics_opengl_GL.context.__context.createFramebuffer();
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
lime_graphics_opengl_GL.context.__context.bindFramebuffer(36160,this.__framebuffer);
openfl__$internal_stage3D_GLUtils.CheckGLError();
if(js_Boot.__instanceof(texture,openfl_display3D_textures_Texture)) {
var texture2D = texture;
width = texture2D.__width;
height = texture2D.__height;
lime_graphics_opengl_GL.context.__context.framebufferTexture2D(36160,36064,3553,texture.__textureID,0);
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_RectangleTexture)) {
var rectTexture = texture;
width = rectTexture.__width;
height = rectTexture.__height;
lime_graphics_opengl_GL.context.__context.framebufferTexture2D(36160,36064,3553,texture.__textureID,0);
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_CubeTexture)) {
var cubeTexture = texture;
width = cubeTexture.__size;
height = cubeTexture.__size;
var _g = 0;
while(_g < 6) {
var i = _g++;
lime_graphics_opengl_GL.context.__context.framebufferTexture2D(36160,36064,34069 + i,texture.__textureID,0);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
} else throw new js__$Boot_HaxeError(new openfl_errors_Error("Invalid texture"));
if(enableDepthAndStencil) {
if(this.__supportsPackedDepthStencil) {
if(this.__depthStencilRenderBuffer == null) {
this.__depthStencilRenderBuffer = lime_graphics_opengl_GL.context.__context.createRenderbuffer();
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
lime_graphics_opengl_GL.context.__context.bindRenderbuffer(36161,this.__depthStencilRenderBuffer);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.renderbufferStorage(36161,openfl_display3D_Context3D.DEPTH_STENCIL,width,height);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.framebufferRenderbuffer(36160,33306,36161,this.__depthStencilRenderBuffer);
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else {
if(this.__depthRenderBuffer == null) {
this.__depthRenderBuffer = lime_graphics_opengl_GL.context.__context.createRenderbuffer();
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
if(this.__stencilRenderBuffer == null) {
this.__stencilRenderBuffer = lime_graphics_opengl_GL.context.__context.createRenderbuffer();
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
lime_graphics_opengl_GL.context.__context.bindRenderbuffer(36161,this.__depthRenderBuffer);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.renderbufferStorage(36161,33189,width,height);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.bindRenderbuffer(36161,this.__stencilRenderBuffer);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.renderbufferStorage(36161,36168,width,height);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.framebufferRenderbuffer(36160,36096,36161,this.__depthRenderBuffer);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.framebufferRenderbuffer(36160,36128,36161,this.__stencilRenderBuffer);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
lime_graphics_opengl_GL.context.__context.bindRenderbuffer(36161,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
this.__setViewport(0,0,width,height);
if(this.enableErrorChecking) {
var code = lime_graphics_opengl_GL.context.__context.checkFramebufferStatus(36160);
if(code != 36053) haxe_Log.trace("Error: Context3D.setRenderToTexture status:${code} width:${texture2D.__width} height:${texture2D.__height}",{ fileName : "Context3D.hx", lineNumber : 813, className : "openfl.display3D.Context3D", methodName : "setRenderToTexture"});
}
this.__positionScale[1] = -1.0;
if(this.__program != null) this.__program.__setPositionScale(this.__positionScale);
lime_graphics_opengl_GL.context.__context.frontFace(2304);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__renderToTexture = texture;
this.__scissorRectangle = null;
this.__rttDepthAndStencil = enableDepthAndStencil;
this.__updateScissorRectangle();
this.__updateDepthAndStencilState();
}
,setSamplerStateAt: function(sampler,wrap,filter,mipfilter) {
if(sampler < 0 || sampler > 8) throw new js__$Boot_HaxeError(new openfl_errors_Error("sampler out of range"));
var state = this.__samplerStates[sampler];
switch(wrap) {
case 0:
state.set_wrapModeS(33071);
state.set_wrapModeT(33071);
break;
case 1:
state.set_wrapModeS(33071);
state.set_wrapModeT(10497);
break;
case 2:
state.set_wrapModeS(10497);
state.set_wrapModeT(10497);
break;
case 3:
state.set_wrapModeS(10497);
state.set_wrapModeT(33071);
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_Error("wrap bad enum"));
}
switch(filter) {
case 4:
state.set_magFilter(9729);
if(this.__supportsAnisotropicFiltering) state.set_maxAniso(1);
break;
case 5:
state.set_magFilter(9728);
if(this.__supportsAnisotropicFiltering) state.set_maxAniso(1);
break;
case 1:
if(this.__supportsAnisotropicFiltering) state.set_maxAniso(this.__maxAnisotropyTexture2D < 2?this.__maxAnisotropyTexture2D:2);
break;
case 2:
if(this.__supportsAnisotropicFiltering) state.set_maxAniso(this.__maxAnisotropyTexture2D < 4?this.__maxAnisotropyTexture2D:4);
break;
case 3:
if(this.__supportsAnisotropicFiltering) state.set_maxAniso(this.__maxAnisotropyTexture2D < 8?this.__maxAnisotropyTexture2D:8);
break;
case 0:
if(this.__supportsAnisotropicFiltering) state.set_maxAniso(this.__maxAnisotropyTexture2D < 16?this.__maxAnisotropyTexture2D:16);
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_Error("filter bad enum"));
}
switch(mipfilter) {
case 0:
state.set_minFilter(filter == 5?9986:9987);
break;
case 1:
state.set_minFilter(filter == 5?9984:9985);
break;
case 2:
state.set_minFilter(filter == 5?9728:9729);
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_Error("mipfiter bad enum"));
}
}
,setScissorRectangle: function(rectangle) {
if(rectangle != null) this.__scissorRectangle = rectangle.clone(); else this.__scissorRectangle = null;
this.__updateScissorRectangle();
}
,setStencilActions: function(triangleFace,compareMode,actionOnBothPass,actionOnDepthFail,actionOnDepthPassStencilFail) {
if(actionOnDepthPassStencilFail == null) actionOnDepthPassStencilFail = 5;
if(actionOnDepthFail == null) actionOnDepthFail = 5;
if(actionOnBothPass == null) actionOnBothPass = 5;
if(compareMode == null) compareMode = 0;
if(triangleFace == null) triangleFace = 2;
this.__stencilCompareMode = compareMode;
lime_graphics_opengl_GL.stencilOp(this.__getGLStencilAction(actionOnDepthFail),this.__getGLStencilAction(actionOnDepthPassStencilFail),this.__getGLStencilAction(actionOnBothPass));
lime_graphics_opengl_GL.stencilFunc(this.__getGLCompareMode(this.__stencilCompareMode),this.__stencilRef,this.__stencilReadMask);
}
,setStencilReferenceValue: function(referenceValue,readMask,writeMask) {
if(writeMask == null) writeMask = 255;
if(readMask == null) readMask = 255;
this.__stencilReadMask = readMask;
this.__stencilRef = referenceValue;
lime_graphics_opengl_GL.stencilFunc(this.__getGLCompareMode(this.__stencilCompareMode),this.__stencilRef,this.__stencilReadMask);
lime_graphics_opengl_GL.context.__context.stencilMask(writeMask);
}
,setTextureAt: function(sampler,texture) {
if(this.__samplerTextures.get(sampler) != texture) {
this.__samplerTextures.set(sampler,texture);
this.__samplerDirty |= 1 << sampler;
}
}
,setVertexBufferAt: function(index,buffer,bufferOffset,format) {
if(format == null) format = 4;
if(bufferOffset == null) bufferOffset = 0;
if(buffer == null) {
lime_graphics_opengl_GL.context.__context.disableVertexAttribArray(index);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.bindBuffer(34962,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
return;
}
lime_graphics_opengl_GL.context.__context.enableVertexAttribArray(index);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.bindBuffer(34962,buffer.__id);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var byteOffset = bufferOffset * 4;
switch(format) {
case 0:
lime_graphics_opengl_GL.vertexAttribPointer(index,4,5121,true,buffer.__stride,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(byteOffset));
openfl__$internal_stage3D_GLUtils.CheckGLError();
break;
case 4:
lime_graphics_opengl_GL.vertexAttribPointer(index,4,5126,false,buffer.__stride,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(byteOffset));
openfl__$internal_stage3D_GLUtils.CheckGLError();
break;
case 3:
lime_graphics_opengl_GL.vertexAttribPointer(index,3,5126,false,buffer.__stride,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(byteOffset));
openfl__$internal_stage3D_GLUtils.CheckGLError();
break;
case 2:
lime_graphics_opengl_GL.vertexAttribPointer(index,2,5126,false,buffer.__stride,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(byteOffset));
openfl__$internal_stage3D_GLUtils.CheckGLError();
break;
case 1:
lime_graphics_opengl_GL.vertexAttribPointer(index,1,5126,false,buffer.__stride,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(byteOffset));
openfl__$internal_stage3D_GLUtils.CheckGLError();
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
}
,__flushSamplerState: function() {
var sampler = 0;
while(this.__samplerDirty != 0) {
if((this.__samplerDirty & 1 << sampler) != 0) {
if(openfl_display3D_Context3D.__stateCache.updateActiveTextureSample(sampler)) {
lime_graphics_opengl_GL.context.__context.activeTexture(33984 + sampler);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
var texture = this.__samplerTextures.get(sampler);
if(texture != null) {
var target = texture.__textureTarget;
lime_graphics_opengl_GL.bindTexture(target,texture.__getTexture());
openfl__$internal_stage3D_GLUtils.CheckGLError();
texture.__setSamplerState(this.__samplerStates[sampler]);
} else {
lime_graphics_opengl_GL.context.__context.bindTexture(3553,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
this.__samplerDirty &= ~(1 << sampler);
}
sampler++;
}
}
,__getGLCompareMode: function(compareMode) {
switch(compareMode) {
case 0:
return 519;
case 1:
return 514;
case 2:
return 516;
case 3:
return 518;
case 4:
return 513;
case 5:
return 515;
case 6:
return 512;
case 7:
return 517;
default:
return 514;
}
}
,__getGLStencilAction: function(stencilAction) {
switch(stencilAction) {
case 0:
return 7683;
case 1:
return 34056;
case 2:
return 7682;
case 3:
return 34055;
case 4:
return 5386;
case 5:
return 7680;
case 6:
return 7681;
case 7:
return 0;
default:
return 7680;
}
}
,__hasGLExtension: function(name) {
return (function($this) {
var $r;
var _this = lime_graphics_opengl_GL.context.__context.getSupportedExtensions();
$r = HxOverrides.indexOf(_this,name,0);
return $r;
}(this)) != -1;
}
,__setViewport: function(originX,originY,width,height) {
if(this.__renderToTexture != null) originY *= -1;
if(openfl_display3D_Context3D.__stateCache.updateViewport(originX,originY,width,height)) {
lime_graphics_opengl_GL.context.__context.viewport(originX,originY,width,height);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
}
,__statsAdd: function(stat,value) {
var _g = stat;
var value1 = this.__stats.get(_g) + value;
this.__stats.set(_g,value1);
return this.__stats.get(stat);
}
,__statsClear: function(stat) {
this.__stats.set(stat,0);
}
,__statsDecrement: function(stat) {
var _g = stat;
var value = this.__stats.get(_g) - 1;
this.__stats.set(_g,value);
}
,__statsIncrement: function(stat) {
var _g = stat;
var value = this.__stats.get(_g) + 1;
this.__stats.set(_g,value);
}
,__statsSendToTelemetry: function() {
}
,__statsSubtract: function(stat,value) {
var _g = stat;
var value1 = this.__stats.get(_g) - value;
this.__stats.set(_g,value1);
return this.__stats.get(stat);
}
,__updateDepthAndStencilState: function() {
var depthAndStencil;
if(this.__renderToTexture != null) depthAndStencil = this.__rttDepthAndStencil; else depthAndStencil = this.__backBufferEnableDepthAndStencil;
if(depthAndStencil) {
lime_graphics_opengl_GL.context.__context.enable(2929);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.enable(2960);
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else {
lime_graphics_opengl_GL.context.__context.disable(2929);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.disable(2960);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
}
,__updateBlendFactors: function() {
if(openfl_display3D_Context3D.__stateCache._srcBlendFactor == null || openfl_display3D_Context3D.__stateCache._destBlendFactor == null) return;
var src = 1;
var dest = 0;
var _g = openfl_display3D_Context3D.__stateCache._srcBlendFactor;
switch(_g) {
case 2:
src = 1;
break;
case 9:
src = 0;
break;
case 7:
src = 770;
break;
case 0:
src = 772;
break;
case 1:
src = 774;
break;
case 5:
src = 771;
break;
case 3:
src = 773;
break;
case 4:
src = 775;
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
var _g1 = openfl_display3D_Context3D.__stateCache._destBlendFactor;
switch(_g1) {
case 2:
dest = 1;
break;
case 9:
dest = 0;
break;
case 7:
dest = 770;
break;
case 8:
dest = 768;
break;
case 0:
dest = 772;
break;
case 5:
dest = 771;
break;
case 6:
dest = 769;
break;
case 3:
dest = 773;
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
lime_graphics_opengl_GL.context.__context.enable(3042);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.blendFunc(src,dest);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
,__updateScissorRectangle: function() {
if(this.__scissorRectangle == null) {
lime_graphics_opengl_GL.context.__context.disable(3089);
openfl__$internal_stage3D_GLUtils.CheckGLError();
return;
}
lime_graphics_opengl_GL.context.__context.enable(3089);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var height = 0;
if(this.__renderToTexture != null) {
if(js_Boot.__instanceof(this.__renderToTexture,openfl_display3D_textures_Texture)) {
var texture2D = this.__renderToTexture;
height = texture2D.__height;
} else if(js_Boot.__instanceof(this.__renderToTexture,openfl_display3D_textures_RectangleTexture)) {
var rectTexture = this.__renderToTexture;
height = rectTexture.__height;
}
} else height = this.backBufferHeight;
lime_graphics_opengl_GL.context.__context.scissor(this.__scissorRectangle.x | 0,height - (this.__scissorRectangle.y | 0) - (this.__scissorRectangle.height | 0) | 0,this.__scissorRectangle.width | 0,this.__scissorRectangle.height | 0);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
,__updateBackbufferViewport: function() {
if(!openfl_display_Stage3D.__active) {
openfl_display_Stage3D.__active = true;
this.__renderSession.renderer.clear();
}
if(this.__renderToTexture == null && this.backBufferWidth > 0 && this.backBufferHeight > 0) this.__setViewport(this.__stage3D.x | 0,this.__stage3D.y | 0,this.backBufferWidth,this.backBufferHeight);
}
,set_enableErrorChecking: function(value) {
return this.enableErrorChecking = openfl__$internal_stage3D_GLUtils.debug = value;
}
,__class__: openfl_display3D_Context3D
,__properties__: {set_enableErrorChecking:"set_enableErrorChecking"}
});
var openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3D.Context3DTelemetry_Impl_"] = openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.__name__ = ["openfl","display3D","_Context3D","Context3DTelemetry_Impl_"];
var openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DBlendFactor.Context3DBlendFactor_Impl_"] = openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.__name__ = ["openfl","display3D","_Context3DBlendFactor","Context3DBlendFactor_Impl_"];
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.fromString = function(value) {
switch(value) {
case "destinationAlpha":
return 0;
case "destinationColor":
return 1;
case "one":
return 2;
case "oneMinusDestinationAlpha":
return 3;
case "oneMinusDestinationColor":
return 4;
case "oneMinusSourceAlpha":
return 5;
case "oneMinusSourceColor":
return 6;
case "sourceAlpha":
return 7;
case "sourceColor":
return 8;
case "zero":
return 9;
default:
return null;
}
};
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "destinationAlpha";
case 1:
return "destinationColor";
case 2:
return "one";
case 3:
return "oneMinusDestinationAlpha";
case 4:
return "oneMinusDestinationColor";
case 5:
return "oneMinusSourceAlpha";
case 6:
return "oneMinusSourceColor";
case 7:
return "sourceAlpha";
case 8:
return "sourceColor";
case 9:
return "zero";
default:
return null;
}
};
var openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DBufferUsage.Context3DBufferUsage_Impl_"] = openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$;
openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.__name__ = ["openfl","display3D","_Context3DBufferUsage","Context3DBufferUsage_Impl_"];
openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.fromString = function(value) {
switch(value) {
case "dynamicDraw":
return 0;
case "staticDraw":
return 1;
default:
return null;
}
};
openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "dynamicDraw";
case 1:
return "staticDraw";
default:
return null;
}
};
var openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DCompareMode.Context3DCompareMode_Impl_"] = openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.__name__ = ["openfl","display3D","_Context3DCompareMode","Context3DCompareMode_Impl_"];
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.fromString = function(value) {
switch(value) {
case "always":
return 0;
case "equal":
return 1;
case "greater":
return 2;
case "greaterEqual":
return 3;
case "less":
return 4;
case "lessEqual":
return 5;
case "never":
return 6;
case "notEqual":
return 7;
default:
return null;
}
};
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "always";
case 1:
return "equal";
case 2:
return "greater";
case 3:
return "greaterEqual";
case 4:
return "less";
case 5:
return "lessEqual";
case 6:
return "never";
case 7:
return "notEqual";
default:
return null;
}
};
var openfl_display3D__$Context3DMipFilter_Context3DMipFilter_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DMipFilter.Context3DMipFilter_Impl_"] = openfl_display3D__$Context3DMipFilter_Context3DMipFilter_$Impl_$;
openfl_display3D__$Context3DMipFilter_Context3DMipFilter_$Impl_$.__name__ = ["openfl","display3D","_Context3DMipFilter","Context3DMipFilter_Impl_"];
openfl_display3D__$Context3DMipFilter_Context3DMipFilter_$Impl_$.fromString = function(value) {
switch(value) {
case "miplinear":
return 0;
case "mipnearest":
return 1;
case "mipnone":
return 2;
default:
return null;
}
};
openfl_display3D__$Context3DMipFilter_Context3DMipFilter_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "miplinear";
case 1:
return "mipnearest";
case 2:
return "mipnone";
default:
return null;
}
};
var openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DProfile.Context3DProfile_Impl_"] = openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$;
openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$.__name__ = ["openfl","display3D","_Context3DProfile","Context3DProfile_Impl_"];
openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$.fromString = function(value) {
switch(value) {
case "baseline":
return 0;
case "baselineConstrained":
return 1;
case "baselineExtended":
return 2;
case "standard":
return 3;
case "standardConstrained":
return 4;
default:
return null;
}
};
openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "baseline";
case 1:
return "baselineConstrained";
case 2:
return "baselineExtended";
case 3:
return "standard";
case 4:
return "standardConstrained";
default:
return null;
}
};
var openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DProgramType.Context3DProgramType_Impl_"] = openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$;
openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.__name__ = ["openfl","display3D","_Context3DProgramType","Context3DProgramType_Impl_"];
openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.fromString = function(value) {
switch(value) {
case "fragment":
return 0;
case "vertex":
return 1;
default:
return null;
}
};
openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "fragment";
case 1:
return "vertex";
default:
return null;
}
};
var openfl_display3D__$Context3DRenderMode_Context3DRenderMode_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DRenderMode.Context3DRenderMode_Impl_"] = openfl_display3D__$Context3DRenderMode_Context3DRenderMode_$Impl_$;
openfl_display3D__$Context3DRenderMode_Context3DRenderMode_$Impl_$.__name__ = ["openfl","display3D","_Context3DRenderMode","Context3DRenderMode_Impl_"];
openfl_display3D__$Context3DRenderMode_Context3DRenderMode_$Impl_$.fromString = function(value) {
switch(value) {
case "auto":
return 0;
case "software":
return 1;
default:
return null;
}
};
openfl_display3D__$Context3DRenderMode_Context3DRenderMode_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "auto";
case 1:
return "software";
default:
return null;
}
};
var openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DStencilAction.Context3DStencilAction_Impl_"] = openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.__name__ = ["openfl","display3D","_Context3DStencilAction","Context3DStencilAction_Impl_"];
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.fromString = function(value) {
switch(value) {
case "decrementSaturate":
return 0;
case "decrementWrap":
return 1;
case "incrementSaturate":
return 2;
case "incrementWrap":
return 3;
case "invert":
return 4;
case "keep":
return 5;
case "set":
return 6;
case "zero":
return 7;
default:
return null;
}
};
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "decrementSaturate";
case 1:
return "decrementWrap";
case 2:
return "incrementSaturate";
case 3:
return "incrementWrap";
case 4:
return "invert";
case 5:
return "keep";
case 6:
return "set";
case 7:
return "zero";
default:
return null;
}
};
var openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DTextureFilter.Context3DTextureFilter_Impl_"] = openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$;
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.__name__ = ["openfl","display3D","_Context3DTextureFilter","Context3DTextureFilter_Impl_"];
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.fromString = function(value) {
switch(value) {
case "anisotropic16x":
return 0;
case "anisotropic2x":
return 1;
case "anisotropic4x":
return 2;
case "anisotropic8x":
return 3;
case "linear":
return 4;
case "nearest":
return 5;
default:
return null;
}
};
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "anisotropic16x";
case 1:
return "anisotropic2x";
case 2:
return "anisotropic4x";
case 3:
return "anisotropic8x";
case 4:
return "linear";
case 5:
return "nearest";
default:
return null;
}
};
var openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DTextureFormat.Context3DTextureFormat_Impl_"] = openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$;
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.__name__ = ["openfl","display3D","_Context3DTextureFormat","Context3DTextureFormat_Impl_"];
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.fromString = function(value) {
switch(value) {
case "bgrPacked565":
return 0;
case "bgra":
return 1;
case "bgraPacked4444":
return 2;
case "compressed":
return 3;
case "compressedAlpha":
return 4;
case "rgbaHalfFloat":
return 5;
default:
return null;
}
};
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "bgrPacked565";
case 1:
return "bgra";
case 2:
return "bgraPacked4444";
case 3:
return "compressed";
case 4:
return "compressedAlpha";
case 5:
return "rgbaHalfFloat";
default:
return null;
}
};
var openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DTriangleFace.Context3DTriangleFace_Impl_"] = openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.__name__ = ["openfl","display3D","_Context3DTriangleFace","Context3DTriangleFace_Impl_"];
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.fromString = function(value) {
switch(value) {
case "back":
return 0;
case "front":
return 1;
case "frontAndBack":
return 2;
case "none":
return 3;
default:
return null;
}
};
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "back";
case 1:
return "front";
case 2:
return "frontAndBack";
case 3:
return "none";
default:
return null;
}
};
var openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DVertexBufferFormat.Context3DVertexBufferFormat_Impl_"] = openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$;
openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$.__name__ = ["openfl","display3D","_Context3DVertexBufferFormat","Context3DVertexBufferFormat_Impl_"];
openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$.fromString = function(value) {
switch(value) {
case "bytes4":
return 0;
case "float1":
return 1;
case "float2":
return 2;
case "float3":
return 3;
case "float4":
return 4;
default:
return null;
}
};
openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "bytes4";
case 1:
return "float1";
case 2:
return "float2";
case 3:
return "float3";
case 4:
return "float4";
default:
return null;
}
};
var openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DWrapMode.Context3DWrapMode_Impl_"] = openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$;
openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$.__name__ = ["openfl","display3D","_Context3DWrapMode","Context3DWrapMode_Impl_"];
openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$.fromString = function(value) {
switch(value) {
case "clamp":
return 0;
case "clamp_u_repeat_y":
return 1;
case "repeat":
return 2;
case "repeat_u_clamp_y":
return 3;
default:
return null;
}
};
openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "clamp";
case 1:
return "clamp_u_repeat_y";
case 2:
return "repeat";
case 3:
return "repeat_u_clamp_y";
default:
return null;
}
};
var openfl_display3D_IndexBuffer3D = function(context3D,numIndices,bufferUsage) {
this.__context = context3D;
this.__numIndices = numIndices;
this.__elementType = 5123;
this.__id = lime_graphics_opengl_GL.context.__context.createBuffer();
openfl__$internal_stage3D_GLUtils.CheckGLError();
if(openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.fromString(bufferUsage) == 0) this.__usage = 35048; else this.__usage = 35044;
this.__context.__statsIncrement(1);
this.__memoryUsage = 0;
};
$hxClasses["openfl.display3D.IndexBuffer3D"] = openfl_display3D_IndexBuffer3D;
openfl_display3D_IndexBuffer3D.__name__ = ["openfl","display3D","IndexBuffer3D"];
openfl_display3D_IndexBuffer3D.prototype = {
__context: null
,__elementType: null
,__id: null
,__memoryUsage: null
,__numIndices: null
,__usage: null
,dispose: function() {
lime_graphics_opengl_GL.context.__context.deleteBuffer(this.__id);
this.__context.__statsDecrement(1);
this.__context.__statsSubtract(6,this.__memoryUsage);
this.__memoryUsage = 0;
}
,uploadFromByteArray: function(data,byteArrayOffset,startOffset,count) {
var offset = byteArrayOffset + startOffset * 2;
this.uploadFromTypedArray((function($this) {
var $r;
var buffer = openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer(data);
var this1;
if(buffer != null) {
if(count == null) this1 = new Int16Array(buffer,offset); else this1 = new Int16Array(buffer,offset,count);
} else this1 = null;
$r = this1;
return $r;
}(this)));
}
,uploadFromTypedArray: function(data) {
if(data == null) return;
lime_graphics_opengl_GL.context.__context.bindBuffer(34963,this.__id);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.bufferData(34963,data.byteLength,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(data),this.__usage);
openfl__$internal_stage3D_GLUtils.CheckGLError();
if(data.byteLength != this.__memoryUsage) {
this.__context.__statsAdd(6,data.byteLength - this.__memoryUsage);
this.__memoryUsage = data.byteLength;
}
}
,uploadFromVector: function(data,startOffset,count) {
var length = startOffset + count;
var buffer;
var this1;
if(count != null) this1 = new Int16Array(count); else this1 = null;
buffer = this1;
var _g = startOffset;
while(_g < length) {
var i = _g++;
var val = data.get(i);
buffer[i - startOffset] = val;
}
this.uploadFromTypedArray(buffer);
}
,__class__: openfl_display3D_IndexBuffer3D
};
var openfl_display3D_Program3D = function(context3D) {
this.__context = context3D;
this.__memUsage = 0;
this.__samplerUsageMask = 0;
this.__uniforms = new List();
this.__samplerUniforms = new List();
this.__alphaSamplerUniforms = new List();
this.__samplerStates = openfl__$Vector_Vector_$Impl_$.toObjectVector(null,8);
};
$hxClasses["openfl.display3D.Program3D"] = openfl_display3D_Program3D;
openfl_display3D_Program3D.__name__ = ["openfl","display3D","Program3D"];
openfl_display3D_Program3D.prototype = {
__alphaSamplerUniforms: null
,__context: null
,__fragmentShaderID: null
,__fragmentSource: null
,__fragmentUniformMap: null
,__memUsage: null
,__positionScale: null
,__programID: null
,__samplerStates: null
,__samplerUniforms: null
,__samplerUsageMask: null
,__uniforms: null
,__vertexShaderID: null
,__vertexSource: null
,__vertexUniformMap: null
,dispose: function() {
this.__deleteShaders();
}
,upload: function(vertexProgram,fragmentProgram) {
var samplerStates = [];
var glslVertex = openfl__$internal_stage3D_AGALConverter.convertToGLSL(vertexProgram,null);
var glslFragment = openfl__$internal_stage3D_AGALConverter.convertToGLSL(fragmentProgram,samplerStates);
this.__uploadFromGLSL(glslVertex,glslFragment);
var _g1 = 0;
var _g = samplerStates.length;
while(_g1 < _g) {
var i = _g1++;
this.__setSamplerState(i,samplerStates[i]);
}
}
,__buildUniformList: function() {
this.__uniforms.clear();
this.__samplerUniforms.clear();
this.__alphaSamplerUniforms.clear();
this.__samplerUsageMask = 0;
var numActive = 0;
numActive = lime_graphics_opengl_GL.context.__context.getProgramParameter(this.__programID,35718);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var vertexUniforms = new List();
var fragmentUniforms = new List();
var _g = 0;
while(_g < numActive) {
var i = _g++;
var info = lime_graphics_opengl_GL.context.__context.getActiveUniform(this.__programID,i);
var name = info.name;
var size = info.size;
var uniformType = info.type;
openfl__$internal_stage3D_GLUtils.CheckGLError();
var uniform = new openfl_display3D__$Program3D_Uniform();
uniform.name = name;
uniform.size = size;
uniform.type = uniformType;
uniform.location = lime_graphics_opengl_GL.context.__context.getUniformLocation(this.__programID,uniform.name);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var indexBracket = uniform.name.indexOf("[");
if(indexBracket >= 0) uniform.name = uniform.name.substring(0,indexBracket);
var _g1 = uniform.type;
switch(_g1) {
case 35674:
uniform.regCount = 2;
break;
case 35675:
uniform.regCount = 3;
break;
case 35676:
uniform.regCount = 4;
break;
default:
uniform.regCount = 1;
}
uniform.regCount *= uniform.size;
this.__uniforms.add(uniform);
if(uniform.name == "vcPositionScale") this.__positionScale = uniform; else if(StringTools.startsWith(uniform.name,"vc")) {
uniform.regIndex = Std.parseInt(uniform.name.substring(2));
uniform.regData = this.__context.__vertexConstants;
vertexUniforms.add(uniform);
} else if(StringTools.startsWith(uniform.name,"fc")) {
uniform.regIndex = Std.parseInt(uniform.name.substring(2));
uniform.regData = this.__context.__fragmentConstants;
fragmentUniforms.add(uniform);
} else if(StringTools.startsWith(uniform.name,"sampler") && !StringTools.endsWith(uniform.name,"_alpha")) {
uniform.regIndex = Std.parseInt(uniform.name.substring(7));
this.__samplerUniforms.add(uniform);
var _g2 = 0;
var _g11 = uniform.regCount;
while(_g2 < _g11) {
var reg = _g2++;
this.__samplerUsageMask |= 1 << uniform.regIndex + reg;
}
} else if(StringTools.startsWith(uniform.name,"sampler") && StringTools.endsWith(uniform.name,"_alpha")) {
var len = uniform.name.indexOf("_") - 7;
uniform.regIndex = Std.parseInt(uniform.name.substring(7,7 + len)) + 4;
this.__alphaSamplerUniforms.add(uniform);
}
if(openfl_display3D_Program3D.verbose) haxe_Log.trace("" + i + " name:" + uniform.name + " type:" + uniform.type + " size:" + uniform.size + " location:" + Std.string(uniform.location),{ fileName : "Program3D.hx", lineNumber : 180, className : "openfl.display3D.Program3D", methodName : "__buildUniformList"});
}
this.__vertexUniformMap = new openfl_display3D__$Program3D_UniformMap(Lambda.array(vertexUniforms));
this.__fragmentUniformMap = new openfl_display3D__$Program3D_UniformMap(Lambda.array(fragmentUniforms));
}
,__deleteShaders: function() {
if(this.__programID != null) this.__programID = null;
if(this.__vertexShaderID != null) {
lime_graphics_opengl_GL.context.__context.deleteShader(this.__vertexShaderID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__vertexShaderID = null;
}
if(this.__fragmentShaderID != null) {
lime_graphics_opengl_GL.context.__context.deleteShader(this.__fragmentShaderID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__fragmentShaderID = null;
}
if(this.__memUsage != 0) {
this.__context.__statsDecrement(5);
this.__context.__statsSubtract(10,this.__memUsage);
this.__memUsage = 0;
}
}
,__flush: function() {
this.__vertexUniformMap.flush();
this.__fragmentUniformMap.flush();
}
,__getSamplerState: function(sampler) {
return this.__samplerStates.get(sampler);
}
,__markDirty: function(isVertex,index,count) {
if(isVertex) this.__vertexUniformMap.markDirty(index,count); else this.__fragmentUniformMap.markDirty(index,count);
}
,__setPositionScale: function(positionScale) {
if(this.__positionScale != null) {
lime_graphics_opengl_GL.uniform4fv(this.__positionScale.location,1,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(positionScale));
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
}
,__setSamplerState: function(sampler,state) {
this.__samplerStates.set(sampler,state);
}
,__uploadFromGLSL: function(vertexShaderSource,fragmentShaderSource) {
this.__deleteShaders();
if(openfl_display3D_Program3D.verbose) {
lime_utils_Log.info(vertexShaderSource,{ fileName : "Program3D.hx", lineNumber : 284, className : "openfl.display3D.Program3D", methodName : "__uploadFromGLSL"});
lime_utils_Log.info(fragmentShaderSource,{ fileName : "Program3D.hx", lineNumber : 285, className : "openfl.display3D.Program3D", methodName : "__uploadFromGLSL"});
}
this.__vertexSource = vertexShaderSource;
this.__fragmentSource = fragmentShaderSource;
this.__vertexShaderID = lime_graphics_opengl_GL.context.__context.createShader(35633);
lime_graphics_opengl_GL.context.__context.shaderSource(this.__vertexShaderID,vertexShaderSource);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.compileShader(this.__vertexShaderID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var shaderCompiled = lime_graphics_opengl_GL.context.__context.getShaderParameter(this.__vertexShaderID,35713);
openfl__$internal_stage3D_GLUtils.CheckGLError();
if(shaderCompiled == 0) {
var vertexInfoLog = lime_graphics_opengl_GL.context.__context.getShaderInfoLog(this.__vertexShaderID);
if(vertexInfoLog != null && vertexInfoLog.length != 0) haxe_Log.trace("vertex: " + vertexInfoLog,{ fileName : "Program3D.hx", lineNumber : 309, className : "openfl.display3D.Program3D", methodName : "__uploadFromGLSL"});
throw new js__$Boot_HaxeError(new openfl_errors_Error("Error compiling vertex shader: " + vertexInfoLog));
}
this.__fragmentShaderID = lime_graphics_opengl_GL.context.__context.createShader(35632);
lime_graphics_opengl_GL.context.__context.shaderSource(this.__fragmentShaderID,fragmentShaderSource);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.compileShader(this.__fragmentShaderID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var fragmentCompiled = lime_graphics_opengl_GL.context.__context.getShaderParameter(this.__fragmentShaderID,35713);
if(fragmentCompiled == 0) {
var fragmentInfoLog = lime_graphics_opengl_GL.context.__context.getShaderInfoLog(this.__fragmentShaderID);
if(fragmentInfoLog != null && fragmentInfoLog.length != 0) haxe_Log.trace("fragment: " + fragmentInfoLog,{ fileName : "Program3D.hx", lineNumber : 332, className : "openfl.display3D.Program3D", methodName : "__uploadFromGLSL"});
throw new js__$Boot_HaxeError(new openfl_errors_Error("Error compiling fragment shader: " + fragmentInfoLog));
}
this.__programID = lime_graphics_opengl_GL.context.__context.createProgram();
lime_graphics_opengl_GL.context.__context.attachShader(this.__programID,this.__vertexShaderID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.attachShader(this.__programID,this.__fragmentShaderID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var _g = 0;
while(_g < 16) {
var i = _g++;
var name = "va" + i;
if(vertexShaderSource.indexOf(" " + name) != -1) lime_graphics_opengl_GL.context.__context.bindAttribLocation(this.__programID,i,name);
}
lime_graphics_opengl_GL.context.__context.linkProgram(this.__programID);
var infoLog = lime_graphics_opengl_GL.context.__context.getProgramInfoLog(this.__programID);
if(infoLog != null && infoLog.length != 0) haxe_Log.trace("program: " + infoLog,{ fileName : "Program3D.hx", lineNumber : 365, className : "openfl.display3D.Program3D", methodName : "__uploadFromGLSL"});
this.__buildUniformList();
this.__memUsage = 1;
this.__context.__statsIncrement(5);
this.__context.__statsAdd(10,this.__memUsage);
}
,__use: function() {
lime_graphics_opengl_GL.useProgram(this.__programID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__vertexUniformMap.markAllDirty();
this.__fragmentUniformMap.markAllDirty();
var _g_head = this.__samplerUniforms.h;
var _g_val = null;
while(_g_head != null) {
var sampler;
sampler = (function($this) {
var $r;
_g_val = _g_head[0];
_g_head = _g_head[1];
$r = _g_val;
return $r;
}(this));
if(sampler.regCount == 1) {
lime_graphics_opengl_GL.context.__context.uniform1i(sampler.location,sampler.regIndex);
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("!!! TODO: uniform location on webgl"));
}
var _g_head1 = this.__alphaSamplerUniforms.h;
var _g_val1 = null;
while(_g_head1 != null) {
var sampler1;
sampler1 = (function($this) {
var $r;
_g_val1 = _g_head1[0];
_g_head1 = _g_head1[1];
$r = _g_val1;
return $r;
}(this));
if(sampler1.regCount == 1) {
lime_graphics_opengl_GL.context.__context.uniform1i(sampler1.location,sampler1.regIndex);
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("!!! TODO: uniform location on webgl"));
}
}
,__class__: openfl_display3D_Program3D
};
var openfl_display3D__$Program3D_Uniform = function() {
this.isDirty = true;
this.regDataPointer = new lime_utils_BytePointerData(null,0);
};
$hxClasses["openfl.display3D._Program3D.Uniform"] = openfl_display3D__$Program3D_Uniform;
openfl_display3D__$Program3D_Uniform.__name__ = ["openfl","display3D","_Program3D","Uniform"];
openfl_display3D__$Program3D_Uniform.prototype = {
name: null
,location: null
,type: null
,size: null
,regData: null
,regIndex: null
,regCount: null
,isDirty: null
,regDataPointer: null
,flush: function() {
var index = this.regIndex * 4;
var _g = this.type;
switch(_g) {
case 35674:
lime_graphics_opengl_GL.uniformMatrix2fv(this.location,this.size,false,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__getRegisters(index,this.size * 2 * 2)));
break;
case 35675:
lime_graphics_opengl_GL.uniformMatrix3fv(this.location,this.size,false,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__getRegisters(index,this.size * 3 * 3)));
break;
case 35676:
lime_graphics_opengl_GL.uniformMatrix4fv(this.location,this.size,false,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__getRegisters(index,this.size * 4 * 4)));
break;
case 35664:
lime_graphics_opengl_GL.uniform2fv(this.location,this.regCount,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__getRegisters(index,this.regCount * 2)));
break;
case 35665:
lime_graphics_opengl_GL.uniform3fv(this.location,this.regCount,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__getRegisters(index,this.regCount * 3)));
break;
case 35666:
lime_graphics_opengl_GL.uniform4fv(this.location,this.regCount,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__getRegisters(index,this.regCount * 4)));
break;
default:
lime_graphics_opengl_GL.uniform4fv(this.location,this.regCount,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(this.__getRegisters(index,this.regCount * 4)));
}
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
,__getRegisters: function(index,size) {
return this.regData.subarray(index,index + size);
}
,__class__: openfl_display3D__$Program3D_Uniform
};
var openfl_display3D__$Program3D_UniformMap = function(list) {
this.__uniforms = list;
this.__uniforms.sort(function(a,b) {
return Reflect.compare(a.regIndex,b.regIndex);
});
var total = 0;
var _g = 0;
var _g1 = this.__uniforms;
while(_g < _g1.length) {
var uniform = _g1[_g];
++_g;
if(uniform.regIndex + uniform.regCount > total) total = uniform.regIndex + uniform.regCount;
}
this.__registerLookup = openfl__$Vector_Vector_$Impl_$.toObjectVector(null,total);
var _g2 = 0;
var _g11 = this.__uniforms;
while(_g2 < _g11.length) {
var uniform1 = _g11[_g2];
++_g2;
var _g3 = 0;
var _g21 = uniform1.regCount;
while(_g3 < _g21) {
var i = _g3++;
this.__registerLookup.set(uniform1.regIndex + i,uniform1);
}
}
this.__anyDirty = this.__allDirty = true;
};
$hxClasses["openfl.display3D._Program3D.UniformMap"] = openfl_display3D__$Program3D_UniformMap;
openfl_display3D__$Program3D_UniformMap.__name__ = ["openfl","display3D","_Program3D","UniformMap"];
openfl_display3D__$Program3D_UniformMap.prototype = {
__allDirty: null
,__anyDirty: null
,__registerLookup: null
,__uniforms: null
,flush: function() {
if(this.__anyDirty) {
var _g = 0;
var _g1 = this.__uniforms;
while(_g < _g1.length) {
var uniform = _g1[_g];
++_g;
if(this.__allDirty || uniform.isDirty) {
uniform.flush();
uniform.isDirty = false;
}
}
this.__anyDirty = this.__allDirty = false;
}
}
,markAllDirty: function() {
this.__allDirty = true;
this.__anyDirty = true;
}
,markDirty: function(start,count) {
if(this.__allDirty) return;
var end = start + count;
if(end > this.__registerLookup.get_length()) end = this.__registerLookup.get_length();
var index = start;
while(index < end) {
var uniform = this.__registerLookup.get(index);
if(uniform != null) {
uniform.isDirty = true;
this.__anyDirty = true;
index = uniform.regIndex + uniform.regCount;
} else index++;
}
}
,__class__: openfl_display3D__$Program3D_UniformMap
};
var openfl_display3D_VertexBuffer3D = function(context3D,numVertices,dataPerVertex,bufferUsage) {
this.__context = context3D;
this.__numVertices = numVertices;
this.__vertexSize = dataPerVertex;
this.__id = lime_graphics_opengl_GL.context.__context.createBuffer();
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__stride = this.__vertexSize * 4;
this.__memoryUsage = 0;
if(openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.fromString(bufferUsage) == 0) this.__usage = 35048; else this.__usage = 35044;
this.__context.__statsIncrement(2);
};
$hxClasses["openfl.display3D.VertexBuffer3D"] = openfl_display3D_VertexBuffer3D;
openfl_display3D_VertexBuffer3D.__name__ = ["openfl","display3D","VertexBuffer3D"];
openfl_display3D_VertexBuffer3D.prototype = {
__context: null
,__data: null
,__id: null
,__memoryUsage: null
,__numVertices: null
,__stride: null
,__tempBytes: null
,__usage: null
,__vertexSize: null
,dispose: function() {
lime_graphics_opengl_GL.context.__context.deleteBuffer(this.__id);
this.__context.__statsDecrement(2);
this.__context.__statsSubtract(7,this.__memoryUsage);
this.__memoryUsage = 0;
}
,uploadFromByteArray: function(data,byteArrayOffset,startVertex,numVertices) {
var offset = byteArrayOffset + startVertex * this.__stride;
var length = numVertices * this.__vertexSize;
this.uploadFromTypedArray((function($this) {
var $r;
var buffer = openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer(data);
var this1;
if(buffer != null) {
if(length == null) this1 = new Float32Array(buffer,offset); else this1 = new Float32Array(buffer,offset,length);
} else this1 = null;
$r = this1;
return $r;
}(this)));
}
,uploadFromTypedArray: function(data) {
if(data == null) return;
lime_graphics_opengl_GL.context.__context.bindBuffer(34962,this.__id);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.bufferData(34962,data.byteLength,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(data),this.__usage);
openfl__$internal_stage3D_GLUtils.CheckGLError();
if(data.byteLength != this.__memoryUsage) {
this.__context.__statsAdd(7,data.byteLength - this.__memoryUsage);
this.__memoryUsage = data.byteLength;
}
}
,uploadFromVector: function(data,startVertex,numVertices) {
if(data == null) return;
var start = startVertex * this.__vertexSize;
var count = numVertices * this.__vertexSize;
var length = start + count;
var buffer;
var this1;
if(count != null) this1 = new Float32Array(count); else this1 = null;
buffer = this1;
var _g = start;
while(_g < length) {
var i = _g++;
var val = data.get(i);
buffer[i - start] = val;
}
this.uploadFromTypedArray(buffer);
}
,__class__: openfl_display3D_VertexBuffer3D
};
var openfl_display3D_textures_TextureBase = function(context,target) {
this.__outputTextureMemoryUsage = false;
openfl_events_EventDispatcher.call(this);
this.__context = context;
this.__textureTarget = target;
this.__textureID = lime_graphics_opengl_GL.context.__context.createTexture();
this.__textureContext = lime_graphics_opengl_GL.context;
if(openfl_display3D_textures_TextureBase.__supportsBGRA == null) {
openfl_display3D_textures_TextureBase.__textureInternalFormat = 6408;
var bgraExtension = null;
if(bgraExtension != null) {
openfl_display3D_textures_TextureBase.__supportsBGRA = true;
openfl_display3D_textures_TextureBase.__textureFormat = bgraExtension.BGRA_EXT;
if(lime_graphics_opengl_GL.get_type() == lime_graphics_opengl_GLContextType.GLES) openfl_display3D_textures_TextureBase.__textureInternalFormat = bgraExtension.BGRA_EXT;
} else {
openfl_display3D_textures_TextureBase.__supportsBGRA = false;
openfl_display3D_textures_TextureBase.__textureFormat = 6408;
}
}
if(openfl_display3D_textures_TextureBase.__supportsCompressed == null) {
var compressedExtension = lime_graphics_opengl_GL.context.__context.getExtension("WEBGL_compressed_texture_s3tc");
if(compressedExtension != null) {
openfl_display3D_textures_TextureBase.__supportsCompressed = true;
openfl_display3D_textures_TextureBase.__textureFormatCompressed = compressedExtension.COMPRESSED_RGBA_S3TC_DXT1_EXT;
openfl_display3D_textures_TextureBase.__textureFormatCompressedAlpha = compressedExtension.COMPRESSED_RGBA_S3TC_DXT5_EXT;
} else openfl_display3D_textures_TextureBase.__supportsCompressed = false;
}
this.__internalFormat = openfl_display3D_textures_TextureBase.__textureInternalFormat;
this.__format = openfl_display3D_textures_TextureBase.__textureFormat;
this.__memoryUsage = 0;
this.__compressedMemoryUsage = 0;
};
$hxClasses["openfl.display3D.textures.TextureBase"] = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_TextureBase.__name__ = ["openfl","display3D","textures","TextureBase"];
openfl_display3D_textures_TextureBase.__super__ = openfl_events_EventDispatcher;
openfl_display3D_textures_TextureBase.prototype = $extend(openfl_events_EventDispatcher.prototype,{
__alphaTexture: null
,__compressedMemoryUsage: null
,__context: null
,__format: null
,__height: null
,__internalFormat: null
,__memoryUsage: null
,__optimizeForRenderToTexture: null
,__outputTextureMemoryUsage: null
,__samplerState: null
,__streamingLevels: null
,__textureContext: null
,__textureID: null
,__textureTarget: null
,__width: null
,dispose: function() {
if(this.__alphaTexture != null) this.__alphaTexture.dispose();
lime_graphics_opengl_GL.context.__context.deleteTexture(this.__textureID);
if(this.__compressedMemoryUsage > 0) {
this.__context.__statsDecrement(4);
var currentCompressedMemory = this.__context.__statsSubtract(9,this.__compressedMemoryUsage);
this.__compressedMemoryUsage = 0;
}
if(this.__memoryUsage > 0) {
this.__context.__statsDecrement(3);
var currentMemory = this.__context.__statsSubtract(8,this.__memoryUsage);
this.__memoryUsage = 0;
}
}
,__getATFVersion: function(data) {
var signature = data.readUTFBytes(3);
if(signature != "ATF") throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("ATF signature not found"));
var position = data.position;
var version = 0;
if(_$UInt_UInt_$Impl_$.gte(data.length - data.position,5)) {
var sig = this.__readUInt32(data);
if(sig == 255) version = data.readUnsignedByte(); else data.position = position;
}
return version;
}
,__getImage: function(bitmapData) {
var image = bitmapData.image;
if(!bitmapData.__isValid || image == null) return null;
lime_graphics_utils_ImageCanvasUtil.sync(image,false);
if(image.type != lime_graphics_ImageType.DATA && !image.get_premultiplied()) lime_graphics_opengl_GL.context.__context.pixelStorei(37441,1); else if(!image.get_premultiplied() && image.get_transparent()) {
lime_graphics_opengl_GL.context.__context.pixelStorei(37441,0);
image = image.clone();
image.set_premultiplied(true);
}
if(image.get_format() != 0) {
image = image.clone();
image.set_format(0);
image.buffer.premultiplied = true;
}
return image;
}
,__getTexture: function() {
return this.__textureID;
}
,__readUInt24: function(data) {
var value;
value = data.readUnsignedByte() << 16;
var b = data.readUnsignedByte() << 8;
value = value | b;
var b1 = data.readUnsignedByte();
value = value | b1;
return value;
}
,__readUInt32: function(data) {
var value;
value = data.readUnsignedByte() << 24;
var b = data.readUnsignedByte() << 16;
value = value | b;
var b1 = data.readUnsignedByte() << 8;
value = value | b1;
var b2 = data.readUnsignedByte();
value = value | b2;
return value;
}
,__setSamplerState: function(state) {
if(!state.equals(this.__samplerState)) {
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,this.__textureID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.texParameteri(this.__textureTarget,10241,state.minFilter);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.texParameteri(this.__textureTarget,10240,state.magFilter);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.texParameteri(this.__textureTarget,10242,state.wrapModeS);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.texParameteri(this.__textureTarget,10243,state.wrapModeT);
openfl__$internal_stage3D_GLUtils.CheckGLError();
if(state.lodBias != 0.0) {
}
this.__samplerState = state;
this.__samplerState.__samplerDirty = false;
}
}
,__trackCompressedMemoryUsage: function(memory) {
if(this.__compressedMemoryUsage == 0) this.__context.__statsIncrement(4);
this.__compressedMemoryUsage += memory;
var currentCompressedMemory = this.__context.__statsAdd(9,memory);
this.__trackMemoryUsage(memory);
}
,__trackMemoryUsage: function(memory) {
if(this.__memoryUsage == 0) this.__context.__statsIncrement(3);
this.__memoryUsage += memory;
var currentMemory = this.__context.__statsAdd(8,memory);
}
,__class__: openfl_display3D_textures_TextureBase
});
var openfl_display3D_textures_CubeTexture = function(context,size,format,optimizeForRenderToTexture,streamingLevels) {
openfl_display3D_textures_TextureBase.call(this,context,34067);
this.__size = size;
this.__optimizeForRenderToTexture = optimizeForRenderToTexture;
this.__streamingLevels = streamingLevels;
this.__uploadedSides = 0;
};
$hxClasses["openfl.display3D.textures.CubeTexture"] = openfl_display3D_textures_CubeTexture;
openfl_display3D_textures_CubeTexture.__name__ = ["openfl","display3D","textures","CubeTexture"];
openfl_display3D_textures_CubeTexture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_CubeTexture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
__size: null
,__uploadedSides: null
,uploadCompressedTextureFromByteArray: function(data,byteArrayOffset,async) {
if(async == null) async = false;
var _g = this;
data.position = byteArrayOffset;
var signature = data.readUTFBytes(3);
data.position = byteArrayOffset;
if(signature == "ATF") {
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,this.__textureID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__uploadATFTextureFromByteArray(data,byteArrayOffset);
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else {
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
if(async) haxe_Timer.delay(function() {
_g.dispatchEvent(new openfl_events_Event("textureReady"));
},1);
}
,uploadFromBitmapData: function(source,side,miplevel,generateMipmap) {
if(generateMipmap == null) generateMipmap = false;
if(miplevel == null) miplevel = 0;
if(source == null) return;
var size = this.__size >> miplevel;
if(size == 0) return;
var image = this.__getImage(source);
this.uploadFromTypedArray(image.get_data(),side,miplevel);
}
,uploadFromByteArray: function(data,byteArrayOffset,side,miplevel) {
if(miplevel == null) miplevel = 0;
if(byteArrayOffset == 0) {
this.uploadFromTypedArray(data.b,side);
return;
}
this.uploadFromTypedArray((function($this) {
var $r;
var buffer = openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer(data);
var this1;
if(buffer != null) this1 = new Uint8Array(buffer,byteArrayOffset); else this1 = null;
$r = this1;
return $r;
}(this)),side,miplevel);
}
,uploadFromTypedArray: function(data,side,miplevel) {
if(miplevel == null) miplevel = 0;
if(data == null) return;
var size = this.__size >> miplevel;
if(size == 0) return;
var target;
switch(side) {
case 0:
target = 34069;
break;
case 1:
target = 34070;
break;
case 2:
target = 34071;
break;
case 3:
target = 34072;
break;
case 4:
target = 34073;
break;
case 5:
target = 34074;
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError());
}
lime_graphics_opengl_GL.context.__context.bindTexture(34067,this.__textureID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.texImage2D(target,miplevel,this.__internalFormat,size,size,0,this.__format,5121,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(data));
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__uploadedSides |= 1 << side;
var memUsage = this.__size * this.__size * 4;
this.__trackMemoryUsage(memUsage);
}
,__setSamplerState: function(state) {
if(!state.equals(this.__samplerState)) {
if(state.minFilter != 9728 && state.minFilter != 9729 && !state.mipmapGenerated) {
lime_graphics_opengl_GL.context.__context.generateMipmap(34067);
openfl__$internal_stage3D_GLUtils.CheckGLError();
state.mipmapGenerated = true;
}
if(state.maxAniso != 0.0) {
lime_graphics_opengl_GL.context.__context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,state.maxAniso);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
}
openfl_display3D_textures_TextureBase.prototype.__setSamplerState.call(this,state);
}
,__uploadATFTextureFromByteArray: function(data,byteArrayOffset) {
}
,__class__: openfl_display3D_textures_CubeTexture
});
var openfl_display3D_textures_RectangleTexture = function(context,width,height,format,optimizeForRenderToTexture) {
openfl_display3D_textures_TextureBase.call(this,context,3553);
this.__width = width;
this.__height = height;
this.__optimizeForRenderToTexture = optimizeForRenderToTexture;
this.uploadFromTypedArray(null);
};
$hxClasses["openfl.display3D.textures.RectangleTexture"] = openfl_display3D_textures_RectangleTexture;
openfl_display3D_textures_RectangleTexture.__name__ = ["openfl","display3D","textures","RectangleTexture"];
openfl_display3D_textures_RectangleTexture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_RectangleTexture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
uploadFromBitmapData: function(source) {
if(source == null) return;
var image = this.__getImage(source);
if(image == null) return;
this.uploadFromTypedArray(image.get_data());
}
,uploadFromByteArray: function(data,byteArrayOffset) {
if(byteArrayOffset == 0) {
this.uploadFromTypedArray(data.b);
return;
}
this.uploadFromTypedArray((function($this) {
var $r;
var buffer = openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer(data);
var this1;
if(buffer != null) this1 = new Uint8Array(buffer,byteArrayOffset); else this1 = null;
$r = this1;
return $r;
}(this)));
}
,uploadFromTypedArray: function(data) {
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,this.__textureID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.texImage2D(this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,5121,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(data));
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var memUsage = this.__width * this.__height * 4;
this.__trackMemoryUsage(memUsage);
}
,__setSamplerState: function(state) {
if(!state.equals(this.__samplerState)) {
if(state.maxAniso != 0.0) {
lime_graphics_opengl_GL.context.__context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,state.maxAniso);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
}
openfl_display3D_textures_TextureBase.prototype.__setSamplerState.call(this,state);
}
,__class__: openfl_display3D_textures_RectangleTexture
});
var openfl_display3D_textures_Texture = function(context,width,height,format,optimizeForRenderToTexture,streamingLevels) {
openfl_display3D_textures_TextureBase.call(this,context,3553);
this.__width = width;
this.__height = height;
this.__optimizeForRenderToTexture = optimizeForRenderToTexture;
this.__streamingLevels = streamingLevels;
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,this.__textureID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.texImage2D(this.__textureTarget,0,this.__internalFormat,width,height,0,this.__format,5121,lime_utils__$DataPointer_DataPointer_$Impl_$.fromInt(0));
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,null);
this.uploadFromTypedArray(null);
};
$hxClasses["openfl.display3D.textures.Texture"] = openfl_display3D_textures_Texture;
openfl_display3D_textures_Texture.__name__ = ["openfl","display3D","textures","Texture"];
openfl_display3D_textures_Texture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_Texture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
uploadCompressedTextureFromByteArray: function(data,byteArrayOffset,async) {
if(async == null) async = false;
var _g = this;
data.position = byteArrayOffset;
var signature = data.readUTFBytes(3);
data.position = byteArrayOffset;
if(signature == "ATF") {
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,this.__textureID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
this.__uploadATFTextureFromByteArray(data,byteArrayOffset);
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else {
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
if(async) haxe_Timer.delay(function() {
_g.dispatchEvent(new openfl_events_Event("textureReady"));
},1);
}
,uploadFromBitmapData: function(source,miplevel,generateMipmap) {
if(generateMipmap == null) generateMipmap = false;
if(miplevel == null) miplevel = 0;
if(source == null) return;
var width = this.__width >> miplevel;
var height = this.__height >> miplevel;
if(width == 0 && height == 0) return;
if(width == 0) width = 1;
if(height == 0) height = 1;
if(source.width != width || source.height != height) {
var copy = new openfl_display_BitmapData(width,height,true,0);
copy.draw(source);
source = copy;
}
var image = this.__getImage(source);
this.uploadFromTypedArray(image.get_data(),miplevel);
}
,uploadFromByteArray: function(data,byteArrayOffset,miplevel) {
if(miplevel == null) miplevel = 0;
if(byteArrayOffset == 0) {
this.uploadFromTypedArray(data.b,miplevel);
return;
}
this.uploadFromTypedArray((function($this) {
var $r;
var buffer = openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer(data);
var this1;
if(buffer != null) this1 = new Uint8Array(buffer,byteArrayOffset); else this1 = null;
$r = this1;
return $r;
}(this)),miplevel);
}
,uploadFromTypedArray: function(data,miplevel) {
if(miplevel == null) miplevel = 0;
if(data == null) return;
var width = this.__width >> miplevel;
var height = this.__height >> miplevel;
if(width == 0 && height == 0) return;
if(width == 0) width = 1;
if(height == 0) height = 1;
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,this.__textureID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.texImage2D(this.__textureTarget,miplevel,this.__internalFormat,width,height,0,this.__format,5121,lime_utils__$DataPointer_DataPointer_$Impl_$.fromArrayBufferView(data));
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,null);
openfl__$internal_stage3D_GLUtils.CheckGLError();
var memUsage = width * height * 4;
this.__trackMemoryUsage(memUsage);
}
,__setSamplerState: function(state) {
if(!state.equals(this.__samplerState)) {
if(state.minFilter != 9728 && state.minFilter != 9729 && !state.mipmapGenerated) {
lime_graphics_opengl_GL.context.__context.generateMipmap(3553);
openfl__$internal_stage3D_GLUtils.CheckGLError();
state.mipmapGenerated = true;
}
if(state.maxAniso != 0.0) {
lime_graphics_opengl_GL.context.__context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,state.maxAniso);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
}
openfl_display3D_textures_TextureBase.prototype.__setSamplerState.call(this,state);
}
,__uploadATFTextureFromByteArray: function(data,byteArrayOffset) {
data.position = byteArrayOffset;
var version = 0;
var length = 0;
if(data.b[byteArrayOffset + 6] == 255) {
version = 1;
data.position = byteArrayOffset + 8;
length = this.__readUInt32(data);
} else {
version = 0;
data.position = byteArrayOffset + 3;
length = this.__readUInt24(data);
}
if(js_Boot.__cast(byteArrayOffset + length , Int) > openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data)) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("ATF length exceeds byte array length"));
var tdata = data.readUnsignedByte();
var type = tdata >> 7;
if(type != 0) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("ATF Cube maps are not supported"));
var format = tdata & 127;
switch(format) {
case 3:
this.__format = openfl_display3D_textures_TextureBase.__textureFormatCompressed;
break;
case 5:
this.__format = openfl_display3D_textures_TextureBase.__textureFormatCompressedAlpha;
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Only ATF block compressed textures without JPEG-XR+LZMA are supported"));
}
var width = 1 << data.readUnsignedByte();
var height = 1 << data.readUnsignedByte();
if(width != this.__width || height != this.__height) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("ATF width and height dont match"));
var mipCount = data.readUnsignedByte();
var _g = 0;
while(_g < mipCount) {
var level = _g++;
var _g1 = 0;
while(_g1 < 4) {
var gpuFormat = _g1++;
var blockLength;
if(version == 0) blockLength = this.__readUInt24(data); else blockLength = this.__readUInt32(data);
if(_$UInt_UInt_$Impl_$.gt(data.position + blockLength,openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data))) throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Block length exceeds ATF file length"));
if(_$UInt_UInt_$Impl_$.gt(blockLength,0)) {
if(gpuFormat == 0) {
var bytes = new haxe_io_Bytes(new ArrayBuffer(blockLength));
data.readBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes),0,blockLength);
lime_graphics_opengl_GL.compressedTexImage2D(this.__textureTarget,level,this.__format,width >> level,height >> level,0,blockLength,lime_utils__$DataPointer_DataPointer_$Impl_$.fromBytes(bytes));
openfl__$internal_stage3D_GLUtils.CheckGLError();
} else data.position = data.position + blockLength;
}
}
}
}
,__class__: openfl_display3D_textures_Texture
});
var openfl_display3D_textures_VideoTexture = function(context) {
openfl_display3D_textures_TextureBase.call(this,context,3553);
};
$hxClasses["openfl.display3D.textures.VideoTexture"] = openfl_display3D_textures_VideoTexture;
openfl_display3D_textures_VideoTexture.__name__ = ["openfl","display3D","textures","VideoTexture"];
openfl_display3D_textures_VideoTexture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_VideoTexture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
videoHeight: null
,videoWidth: null
,__netStream: null
,attachNetStream: function(netStream) {
var _g = this;
this.__netStream = netStream;
if(this.__netStream.__video.readyState == 4) haxe_Timer.delay(function() {
_g.__textureReady();
},0); else this.__netStream.__video.addEventListener("canplay",function(_) {
_g.__textureReady();
},false);
}
,__getTexture: function() {
if(!this.__netStream.__video.paused) {
lime_graphics_opengl_GL.context.__context.bindTexture(this.__textureTarget,this.__textureID);
openfl__$internal_stage3D_GLUtils.CheckGLError();
lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.texImage2D(lime_graphics_opengl__$WebGLContext_WebGLContext_$Impl_$.fromGL(lime_graphics_opengl_GL),3553,0,6408,6408,5121,this.__netStream.__video);
openfl__$internal_stage3D_GLUtils.CheckGLError();
}
return this.__textureID;
}
,__textureReady: function() {
this.videoWidth = this.__netStream.__video.videoWidth;
this.videoHeight = this.__netStream.__video.videoHeight;
this.dispatchEvent(new openfl_events_Event("textureReady"));
}
,__class__: openfl_display3D_textures_VideoTexture
});
var openfl_errors_Error = function(message,id) {
if(id == null) id = 0;
if(message == null) message = "";
this.message = message;
this.errorID = id;
this.name = "Error";
};
$hxClasses["openfl.errors.Error"] = openfl_errors_Error;
openfl_errors_Error.__name__ = ["openfl","errors","Error"];
openfl_errors_Error.prototype = {
errorID: null
,message: null
,name: null
,getStackTrace: function() {
return haxe_CallStack.toString(haxe_CallStack.exceptionStack());
}
,toString: function() {
if(this.message != null) return this.message; else return "Error";
}
,__class__: openfl_errors_Error
};
var openfl_errors_ArgumentError = function(message) {
if(message == null) message = "";
openfl_errors_Error.call(this,message);
this.name = "ArgumentError";
};
$hxClasses["openfl.errors.ArgumentError"] = openfl_errors_ArgumentError;
openfl_errors_ArgumentError.__name__ = ["openfl","errors","ArgumentError"];
openfl_errors_ArgumentError.__super__ = openfl_errors_Error;
openfl_errors_ArgumentError.prototype = $extend(openfl_errors_Error.prototype,{
__class__: openfl_errors_ArgumentError
});
var openfl_errors_IOError = function(message) {
if(message == null) message = "";
openfl_errors_Error.call(this,message);
this.name = "IOError";
};
$hxClasses["openfl.errors.IOError"] = openfl_errors_IOError;
openfl_errors_IOError.__name__ = ["openfl","errors","IOError"];
openfl_errors_IOError.__super__ = openfl_errors_Error;
openfl_errors_IOError.prototype = $extend(openfl_errors_Error.prototype,{
__class__: openfl_errors_IOError
});
var openfl_errors_EOFError = function() {
openfl_errors_IOError.call(this,"End of file was encountered");
this.name = "EOFError";
this.errorID = 2030;
};
$hxClasses["openfl.errors.EOFError"] = openfl_errors_EOFError;
openfl_errors_EOFError.__name__ = ["openfl","errors","EOFError"];
openfl_errors_EOFError.__super__ = openfl_errors_IOError;
openfl_errors_EOFError.prototype = $extend(openfl_errors_IOError.prototype,{
__class__: openfl_errors_EOFError
});
var openfl_errors_IllegalOperationError = function(message) {
if(message == null) message = "";
openfl_errors_Error.call(this,message,0);
this.name = "IllegalOperationError";
};
$hxClasses["openfl.errors.IllegalOperationError"] = openfl_errors_IllegalOperationError;
openfl_errors_IllegalOperationError.__name__ = ["openfl","errors","IllegalOperationError"];
openfl_errors_IllegalOperationError.__super__ = openfl_errors_Error;
openfl_errors_IllegalOperationError.prototype = $extend(openfl_errors_Error.prototype,{
__class__: openfl_errors_IllegalOperationError
});
var openfl_errors_RangeError = function(message) {
if(message == null) message = "";
openfl_errors_Error.call(this,message,0);
this.name = "RangeError";
};
$hxClasses["openfl.errors.RangeError"] = openfl_errors_RangeError;
openfl_errors_RangeError.__name__ = ["openfl","errors","RangeError"];
openfl_errors_RangeError.__super__ = openfl_errors_Error;
openfl_errors_RangeError.prototype = $extend(openfl_errors_Error.prototype,{
__class__: openfl_errors_RangeError
});
var openfl_errors_TypeError = function(message) {
if(message == null) message = "";
openfl_errors_Error.call(this,message,0);
this.name = "TypeError";
};
$hxClasses["openfl.errors.TypeError"] = openfl_errors_TypeError;
openfl_errors_TypeError.__name__ = ["openfl","errors","TypeError"];
openfl_errors_TypeError.__super__ = openfl_errors_Error;
openfl_errors_TypeError.prototype = $extend(openfl_errors_Error.prototype,{
__class__: openfl_errors_TypeError
});
var openfl_events_ActivityEvent = function(type,bubbles,cancelable,activating) {
if(activating == null) activating = false;
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.activating = activating;
};
$hxClasses["openfl.events.ActivityEvent"] = openfl_events_ActivityEvent;
openfl_events_ActivityEvent.__name__ = ["openfl","events","ActivityEvent"];
openfl_events_ActivityEvent.__super__ = openfl_events_Event;
openfl_events_ActivityEvent.prototype = $extend(openfl_events_Event.prototype,{
activating: null
,clone: function() {
var event = new openfl_events_ActivityEvent(this.type,this.bubbles,this.cancelable,this.activating);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("ActivityEvent",["type","bubbles","cancelable","activating"]);
}
,__class__: openfl_events_ActivityEvent
});
var openfl_events_TextEvent = function(type,bubbles,cancelable,text) {
if(text == null) text = "";
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.text = text;
};
$hxClasses["openfl.events.TextEvent"] = openfl_events_TextEvent;
openfl_events_TextEvent.__name__ = ["openfl","events","TextEvent"];
openfl_events_TextEvent.__super__ = openfl_events_Event;
openfl_events_TextEvent.prototype = $extend(openfl_events_Event.prototype,{
text: null
,clone: function() {
var event = new openfl_events_TextEvent(this.type,this.bubbles,this.cancelable,this.text);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("TextEvent",["type","bubbles","cancelable","text"]);
}
,__class__: openfl_events_TextEvent
});
var openfl_events_ErrorEvent = function(type,bubbles,cancelable,text,id) {
if(id == null) id = 0;
if(text == null) text = "";
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_TextEvent.call(this,type,bubbles,cancelable,text);
this.errorID = id;
};
$hxClasses["openfl.events.ErrorEvent"] = openfl_events_ErrorEvent;
openfl_events_ErrorEvent.__name__ = ["openfl","events","ErrorEvent"];
openfl_events_ErrorEvent.__super__ = openfl_events_TextEvent;
openfl_events_ErrorEvent.prototype = $extend(openfl_events_TextEvent.prototype,{
errorID: null
,clone: function() {
var event = new openfl_events_ErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("ErrorEvent",["type","bubbles","cancelable","text","errorID"]);
}
,__class__: openfl_events_ErrorEvent
});
var openfl_events__$EventDispatcher_DispatchIterator = function(list) {
this.list = list;
this.index = list.length;
};
$hxClasses["openfl.events._EventDispatcher.DispatchIterator"] = openfl_events__$EventDispatcher_DispatchIterator;
openfl_events__$EventDispatcher_DispatchIterator.__name__ = ["openfl","events","_EventDispatcher","DispatchIterator"];
openfl_events__$EventDispatcher_DispatchIterator.prototype = {
active: null
,index: null
,isCopy: null
,list: null
,copy: function() {
if(this.index < this.list.length && !this.isCopy) {
this.list = this.list.slice();
this.isCopy = true;
}
}
,hasNext: function() {
if(this.index < this.list.length) return true; else {
this.active = false;
return false;
}
}
,next: function() {
return this.list[this.index++];
}
,remove: function(listener,listIndex) {
if(this.active) {
if(!this.isCopy) {
if(listIndex < this.index) this.index--;
} else {
var _g1 = this.index;
var _g = this.list.length;
while(_g1 < _g) {
var i = _g1++;
if(this.list[i] == listener) {
this.list.splice(i,1);
break;
}
}
}
}
}
,reset: function(list) {
this.list = list;
this.active = true;
this.index = 0;
}
,__class__: openfl_events__$EventDispatcher_DispatchIterator
};
var openfl_events__$EventDispatcher_Listener = function(callback,useCapture,priority) {
this.callback = callback;
this.useCapture = useCapture;
this.priority = priority;
};
$hxClasses["openfl.events._EventDispatcher.Listener"] = openfl_events__$EventDispatcher_Listener;
openfl_events__$EventDispatcher_Listener.__name__ = ["openfl","events","_EventDispatcher","Listener"];
openfl_events__$EventDispatcher_Listener.prototype = {
callback: null
,priority: null
,useCapture: null
,match: function(callback,useCapture) {
return Reflect.compareMethods(this.callback,callback) && this.useCapture == useCapture;
}
,__class__: openfl_events__$EventDispatcher_Listener
};
var openfl_events_FocusEvent = function(type,bubbles,cancelable,relatedObject,shiftKey,keyCode) {
if(keyCode == null) keyCode = 0;
if(shiftKey == null) shiftKey = false;
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.keyCode = keyCode;
this.shiftKey = shiftKey;
this.relatedObject = relatedObject;
};
$hxClasses["openfl.events.FocusEvent"] = openfl_events_FocusEvent;
openfl_events_FocusEvent.__name__ = ["openfl","events","FocusEvent"];
openfl_events_FocusEvent.__super__ = openfl_events_Event;
openfl_events_FocusEvent.prototype = $extend(openfl_events_Event.prototype,{
keyCode: null
,relatedObject: null
,shiftKey: null
,clone: function() {
var event = new openfl_events_FocusEvent(this.type,this.bubbles,this.cancelable,this.relatedObject,this.shiftKey,this.keyCode);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("FocusEvent",["type","bubbles","cancelable","relatedObject","shiftKey","keyCode"]);
}
,__class__: openfl_events_FocusEvent
});
var openfl_events_FullScreenEvent = function(type,bubbles,cancelable,fullScreen,interactive) {
if(interactive == null) interactive = false;
if(fullScreen == null) fullScreen = false;
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_ActivityEvent.call(this,type,bubbles,cancelable);
this.fullScreen = fullScreen;
this.interactive = interactive;
};
$hxClasses["openfl.events.FullScreenEvent"] = openfl_events_FullScreenEvent;
openfl_events_FullScreenEvent.__name__ = ["openfl","events","FullScreenEvent"];
openfl_events_FullScreenEvent.__super__ = openfl_events_ActivityEvent;
openfl_events_FullScreenEvent.prototype = $extend(openfl_events_ActivityEvent.prototype,{
fullScreen: null
,interactive: null
,clone: function() {
var event = new openfl_events_FullScreenEvent(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("FullscreenEvent",["type","bubbles","cancelable","fullscreen","interactive"]);
}
,__class__: openfl_events_FullScreenEvent
});
var openfl_events_GameInputEvent = function(type,bubbles,cancelable,device) {
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = true;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.device = device;
};
$hxClasses["openfl.events.GameInputEvent"] = openfl_events_GameInputEvent;
openfl_events_GameInputEvent.__name__ = ["openfl","events","GameInputEvent"];
openfl_events_GameInputEvent.__super__ = openfl_events_Event;
openfl_events_GameInputEvent.prototype = $extend(openfl_events_Event.prototype,{
device: null
,clone: function() {
var event = new openfl_events_GameInputEvent(this.type,this.bubbles,this.cancelable,this.device);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("GameInputEvent",["type","bubbles","cancelable","device"]);
}
,__class__: openfl_events_GameInputEvent
});
var openfl_events_HTTPStatusEvent = function(type,bubbles,cancelable,status,redirected) {
if(redirected == null) redirected = false;
if(status == null) status = 0;
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
this.status = status;
this.redirected = redirected;
openfl_events_Event.call(this,type,bubbles,cancelable);
};
$hxClasses["openfl.events.HTTPStatusEvent"] = openfl_events_HTTPStatusEvent;
openfl_events_HTTPStatusEvent.__name__ = ["openfl","events","HTTPStatusEvent"];
openfl_events_HTTPStatusEvent.__super__ = openfl_events_Event;
openfl_events_HTTPStatusEvent.prototype = $extend(openfl_events_Event.prototype,{
redirected: null
,responseHeaders: null
,responseURL: null
,status: null
,clone: function() {
var event = new openfl_events_HTTPStatusEvent(this.type,this.bubbles,null,this.status,this.redirected);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("HTTPStatusEvent",["type","bubbles","cancelable","status","redirected"]);
}
,__class__: openfl_events_HTTPStatusEvent
});
var openfl_events_IOErrorEvent = function(type,bubbles,cancelable,text,id) {
if(id == null) id = 0;
if(text == null) text = "";
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = true;
openfl_events_ErrorEvent.call(this,type,bubbles,cancelable,text,id);
};
$hxClasses["openfl.events.IOErrorEvent"] = openfl_events_IOErrorEvent;
openfl_events_IOErrorEvent.__name__ = ["openfl","events","IOErrorEvent"];
openfl_events_IOErrorEvent.__super__ = openfl_events_ErrorEvent;
openfl_events_IOErrorEvent.prototype = $extend(openfl_events_ErrorEvent.prototype,{
clone: function() {
var event = new openfl_events_IOErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("IOErrorEvent",["type","bubbles","cancelable","text","errorID"]);
}
,__class__: openfl_events_IOErrorEvent
});
var openfl_events_KeyboardEvent = function(type,bubbles,cancelable,charCodeValue,keyCodeValue,keyLocationValue,ctrlKeyValue,altKeyValue,shiftKeyValue,controlKeyValue,commandKeyValue) {
if(commandKeyValue == null) commandKeyValue = false;
if(controlKeyValue == null) controlKeyValue = false;
if(shiftKeyValue == null) shiftKeyValue = false;
if(altKeyValue == null) altKeyValue = false;
if(ctrlKeyValue == null) ctrlKeyValue = false;
if(keyCodeValue == null) keyCodeValue = 0;
if(charCodeValue == null) charCodeValue = 0;
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.charCode = charCodeValue;
this.keyCode = keyCodeValue;
if(keyLocationValue != null) this.keyLocation = keyLocationValue; else this.keyLocation = 0;
this.ctrlKey = ctrlKeyValue;
this.altKey = altKeyValue;
this.shiftKey = shiftKeyValue;
this.controlKey = controlKeyValue;
this.commandKey = commandKeyValue;
};
$hxClasses["openfl.events.KeyboardEvent"] = openfl_events_KeyboardEvent;
openfl_events_KeyboardEvent.__name__ = ["openfl","events","KeyboardEvent"];
openfl_events_KeyboardEvent.__super__ = openfl_events_Event;
openfl_events_KeyboardEvent.prototype = $extend(openfl_events_Event.prototype,{
altKey: null
,charCode: null
,ctrlKey: null
,commandKey: null
,controlKey: null
,keyCode: null
,keyLocation: null
,shiftKey: null
,clone: function() {
var event = new openfl_events_KeyboardEvent(this.type,this.bubbles,this.cancelable,this.charCode,this.keyCode,this.keyLocation,this.ctrlKey,this.altKey,this.shiftKey,this.controlKey,this.commandKey);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("KeyboardEvent",["type","bubbles","cancelable","charCode","keyCode","keyLocation","ctrlKey","altKey","shiftKey"]);
}
,__class__: openfl_events_KeyboardEvent
});
var openfl_events_MouseEvent = function(type,bubbles,cancelable,localX,localY,relatedObject,ctrlKey,altKey,shiftKey,buttonDown,delta,commandKey,clickCount) {
if(clickCount == null) clickCount = 0;
if(commandKey == null) commandKey = false;
if(delta == null) delta = 0;
if(buttonDown == null) buttonDown = false;
if(shiftKey == null) shiftKey = false;
if(altKey == null) altKey = false;
if(ctrlKey == null) ctrlKey = false;
if(localY == null) localY = 0;
if(localX == null) localX = 0;
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = true;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.shiftKey = shiftKey;
this.altKey = altKey;
this.ctrlKey = ctrlKey;
this.bubbles = bubbles;
this.relatedObject = relatedObject;
this.delta = delta;
this.localX = localX;
this.localY = localY;
this.buttonDown = buttonDown;
this.commandKey = commandKey;
this.clickCount = clickCount;
this.stageX = NaN;
this.stageY = NaN;
};
$hxClasses["openfl.events.MouseEvent"] = openfl_events_MouseEvent;
openfl_events_MouseEvent.__name__ = ["openfl","events","MouseEvent"];
openfl_events_MouseEvent.__create = function(type,button,stageX,stageY,local,target,delta) {
if(delta == null) delta = 0;
switch(type) {
case "mouseDown":
openfl_events_MouseEvent.__buttonDown = true;
break;
case "mouseUp":
openfl_events_MouseEvent.__buttonDown = false;
break;
default:
}
var event = new openfl_events_MouseEvent(type,true,false,local.x,local.y,null,openfl_events_MouseEvent.__ctrlKey,openfl_events_MouseEvent.__altKey,openfl_events_MouseEvent.__shiftKey,openfl_events_MouseEvent.__buttonDown,delta,openfl_events_MouseEvent.__commandKey);
event.stageX = stageX;
event.stageY = stageY;
event.target = target;
return event;
};
openfl_events_MouseEvent.__super__ = openfl_events_Event;
openfl_events_MouseEvent.prototype = $extend(openfl_events_Event.prototype,{
altKey: null
,buttonDown: null
,commandKey: null
,clickCount: null
,ctrlKey: null
,delta: null
,localX: null
,localY: null
,relatedObject: null
,shiftKey: null
,stageX: null
,stageY: null
,clone: function() {
var event = new openfl_events_MouseEvent(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.buttonDown,this.delta,this.commandKey,this.clickCount);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("MouseEvent",["type","bubbles","cancelable","localX","localY","relatedObject","ctrlKey","altKey","shiftKey","buttonDown","delta"]);
}
,updateAfterEvent: function() {
}
,__class__: openfl_events_MouseEvent
});
var openfl_events_NetStatusEvent = function(type,bubbles,cancelable,info) {
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
this.info = info;
openfl_events_Event.call(this,type,bubbles,cancelable);
};
$hxClasses["openfl.events.NetStatusEvent"] = openfl_events_NetStatusEvent;
openfl_events_NetStatusEvent.__name__ = ["openfl","events","NetStatusEvent"];
openfl_events_NetStatusEvent.__super__ = openfl_events_Event;
openfl_events_NetStatusEvent.prototype = $extend(openfl_events_Event.prototype,{
info: null
,clone: function() {
var event = new openfl_events_NetStatusEvent(this.type,this.bubbles,this.cancelable,this.info);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("NetStatusEvent",["type","bubbles","cancelable","info"]);
}
,__class__: openfl_events_NetStatusEvent
});
var openfl_events_ProgressEvent = function(type,bubbles,cancelable,bytesLoaded,bytesTotal) {
if(bytesTotal == null) bytesTotal = 0;
if(bytesLoaded == null) bytesLoaded = 0;
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.bytesLoaded = bytesLoaded;
this.bytesTotal = bytesTotal;
};
$hxClasses["openfl.events.ProgressEvent"] = openfl_events_ProgressEvent;
openfl_events_ProgressEvent.__name__ = ["openfl","events","ProgressEvent"];
openfl_events_ProgressEvent.__super__ = openfl_events_Event;
openfl_events_ProgressEvent.prototype = $extend(openfl_events_Event.prototype,{
bytesLoaded: null
,bytesTotal: null
,clone: function() {
var event = new openfl_events_ProgressEvent(this.type,this.bubbles,this.cancelable,this.bytesLoaded,this.bytesTotal);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("ProgressEvent",["type","bubbles","cancelable","bytesLoaded","bytesTotal"]);
}
,__class__: openfl_events_ProgressEvent
});
var openfl_events_SecurityErrorEvent = function(type,bubbles,cancelable,text,id) {
if(id == null) id = 0;
if(text == null) text = "";
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_ErrorEvent.call(this,type,bubbles,cancelable,text,id);
};
$hxClasses["openfl.events.SecurityErrorEvent"] = openfl_events_SecurityErrorEvent;
openfl_events_SecurityErrorEvent.__name__ = ["openfl","events","SecurityErrorEvent"];
openfl_events_SecurityErrorEvent.__super__ = openfl_events_ErrorEvent;
openfl_events_SecurityErrorEvent.prototype = $extend(openfl_events_ErrorEvent.prototype,{
clone: function() {
var event = new openfl_events_SecurityErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("SecurityErrorEvent",["type","bubbles","cancelable","text","errorID"]);
}
,__class__: openfl_events_SecurityErrorEvent
});
var openfl_events_TimerEvent = function(type,bubbles,cancelable) {
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = false;
openfl_events_Event.call(this,type,bubbles,cancelable);
};
$hxClasses["openfl.events.TimerEvent"] = openfl_events_TimerEvent;
openfl_events_TimerEvent.__name__ = ["openfl","events","TimerEvent"];
openfl_events_TimerEvent.__super__ = openfl_events_Event;
openfl_events_TimerEvent.prototype = $extend(openfl_events_Event.prototype,{
clone: function() {
var event = new openfl_events_TimerEvent(this.type,this.bubbles,this.cancelable);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("TimerEvent",["type","bubbles","cancelable"]);
}
,updateAfterEvent: function() {
}
,__class__: openfl_events_TimerEvent
});
var openfl_events_TouchEvent = function(type,bubbles,cancelable,touchPointID,isPrimaryTouchPoint,localX,localY,sizeX,sizeY,pressure,relatedObject,ctrlKey,altKey,shiftKey,commandKey,controlKey,timestamp,touchIntent,samples,isTouchPointCanceled) {
if(isTouchPointCanceled == null) isTouchPointCanceled = false;
if(timestamp == null) timestamp = 0;
if(controlKey == null) controlKey = false;
if(commandKey == null) commandKey = false;
if(shiftKey == null) shiftKey = false;
if(altKey == null) altKey = false;
if(ctrlKey == null) ctrlKey = false;
if(pressure == null) pressure = 0;
if(sizeY == null) sizeY = 0;
if(sizeX == null) sizeX = 0;
if(localY == null) localY = 0;
if(localX == null) localX = 0;
if(isPrimaryTouchPoint == null) isPrimaryTouchPoint = false;
if(touchPointID == null) touchPointID = 0;
if(cancelable == null) cancelable = false;
if(bubbles == null) bubbles = true;
openfl_events_Event.call(this,type,bubbles,cancelable);
this.touchPointID = touchPointID;
this.isPrimaryTouchPoint = isPrimaryTouchPoint;
this.localX = localX;
this.localY = localY;
this.sizeX = sizeX;
this.sizeY = sizeY;
this.pressure = pressure;
this.relatedObject = relatedObject;
this.ctrlKey = ctrlKey;
this.altKey = altKey;
this.shiftKey = shiftKey;
this.commandKey = commandKey;
this.controlKey = controlKey;
this.stageX = NaN;
this.stageY = NaN;
};
$hxClasses["openfl.events.TouchEvent"] = openfl_events_TouchEvent;
openfl_events_TouchEvent.__name__ = ["openfl","events","TouchEvent"];
openfl_events_TouchEvent.__create = function(type,touch,stageX,stageY,local,target) {
var evt = new openfl_events_TouchEvent(type,true,false,0,true,local.x,local.y,1,1,1);
evt.stageX = stageX;
evt.stageY = stageY;
evt.target = target;
return evt;
};
openfl_events_TouchEvent.__super__ = openfl_events_Event;
openfl_events_TouchEvent.prototype = $extend(openfl_events_Event.prototype,{
altKey: null
,commandKey: null
,controlKey: null
,ctrlKey: null
,delta: null
,isPrimaryTouchPoint: null
,localX: null
,localY: null
,pressure: null
,relatedObject: null
,shiftKey: null
,sizeX: null
,sizeY: null
,stageX: null
,stageY: null
,touchPointID: null
,clone: function() {
var event = new openfl_events_TouchEvent(this.type,this.bubbles,this.cancelable,this.touchPointID,this.isPrimaryTouchPoint,this.localX,this.localY,this.sizeX,this.sizeY,this.pressure,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.commandKey,this.controlKey);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("TouchEvent",["type","bubbles","cancelable","touchPointID","isPrimaryTouchPoint","localX","localY","sizeX","sizeY","pressure","relatedObject","ctrlKey","altKey","shiftKey","commandKey","controlKey"]);
}
,updateAfterEvent: function() {
}
,__class__: openfl_events_TouchEvent
});
var openfl_events_UncaughtErrorEvent = function(type,bubbles,cancelable,error) {
if(cancelable == null) cancelable = true;
if(bubbles == null) bubbles = true;
openfl_events_ErrorEvent.call(this,type,bubbles,cancelable);
this.error = error;
};
$hxClasses["openfl.events.UncaughtErrorEvent"] = openfl_events_UncaughtErrorEvent;
openfl_events_UncaughtErrorEvent.__name__ = ["openfl","events","UncaughtErrorEvent"];
openfl_events_UncaughtErrorEvent.__super__ = openfl_events_ErrorEvent;
openfl_events_UncaughtErrorEvent.prototype = $extend(openfl_events_ErrorEvent.prototype,{
error: null
,clone: function() {
var event = new openfl_events_UncaughtErrorEvent(this.type,this.bubbles,this.cancelable,this.error);
event.target = this.target;
event.currentTarget = this.currentTarget;
event.eventPhase = this.eventPhase;
return event;
}
,toString: function() {
return this.__formatToString("UncaughtErrorEvent",["type","bubbles","cancelable","error"]);
}
,__class__: openfl_events_UncaughtErrorEvent
});
var openfl_events_UncaughtErrorEvents = function() {
openfl_events_EventDispatcher.call(this);
};
$hxClasses["openfl.events.UncaughtErrorEvents"] = openfl_events_UncaughtErrorEvents;
openfl_events_UncaughtErrorEvents.__name__ = ["openfl","events","UncaughtErrorEvents"];
openfl_events_UncaughtErrorEvents.__super__ = openfl_events_EventDispatcher;
openfl_events_UncaughtErrorEvents.prototype = $extend(openfl_events_EventDispatcher.prototype,{
__class__: openfl_events_UncaughtErrorEvents
});
var openfl_filters_BitmapFilter = function() {
this.__numPasses = 0;
};
$hxClasses["openfl.filters.BitmapFilter"] = openfl_filters_BitmapFilter;
openfl_filters_BitmapFilter.__name__ = ["openfl","filters","BitmapFilter"];
openfl_filters_BitmapFilter.prototype = {
__cacheObject: null
,__numPasses: null
,clone: function() {
return new openfl_filters_BitmapFilter();
}
,__applyFilter: function(sourceBitmapData,destBitmapData,sourceRect,destPoint) {
}
,__initShader: function(renderSession,pass) {
return renderSession.shaderManager.defaultShader;
}
,__class__: openfl_filters_BitmapFilter
};
var openfl_filters__$BlurFilter_BlurShader = function() {
if(this.__glFragmentSource == null) this.__glFragmentSource = "varying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\tuniform sampler2D uImage0;\n\t\t\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 sum = vec4(0.0);\n\t\t\tsum += texture2D(uImage0, vBlurCoords[0]) * 0.00443;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[1]) * 0.05399;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[2]) * 0.24197;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[3]) * 0.39894;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[4]) * 0.24197;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[5]) * 0.05399;\n\t\t\tsum += texture2D(uImage0, vBlurCoords[6]) * 0.00443;\n\t\t\t\n\t\t\tgl_FragColor = sum;\n\t\t\t\n\t\t}";
if(this.__glVertexSource == null) this.__glVertexSource = "attribute float aAlpha;\n\t\tattribute vec4 aPosition;\n\t\tattribute vec2 aTexCoord;\n\t\tvarying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\t\n\t\tuniform mat4 uMatrix;\n\t\t\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\tuniform vec2 uTextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvAlpha = aAlpha;\n\t\t\tvTexCoord = aTexCoord;\n\t\t\tgl_Position = uMatrix * aPosition;\n\t\t\t\n\t\t\tvec2 r = uRadius / uTextureSize;\n\t\t\tvBlurCoords[0] = aTexCoord - r * 1.0;\n\t\t\tvBlurCoords[1] = aTexCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = aTexCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = aTexCoord;\n\t\t\tvBlurCoords[4] = aTexCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = aTexCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = aTexCoord + r * 1.0;\n\t\t\t\n\t\t}";
openfl_display_Shader.call(this);
this.get_data().uRadius.value = [0,0];
};
$hxClasses["openfl.filters._BlurFilter.BlurShader"] = openfl_filters__$BlurFilter_BlurShader;
openfl_filters__$BlurFilter_BlurShader.__name__ = ["openfl","filters","_BlurFilter","BlurShader"];
openfl_filters__$BlurFilter_BlurShader.__super__ = openfl_display_Shader;
openfl_filters__$BlurFilter_BlurShader.prototype = $extend(openfl_display_Shader.prototype,{
__update: function() {
this.get_data().uTextureSize.value = [this.get_data().uImage0.input.width,this.get_data().uImage0.input.height];
openfl_display_Shader.prototype.__update.call(this);
}
,__class__: openfl_filters__$BlurFilter_BlurShader
});
var openfl_filters_BlurFilter = function(blurX,blurY,quality) {
if(quality == null) quality = 1;
if(blurY == null) blurY = 4;
if(blurX == null) blurX = 4;
openfl_filters_BitmapFilter.call(this);
this.blurX = blurX;
this.blurY = blurY;
this.set_quality(quality);
};
$hxClasses["openfl.filters.BlurFilter"] = openfl_filters_BlurFilter;
openfl_filters_BlurFilter.__name__ = ["openfl","filters","BlurFilter"];
openfl_filters_BlurFilter.__super__ = openfl_filters_BitmapFilter;
openfl_filters_BlurFilter.prototype = $extend(openfl_filters_BitmapFilter.prototype,{
blurX: null
,blurY: null
,quality: null
,horizontalPasses: null
,verticalPasses: null
,clone: function() {
return new openfl_filters_BlurFilter(this.blurX,this.blurY,this.quality);
}
,__initShader: function(renderSession,pass) {
var data = openfl_filters_BlurFilter.__blurShader.get_data();
if(pass <= this.horizontalPasses) {
var scale = Math.pow(0.5,pass >> 1);
data.uRadius.value[0] = this.blurX * scale;
data.uRadius.value[1] = 0;
} else {
var scale1 = Math.pow(0.5,pass - this.horizontalPasses >> 1);
data.uRadius.value[0] = 0;
data.uRadius.value[1] = this.blurY * scale1;
}
return openfl_filters_BlurFilter.__blurShader;
}
,set_quality: function(value) {
if(this.blurX <= 0) this.horizontalPasses = 0; else this.horizontalPasses = Math.round(this.blurX * (value / 4)) + 1;
if(this.blurY <= 0) this.verticalPasses = 0; else this.verticalPasses = Math.round(this.blurY * (value / 4)) + 1;
this.__numPasses = this.horizontalPasses + this.verticalPasses;
return this.quality = value;
}
,__class__: openfl_filters_BlurFilter
,__properties__: {set_quality:"set_quality"}
});
var openfl_filters__$ColorMatrixFilter_ColorMatrixShader = function() {
if(this.__glFragmentSource == null) this.__glFragmentSource = "varying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\tuniform sampler2D uImage0;\n\t\t\n\t\tuniform mat4 uMultipliers;\n\t\tuniform vec4 uOffsets;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 color = texture2D (uImage0, vTexCoord);\n\t\t\t\n\t\t\tif (color.a == 0.0) {\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\tcolor = uOffsets + color * uMultipliers;\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * vAlpha, color.a * vAlpha);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}";
openfl_display_Shader.call(this);
this.get_data().uMultipliers.value = [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];
this.get_data().uOffsets.value = [0,0,0,0];
};
$hxClasses["openfl.filters._ColorMatrixFilter.ColorMatrixShader"] = openfl_filters__$ColorMatrixFilter_ColorMatrixShader;
openfl_filters__$ColorMatrixFilter_ColorMatrixShader.__name__ = ["openfl","filters","_ColorMatrixFilter","ColorMatrixShader"];
openfl_filters__$ColorMatrixFilter_ColorMatrixShader.__super__ = openfl_display_Shader;
openfl_filters__$ColorMatrixFilter_ColorMatrixShader.prototype = $extend(openfl_display_Shader.prototype,{
init: function(matrix) {
var multipliers = this.get_data().uMultipliers.value;
var offsets = this.get_data().uOffsets.value;
multipliers[0] = matrix[0];
multipliers[1] = matrix[1];
multipliers[2] = matrix[2];
multipliers[3] = matrix[3];
multipliers[4] = matrix[5];
multipliers[5] = matrix[6];
multipliers[6] = matrix[7];
multipliers[7] = matrix[8];
multipliers[8] = matrix[10];
multipliers[9] = matrix[11];
multipliers[10] = matrix[12];
multipliers[11] = matrix[13];
multipliers[12] = matrix[15];
multipliers[13] = matrix[16];
multipliers[14] = matrix[17];
multipliers[15] = matrix[18];
offsets[0] = matrix[4] / 255.0;
offsets[1] = matrix[9] / 255.0;
offsets[2] = matrix[14] / 255.0;
offsets[3] = matrix[19] / 255.0;
}
,__class__: openfl_filters__$ColorMatrixFilter_ColorMatrixShader
});
var openfl_filters_ColorMatrixFilter = function(matrix) {
openfl_filters_BitmapFilter.call(this);
this.set_matrix(matrix);
this.__numPasses = 0;
};
$hxClasses["openfl.filters.ColorMatrixFilter"] = openfl_filters_ColorMatrixFilter;
openfl_filters_ColorMatrixFilter.__name__ = ["openfl","filters","ColorMatrixFilter"];
openfl_filters_ColorMatrixFilter.__super__ = openfl_filters_BitmapFilter;
openfl_filters_ColorMatrixFilter.prototype = $extend(openfl_filters_BitmapFilter.prototype,{
matrix: null
,clone: function() {
return new openfl_filters_ColorMatrixFilter(this.matrix);
}
,__applyFilter: function(sourceBitmapData,destBitmapData,sourceRect,destPoint) {
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(sourceBitmapData.image);
lime_graphics_utils_ImageCanvasUtil.createImageData(sourceBitmapData.image);
lime_graphics_utils_ImageCanvasUtil.convertToCanvas(destBitmapData.image);
lime_graphics_utils_ImageCanvasUtil.createImageData(destBitmapData.image);
var source = sourceBitmapData.image.get_data();
var target = destBitmapData.image.get_data();
var offsetX = destPoint.x - sourceRect.x | 0;
var offsetY = destPoint.y - sourceRect.y | 0;
var sourceStride = sourceBitmapData.width * 4;
var targetStride = destBitmapData.width * 4;
var sourceOffset;
var targetOffset;
var _g1 = sourceRect.y | 0;
var _g = sourceRect.height | 0;
while(_g1 < _g) {
var row = _g1++;
var _g3 = sourceRect.x | 0;
var _g2 = sourceRect.width | 0;
while(_g3 < _g2) {
var column = _g3++;
sourceOffset = row * sourceStride + column * 4;
targetOffset = (row + offsetX) * targetStride + (column + offsetY) * 4;
var srcR = source[sourceOffset];
var srcG = source[sourceOffset + 1];
var srcB = source[sourceOffset + 2];
var srcA = source[sourceOffset + 3];
var val = Std["int"](_$UInt_UInt_$Impl_$.toFloat(srcR) * this.matrix[0] + _$UInt_UInt_$Impl_$.toFloat(srcG) * this.matrix[1] + _$UInt_UInt_$Impl_$.toFloat(srcB) * this.matrix[2] + _$UInt_UInt_$Impl_$.toFloat(srcA) * this.matrix[3] + this.matrix[4]);
target[targetOffset] = val;
var val1 = Std["int"](_$UInt_UInt_$Impl_$.toFloat(srcR) * this.matrix[5] + _$UInt_UInt_$Impl_$.toFloat(srcG) * this.matrix[6] + _$UInt_UInt_$Impl_$.toFloat(srcB) * this.matrix[7] + _$UInt_UInt_$Impl_$.toFloat(srcA) * this.matrix[8] + this.matrix[9]);
target[targetOffset + 1] = val1;
var val2 = Std["int"](_$UInt_UInt_$Impl_$.toFloat(srcR) * this.matrix[10] + _$UInt_UInt_$Impl_$.toFloat(srcG) * this.matrix[11] + _$UInt_UInt_$Impl_$.toFloat(srcB) * this.matrix[12] + _$UInt_UInt_$Impl_$.toFloat(srcA) * this.matrix[13] + this.matrix[14]);
target[targetOffset + 2] = val2;
var val3 = Std["int"](_$UInt_UInt_$Impl_$.toFloat(srcR) * this.matrix[15] + _$UInt_UInt_$Impl_$.toFloat(srcG) * this.matrix[16] + _$UInt_UInt_$Impl_$.toFloat(srcB) * this.matrix[17] + _$UInt_UInt_$Impl_$.toFloat(srcA) * this.matrix[18] + this.matrix[19]);
target[targetOffset + 3] = val3;
}
}
destBitmapData.image.dirty = true;
}
,__initShader: function(renderSession,pass) {
openfl_filters_ColorMatrixFilter.__colorMatrixShader.init(this.matrix);
return openfl_filters_ColorMatrixFilter.__colorMatrixShader;
}
,set_matrix: function(value) {
if(value == null) value = [1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];
return this.matrix = value;
}
,__class__: openfl_filters_ColorMatrixFilter
,__properties__: {set_matrix:"set_matrix"}
});
var openfl_filters_DropShadowFilter = function(distance,angle,color,alpha,blurX,blurY,strength,quality,inner,knockout,hideObject) {
if(hideObject == null) hideObject = false;
if(knockout == null) knockout = false;
if(inner == null) inner = false;
if(quality == null) quality = 1;
if(strength == null) strength = 1;
if(blurY == null) blurY = 4;
if(blurX == null) blurX = 4;
if(alpha == null) alpha = 1;
if(color == null) color = 0;
if(angle == null) angle = 45;
if(distance == null) distance = 4;
openfl_filters_BitmapFilter.call(this);
this.distance = distance;
this.angle = angle;
this.color = color;
this.alpha = alpha;
this.blurX = blurX;
this.blurY = blurY;
this.strength = strength;
this.set_quality(quality);
this.inner = inner;
this.set_knockout(knockout);
this.set_hideObject(hideObject);
};
$hxClasses["openfl.filters.DropShadowFilter"] = openfl_filters_DropShadowFilter;
openfl_filters_DropShadowFilter.__name__ = ["openfl","filters","DropShadowFilter"];
openfl_filters_DropShadowFilter.__super__ = openfl_filters_BitmapFilter;
openfl_filters_DropShadowFilter.prototype = $extend(openfl_filters_BitmapFilter.prototype,{
alpha: null
,angle: null
,blurX: null
,blurY: null
,color: null
,distance: null
,hideObject: null
,inner: null
,knockout: null
,quality: null
,strength: null
,clone: function() {
return new openfl_filters_DropShadowFilter(this.distance,this.angle,this.color,this.alpha,this.blurX,this.blurY,this.strength,this.quality,this.inner,this.knockout,this.hideObject);
}
,set_knockout: function(value) {
return this.knockout = value;
}
,set_hideObject: function(value) {
return this.hideObject = value;
}
,set_quality: function(value) {
return this.quality = value;
}
,__class__: openfl_filters_DropShadowFilter
,__properties__: {set_quality:"set_quality",set_knockout:"set_knockout",set_hideObject:"set_hideObject"}
});
var openfl_filters__$GlowFilter_GlowShader = function() {
if(this.__glFragmentSource == null) this.__glFragmentSource = "varying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\tuniform sampler2D uImage0;\n\t\t\n\t\tuniform vec4 uColor;\n\t\t\n\t\tvarying vec2 vBlurCoords[7];\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tfloat a = 0.0;\n\t\t\ta += texture2D(uImage0, vBlurCoords[0]).a * 0.00443;\n\t\t\ta += texture2D(uImage0, vBlurCoords[1]).a * 0.05399;\n\t\t\ta += texture2D(uImage0, vBlurCoords[2]).a * 0.24197;\n\t\t\ta += texture2D(uImage0, vBlurCoords[3]).a * 0.39894;\n\t\t\ta += texture2D(uImage0, vBlurCoords[4]).a * 0.24197;\n\t\t\ta += texture2D(uImage0, vBlurCoords[5]).a * 0.05399;\n\t\t\ta += texture2D(uImage0, vBlurCoords[6]).a * 0.00443;\n\t\t\ta *= uColor.a;\n\t\t\t\n\t\t\tgl_FragColor = vec4(uColor.rgb * a, a);\n\t\t\t\n\t\t}";
if(this.__glVertexSource == null) this.__glVertexSource = "attribute float aAlpha;\n\t\tattribute vec4 aPosition;\n\t\tattribute vec2 aTexCoord;\n\t\tvarying float vAlpha;\n\t\tvarying vec2 vTexCoord;\n\t\t\n\t\tuniform mat4 uMatrix;\n\t\t\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\tuniform vec2 uTextureSize;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvAlpha = aAlpha;\n\t\t\tvTexCoord = aTexCoord;\n\t\t\tgl_Position = uMatrix * aPosition;\n\t\t\t\n\t\t\tvec2 r = uRadius / uTextureSize;\n\t\t\tvBlurCoords[0] = aTexCoord - r * 1.0;\n\t\t\tvBlurCoords[1] = aTexCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = aTexCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = aTexCoord;\n\t\t\tvBlurCoords[4] = aTexCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = aTexCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = aTexCoord + r * 1.0;\n\t\t\t\n\t\t}";
openfl_display_Shader.call(this);
this.get_data().uRadius.value = [0,0];
this.get_data().uColor.value = [0,0,0,0];
};
$hxClasses["openfl.filters._GlowFilter.GlowShader"] = openfl_filters__$GlowFilter_GlowShader;
openfl_filters__$GlowFilter_GlowShader.__name__ = ["openfl","filters","_GlowFilter","GlowShader"];
openfl_filters__$GlowFilter_GlowShader.__super__ = openfl_display_Shader;
openfl_filters__$GlowFilter_GlowShader.prototype = $extend(openfl_display_Shader.prototype,{
__update: function() {
this.get_data().uTextureSize.value = [this.get_data().uImage0.input.width,this.get_data().uImage0.input.height];
openfl_display_Shader.prototype.__update.call(this);
}
,__class__: openfl_filters__$GlowFilter_GlowShader
});
var openfl_filters_GlowFilter = function(color,alpha,blurX,blurY,strength,quality,inner,knockout) {
if(knockout == null) knockout = false;
if(inner == null) inner = false;
if(quality == null) quality = 1;
if(strength == null) strength = 2;
if(blurY == null) blurY = 6;
if(blurX == null) blurX = 6;
if(alpha == null) alpha = 1;
if(color == null) color = 16711680;
openfl_filters_BitmapFilter.call(this);
this.color = color;
this.alpha = alpha;
this.blurX = blurX;
this.blurY = blurY;
this.strength = strength;
this.set_quality(quality);
this.inner = inner;
this.set_knockout(knockout);
this.__cacheObject = true;
};
$hxClasses["openfl.filters.GlowFilter"] = openfl_filters_GlowFilter;
openfl_filters_GlowFilter.__name__ = ["openfl","filters","GlowFilter"];
openfl_filters_GlowFilter.__super__ = openfl_filters_BitmapFilter;
openfl_filters_GlowFilter.prototype = $extend(openfl_filters_BitmapFilter.prototype,{
alpha: null
,blurX: null
,blurY: null
,color: null
,inner: null
,knockout: null
,quality: null
,strength: null
,horizontalPasses: null
,verticalPasses: null
,clone: function() {
return new openfl_filters_GlowFilter(this.color,this.alpha,this.blurX,this.blurY,this.strength,this.quality,this.inner,this.knockout);
}
,__initShader: function(renderSession,pass) {
var data = openfl_filters_GlowFilter.__glowShader.get_data();
if(pass <= this.horizontalPasses) {
var scale = Math.pow(0.5,pass >> 1);
data.uRadius.value[0] = this.blurX * scale;
data.uRadius.value[1] = 0;
} else {
var scale1 = Math.pow(0.5,pass - this.horizontalPasses >> 1);
data.uRadius.value[0] = 0;
data.uRadius.value[1] = this.blurY * scale1;
}
data.uColor.value[0] = (this.color >> 16 & 255) / 255;
data.uColor.value[1] = (this.color >> 8 & 255) / 255;
data.uColor.value[2] = (this.color & 255) / 255;
data.uColor.value[3] = this.alpha;
return openfl_filters_GlowFilter.__glowShader;
}
,set_knockout: function(value) {
return this.knockout = value;
}
,set_quality: function(value) {
if(this.blurX <= 0) this.horizontalPasses = 0; else this.horizontalPasses = Math.round(this.blurX * (value / 4)) + 1;
if(this.blurY <= 0) this.verticalPasses = 0; else this.verticalPasses = Math.round(this.blurY * (value / 4)) + 1;
this.__numPasses = this.horizontalPasses + this.verticalPasses;
return this.quality = value;
}
,__class__: openfl_filters_GlowFilter
,__properties__: {set_quality:"set_quality",set_knockout:"set_knockout"}
});
var openfl_filters__$BlurShader_$ShaderData = function(byteArray) {
openfl_display_ShaderData.call(this,byteArray);
};
$hxClasses["openfl.filters._BlurShader_ShaderData"] = openfl_filters__$BlurShader_$ShaderData;
openfl_filters__$BlurShader_$ShaderData.__name__ = ["openfl","filters","_BlurShader_ShaderData"];
openfl_filters__$BlurShader_$ShaderData.__super__ = openfl_display_ShaderData;
openfl_filters__$BlurShader_$ShaderData.prototype = $extend(openfl_display_ShaderData.prototype,{
uRadius: null
,uTextureSize: null
,__class__: openfl_filters__$BlurShader_$ShaderData
});
var openfl_filters__$ColorMatrixShader_$ShaderData = function(byteArray) {
openfl_display_ShaderData.call(this,byteArray);
};
$hxClasses["openfl.filters._ColorMatrixShader_ShaderData"] = openfl_filters__$ColorMatrixShader_$ShaderData;
openfl_filters__$ColorMatrixShader_$ShaderData.__name__ = ["openfl","filters","_ColorMatrixShader_ShaderData"];
openfl_filters__$ColorMatrixShader_$ShaderData.__super__ = openfl_display_ShaderData;
openfl_filters__$ColorMatrixShader_$ShaderData.prototype = $extend(openfl_display_ShaderData.prototype,{
uMultipliers: null
,uOffsets: null
,__class__: openfl_filters__$ColorMatrixShader_$ShaderData
});
var openfl_filters__$GlowShader_$ShaderData = function(byteArray) {
openfl_display_ShaderData.call(this,byteArray);
};
$hxClasses["openfl.filters._GlowShader_ShaderData"] = openfl_filters__$GlowShader_$ShaderData;
openfl_filters__$GlowShader_$ShaderData.__name__ = ["openfl","filters","_GlowShader_ShaderData"];
openfl_filters__$GlowShader_$ShaderData.__super__ = openfl_display_ShaderData;
openfl_filters__$GlowShader_$ShaderData.prototype = $extend(openfl_display_ShaderData.prototype,{
uRadius: null
,uTextureSize: null
,uColor: null
,__class__: openfl_filters__$GlowShader_$ShaderData
});
var openfl_geom_Matrix3D = function(v) {
if(v != null && v.get_length() == 16) this.rawData = v.concat(null); else {
var a = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
var vector = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a[i]);
}
this.rawData = vector;
}
};
$hxClasses["openfl.geom.Matrix3D"] = openfl_geom_Matrix3D;
openfl_geom_Matrix3D.__name__ = ["openfl","geom","Matrix3D"];
openfl_geom_Matrix3D.create2D = function(x,y,scale,rotation) {
if(rotation == null) rotation = 0;
if(scale == null) scale = 1;
var theta = rotation * Math.PI / 180.0;
var c = Math.cos(theta);
var s = Math.sin(theta);
return new openfl_geom_Matrix3D((function($this) {
var $r;
var a = [c * scale,-s * scale,0,0,s * scale,c * scale,0,0,0,0,1,0,x,y,0,1];
var vector = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
{
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a[i]);
}
}
$r = vector;
return $r;
}(this)));
};
openfl_geom_Matrix3D.createABCD = function(a,b,c,d,tx,ty) {
return new openfl_geom_Matrix3D((function($this) {
var $r;
var a1 = [a,b,0,0,c,d,0,0,0,0,1,0,tx,ty,0,1];
var vector = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
{
var _g1 = 0;
var _g = a1.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a1[i]);
}
}
$r = vector;
return $r;
}(this)));
};
openfl_geom_Matrix3D.createOrtho = function(x0,x1,y0,y1,zNear,zFar) {
var sx = 1.0 / (x1 - x0);
var sy = 1.0 / (y1 - y0);
var sz = 1.0 / (zFar - zNear);
return new openfl_geom_Matrix3D((function($this) {
var $r;
var a = [2.0 * sx,0,0,0,0,2.0 * sy,0,0,0,0,-2. * sz,0,-(x0 + x1) * sx,-(y0 + y1) * sy,-(zNear + zFar) * sz,1];
var vector = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
{
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a[i]);
}
}
$r = vector;
return $r;
}(this)));
};
openfl_geom_Matrix3D.interpolate = function(thisMat,toMat,percent) {
var m = new openfl_geom_Matrix3D();
var _g = 0;
while(_g < 16) {
var i = _g++;
var value = thisMat.rawData.get(i) + (toMat.rawData.get(i) - thisMat.rawData.get(i)) * percent;
m.rawData.set(i,value);
}
return m;
};
openfl_geom_Matrix3D.__getAxisRotation = function(x,y,z,degrees) {
var m = new openfl_geom_Matrix3D();
var a1 = new openfl_geom_Vector3D(x,y,z);
var rad = -degrees * (Math.PI / 180);
var c = Math.cos(rad);
var s = Math.sin(rad);
var t = 1.0 - c;
m.rawData.set(0,c + a1.x * a1.x * t);
m.rawData.set(5,c + a1.y * a1.y * t);
m.rawData.set(10,c + a1.z * a1.z * t);
var tmp1 = a1.x * a1.y * t;
var tmp2 = a1.z * s;
m.rawData.set(4,tmp1 + tmp2);
m.rawData.set(1,tmp1 - tmp2);
tmp1 = a1.x * a1.z * t;
tmp2 = a1.y * s;
m.rawData.set(8,tmp1 - tmp2);
m.rawData.set(2,tmp1 + tmp2);
tmp1 = a1.y * a1.z * t;
tmp2 = a1.x * s;
m.rawData.set(9,tmp1 + tmp2);
m.rawData.set(6,tmp1 - tmp2);
return m;
};
openfl_geom_Matrix3D.prototype = {
rawData: null
,append: function(lhs) {
var m111 = this.rawData.get(0);
var m121 = this.rawData.get(4);
var m131 = this.rawData.get(8);
var m141 = this.rawData.get(12);
var m112 = this.rawData.get(1);
var m122 = this.rawData.get(5);
var m132 = this.rawData.get(9);
var m142 = this.rawData.get(13);
var m113 = this.rawData.get(2);
var m123 = this.rawData.get(6);
var m133 = this.rawData.get(10);
var m143 = this.rawData.get(14);
var m114 = this.rawData.get(3);
var m124 = this.rawData.get(7);
var m134 = this.rawData.get(11);
var m144 = this.rawData.get(15);
var m211 = lhs.rawData.get(0);
var m221 = lhs.rawData.get(4);
var m231 = lhs.rawData.get(8);
var m241 = lhs.rawData.get(12);
var m212 = lhs.rawData.get(1);
var m222 = lhs.rawData.get(5);
var m232 = lhs.rawData.get(9);
var m242 = lhs.rawData.get(13);
var m213 = lhs.rawData.get(2);
var m223 = lhs.rawData.get(6);
var m233 = lhs.rawData.get(10);
var m243 = lhs.rawData.get(14);
var m214 = lhs.rawData.get(3);
var m224 = lhs.rawData.get(7);
var m234 = lhs.rawData.get(11);
var m244 = lhs.rawData.get(15);
this.rawData.set(0,m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241);
this.rawData.set(1,m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242);
this.rawData.set(2,m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243);
this.rawData.set(3,m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244);
this.rawData.set(4,m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241);
this.rawData.set(5,m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242);
this.rawData.set(6,m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243);
this.rawData.set(7,m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244);
this.rawData.set(8,m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241);
this.rawData.set(9,m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242);
this.rawData.set(10,m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243);
this.rawData.set(11,m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244);
this.rawData.set(12,m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241);
this.rawData.set(13,m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242);
this.rawData.set(14,m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243);
this.rawData.set(15,m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244);
}
,appendRotation: function(degrees,axis,pivotPoint) {
var tx;
var ty;
var tz;
tx = ty = tz = 0;
if(pivotPoint != null) {
tx = pivotPoint.x;
ty = pivotPoint.y;
tz = pivotPoint.z;
}
var radian = degrees * Math.PI / 180;
var cos = Math.cos(radian);
var sin = Math.sin(radian);
var x = axis.x;
var y = axis.y;
var z = axis.z;
var x2 = x * x;
var y2 = y * y;
var z2 = z * z;
var ls = x2 + y2 + z2;
if(ls != 0) {
var l = Math.sqrt(ls);
x /= l;
y /= l;
z /= l;
x2 /= ls;
y2 /= ls;
z2 /= ls;
}
var ccos = 1 - cos;
var m = new openfl_geom_Matrix3D();
var d = m.rawData;
d.set(0,x2 + (y2 + z2) * cos);
d.set(1,x * y * ccos + z * sin);
d.set(2,x * z * ccos - y * sin);
d.set(4,x * y * ccos - z * sin);
d.set(5,y2 + (x2 + z2) * cos);
d.set(6,y * z * ccos + x * sin);
d.set(8,x * z * ccos + y * sin);
d.set(9,y * z * ccos - x * sin);
d.set(10,z2 + (x2 + y2) * cos);
d.set(12,(tx * (y2 + z2) - x * (ty * y + tz * z)) * ccos + (ty * z - tz * y) * sin);
d.set(13,(ty * (x2 + z2) - y * (tx * x + tz * z)) * ccos + (tz * x - tx * z) * sin);
d.set(14,(tz * (x2 + y2) - z * (tx * x + ty * y)) * ccos + (tx * y - ty * x) * sin);
this.append(m);
}
,appendScale: function(xScale,yScale,zScale) {
this.append(new openfl_geom_Matrix3D((function($this) {
var $r;
var a = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
var vector = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
{
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a[i]);
}
}
$r = vector;
return $r;
}(this))));
}
,appendTranslation: function(x,y,z) {
var value = this.rawData.get(12) + x;
this.rawData.set(12,value);
var value1 = this.rawData.get(13) + y;
this.rawData.set(13,value1);
var value2 = this.rawData.get(14) + z;
this.rawData.set(14,value2);
}
,clone: function() {
return new openfl_geom_Matrix3D(this.rawData.copy());
}
,copyColumnFrom: function(column,vector3D) {
switch(column) {
case 0:
this.rawData.set(0,vector3D.x);
this.rawData.set(1,vector3D.y);
this.rawData.set(2,vector3D.z);
this.rawData.set(3,vector3D.w);
break;
case 1:
this.rawData.set(4,vector3D.x);
this.rawData.set(5,vector3D.y);
this.rawData.set(6,vector3D.z);
this.rawData.set(7,vector3D.w);
break;
case 2:
this.rawData.set(8,vector3D.x);
this.rawData.set(9,vector3D.y);
this.rawData.set(10,vector3D.z);
this.rawData.set(11,vector3D.w);
break;
case 3:
this.rawData.set(12,vector3D.x);
this.rawData.set(13,vector3D.y);
this.rawData.set(14,vector3D.z);
this.rawData.set(15,vector3D.w);
break;
default:
}
}
,copyColumnTo: function(column,vector3D) {
switch(column) {
case 0:
vector3D.x = this.rawData.get(0);
vector3D.y = this.rawData.get(1);
vector3D.z = this.rawData.get(2);
vector3D.w = this.rawData.get(3);
break;
case 1:
vector3D.x = this.rawData.get(4);
vector3D.y = this.rawData.get(5);
vector3D.z = this.rawData.get(6);
vector3D.w = this.rawData.get(7);
break;
case 2:
vector3D.x = this.rawData.get(8);
vector3D.y = this.rawData.get(9);
vector3D.z = this.rawData.get(10);
vector3D.w = this.rawData.get(11);
break;
case 3:
vector3D.x = this.rawData.get(12);
vector3D.y = this.rawData.get(13);
vector3D.z = this.rawData.get(14);
vector3D.w = this.rawData.get(15);
break;
default:
}
}
,copyFrom: function(other) {
this.rawData = other.rawData.copy();
}
,copyRawDataFrom: function(vector,index,transpose) {
if(transpose == null) transpose = false;
if(index == null) index = 0;
if(transpose) this.transpose();
var length;
var a = vector.get_length();
length = a - index;
var _g = 0;
while(_g < length) {
var i = _g++;
var value = vector.get(i + index);
this.rawData.set(i,value);
}
if(transpose) this.transpose();
}
,copyRawDataTo: function(vector,index,transpose) {
if(transpose == null) transpose = false;
if(index == null) index = 0;
if(transpose) this.transpose();
var _g1 = 0;
var _g = this.rawData.get_length();
while(_g1 < _g) {
var i = _g1++;
var value = this.rawData.get(i);
vector.set(i + index,value);
}
if(transpose) this.transpose();
}
,copyRowFrom: function(row,vector3D) {
switch(row) {
case 0:
this.rawData.set(0,vector3D.x);
this.rawData.set(4,vector3D.y);
this.rawData.set(8,vector3D.z);
this.rawData.set(12,vector3D.w);
break;
case 1:
this.rawData.set(1,vector3D.x);
this.rawData.set(5,vector3D.y);
this.rawData.set(9,vector3D.z);
this.rawData.set(13,vector3D.w);
break;
case 2:
this.rawData.set(2,vector3D.x);
this.rawData.set(6,vector3D.y);
this.rawData.set(10,vector3D.z);
this.rawData.set(14,vector3D.w);
break;
case 3:
this.rawData.set(3,vector3D.x);
this.rawData.set(7,vector3D.y);
this.rawData.set(11,vector3D.z);
this.rawData.set(15,vector3D.w);
break;
default:
}
}
,copyRowTo: function(row,vector3D) {
switch(row) {
case 0:
vector3D.x = this.rawData.get(0);
vector3D.y = this.rawData.get(4);
vector3D.z = this.rawData.get(8);
vector3D.w = this.rawData.get(12);
break;
case 1:
vector3D.x = this.rawData.get(1);
vector3D.y = this.rawData.get(5);
vector3D.z = this.rawData.get(9);
vector3D.w = this.rawData.get(13);
break;
case 2:
vector3D.x = this.rawData.get(2);
vector3D.y = this.rawData.get(6);
vector3D.z = this.rawData.get(10);
vector3D.w = this.rawData.get(14);
break;
case 3:
vector3D.x = this.rawData.get(3);
vector3D.y = this.rawData.get(7);
vector3D.z = this.rawData.get(11);
vector3D.w = this.rawData.get(15);
break;
default:
}
}
,copyToMatrix3D: function(other) {
other.rawData = this.rawData.copy();
}
,decompose: function(orientationStyle) {
if(orientationStyle == null) orientationStyle = 1;
var vec = openfl__$Vector_Vector_$Impl_$.toObjectVector(null);
var m = this.clone();
var mr = m.rawData.copy();
var pos = new openfl_geom_Vector3D(mr.get(12),mr.get(13),mr.get(14));
mr.set(12,0);
mr.set(13,0);
mr.set(14,0);
var scale = new openfl_geom_Vector3D();
scale.x = Math.sqrt(mr.get(0) * mr.get(0) + mr.get(1) * mr.get(1) + mr.get(2) * mr.get(2));
scale.y = Math.sqrt(mr.get(4) * mr.get(4) + mr.get(5) * mr.get(5) + mr.get(6) * mr.get(6));
scale.z = Math.sqrt(mr.get(8) * mr.get(8) + mr.get(9) * mr.get(9) + mr.get(10) * mr.get(10));
if(mr.get(0) * (mr.get(5) * mr.get(10) - mr.get(6) * mr.get(9)) - mr.get(1) * (mr.get(4) * mr.get(10) - mr.get(6) * mr.get(8)) + mr.get(2) * (mr.get(4) * mr.get(9) - mr.get(5) * mr.get(8)) < 0) scale.z = -scale.z;
var value = mr.get(0) / scale.x;
mr.set(0,value);
var value1 = mr.get(1) / scale.x;
mr.set(1,value1);
var value2 = mr.get(2) / scale.x;
mr.set(2,value2);
var value3 = mr.get(4) / scale.y;
mr.set(4,value3);
var value4 = mr.get(5) / scale.y;
mr.set(5,value4);
var value5 = mr.get(6) / scale.y;
mr.set(6,value5);
var value6 = mr.get(8) / scale.z;
mr.set(8,value6);
var value7 = mr.get(9) / scale.z;
mr.set(9,value7);
var value8 = mr.get(10) / scale.z;
mr.set(10,value8);
var rot = new openfl_geom_Vector3D();
if(orientationStyle != null) switch(orientationStyle) {
case 0:
rot.w = Math.acos((mr.get(0) + mr.get(5) + mr.get(10) - 1) / 2);
var len = Math.sqrt((mr.get(6) - mr.get(9)) * (mr.get(6) - mr.get(9)) + (mr.get(8) - mr.get(2)) * (mr.get(8) - mr.get(2)) + (mr.get(1) - mr.get(4)) * (mr.get(1) - mr.get(4)));
if(len != 0) {
rot.x = (mr.get(6) - mr.get(9)) / len;
rot.y = (mr.get(8) - mr.get(2)) / len;
rot.z = (mr.get(1) - mr.get(4)) / len;
} else rot.x = rot.y = rot.z = 0;
break;
case 2:
var tr = mr.get(0) + mr.get(5) + mr.get(10);
if(tr > 0) {
rot.w = Math.sqrt(1 + tr) / 2;
rot.x = (mr.get(6) - mr.get(9)) / (4 * rot.w);
rot.y = (mr.get(8) - mr.get(2)) / (4 * rot.w);
rot.z = (mr.get(1) - mr.get(4)) / (4 * rot.w);
} else if(mr.get(0) > mr.get(5) && mr.get(0) > mr.get(10)) {
rot.x = Math.sqrt(1 + mr.get(0) - mr.get(5) - mr.get(10)) / 2;
rot.w = (mr.get(6) - mr.get(9)) / (4 * rot.x);
rot.y = (mr.get(1) + mr.get(4)) / (4 * rot.x);
rot.z = (mr.get(8) + mr.get(2)) / (4 * rot.x);
} else if(mr.get(5) > mr.get(10)) {
rot.y = Math.sqrt(1 + mr.get(5) - mr.get(0) - mr.get(10)) / 2;
rot.x = (mr.get(1) + mr.get(4)) / (4 * rot.y);
rot.w = (mr.get(8) - mr.get(2)) / (4 * rot.y);
rot.z = (mr.get(6) + mr.get(9)) / (4 * rot.y);
} else {
rot.z = Math.sqrt(1 + mr.get(10) - mr.get(0) - mr.get(5)) / 2;
rot.x = (mr.get(8) + mr.get(2)) / (4 * rot.z);
rot.y = (mr.get(6) + mr.get(9)) / (4 * rot.z);
rot.w = (mr.get(1) - mr.get(4)) / (4 * rot.z);
}
break;
case 1:
rot.y = Math.asin(-mr.get(2));
if(mr.get(2) != 1 && mr.get(2) != -1) {
rot.x = Math.atan2(mr.get(6),mr.get(10));
rot.z = Math.atan2(mr.get(1),mr.get(0));
} else {
rot.z = 0;
rot.x = Math.atan2(mr.get(4),mr.get(5));
}
break;
}
vec.push(pos);
vec.push(rot);
vec.push(scale);
return vec;
}
,deltaTransformVector: function(v) {
var x = v.x;
var y = v.y;
var z = v.z;
return new openfl_geom_Vector3D(x * this.rawData.get(0) + y * this.rawData.get(4) + z * this.rawData.get(8) + this.rawData.get(3),x * this.rawData.get(1) + y * this.rawData.get(5) + z * this.rawData.get(9) + this.rawData.get(7),x * this.rawData.get(2) + y * this.rawData.get(6) + z * this.rawData.get(10) + this.rawData.get(11),0);
}
,identity: function() {
var a = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
var vector = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a[i]);
}
this.rawData = vector;
}
,interpolateTo: function(toMat,percent) {
var _g = 0;
while(_g < 16) {
var i = _g++;
var value = this.rawData.get(i) + (toMat.rawData.get(i) - this.rawData.get(i)) * percent;
this.rawData.set(i,value);
}
}
,invert: function() {
var d = this.get_determinant();
var invertable = Math.abs(d) > 0.00000000001;
if(invertable) {
d = 1 / d;
var m11 = this.rawData.get(0);
var m21 = this.rawData.get(4);
var m31 = this.rawData.get(8);
var m41 = this.rawData.get(12);
var m12 = this.rawData.get(1);
var m22 = this.rawData.get(5);
var m32 = this.rawData.get(9);
var m42 = this.rawData.get(13);
var m13 = this.rawData.get(2);
var m23 = this.rawData.get(6);
var m33 = this.rawData.get(10);
var m43 = this.rawData.get(14);
var m14 = this.rawData.get(3);
var m24 = this.rawData.get(7);
var m34 = this.rawData.get(11);
var m44 = this.rawData.get(15);
this.rawData.set(0,d * (m22 * (m33 * m44 - m43 * m34) - m32 * (m23 * m44 - m43 * m24) + m42 * (m23 * m34 - m33 * m24)));
this.rawData.set(1,-d * (m12 * (m33 * m44 - m43 * m34) - m32 * (m13 * m44 - m43 * m14) + m42 * (m13 * m34 - m33 * m14)));
this.rawData.set(2,d * (m12 * (m23 * m44 - m43 * m24) - m22 * (m13 * m44 - m43 * m14) + m42 * (m13 * m24 - m23 * m14)));
this.rawData.set(3,-d * (m12 * (m23 * m34 - m33 * m24) - m22 * (m13 * m34 - m33 * m14) + m32 * (m13 * m24 - m23 * m14)));
this.rawData.set(4,-d * (m21 * (m33 * m44 - m43 * m34) - m31 * (m23 * m44 - m43 * m24) + m41 * (m23 * m34 - m33 * m24)));
this.rawData.set(5,d * (m11 * (m33 * m44 - m43 * m34) - m31 * (m13 * m44 - m43 * m14) + m41 * (m13 * m34 - m33 * m14)));
this.rawData.set(6,-d * (m11 * (m23 * m44 - m43 * m24) - m21 * (m13 * m44 - m43 * m14) + m41 * (m13 * m24 - m23 * m14)));
this.rawData.set(7,d * (m11 * (m23 * m34 - m33 * m24) - m21 * (m13 * m34 - m33 * m14) + m31 * (m13 * m24 - m23 * m14)));
this.rawData.set(8,d * (m21 * (m32 * m44 - m42 * m34) - m31 * (m22 * m44 - m42 * m24) + m41 * (m22 * m34 - m32 * m24)));
this.rawData.set(9,-d * (m11 * (m32 * m44 - m42 * m34) - m31 * (m12 * m44 - m42 * m14) + m41 * (m12 * m34 - m32 * m14)));
this.rawData.set(10,d * (m11 * (m22 * m44 - m42 * m24) - m21 * (m12 * m44 - m42 * m14) + m41 * (m12 * m24 - m22 * m14)));
this.rawData.set(11,-d * (m11 * (m22 * m34 - m32 * m24) - m21 * (m12 * m34 - m32 * m14) + m31 * (m12 * m24 - m22 * m14)));
this.rawData.set(12,-d * (m21 * (m32 * m43 - m42 * m33) - m31 * (m22 * m43 - m42 * m23) + m41 * (m22 * m33 - m32 * m23)));
this.rawData.set(13,d * (m11 * (m32 * m43 - m42 * m33) - m31 * (m12 * m43 - m42 * m13) + m41 * (m12 * m33 - m32 * m13)));
this.rawData.set(14,-d * (m11 * (m22 * m43 - m42 * m23) - m21 * (m12 * m43 - m42 * m13) + m41 * (m12 * m23 - m22 * m13)));
this.rawData.set(15,d * (m11 * (m22 * m33 - m32 * m23) - m21 * (m12 * m33 - m32 * m13) + m31 * (m12 * m23 - m22 * m13)));
}
return invertable;
}
,pointAt: function(pos,at,up) {
if(at == null) at = new openfl_geom_Vector3D(0,0,-1);
if(up == null) up = new openfl_geom_Vector3D(0,-1,0);
var dir = at.subtract(pos);
var vup = up.clone();
var right;
dir.normalize();
vup.normalize();
var dir2 = dir.clone();
dir2.scaleBy(vup.dotProduct(dir));
vup = vup.subtract(dir2);
if(vup.get_length() > 0) vup.normalize(); else if(dir.x != 0) vup = new openfl_geom_Vector3D(-dir.y,dir.x,0); else vup = new openfl_geom_Vector3D(1,0,0);
right = vup.crossProduct(dir);
right.normalize();
this.rawData.set(0,right.x);
this.rawData.set(4,right.y);
this.rawData.set(8,right.z);
this.rawData.set(12,0.0);
this.rawData.set(1,vup.x);
this.rawData.set(5,vup.y);
this.rawData.set(9,vup.z);
this.rawData.set(13,0.0);
this.rawData.set(2,dir.x);
this.rawData.set(6,dir.y);
this.rawData.set(10,dir.z);
this.rawData.set(14,0.0);
this.rawData.set(3,pos.x);
this.rawData.set(7,pos.y);
this.rawData.set(11,pos.z);
this.rawData.set(15,1.0);
}
,prepend: function(rhs) {
var m111 = rhs.rawData.get(0);
var m121 = rhs.rawData.get(4);
var m131 = rhs.rawData.get(8);
var m141 = rhs.rawData.get(12);
var m112 = rhs.rawData.get(1);
var m122 = rhs.rawData.get(5);
var m132 = rhs.rawData.get(9);
var m142 = rhs.rawData.get(13);
var m113 = rhs.rawData.get(2);
var m123 = rhs.rawData.get(6);
var m133 = rhs.rawData.get(10);
var m143 = rhs.rawData.get(14);
var m114 = rhs.rawData.get(3);
var m124 = rhs.rawData.get(7);
var m134 = rhs.rawData.get(11);
var m144 = rhs.rawData.get(15);
var m211 = this.rawData.get(0);
var m221 = this.rawData.get(4);
var m231 = this.rawData.get(8);
var m241 = this.rawData.get(12);
var m212 = this.rawData.get(1);
var m222 = this.rawData.get(5);
var m232 = this.rawData.get(9);
var m242 = this.rawData.get(13);
var m213 = this.rawData.get(2);
var m223 = this.rawData.get(6);
var m233 = this.rawData.get(10);
var m243 = this.rawData.get(14);
var m214 = this.rawData.get(3);
var m224 = this.rawData.get(7);
var m234 = this.rawData.get(11);
var m244 = this.rawData.get(15);
this.rawData.set(0,m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241);
this.rawData.set(1,m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242);
this.rawData.set(2,m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243);
this.rawData.set(3,m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244);
this.rawData.set(4,m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241);
this.rawData.set(5,m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242);
this.rawData.set(6,m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243);
this.rawData.set(7,m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244);
this.rawData.set(8,m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241);
this.rawData.set(9,m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242);
this.rawData.set(10,m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243);
this.rawData.set(11,m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244);
this.rawData.set(12,m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241);
this.rawData.set(13,m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242);
this.rawData.set(14,m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243);
this.rawData.set(15,m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244);
}
,prependRotation: function(degrees,axis,pivotPoint) {
var tx;
var ty;
var tz;
tx = ty = tz = 0;
if(pivotPoint != null) {
tx = pivotPoint.x;
ty = pivotPoint.y;
tz = pivotPoint.z;
}
var radian = degrees * Math.PI / 180;
var cos = Math.cos(radian);
var sin = Math.sin(radian);
var x = axis.x;
var y = axis.y;
var z = axis.z;
var x2 = x * x;
var y2 = y * y;
var z2 = z * z;
var ls = x2 + y2 + z2;
if(ls != 0) {
var l = Math.sqrt(ls);
x /= l;
y /= l;
z /= l;
x2 /= ls;
y2 /= ls;
z2 /= ls;
}
var ccos = 1 - cos;
var m = new openfl_geom_Matrix3D();
var d = m.rawData;
d.set(0,x2 + (y2 + z2) * cos);
d.set(1,x * y * ccos + z * sin);
d.set(2,x * z * ccos - y * sin);
d.set(4,x * y * ccos - z * sin);
d.set(5,y2 + (x2 + z2) * cos);
d.set(6,y * z * ccos + x * sin);
d.set(8,x * z * ccos + y * sin);
d.set(9,y * z * ccos - x * sin);
d.set(10,z2 + (x2 + y2) * cos);
d.set(12,(tx * (y2 + z2) - x * (ty * y + tz * z)) * ccos + (ty * z - tz * y) * sin);
d.set(13,(ty * (x2 + z2) - y * (tx * x + tz * z)) * ccos + (tz * x - tx * z) * sin);
d.set(14,(tz * (x2 + y2) - z * (tx * x + ty * y)) * ccos + (tx * y - ty * x) * sin);
this.prepend(m);
}
,prependScale: function(xScale,yScale,zScale) {
this.prepend(new openfl_geom_Matrix3D((function($this) {
var $r;
var a = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
var vector = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
{
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a[i]);
}
}
$r = vector;
return $r;
}(this))));
}
,prependTranslation: function(x,y,z) {
var m = new openfl_geom_Matrix3D();
m.set_position(new openfl_geom_Vector3D(x,y,z));
this.prepend(m);
}
,recompose: function(components,orientationStyle) {
if(components.get_length() < 3 || components.get(2).x == 0 || components.get(2).y == 0 || components.get(2).z == 0) return false;
if(orientationStyle == null) orientationStyle = 1;
this.identity();
var scale = [];
scale[0] = scale[1] = scale[2] = components.get(2).x;
scale[4] = scale[5] = scale[6] = components.get(2).y;
scale[8] = scale[9] = scale[10] = components.get(2).z;
if(orientationStyle != null) switch(orientationStyle) {
case 1:
var cx = Math.cos(components.get(1).x);
var cy = Math.cos(components.get(1).y);
var cz = Math.cos(components.get(1).z);
var sx = Math.sin(components.get(1).x);
var sy = Math.sin(components.get(1).y);
var sz = Math.sin(components.get(1).z);
this.rawData.set(0,cy * cz * scale[0]);
this.rawData.set(1,cy * sz * scale[1]);
this.rawData.set(2,-sy * scale[2]);
this.rawData.set(3,0);
this.rawData.set(4,(sx * sy * cz - cx * sz) * scale[4]);
this.rawData.set(5,(sx * sy * sz + cx * cz) * scale[5]);
this.rawData.set(6,sx * cy * scale[6]);
this.rawData.set(7,0);
this.rawData.set(8,(cx * sy * cz + sx * sz) * scale[8]);
this.rawData.set(9,(cx * sy * sz - sx * cz) * scale[9]);
this.rawData.set(10,cx * cy * scale[10]);
this.rawData.set(11,0);
var value = components.get(0).x;
this.rawData.set(12,value);
var value1 = components.get(0).y;
this.rawData.set(13,value1);
var value2 = components.get(0).z;
this.rawData.set(14,value2);
this.rawData.set(15,1);
break;
default:
var x = components.get(1).x;
var y = components.get(1).y;
var z = components.get(1).z;
var w = components.get(1).w;
if(orientationStyle == 0) {
x *= Math.sin(w / 2);
y *= Math.sin(w / 2);
z *= Math.sin(w / 2);
w = Math.cos(w / 2);
}
this.rawData.set(0,(1 - 2 * y * y - 2 * z * z) * scale[0]);
this.rawData.set(1,(2 * x * y + 2 * w * z) * scale[1]);
this.rawData.set(2,(2 * x * z - 2 * w * y) * scale[2]);
this.rawData.set(3,0);
this.rawData.set(4,(2 * x * y - 2 * w * z) * scale[4]);
this.rawData.set(5,(1 - 2 * x * x - 2 * z * z) * scale[5]);
this.rawData.set(6,(2 * y * z + 2 * w * x) * scale[6]);
this.rawData.set(7,0);
this.rawData.set(8,(2 * x * z + 2 * w * y) * scale[8]);
this.rawData.set(9,(2 * y * z - 2 * w * x) * scale[9]);
this.rawData.set(10,(1 - 2 * x * x - 2 * y * y) * scale[10]);
this.rawData.set(11,0);
var value3 = components.get(0).x;
this.rawData.set(12,value3);
var value4 = components.get(0).y;
this.rawData.set(13,value4);
var value5 = components.get(0).z;
this.rawData.set(14,value5);
this.rawData.set(15,1);
} else {
var x = components.get(1).x;
var y = components.get(1).y;
var z = components.get(1).z;
var w = components.get(1).w;
if(orientationStyle == 0) {
x *= Math.sin(w / 2);
y *= Math.sin(w / 2);
z *= Math.sin(w / 2);
w = Math.cos(w / 2);
}
this.rawData.set(0,(1 - 2 * y * y - 2 * z * z) * scale[0]);
this.rawData.set(1,(2 * x * y + 2 * w * z) * scale[1]);
this.rawData.set(2,(2 * x * z - 2 * w * y) * scale[2]);
this.rawData.set(3,0);
this.rawData.set(4,(2 * x * y - 2 * w * z) * scale[4]);
this.rawData.set(5,(1 - 2 * x * x - 2 * z * z) * scale[5]);
this.rawData.set(6,(2 * y * z + 2 * w * x) * scale[6]);
this.rawData.set(7,0);
this.rawData.set(8,(2 * x * z + 2 * w * y) * scale[8]);
this.rawData.set(9,(2 * y * z - 2 * w * x) * scale[9]);
this.rawData.set(10,(1 - 2 * x * x - 2 * y * y) * scale[10]);
this.rawData.set(11,0);
var value3 = components.get(0).x;
this.rawData.set(12,value3);
var value4 = components.get(0).y;
this.rawData.set(13,value4);
var value5 = components.get(0).z;
this.rawData.set(14,value5);
this.rawData.set(15,1);
}
if(components.get(2).x == 0) this.rawData.set(0,1e-15);
if(components.get(2).y == 0) this.rawData.set(5,1e-15);
if(components.get(2).z == 0) this.rawData.set(10,1e-15);
return !(components.get(2).x == 0 || components.get(2).y == 0 || components.get(2).y == 0);
}
,transformVector: function(v) {
var x = v.x;
var y = v.y;
var z = v.z;
return new openfl_geom_Vector3D(x * this.rawData.get(0) + y * this.rawData.get(4) + z * this.rawData.get(8) + this.rawData.get(12),x * this.rawData.get(1) + y * this.rawData.get(5) + z * this.rawData.get(9) + this.rawData.get(13),x * this.rawData.get(2) + y * this.rawData.get(6) + z * this.rawData.get(10) + this.rawData.get(14),x * this.rawData.get(3) + y * this.rawData.get(7) + z * this.rawData.get(11) + this.rawData.get(15));
}
,transformVectors: function(vin,vout) {
var i = 0;
var x;
var y;
var z;
while(i + 3 <= vin.get_length()) {
x = vin.get(i);
y = vin.get(i + 1);
z = vin.get(i + 2);
var value = x * this.rawData.get(0) + y * this.rawData.get(4) + z * this.rawData.get(8) + this.rawData.get(12);
vout.set(i,value);
var value1 = x * this.rawData.get(1) + y * this.rawData.get(5) + z * this.rawData.get(9) + this.rawData.get(13);
vout.set(i + 1,value1);
var value2 = x * this.rawData.get(2) + y * this.rawData.get(6) + z * this.rawData.get(10) + this.rawData.get(14);
vout.set(i + 2,value2);
i += 3;
}
}
,transpose: function() {
var oRawData = this.rawData.copy();
var value = oRawData.get(4);
this.rawData.set(1,value);
var value1 = oRawData.get(8);
this.rawData.set(2,value1);
var value2 = oRawData.get(12);
this.rawData.set(3,value2);
var value3 = oRawData.get(1);
this.rawData.set(4,value3);
var value4 = oRawData.get(9);
this.rawData.set(6,value4);
var value5 = oRawData.get(13);
this.rawData.set(7,value5);
var value6 = oRawData.get(2);
this.rawData.set(8,value6);
var value7 = oRawData.get(6);
this.rawData.set(9,value7);
var value8 = oRawData.get(14);
this.rawData.set(11,value8);
var value9 = oRawData.get(3);
this.rawData.set(12,value9);
var value10 = oRawData.get(7);
this.rawData.set(13,value10);
var value11 = oRawData.get(11);
this.rawData.set(14,value11);
}
,get_determinant: function() {
return (this.rawData.get(0) * this.rawData.get(5) - this.rawData.get(4) * this.rawData.get(1)) * (this.rawData.get(10) * this.rawData.get(15) - this.rawData.get(14) * this.rawData.get(11)) - (this.rawData.get(0) * this.rawData.get(9) - this.rawData.get(8) * this.rawData.get(1)) * (this.rawData.get(6) * this.rawData.get(15) - this.rawData.get(14) * this.rawData.get(7)) + (this.rawData.get(0) * this.rawData.get(13) - this.rawData.get(12) * this.rawData.get(1)) * (this.rawData.get(6) * this.rawData.get(11) - this.rawData.get(10) * this.rawData.get(7)) + (this.rawData.get(4) * this.rawData.get(9) - this.rawData.get(8) * this.rawData.get(5)) * (this.rawData.get(2) * this.rawData.get(15) - this.rawData.get(14) * this.rawData.get(3)) - (this.rawData.get(4) * this.rawData.get(13) - this.rawData.get(12) * this.rawData.get(5)) * (this.rawData.get(2) * this.rawData.get(11) - this.rawData.get(10) * this.rawData.get(3)) + (this.rawData.get(8) * this.rawData.get(13) - this.rawData.get(12) * this.rawData.get(9)) * (this.rawData.get(2) * this.rawData.get(7) - this.rawData.get(6) * this.rawData.get(3));
}
,get_position: function() {
return new openfl_geom_Vector3D(this.rawData.get(12),this.rawData.get(13),this.rawData.get(14));
}
,set_position: function(val) {
this.rawData.set(12,val.x);
this.rawData.set(13,val.y);
this.rawData.set(14,val.z);
return val;
}
,__class__: openfl_geom_Matrix3D
,__properties__: {set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}
};
var openfl_geom__$Orientation3D_Orientation3D_$Impl_$ = {};
$hxClasses["openfl.geom._Orientation3D.Orientation3D_Impl_"] = openfl_geom__$Orientation3D_Orientation3D_$Impl_$;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.__name__ = ["openfl","geom","_Orientation3D","Orientation3D_Impl_"];
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.fromString = function(value) {
switch(value) {
case "axisAngle":
return 0;
case "eulerAngles":
return 1;
case "quaternion":
return 2;
default:
return null;
}
};
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "axisAngle";
case 1:
return "eulerAngles";
case 2:
return "quaternion";
default:
return null;
}
};
var openfl_geom_Rectangle = function(x,y,width,height) {
if(height == null) height = 0;
if(width == null) width = 0;
if(y == null) y = 0;
if(x == null) x = 0;
this.x = x;
this.y = y;
this.width = width;
this.height = height;
};
$hxClasses["openfl.geom.Rectangle"] = openfl_geom_Rectangle;
openfl_geom_Rectangle.__name__ = ["openfl","geom","Rectangle"];
openfl_geom_Rectangle.prototype = {
height: null
,width: null
,x: null
,y: null
,clone: function() {
return new openfl_geom_Rectangle(this.x,this.y,this.width,this.height);
}
,contains: function(x,y) {
return x >= this.x && y >= this.y && x < this.get_right() && y < this.get_bottom();
}
,containsPoint: function(point) {
return this.contains(point.x,point.y);
}
,containsRect: function(rect) {
if(rect.width <= 0 || rect.height <= 0) return rect.x > this.x && rect.y > this.y && rect.get_right() < this.get_right() && rect.get_bottom() < this.get_bottom(); else return rect.x >= this.x && rect.y >= this.y && rect.get_right() <= this.get_right() && rect.get_bottom() <= this.get_bottom();
}
,copyFrom: function(sourceRect) {
this.x = sourceRect.x;
this.y = sourceRect.y;
this.width = sourceRect.width;
this.height = sourceRect.height;
}
,equals: function(toCompare) {
if(toCompare == this) return true; else return toCompare != null && this.x == toCompare.x && this.y == toCompare.y && this.width == toCompare.width && this.height == toCompare.height;
}
,inflate: function(dx,dy) {
this.x -= dx;
this.width += dx * 2;
this.y -= dy;
this.height += dy * 2;
}
,inflatePoint: function(point) {
this.inflate(point.x,point.y);
}
,intersection: function(toIntersect) {
var x0;
if(this.x < toIntersect.x) x0 = toIntersect.x; else x0 = this.x;
var x1;
if(this.get_right() > toIntersect.get_right()) x1 = toIntersect.get_right(); else x1 = this.get_right();
if(x1 <= x0) return new openfl_geom_Rectangle();
var y0;
if(this.y < toIntersect.y) y0 = toIntersect.y; else y0 = this.y;
var y1;
if(this.get_bottom() > toIntersect.get_bottom()) y1 = toIntersect.get_bottom(); else y1 = this.get_bottom();
if(y1 <= y0) return new openfl_geom_Rectangle();
return new openfl_geom_Rectangle(x0,y0,x1 - x0,y1 - y0);
}
,intersects: function(toIntersect) {
var x0;
if(this.x < toIntersect.x) x0 = toIntersect.x; else x0 = this.x;
var x1;
if(this.get_right() > toIntersect.get_right()) x1 = toIntersect.get_right(); else x1 = this.get_right();
if(x1 <= x0) return false;
var y0;
if(this.y < toIntersect.y) y0 = toIntersect.y; else y0 = this.y;
var y1;
if(this.get_bottom() > toIntersect.get_bottom()) y1 = toIntersect.get_bottom(); else y1 = this.get_bottom();
return y1 > y0;
}
,isEmpty: function() {
return this.width <= 0 || this.height <= 0;
}
,offset: function(dx,dy) {
this.x += dx;
this.y += dy;
}
,offsetPoint: function(point) {
this.x += point.x;
this.y += point.y;
}
,setEmpty: function() {
this.x = this.y = this.width = this.height = 0;
}
,setTo: function(xa,ya,widtha,heighta) {
this.x = xa;
this.y = ya;
this.width = widtha;
this.height = heighta;
}
,toString: function() {
return "(x=" + this.x + ", y=" + this.y + ", width=" + this.width + ", height=" + this.height + ")";
}
,union: function(toUnion) {
if(this.width == 0 || this.height == 0) return toUnion.clone(); else if(toUnion.width == 0 || toUnion.height == 0) return this.clone();
var x0;
if(this.x > toUnion.x) x0 = toUnion.x; else x0 = this.x;
var x1;
if(this.get_right() < toUnion.get_right()) x1 = toUnion.get_right(); else x1 = this.get_right();
var y0;
if(this.y > toUnion.y) y0 = toUnion.y; else y0 = this.y;
var y1;
if(this.get_bottom() < toUnion.get_bottom()) y1 = toUnion.get_bottom(); else y1 = this.get_bottom();
return new openfl_geom_Rectangle(x0,y0,x1 - x0,y1 - y0);
}
,__contract: function(x,y,width,height) {
if(this.width == 0 && this.height == 0) return;
var offsetX = 0.0;
var offsetY = 0.0;
var offsetRight = 0.0;
var offsetBottom = 0.0;
if(this.x < x) offsetX = x - this.x;
if(this.y < y) offsetY = y - this.y;
if(this.get_right() > x + width) offsetRight = x + width - this.get_right();
if(this.get_bottom() > y + height) offsetBottom = y + height - this.get_bottom();
this.x += offsetX;
this.y += offsetY;
this.width += offsetRight - offsetX;
this.height += offsetBottom - offsetY;
}
,__expand: function(x,y,width,height) {
if(this.width == 0 && this.height == 0) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
return;
}
var cacheRight = this.get_right();
var cacheBottom = this.get_bottom();
if(this.x > x) {
this.x = x;
this.width = cacheRight - x;
}
if(this.y > y) {
this.y = y;
this.height = cacheBottom - y;
}
if(cacheRight < x + width) this.width = x + width - this.x;
if(cacheBottom < y + height) this.height = y + height - this.y;
}
,__toLimeRectangle: function() {
if(openfl_geom_Rectangle.__limeRectangle == null) openfl_geom_Rectangle.__limeRectangle = new lime_math_Rectangle();
openfl_geom_Rectangle.__limeRectangle.setTo(this.x,this.y,this.width,this.height);
return openfl_geom_Rectangle.__limeRectangle;
}
,__transform: function(rect,m) {
var tx0 = m.a * this.x + m.c * this.y;
var tx1 = tx0;
var ty0 = m.b * this.x + m.d * this.y;
var ty1 = ty0;
var tx = m.a * (this.x + this.width) + m.c * this.y;
var ty = m.b * (this.x + this.width) + m.d * this.y;
if(tx < tx0) tx0 = tx;
if(ty < ty0) ty0 = ty;
if(tx > tx1) tx1 = tx;
if(ty > ty1) ty1 = ty;
tx = m.a * (this.x + this.width) + m.c * (this.y + this.height);
ty = m.b * (this.x + this.width) + m.d * (this.y + this.height);
if(tx < tx0) tx0 = tx;
if(ty < ty0) ty0 = ty;
if(tx > tx1) tx1 = tx;
if(ty > ty1) ty1 = ty;
tx = m.a * this.x + m.c * (this.y + this.height);
ty = m.b * this.x + m.d * (this.y + this.height);
if(tx < tx0) tx0 = tx;
if(ty < ty0) ty0 = ty;
if(tx > tx1) tx1 = tx;
if(ty > ty1) ty1 = ty;
rect.setTo(tx0 + m.tx,ty0 + m.ty,tx1 - tx0,ty1 - ty0);
}
,get_bottom: function() {
return this.y + this.height;
}
,set_bottom: function(b) {
this.height = b - this.y;
return b;
}
,get_bottomRight: function() {
return new openfl_geom_Point(this.x + this.width,this.y + this.height);
}
,set_bottomRight: function(p) {
this.width = p.x - this.x;
this.height = p.y - this.y;
return p.clone();
}
,get_left: function() {
return this.x;
}
,set_left: function(l) {
this.width -= l - this.x;
this.x = l;
return l;
}
,get_right: function() {
return this.x + this.width;
}
,set_right: function(r) {
this.width = r - this.x;
return r;
}
,get_size: function() {
return new openfl_geom_Point(this.width,this.height);
}
,set_size: function(p) {
this.width = p.x;
this.height = p.y;
return p.clone();
}
,get_top: function() {
return this.y;
}
,set_top: function(t) {
this.height -= t - this.y;
this.y = t;
return t;
}
,get_topLeft: function() {
return new openfl_geom_Point(this.x,this.y);
}
,set_topLeft: function(p) {
this.x = p.x;
this.y = p.y;
return p.clone();
}
,__class__: openfl_geom_Rectangle
,__properties__: {set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}
};
var openfl_geom_Transform = function(displayObject) {
this.__colorTransform = new openfl_geom_ColorTransform();
this.concatenatedColorTransform = new openfl_geom_ColorTransform();
this.pixelBounds = new openfl_geom_Rectangle();
this.__displayObject = displayObject;
this.__hasMatrix = true;
};
$hxClasses["openfl.geom.Transform"] = openfl_geom_Transform;
openfl_geom_Transform.__name__ = ["openfl","geom","Transform"];
openfl_geom_Transform.prototype = {
concatenatedColorTransform: null
,pixelBounds: null
,__colorTransform: null
,__displayObject: null
,__hasMatrix: null
,__hasMatrix3D: null
,get_colorTransform: function() {
return this.__colorTransform;
}
,set_colorTransform: function(value) {
if(!this.__colorTransform.__equals(value)) {
this.__colorTransform = value;
if(value != null) this.__displayObject.set_alpha(value.alphaMultiplier);
this.__displayObject.__setRenderDirty();
}
return this.__colorTransform;
}
,get_concatenatedMatrix: function() {
if(this.__hasMatrix) return this.__displayObject.__getWorldTransform().clone();
return null;
}
,get_matrix: function() {
if(this.__hasMatrix) return this.__displayObject.__transform.clone();
return null;
}
,set_matrix: function(value) {
if(value == null) {
this.__hasMatrix = false;
return null;
}
this.__hasMatrix = true;
this.__hasMatrix3D = false;
if(this.__displayObject != null) this.__setTransform(value.a,value.b,value.c,value.d,value.tx,value.ty);
return value;
}
,get_matrix3D: function() {
if(this.__hasMatrix3D) {
var matrix = this.__displayObject.__transform;
return new openfl_geom_Matrix3D((function($this) {
var $r;
var a = [matrix.a,matrix.b,0.0,0.0,matrix.c,matrix.d,0.0,0.0,0.0,0.0,1.0,0.0,matrix.tx,matrix.ty,0.0,1.0];
var vector = openfl__$Vector_Vector_$Impl_$.toFloatVector(null);
{
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
vector.set(i,a[i]);
}
}
$r = vector;
return $r;
}(this)));
}
return null;
}
,set_matrix3D: function(value) {
if(value == null) {
this.__hasMatrix3D = false;
return null;
}
this.__hasMatrix = false;
this.__hasMatrix3D = true;
this.__setTransform(value.rawData.get(0),value.rawData.get(1),value.rawData.get(5),value.rawData.get(6),value.rawData.get(12),value.rawData.get(13));
return value;
}
,__setTransform: function(a,b,c,d,tx,ty) {
if(this.__displayObject != null) {
var scaleX = 0.0;
var scaleY = 0.0;
if(b == 0) scaleX = a; else scaleX = Math.sqrt(a * a + b * b);
if(c == 0) scaleY = a; else scaleY = Math.sqrt(c * c + d * d);
this.__displayObject.__scaleX = scaleX;
this.__displayObject.__scaleY = scaleY;
var rotation = 180 / Math.PI * Math.atan2(d,c) - 90;
if(rotation != this.__displayObject.__rotation) {
this.__displayObject.__rotation = rotation;
var radians = rotation * (Math.PI / 180);
this.__displayObject.__rotationSine = Math.sin(radians);
this.__displayObject.__rotationCosine = Math.cos(radians);
}
this.__displayObject.__transform.a = a;
this.__displayObject.__transform.b = b;
this.__displayObject.__transform.c = c;
this.__displayObject.__transform.d = d;
this.__displayObject.__transform.tx = tx;
this.__displayObject.__transform.ty = ty;
this.__displayObject.__setTransformDirty();
}
}
,__class__: openfl_geom_Transform
,__properties__: {set_matrix3D:"set_matrix3D",get_matrix3D:"get_matrix3D",set_matrix:"set_matrix",get_matrix:"get_matrix",get_concatenatedMatrix:"get_concatenatedMatrix",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}
};
var openfl_geom_Vector3D = function(x,y,z,w) {
if(w == null) w = 0;
if(z == null) z = 0;
if(y == null) y = 0;
if(x == null) x = 0;
this.w = w;
this.x = x;
this.y = y;
this.z = z;
};
$hxClasses["openfl.geom.Vector3D"] = openfl_geom_Vector3D;
openfl_geom_Vector3D.__name__ = ["openfl","geom","Vector3D"];
openfl_geom_Vector3D.__properties__ = {get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"}
openfl_geom_Vector3D.angleBetween = function(a,b) {
var la = a.get_length();
var lb = b.get_length();
var dot = a.dotProduct(b);
if(la != 0) dot /= la;
if(lb != 0) dot /= lb;
return Math.acos(dot);
};
openfl_geom_Vector3D.distance = function(pt1,pt2) {
var x = pt2.x - pt1.x;
var y = pt2.y - pt1.y;
var z = pt2.z - pt1.z;
return Math.sqrt(x * x + y * y + z * z);
};
openfl_geom_Vector3D.get_X_AXIS = function() {
return new openfl_geom_Vector3D(1,0,0);
};
openfl_geom_Vector3D.get_Y_AXIS = function() {
return new openfl_geom_Vector3D(0,1,0);
};
openfl_geom_Vector3D.get_Z_AXIS = function() {
return new openfl_geom_Vector3D(0,0,1);
};
openfl_geom_Vector3D.prototype = {
w: null
,x: null
,y: null
,z: null
,add: function(a) {
return new openfl_geom_Vector3D(this.x + a.x,this.y + a.y,this.z + a.z);
}
,clone: function() {
return new openfl_geom_Vector3D(this.x,this.y,this.z,this.w);
}
,copyFrom: function(sourceVector3D) {
this.x = sourceVector3D.x;
this.y = sourceVector3D.y;
this.z = sourceVector3D.z;
}
,crossProduct: function(a) {
return new openfl_geom_Vector3D(this.y * a.z - this.z * a.y,this.z * a.x - this.x * a.z,this.x * a.y - this.y * a.x,1);
}
,decrementBy: function(a) {
this.x -= a.x;
this.y -= a.y;
this.z -= a.z;
}
,dotProduct: function(a) {
return this.x * a.x + this.y * a.y + this.z * a.z;
}
,equals: function(toCompare,allFour) {
if(allFour == null) allFour = false;
return this.x == toCompare.x && this.y == toCompare.y && this.z == toCompare.z && (!allFour || this.w == toCompare.w);
}
,incrementBy: function(a) {
this.x += a.x;
this.y += a.y;
this.z += a.z;
}
,nearEquals: function(toCompare,tolerance,allFour) {
if(allFour == null) allFour = false;
return Math.abs(this.x - toCompare.x) < tolerance && Math.abs(this.y - toCompare.y) < tolerance && Math.abs(this.z - toCompare.z) < tolerance && (!allFour || Math.abs(this.w - toCompare.w) < tolerance);
}
,negate: function() {
this.x *= -1;
this.y *= -1;
this.z *= -1;
}
,normalize: function() {
var l = this.get_length();
if(l != 0) {
this.x /= l;
this.y /= l;
this.z /= l;
}
return l;
}
,project: function() {
this.x /= this.w;
this.y /= this.w;
this.z /= this.w;
}
,scaleBy: function(s) {
this.x *= s;
this.y *= s;
this.z *= s;
}
,setTo: function(xa,ya,za) {
this.x = xa;
this.y = ya;
this.z = za;
}
,subtract: function(a) {
return new openfl_geom_Vector3D(this.x - a.x,this.y - a.y,this.z - a.z);
}
,toString: function() {
return "Vector3D(" + this.x + ", " + this.y + ", " + this.z + ")";
}
,get_length: function() {
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
}
,get_lengthSquared: function() {
return this.x * this.x + this.y * this.y + this.z * this.z;
}
,__class__: openfl_geom_Vector3D
,__properties__: {get_lengthSquared:"get_lengthSquared",get_length:"get_length"}
};
var openfl_media_ID3Info = function() {
};
$hxClasses["openfl.media.ID3Info"] = openfl_media_ID3Info;
openfl_media_ID3Info.__name__ = ["openfl","media","ID3Info"];
openfl_media_ID3Info.prototype = {
album: null
,artist: null
,comment: null
,genre: null
,songName: null
,track: null
,year: null
,__class__: openfl_media_ID3Info
};
var openfl_media_Sound = function(stream,context) {
openfl_events_EventDispatcher.call(this,this);
this.bytesLoaded = 0;
this.bytesTotal = 0;
this.isBuffering = false;
this.url = null;
if(stream != null) this.load(stream,context);
};
$hxClasses["openfl.media.Sound"] = openfl_media_Sound;
openfl_media_Sound.__name__ = ["openfl","media","Sound"];
openfl_media_Sound.fromAudioBuffer = function(buffer) {
var sound = new openfl_media_Sound();
sound.__buffer = buffer;
return sound;
};
openfl_media_Sound.fromFile = function(path) {
return openfl_media_Sound.fromAudioBuffer(lime_media_AudioBuffer.fromFile(path));
};
openfl_media_Sound.__super__ = openfl_events_EventDispatcher;
openfl_media_Sound.prototype = $extend(openfl_events_EventDispatcher.prototype,{
bytesLoaded: null
,bytesTotal: null
,isBuffering: null
,url: null
,__buffer: null
,close: function() {
if(this.__buffer != null) this.__buffer.dispose();
}
,load: function(stream,context) {
var _g = this;
this.url = stream.url;
var defaultLibrary = lime_utils_Assets.getLibrary("default");
if(defaultLibrary != null && defaultLibrary.cachedAudioBuffers.exists(this.url)) this.AudioBuffer_onURLLoad(defaultLibrary.cachedAudioBuffers.get(this.url)); else lime_media_AudioBuffer.loadFromFile(this.url).onComplete($bind(this,this.AudioBuffer_onURLLoad)).onError(function(_) {
_g.AudioBuffer_onURLLoad(null);
});
}
,loadCompressedDataFromByteArray: function(bytes,bytesLength) {
if(bytes == null || bytesLength <= 0) {
this.dispatchEvent(new openfl_events_IOErrorEvent("ioError"));
return;
}
if(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(bytes) > bytesLength) {
var copy = new openfl_utils_ByteArrayData(bytesLength);
copy.writeBytes(bytes,0,bytesLength);
bytes = copy;
}
this.__buffer = lime_media_AudioBuffer.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes));
if(this.__buffer == null) this.dispatchEvent(new openfl_events_IOErrorEvent("ioError")); else this.dispatchEvent(new openfl_events_Event("complete"));
}
,loadPCMFromByteArray: function(bytes,samples,format,stereo,sampleRate) {
if(sampleRate == null) sampleRate = 44100;
if(stereo == null) stereo = true;
if(format == null) format = "float";
if(bytes == null) {
this.dispatchEvent(new openfl_events_IOErrorEvent("ioError"));
return;
}
var audioBuffer = new lime_media_AudioBuffer();
if(format == "float") audioBuffer.bitsPerSample = 32; else audioBuffer.bitsPerSample = 16;
if(stereo) audioBuffer.channels = 2; else audioBuffer.channels = 1;
var buffer = openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer(bytes);
var this1;
if(buffer != null) this1 = new Uint8Array(buffer,0); else this1 = null;
audioBuffer.data = this1;
audioBuffer.sampleRate = sampleRate | 0;
this.__buffer = audioBuffer;
this.dispatchEvent(new openfl_events_Event("complete"));
}
,play: function(startTime,loops,sndTransform) {
if(loops == null) loops = 0;
if(startTime == null) startTime = 0.0;
if(openfl_media_SoundMixer.__soundChannels.length >= 32) return null;
if(sndTransform == null) sndTransform = new openfl_media_SoundTransform(); else sndTransform = sndTransform.clone();
var pan = openfl_media_SoundMixer.__soundTransform.pan + sndTransform.pan;
if(pan > 1) pan = 1;
if(pan < -1) pan = -1;
var volume = openfl_media_SoundMixer.__soundTransform.volume * sndTransform.volume;
var source = new lime_media_AudioSource(this.__buffer);
source.offset = startTime | 0;
if(loops > 1) source.set_loops(loops - 1);
source.set_gain(volume);
var position = source.get_position();
position.x = pan;
position.z = -1 * Math.sqrt(1 - Math.pow(pan,2));
source.set_position(position);
return new openfl_media_SoundChannel(source,sndTransform);
}
,get_id3: function() {
return new openfl_media_ID3Info();
}
,get_length: function() {
if(this.__buffer != null) return Std["int"](this.__buffer.get_src().duration() * 1000);
return 0;
}
,AudioBuffer_onURLLoad: function(buffer) {
if(buffer == null) this.dispatchEvent(new openfl_events_IOErrorEvent("ioError")); else {
this.__buffer = buffer;
this.dispatchEvent(new openfl_events_Event("complete"));
}
}
,__class__: openfl_media_Sound
,__properties__: {get_length:"get_length",get_id3:"get_id3"}
});
var openfl_media_SoundChannel = function(source,soundTransform) {
openfl_events_EventDispatcher.call(this,this);
this.leftPeak = 1;
this.rightPeak = 1;
if(soundTransform != null) this.__soundTransform = soundTransform; else this.__soundTransform = new openfl_media_SoundTransform();
if(source != null) {
this.__source = source;
this.__source.onComplete.add($bind(this,this.source_onComplete));
this.__isValid = true;
this.__source.play();
}
openfl_media_SoundMixer.__registerSoundChannel(this);
};
$hxClasses["openfl.media.SoundChannel"] = openfl_media_SoundChannel;
openfl_media_SoundChannel.__name__ = ["openfl","media","SoundChannel"];
openfl_media_SoundChannel.__super__ = openfl_events_EventDispatcher;
openfl_media_SoundChannel.prototype = $extend(openfl_events_EventDispatcher.prototype,{
leftPeak: null
,rightPeak: null
,__isValid: null
,__soundTransform: null
,__source: null
,stop: function() {
openfl_media_SoundMixer.__unregisterSoundChannel(this);
if(!this.__isValid) return;
this.__source.stop();
this.__dispose();
}
,__dispose: function() {
if(!this.__isValid) return;
this.__source.onComplete.remove($bind(this,this.source_onComplete));
this.__source.dispose();
this.__isValid = false;
}
,__updateTransform: function() {
this.set_soundTransform(this.get_soundTransform());
}
,get_position: function() {
if(!this.__isValid) return 0;
return this.__source.get_currentTime() + this.__source.offset;
}
,set_position: function(value) {
if(!this.__isValid) return 0;
this.__source.set_currentTime((value | 0) - this.__source.offset);
return value;
}
,get_soundTransform: function() {
return this.__soundTransform.clone();
}
,set_soundTransform: function(value) {
if(value != null) {
this.__soundTransform.pan = value.pan;
this.__soundTransform.volume = value.volume;
var pan = openfl_media_SoundMixer.__soundTransform.pan + this.__soundTransform.pan;
if(pan < -1) pan = -1;
if(pan > 1) pan = 1;
var volume = openfl_media_SoundMixer.__soundTransform.volume * this.__soundTransform.volume;
if(this.__isValid) {
this.__source.set_gain(volume);
var position = this.__source.get_position();
position.x = pan;
position.z = -1 * Math.sqrt(1 - Math.pow(pan,2));
this.__source.set_position(position);
return value;
}
}
return value;
}
,source_onComplete: function() {
openfl_media_SoundMixer.__unregisterSoundChannel(this);
this.__dispose();
this.dispatchEvent(new openfl_events_Event("soundComplete"));
}
,__class__: openfl_media_SoundChannel
,__properties__: {set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}
});
var openfl_media_SoundLoaderContext = function(bufferTime,checkPolicyFile) {
if(checkPolicyFile == null) checkPolicyFile = false;
if(bufferTime == null) bufferTime = 1000;
this.bufferTime = bufferTime;
this.checkPolicyFile = checkPolicyFile;
};
$hxClasses["openfl.media.SoundLoaderContext"] = openfl_media_SoundLoaderContext;
openfl_media_SoundLoaderContext.__name__ = ["openfl","media","SoundLoaderContext"];
openfl_media_SoundLoaderContext.prototype = {
bufferTime: null
,checkPolicyFile: null
,__class__: openfl_media_SoundLoaderContext
};
var openfl_media_SoundTransform = function(vol,panning) {
if(panning == null) panning = 0;
if(vol == null) vol = 1;
this.volume = vol;
this.pan = panning;
this.leftToLeft = 0;
this.leftToRight = 0;
this.rightToLeft = 0;
this.rightToRight = 0;
};
$hxClasses["openfl.media.SoundTransform"] = openfl_media_SoundTransform;
openfl_media_SoundTransform.__name__ = ["openfl","media","SoundTransform"];
openfl_media_SoundTransform.prototype = {
leftToLeft: null
,leftToRight: null
,pan: null
,rightToLeft: null
,rightToRight: null
,volume: null
,clone: function() {
return new openfl_media_SoundTransform(this.volume,this.pan);
}
,__class__: openfl_media_SoundTransform
};
var openfl_media_SoundMixer = function() { };
$hxClasses["openfl.media.SoundMixer"] = openfl_media_SoundMixer;
openfl_media_SoundMixer.__name__ = ["openfl","media","SoundMixer"];
openfl_media_SoundMixer.__properties__ = {set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"}
openfl_media_SoundMixer.areSoundsInaccessible = function() {
return false;
};
openfl_media_SoundMixer.stopAll = function() {
var _g = 0;
var _g1 = openfl_media_SoundMixer.__soundChannels;
while(_g < _g1.length) {
var channel = _g1[_g];
++_g;
channel.stop();
}
};
openfl_media_SoundMixer.__registerSoundChannel = function(soundChannel) {
openfl_media_SoundMixer.__soundChannels.push(soundChannel);
};
openfl_media_SoundMixer.__unregisterSoundChannel = function(soundChannel) {
HxOverrides.remove(openfl_media_SoundMixer.__soundChannels,soundChannel);
};
openfl_media_SoundMixer.get_soundTransform = function() {
return openfl_media_SoundMixer.__soundTransform;
};
openfl_media_SoundMixer.set_soundTransform = function(value) {
openfl_media_SoundMixer.__soundTransform = value.clone();
var _g = 0;
var _g1 = openfl_media_SoundMixer.__soundChannels;
while(_g < _g1.length) {
var channel = _g1[_g];
++_g;
channel.__updateTransform();
}
return value;
};
var openfl_net_NetConnection = function() {
openfl_events_EventDispatcher.call(this);
};
$hxClasses["openfl.net.NetConnection"] = openfl_net_NetConnection;
openfl_net_NetConnection.__name__ = ["openfl","net","NetConnection"];
openfl_net_NetConnection.__super__ = openfl_events_EventDispatcher;
openfl_net_NetConnection.prototype = $extend(openfl_events_EventDispatcher.prototype,{
connect: function(command,_,_1,_2,_3,_4) {
if(command != null) throw new js__$Boot_HaxeError("Error: Can only connect in \"HTTP streaming\" mode");
this.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,true,{ code : "connectSuccess"}));
}
,__class__: openfl_net_NetConnection
});
var openfl_net_NetStream = function(connection,peerID) {
openfl_events_EventDispatcher.call(this);
this.__connection = connection;
this.__video = window.document.createElement("video");
this.__video.addEventListener("error",$bind(this,this.video_onError),false);
this.__video.addEventListener("waiting",$bind(this,this.video_onWaiting),false);
this.__video.addEventListener("ended",$bind(this,this.video_onEnd),false);
this.__video.addEventListener("pause",$bind(this,this.video_onPause),false);
this.__video.addEventListener("seeking",$bind(this,this.video_onSeeking),false);
this.__video.addEventListener("playing",$bind(this,this.video_onPlaying),false);
this.__video.addEventListener("timeupdate",$bind(this,this.video_onTimeUpdate),false);
this.__video.addEventListener("loadstart",$bind(this,this.video_onLoadStart),false);
this.__video.addEventListener("stalled",$bind(this,this.video_onStalled),false);
this.__video.addEventListener("durationchanged",$bind(this,this.video_onDurationChanged),false);
this.__video.addEventListener("canplay",$bind(this,this.video_onCanPlay),false);
this.__video.addEventListener("canplaythrough",$bind(this,this.video_onCanPlayThrough),false);
this.__video.addEventListener("loadedmetadata",$bind(this,this.video_onLoadMetaData),false);
};
$hxClasses["openfl.net.NetStream"] = openfl_net_NetStream;
openfl_net_NetStream.__name__ = ["openfl","net","NetStream"];
openfl_net_NetStream.__super__ = openfl_events_EventDispatcher;
openfl_net_NetStream.prototype = $extend(openfl_events_EventDispatcher.prototype,{
audioCodec: null
,bufferLength: null
,bufferTime: null
,bytesLoaded: null
,bytesTotal: null
,checkPolicyFile: null
,client: null
,currentFPS: null
,decodedFrames: null
,liveDelay: null
,objectEncoding: null
,soundTransform: null
,time: null
,videoCode: null
,__connection: null
,__timer: null
,__video: null
,close: function() {
this.__video.pause();
this.__video.src = "";
this.time = 0;
}
,pause: function() {
this.__video.pause();
}
,play: function(url,_,_1,_2,_3,_4) {
this.__video.src = url;
this.__video.play();
}
,requestVideoStatus: function() {
var _g = this;
if(this.__timer == null) this.__timer = new haxe_Timer(1);
this.__timer.run = function() {
if(_g.__video.paused) _g.__playStatus("NetStream.Play.pause"); else _g.__playStatus("NetStream.Play.playing");
_g.__timer.stop();
};
}
,resume: function() {
this.__video.play();
}
,seek: function(time) {
if(time < 0) time = 0; else if(time > this.__video.duration) time = this.__video.duration;
this.__video.currentTime = time;
}
,togglePause: function() {
if(this.__video.paused) this.__video.play(); else this.__video.pause();
}
,__playStatus: function(code) {
if(this.client != null) try {
var handler = this.client.onPlayStatus;
handler({ code : code, duration : this.__video.duration, position : this.__video.currentTime, speed : this.__video.playbackRate, start : this.__video.startTime});
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
}
}
,video_onCanPlay: function(event) {
this.__playStatus("NetStream.Play.canplay");
}
,video_onCanPlayThrough: function(event) {
this.__playStatus("NetStream.Play.canplaythrough");
}
,video_onDurationChanged: function(event) {
this.__playStatus("NetStream.Play.durationchanged");
}
,video_onEnd: function(event) {
this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{ code : "NetStream.Play.Stop"}));
this.__playStatus("NetStream.Play.Complete");
}
,video_onError: function(event) {
this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{ code : "NetStream.Play.Stop"}));
this.__playStatus("NetStream.Play.error");
}
,video_onLoadMetaData: function(event) {
if(this.client != null) try {
var handler = this.client.onMetaData;
handler({ width : this.__video.videoWidth, height : this.__video.videoHeight, duration : this.__video.duration});
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
}
}
,video_onLoadStart: function(event) {
this.__playStatus("NetStream.Play.loadstart");
}
,video_onPause: function(event) {
this.__playStatus("NetStream.Play.pause");
}
,video_onPlaying: function(event) {
this.__connection.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,false,{ code : "NetStream.Play.Start"}));
this.__playStatus("NetStream.Play.playing");
}
,video_onSeeking: function(event) {
this.__playStatus("NetStream.Play.seeking");
}
,video_onStalled: function(event) {
this.__playStatus("NetStream.Play.stalled");
}
,video_onTimeUpdate: function(event) {
this.time = this.__video.currentTime;
this.__playStatus("NetStream.Play.timeupdate");
}
,video_onWaiting: function(event) {
this.__playStatus("NetStream.Play.waiting");
}
,get_speed: function() {
return this.__video.playbackRate;
}
,set_speed: function(value) {
return this.__video.playbackRate = value;
}
,__class__: openfl_net_NetStream
,__properties__: {set_speed:"set_speed",get_speed:"get_speed"}
});
var openfl_net_SharedObject = function() {
openfl_events_EventDispatcher.call(this);
this.client = this;
this.objectEncoding = 3;
};
$hxClasses["openfl.net.SharedObject"] = openfl_net_SharedObject;
openfl_net_SharedObject.__name__ = ["openfl","net","SharedObject"];
openfl_net_SharedObject.getLocal = function(name,localPath,secure) {
if(secure == null) secure = false;
var illegalValues = [" ","~","%","&","\\",";",":","\"","'",",","<",">","?","#"];
var allowed = true;
if(name == null || name == "") allowed = false; else {
var _g = 0;
while(_g < illegalValues.length) {
var value = illegalValues[_g];
++_g;
if(name.indexOf(value) > -1) {
allowed = false;
break;
}
}
}
if(!allowed) {
throw new js__$Boot_HaxeError(new openfl_errors_Error("Error #2134: Cannot create SharedObject."));
return null;
}
if(localPath == null) localPath = window.location.href;
if(openfl_net_SharedObject.__sharedObjects == null) {
openfl_net_SharedObject.__sharedObjects = new haxe_ds_StringMap();
openfl_Lib.application.onExit.add(openfl_net_SharedObject.application_onExit);
}
var id = localPath + "/" + name;
if(!openfl_net_SharedObject.__sharedObjects.exists(id)) {
var sharedObject = new openfl_net_SharedObject();
sharedObject.data = { };
sharedObject.__localPath = localPath;
sharedObject.__name = name;
var encodedData = null;
try {
var storage = js_Browser.getLocalStorage();
if(storage != null) encodedData = storage.getItem(localPath + ":" + name);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
}
if(encodedData != null && encodedData != "") try {
var unserializer = new haxe_Unserializer(encodedData);
unserializer.setResolver({ resolveEnum : Type.resolveEnum, resolveClass : openfl_net_SharedObject.__resolveClass});
sharedObject.data = unserializer.unserialize();
} catch( e1 ) {
haxe_CallStack.lastException = e1;
if (e1 instanceof js__$Boot_HaxeError) e1 = e1.val;
}
openfl_net_SharedObject.__sharedObjects.set(id,sharedObject);
}
return openfl_net_SharedObject.__sharedObjects.get(id);
};
openfl_net_SharedObject.getRemote = function(name,remotePath,persistence,secure) {
if(secure == null) secure = false;
if(persistence == null) persistence = false;
openfl_Lib.notImplemented({ fileName : "SharedObject.hx", lineNumber : 260, className : "openfl.net.SharedObject", methodName : "getRemote"});
return null;
};
openfl_net_SharedObject.__getPath = function(localPath,name) {
var path = lime_system_System.get_applicationStorageDirectory() + "/" + localPath + "/";
name = StringTools.replace(name,"//","/");
name = StringTools.replace(name,"//","/");
if(StringTools.startsWith(name,"/")) name = HxOverrides.substr(name,1,null);
if(StringTools.endsWith(name,"/")) name = name.substring(0,name.length - 1);
if(name.indexOf("/") > -1) {
var split = name.split("/");
name = "";
var _g1 = 0;
var _g = split.length - 1;
while(_g1 < _g) {
var i = _g1++;
name += "#" + split[i] + "/";
}
name += split[split.length - 1];
}
return path + name + ".sol";
};
openfl_net_SharedObject.__mkdir = function(directory) {
};
openfl_net_SharedObject.__resolveClass = function(name) {
if(name != null) {
if(StringTools.startsWith(name,"neash.")) name = StringTools.replace(name,"neash.","openfl.");
if(StringTools.startsWith(name,"native.")) name = StringTools.replace(name,"native.","openfl.");
if(StringTools.startsWith(name,"flash.")) name = StringTools.replace(name,"flash.","openfl.");
if(StringTools.startsWith(name,"openfl._v2.")) name = StringTools.replace(name,"openfl._v2.","openfl.");
if(StringTools.startsWith(name,"openfl._legacy.")) name = StringTools.replace(name,"openfl._legacy.","openfl.");
return Type.resolveClass(name);
}
return null;
};
openfl_net_SharedObject.application_onExit = function(_) {
var $it0 = openfl_net_SharedObject.__sharedObjects.iterator();
while( $it0.hasNext() ) {
var sharedObject = $it0.next();
sharedObject.flush();
}
};
openfl_net_SharedObject.__super__ = openfl_events_EventDispatcher;
openfl_net_SharedObject.prototype = $extend(openfl_events_EventDispatcher.prototype,{
client: null
,data: null
,fps: null
,objectEncoding: null
,__localPath: null
,__name: null
,clear: function() {
this.data = { };
try {
var storage = js_Browser.getLocalStorage();
if(storage != null) storage.removeItem(this.__localPath + ":" + this.__name);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
}
}
,close: function() {
}
,connect: function(myConnection,params) {
openfl_Lib.notImplemented({ fileName : "SharedObject.hx", lineNumber : 96, className : "openfl.net.SharedObject", methodName : "connect"});
}
,flush: function(minDiskSpace) {
if(minDiskSpace == null) minDiskSpace = 0;
if(Reflect.fields(this.data).length == 0) return 0;
var encodedData = haxe_Serializer.run(this.data);
try {
var storage = js_Browser.getLocalStorage();
if(storage != null) {
storage.removeItem(this.__localPath + ":" + this.__name);
storage.setItem(this.__localPath + ":" + this.__name,encodedData);
}
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
return 1;
}
return 0;
}
,send: function($arguments) {
openfl_Lib.notImplemented({ fileName : "SharedObject.hx", lineNumber : 269, className : "openfl.net.SharedObject", methodName : "send"});
}
,setDirty: function(propertyName) {
}
,setProperty: function(propertyName,value) {
if(this.data != null) this.data[propertyName] = value;
}
,get_size: function() {
try {
var d = haxe_Serializer.run(this.data);
return haxe_io_Bytes.ofString(d).length;
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
return 0;
}
}
,__class__: openfl_net_SharedObject
,__properties__: {get_size:"get_size"}
});
var openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$ = {};
$hxClasses["openfl.net._SharedObjectFlushStatus.SharedObjectFlushStatus_Impl_"] = openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.__name__ = ["openfl","net","_SharedObjectFlushStatus","SharedObjectFlushStatus_Impl_"];
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.fromString = function(value) {
switch(value) {
case "flushed":
return 0;
case "pending":
return 1;
default:
return null;
}
};
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "flushed";
case 1:
return "pending";
default:
return null;
}
};
var openfl_net_URLLoader = function(request) {
openfl_events_EventDispatcher.call(this);
this.bytesLoaded = 0;
this.bytesTotal = 0;
this.dataFormat = 1;
if(request != null) this.load(request);
};
$hxClasses["openfl.net.URLLoader"] = openfl_net_URLLoader;
openfl_net_URLLoader.__name__ = ["openfl","net","URLLoader"];
openfl_net_URLLoader.__super__ = openfl_events_EventDispatcher;
openfl_net_URLLoader.prototype = $extend(openfl_events_EventDispatcher.prototype,{
bytesLoaded: null
,bytesTotal: null
,data: null
,dataFormat: null
,__httpRequest: null
,close: function() {
if(this.__httpRequest != null) this.__httpRequest.cancel();
}
,load: function(request) {
var _g = this;
if(this.dataFormat == 0) {
var httpRequest = new lime_net__$HTTPRequest_$openfl_$utils_$ByteArray();
this.__prepareRequest(httpRequest,request);
httpRequest.load().onProgress($bind(this,this.httpRequest_onProgress)).onError($bind(this,this.httpRequest_onError)).onComplete(function(data) {
_g.data = data;
var event = new openfl_events_Event("complete");
_g.dispatchEvent(event);
});
} else {
var httpRequest1 = new lime_net__$HTTPRequest_$String();
this.__prepareRequest(httpRequest1,request);
httpRequest1.load().onProgress($bind(this,this.httpRequest_onProgress)).onError($bind(this,this.httpRequest_onError)).onComplete(function(data1) {
_g.data = data1;
var event1 = new openfl_events_Event("complete");
_g.dispatchEvent(event1);
});
}
}
,__prepareRequest: function(httpRequest,request) {
this.__httpRequest = httpRequest;
this.__httpRequest.uri = request.url;
var _g = request.method;
switch(_g) {
case "DELETE":
this.__httpRequest.method = "DELETE";
break;
case "HEAD":
this.__httpRequest.method = "HEAD";
break;
case "OPTIONS":
this.__httpRequest.method = "OPTIONS";
break;
case "POST":
this.__httpRequest.method = "POST";
break;
case "PUT":
this.__httpRequest.method = "PUT";
break;
default:
this.__httpRequest.method = "GET";
}
if(request.data != null) {
if(js_Boot.__instanceof(request.data,openfl_net_URLVariables)) {
var fields = Reflect.fields(request.data);
var _g1 = 0;
while(_g1 < fields.length) {
var field = fields[_g1];
++_g1;
var value = Reflect.field(request.data,field);
this.__httpRequest.formData.set(field,value);
}
} else if(js_Boot.__instanceof(request.data,haxe_io_Bytes)) this.__httpRequest.data = request.data; else this.__httpRequest.data = haxe_io_Bytes.ofString(Std.string(request.data));
}
this.__httpRequest.contentType = request.contentType;
if(request.requestHeaders != null) {
var _g2 = 0;
var _g11 = request.requestHeaders;
while(_g2 < _g11.length) {
var header = _g11[_g2];
++_g2;
this.__httpRequest.headers.push(new lime_net_HTTPRequestHeader(header.name,header.value));
}
}
this.__httpRequest.userAgent = request.userAgent;
}
,httpRequest_onError: function(error) {
if(error == 403) {
var event = new openfl_events_SecurityErrorEvent("securityError");
event.text = Std.string(error);
this.dispatchEvent(event);
} else {
var event1 = new openfl_events_IOErrorEvent("ioError");
event1.text = Std.string(error);
this.dispatchEvent(event1);
}
}
,httpRequest_onProgress: function(bytesLoaded,bytesTotal) {
var event = new openfl_events_ProgressEvent("progress");
event.bytesLoaded = bytesLoaded;
event.bytesTotal = bytesTotal;
this.dispatchEvent(event);
}
,__class__: openfl_net_URLLoader
});
var openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$ = {};
$hxClasses["openfl.net._URLLoaderDataFormat.URLLoaderDataFormat_Impl_"] = openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.__name__ = ["openfl","net","_URLLoaderDataFormat","URLLoaderDataFormat_Impl_"];
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.fromString = function(value) {
switch(value) {
case "binary":
return 0;
case "text":
return 1;
case "variables":
return 2;
default:
return null;
}
};
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "binary";
case 1:
return "text";
case 2:
return "variables";
default:
return null;
}
};
var openfl_net_URLRequest = function(url) {
if(url != null) this.url = url;
this.requestHeaders = [];
this.method = "GET";
this.contentType = null;
};
$hxClasses["openfl.net.URLRequest"] = openfl_net_URLRequest;
openfl_net_URLRequest.__name__ = ["openfl","net","URLRequest"];
openfl_net_URLRequest.prototype = {
contentType: null
,data: null
,method: null
,requestHeaders: null
,url: null
,userAgent: null
,__class__: openfl_net_URLRequest
};
var openfl_net_URLRequestHeader = function(name,value) {
if(value == null) value = "";
if(name == null) name = "";
this.name = name;
this.value = value;
};
$hxClasses["openfl.net.URLRequestHeader"] = openfl_net_URLRequestHeader;
openfl_net_URLRequestHeader.__name__ = ["openfl","net","URLRequestHeader"];
openfl_net_URLRequestHeader.prototype = {
name: null
,value: null
,__class__: openfl_net_URLRequestHeader
};
var openfl_net_URLVariables = function(source) {
if(source != null) this.decode(source);
};
$hxClasses["openfl.net.URLVariables"] = openfl_net_URLVariables;
openfl_net_URLVariables.__name__ = ["openfl","net","URLVariables"];
openfl_net_URLVariables.prototype = {
decode: function(source) {
var fields = Reflect.fields(this);
var _g = 0;
while(_g < fields.length) {
var f = fields[_g];
++_g;
Reflect.deleteField(this,f);
}
var fields1 = source.split(";").join("&").split("&");
var _g1 = 0;
while(_g1 < fields1.length) {
var f1 = fields1[_g1];
++_g1;
var eq = f1.indexOf("=");
if(eq > 0) Reflect.setField(this,StringTools.urlDecode(HxOverrides.substr(f1,0,eq)),StringTools.urlDecode(HxOverrides.substr(f1,eq + 1,null))); else if(eq != 0) Reflect.setField(this,decodeURIComponent(f1.split("+").join(" ")),"");
}
}
,toString: function() {
var result = [];
var fields = Reflect.fields(this);
var _g = 0;
while(_g < fields.length) {
var f = fields[_g];
++_g;
result.push(encodeURIComponent(f) + "=" + StringTools.urlEncode(Reflect.field(this,f)));
}
return result.join("&");
}
,__class__: openfl_net_URLVariables
};
var openfl_system_ApplicationDomain = function(parentDomain) {
if(parentDomain != null) this.parentDomain = parentDomain; else this.parentDomain = openfl_system_ApplicationDomain.currentDomain;
};
$hxClasses["openfl.system.ApplicationDomain"] = openfl_system_ApplicationDomain;
openfl_system_ApplicationDomain.__name__ = ["openfl","system","ApplicationDomain"];
openfl_system_ApplicationDomain.prototype = {
parentDomain: null
,getDefinition: function(name) {
return Type.resolveClass(name);
}
,hasDefinition: function(name) {
return Type.resolveClass(name) != null;
}
,__class__: openfl_system_ApplicationDomain
};
var openfl_system_LoaderContext = function(checkPolicyFile,applicationDomain,securityDomain) {
if(checkPolicyFile == null) checkPolicyFile = false;
this.checkPolicyFile = checkPolicyFile;
this.securityDomain = securityDomain;
this.applicationDomain = applicationDomain;
this.allowCodeImport = true;
this.allowLoadBytesCodeExecution = true;
};
$hxClasses["openfl.system.LoaderContext"] = openfl_system_LoaderContext;
openfl_system_LoaderContext.__name__ = ["openfl","system","LoaderContext"];
openfl_system_LoaderContext.prototype = {
allowCodeImport: null
,allowLoadBytesCodeExecution: null
,applicationDomain: null
,checkPolicyFile: null
,securityDomain: null
,__class__: openfl_system_LoaderContext
};
var openfl_system_SecurityDomain = function() {
};
$hxClasses["openfl.system.SecurityDomain"] = openfl_system_SecurityDomain;
openfl_system_SecurityDomain.__name__ = ["openfl","system","SecurityDomain"];
openfl_system_SecurityDomain.prototype = {
__class__: openfl_system_SecurityDomain
};
var openfl_text__$AntiAliasType_AntiAliasType_$Impl_$ = {};
$hxClasses["openfl.text._AntiAliasType.AntiAliasType_Impl_"] = openfl_text__$AntiAliasType_AntiAliasType_$Impl_$;
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.__name__ = ["openfl","text","_AntiAliasType","AntiAliasType_Impl_"];
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.fromString = function(value) {
switch(value) {
case "advanced":
return 0;
case "normal":
return 1;
default:
return null;
}
};
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "advanced";
case 1:
return "normal";
default:
return null;
}
};
var openfl_text_Font = function(name) {
lime_text_Font.call(this,name);
};
$hxClasses["openfl.text.Font"] = openfl_text_Font;
openfl_text_Font.__name__ = ["openfl","text","Font"];
openfl_text_Font.enumerateFonts = function(enumerateDeviceFonts) {
if(enumerateDeviceFonts == null) enumerateDeviceFonts = false;
return openfl_text_Font.__registeredFonts;
};
openfl_text_Font.fromBytes = function(bytes) {
var font = new openfl_text_Font();
font.__fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes));
return font;
};
openfl_text_Font.fromFile = function(path) {
var font = new openfl_text_Font();
font.__fromFile(path);
return font;
};
openfl_text_Font.registerFont = function(font) {
var instance;
instance = js_Boot.__cast(Type.createInstance(font,[]) , openfl_text_Font);
if(instance != null) openfl_text_Font.__registeredFonts.push(instance);
};
openfl_text_Font.__fromLimeFont = function(value) {
var font = new openfl_text_Font();
font.name = value.name;
font.src = value.src;
return font;
};
openfl_text_Font.__super__ = lime_text_Font;
openfl_text_Font.prototype = $extend(lime_text_Font.prototype,{
fontStyle: null
,fontType: null
,get_fontName: function() {
return this.name;
}
,set_fontName: function(value) {
return this.name = value;
}
,__class__: openfl_text_Font
,__properties__: $extend(lime_text_Font.prototype.__properties__,{set_fontName:"set_fontName",get_fontName:"get_fontName"})
});
var openfl_text__$FontStyle_FontStyle_$Impl_$ = {};
$hxClasses["openfl.text._FontStyle.FontStyle_Impl_"] = openfl_text__$FontStyle_FontStyle_$Impl_$;
openfl_text__$FontStyle_FontStyle_$Impl_$.__name__ = ["openfl","text","_FontStyle","FontStyle_Impl_"];
openfl_text__$FontStyle_FontStyle_$Impl_$.fromString = function(value) {
switch(value) {
case "bold":
return 0;
case "boldItalic":
return 1;
case "italic":
return 2;
case "regular":
return 3;
default:
return null;
}
};
openfl_text__$FontStyle_FontStyle_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "bold";
case 1:
return "boldItalic";
case 2:
return "italic";
case 3:
return "regular";
default:
return null;
}
};
var openfl_text__$FontType_FontType_$Impl_$ = {};
$hxClasses["openfl.text._FontType.FontType_Impl_"] = openfl_text__$FontType_FontType_$Impl_$;
openfl_text__$FontType_FontType_$Impl_$.__name__ = ["openfl","text","_FontType","FontType_Impl_"];
openfl_text__$FontType_FontType_$Impl_$.fromString = function(value) {
switch(value) {
case "device":
return 0;
case "embedded":
return 1;
case "embeddedCFF":
return 2;
default:
return null;
}
};
openfl_text__$FontType_FontType_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "device";
case 1:
return "embedded";
case 2:
return "embeddedCFF";
default:
return null;
}
};
var openfl_text__$GridFitType_GridFitType_$Impl_$ = {};
$hxClasses["openfl.text._GridFitType.GridFitType_Impl_"] = openfl_text__$GridFitType_GridFitType_$Impl_$;
openfl_text__$GridFitType_GridFitType_$Impl_$.__name__ = ["openfl","text","_GridFitType","GridFitType_Impl_"];
openfl_text__$GridFitType_GridFitType_$Impl_$.fromString = function(value) {
switch(value) {
case "none":
return 0;
case "pixel":
return 1;
case "subpixel":
return 2;
default:
return null;
}
};
openfl_text__$GridFitType_GridFitType_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "none";
case 1:
return "pixel";
case 2:
return "subpixel";
default:
return null;
}
};
var openfl_text_StaticText = function() {
openfl_display_DisplayObject.call(this);
this.__graphics = new openfl_display_Graphics(this);
};
$hxClasses["openfl.text.StaticText"] = openfl_text_StaticText;
openfl_text_StaticText.__name__ = ["openfl","text","StaticText"];
openfl_text_StaticText.__super__ = openfl_display_DisplayObject;
openfl_text_StaticText.prototype = $extend(openfl_display_DisplayObject.prototype,{
text: null
,__class__: openfl_text_StaticText
});
var openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$ = {};
$hxClasses["openfl.text._TextFieldAutoSize.TextFieldAutoSize_Impl_"] = openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.__name__ = ["openfl","text","_TextFieldAutoSize","TextFieldAutoSize_Impl_"];
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.fromString = function(value) {
switch(value) {
case "center":
return 0;
case "left":
return 1;
case "none":
return 2;
case "right":
return 3;
default:
return null;
}
};
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "center";
case 1:
return "left";
case 2:
return "none";
case 3:
return "right";
default:
return null;
}
};
var openfl_text__$TextFieldType_TextFieldType_$Impl_$ = {};
$hxClasses["openfl.text._TextFieldType.TextFieldType_Impl_"] = openfl_text__$TextFieldType_TextFieldType_$Impl_$;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.__name__ = ["openfl","text","_TextFieldType","TextFieldType_Impl_"];
openfl_text__$TextFieldType_TextFieldType_$Impl_$.fromString = function(value) {
switch(value) {
case "dynamic":
return 0;
case "input":
return 1;
default:
return null;
}
};
openfl_text__$TextFieldType_TextFieldType_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "dynamic";
case 1:
return "input";
default:
return null;
}
};
var openfl_text_TextFormat = function(font,size,color,bold,italic,underline,url,target,align,leftMargin,rightMargin,indent,leading) {
this.font = font;
this.size = size;
this.color = color;
this.bold = bold;
this.italic = italic;
this.underline = underline;
this.url = url;
this.target = target;
this.align = align;
this.leftMargin = leftMargin;
this.rightMargin = rightMargin;
this.indent = indent;
this.leading = leading;
};
$hxClasses["openfl.text.TextFormat"] = openfl_text_TextFormat;
openfl_text_TextFormat.__name__ = ["openfl","text","TextFormat"];
openfl_text_TextFormat.prototype = {
align: null
,blockIndent: null
,bold: null
,bullet: null
,color: null
,font: null
,indent: null
,italic: null
,kerning: null
,leading: null
,leftMargin: null
,letterSpacing: null
,rightMargin: null
,size: null
,tabStops: null
,target: null
,underline: null
,url: null
,clone: function() {
var newFormat = new openfl_text_TextFormat(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.url,this.target);
newFormat.align = this.align;
newFormat.leftMargin = this.leftMargin;
newFormat.rightMargin = this.rightMargin;
newFormat.indent = this.indent;
newFormat.leading = this.leading;
newFormat.blockIndent = this.blockIndent;
newFormat.bullet = this.bullet;
newFormat.kerning = this.kerning;
newFormat.letterSpacing = this.letterSpacing;
newFormat.tabStops = this.tabStops;
return newFormat;
}
,__merge: function(format) {
if(format.font != null) this.font = format.font;
if(format.size != null) this.size = format.size;
if(format.color != null) this.color = format.color;
if(format.bold != null) this.bold = format.bold;
if(format.italic != null) this.italic = format.italic;
if(format.underline != null) this.underline = format.underline;
if(format.url != null) this.url = format.url;
if(format.target != null) this.target = format.target;
if(format.align != null) this.align = format.align;
if(format.leftMargin != null) this.leftMargin = format.leftMargin;
if(format.rightMargin != null) this.rightMargin = format.rightMargin;
if(format.indent != null) this.indent = format.indent;
if(format.leading != null) this.leading = format.leading;
if(format.blockIndent != null) this.blockIndent = format.blockIndent;
if(format.bullet != null) this.bullet = format.bullet;
if(format.kerning != null) this.kerning = format.kerning;
if(format.letterSpacing != null) this.letterSpacing = format.letterSpacing;
if(format.tabStops != null) this.tabStops = format.tabStops;
}
,__class__: openfl_text_TextFormat
};
var openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$ = {};
$hxClasses["openfl.text._TextFormatAlign.TextFormatAlign_Impl_"] = openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.__name__ = ["openfl","text","_TextFormatAlign","TextFormatAlign_Impl_"];
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.fromString = function(value) {
switch(value) {
case "center":
return 0;
case "end":
return 1;
case "justify":
return 2;
case "left":
return 3;
case "right":
return 4;
case "start":
return 5;
default:
return null;
}
};
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "center";
case 1:
return "end";
case 2:
return "justify";
case 3:
return "left";
case 4:
return "right";
case 5:
return "start";
default:
return null;
}
};
var openfl_text_TextLineMetrics = function(x,width,height,ascent,descent,leading) {
this.x = x;
this.width = width;
this.height = height;
this.ascent = ascent;
this.descent = descent;
this.leading = leading;
};
$hxClasses["openfl.text.TextLineMetrics"] = openfl_text_TextLineMetrics;
openfl_text_TextLineMetrics.__name__ = ["openfl","text","TextLineMetrics"];
openfl_text_TextLineMetrics.prototype = {
ascent: null
,descent: null
,height: null
,leading: null
,width: null
,x: null
,__class__: openfl_text_TextLineMetrics
};
var openfl_ui_GameInput = function() {
openfl_events_EventDispatcher.call(this);
openfl_ui_GameInput.__instances.push(this);
};
$hxClasses["openfl.ui.GameInput"] = openfl_ui_GameInput;
openfl_ui_GameInput.__name__ = ["openfl","ui","GameInput"];
openfl_ui_GameInput.getDeviceAt = function(index) {
if(index >= 0 && index < openfl_ui_GameInput.__deviceList.length) return openfl_ui_GameInput.__deviceList[index];
return null;
};
openfl_ui_GameInput.__getDevice = function(gamepad) {
if(gamepad == null) return null;
if(!(openfl_ui_GameInput.__devices.h.__keys__[gamepad.__id__] != null)) {
var device = new openfl_ui_GameInputDevice(gamepad.get_guid(),gamepad.get_name());
openfl_ui_GameInput.__deviceList.push(device);
openfl_ui_GameInput.__devices.set(gamepad,device);
openfl_ui_GameInput.numDevices = openfl_ui_GameInput.__deviceList.length;
}
return openfl_ui_GameInput.__devices.h[gamepad.__id__];
};
openfl_ui_GameInput.__onGamepadAxisMove = function(gamepad,axis,value) {
var device = openfl_ui_GameInput.__getDevice(gamepad);
if(device == null) return;
if(device.enabled) {
if(!device.__axis.h.hasOwnProperty(axis)) {
var control1 = new openfl_ui_GameInputControl(device,"AXIS_" + (function($this) {
var $r;
switch(axis) {
case 0:
$r = "LEFT_X";
break;
case 1:
$r = "LEFT_Y";
break;
case 2:
$r = "RIGHT_X";
break;
case 3:
$r = "RIGHT_Y";
break;
case 4:
$r = "TRIGGER_LEFT";
break;
case 5:
$r = "TRIGGER_RIGHT";
break;
default:
$r = "UNKNOWN (" + axis + ")";
}
return $r;
}(this)),-1,1);
device.__axis.h[axis] = control1;
device.__controls.push(control1);
}
var control = device.__axis.h[axis];
control.value = value;
control.dispatchEvent(new openfl_events_Event("change"));
}
};
openfl_ui_GameInput.__onGamepadButtonDown = function(gamepad,button) {
var device = openfl_ui_GameInput.__getDevice(gamepad);
if(device == null) return;
if(device.enabled) {
if(!device.__button.h.hasOwnProperty(button)) {
var control1 = new openfl_ui_GameInputControl(device,"BUTTON_" + (function($this) {
var $r;
switch(button) {
case 0:
$r = "A";
break;
case 1:
$r = "B";
break;
case 2:
$r = "X";
break;
case 3:
$r = "Y";
break;
case 4:
$r = "BACK";
break;
case 5:
$r = "GUIDE";
break;
case 6:
$r = "START";
break;
case 7:
$r = "LEFT_STICK";
break;
case 8:
$r = "RIGHT_STICK";
break;
case 9:
$r = "LEFT_SHOULDER";
break;
case 10:
$r = "RIGHT_SHOULDER";
break;
case 11:
$r = "DPAD_UP";
break;
case 12:
$r = "DPAD_DOWN";
break;
case 13:
$r = "DPAD_LEFT";
break;
case 14:
$r = "DPAD_RIGHT";
break;
default:
$r = "UNKNOWN (" + button + ")";
}
return $r;
}(this)),0,1);
device.__button.h[button] = control1;
device.__controls.push(control1);
}
var control = device.__button.h[button];
control.value = 1;
control.dispatchEvent(new openfl_events_Event("change"));
}
};
openfl_ui_GameInput.__onGamepadButtonUp = function(gamepad,button) {
var device = openfl_ui_GameInput.__getDevice(gamepad);
if(device == null) return;
if(device.enabled) {
if(!device.__button.h.hasOwnProperty(button)) {
var control1 = new openfl_ui_GameInputControl(device,"BUTTON_" + (function($this) {
var $r;
switch(button) {
case 0:
$r = "A";
break;
case 1:
$r = "B";
break;
case 2:
$r = "X";
break;
case 3:
$r = "Y";
break;
case 4:
$r = "BACK";
break;
case 5:
$r = "GUIDE";
break;
case 6:
$r = "START";
break;
case 7:
$r = "LEFT_STICK";
break;
case 8:
$r = "RIGHT_STICK";
break;
case 9:
$r = "LEFT_SHOULDER";
break;
case 10:
$r = "RIGHT_SHOULDER";
break;
case 11:
$r = "DPAD_UP";
break;
case 12:
$r = "DPAD_DOWN";
break;
case 13:
$r = "DPAD_LEFT";
break;
case 14:
$r = "DPAD_RIGHT";
break;
default:
$r = "UNKNOWN (" + button + ")";
}
return $r;
}(this)),0,1);
device.__button.h[button] = control1;
device.__controls.push(control1);
}
var control = device.__button.h[button];
control.value = 0;
control.dispatchEvent(new openfl_events_Event("change"));
}
};
openfl_ui_GameInput.__onGamepadConnect = function(gamepad) {
var device = openfl_ui_GameInput.__getDevice(gamepad);
if(device == null) return;
var _g = 0;
var _g1 = openfl_ui_GameInput.__instances;
while(_g < _g1.length) {
var instance = _g1[_g];
++_g;
instance.dispatchEvent(new openfl_events_GameInputEvent("deviceAdded",null,null,device));
}
};
openfl_ui_GameInput.__onGamepadDisconnect = function(gamepad) {
var device = openfl_ui_GameInput.__devices.h[gamepad.__id__];
if(device != null) {
if(openfl_ui_GameInput.__devices.h.__keys__[gamepad.__id__] != null) {
var x = openfl_ui_GameInput.__devices.h[gamepad.__id__];
HxOverrides.remove(openfl_ui_GameInput.__deviceList,x);
openfl_ui_GameInput.__devices.remove(gamepad);
}
openfl_ui_GameInput.numDevices = openfl_ui_GameInput.__deviceList.length;
var _g = 0;
var _g1 = openfl_ui_GameInput.__instances;
while(_g < _g1.length) {
var instance = _g1[_g];
++_g;
instance.dispatchEvent(new openfl_events_GameInputEvent("deviceRemoved",null,null,device));
}
}
};
openfl_ui_GameInput.__super__ = openfl_events_EventDispatcher;
openfl_ui_GameInput.prototype = $extend(openfl_events_EventDispatcher.prototype,{
__class__: openfl_ui_GameInput
});
var openfl_ui_GameInputControl = function(device,id,minValue,maxValue,value) {
if(value == null) value = 0;
openfl_events_EventDispatcher.call(this);
this.device = device;
this.id = id;
this.minValue = minValue;
this.maxValue = maxValue;
this.value = value;
};
$hxClasses["openfl.ui.GameInputControl"] = openfl_ui_GameInputControl;
openfl_ui_GameInputControl.__name__ = ["openfl","ui","GameInputControl"];
openfl_ui_GameInputControl.__super__ = openfl_events_EventDispatcher;
openfl_ui_GameInputControl.prototype = $extend(openfl_events_EventDispatcher.prototype,{
device: null
,id: null
,maxValue: null
,minValue: null
,value: null
,__class__: openfl_ui_GameInputControl
});
var openfl_ui_GameInputDevice = function(id,name) {
this.__controls = [];
this.__button = new haxe_ds_IntMap();
this.__axis = new haxe_ds_IntMap();
this.id = id;
this.name = name;
var control;
var _g = 0;
while(_g < 6) {
var i = _g++;
control = new openfl_ui_GameInputControl(this,"AXIS_" + i,-1,1);
this.__axis.h[i] = control;
this.__controls.push(control);
}
var _g1 = 0;
while(_g1 < 15) {
var i1 = _g1++;
control = new openfl_ui_GameInputControl(this,"BUTTON_" + i1,0,1);
this.__button.h[i1] = control;
this.__controls.push(control);
}
};
$hxClasses["openfl.ui.GameInputDevice"] = openfl_ui_GameInputDevice;
openfl_ui_GameInputDevice.__name__ = ["openfl","ui","GameInputDevice"];
openfl_ui_GameInputDevice.prototype = {
enabled: null
,id: null
,name: null
,sampleInterval: null
,__axis: null
,__button: null
,__controls: null
,__gamepad: null
,getCachedSamples: function(data,append) {
if(append == null) append = false;
return 0;
}
,getControlAt: function(i) {
if(i >= 0 && i < this.__controls.length) return this.__controls[i];
return null;
}
,startCachingSamples: function(numSamples,controls) {
}
,stopCachingSamples: function() {
}
,get_numControls: function() {
return this.__controls.length;
}
,__class__: openfl_ui_GameInputDevice
,__properties__: {get_numControls:"get_numControls"}
};
var openfl_ui_Keyboard = function() { };
$hxClasses["openfl.ui.Keyboard"] = openfl_ui_Keyboard;
openfl_ui_Keyboard.__name__ = ["openfl","ui","Keyboard"];
openfl_ui_Keyboard.isAccessible = function() {
return false;
};
openfl_ui_Keyboard.__convertKeyCode = function(key) {
switch(key) {
case 8:
return 8;
case 9:
return 9;
case 13:
return 13;
case 27:
return 27;
case 32:
return 32;
case 33:
return 49;
case 34:
return 222;
case 35:
return 51;
case 36:
return 52;
case 37:
return 53;
case 38:
return 55;
case 39:
return 222;
case 40:
return 57;
case 41:
return 48;
case 42:
return 56;
case 44:
return 188;
case 45:
return 189;
case 46:
return 190;
case 47:
return 191;
case 48:
return 48;
case 49:
return 49;
case 50:
return 50;
case 51:
return 51;
case 52:
return 52;
case 53:
return 53;
case 54:
return 54;
case 55:
return 55;
case 56:
return 56;
case 57:
return 57;
case 58:
return 186;
case 59:
return 186;
case 60:
return 60;
case 61:
return 187;
case 62:
return 190;
case 63:
return 191;
case 64:
return 50;
case 91:
return 219;
case 92:
return 220;
case 93:
return 221;
case 94:
return 54;
case 95:
return 189;
case 96:
return 192;
case 97:
return 65;
case 98:
return 66;
case 99:
return 67;
case 100:
return 68;
case 101:
return 69;
case 102:
return 70;
case 103:
return 71;
case 104:
return 72;
case 105:
return 73;
case 106:
return 74;
case 107:
return 75;
case 108:
return 76;
case 109:
return 77;
case 110:
return 78;
case 111:
return 79;
case 112:
return 80;
case 113:
return 81;
case 114:
return 82;
case 115:
return 83;
case 116:
return 84;
case 117:
return 85;
case 118:
return 86;
case 119:
return 87;
case 120:
return 88;
case 121:
return 89;
case 122:
return 90;
case 127:
return 46;
case 1073741881:
return 20;
case 1073741882:
return 112;
case 1073741883:
return 113;
case 1073741884:
return 114;
case 1073741885:
return 115;
case 1073741886:
return 116;
case 1073741887:
return 117;
case 1073741888:
return 118;
case 1073741889:
return 119;
case 1073741890:
return 120;
case 1073741891:
return 121;
case 1073741892:
return 122;
case 1073741893:
return 123;
case 1073741894:
return 301;
case 1073741895:
return 145;
case 1073741896:
return 19;
case 1073741897:
return 45;
case 1073741898:
return 36;
case 1073741899:
return 33;
case 1073741901:
return 35;
case 1073741902:
return 34;
case 1073741903:
return 39;
case 1073741904:
return 37;
case 1073741905:
return 40;
case 1073741906:
return 38;
case 1073741907:
return 144;
case 1073741908:
return 111;
case 1073741909:
return 106;
case 1073741910:
return 109;
case 1073741911:
return 107;
case 1073741912:
return 108;
case 1073741913:
return 97;
case 1073741914:
return 98;
case 1073741915:
return 99;
case 1073741916:
return 100;
case 1073741917:
return 101;
case 1073741918:
return 102;
case 1073741919:
return 103;
case 1073741920:
return 104;
case 1073741921:
return 105;
case 1073741922:
return 96;
case 1073741923:
return 110;
case 1073741925:
return 302;
case 1073741928:
return 124;
case 1073741929:
return 125;
case 1073741930:
return 126;
case 1073741982:
return 13;
case 1073742044:
return 110;
case 1073742048:
return 17;
case 1073742049:
return 16;
case 1073742050:
return 18;
case 1073742051:
return 15;
case 1073742052:
return 17;
case 1073742053:
return 16;
case 1073742054:
return 18;
case 1073742055:
return 15;
default:
return key;
}
};
openfl_ui_Keyboard.__getCharCode = function(key,shift) {
if(shift == null) shift = false;
if(!shift) {
switch(key) {
case 8:
return 8;
case 9:
return 9;
case 13:
return 13;
case 27:
return 27;
case 32:
return 32;
case 186:
return 59;
case 187:
return 61;
case 188:
return 44;
case 189:
return 45;
case 190:
return 46;
case 191:
return 47;
case 192:
return 96;
case 219:
return 91;
case 220:
return 92;
case 221:
return 93;
case 222:
return 39;
}
if(key >= 48 && key <= 57) return key - 48 + 48;
if(key >= 65 && key <= 90) return key - 65 + 97;
} else {
switch(key) {
case 48:
return 41;
case 49:
return 33;
case 50:
return 64;
case 51:
return 35;
case 52:
return 36;
case 53:
return 37;
case 54:
return 94;
case 55:
return 38;
case 56:
return 42;
case 57:
return 40;
case 186:
return 58;
case 187:
return 43;
case 188:
return 60;
case 189:
return 95;
case 190:
return 62;
case 191:
return 63;
case 192:
return 126;
case 219:
return 123;
case 220:
return 124;
case 221:
return 125;
case 222:
return 34;
}
if(key >= 65 && key <= 90) return key - 65 + 65;
}
if(key >= 96 && key <= 105) return key - 96 + 48;
switch(key) {
case 106:
return 42;
case 107:
return 43;
case 108:
return 44;
case 110:
return 45;
case 111:
return 46;
case 46:
return 127;
case 13:
return 13;
case 8:
return 8;
}
return 0;
};
openfl_ui_Keyboard.__getKeyLocation = function(key) {
switch(key) {
case 1073742048:case 1073742049:case 1073742050:case 1073742051:
return 1;
case 1073742052:case 1073742053:case 1073742054:case 1073742055:
return 2;
case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:
return 3;
default:
return 0;
}
};
var openfl_ui_Mouse = function() { };
$hxClasses["openfl.ui.Mouse"] = openfl_ui_Mouse;
openfl_ui_Mouse.__name__ = ["openfl","ui","Mouse"];
openfl_ui_Mouse.__properties__ = {set_cursor:"set_cursor",get_cursor:"get_cursor"}
openfl_ui_Mouse.hide = function() {
lime_ui_Mouse.hide();
};
openfl_ui_Mouse.show = function() {
lime_ui_Mouse.show();
};
openfl_ui_Mouse.get_cursor = function() {
return openfl_ui_Mouse.__cursor;
};
openfl_ui_Mouse.set_cursor = function(value) {
switch(value) {
case "arrow":
lime_ui_Mouse.set_cursor(lime_ui_MouseCursor.ARROW);
break;
case "button":
lime_ui_Mouse.set_cursor(lime_ui_MouseCursor.POINTER);
break;
case "hand":
lime_ui_Mouse.set_cursor(lime_ui_MouseCursor.MOVE);
break;
case "ibeam":
lime_ui_Mouse.set_cursor(lime_ui_MouseCursor.TEXT);
break;
default:
}
return openfl_ui_Mouse.__cursor = value;
};
var openfl_utils_IAssetCache = function() { };
$hxClasses["openfl.utils.IAssetCache"] = openfl_utils_IAssetCache;
openfl_utils_IAssetCache.__name__ = ["openfl","utils","IAssetCache"];
openfl_utils_IAssetCache.prototype = {
get_enabled: null
,set_enabled: null
,clear: null
,getBitmapData: null
,getFont: null
,getSound: null
,hasBitmapData: null
,hasFont: null
,hasSound: null
,removeBitmapData: null
,removeFont: null
,removeSound: null
,setBitmapData: null
,setFont: null
,setSound: null
,__class__: openfl_utils_IAssetCache
,__properties__: {set_enabled:"set_enabled",get_enabled:"get_enabled"}
};
var openfl_utils_AssetCache = function() {
this.__enabled = true;
this.bitmapData = new haxe_ds_StringMap();
this.font = new haxe_ds_StringMap();
this.sound = new haxe_ds_StringMap();
};
$hxClasses["openfl.utils.AssetCache"] = openfl_utils_AssetCache;
openfl_utils_AssetCache.__name__ = ["openfl","utils","AssetCache"];
openfl_utils_AssetCache.__interfaces__ = [openfl_utils_IAssetCache];
openfl_utils_AssetCache.prototype = {
bitmapData: null
,font: null
,sound: null
,__enabled: null
,clear: function(prefix) {
if(prefix == null) {
this.bitmapData = new haxe_ds_StringMap();
this.font = new haxe_ds_StringMap();
this.sound = new haxe_ds_StringMap();
} else {
var keys = this.bitmapData.keys();
while( keys.hasNext() ) {
var key = keys.next();
if(StringTools.startsWith(key,prefix)) this.removeBitmapData(key);
}
var keys1 = this.font.keys();
while( keys1.hasNext() ) {
var key1 = keys1.next();
if(StringTools.startsWith(key1,prefix)) this.removeFont(key1);
}
var keys2 = this.sound.keys();
while( keys2.hasNext() ) {
var key2 = keys2.next();
if(StringTools.startsWith(key2,prefix)) this.removeSound(key2);
}
}
}
,getBitmapData: function(id) {
return this.bitmapData.get(id);
}
,getFont: function(id) {
return this.font.get(id);
}
,getSound: function(id) {
return this.sound.get(id);
}
,hasBitmapData: function(id) {
return this.bitmapData.exists(id);
}
,hasFont: function(id) {
return this.font.exists(id);
}
,hasSound: function(id) {
return this.sound.exists(id);
}
,removeBitmapData: function(id) {
lime_utils_Assets.cache.image.remove(id);
return this.bitmapData.remove(id);
}
,removeFont: function(id) {
lime_utils_Assets.cache.font.remove(id);
return this.font.remove(id);
}
,removeSound: function(id) {
lime_utils_Assets.cache.audio.remove(id);
return this.sound.remove(id);
}
,setBitmapData: function(id,bitmapData) {
this.bitmapData.set(id,bitmapData);
}
,setFont: function(id,font) {
this.font.set(id,font);
}
,setSound: function(id,sound) {
this.sound.set(id,sound);
}
,get_enabled: function() {
return this.__enabled;
}
,set_enabled: function(value) {
return this.__enabled = value;
}
,__class__: openfl_utils_AssetCache
,__properties__: {set_enabled:"set_enabled",get_enabled:"get_enabled"}
};
var openfl_utils_Assets = function() { };
$hxClasses["openfl.utils.Assets"] = openfl_utils_Assets;
openfl_utils_Assets.__name__ = ["openfl","utils","Assets"];
openfl_utils_Assets.addEventListener = function(type,listener,useCapture,priority,useWeakReference) {
if(useWeakReference == null) useWeakReference = false;
if(priority == null) priority = 0;
if(useCapture == null) useCapture = false;
if(!lime_utils_Assets.onChange.has(openfl_utils_Assets.LimeAssets_onChange)) lime_utils_Assets.onChange.add(openfl_utils_Assets.LimeAssets_onChange);
openfl_utils_Assets.dispatcher.addEventListener(type,listener,useCapture,priority,useWeakReference);
};
openfl_utils_Assets.dispatchEvent = function(event) {
return openfl_utils_Assets.dispatcher.dispatchEvent(event);
};
openfl_utils_Assets.exists = function(id,type) {
return lime_utils_Assets.exists(id,type);
};
openfl_utils_Assets.getBitmapData = function(id,useCache) {
if(useCache == null) useCache = true;
if(useCache && openfl_utils_Assets.cache.get_enabled() && openfl_utils_Assets.cache.hasBitmapData(id)) {
var bitmapData = openfl_utils_Assets.cache.getBitmapData(id);
if(openfl_utils_Assets.isValidBitmapData(bitmapData)) return bitmapData;
}
var image = lime_utils_Assets.getImage(id,false);
if(image != null) {
var bitmapData1 = openfl_display_BitmapData.fromImage(image);
if(useCache && openfl_utils_Assets.cache.get_enabled()) openfl_utils_Assets.cache.setBitmapData(id,bitmapData1);
return bitmapData1;
}
return null;
};
openfl_utils_Assets.getBytes = function(id) {
return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(lime_utils_Assets.getBytes(id));
};
openfl_utils_Assets.getFont = function(id,useCache) {
if(useCache == null) useCache = true;
if(useCache && openfl_utils_Assets.cache.get_enabled() && openfl_utils_Assets.cache.hasFont(id)) return openfl_utils_Assets.cache.getFont(id);
var limeFont = lime_utils_Assets.getFont(id,false);
if(limeFont != null) {
var font = openfl_text_Font.__fromLimeFont(limeFont);
if(useCache && openfl_utils_Assets.cache.get_enabled()) openfl_utils_Assets.cache.setFont(id,font);
return font;
}
return new openfl_text_Font();
};
openfl_utils_Assets.getLibrary = function(name) {
return lime_utils_Assets.getLibrary(name);
};
openfl_utils_Assets.getMovieClip = function(id) {
var libraryName = id.substring(0,id.indexOf(":"));
var symbolName;
var pos = id.indexOf(":") + 1;
symbolName = HxOverrides.substr(id,pos,null);
var limeLibrary = openfl_utils_Assets.getLibrary(libraryName);
if(limeLibrary != null) {
if(js_Boot.__instanceof(limeLibrary,openfl_utils_AssetLibrary)) {
var library = limeLibrary;
if(library.exists(symbolName,"MOVIE_CLIP")) {
if(library.isLocal(symbolName,"MOVIE_CLIP")) return library.getMovieClip(symbolName); else {
lime_utils_Log.error("MovieClip asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 224, className : "openfl.utils.Assets", methodName : "getMovieClip"});
return null;
}
}
}
lime_utils_Log.error("There is no MovieClip asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 233, className : "openfl.utils.Assets", methodName : "getMovieClip"});
} else lime_utils_Log.error("There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 237, className : "openfl.utils.Assets", methodName : "getMovieClip"});
return null;
};
openfl_utils_Assets.getMusic = function(id,useCache) {
if(useCache == null) useCache = true;
return openfl_utils_Assets.getSound(id,useCache);
};
openfl_utils_Assets.getPath = function(id) {
return lime_utils_Assets.getPath(id);
};
openfl_utils_Assets.getSound = function(id,useCache) {
if(useCache == null) useCache = true;
if(useCache && openfl_utils_Assets.cache.get_enabled() && openfl_utils_Assets.cache.hasSound(id)) {
var sound = openfl_utils_Assets.cache.getSound(id);
if(openfl_utils_Assets.isValidSound(sound)) return sound;
}
var buffer = lime_utils_Assets.getAudioBuffer(id,false);
if(buffer != null) {
var sound1 = openfl_media_Sound.fromAudioBuffer(buffer);
if(useCache && openfl_utils_Assets.cache.get_enabled()) openfl_utils_Assets.cache.setSound(id,sound1);
return sound1;
}
return null;
};
openfl_utils_Assets.getText = function(id) {
return lime_utils_Assets.getText(id);
};
openfl_utils_Assets.hasEventListener = function(type) {
return openfl_utils_Assets.dispatcher.hasEventListener(type);
};
openfl_utils_Assets.isLocal = function(id,type,useCache) {
if(useCache == null) useCache = true;
if(useCache && openfl_utils_Assets.cache.get_enabled()) {
if(type == "IMAGE" || type == null) {
if(openfl_utils_Assets.cache.hasBitmapData(id)) return true;
}
if(type == "FONT" || type == null) {
if(openfl_utils_Assets.cache.hasFont(id)) return true;
}
if(type == "SOUND" || type == "MUSIC" || type == null) {
if(openfl_utils_Assets.cache.hasSound(id)) return true;
}
}
var libraryName = id.substring(0,id.indexOf(":"));
var symbolName;
var pos = id.indexOf(":") + 1;
symbolName = HxOverrides.substr(id,pos,null);
var library = openfl_utils_Assets.getLibrary(libraryName);
if(library != null) return library.isLocal(symbolName,type);
return false;
};
openfl_utils_Assets.isValidBitmapData = function(bitmapData) {
return bitmapData != null && bitmapData.image != null;
};
openfl_utils_Assets.isValidSound = function(sound) {
return true;
};
openfl_utils_Assets.list = function(type) {
return lime_utils_Assets.list(type);
};
openfl_utils_Assets.loadBitmapData = function(id,useCache,handler) {
if(useCache == null) useCache = true;
if(useCache == null) useCache = true;
var promise = new lime_app_Promise();
if(handler != null) {
promise.future.onComplete(handler);
promise.future.onError(function(_) {
handler(null);
});
}
if(useCache && openfl_utils_Assets.cache.get_enabled() && openfl_utils_Assets.cache.hasBitmapData(id)) {
var bitmapData = openfl_utils_Assets.cache.getBitmapData(id);
if(openfl_utils_Assets.isValidBitmapData(bitmapData)) {
promise.complete(bitmapData);
return promise.future;
}
}
lime_utils_Assets.loadImage(id,false).onComplete(function(image) {
if(image != null) {
var bitmapData1 = openfl_display_BitmapData.fromImage(image);
if(useCache && openfl_utils_Assets.cache.get_enabled()) openfl_utils_Assets.cache.setBitmapData(id,bitmapData1);
promise.complete(bitmapData1);
} else promise.error("[Assets] Could not load Image \"" + id + "\"");
}).onError($bind(promise,promise.error)).onProgress($bind(promise,promise.progress));
return promise.future;
};
openfl_utils_Assets.loadBytes = function(id,handler) {
var promise = new lime_app_Promise();
var future = lime_utils_Assets.loadBytes(id);
if(handler != null) {
promise.future.onComplete(handler);
promise.future.onError(function(_) {
handler(null);
});
}
future.onComplete(function(bytes) {
promise.complete(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes));
});
future.onProgress(function(progress,total) {
promise.progress(progress,total);
});
future.onError(function(msg) {
promise.error(msg);
});
return promise.future;
};
openfl_utils_Assets.loadFont = function(id,useCache,handler) {
if(useCache == null) useCache = true;
if(useCache == null) useCache = true;
var promise = new lime_app_Promise();
if(handler != null) {
promise.future.onComplete(handler);
promise.future.onError(function(_) {
handler(null);
});
}
if(useCache && openfl_utils_Assets.cache.get_enabled() && openfl_utils_Assets.cache.hasFont(id)) {
promise.complete(openfl_utils_Assets.cache.getFont(id));
return promise.future;
}
lime_utils_Assets.loadFont(id).onComplete(function(limeFont) {
var font = openfl_text_Font.__fromLimeFont(limeFont);
if(useCache && openfl_utils_Assets.cache.get_enabled()) openfl_utils_Assets.cache.setFont(id,font);
promise.complete(font);
}).onError($bind(promise,promise.error)).onProgress($bind(promise,promise.progress));
return promise.future;
};
openfl_utils_Assets.loadLibrary = function(name,handler) {
var future = lime_utils_Assets.loadLibrary(name);
if(handler != null) {
future.onComplete(handler);
future.onError(function(_) {
handler(null);
});
}
return future;
};
openfl_utils_Assets.loadMusic = function(id,useCache,handler) {
if(useCache == null) useCache = true;
if(useCache == null) useCache = true;
return new lime_app_Future(function() {
return openfl_utils_Assets.getMusic(id,useCache);
});
};
openfl_utils_Assets.loadMovieClip = function(id,handler) {
var promise = new lime_app_Promise();
if(handler != null) {
promise.future.onComplete(handler);
promise.future.onError(function(_) {
handler(null);
});
}
var libraryName = id.substring(0,id.indexOf(":"));
var symbolName;
var pos = id.indexOf(":") + 1;
symbolName = HxOverrides.substr(id,pos,null);
var limeLibrary = openfl_utils_Assets.getLibrary(libraryName);
if(limeLibrary != null) {
if(js_Boot.__instanceof(limeLibrary,openfl_utils_AssetLibrary)) {
var library = limeLibrary;
if(library.exists(symbolName,"MOVIE_CLIP")) {
promise.completeWith(library.loadMovieClip(symbolName));
return promise.future;
}
}
promise.error("[Assets] There is no MovieClip asset with an ID of \"" + id + "\"");
} else promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
return promise.future;
};
openfl_utils_Assets.loadSound = function(id,useCache,handler) {
if(useCache == null) useCache = true;
if(useCache == null) useCache = true;
var promise = new lime_app_Promise();
lime_utils_Assets.loadAudioBuffer(id,useCache).onComplete(function(buffer) {
if(buffer != null) {
var sound = openfl_media_Sound.fromAudioBuffer(buffer);
if(useCache && openfl_utils_Assets.cache.get_enabled()) openfl_utils_Assets.cache.setSound(id,sound);
promise.complete(sound);
} else promise.error("[Assets] Could not load Sound \"" + id + "\"");
}).onError($bind(promise,promise.error)).onProgress($bind(promise,promise.progress));
return promise.future;
};
openfl_utils_Assets.loadText = function(id,handler) {
var future = lime_utils_Assets.loadText(id);
if(handler != null) {
future.onComplete(handler);
future.onError(function(_) {
handler(null);
});
}
return future;
};
openfl_utils_Assets.registerLibrary = function(name,library) {
lime_utils_Assets.registerLibrary(name,library);
};
openfl_utils_Assets.removeEventListener = function(type,listener,capture) {
if(capture == null) capture = false;
openfl_utils_Assets.dispatcher.removeEventListener(type,listener,capture);
};
openfl_utils_Assets.resolveClass = function(name) {
return Type.resolveClass(name);
};
openfl_utils_Assets.resolveEnum = function(name) {
var value = Type.resolveEnum(name);
return value;
};
openfl_utils_Assets.unloadLibrary = function(name) {
lime_utils_Assets.unloadLibrary(name);
};
openfl_utils_Assets.LimeAssets_onChange = function() {
openfl_utils_Assets.dispatchEvent(new openfl_events_Event("change"));
};
var openfl_utils__$ByteArray_ByteArray_$Impl_$ = {};
$hxClasses["openfl.utils._ByteArray.ByteArray_Impl_"] = openfl_utils__$ByteArray_ByteArray_$Impl_$;
openfl_utils__$ByteArray_ByteArray_$Impl_$.__name__ = ["openfl","utils","_ByteArray","ByteArray_Impl_"];
openfl_utils__$ByteArray_ByteArray_$Impl_$.__properties__ = {set_length:"set_length",get_length:"get_length"}
openfl_utils__$ByteArray_ByteArray_$Impl_$._new = function(length) {
if(length == null) length = 0;
return new openfl_utils_ByteArrayData(length);
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.get = function(this1,index) {
return this1.b[index];
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.set = function(this1,index,value) {
this1.__resize(index + 1);
this1.b[index] = value & 255;
return value;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromArrayBuffer = function(buffer) {
if(buffer == null) return null;
return openfl_utils_ByteArrayData.fromBytes(haxe_io_Bytes.ofData(buffer));
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes = function(bytes) {
if(bytes == null) return null;
if(js_Boot.__instanceof(bytes,openfl_utils_ByteArrayData)) return bytes; else return openfl_utils_ByteArrayData.fromBytes(bytes);
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytesData = function(bytesData) {
if(bytesData == null) return null;
return openfl_utils_ByteArrayData.fromBytes(haxe_io_Bytes.ofData(bytesData));
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromFile = function(path) {
return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(lime_utils__$Bytes_Bytes_$Impl_$.fromFile(path));
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromLimeBytes = function(bytes) {
return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes);
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer = function(byteArray) {
return byteArray.b.bufferValue;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes = function(byteArray) {
return byteArray;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytesData = function(byteArray) {
return byteArray.b.bufferValue;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toLimeBytes = function(byteArray) {
return openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(byteArray)));
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length = function(this1) {
return this1.length;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.set_length = function(this1,value) {
if(value > 0) this1.__resize(value);
this1.length = value;
return value;
};
var openfl_utils_IDataOutput = function() { };
$hxClasses["openfl.utils.IDataOutput"] = openfl_utils_IDataOutput;
openfl_utils_IDataOutput.__name__ = ["openfl","utils","IDataOutput"];
openfl_utils_IDataOutput.prototype = {
get_endian: null
,set_endian: null
,objectEncoding: null
,writeBoolean: null
,writeByte: null
,writeBytes: null
,writeDouble: null
,writeFloat: null
,writeInt: null
,writeMultiByte: null
,writeShort: null
,writeUTF: null
,writeUTFBytes: null
,writeUnsignedInt: null
,__class__: openfl_utils_IDataOutput
,__properties__: {set_endian:"set_endian",get_endian:"get_endian"}
};
var openfl_utils_IDataInput = function() { };
$hxClasses["openfl.utils.IDataInput"] = openfl_utils_IDataInput;
openfl_utils_IDataInput.__name__ = ["openfl","utils","IDataInput"];
openfl_utils_IDataInput.prototype = {
get_bytesAvailable: null
,get_endian: null
,set_endian: null
,objectEncoding: null
,readBoolean: null
,readByte: null
,readBytes: null
,readDouble: null
,readFloat: null
,readInt: null
,readMultiByte: null
,readShort: null
,readUnsignedByte: null
,readUnsignedInt: null
,readUnsignedShort: null
,readUTF: null
,readUTFBytes: null
,__class__: openfl_utils_IDataInput
,__properties__: {set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}
};
var openfl_utils_ByteArrayData = function(length) {
if(length == null) length = 0;
var bytes = new haxe_io_Bytes(new ArrayBuffer(length));
haxe_io_Bytes.call(this,bytes.b.buffer);
this.__length = length;
this.__endian = 0;
this.position = 0;
};
$hxClasses["openfl.utils.ByteArrayData"] = openfl_utils_ByteArrayData;
openfl_utils_ByteArrayData.__name__ = ["openfl","utils","ByteArrayData"];
openfl_utils_ByteArrayData.__interfaces__ = [openfl_utils_IDataOutput,openfl_utils_IDataInput];
openfl_utils_ByteArrayData.fromBytes = function(bytes) {
var result = new openfl_utils_ByteArrayData();
result.__fromBytes(bytes);
return result;
};
openfl_utils_ByteArrayData.__super__ = haxe_io_Bytes;
openfl_utils_ByteArrayData.prototype = $extend(haxe_io_Bytes.prototype,{
objectEncoding: null
,position: null
,__endian: null
,__length: null
,clear: function() {
this.length = 0;
this.position = 0;
}
,compress: function(algorithm) {
if(algorithm == null) algorithm = 2;
if(this.__length > this.length) {
var cacheLength = this.length;
this.length = this.__length;
var data = new haxe_io_Bytes(new ArrayBuffer(cacheLength));
data.blit(0,this,0,cacheLength);
this.b = data.b;
this.__length = data.length;
this.data = data.data;
this.length = cacheLength;
}
var bytes;
switch(algorithm) {
case 0:
bytes = lime_utils_compress_Deflate.compress(this);
break;
case 1:
bytes = lime_utils_compress_LZMA.compress(this);
break;
default:
bytes = lime_utils_compress_Zlib.compress(this);
}
if(bytes != null) {
this.b = bytes.b;
this.__length = bytes.length;
this.data = bytes.data;
this.length = this.__length;
this.position = this.length;
}
}
,deflate: function() {
this.compress(0);
}
,inflate: function() {
this.uncompress(0);
}
,readBoolean: function() {
if(this.position < this.length) return this.get(this.position++) != 0; else {
throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
return false;
}
}
,readByte: function() {
var value = this.readUnsignedByte();
if((value & 128) != 0) return value - 256; else return value;
}
,readBytes: function(bytes,offset,length) {
if(length == null) length = 0;
if(offset == null) offset = 0;
if(length == 0) length = this.length - this.position;
if(this.position + length > this.length) throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
if(bytes.length < offset + length) bytes.__resize(offset + length);
bytes.blit(offset,this,this.position,length);
this.position += length;
}
,readDouble: function() {
var ch1 = this.readInt();
var ch2 = this.readInt();
if(this.__endian == 1) return haxe_io_FPHelper.i64ToDouble(ch1,ch2); else return haxe_io_FPHelper.i64ToDouble(ch2,ch1);
}
,readFloat: function() {
return haxe_io_FPHelper.i32ToFloat(this.readInt());
}
,readInt: function() {
var ch1 = this.readUnsignedByte();
var ch2 = this.readUnsignedByte();
var ch3 = this.readUnsignedByte();
var ch4 = this.readUnsignedByte();
if(this.__endian == 1) return ch4 << 24 | ch3 << 16 | ch2 << 8 | ch1; else return ch1 << 24 | ch2 << 16 | ch3 << 8 | ch4;
}
,readMultiByte: function(length,charSet) {
return this.readUTFBytes(length);
}
,readShort: function() {
var ch1 = this.readUnsignedByte();
var ch2 = this.readUnsignedByte();
var value;
if(this.__endian == 1) value = ch2 << 8 | ch1; else value = ch1 << 8 | ch2;
if((value & 32768) != 0) return value - 65536; else return value;
}
,readUnsignedByte: function() {
if(this.position < this.length) return this.get(this.position++); else {
throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
return 0;
}
}
,readUnsignedInt: function() {
var ch1 = this.readUnsignedByte();
var ch2 = this.readUnsignedByte();
var ch3 = this.readUnsignedByte();
var ch4 = this.readUnsignedByte();
if(this.__endian == 1) return ch4 << 24 | ch3 << 16 | ch2 << 8 | ch1; else return ch1 << 24 | ch2 << 16 | ch3 << 8 | ch4;
}
,readUnsignedShort: function() {
var ch1 = this.readUnsignedByte();
var ch2 = this.readUnsignedByte();
if(this.__endian == 1) return (ch2 << 8) + ch1; else return ch1 << 8 | ch2;
}
,readUTF: function() {
var bytesCount = this.readUnsignedShort();
return this.readUTFBytes(bytesCount);
}
,readUTFBytes: function(length) {
if(this.position + length > this.length) throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
this.position += length;
return this.getString(this.position - length,length);
}
,uncompress: function(algorithm) {
if(algorithm == null) algorithm = 2;
if(this.__length > this.length) {
var cacheLength = this.length;
this.length = this.__length;
var data = new haxe_io_Bytes(new ArrayBuffer(cacheLength));
data.blit(0,this,0,cacheLength);
this.b = data.b;
this.__length = data.length;
this.data = data.data;
this.length = cacheLength;
}
var bytes;
switch(algorithm) {
case 0:
bytes = lime_utils_compress_Deflate.decompress(this);
break;
case 1:
bytes = lime_utils_compress_LZMA.decompress(this);
break;
default:
bytes = lime_utils_compress_Zlib.decompress(this);
}
if(bytes != null) {
this.b = bytes.b;
this.__length = bytes.length;
this.data = bytes.data;
this.length = this.__length;
this.position = 0;
}
}
,writeBoolean: function(value) {
this.writeByte(value?1:0);
}
,writeByte: function(value) {
this.__resize(this.position + 1);
this.set(this.position++,value & 255);
}
,writeBytes: function(bytes,offset,length) {
if(length == null) length = 0;
if(offset == null) offset = 0;
if(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(bytes) == 0) return;
if(length == 0) {
var a = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(bytes);
length = a - offset;
}
this.__resize(this.position + length);
this.blit(this.position,bytes,offset,length);
this.position = this.position + length;
}
,writeDouble: function(value) {
var int64 = haxe_io_FPHelper.doubleToI64(value);
if(this.__endian == 1) {
this.writeInt(int64.low);
this.writeInt(int64.high);
} else {
this.writeInt(int64.high);
this.writeInt(int64.low);
}
}
,writeFloat: function(value) {
if(this.__endian == 1) {
this.__resize(this.position + 4);
this.setFloat(this.position,value);
this.position += 4;
} else {
var $int = haxe_io_FPHelper.floatToI32(value);
this.writeInt($int);
}
}
,writeInt: function(value) {
this.__resize(this.position + 4);
if(this.__endian == 1) {
this.set(this.position++,value & 255);
this.set(this.position++,value >> 8 & 255);
this.set(this.position++,value >> 16 & 255);
this.set(this.position++,value >> 24 & 255);
} else {
this.set(this.position++,value >> 24 & 255);
this.set(this.position++,value >> 16 & 255);
this.set(this.position++,value >> 8 & 255);
this.set(this.position++,value & 255);
}
}
,writeMultiByte: function(value,charSet) {
this.writeUTFBytes(value);
}
,writeShort: function(value) {
this.__resize(this.position + 2);
if(this.__endian == 1) {
this.set(this.position++,value);
this.set(this.position++,value >> 8);
} else {
this.set(this.position++,value >> 8);
this.set(this.position++,value);
}
}
,writeUnsignedInt: function(value) {
this.writeInt(value);
}
,writeUTF: function(value) {
var bytes = haxe_io_Bytes.ofString(value);
this.writeShort(bytes.length);
this.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes));
}
,writeUTFBytes: function(value) {
var bytes = haxe_io_Bytes.ofString(value);
this.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(haxe_io_Bytes.ofString(value)));
}
,__fromBytes: function(bytes) {
this.b = bytes.b;
this.__length = bytes.length;
this.data = bytes.data;
this.length = bytes.length;
}
,__resize: function(size) {
if(size > this.__length) {
var bytes = new haxe_io_Bytes(new ArrayBuffer((size + 1) * 3 >> 1));
var cacheLength = this.length;
this.length = this.__length;
bytes.blit(0,this,0,this.__length);
this.length = cacheLength;
this.b = bytes.b;
this.__length = bytes.length;
this.data = bytes.data;
}
if(this.length < size) this.length = size;
}
,__setData: function(bytes) {
this.b = bytes.b;
this.__length = bytes.length;
this.data = bytes.data;
}
,get_bytesAvailable: function() {
return this.length - this.position;
}
,get_endian: function() {
return this.__endian;
}
,set_endian: function(value) {
return this.__endian = value;
}
,__class__: openfl_utils_ByteArrayData
,__properties__: {set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}
});
var openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$ = {};
$hxClasses["openfl.utils._CompressionAlgorithm.CompressionAlgorithm_Impl_"] = openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.__name__ = ["openfl","utils","_CompressionAlgorithm","CompressionAlgorithm_Impl_"];
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.fromString = function(value) {
switch(value) {
case "deflate":
return 0;
case "lzma":
return 1;
case "zlib":
return 2;
default:
return null;
}
};
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "deflate";
case 1:
return "lzma";
case 2:
return "zlib";
default:
return null;
}
};
var openfl_utils__$Endian_Endian_$Impl_$ = {};
$hxClasses["openfl.utils._Endian.Endian_Impl_"] = openfl_utils__$Endian_Endian_$Impl_$;
openfl_utils__$Endian_Endian_$Impl_$.__name__ = ["openfl","utils","_Endian","Endian_Impl_"];
openfl_utils__$Endian_Endian_$Impl_$.fromString = function(value) {
switch(value) {
case "bigEndian":
return 0;
case "littleEndian":
return 1;
default:
return null;
}
};
openfl_utils__$Endian_Endian_$Impl_$.toString = function(value) {
switch(value) {
case 0:
return "bigEndian";
case 1:
return "littleEndian";
default:
return null;
}
};
var openfl_utils__$Object_Object_$Impl_$ = {};
$hxClasses["openfl.utils._Object.Object_Impl_"] = openfl_utils__$Object_Object_$Impl_$;
openfl_utils__$Object_Object_$Impl_$.__name__ = ["openfl","utils","_Object","Object_Impl_"];
openfl_utils__$Object_Object_$Impl_$._new = function() {
return { };
};
openfl_utils__$Object_Object_$Impl_$.hasOwnProperty = function(this1,name) {
return this1 != null && Object.prototype.hasOwnProperty.call(this1,name);
};
openfl_utils__$Object_Object_$Impl_$.isPrototypeOf = function(this1,theClass) {
var c;
if(this1 == null) c = null; else c = js_Boot.getClass(this1);
while(c != null) {
if(c == theClass) return true;
c = Type.getSuperClass(c);
}
return false;
};
openfl_utils__$Object_Object_$Impl_$.iterator = function(this1) {
var fields = Reflect.fields(this1);
if(fields == null) fields = [];
return HxOverrides.iter(fields);
};
openfl_utils__$Object_Object_$Impl_$.propertyIsEnumerable = function(this1,name) {
return this1 != null && Object.prototype.hasOwnProperty.call(this1,name) && Std["is"](Reflect.field(this1,name),haxe_lang_Iterable);
};
openfl_utils__$Object_Object_$Impl_$.toLocaleString = function(this1) {
return Std.string(this1);
};
openfl_utils__$Object_Object_$Impl_$.toString = function(this1) {
return Std.string(this1);
};
openfl_utils__$Object_Object_$Impl_$.valueOf = function(this1) {
return this1;
};
openfl_utils__$Object_Object_$Impl_$.__get = function(this1,key) {
return Reflect.field(this1,key);
};
openfl_utils__$Object_Object_$Impl_$.__set = function(this1,key,value) {
this1[key] = value;
return value;
};
var haxe_lang_Iterator = function() { };
$hxClasses["haxe.lang.Iterator"] = haxe_lang_Iterator;
haxe_lang_Iterator.__name__ = ["haxe","lang","Iterator"];
haxe_lang_Iterator.prototype = {
hasNext: null
,next: null
,__class__: haxe_lang_Iterator
};
var haxe_lang_Iterable = function() { };
$hxClasses["haxe.lang.Iterable"] = haxe_lang_Iterable;
haxe_lang_Iterable.__name__ = ["haxe","lang","Iterable"];
haxe_lang_Iterable.prototype = {
iterator: null
,__class__: haxe_lang_Iterable
};
var org_zamedev_particles_Particle = function() {
this.timePassed = 0.0;
this.colorChangeDelay = 0.0;
this.timeToLive = 0.0;
this.tangentialAcceleration = 0.0;
this.radialAcceleration = 0.0;
this.particleSizeDelta = 0.0;
this.particleSize = 0.0;
this.angleDelta = 0.0;
this.angle = 0.0;
this.radiusDelta = 0.0;
this.radius = 0.0;
this.rotationDelta = 0.0;
this.rotation = 0.0;
this.colorDelta = new org_zamedev_particles_util_ParticleColor(0.0,0.0,0.0,0.0);
this.color = new org_zamedev_particles_util_ParticleColor(0.0,0.0,0.0,0.0);
this.direction = new org_zamedev_particles_util_ParticleVector(0.0,0.0);
this.prevPosition = new org_zamedev_particles_util_ParticleVector(0.0,0.0);
this.position = new org_zamedev_particles_util_ParticleVector(0.0,0.0);
this.startPos = new org_zamedev_particles_util_ParticleVector(0.0,0.0);
};
$hxClasses["org.zamedev.particles.Particle"] = org_zamedev_particles_Particle;
org_zamedev_particles_Particle.__name__ = ["org","zamedev","particles","Particle"];
org_zamedev_particles_Particle.prototype = {
startPos: null
,position: null
,prevPosition: null
,direction: null
,color: null
,colorDelta: null
,rotation: null
,rotationDelta: null
,radius: null
,radiusDelta: null
,angle: null
,angleDelta: null
,particleSize: null
,particleSizeDelta: null
,radialAcceleration: null
,tangentialAcceleration: null
,timeToLive: null
,colorChangeDelay: null
,timePassed: null
,update: function(ps,dt) {
this.timeToLive -= dt;
this.timePassed += dt;
if(this.timeToLive <= 0.0) {
this.timePassed = 0.0;
return false;
}
this.prevPosition.x = this.position.x;
this.prevPosition.y = this.position.y;
if(ps.emitterType == 1) {
this.angle += this.angleDelta * dt;
this.radius += this.radiusDelta * dt;
this.position.x = this.startPos.x - Math.cos(this.angle) * this.radius;
this.position.y = this.startPos.y - Math.sin(this.angle) * this.radius * ps.yCoordMultiplier;
} else {
var radial_x = 0.0;
var radial_y = 0.0;
this.position.x -= this.startPos.x;
this.position.y = (this.position.y - this.startPos.y) * ps.yCoordMultiplier;
if(this.position.x != 0.0 || this.position.y != 0.0) {
var length = Math.sqrt(this.position.x * this.position.x + this.position.y * this.position.y);
radial_x = this.position.x / length;
radial_y = this.position.y / length;
}
var tangential_x = -radial_y;
var tangential_y = radial_x;
radial_x *= this.radialAcceleration;
radial_y *= this.radialAcceleration;
tangential_x *= this.tangentialAcceleration;
tangential_y *= this.tangentialAcceleration;
this.direction.x += (radial_x + tangential_x + ps.gravity.x) * dt;
this.direction.y += (radial_y + tangential_y + ps.gravity.y) * dt;
this.position.x += this.direction.x * dt + this.startPos.x;
this.position.y = (this.position.y + this.direction.y * dt) * ps.yCoordMultiplier + this.startPos.y;
}
if(this.timePassed >= this.colorChangeDelay) {
this.color.r += this.colorDelta.r * dt;
this.color.g += this.colorDelta.g * dt;
this.color.b += this.colorDelta.b * dt;
this.color.a += this.colorDelta.a * dt;
}
this.particleSize += this.particleSizeDelta * dt;
this.particleSize = Math.max(0,this.particleSize);
if(ps.headToVelocity) {
var vx = this.position.x - this.prevPosition.x;
var vy = this.position.y - this.prevPosition.y;
if(Math.abs(vx) > 0.00000001 || Math.abs(vy) > 0.00000001) this.rotation = Math.atan2(vy,vx); else this.rotation = Math.atan2(this.direction.y,this.direction.x);
} else this.rotation += this.rotationDelta * dt;
return true;
}
,__class__: org_zamedev_particles_Particle
};
var org_zamedev_particles_ParticleSystem = function() {
this.__particleCount = 0;
this.__particleList = [];
this.elapsedTime = 0.0;
this.emitCounter = 0.0;
this.prevTime = -1.0;
this.forceSquareTexture = false;
this.emissionFreq = 0.0;
this.headToVelocity = false;
this.yCoordMultiplier = 1.0;
this.particleScaleSize = 1.0;
this.particleScaleY = 1.0;
this.particleScaleX = 1.0;
this.restart = false;
this.active = false;
this.textureBitmapData = null;
this.blendFuncDestination = 0;
this.blendFuncSource = 0;
this.rotatePerSecondVariance = 0.0;
this.rotatePerSecond = 0.0;
this.tangentialAccelerationVariance = 0.0;
this.tangentialAcceleration = 0.0;
this.radialAccelerationVariance = 0.0;
this.radialAcceleration = 0.0;
this.rotationEndVariance = 0.0;
this.rotationEnd = 0.0;
this.rotationStartVariance = 0.0;
this.rotationStart = 0.0;
this.maxRadiusVariance = 0.0;
this.maxRadius = 0.0;
this.minRadiusVariance = 0.0;
this.minRadius = 0.0;
this.finishColorVariance = new org_zamedev_particles_util_ParticleColor(0.0,0.0,0.0,0.0);
this.finishColor = new org_zamedev_particles_util_ParticleColor(0.0,0.0,0.0,0.0);
this.startColorVariance = new org_zamedev_particles_util_ParticleColor(0.0,0.0,0.0,0.0);
this.startColor = new org_zamedev_particles_util_ParticleColor(0.0,0.0,0.0,0.0);
this.finishParticleSizeVariance = 0.0;
this.finishParticleSize = 0.0;
this.startParticleSizeVariance = 0.0;
this.startParticleSize = 0.0;
this.angleVariance = 0.0;
this.angle = 0.0;
this.sourcePositionVariance = new org_zamedev_particles_util_ParticleVector(0.0,0.0);
this.sourcePosition = new org_zamedev_particles_util_ParticleVector(0.0,0.0);
this.speedVariance = 0.0;
this.speed = 0.0;
this.particleLifespanVariance = 0.0;
this.particleLifespan = 0.0;
this.gravity = new org_zamedev_particles_util_ParticleVector(0.0,0.0);
this.duration = 0.0;
this.positionType = 0;
this.maxParticles = 0;
this.emitterType = 0;
this.colorChangeDelay = 0.0;
};
$hxClasses["org.zamedev.particles.ParticleSystem"] = org_zamedev_particles_ParticleSystem;
org_zamedev_particles_ParticleSystem.__name__ = ["org","zamedev","particles","ParticleSystem"];
org_zamedev_particles_ParticleSystem.prototype = {
colorChangeDelay: null
,emitterType: null
,maxParticles: null
,positionType: null
,duration: null
,gravity: null
,particleLifespan: null
,particleLifespanVariance: null
,speed: null
,speedVariance: null
,sourcePosition: null
,sourcePositionVariance: null
,angle: null
,angleVariance: null
,startParticleSize: null
,startParticleSizeVariance: null
,finishParticleSize: null
,finishParticleSizeVariance: null
,startColor: null
,startColorVariance: null
,finishColor: null
,finishColorVariance: null
,minRadius: null
,minRadiusVariance: null
,maxRadius: null
,maxRadiusVariance: null
,rotationStart: null
,rotationStartVariance: null
,rotationEnd: null
,rotationEndVariance: null
,radialAcceleration: null
,radialAccelerationVariance: null
,tangentialAcceleration: null
,tangentialAccelerationVariance: null
,rotatePerSecond: null
,rotatePerSecondVariance: null
,blendFuncSource: null
,blendFuncDestination: null
,textureBitmapData: null
,active: null
,restart: null
,particleScaleX: null
,particleScaleY: null
,particleScaleSize: null
,yCoordMultiplier: null
,headToVelocity: null
,emissionFreq: null
,forceSquareTexture: null
,prevTime: null
,emitCounter: null
,elapsedTime: null
,__particleList: null
,__particleCount: null
,__initialize: function() {
if(this.blendFuncSource == 772) this.blendFuncSource = 1;
if(this.blendFuncDestination == 772) this.blendFuncDestination = 1;
this.prevTime = -1.0;
this.emitCounter = 0.0;
this.elapsedTime = 0.0;
if(this.emissionFreq <= 0.0) {
var emissionRate = this.maxParticles / Math.max(0.0001,this.particleLifespan);
if(emissionRate > 0.0) this.emissionFreq = 1.0 / emissionRate;
}
this.__particleList = [];
this.__particleCount = 0;
var _g1 = 0;
var _g = this.maxParticles;
while(_g1 < _g) {
var i = _g1++;
this.__particleList[i] = new org_zamedev_particles_Particle();
}
return this;
}
,__update: function() {
var currentTime = haxe_Timer.stamp();
if(this.prevTime < 0.0) {
this.prevTime = currentTime;
return false;
}
var dt = currentTime - this.prevTime;
if(dt < 0.0001) return false;
this.prevTime = currentTime;
if(this.active && this.emissionFreq > 0.0) {
this.emitCounter += dt;
while(this.__particleCount < this.maxParticles && this.emitCounter > this.emissionFreq) {
this.initParticle(this.__particleList[this.__particleCount]);
this.__particleCount++;
this.emitCounter -= this.emissionFreq;
}
if(this.emitCounter > this.emissionFreq) this.emitCounter = this.emitCounter % this.emissionFreq;
this.elapsedTime += dt;
if(this.duration >= 0.0 && this.duration < this.elapsedTime) this.stop();
}
var updated = false;
if(this.__particleCount > 0) updated = true;
var index = 0;
while(index < this.__particleCount) {
var particle = this.__particleList[index];
if(particle.update(this,dt)) index++; else {
if(index != this.__particleCount - 1) {
var tmp = this.__particleList[index];
this.__particleList[index] = this.__particleList[this.__particleCount - 1];
this.__particleList[this.__particleCount - 1] = tmp;
}
this.__particleCount--;
}
}
if(this.__particleCount > 0) updated = true; else if(this.restart) this.active = true;
return updated;
}
,initParticle: function(p) {
p.timeToLive = Math.max(0.0001,this.particleLifespan + this.particleLifespanVariance * (Math.random() * 2.0 - 1.0));
p.colorChangeDelay = this.colorChangeDelay;
p.startPos.x = this.sourcePosition.x / this.particleScaleX;
p.startPos.y = this.sourcePosition.y / this.particleScaleY;
p.color.r = org_zamedev_particles_util_MathHelper.clamp(this.startColor.r + this.startColorVariance.r * (Math.random() * 2.0 - 1.0));
p.color.g = org_zamedev_particles_util_MathHelper.clamp(this.startColor.g + this.startColorVariance.g * (Math.random() * 2.0 - 1.0));
p.color.b = org_zamedev_particles_util_MathHelper.clamp(this.startColor.b + this.startColorVariance.b * (Math.random() * 2.0 - 1.0));
p.color.a = org_zamedev_particles_util_MathHelper.clamp(this.startColor.a + this.startColorVariance.a * (Math.random() * 2.0 - 1.0));
p.colorDelta.r = (org_zamedev_particles_util_MathHelper.clamp(this.finishColor.r + this.finishColorVariance.r * (Math.random() * 2.0 - 1.0)) - p.color.r) / (p.timeToLive - this.colorChangeDelay);
p.colorDelta.g = (org_zamedev_particles_util_MathHelper.clamp(this.finishColor.g + this.finishColorVariance.g * (Math.random() * 2.0 - 1.0)) - p.color.g) / (p.timeToLive - this.colorChangeDelay);
p.colorDelta.b = (org_zamedev_particles_util_MathHelper.clamp(this.finishColor.b + this.finishColorVariance.b * (Math.random() * 2.0 - 1.0)) - p.color.b) / (p.timeToLive - this.colorChangeDelay);
p.colorDelta.a = (org_zamedev_particles_util_MathHelper.clamp(this.finishColor.a + this.finishColorVariance.a * (Math.random() * 2.0 - 1.0)) - p.color.a) / (p.timeToLive - this.colorChangeDelay);
p.particleSize = Math.max(0.0,this.startParticleSize + this.startParticleSizeVariance * (Math.random() * 2.0 - 1.0));
p.particleSizeDelta = (Math.max(0.0,this.finishParticleSize + this.finishParticleSizeVariance * (Math.random() * 2.0 - 1.0)) - p.particleSize) / p.timeToLive;
p.rotation = this.rotationStart + this.rotationStartVariance * (Math.random() * 2.0 - 1.0);
p.rotationDelta = (this.rotationEnd + this.rotationEndVariance * (Math.random() * 2.0 - 1.0) - p.rotation) / p.timeToLive;
var computedAngle = this.angle + this.angleVariance * (Math.random() * 2.0 - 1.0);
var directionSpeed = this.speed + this.speedVariance * (Math.random() * 2.0 - 1.0);
p.position.x = p.startPos.x + this.sourcePositionVariance.x * (Math.random() * 2.0 - 1.0);
p.position.y = p.startPos.y + this.sourcePositionVariance.y * (Math.random() * 2.0 - 1.0);
p.direction.x = Math.cos(computedAngle) * directionSpeed;
p.direction.y = Math.sin(computedAngle) * directionSpeed;
p.radialAcceleration = this.radialAcceleration + this.radialAccelerationVariance * (Math.random() * 2.0 - 1.0);
p.tangentialAcceleration = this.tangentialAcceleration + this.tangentialAccelerationVariance * (Math.random() * 2.0 - 1.0);
p.angle = computedAngle;
p.angleDelta = (this.rotatePerSecond + this.rotatePerSecondVariance * (Math.random() * 2.0 - 1.0)) / p.timeToLive;
p.radius = this.maxRadius + this.maxRadiusVariance * (Math.random() * 2.0 - 1.0);
p.radiusDelta = (this.minRadius + this.minRadiusVariance * (Math.random() * 2.0 - 1.0) - p.radius) / p.timeToLive;
}
,emit: function(sourcePositionX,sourcePositionY) {
if(sourcePositionX != null) this.sourcePosition.x = sourcePositionX;
if(sourcePositionY != null) this.sourcePosition.y = sourcePositionY;
this.active = true;
}
,stop: function() {
this.active = false;
this.elapsedTime = 0.0;
this.emitCounter = 0.0;
}
,reset: function() {
this.stop();
var _g1 = 0;
var _g = this.__particleCount;
while(_g1 < _g) {
var i = _g1++;
this.__particleList[i].timeToLive = 0.0;
}
}
,__class__: org_zamedev_particles_ParticleSystem
};
var org_zamedev_particles_internal_tiff_TiffDecoder = function(data) {
if(data.length < 8) throw new js__$Boot_HaxeError("invalid header: size");
this.data = data;
if(data.b[0] == 77 && data.b[1] == 77) this.isBigEndian = true; else if(data.b[0] == 73 && data.b[1] == 73) this.isBigEndian = false; else throw new js__$Boot_HaxeError("invalid header: Identifier");
if(this.getUShort(2) != 42) throw new js__$Boot_HaxeError("invalid header: Version");
this.ifdOffset = this.getULong(4);
if(this.ifdOffset >= data.length) throw new js__$Boot_HaxeError("invalid header: IFDOffset");
};
$hxClasses["org.zamedev.particles.internal.tiff.TiffDecoder"] = org_zamedev_particles_internal_tiff_TiffDecoder;
org_zamedev_particles_internal_tiff_TiffDecoder.__name__ = ["org","zamedev","particles","internal","tiff","TiffDecoder"];
org_zamedev_particles_internal_tiff_TiffDecoder.decode = function(data) {
var decoder = new org_zamedev_particles_internal_tiff_TiffDecoder(data);
return decoder.run();
};
org_zamedev_particles_internal_tiff_TiffDecoder.prototype = {
data: null
,isBigEndian: null
,ifdOffset: null
,run: function() {
return this.parseIfd(this.ifdOffset);
}
,parseIfd: function(pos) {
var numDirEntries = this.getUShort(pos);
pos += 2;
var tagMap = new haxe_ds_IntMap();
var _g = 0;
while(_g < numDirEntries) {
var i = _g++;
this.parseTag(pos,tagMap);
pos += 12;
}
return this.parseImage(tagMap);
}
,parseImage: function(tagMap) {
if(!tagMap.h.hasOwnProperty(256) || !tagMap.h.hasOwnProperty(257) || !tagMap.h.hasOwnProperty(262) || !tagMap.h.hasOwnProperty(273) || !tagMap.h.hasOwnProperty(279)) throw new js__$Boot_HaxeError("required tags are missing: ImageWidth | ImageLength | PhotometricInterpretation | StripOffsets | StripByteCounts");
if(tagMap.h[262][0] != 2) throw new js__$Boot_HaxeError("PhotometricInterpretation must be = RGB");
if(this.getOrDefault(tagMap,259,[1])[0] != 1) throw new js__$Boot_HaxeError("Compression must be = Uncompressed");
if(this.getOrDefault(tagMap,274,[1])[0] != 1) throw new js__$Boot_HaxeError("Orientation must be = 1");
if(this.getOrDefault(tagMap,284,[1])[0] != 1) throw new js__$Boot_HaxeError("PlanarConfiguration must be = Chunky");
var imageLength = tagMap.h[257][0];
var rowsPerStrip = this.getOrDefault(tagMap,278,[-1])[0];
var stripsPerImage = (imageLength + rowsPerStrip - 1) / rowsPerStrip | 0;
if(this.getOrDefault(tagMap,277,[1])[0] != 4) throw new js__$Boot_HaxeError("SamplesPerPixel must be = 4");
if(!this.compareArray(this.getOrDefault(tagMap,258,[1,1,1,1]),[8,8,8,8])) throw new js__$Boot_HaxeError("BitsPerSample must be = [8, 8, 8, 8]");
var sampleFormat = this.getOrDefault(tagMap,339,[1,1,1,1]);
var _g1 = 0;
var _g = sampleFormat.length;
while(_g1 < _g) {
var i = _g1++;
if(sampleFormat[i] == 4) sampleFormat[i] = 1;
}
if(!this.compareArray(sampleFormat,[1,1,1,1])) throw new js__$Boot_HaxeError("unsupported SampleFormat value");
var extraSamples = this.getOrDefault(tagMap,338,[]);
if(extraSamples.length != 1) throw new js__$Boot_HaxeError("ExtraSamples.length must be = 1");
var extraSampleValue = extraSamples[0];
if(extraSampleValue != 1 && extraSampleValue != 2) throw new js__$Boot_HaxeError("unsupported ExtraSamples value");
var stripOffsets = tagMap.h[273];
if(stripOffsets.length != stripsPerImage) throw new js__$Boot_HaxeError("invalid StripOffsets length");
var stripByteCounts = tagMap.h[279];
if(stripOffsets.length != stripsPerImage) throw new js__$Boot_HaxeError("invalid StripByteCounts length");
var imageWidth = tagMap.h[256][0];
var computedSize = Lambda.fold(stripByteCounts,function(a,b) {
return a + b;
},0);
if(imageWidth * imageLength * 4 != computedSize) throw new js__$Boot_HaxeError("invalid StripByteCounts value");
var _g2 = 0;
while(_g2 < stripByteCounts.length) {
var bc = stripByteCounts[_g2];
++_g2;
if(bc % 4 != 0) throw new js__$Boot_HaxeError("each StripByteCounts element must be dividable by 4");
}
var pixels = new openfl_utils_ByteArrayData(computedSize);
pixels.position = 0;
var ba = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(this.data);
var _g3 = 0;
while(_g3 < stripsPerImage) {
var i1 = _g3++;
ba.position = stripOffsets[i1];
var count = stripByteCounts[i1] / 4 | 0;
var _g11 = 0;
while(_g11 < count) {
var j = _g11++;
var a1 = ba.readUnsignedByte();
var r = ba.readUnsignedByte();
var g = ba.readUnsignedByte();
var b1 = ba.readUnsignedByte();
pixels.writeByte(a1);
pixels.writeByte(r);
pixels.writeByte(g);
pixels.writeByte(b1);
}
}
pixels.position = 0;
return new org_zamedev_particles_internal_tiff_TiffImage(imageWidth,imageLength,pixels);
}
,getOrDefault: function(tagMap,tagId,def) {
if(tagMap.h.hasOwnProperty(tagId)) return tagMap.h[tagId]; else return def;
}
,compareArray: function(a,b) {
if(a.length != b.length) return false;
var _g1 = 0;
var _g = a.length;
while(_g1 < _g) {
var i = _g1++;
if(a[i] != b[i]) return false;
}
return true;
}
,parseTag: function(pos,tagMap) {
var tagId = this.getUShort(pos);
switch(tagId) {
case 256:case 257:case 258:case 259:case 262:case 273:case 274:case 277:case 278:case 279:case 284:case 338:case 339:
var v = this.parseTagData(pos);
tagMap.h[tagId] = v;
v;
break;
default:
}
}
,parseTagData: function(pos) {
var dataType = this.getUShort(pos + 2);
var dataCount = this.getULong(pos + 4);
if(dataCount == 0) throw new js__$Boot_HaxeError("data count is zero");
var sizeInBytes;
sizeInBytes = dataCount * (function($this) {
var $r;
switch(dataType) {
case 1:case 2:case 6:case 7:
$r = 1;
break;
case 3:case 8:
$r = 2;
break;
case 4:case 9:
$r = 4;
break;
case 11:
$r = (function($this) {
var $r;
throw new js__$Boot_HaxeError("unsupported data type: FLOAT");
return $r;
}($this));
break;
case 5:case 10:case 12:
$r = (function($this) {
var $r;
throw new js__$Boot_HaxeError("unsupported data type: RATIONAL | SRATIONAL | DOUBLE");
return $r;
}($this));
break;
}
return $r;
}(this));
var dataPos;
if(sizeInBytes <= 4) dataPos = pos + 8; else dataPos = this.getULong(pos + 8);
var result = [];
var _g = 0;
while(_g < dataCount) {
var i = _g++;
switch(dataType) {
case 1:case 2:case 7:
result.push(this.data.b[dataPos]);
dataPos++;
break;
case 6:
result.push(this.getSByte(dataPos));
dataPos++;
break;
case 3:
result.push(this.getUShort(dataPos));
dataPos += 2;
break;
case 8:
result.push(this.getSShort(dataPos));
dataPos += 2;
break;
case 4:
result.push(this.getULong(dataPos));
dataPos += 4;
break;
case 9:
result.push(this.getSLong(dataPos));
dataPos += 4;
break;
default:
}
}
return result;
}
,getSByte: function(pos) {
var value = this.data.b[pos];
if(value <= 127) return value; else return value - 256;
}
,getUShort: function(pos) {
if(this.isBigEndian) return this.data.b[pos] << 8 | this.data.b[pos + 1]; else return this.data.b[pos] | this.data.b[pos + 1] << 8;
}
,getSShort: function(pos) {
var value = this.getUShort(pos);
if(value <= 32767) return value; else return value - 65536;
}
,getULong: function(pos) {
if(this.isBigEndian) return this.data.b[pos] << 24 | this.data.b[pos + 1] << 16 | this.data.b[pos + 2] << 8 | this.data.b[pos + 3]; else return this.data.b[pos] | this.data.b[pos + 1] << 8 | this.data.b[pos + 2] << 16 | this.data.b[pos + 3] << 24;
}
,getSLong: function(pos) {
var value = this.getULong(pos);
if(value <= 2147483647) return value; else return value - 2147483647 - 2147483647 - 2;
}
,__class__: org_zamedev_particles_internal_tiff_TiffDecoder
};
var org_zamedev_particles_internal_tiff_TiffImage = function(width,height,pixels) {
this.width = width;
this.height = height;
this.pixels = pixels;
};
$hxClasses["org.zamedev.particles.internal.tiff.TiffImage"] = org_zamedev_particles_internal_tiff_TiffImage;
org_zamedev_particles_internal_tiff_TiffImage.__name__ = ["org","zamedev","particles","internal","tiff","TiffImage"];
org_zamedev_particles_internal_tiff_TiffImage.prototype = {
width: null
,height: null
,pixels: null
,__class__: org_zamedev_particles_internal_tiff_TiffImage
};
var org_zamedev_particles_loaders_JsonParticleLoader = function() { };
$hxClasses["org.zamedev.particles.loaders.JsonParticleLoader"] = org_zamedev_particles_loaders_JsonParticleLoader;
org_zamedev_particles_loaders_JsonParticleLoader.__name__ = ["org","zamedev","particles","loaders","JsonParticleLoader"];
org_zamedev_particles_loaders_JsonParticleLoader.load = function(path) {
var map = haxe_Json.parse(openfl_utils_Assets.getText(path));
var ps = new org_zamedev_particles_ParticleSystem();
ps.emitterType = org_zamedev_particles_util_DynamicTools.asInt(map.emitterType);
ps.maxParticles = org_zamedev_particles_util_DynamicTools.asInt(map.maxParticles);
ps.positionType = 0;
ps.duration = org_zamedev_particles_util_DynamicTools.asFloat(map.duration);
ps.gravity = org_zamedev_particles_loaders_JsonParticleLoader.asVector(map,"gravity");
ps.particleLifespan = org_zamedev_particles_util_DynamicTools.asFloat(map.particleLifespan);
ps.particleLifespanVariance = org_zamedev_particles_util_DynamicTools.asFloat(map.particleLifespanVariance);
ps.speed = org_zamedev_particles_util_DynamicTools.asFloat(map.speed);
ps.speedVariance = org_zamedev_particles_util_DynamicTools.asFloat(map.speedVariance);
ps.sourcePosition = new org_zamedev_particles_util_ParticleVector(0.0,0.0);
ps.sourcePositionVariance = org_zamedev_particles_loaders_JsonParticleLoader.asVector(map,"sourcePositionVariance");
ps.angle = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(map.angle));
ps.angleVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(map.angleVariance));
ps.startParticleSize = org_zamedev_particles_util_DynamicTools.asFloat(map.startParticleSize);
ps.startParticleSizeVariance = org_zamedev_particles_util_DynamicTools.asFloat(map.startParticleSizeVariance);
ps.finishParticleSize = org_zamedev_particles_util_DynamicTools.asFloat(map.finishParticleSize);
ps.finishParticleSizeVariance = org_zamedev_particles_util_DynamicTools.asFloat(map.finishParticleSizeVariance);
ps.startColor = org_zamedev_particles_loaders_JsonParticleLoader.asColor(map,"startColor");
ps.startColorVariance = org_zamedev_particles_loaders_JsonParticleLoader.asColor(map,"startColorVariance");
ps.finishColor = org_zamedev_particles_loaders_JsonParticleLoader.asColor(map,"finishColor");
ps.finishColorVariance = org_zamedev_particles_loaders_JsonParticleLoader.asColor(map,"finishColorVariance");
ps.minRadius = org_zamedev_particles_util_DynamicTools.asFloat(map.minRadius);
ps.minRadiusVariance = org_zamedev_particles_util_DynamicTools.asFloat(map.minRadiusVariance);
ps.maxRadius = org_zamedev_particles_util_DynamicTools.asFloat(map.maxRadius);
ps.maxRadiusVariance = org_zamedev_particles_util_DynamicTools.asFloat(map.maxRadiusVariance);
ps.rotationStart = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(map.rotationStart));
ps.rotationStartVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(map.rotationStartVariance));
ps.rotationEnd = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(map.rotationEnd));
ps.rotationEndVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(map.rotationEndVariance));
ps.rotatePerSecond = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(map.rotatePerSecond));
ps.rotatePerSecondVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(map.rotatePerSecondVariance));
ps.radialAcceleration = org_zamedev_particles_util_DynamicTools.asFloat(map.radialAcceleration);
ps.radialAccelerationVariance = org_zamedev_particles_util_DynamicTools.asFloat(map.radialAccelVariance);
ps.tangentialAcceleration = org_zamedev_particles_util_DynamicTools.asFloat(map.tangentialAcceleration);
ps.tangentialAccelerationVariance = org_zamedev_particles_util_DynamicTools.asFloat(map.tangentialAccelVariance);
ps.blendFuncSource = org_zamedev_particles_util_DynamicTools.asInt(map.blendFuncSource);
ps.blendFuncDestination = org_zamedev_particles_util_DynamicTools.asInt(map.blendFuncDestination);
ps.textureBitmapData = org_zamedev_particles_loaders_ParticleLoader.loadTexture(org_zamedev_particles_util_DynamicTools.asString(map.textureImageData),org_zamedev_particles_util_DynamicTools.asString(map.textureFileName),path);
if(org_zamedev_particles_util_DynamicTools.asInt(map.yCoordFlipped) == 1) ps.yCoordMultiplier = -1.0; else ps.yCoordMultiplier = 1.0;
ps.headToVelocity = org_zamedev_particles_util_DynamicTools.asBool(map.headToVelocity);
ps.forceSquareTexture = true;
return ps;
};
org_zamedev_particles_loaders_JsonParticleLoader.asVector = function(map,prefix) {
return new org_zamedev_particles_util_ParticleVector(org_zamedev_particles_util_DynamicTools.asFloat(map["" + prefix + "x"]),org_zamedev_particles_util_DynamicTools.asFloat(map["" + prefix + "y"]));
};
org_zamedev_particles_loaders_JsonParticleLoader.asColor = function(map,prefix) {
return new org_zamedev_particles_util_ParticleColor(org_zamedev_particles_util_DynamicTools.asFloat(map["" + prefix + "Red"]),org_zamedev_particles_util_DynamicTools.asFloat(map["" + prefix + "Green"]),org_zamedev_particles_util_DynamicTools.asFloat(map["" + prefix + "Blue"]),org_zamedev_particles_util_DynamicTools.asFloat(map["" + prefix + "Alpha"]));
};
var org_zamedev_particles_loaders_ParticleLoader = function() { };
$hxClasses["org.zamedev.particles.loaders.ParticleLoader"] = org_zamedev_particles_loaders_ParticleLoader;
org_zamedev_particles_loaders_ParticleLoader.__name__ = ["org","zamedev","particles","loaders","ParticleLoader"];
org_zamedev_particles_loaders_ParticleLoader.load = function(path) {
var ext = haxe_io_Path.extension(path).toLowerCase();
switch(ext) {
case "plist":
return org_zamedev_particles_loaders_PlistParticleLoader.load(path);
case "json":
return org_zamedev_particles_loaders_JsonParticleLoader.load(path);
case "pex":case "lap":
return org_zamedev_particles_loaders_PexLapParticleLoader.load(path);
default:
throw new js__$Boot_HaxeError(new openfl_errors_Error("Unsupported extension \"" + ext + "\""));
}
};
org_zamedev_particles_loaders_ParticleLoader.loadTexture = function(textureImageData,textureFileName,path) {
if(textureImageData == null || textureImageData.length == 0) return openfl_utils_Assets.getBitmapData(haxe_io_Path.directory(path) + "/" + textureFileName);
var data = haxe_crypto_Base64.decode(textureImageData);
if(data.b[0] == 31 && data.b[1] == 139) {
var reader = new format_gz_Reader(new haxe_io_BytesInput(data));
data = reader.read().data;
}
var decoded = org_zamedev_particles_internal_tiff_TiffDecoder.decode(data);
var result = new openfl_display_BitmapData(decoded.width,decoded.height,true,0);
result.setPixels(new openfl_geom_Rectangle(0.0,0.0,decoded.width,decoded.height),decoded.pixels);
return result;
};
var org_zamedev_particles_loaders_PexLapParticleLoader = function() { };
$hxClasses["org.zamedev.particles.loaders.PexLapParticleLoader"] = org_zamedev_particles_loaders_PexLapParticleLoader;
org_zamedev_particles_loaders_PexLapParticleLoader.__name__ = ["org","zamedev","particles","loaders","PexLapParticleLoader"];
org_zamedev_particles_loaders_PexLapParticleLoader.load = function(path) {
var root = Xml.parse(openfl_utils_Assets.getText(path)).firstElement();
if((function($this) {
var $r;
if(root.nodeType != Xml.Element) throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + root.nodeType);
$r = root.nodeName;
return $r;
}(this)) != "particleEmitterConfig" && (function($this) {
var $r;
if(root.nodeType != Xml.Element) throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + root.nodeType);
$r = root.nodeName;
return $r;
}(this)) != "lanicaAnimoParticles") throw new js__$Boot_HaxeError(new openfl_errors_Error("Expecting \"particleEmitterConfig\" or \"lanicaAnimoParticles\", but \"" + (function($this) {
var $r;
if(root.nodeType != Xml.Element) throw "Bad node type, expected Element but found " + root.nodeType;
$r = root.nodeName;
return $r;
}(this)) + "\" found"));
var map = new haxe_ds_StringMap();
var $it0 = root.elements();
while( $it0.hasNext() ) {
var node = $it0.next();
var k;
if(node.nodeType != Xml.Element) throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + node.nodeType);
k = node.nodeName;
if(__map_reserved[k] != null) map.setReserved(k,node); else map.h[k] = node;
node;
}
var ps = new org_zamedev_particles_ParticleSystem();
ps.emitterType = org_zamedev_particles_loaders_PexLapParticleLoader.parseIntNode(__map_reserved.emitterType != null?map.getReserved("emitterType"):map.h["emitterType"]);
ps.maxParticles = org_zamedev_particles_loaders_PexLapParticleLoader.parseIntNode(__map_reserved.maxParticles != null?map.getReserved("maxParticles"):map.h["maxParticles"]);
ps.positionType = 0;
ps.duration = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.duration != null?map.getReserved("duration"):map.h["duration"]);
ps.gravity = org_zamedev_particles_loaders_PexLapParticleLoader.parseVectorNode(__map_reserved.gravity != null?map.getReserved("gravity"):map.h["gravity"]);
ps.particleLifespan = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.particleLifeSpan != null?map.getReserved("particleLifeSpan"):map.h["particleLifeSpan"]);
ps.particleLifespanVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.particleLifespanVariance != null?map.getReserved("particleLifespanVariance"):map.h["particleLifespanVariance"]);
ps.speed = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.speed != null?map.getReserved("speed"):map.h["speed"]);
ps.speedVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.speedVariance != null?map.getReserved("speedVariance"):map.h["speedVariance"]);
ps.sourcePosition = org_zamedev_particles_loaders_PexLapParticleLoader.parseVectorNode(__map_reserved.sourcePosition != null?map.getReserved("sourcePosition"):map.h["sourcePosition"]);
ps.sourcePositionVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseVectorNode(__map_reserved.sourcePositionVariance != null?map.getReserved("sourcePositionVariance"):map.h["sourcePositionVariance"]);
ps.angle = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.angle != null?map.getReserved("angle"):map.h["angle"]));
ps.angleVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.angleVariance != null?map.getReserved("angleVariance"):map.h["angleVariance"]));
ps.startParticleSize = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.startParticleSize != null?map.getReserved("startParticleSize"):map.h["startParticleSize"]);
ps.startParticleSizeVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.startParticleSizeVariance != null?map.getReserved("startParticleSizeVariance"):map.h["startParticleSizeVariance"]);
ps.finishParticleSize = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.finishParticleSize != null?map.getReserved("finishParticleSize"):map.h["finishParticleSize"]);
ps.finishParticleSizeVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.finishParticleSizeVariance != null?map.getReserved("finishParticleSizeVariance"):map.h["finishParticleSizeVariance"]);
ps.startColor = org_zamedev_particles_loaders_PexLapParticleLoader.parseColorNode(__map_reserved.startColor != null?map.getReserved("startColor"):map.h["startColor"]);
ps.startColorVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseColorNode(__map_reserved.startColorVariance != null?map.getReserved("startColorVariance"):map.h["startColorVariance"]);
ps.finishColor = org_zamedev_particles_loaders_PexLapParticleLoader.parseColorNode(__map_reserved.finishColor != null?map.getReserved("finishColor"):map.h["finishColor"]);
ps.finishColorVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseColorNode(__map_reserved.finishColorVariance != null?map.getReserved("finishColorVariance"):map.h["finishColorVariance"]);
ps.minRadius = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.minRadius != null?map.getReserved("minRadius"):map.h["minRadius"]);
ps.minRadiusVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.minRadiusVariance != null?map.getReserved("minRadiusVariance"):map.h["minRadiusVariance"]);
ps.maxRadius = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.maxRadius != null?map.getReserved("maxRadius"):map.h["maxRadius"]);
ps.maxRadiusVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.maxRadiusVariance != null?map.getReserved("maxRadiusVariance"):map.h["maxRadiusVariance"]);
ps.rotationStart = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.rotationStart != null?map.getReserved("rotationStart"):map.h["rotationStart"]));
ps.rotationStartVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.rotationStartVariance != null?map.getReserved("rotationStartVariance"):map.h["rotationStartVariance"]));
ps.rotationEnd = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.rotationEnd != null?map.getReserved("rotationEnd"):map.h["rotationEnd"]));
ps.rotationEndVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.rotationEndVariance != null?map.getReserved("rotationEndVariance"):map.h["rotationEndVariance"]));
ps.rotatePerSecond = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.rotatePerSecond != null?map.getReserved("rotatePerSecond"):map.h["rotatePerSecond"]));
ps.rotatePerSecondVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.rotatePerSecondVariance != null?map.getReserved("rotatePerSecondVariance"):map.h["rotatePerSecondVariance"]));
ps.radialAcceleration = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.radialAcceleration != null?map.getReserved("radialAcceleration"):map.h["radialAcceleration"]);
ps.radialAccelerationVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.radialAccelVariance != null?map.getReserved("radialAccelVariance"):map.h["radialAccelVariance"]);
ps.tangentialAcceleration = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.tangentialAcceleration != null?map.getReserved("tangentialAcceleration"):map.h["tangentialAcceleration"]);
ps.tangentialAccelerationVariance = org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode(__map_reserved.tangentialAccelVariance != null?map.getReserved("tangentialAccelVariance"):map.h["tangentialAccelVariance"]);
ps.blendFuncSource = org_zamedev_particles_loaders_PexLapParticleLoader.parseIntNode(__map_reserved.blendFuncSource != null?map.getReserved("blendFuncSource"):map.h["blendFuncSource"]);
ps.blendFuncDestination = org_zamedev_particles_loaders_PexLapParticleLoader.parseIntNode(__map_reserved.blendFuncDestination != null?map.getReserved("blendFuncDestination"):map.h["blendFuncDestination"]);
ps.textureBitmapData = org_zamedev_particles_loaders_ParticleLoader.loadTexture((__map_reserved.texture != null?map.getReserved("texture"):map.h["texture"]).get("data"),(__map_reserved.texture != null?map.getReserved("texture"):map.h["texture"]).get("name"),path);
if(org_zamedev_particles_loaders_PexLapParticleLoader.parseIntNode(__map_reserved.yCoordFlipped != null?map.getReserved("yCoordFlipped"):map.h["yCoordFlipped"]) == 1) ps.yCoordMultiplier = -1.0; else ps.yCoordMultiplier = 1.0;
ps.headToVelocity = org_zamedev_particles_loaders_PexLapParticleLoader.parseIntNode(__map_reserved.headToVelocity != null?map.getReserved("headToVelocity"):map.h["headToVelocity"]) == 1;
ps.forceSquareTexture = true;
return ps;
};
org_zamedev_particles_loaders_PexLapParticleLoader.parseIntNode = function(node) {
if(node == null) return 0; else return org_zamedev_particles_loaders_PexLapParticleLoader.parseIntString(node.get("value"));
};
org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatNode = function(node) {
if(node == null) return 0; else return org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatString(node.get("value"));
};
org_zamedev_particles_loaders_PexLapParticleLoader.parseVectorNode = function(node) {
if(node == null) return new org_zamedev_particles_util_ParticleVector(0.0,0.0);
return new org_zamedev_particles_util_ParticleVector(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatString(node.get("x")),org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatString(node.get("y")));
};
org_zamedev_particles_loaders_PexLapParticleLoader.parseColorNode = function(node) {
if(node == null) return new org_zamedev_particles_util_ParticleColor(0.0,0.0,0.0,0.0);
return new org_zamedev_particles_util_ParticleColor(org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatString(node.get("red")),org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatString(node.get("green")),org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatString(node.get("blue")),org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatString(node.get("alpha")));
};
org_zamedev_particles_loaders_PexLapParticleLoader.parseIntString = function(s) {
if(s == null) return 0;
var result = Std.parseInt(s);
if(result == null) return 0; else return result;
};
org_zamedev_particles_loaders_PexLapParticleLoader.parseFloatString = function(s) {
if(s == null) return 0;
var result = parseFloat(s);
if(isNaN(result)) return 0.0; else return result;
};
var org_zamedev_particles_loaders_PlistParticleLoader = function() { };
$hxClasses["org.zamedev.particles.loaders.PlistParticleLoader"] = org_zamedev_particles_loaders_PlistParticleLoader;
org_zamedev_particles_loaders_PlistParticleLoader.__name__ = ["org","zamedev","particles","loaders","PlistParticleLoader"];
org_zamedev_particles_loaders_PlistParticleLoader.load = function(path) {
var root = Xml.parse(openfl_utils_Assets.getText(path)).firstElement().firstElement();
if((function($this) {
var $r;
if(root.nodeType != Xml.Element) throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + root.nodeType);
$r = root.nodeName;
return $r;
}(this)) != "dict") throw new js__$Boot_HaxeError(new openfl_errors_Error("Expecting \"dict\", but \"" + (function($this) {
var $r;
if(root.nodeType != Xml.Element) throw "Bad node type, expected Element but found " + root.nodeType;
$r = root.nodeName;
return $r;
}(this)) + "\" found"));
var key = null;
var map = new haxe_ds_StringMap();
var $it0 = root.elements();
while( $it0.hasNext() ) {
var node = $it0.next();
if(key == null) {
if((function($this) {
var $r;
if(node.nodeType != Xml.Element) throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + node.nodeType);
$r = node.nodeName;
return $r;
}(this)) == "key") {
key = org_zamedev_particles_util_XmlExt.innerText(node);
if(key == "") throw new js__$Boot_HaxeError(new openfl_errors_Error("Empty key is not supported"));
continue;
}
throw new js__$Boot_HaxeError(new openfl_errors_Error("Expecting element \"key\", but \"" + (function($this) {
var $r;
if(node.nodeType != Xml.Element) throw "Bad node type, expected Element but found " + node.nodeType;
$r = node.nodeName;
return $r;
}(this)) + "\" found"));
}
var textValue = org_zamedev_particles_util_XmlExt.innerText(node);
var _g;
if(node.nodeType != Xml.Element) throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + node.nodeType);
_g = node.nodeName;
switch(_g) {
case "false":
{
if(__map_reserved[key] != null) map.setReserved(key,false); else map.h[key] = false;
false;
}
break;
case "true":
{
if(__map_reserved[key] != null) map.setReserved(key,true); else map.h[key] = true;
true;
}
break;
case "real":
var value = parseFloat(textValue);
if(isNaN(value)) throw new js__$Boot_HaxeError(new openfl_errors_Error("Could not parse \"" + textValue + "\" as real (for key \"" + key + "\")"));
{
if(__map_reserved[key] != null) map.setReserved(key,value); else map.h[key] = value;
value;
}
break;
case "integer":
var value1 = Std.parseInt(textValue);
if(value1 == null) throw new js__$Boot_HaxeError(new openfl_errors_Error("Could not parse \"" + textValue + "\" as integer (for key \"" + key + "\")"));
{
if(__map_reserved[key] != null) map.setReserved(key,value1); else map.h[key] = value1;
value1;
}
break;
case "string":
{
if(__map_reserved[key] != null) map.setReserved(key,textValue); else map.h[key] = textValue;
textValue;
}
break;
default:
throw new js__$Boot_HaxeError(new openfl_errors_Error("Unsupported element \"" + (function($this) {
var $r;
if(node.nodeType != Xml.Element) throw "Bad node type, expected Element but found " + node.nodeType;
$r = node.nodeName;
return $r;
}(this)) + "\""));
}
key = null;
}
var ps = new org_zamedev_particles_ParticleSystem();
ps.emitterType = org_zamedev_particles_util_DynamicTools.asInt(__map_reserved.emitterType != null?map.getReserved("emitterType"):map.h["emitterType"]);
ps.maxParticles = org_zamedev_particles_util_DynamicTools.asInt(__map_reserved.maxParticles != null?map.getReserved("maxParticles"):map.h["maxParticles"]);
ps.positionType = org_zamedev_particles_util_DynamicTools.asInt(__map_reserved.positionType != null?map.getReserved("positionType"):map.h["positionType"]);
ps.duration = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.duration != null?map.getReserved("duration"):map.h["duration"]);
ps.gravity = org_zamedev_particles_loaders_PlistParticleLoader.asVector(map,"gravity");
ps.particleLifespan = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.particleLifespan != null?map.getReserved("particleLifespan"):map.h["particleLifespan"]);
ps.particleLifespanVariance = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.particleLifespanVariance != null?map.getReserved("particleLifespanVariance"):map.h["particleLifespanVariance"]);
ps.speed = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.speed != null?map.getReserved("speed"):map.h["speed"]);
ps.speedVariance = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.speedVariance != null?map.getReserved("speedVariance"):map.h["speedVariance"]);
ps.sourcePosition = org_zamedev_particles_loaders_PlistParticleLoader.asVector(map,"sourcePosition");
ps.sourcePositionVariance = org_zamedev_particles_loaders_PlistParticleLoader.asVector(map,"sourcePositionVariance");
ps.angle = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.angle != null?map.getReserved("angle"):map.h["angle"]));
ps.angleVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.angleVariance != null?map.getReserved("angleVariance"):map.h["angleVariance"]));
ps.startParticleSize = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.startParticleSize != null?map.getReserved("startParticleSize"):map.h["startParticleSize"]);
ps.startParticleSizeVariance = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.startParticleSizeVariance != null?map.getReserved("startParticleSizeVariance"):map.h["startParticleSizeVariance"]);
ps.finishParticleSize = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.finishParticleSize != null?map.getReserved("finishParticleSize"):map.h["finishParticleSize"]);
ps.finishParticleSizeVariance = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.finishParticleSizeVariance != null?map.getReserved("finishParticleSizeVariance"):map.h["finishParticleSizeVariance"]);
ps.startColor = org_zamedev_particles_loaders_PlistParticleLoader.asColor(map,"startColor");
ps.startColorVariance = org_zamedev_particles_loaders_PlistParticleLoader.asColor(map,"startColorVariance");
ps.finishColor = org_zamedev_particles_loaders_PlistParticleLoader.asColor(map,"finishColor");
ps.finishColorVariance = org_zamedev_particles_loaders_PlistParticleLoader.asColor(map,"finishColorVariance");
ps.minRadius = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.minRadius != null?map.getReserved("minRadius"):map.h["minRadius"]);
ps.minRadiusVariance = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.minRadiusVariance != null?map.getReserved("minRadiusVariance"):map.h["minRadiusVariance"]);
ps.maxRadius = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.maxRadius != null?map.getReserved("maxRadius"):map.h["maxRadius"]);
ps.maxRadiusVariance = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.maxRadiusVariance != null?map.getReserved("maxRadiusVariance"):map.h["maxRadiusVariance"]);
ps.rotationStart = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.rotationStart != null?map.getReserved("rotationStart"):map.h["rotationStart"]));
ps.rotationStartVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.rotationStartVariance != null?map.getReserved("rotationStartVariance"):map.h["rotationStartVariance"]));
ps.rotationEnd = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.rotationEnd != null?map.getReserved("rotationEnd"):map.h["rotationEnd"]));
ps.rotationEndVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.rotationEndVariance != null?map.getReserved("rotationEndVariance"):map.h["rotationEndVariance"]));
ps.rotatePerSecond = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.rotatePerSecond != null?map.getReserved("rotatePerSecond"):map.h["rotatePerSecond"]));
ps.rotatePerSecondVariance = org_zamedev_particles_util_MathHelper.deg2rad(org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.rotatePerSecondVariance != null?map.getReserved("rotatePerSecondVariance"):map.h["rotatePerSecondVariance"]));
ps.radialAcceleration = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.radialAcceleration != null?map.getReserved("radialAcceleration"):map.h["radialAcceleration"]);
ps.radialAccelerationVariance = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.radialAccelVariance != null?map.getReserved("radialAccelVariance"):map.h["radialAccelVariance"]);
ps.tangentialAcceleration = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.tangentialAcceleration != null?map.getReserved("tangentialAcceleration"):map.h["tangentialAcceleration"]);
ps.tangentialAccelerationVariance = org_zamedev_particles_util_DynamicTools.asFloat(__map_reserved.tangentialAccelVariance != null?map.getReserved("tangentialAccelVariance"):map.h["tangentialAccelVariance"]);
ps.blendFuncSource = org_zamedev_particles_util_DynamicTools.asInt(__map_reserved.blendFuncSource != null?map.getReserved("blendFuncSource"):map.h["blendFuncSource"]);
ps.blendFuncDestination = org_zamedev_particles_util_DynamicTools.asInt(__map_reserved.blendFuncDestination != null?map.getReserved("blendFuncDestination"):map.h["blendFuncDestination"]);
ps.textureBitmapData = org_zamedev_particles_loaders_ParticleLoader.loadTexture(org_zamedev_particles_util_DynamicTools.asString(__map_reserved.textureImageData != null?map.getReserved("textureImageData"):map.h["textureImageData"]),org_zamedev_particles_util_DynamicTools.asString(__map_reserved.textureFileName != null?map.getReserved("textureFileName"):map.h["textureFileName"]),path);
if(org_zamedev_particles_util_DynamicTools.asInt(__map_reserved.yCoordFlipped != null?map.getReserved("yCoordFlipped"):map.h["yCoordFlipped"]) == 1) ps.yCoordMultiplier = -1.0; else ps.yCoordMultiplier = 1.0;
ps.headToVelocity = org_zamedev_particles_util_DynamicTools.asInt(__map_reserved.headToVelocity != null?map.getReserved("headToVelocity"):map.h["headToVelocity"]) == 1;
ps.forceSquareTexture = true;
return ps;
};
org_zamedev_particles_loaders_PlistParticleLoader.asVector = function(map,prefix) {
return new org_zamedev_particles_util_ParticleVector(org_zamedev_particles_util_DynamicTools.asFloat(map.get("" + prefix + "x")),org_zamedev_particles_util_DynamicTools.asFloat(map.get("" + prefix + "y")));
};
org_zamedev_particles_loaders_PlistParticleLoader.asColor = function(map,prefix) {
return new org_zamedev_particles_util_ParticleColor(org_zamedev_particles_util_DynamicTools.asFloat(map.get("" + prefix + "Red")),org_zamedev_particles_util_DynamicTools.asFloat(map.get("" + prefix + "Green")),org_zamedev_particles_util_DynamicTools.asFloat(map.get("" + prefix + "Blue")),org_zamedev_particles_util_DynamicTools.asFloat(map.get("" + prefix + "Alpha")));
};
var org_zamedev_particles_renderers_ParticleSystemRenderer = function() { };
$hxClasses["org.zamedev.particles.renderers.ParticleSystemRenderer"] = org_zamedev_particles_renderers_ParticleSystemRenderer;
org_zamedev_particles_renderers_ParticleSystemRenderer.__name__ = ["org","zamedev","particles","renderers","ParticleSystemRenderer"];
org_zamedev_particles_renderers_ParticleSystemRenderer.prototype = {
addParticleSystem: null
,removeParticleSystem: null
,update: null
,__class__: org_zamedev_particles_renderers_ParticleSystemRenderer
};
var org_zamedev_particles_renderers_SpritesParticleRendererInfo = function(bitmap) {
this.bitmap = bitmap;
};
$hxClasses["org.zamedev.particles.renderers.SpritesParticleRendererInfo"] = org_zamedev_particles_renderers_SpritesParticleRendererInfo;
org_zamedev_particles_renderers_SpritesParticleRendererInfo.__name__ = ["org","zamedev","particles","renderers","SpritesParticleRendererInfo"];
org_zamedev_particles_renderers_SpritesParticleRendererInfo.prototype = {
bitmap: null
,__class__: org_zamedev_particles_renderers_SpritesParticleRendererInfo
};
var org_zamedev_particles_renderers_SpritesParticleRendererData = function(ps,spriteList) {
this.updated = false;
this.ps = ps;
this.spriteList = spriteList;
};
$hxClasses["org.zamedev.particles.renderers.SpritesParticleRendererData"] = org_zamedev_particles_renderers_SpritesParticleRendererData;
org_zamedev_particles_renderers_SpritesParticleRendererData.__name__ = ["org","zamedev","particles","renderers","SpritesParticleRendererData"];
org_zamedev_particles_renderers_SpritesParticleRendererData.prototype = {
ps: null
,spriteList: null
,updated: null
,__class__: org_zamedev_particles_renderers_SpritesParticleRendererData
};
var org_zamedev_particles_renderers_SpritesParticleRenderer = function(manualUpdate) {
if(manualUpdate == null) manualUpdate = false;
this.dataList = [];
openfl_display_Sprite.call(this);
this.manualUpdate = manualUpdate;
};
$hxClasses["org.zamedev.particles.renderers.SpritesParticleRenderer"] = org_zamedev_particles_renderers_SpritesParticleRenderer;
org_zamedev_particles_renderers_SpritesParticleRenderer.__name__ = ["org","zamedev","particles","renderers","SpritesParticleRenderer"];
org_zamedev_particles_renderers_SpritesParticleRenderer.__interfaces__ = [org_zamedev_particles_renderers_ParticleSystemRenderer];
org_zamedev_particles_renderers_SpritesParticleRenderer.__super__ = openfl_display_Sprite;
org_zamedev_particles_renderers_SpritesParticleRenderer.prototype = $extend(openfl_display_Sprite.prototype,{
manualUpdate: null
,dataList: null
,addParticleSystem: function(ps) {
if(this.dataList.length == 0 && !this.manualUpdate) this.addEventListener("enterFrame",$bind(this,this.onEnterFrame));
ps.__initialize();
var spriteList = [];
this.dataList.push(new org_zamedev_particles_renderers_SpritesParticleRendererData(ps,spriteList));
return this;
}
,removeParticleSystem: function(ps) {
var index = 0;
while(index < this.dataList.length) if(this.dataList[index].ps == ps) {
var _g = 0;
var _g1 = this.dataList[index].spriteList;
while(_g < _g1.length) {
var info = _g1[_g];
++_g;
this.removeChild(info.bitmap);
}
this.dataList.splice(index,1);
} else index++;
if(this.dataList.length == 0 && !this.manualUpdate) this.removeEventListener("enterFrame",$bind(this,this.onEnterFrame));
return this;
}
,update: function() {
var updated = false;
var _g = 0;
var _g1 = this.dataList;
while(_g < _g1.length) {
var data = _g1[_g];
++_g;
if(data.updated = data.ps.__update()) updated = true;
}
if(!updated) return;
var _g2 = 0;
var _g11 = this.dataList;
while(_g2 < _g11.length) {
var data1 = _g11[_g2];
++_g2;
if(!data1.updated) continue;
var ps = data1.ps;
var widthMult;
var heightMult;
if(!ps.forceSquareTexture || ps.textureBitmapData.width == ps.textureBitmapData.height || ps.textureBitmapData.width == 0 || ps.textureBitmapData.height == 0) {
widthMult = 1.0;
heightMult = 1.0;
} else if(ps.textureBitmapData.width > ps.textureBitmapData.height) {
widthMult = ps.textureBitmapData.height / ps.textureBitmapData.width;
heightMult = 1.0;
} else {
widthMult = 1.0;
heightMult = ps.textureBitmapData.width / ps.textureBitmapData.height;
}
var ethalonSize = ps.textureBitmapData.width * widthMult;
var halfWidth = ps.textureBitmapData.width * 0.5;
var halfHeight = ps.textureBitmapData.height * 0.5;
var spriteList = data1.spriteList;
var _g3 = 0;
var _g21 = ps.__particleCount;
while(_g3 < _g21) {
var i = _g3++;
var particle = ps.__particleList[i];
var info;
if(i < spriteList.length) info = spriteList[i]; else {
var bitmap1 = new openfl_display_Bitmap(ps.textureBitmapData);
info = new org_zamedev_particles_renderers_SpritesParticleRendererInfo(bitmap1);
spriteList.push(info);
this.addChild(bitmap1);
}
var scale = particle.particleSize / ethalonSize * ps.particleScaleSize;
var scaleX = scale * widthMult;
var scaleY = scale * heightMult;
var rotationSine = Math.sin(-particle.rotation);
var rotationCosine = Math.cos(-particle.rotation);
var matA = rotationCosine * scaleX;
var matB = rotationSine * scaleY;
var matC = -rotationSine * scaleX;
var matD = rotationCosine * scaleY;
var bitmap = info.bitmap;
bitmap.set_scaleX(scaleX);
bitmap.set_scaleY(scaleY);
bitmap.set_rotation(particle.rotation * 180.0 / Math.PI);
bitmap.set_x(particle.position.x * ps.particleScaleX - halfWidth * matA - halfHeight * matB);
bitmap.set_y(particle.position.y * ps.particleScaleY - halfWidth * matC - halfHeight * matD);
}
if(spriteList.length > ps.__particleCount) {
var _g31 = ps.__particleCount;
var _g22 = spriteList.length;
while(_g31 < _g22) {
var i1 = _g31++;
this.removeChild(spriteList[i1].bitmap);
}
spriteList.splice(ps.__particleCount,spriteList.length - ps.__particleCount + 1);
}
}
}
,onEnterFrame: function(_) {
this.update();
}
,__class__: org_zamedev_particles_renderers_SpritesParticleRenderer
});
var org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$ = {};
$hxClasses["org.zamedev.particles.util._DynamicExt.DynamicExt_Impl_"] = org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$;
org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$.__name__ = ["org","zamedev","particles","util","_DynamicExt","DynamicExt_Impl_"];
org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$._new = function() {
return { };
};
org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$.set = function(this1,key,value) {
this1[key] = value;
};
org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$.get = function(this1,key) {
return this1[key];
};
org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$.exists = function(this1,key) {
return Object.prototype.hasOwnProperty.call(this1,key);
};
org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$.remove = function(this1,key) {
return Reflect.deleteField(this1,key);
};
org_zamedev_particles_util__$DynamicExt_DynamicExt_$Impl_$.keys = function(this1) {
return Reflect.fields(this1);
};
var org_zamedev_particles_util_DynamicTools = function() { };
$hxClasses["org.zamedev.particles.util.DynamicTools"] = org_zamedev_particles_util_DynamicTools;
org_zamedev_particles_util_DynamicTools.__name__ = ["org","zamedev","particles","util","DynamicTools"];
org_zamedev_particles_util_DynamicTools.asDynamic = function(value) {
if(value == null) return { }; else return value;
};
org_zamedev_particles_util_DynamicTools.asArray = function(value) {
if((value instanceof Array) && value.__enum__ == null) return value; else return [];
};
org_zamedev_particles_util_DynamicTools.asInt = function(value,def) {
if(def == null) def = 0;
if(((value | 0) === value)) return value; else if(typeof(value) == "number") return Std["int"](value); else return def;
};
org_zamedev_particles_util_DynamicTools.asNullInt = function(value) {
if(((value | 0) === value)) return value; else if(typeof(value) == "number") return Std["int"](value); else return null;
};
org_zamedev_particles_util_DynamicTools.asFloat = function(value,def) {
if(def == null) def = 0.0;
if(typeof(value) == "number" || ((value | 0) === value)) return value; else return def;
};
org_zamedev_particles_util_DynamicTools.asNullFloat = function(value) {
if(typeof(value) == "number" || ((value | 0) === value)) return value; else return null;
};
org_zamedev_particles_util_DynamicTools.asBool = function(value,def) {
if(def == null) def = false;
if(typeof(value) == "boolean") return value; else return def;
};
org_zamedev_particles_util_DynamicTools.asString = function(value,def) {
if(def == null) def = "";
if(value == null) return def; else return Std.string(value);
};
var org_zamedev_particles_util_MathHelper = function() { };
$hxClasses["org.zamedev.particles.util.MathHelper"] = org_zamedev_particles_util_MathHelper;
org_zamedev_particles_util_MathHelper.__name__ = ["org","zamedev","particles","util","MathHelper"];
org_zamedev_particles_util_MathHelper.deg2rad = function(deg) {
return deg / 180.0 * Math.PI;
};
org_zamedev_particles_util_MathHelper.rnd1to1 = function() {
return Math.random() * 2.0 - 1.0;
};
org_zamedev_particles_util_MathHelper.clamp = function(value) {
if(value < 0.0) return 0.0; else if(value < 1.0) return value; else return 1.0;
};
var org_zamedev_particles_util_ParticleColor = function(r,g,b,a) {
this.r = r;
this.g = g;
this.b = b;
this.a = a;
};
$hxClasses["org.zamedev.particles.util.ParticleColor"] = org_zamedev_particles_util_ParticleColor;
org_zamedev_particles_util_ParticleColor.__name__ = ["org","zamedev","particles","util","ParticleColor"];
org_zamedev_particles_util_ParticleColor.prototype = {
r: null
,g: null
,b: null
,a: null
,__class__: org_zamedev_particles_util_ParticleColor
};
var org_zamedev_particles_util_ParticleVector = function(x,y) {
this.x = x;
this.y = y;
};
$hxClasses["org.zamedev.particles.util.ParticleVector"] = org_zamedev_particles_util_ParticleVector;
org_zamedev_particles_util_ParticleVector.__name__ = ["org","zamedev","particles","util","ParticleVector"];
org_zamedev_particles_util_ParticleVector.prototype = {
x: null
,y: null
,__class__: org_zamedev_particles_util_ParticleVector
};
var org_zamedev_particles_util_XmlExt = function() { };
$hxClasses["org.zamedev.particles.util.XmlExt"] = org_zamedev_particles_util_XmlExt;
org_zamedev_particles_util_XmlExt.__name__ = ["org","zamedev","particles","util","XmlExt"];
org_zamedev_particles_util_XmlExt.innerText = function(node,def) {
if(def == null) def = "";
var child;
if(node.nodeType != Xml.Document && node.nodeType != Xml.Element) throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + node.nodeType);
child = node.children[0];
if(child != null && (child.nodeType == Xml.PCData || child.nodeType == Xml.CData)) {
if(child.nodeType == Xml.Document || child.nodeType == Xml.Element) throw new js__$Boot_HaxeError("Bad node type, unexpected " + child.nodeType);
return child.nodeValue;
}
return def;
};
var promhx_base_AsyncBase = function(d) {
this._resolved = false;
this._pending = false;
this._errorPending = false;
this._fulfilled = false;
this._update = [];
this._error = [];
this._errored = false;
if(d != null) promhx_base_AsyncBase.link(d,this,function(x) {
return x;
});
};
$hxClasses["promhx.base.AsyncBase"] = promhx_base_AsyncBase;
promhx_base_AsyncBase.__name__ = ["promhx","base","AsyncBase"];
promhx_base_AsyncBase.link = function(current,next,f) {
current._update.push({ async : next, linkf : function(x) {
next.handleResolve(f(x));
}});
promhx_base_AsyncBase.immediateLinkUpdate(current,next,f);
};
promhx_base_AsyncBase.immediateLinkUpdate = function(current,next,f) {
if(current._errored && !current._errorPending && !(current._error.length > 0)) next.handleError(current._errorVal);
if(current._resolved && !current._pending) try {
next.handleResolve(f(current._val));
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
next.handleError(e);
}
};
promhx_base_AsyncBase.linkAll = function(all,next) {
var cthen = function(arr,current,v) {
if(arr.length == 0 || promhx_base_AsyncBase.allFulfilled(arr)) {
var vals;
var _g = [];
var $it0 = $iterator(all)();
while( $it0.hasNext() ) {
var a = $it0.next();
_g.push(a == current?v:a._val);
}
vals = _g;
next.handleResolve(vals);
}
null;
return;
};
var $it1 = $iterator(all)();
while( $it1.hasNext() ) {
var a1 = $it1.next();
a1._update.push({ async : next, linkf : (function(f,a11,a2) {
return function(v1) {
f(a11,a2,v1);
return;
};
})(cthen,(function($this) {
var $r;
var _g1 = [];
var $it2 = $iterator(all)();
while( $it2.hasNext() ) {
var a21 = $it2.next();
if(a21 != a1) _g1.push(a21);
}
$r = _g1;
return $r;
}(this)),a1)});
}
if(promhx_base_AsyncBase.allFulfilled(all)) next.handleResolve((function($this) {
var $r;
var _g2 = [];
var $it3 = $iterator(all)();
while( $it3.hasNext() ) {
var a3 = $it3.next();
_g2.push(a3._val);
}
$r = _g2;
return $r;
}(this)));
};
promhx_base_AsyncBase.pipeLink = function(current,ret,f) {
var linked = false;
var linkf = function(x) {
if(!linked) {
linked = true;
var pipe_ret = f(x);
pipe_ret._update.push({ async : ret, linkf : $bind(ret,ret.handleResolve)});
promhx_base_AsyncBase.immediateLinkUpdate(pipe_ret,ret,function(x1) {
return x1;
});
}
};
current._update.push({ async : ret, linkf : linkf});
if(current._resolved && !current._pending) try {
linkf(current._val);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
ret.handleError(e);
}
};
promhx_base_AsyncBase.allResolved = function($as) {
var $it0 = $iterator($as)();
while( $it0.hasNext() ) {
var a = $it0.next();
if(!a._resolved) return false;
}
return true;
};
promhx_base_AsyncBase.allFulfilled = function($as) {
var $it0 = $iterator($as)();
while( $it0.hasNext() ) {
var a = $it0.next();
if(!a._fulfilled) return false;
}
return true;
};
promhx_base_AsyncBase.prototype = {
_val: null
,_resolved: null
,_fulfilled: null
,_pending: null
,_update: null
,_error: null
,_errored: null
,_errorMap: null
,_errorVal: null
,_errorPending: null
,catchError: function(f) {
this._error.push(f);
return this;
}
,errorThen: function(f) {
this._errorMap = f;
return this;
}
,isResolved: function() {
return this._resolved;
}
,isErrored: function() {
return this._errored;
}
,isErrorHandled: function() {
return this._error.length > 0;
}
,isErrorPending: function() {
return this._errorPending;
}
,isFulfilled: function() {
return this._fulfilled;
}
,isPending: function() {
return this._pending;
}
,handleResolve: function(val) {
this._resolve(val);
}
,_resolve: function(val) {
var _g = this;
if(this._pending) promhx_base_EventLoop.enqueue((function(f,a1) {
return function() {
f(a1);
};
})($bind(this,this._resolve),val)); else {
this._resolved = true;
this._pending = true;
promhx_base_EventLoop.queue.add(function() {
_g._val = val;
var _g1 = 0;
var _g2 = _g._update;
while(_g1 < _g2.length) {
var up = _g2[_g1];
++_g1;
try {
up.linkf(val);
} catch( e ) {
haxe_CallStack.lastException = e;
if (e instanceof js__$Boot_HaxeError) e = e.val;
up.async.handleError(e);
}
}
_g._fulfilled = true;
_g._pending = false;
});
promhx_base_EventLoop.continueOnNextLoop();
}
}
,handleError: function(error) {
this._handleError(error);
}
,_handleError: function(error) {
var _g = this;
var update_errors = function(e) {
if(_g._error.length > 0) {
var _g1 = 0;
var _g2 = _g._error;
while(_g1 < _g2.length) {
var ef = _g2[_g1];
++_g1;
ef(e);
}
} else if(_g._update.length > 0) {
var _g11 = 0;
var _g21 = _g._update;
while(_g11 < _g21.length) {
var up = _g21[_g11];
++_g11;
up.async.handleError(e);
}
} else throw new js__$Boot_HaxeError(e);
_g._errorPending = false;
};
if(!this._errorPending) {
this._errorPending = true;
this._errored = true;
this._errorVal = error;
promhx_base_EventLoop.queue.add(function() {
if(_g._errorMap != null) try {
_g._resolve(_g._errorMap(error));
} catch( e1 ) {
haxe_CallStack.lastException = e1;
if (e1 instanceof js__$Boot_HaxeError) e1 = e1.val;
update_errors(e1);
} else update_errors(error);
});
promhx_base_EventLoop.continueOnNextLoop();
}
}
,then: function(f) {
var ret = new promhx_base_AsyncBase(null);
promhx_base_AsyncBase.link(this,ret,f);
return ret;
}
,unlink: function(to) {
var _g = this;
promhx_base_EventLoop.queue.add(function() {
_g._update = _g._update.filter(function(x) {
return x.async != to;
});
});
promhx_base_EventLoop.continueOnNextLoop();
}
,isLinked: function(to) {
var updated = false;
var _g = 0;
var _g1 = this._update;
while(_g < _g1.length) {
var u = _g1[_g];
++_g;
if(u.async == to) return true;
}
return updated;
}
,__class__: promhx_base_AsyncBase
};
var promhx_Deferred = $hx_exports.promhx.Deferred = function() {
promhx_base_AsyncBase.call(this);
};
$hxClasses["promhx.Deferred"] = promhx_Deferred;
promhx_Deferred.__name__ = ["promhx","Deferred"];
promhx_Deferred.__super__ = promhx_base_AsyncBase;
promhx_Deferred.prototype = $extend(promhx_base_AsyncBase.prototype,{
resolve: function(val) {
this.handleResolve(val);
}
,throwError: function(e) {
this.handleError(e);
}
,promise: function() {
return new promhx_Promise(this);
}
,stream: function() {
return new promhx_Stream(this);
}
,publicStream: function() {
return new promhx_PublicStream(this);
}
,__class__: promhx_Deferred
});
var promhx_Promise = $hx_exports.promhx.Promise = function(d) {
promhx_base_AsyncBase.call(this,d);
this._rejected = false;
};
$hxClasses["promhx.Promise"] = promhx_Promise;
promhx_Promise.__name__ = ["promhx","Promise"];
promhx_Promise.whenAll = function(itb) {
var ret = new promhx_Promise(null);
promhx_base_AsyncBase.linkAll(itb,ret);
return ret;
};
promhx_Promise.promise = function(_val) {
var ret = new promhx_Promise();
ret.handleResolve(_val);
return ret;
};
promhx_Promise.__super__ = promhx_base_AsyncBase;
promhx_Promise.prototype = $extend(promhx_base_AsyncBase.prototype,{
_rejected: null
,isRejected: function() {
return this._rejected;
}
,reject: function(e) {
this._rejected = true;
this.handleError(e);
}
,handleResolve: function(val) {
if(this._resolved) {
var msg = "Promise has already been resolved";
throw new js__$Boot_HaxeError(promhx_error_PromiseError.AlreadyResolved(msg));
}
this._resolve(val);
}
,then: function(f) {
var ret = new promhx_Promise(null);
promhx_base_AsyncBase.link(this,ret,f);
return ret;
}
,unlink: function(to) {
var _g = this;
promhx_base_EventLoop.queue.add(function() {
if(!_g._fulfilled) {
var msg = "Downstream Promise is not fullfilled";
_g.handleError(promhx_error_PromiseError.DownstreamNotFullfilled(msg));
} else _g._update = _g._update.filter(function(x) {
return x.async != to;
});
});
promhx_base_EventLoop.continueOnNextLoop();
}
,handleError: function(error) {
this._rejected = true;
this._handleError(error);
}
,pipe: function(f) {
var ret = new promhx_Promise(null);
promhx_base_AsyncBase.pipeLink(this,ret,f);
return ret;
}
,errorPipe: function(f) {
var ret = new promhx_Promise();
this.catchError(function(e) {
var piped = f(e);
piped.then($bind(ret,ret._resolve));
});
this.then($bind(ret,ret._resolve));
return ret;
}
,__class__: promhx_Promise
});
var promhx_Stream = $hx_exports.promhx.Stream = function(d) {
promhx_base_AsyncBase.call(this,d);
this._end_promise = new promhx_Promise();
};
$hxClasses["promhx.Stream"] = promhx_Stream;
promhx_Stream.__name__ = ["promhx","Stream"];
promhx_Stream.foreach = function(itb) {
var s = new promhx_Stream(null);
var $it0 = $iterator(itb)();
while( $it0.hasNext() ) {
var i = $it0.next();
s.handleResolve(i);
}
s.end();
return s;
};
promhx_Stream.wheneverAll = function(itb) {
var ret = new promhx_Stream(null);
promhx_base_AsyncBase.linkAll(itb,ret);
return ret;
};
promhx_Stream.concatAll = function(itb) {
var ret = new promhx_Stream(null);
var $it0 = $iterator(itb)();
while( $it0.hasNext() ) {
var i = $it0.next();
ret.concat(i);
}
return ret;
};
promhx_Stream.mergeAll = function(itb) {
var ret = new promhx_Stream(null);
var $it0 = $iterator(itb)();
while( $it0.hasNext() ) {
var i = $it0.next();
ret.merge(i);
}
return ret;
};
promhx_Stream.stream = function(_val) {
var ret = new promhx_Stream(null);
ret.handleResolve(_val);
return ret;
};
promhx_Stream.__super__ = promhx_base_AsyncBase;
promhx_Stream.prototype = $extend(promhx_base_AsyncBase.prototype,{
deferred: null
,_pause: null
,_end: null
,_end_promise: null
,then: function(f) {
var ret = new promhx_Stream(null);
promhx_base_AsyncBase.link(this,ret,f);
this._end_promise._update.push({ async : ret._end_promise, linkf : function(x) {
ret.end();
}});
return ret;
}
,detachStream: function(str) {
var filtered = [];
var removed = false;
var _g = 0;
var _g1 = this._update;
while(_g < _g1.length) {
var u = _g1[_g];
++_g;
if(u.async == str) {
this._end_promise._update = this._end_promise._update.filter(function(x) {
return x.async != str._end_promise;
});
removed = true;
} else filtered.push(u);
}
this._update = filtered;
return removed;
}
,first: function() {
var s = new promhx_Promise(null);
this.then(function(x) {
if(!s._resolved) s.handleResolve(x);
});
return s;
}
,handleResolve: function(val) {
if(!this._end && !this._pause) this._resolve(val);
}
,pause: function(set) {
if(set == null) set = !this._pause;
this._pause = set;
}
,pipe: function(f) {
var ret = new promhx_Stream(null);
promhx_base_AsyncBase.pipeLink(this,ret,f);
this._end_promise.then(function(x) {
ret.end();
});
return ret;
}
,errorPipe: function(f) {
var ret = new promhx_Stream(null);
this.catchError(function(e) {
var piped = f(e);
piped.then($bind(ret,ret._resolve));
piped._end_promise.then(($_=ret._end_promise,$bind($_,$_._resolve)));
});
this.then($bind(ret,ret._resolve));
this._end_promise.then(function(x) {
ret.end();
});
return ret;
}
,handleEnd: function() {
if(this._pending) {
promhx_base_EventLoop.queue.add($bind(this,this.handleEnd));
promhx_base_EventLoop.continueOnNextLoop();
} else if(this._end_promise._resolved) return; else {
this._end = true;
var o;
if(this._resolved) o = haxe_ds_Option.Some(this._val); else o = haxe_ds_Option.None;
this._end_promise.handleResolve(o);
this._update = [];
this._error = [];
}
}
,end: function() {
promhx_base_EventLoop.queue.add($bind(this,this.handleEnd));
promhx_base_EventLoop.continueOnNextLoop();
return this;
}
,endThen: function(f) {
return this._end_promise.then(f);
}
,filter: function(f) {
var ret = new promhx_Stream(null);
this._update.push({ async : ret, linkf : function(x) {
if(f(x)) ret.handleResolve(x);
}});
promhx_base_AsyncBase.immediateLinkUpdate(this,ret,function(x1) {
return x1;
});
return ret;
}
,concat: function(s) {
var ret = new promhx_Stream(null);
this._update.push({ async : ret, linkf : $bind(ret,ret.handleResolve)});
promhx_base_AsyncBase.immediateLinkUpdate(this,ret,function(x) {
return x;
});
this._end_promise.then(function(_) {
s.pipe(function(x1) {
ret.handleResolve(x1);
return ret;
});
s._end_promise.then(function(_1) {
ret.end();
});
});
return ret;
}
,merge: function(s) {
var ret = new promhx_Stream(null);
this._update.push({ async : ret, linkf : $bind(ret,ret.handleResolve)});
s._update.push({ async : ret, linkf : $bind(ret,ret.handleResolve)});
promhx_base_AsyncBase.immediateLinkUpdate(this,ret,function(x) {
return x;
});
promhx_base_AsyncBase.immediateLinkUpdate(s,ret,function(x1) {
return x1;
});
return ret;
}
,__class__: promhx_Stream
});
var promhx_PublicStream = $hx_exports.promhx.PublicStream = function(def) {
promhx_Stream.call(this,def);
};
$hxClasses["promhx.PublicStream"] = promhx_PublicStream;
promhx_PublicStream.__name__ = ["promhx","PublicStream"];
promhx_PublicStream.publicstream = function(val) {
var ps = new promhx_PublicStream(null);
ps.handleResolve(val);
return ps;
};
promhx_PublicStream.__super__ = promhx_Stream;
promhx_PublicStream.prototype = $extend(promhx_Stream.prototype,{
resolve: function(val) {
this.handleResolve(val);
}
,throwError: function(e) {
this.handleError(e);
}
,update: function(val) {
this.handleResolve(val);
}
,__class__: promhx_PublicStream
});
var promhx_base_EventLoop = function() { };
$hxClasses["promhx.base.EventLoop"] = promhx_base_EventLoop;
promhx_base_EventLoop.__name__ = ["promhx","base","EventLoop"];
promhx_base_EventLoop.enqueue = function(eqf) {
promhx_base_EventLoop.queue.add(eqf);
promhx_base_EventLoop.continueOnNextLoop();
};
promhx_base_EventLoop.set_nextLoop = function(f) {
if(promhx_base_EventLoop.nextLoop != null) throw new js__$Boot_HaxeError("nextLoop has already been set"); else promhx_base_EventLoop.nextLoop = f;
return promhx_base_EventLoop.nextLoop;
};
promhx_base_EventLoop.queueEmpty = function() {
return promhx_base_EventLoop.queue.isEmpty();
};
promhx_base_EventLoop.finish = function(max_iterations) {
if(max_iterations == null) max_iterations = 1000;
var fn = null;
while(max_iterations-- > 0 && (fn = promhx_base_EventLoop.queue.pop()) != null) fn();
return promhx_base_EventLoop.queue.isEmpty();
};
promhx_base_EventLoop.clear = function() {
promhx_base_EventLoop.queue = new List();
};
promhx_base_EventLoop.f = function() {
var fn = promhx_base_EventLoop.queue.pop();
if(fn != null) fn();
if(!promhx_base_EventLoop.queue.isEmpty()) promhx_base_EventLoop.continueOnNextLoop();
};
promhx_base_EventLoop.continueOnNextLoop = function() {
if(promhx_base_EventLoop.nextLoop != null) promhx_base_EventLoop.nextLoop(promhx_base_EventLoop.f); else (typeof setImmediate === 'function' ? setImmediate : setTimeout)(promhx_base_EventLoop.f);
};
var promhx_deferred_DeferredPromise = function() {
promhx_Deferred.call(this);
this.boundPromise = new promhx_Promise(this);
};
$hxClasses["promhx.deferred.DeferredPromise"] = promhx_deferred_DeferredPromise;
promhx_deferred_DeferredPromise.__name__ = ["promhx","deferred","DeferredPromise"];
promhx_deferred_DeferredPromise.__super__ = promhx_Deferred;
promhx_deferred_DeferredPromise.prototype = $extend(promhx_Deferred.prototype,{
boundPromise: null
,__class__: promhx_deferred_DeferredPromise
});
var promhx_error_PromiseError = $hxClasses["promhx.error.PromiseError"] = { __ename__ : ["promhx","error","PromiseError"], __constructs__ : ["AlreadyResolved","DownstreamNotFullfilled"] };
promhx_error_PromiseError.AlreadyResolved = function(message) { var $x = ["AlreadyResolved",0,message]; $x.__enum__ = promhx_error_PromiseError; $x.toString = $estr; return $x; };
promhx_error_PromiseError.DownstreamNotFullfilled = function(message) { var $x = ["DownstreamNotFullfilled",1,message]; $x.__enum__ = promhx_error_PromiseError; $x.toString = $estr; return $x; };
var protohx_CommonError = function(msg) {
this.msg = msg;
};
$hxClasses["protohx.CommonError"] = protohx_CommonError;
protohx_CommonError.__name__ = ["protohx","CommonError"];
protohx_CommonError.prototype = {
msg: null
,__class__: protohx_CommonError
};
var protohx_Protohx = function() { };
$hxClasses["protohx.Protohx"] = protohx_Protohx;
protohx_Protohx.__name__ = ["protohx","Protohx"];
protohx_Protohx.getLow = function(i) {
return js_Boot.__cast(i.low , Int);
};
protohx_Protohx.getHigh = function(i) {
return js_Boot.__cast(i.high , Int);
};
protohx_Protohx.newInt64 = function(h,l) {
var x = new haxe__$Int64__$_$_$Int64(h,l);
return x;
};
protohx_Protohx.newUInt64 = function(h,l) {
var x = new haxe__$Int64__$_$_$Int64(h,l);
return x;
};
protohx_Protohx.setOutputEndian = function(out) {
out.set_bigEndian(false);
};
protohx_Protohx.setInputEndian = function(out) {
out.set_bigEndian(false);
};
var protohx_ReadUtils = function() { };
$hxClasses["protohx.ReadUtils"] = protohx_ReadUtils;
protohx_ReadUtils.__name__ = ["protohx","ReadUtils"];
protohx_ReadUtils.skip = function(input,wireType) {
switch(wireType) {
case 0:
while(input.buf.readByte() >= 128) {
}
break;
case 1:
input.buf.readInt32();
input.buf.readInt32();
break;
case 2:
var i = protohx_ReadUtils.read__TYPE_UINT32(input);
while(i != 0) {
input.buf.readByte();
i--;
}
break;
case 5:
input.buf.readInt32();
break;
default:
throw new js__$Boot_HaxeError(new protohx_CommonError("Invalid wire type: " + Std.string(_$UInt_UInt_$Impl_$.toFloat(wireType))));
}
};
protohx_ReadUtils.read__TYPE_DOUBLE = function(input) {
return input.buf.readDouble();
};
protohx_ReadUtils.read__TYPE_FLOAT = function(input) {
return haxe_io_FPHelper.i32ToFloat(input.buf.readInt32());
};
protohx_ReadUtils.read__TYPE_INT64 = function(input) {
var low = 0;
var high = 0;
var b = 0;
var i = 0;
while(true) {
b = input.buf.readByte();
if(i == 28) break; else if(b >= 128) low |= (b & 127) << i; else {
low |= b << i;
return protohx_Protohx.newInt64(high,low);
}
i += 7;
}
if(b >= 128) {
b &= 127;
low |= b << i;
high = b >>> 4;
} else {
low |= b << i;
high = b >>> 4;
return protohx_Protohx.newInt64(high,low);
}
i = 3;
while(true) {
b = input.buf.readByte();
if(i < 32) {
if(b >= 128) high |= (b & 127) << i; else {
high |= b << i;
break;
}
}
i += 7;
}
return protohx_Protohx.newInt64(high,low);
};
protohx_ReadUtils.read__TYPE_UINT64 = function(input) {
var tmp = protohx_ReadUtils.read__TYPE_INT64(input);
return protohx_Protohx.newUInt64(js_Boot.__cast(tmp.high , Int),js_Boot.__cast(tmp.low , Int));
};
protohx_ReadUtils.read__TYPE_INT32 = function(input) {
return protohx_ReadUtils.read__TYPE_UINT32(input);
};
protohx_ReadUtils.read__TYPE_FIXED64 = function(input) {
var low = input.buf.readInt32();
var high = input.buf.readInt32();
return protohx_Protohx.newUInt64(high,low);
};
protohx_ReadUtils.read__TYPE_FIXED32 = function(input) {
return js_Boot.__cast(input.buf.readInt32() , Int);
};
protohx_ReadUtils.read__TYPE_BOOL = function(input) {
var a = protohx_ReadUtils.read__TYPE_UINT32(input);
return a != 0;
};
protohx_ReadUtils.read__TYPE_STRING = function(input) {
var length = protohx_ReadUtils.read__TYPE_UINT32(input);
return input.buf.readString(length);
};
protohx_ReadUtils.read__TYPE_BYTES = function(input) {
var result = null;
var length = protohx_ReadUtils.read__TYPE_UINT32(input);
if(_$UInt_UInt_$Impl_$.gt(length,0)) result = input.readBytes(length);
return result;
};
protohx_ReadUtils.read__TYPE_UINT32 = function(input) {
var result = 0;
var i = 0;
while(true) {
var b = input.buf.readByte();
if(_$UInt_UInt_$Impl_$.gt(32,i)) {
if(b >= 128) result |= (b & 127) << i; else {
result |= b << i;
break;
}
} else {
while(input.buf.readByte() >= 128) {
}
break;
}
i = i + 7;
}
return result;
};
protohx_ReadUtils.read__TYPE_ENUM = function(input) {
return protohx_ReadUtils.read__TYPE_INT32(input);
};
protohx_ReadUtils.read__TYPE_SFIXED32 = function(input) {
return input.buf.readInt32();
};
protohx_ReadUtils.read__TYPE_SFIXED64 = function(input) {
var low = input.buf.readInt32();
var high = input.buf.readInt32();
return protohx_Protohx.newInt64(high,low);
};
protohx_ReadUtils.read__TYPE_SINT32 = function(input) {
return protohx_ZigZag.decode32(protohx_ReadUtils.read__TYPE_UINT32(input));
};
protohx_ReadUtils.read__TYPE_SINT64 = function(input) {
var result = protohx_ReadUtils.read__TYPE_INT64(input);
var low;
low = js_Boot.__cast(result.low , Int);
var high;
high = js_Boot.__cast(result.high , Int);
var lowNew = protohx_ZigZag.decode64low(low,high);
var highNew = protohx_ZigZag.decode64high(low,high);
return protohx_Protohx.newInt64(highNew,lowNew);
};
protohx_ReadUtils.read__TYPE_MESSAGE = function(input,message) {
var length = protohx_ReadUtils.read__TYPE_UINT32(input);
if(input.buf.totlen - input.buf.pos < length) throw new js__$Boot_HaxeError(new protohx_CommonError("Invalid message length: " + Std.string(_$UInt_UInt_$Impl_$.toFloat(length))));
var bytesAfterSlice = input.buf.totlen - input.buf.pos - length;
message.readFromSlice(input,bytesAfterSlice);
if(input.buf.totlen - input.buf.pos != bytesAfterSlice) throw new js__$Boot_HaxeError(new protohx_CommonError("Invalid nested message"));
return message;
};
protohx_ReadUtils.readPackedRepeated = function(input,readFuntion,value) {
var length = protohx_ReadUtils.read__TYPE_UINT32(input);
if(input.buf.totlen - input.buf.pos < length) throw new js__$Boot_HaxeError(new protohx_CommonError("Invalid message length: " + Std.string(_$UInt_UInt_$Impl_$.toFloat(length))));
var bytesAfterSlice = input.buf.totlen - input.buf.pos - length;
while(input.buf.totlen - input.buf.pos > bytesAfterSlice) value.push(readFuntion(input));
if(input.buf.totlen - input.buf.pos != bytesAfterSlice) throw new js__$Boot_HaxeError(new protohx_CommonError("Invalid packed repeated data"));
};
var protohx_ReadingBuffer = function(buf) {
this.buf = buf;
this.buf.set_bigEndian(false);
};
$hxClasses["protohx.ReadingBuffer"] = protohx_ReadingBuffer;
protohx_ReadingBuffer.__name__ = ["protohx","ReadingBuffer"];
protohx_ReadingBuffer.fromBytes = function(bytes,pos,len) {
return new protohx_ReadingBuffer(new haxe_io_BytesInput(bytes,pos,len));
};
protohx_ReadingBuffer.prototype = {
length: null
,bytesAvailable: null
,buf: null
,get_length: function() {
return this.buf.totlen;
}
,get_bytesAvailable: function() {
return this.buf.totlen - this.buf.pos;
}
,readBytes: function(len) {
var b = new haxe_io_Bytes(new ArrayBuffer(len));
this.buf.readBytes(b,0,len);
return b;
}
,readUTFBytes: function(len) {
return this.buf.readString(len);
}
,readInt32: function() {
return this.buf.readInt32();
}
,readUnsignedByte: function() {
return this.buf.readByte();
}
,readDouble: function() {
return this.buf.readDouble();
}
,readFloat: function() {
return haxe_io_FPHelper.i32ToFloat(this.buf.readInt32());
}
,__class__: protohx_ReadingBuffer
,__properties__: {get_bytesAvailable:"get_bytesAvailable",get_length:"get_length"}
};
var protohx_WireType = function() { };
$hxClasses["protohx.WireType"] = protohx_WireType;
protohx_WireType.__name__ = ["protohx","WireType"];
var protohx_WriteUtils = function() { };
$hxClasses["protohx.WriteUtils"] = protohx_WriteUtils;
protohx_WriteUtils.__name__ = ["protohx","WriteUtils"];
protohx_WriteUtils.writeSingleUnknown = function(output,tag,value) {
protohx_WriteUtils.write__TYPE_UINT32(output,tag);
var _g = tag & 7;
switch(_g) {
case 0:
protohx_WriteUtils.write__TYPE_UINT64(output,value);
break;
case 1:
protohx_WriteUtils.write__TYPE_FIXED64(output,value);
break;
case 2:
protohx_WriteUtils.write__TYPE_BYTES(output,value);
break;
case 5:
protohx_WriteUtils.write__TYPE_FIXED32(output,value);
break;
default:
throw new js__$Boot_HaxeError(new protohx_CommonError("Invalid wire type: " + Std.string(_$UInt_UInt_$Impl_$.toFloat(tag & 7))));
}
};
protohx_WriteUtils.writeUnknownPair = function(output,tag,value) {
var repeated;
if((value instanceof Array) && value.__enum__ == null) repeated = js_Boot.__cast(value , Array); else repeated = null;
if(repeated != null) {
var _g = 0;
while(_g < repeated.length) {
var element = repeated[_g];
++_g;
protohx_WriteUtils.writeSingleUnknown(output,tag,element);
}
} else protohx_WriteUtils.writeSingleUnknown(output,tag,value);
};
protohx_WriteUtils.writeVarint64 = function(output,low,high) {
if(high == 0) protohx_WriteUtils.write__TYPE_UINT32(output,low); else {
var _g = 0;
while(_g < 4) {
var i = _g++;
output.writeByte(low & 127 | 128);
low >>>= 7;
}
if((high & -8) == 0) output.writeByte(high << 4 | low); else {
output.writeByte((high << 4 | low) & 127 | 128);
protohx_WriteUtils.write__TYPE_UINT32(output,high >>> 3);
}
}
};
protohx_WriteUtils.writeTag = function(output,wireType,number) {
protohx_WriteUtils.write__TYPE_UINT32(output,number << 3 | wireType);
};
protohx_WriteUtils.write__TYPE_DOUBLE = function(output,value) {
output.writeDouble(value);
};
protohx_WriteUtils.write__TYPE_FLOAT = function(output,value) {
output.writeFloat(value);
};
protohx_WriteUtils.write__TYPE_INT64 = function(output,value) {
protohx_WriteUtils.writeVarint64(output,js_Boot.__cast(value.low , Int),js_Boot.__cast(value.high , Int));
};
protohx_WriteUtils.write__TYPE_UINT64 = function(output,value) {
protohx_WriteUtils.writeVarint64(output,js_Boot.__cast(value.low , Int),js_Boot.__cast(value.high , Int));
};
protohx_WriteUtils.write__TYPE_INT32 = function(output,value) {
if(value < 0) protohx_WriteUtils.writeVarint64(output,value,-1); else protohx_WriteUtils.write__TYPE_UINT32(output,value);
};
protohx_WriteUtils.write__TYPE_FIXED64 = function(output,value) {
output.writeInt32(js_Boot.__cast(value.low , Int));
output.writeInt32(js_Boot.__cast(value.high , Int));
};
protohx_WriteUtils.write__TYPE_FIXED32 = function(output,value) {
output.writeInt32(value);
};
protohx_WriteUtils.write__TYPE_BOOL = function(output,value) {
output.writeByte(value?1:0);
};
protohx_WriteUtils.write__TYPE_STRING = function(output,value) {
var i = output.beginBlock();
if(value != null) output.writeUTFBytes(value);
output.endBlock(i);
};
protohx_WriteUtils.write__TYPE_BYTES = function(output,value) {
if(value != null) {
protohx_WriteUtils.write__TYPE_UINT32(output,value.length);
output.writeBytes(value);
} else protohx_WriteUtils.write__TYPE_UINT32(output,0);
};
protohx_WriteUtils.write__TYPE_UINT32 = function(output,value) {
while(true) if((value & -128) == 0) {
output.writeByte(value);
return;
} else {
output.writeByte(value & 127 | 128);
value = value >>> 7;
}
};
protohx_WriteUtils.write__TYPE_ENUM = function(output,value) {
protohx_WriteUtils.write__TYPE_INT32(output,value);
};
protohx_WriteUtils.write__TYPE_SFIXED32 = function(output,value) {
output.writeInt32(value);
};
protohx_WriteUtils.write__TYPE_SFIXED64 = function(output,value) {
output.writeInt32(js_Boot.__cast(value.low , Int));
output.writeInt32(js_Boot.__cast(value.high , Int));
};
protohx_WriteUtils.write__TYPE_SINT32 = function(output,value) {
protohx_WriteUtils.write__TYPE_UINT32(output,protohx_ZigZag.encode32(value));
};
protohx_WriteUtils.write__TYPE_SINT64 = function(output,value) {
protohx_WriteUtils.writeVarint64(output,protohx_ZigZag.encode64low(js_Boot.__cast(value.low , Int),js_Boot.__cast(value.high , Int)),protohx_ZigZag.encode64high(js_Boot.__cast(value.low , Int),js_Boot.__cast(value.high , Int)));
};
protohx_WriteUtils.write__TYPE_MESSAGE = function(output,value) {
var i = output.beginBlock();
value.writeToBuffer(output);
output.endBlock(i);
};
protohx_WriteUtils.writePackedRepeated = function(output,writeFunction,value) {
var i = output.beginBlock();
var _g1 = 0;
var _g = value.length;
while(_g1 < _g) {
var j = _g1++;
writeFunction.apply(null,[output,value[j]]);
}
output.endBlock(i);
};
var protohx_WritingBuffer = function() {
this.slices = [];
this.buf = new haxe_io_BytesOutput();
this.buf.set_bigEndian(false);
this.position = 0;
};
$hxClasses["protohx.WritingBuffer"] = protohx_WritingBuffer;
protohx_WritingBuffer.__name__ = ["protohx","WritingBuffer"];
protohx_WritingBuffer.prototype = {
slices: null
,buf: null
,position: null
,writeDouble: function(v) {
this.buf.writeDouble(v);
this.position += 8;
}
,writeFloat: function(v) {
this.buf.writeInt32(haxe_io_FPHelper.floatToI32(v));
this.position += 4;
}
,writeBytes: function(v) {
this.buf.write(v);
this.position += v.length;
}
,writeUTFBytes: function(v) {
var b = haxe_io_Bytes.ofString(v);
this.buf.write(b);
this.position += b.length;
}
,writeInt32: function(v) {
this.buf.writeInt32(v);
this.position += 4;
}
,writeByte: function(v) {
this.buf.writeByte(v);
this.position += 1;
}
,beginBlock: function() {
this.slices.push(this.position);
var beginSliceIndex = this.slices.length;
this.slices.push(0);
this.slices.push(0);
this.slices.push(this.position);
return beginSliceIndex;
}
,endBlock: function(beginSliceIndex) {
this.slices.push(this.position);
var beginPosition = this.slices[beginSliceIndex + 2];
this.slices[beginSliceIndex] = this.position;
protohx_WriteUtils.write__TYPE_UINT32(this,this.position - beginPosition);
this.slices[beginSliceIndex + 1] = this.position;
this.slices.push(this.position);
}
,toNormal: function(output) {
var i = 0;
var begin = 0;
var bytes = this.buf.getBytes();
while(i < this.slices.length) {
var end = this.slices[i];
++i;
if(_$UInt_UInt_$Impl_$.gt(end,begin)) output.writeFullBytes(bytes,begin,end - begin); else if(_$UInt_UInt_$Impl_$.gt(begin,end)) throw new js__$Boot_HaxeError(new protohx_CommonError(""));
begin = this.slices[i];
++i;
}
output.writeFullBytes(bytes,begin,bytes.length - begin);
}
,__class__: protohx_WritingBuffer
};
var protohx_ZigZag = function() { };
$hxClasses["protohx.ZigZag"] = protohx_ZigZag;
protohx_ZigZag.__name__ = ["protohx","ZigZag"];
protohx_ZigZag.encode32 = function(n) {
return n << 1 ^ n >> 31;
};
protohx_ZigZag.decode32 = function(n) {
return n >>> 1 ^ -(n & 1);
};
protohx_ZigZag.encode64low = function(low,high) {
return low << 1 ^ high >> 31;
};
protohx_ZigZag.encode64high = function(low,high) {
return low >>> 31 ^ high << 1 ^ high >> 31;
};
protohx_ZigZag.decode64low = function(low,high) {
return high << 31 ^ low >>> 1 ^ -(low & 1);
};
protohx_ZigZag.decode64high = function(low,high) {
return high >>> 1 ^ -(low & 1);
};
function $iterator(o) { if( o instanceof Array ) return function() { return HxOverrides.iter(o); }; return typeof(o.iterator) == 'function' ? $bind(o,o.iterator) : o.iterator; }
var $_, $fid = 0;
function $bind(o,m) { if( m == null ) return null; if( m.__id__ == null ) m.__id__ = $fid++; var f; if( o.hx__closures__ == null ) o.hx__closures__ = {}; else f = o.hx__closures__[m.__id__]; if( f == null ) { f = function(){ return f.method.apply(f.scope, arguments); }; f.scope = o; f.method = m; o.hx__closures__[m.__id__] = f; } return f; }
var init = lime__$backend_html5_HTML5Application;
var init = lime_app_Application;
msignal_SlotList.NIL = new msignal_SlotList(null,null);
if(Array.prototype.indexOf) HxOverrides.indexOf = function(a,o,i) {
return Array.prototype.indexOf.call(a,o,i);
};
if(Array.prototype.lastIndexOf) HxOverrides.lastIndexOf = function(a1,o1,i1) {
return Array.prototype.lastIndexOf.call(a1,o1,i1);
};
$hxClasses.Math = Math;
String.prototype.__class__ = $hxClasses.String = String;
String.__name__ = ["String"];
$hxClasses.Array = Array;
Array.__name__ = ["Array"];
Date.prototype.__class__ = $hxClasses.Date = Date;
Date.__name__ = ["Date"];
var Int = $hxClasses.Int = { __name__ : ["Int"]};
var Dynamic = $hxClasses.Dynamic = { __name__ : ["Dynamic"]};
var Float = $hxClasses.Float = Number;
Float.__name__ = ["Float"];
var Bool = $hxClasses.Bool = Boolean;
Bool.__ename__ = ["Bool"];
var Class = $hxClasses.Class = { __name__ : ["Class"]};
var Enum = { };
if(Array.prototype.map == null) Array.prototype.map = function(f) {
var a = [];
var _g1 = 0;
var _g = this.length;
while(_g1 < _g) {
var i = _g1++;
a[i] = f(this[i]);
}
return a;
};
if(Array.prototype.filter == null) Array.prototype.filter = function(f1) {
var a1 = [];
var _g11 = 0;
var _g2 = this.length;
while(_g11 < _g2) {
var i1 = _g11++;
var e = this[i1];
if(f1(e)) a1.push(e);
}
return a1;
};
var __map_reserved = {}
var ArrayBuffer = $global.ArrayBuffer || js_html_compat_ArrayBuffer;
if(ArrayBuffer.prototype.slice == null) ArrayBuffer.prototype.slice = js_html_compat_ArrayBuffer.sliceImpl;
var DataView = $global.DataView || js_html_compat_DataView;
var Uint8Array = $global.Uint8Array || js_html_compat_Uint8Array._new;
var this1;
this1 = new Uint32Array(256);
lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16 = this1;
var _g = 0;
while(_g < 256) {
var i = _g++;
var val = Math.ceil(i * 257.003921568627447);
lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[i] = val;
}
var this2;
this2 = new Uint8Array(510);
lime_math_color__$RGBA_RGBA_$Impl_$.__clamp = this2;
var _g1 = 0;
while(_g1 < 255) {
var i1 = _g1++;
lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[i1] = i1;
}
var _g11 = 255;
var _g2 = 511;
while(_g11 < _g2) {
var i2 = _g11++;
lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[i2] = 255;
}
lime_system_CFFI.available = false;
lime_system_CFFI.enabled = false;
lime_utils_Log.level = 3;
if(typeof console == "undefined") {
console = {}
}
if(console.log == null) console.log = function() {
};
lime_utils_Log.throwErrors = true;
openfl_display_DisplayObject.__broadcastEvents = new haxe_ds_StringMap();
openfl_display_DisplayObject.__instanceCount = 0;
oaktree_core_Engine.MAX_SCHEDULED_TASKS = 2147483647;
oaktree_core_Engine._scheduleCount = 0;
Core.OPEN_DISCONNECT_DELAY = 2000;
Core.CLOSE_DISCONNECT_DELAY = 3000;
Core.SPAWN_MAX_TIME = 5000;
Core.initialized = false;
Core.onReady = new msignal_Signal0();
Core.onProgressRequest = new msignal_Signal1();
Core.hasDoneFindServerWithFriends = false;
Core.progressLabel = "";
Core.firstConnect = true;
Core.waitForMatch = false;
Core.firstPlay = true;
Core.delayStartGame = false;
DateTools.DAYS_OF_MONTH = [31,28,31,30,31,30,31,31,30,31,30,31];
MiniclipAPI.EXPIRE_MARGIN_SECONDS = 60;
Xml.Element = 0;
Xml.PCData = 1;
Xml.CData = 2;
Xml.Comment = 3;
Xml.DocType = 4;
Xml.ProcessingInstruction = 5;
Xml.Document = 6;
openfl_events_Event.ACTIVATE = "activate";
openfl_events_Event.ADDED = "added";
openfl_events_Event.ADDED_TO_STAGE = "addedToStage";
openfl_events_Event.CANCEL = "cancel";
openfl_events_Event.CHANGE = "change";
openfl_events_Event.CLEAR = "clear";
openfl_events_Event.CLOSE = "close";
openfl_events_Event.COMPLETE = "complete";
openfl_events_Event.CONNECT = "connect";
openfl_events_Event.CONTEXT3D_CREATE = "context3DCreate";
openfl_events_Event.COPY = "copy";
openfl_events_Event.CUT = "cut";
openfl_events_Event.DEACTIVATE = "deactivate";
openfl_events_Event.ENTER_FRAME = "enterFrame";
openfl_events_Event.EXIT_FRAME = "exitFrame";
openfl_events_Event.FRAME_CONSTRUCTED = "frameConstructed";
openfl_events_Event.FRAME_LABEL = "frameLabel";
openfl_events_Event.FULLSCREEN = "fullScreen";
openfl_events_Event.ID3 = "id3";
openfl_events_Event.INIT = "init";
openfl_events_Event.MOUSE_LEAVE = "mouseLeave";
openfl_events_Event.OPEN = "open";
openfl_events_Event.PASTE = "paste";
openfl_events_Event.REMOVED = "removed";
openfl_events_Event.REMOVED_FROM_STAGE = "removedFromStage";
openfl_events_Event.RENDER = "render";
openfl_events_Event.RESIZE = "resize";
openfl_events_Event.SCROLL = "scroll";
openfl_events_Event.SELECT = "select";
openfl_events_Event.SELECT_ALL = "selectAll";
openfl_events_Event.SOUND_COMPLETE = "soundComplete";
openfl_events_Event.TAB_CHILDREN_CHANGE = "tabChildrenChange";
openfl_events_Event.TAB_ENABLED_CHANGE = "tabEnabledChange";
openfl_events_Event.TAB_INDEX_CHANGE = "tabIndexChange";
openfl_events_Event.TEXTURE_READY = "textureReady";
openfl_events_Event.UNLOAD = "unload";
agario_AgarioEvents.OPEN_VIEW = "event_open_view";
agario_AgarioEvents.START_GAME = "event_start_game";
agario_AgarioEvents.REGION_CHANGE = "event_region_change";
agario_AgarioEvents.REGIONS_UPDATE = "event_regions_update";
agario_atlas_MainShop.ATLAS = "main_shop";
agario_atlas_MainShop.avatar = "Avatar";
agario_atlas_MainShop.close = "Close";
agario_atlas_MainShop.close_disabled = "Close_disabled";
agario_atlas_MainShop.coins_l = "Coins_L";
agario_atlas_MainShop.coins_m = "Coins_M";
agario_atlas_MainShop.coins_s = "Coins_S";
agario_atlas_MainShop.coins_xl = "Coins_XL";
agario_atlas_MainShop.coins_xs = "Coins_XS";
agario_atlas_MainShop.coins_xxl = "Coins_XXL";
agario_atlas_MainShop.coins_xxs = "Coins_XXS";
agario_atlas_MainShop.coins_xxs_noshadow = "Coins_XXS_noshadow";
agario_atlas_MainShop.exp_star = "Exp_Star";
agario_atlas_MainShop.google_play = "Google_Play";
agario_atlas_MainShop.trophy = "Trophy";
agario_atlas_MainShop.trophy_2 = "Trophy_2";
agario_atlas_MainShop.trophy_3 = "Trophy_3";
agario_atlas_MainShop.trophy_4 = "Trophy_4";
agario_atlas_MainShop.alert_icon = "alert_icon";
agario_atlas_MainShop.appstore = "appstore";
agario_atlas_MainShop.arrow = "arrow";
agario_atlas_MainShop.arrow_right = "arrow_right";
agario_atlas_MainShop.arrow_up_blue = "arrow_up_blue";
agario_atlas_MainShop.arrow_up_green = "arrow_up_green";
agario_atlas_MainShop.back_button = "back_button";
agario_atlas_MainShop.check = "check";
agario_atlas_MainShop.checkbox = "checkbox";
agario_atlas_MainShop.chest_bottom = "chest_bottom";
agario_atlas_MainShop.chest_top = "chest_top";
agario_atlas_MainShop.clock_grey = "clock_grey";
agario_atlas_MainShop.clock_white = "clock_white";
agario_atlas_MainShop.coin_face = "coin_face";
agario_atlas_MainShop.coin_mini_icon = "coin_mini_icon";
agario_atlas_MainShop.coin_pack = "coin_pack";
agario_atlas_MainShop.coins_button = "coins_button";
agario_atlas_MainShop.currency_icon = "currency_icon";
agario_atlas_MainShop.dailyquest_chest = "dailyquest_chest";
agario_atlas_MainShop.dailyquest_chest_icon = "dailyquest_chest_icon";
agario_atlas_MainShop.dailyquest_chestbudle = "dailyquest_chestbudle";
agario_atlas_MainShop.dna_small_icon = "dna_small_icon";
agario_atlas_MainShop.fast_play = "fast_play";
agario_atlas_MainShop.fb_icon = "fb_icon";
agario_atlas_MainShop.flask_alert = "flask_alert";
agario_atlas_MainShop.flaskslot_top_blue = "flaskslot_top_blue";
agario_atlas_MainShop.flaskslot_top_grey = "flaskslot_top_grey";
agario_atlas_MainShop.flaskslot_top_orange = "flaskslot_top_orange";
agario_atlas_MainShop.freecoins_video = "freecoins_video";
agario_atlas_MainShop.fully_upgraded = "fully_upgraded";
agario_atlas_MainShop.giant_coin = "giant_coin";
agario_atlas_MainShop.gift_big_icons = "gift_big_icons";
agario_atlas_MainShop.gift_mini_icon = "gift_mini_icon";
agario_atlas_MainShop.gifting_button = "gifting_button";
agario_atlas_MainShop.gifts_icon = "gifts_icon";
agario_atlas_MainShop.google_icon = "google_icon";
agario_atlas_MainShop.hint = "hint";
agario_atlas_MainShop.hint_button = "hint_button";
agario_atlas_MainShop.icon_reconnect = "icon_reconnect";
agario_atlas_MainShop.locket = "locket";
agario_atlas_MainShop.massboost_2x_shop = "massboost_2x_shop";
agario_atlas_MainShop.massboost_3x_shop = "massboost_3x_shop";
agario_atlas_MainShop.massboost_main = "massboost_main";
agario_atlas_MainShop.multiplier_stamp = "multiplier_stamp";
agario_atlas_MainShop.mysteryflask_icon = "mysteryflask_icon";
agario_atlas_MainShop.not_for_guests = "not_for_guests";
agario_atlas_MainShop.pellets_openflask = "pellets_openflask";
agario_atlas_MainShop.play = "play";
agario_atlas_MainShop.progress_striped = "progress_striped";
agario_atlas_MainShop.progressbar_blue = "progressbar_blue";
agario_atlas_MainShop.progressbar_blue_bg = "progressbar_blue_bg";
agario_atlas_MainShop.progressbar_blue_full = "progressbar_blue_full";
agario_atlas_MainShop.progressbar_green = "progressbar_green";
agario_atlas_MainShop.progressbar_green_full = "progressbar_green_full";
agario_atlas_MainShop.purchase_plus = "purchase_plus";
agario_atlas_MainShop.search_mini_icon = "search_mini_icon";
agario_atlas_MainShop.shop_coins = "shop_coins";
agario_atlas_MainShop.shop_dna = "shop_dna";
agario_atlas_MainShop.shop_flasks = "shop_flasks";
agario_atlas_MainShop.shop_mass = "shop_mass";
agario_atlas_MainShop.shop_skins = "shop_skins";
agario_atlas_MainShop.shop_xp = "shop_xp";
agario_atlas_MainShop.skin_normal = "skin_normal";
agario_atlas_MainShop.skin_special = "skin_special";
agario_atlas_MainShop.skin_special_big = "skin_special_big";
agario_atlas_MainShop.skin_special_big_question_mark = "skin_special_big_question_mark";
agario_atlas_MainShop.special_badge = "special_badge";
agario_atlas_MainShop.sticker = "sticker";
agario_atlas_MainShop.sticker_green = "sticker_green";
agario_atlas_MainShop.survey_icon = "survey_icon";
agario_atlas_MainShop.twitter_icon = "twitter_icon";
agario_atlas_MainShop.xpboost_2x_shop = "xpboost_2x_shop";
agario_atlas_MainShop.xpboost_3x_shop = "xpboost_3x_shop";
agario_atlas_MainShop.xpboost_main = "xpboost_main";
agario_atlas_Menuscommonui.ATLAS = "menusCommonUI";
agario_atlas_Menuscommonui.coins_l = "Coins_L";
agario_atlas_Menuscommonui.coins_m = "Coins_M";
agario_atlas_Menuscommonui.coins_s = "Coins_S";
agario_atlas_Menuscommonui.coins_xl = "Coins_XL";
agario_atlas_Menuscommonui.coins_xs = "Coins_XS";
agario_atlas_Menuscommonui.coins_xxl = "Coins_XXL";
agario_atlas_Menuscommonui.dna_l = "DNA_L";
agario_atlas_Menuscommonui.dna_m = "DNA_M";
agario_atlas_Menuscommonui.dna_s = "DNA_S";
agario_atlas_Menuscommonui.dna_xl = "DNA_XL";
agario_atlas_Menuscommonui.dna_xs = "DNA_XS";
agario_atlas_Menuscommonui.dna_xxl = "DNA_XXL";
agario_atlas_Menuscommonui.back_button = "back_button";
agario_atlas_Menuscommonui.currency_dna = "currency_dna";
agario_atlas_Menuscommonui.currency_icon = "currency_icon";
agario_atlas_Menuscommonui.currency_plusbox = "currency_plusbox";
agario_atlas_Menuscommonui.divider = "divider";
agario_atlas_Menuscommonui.exit_button = "exit_button";
agario_atlas_Menuscommonui.fb_icon = "fb_icon";
agario_atlas_Menuscommonui.freecoins_icon = "freecoins_icon";
agario_atlas_Menuscommonui.g__icon = "g+_icon";
agario_atlas_Menuscommonui.icon_home = "icon_home";
agario_atlas_Menuscommonui.icon_no = "icon_no";
agario_atlas_Menuscommonui.icon_no_white = "icon_no_white";
agario_atlas_Menuscommonui.icon_reconnect = "icon_reconnect";
agario_atlas_Menuscommonui.icon_reconnect_white = "icon_reconnect_white";
agario_atlas_Menuscommonui.icon_yes = "icon_yes";
agario_atlas_Menuscommonui.icon_yes_white = "icon_yes_white";
agario_atlas_Menuscommonui.loading_inside = "loading_inside";
agario_atlas_Menuscommonui.loading_outside = "loading_outside";
agario_atlas_Menuscommonui.logo = "logo";
agario_atlas_Menuscommonui.plus = "plus";
agario_atlas_Menuscommonui.plus_icon = "plus_icon";
agario_atlas_Menuscommonui.plus_icon_big = "plus_icon_big";
agario_atlas_Menuscommonui.profilepic_guest = "profilepic_guest";
agario_atlas_Menuscommonui.progression_empty = "progression_empty";
agario_atlas_Menuscommonui.progression_full = "progression_full";
agario_atlas_Menuscommonui.progression_white = "progression_white";
agario_atlas_Menuscommonui.purchase_plus = "purchase_plus";
agario_atlas_Menuscommonui.scroller = "scroller";
agario_atlas_Menuscommonui.scroller_transparent = "scroller_transparent";
agario_atlas_Menuscommonui.scroller_white = "scroller_white";
agario_atlas_Menuscommonui.spinning_ball = "spinning_ball";
agario_atlas_Menuscommonui.spinning_ball_effect = "spinning_ball_effect";
agario_atlas_Menuscommonui.sticker = "sticker";
agario_atlas_Menuscommonui.stretch_darkblue_frame = "stretch_darkblue_frame";
agario_atlas_Menuscommonui.stretch_g_red_frame = "stretch_g+red_frame";
agario_atlas_Menuscommonui.stretch_green_frame = "stretch_green_frame";
agario_atlas_Menuscommonui.stretch_lightgrey_frame = "stretch_lightgrey_frame";
agario_atlas_Menuscommonui.stretch_orange_frame = "stretch_orange_frame";
agario_atlas_Menuscommonui.stretch_red_frame = "stretch_red_frame";
agario_atlas_Menuscommonui.stretch_trans_green_frame = "stretch_trans_green_frame";
agario_atlas_Menuscommonui.stretch_white_frame = "stretch_white_frame";
agario_atlas_Menuscommonui.stretch_white_green_frame = "stretch_white_green_frame";
agario_atlas_Menuscommonui.stretch_whitegrey_frame = "stretch_whitegrey_frame";
agario_atlas_Menuscommonui.stretch_whitegrey_tab = "stretch_whitegrey_tab";
agario_atlas_Menuscommonui.tapjoy_icon = "tapjoy_icon";
agario_atlas_Menuscommonui.twitter_icon = "twitter_icon";
agario_atlas_Menuscommonui.twitter_login_icon = "twitter_login_icon";
agario_atlas_Menuscommonui.whitegrey_tab = "whitegrey_tab";
agario_atlas_Menusleaguesui.ATLAS = "menusLeaguesUI";
agario_atlas_Menusleaguesui.arrow_down = "arrow-down";
agario_atlas_Menusleaguesui.arrow_up = "arrow-up";
agario_atlas_Menusleaguesui.icon_friends = "icon-friends";
agario_atlas_Menusleaguesui.icon_world = "icon-world";
agario_atlas_Menusleaguesui.leaderboard_myslot = "leaderboard-myslot";
agario_atlas_Menusleaguesui.leaderboard_slot = "leaderboard-slot";
agario_atlas_Menusleaguesui.leagueplace_bronze = "leagueplace-bronze";
agario_atlas_Menusleaguesui.leagueplace_gold = "leagueplace-gold";
agario_atlas_Menusleaguesui.leagueplace_others = "leagueplace-others";
agario_atlas_Menusleaguesui.leagueplace_silver = "leagueplace-silver";
agario_atlas_Menusleaguesui.leagues_icon = "leagues_icon";
agario_atlas_Menusleaguesui.leaguestar_bat = "leaguestar-bat";
agario_atlas_Menusleaguesui.leaguestar_bear = "leaguestar-bear";
agario_atlas_Menusleaguesui.leaguestar_crocodile = "leaguestar-crocodile";
agario_atlas_Menusleaguesui.leaguestar_fly = "leaguestar-fly";
agario_atlas_Menusleaguesui.leaguestar_fox = "leaguestar-fox";
agario_atlas_Menusleaguesui.leaguestar_hunter = "leaguestar-hunter";
agario_atlas_Menusleaguesui.leaguestar_kraken = "leaguestar-kraken";
agario_atlas_Menusleaguesui.leaguestar_mammoth = "leaguestar-mammoth";
agario_atlas_Menusleaguesui.leaguestar_panther = "leaguestar-panther";
agario_atlas_Menusleaguesui.leaguestar_wasp = "leaguestar-wasp";
agario_atlas_Menusleaguesui.list_prizes_icon = "list-prizes-icon";
agario_atlas_Menusleaguesui.mini_facebook_icon = "mini-facebook-icon";
agario_atlas_Menusleaguesui.myleague_myslot = "myleague-myslot";
agario_atlas_Menusleaguesui.profilepic_empty_small = "profilepic-empty-small";
agario_atlas_Menusleaguesui.profilepic_emptygreen_small = "profilepic-emptygreen-small";
agario_atlas_Menusleaguesui.tab_selected_country = "tab-selected-country";
agario_atlas_Menusleaguesui.tab_selected_friends = "tab-selected-friends";
agario_atlas_Menusleaguesui.tab_selected_myleague = "tab-selected-myleague";
agario_atlas_Menusleaguesui.tab_selected_world = "tab-selected-world";
agario_atlas_Menusleaguesui.tab_unselected_country = "tab-unselected-country";
agario_atlas_Menusleaguesui.tab_unselected_friends = "tab-unselected-friends";
agario_atlas_Menusleaguesui.tab_unselected_myleague = "tab-unselected-myleague";
agario_atlas_Menusleaguesui.tab_unselected_world = "tab-unselected-world";
agario_atlas_Menusleaguesui.tabicon_friends = "tabicon-friends";
agario_atlas_Menusleaguesui.tabicon_myleague = "tabicon-myleague";
agario_atlas_Menusleaguesui.tabicon_world = "tabicon-world";
agario_atlas_Menusleaguesui.topbar_country_profilepic = "topbar-country-profilepic";
agario_atlas_Menusleaguesui.topbar_country = "topbar-country";
agario_atlas_Menusleaguesui.topbar_friends_profilepic = "topbar-friends-profilepic";
agario_atlas_Menusleaguesui.topbar_friends = "topbar-friends";
agario_atlas_Menusleaguesui.topbar_myleague_profilepic = "topbar-myleague-profilepic";
agario_atlas_Menusleaguesui.topbar_myleague = "topbar-myleague";
agario_atlas_Menusleaguesui.topbar_world_profilepic = "topbar-world-profilepic";
agario_atlas_Menusleaguesui.topbar_world = "topbar-world";
agario_atlas_Menusleaguesui.trophiescollected_slot_country = "trophiescollected-slot-country";
agario_atlas_Menusleaguesui.trophiescollected_slot_friends = "trophiescollected-slot-friends";
agario_atlas_Menusleaguesui.trophiescollected_slot_myleague = "trophiescollected-slot-myleague";
agario_atlas_Menusleaguesui.trophiescollected_slot_white = "trophiescollected-slot-white";
agario_atlas_Menusleaguesui.trophiescollected_slot_world = "trophiescollected-slot-world";
agario_atlas_Menusmysterypotionsui.ATLAS = "menusMysteryPotionsUI";
agario_atlas_Menusmysterypotionsui.arrow_right = "arrow_right";
agario_atlas_Menusmysterypotionsui.arrow_up_blue = "arrow_up_blue";
agario_atlas_Menusmysterypotionsui.arrow_up_green = "arrow_up_green";
agario_atlas_Menusmysterypotionsui.clock_grey = "clock_grey";
agario_atlas_Menusmysterypotionsui.clock_white = "clock_white";
agario_atlas_Menusmysterypotionsui.flask_alert = "flask_alert";
agario_atlas_Menusmysterypotionsui.flaskslot_top_blue = "flaskslot_top_blue";
agario_atlas_Menusmysterypotionsui.flaskslot_top_grey = "flaskslot_top_grey";
agario_atlas_Menusmysterypotionsui.flaskslot_top_orange = "flaskslot_top_orange";
agario_atlas_Menusmysterypotionsui.fully_upgraded = "fully_upgraded";
agario_atlas_Menusmysterypotionsui.mysteryflask_icon = "mysteryflask_icon";
agario_atlas_Menusmysterypotionsui.mysterypotion_icon = "mysterypotion_icon";
agario_atlas_Menusmysterypotionsui.pellets_openflask = "pellets_openflask";
agario_atlas_Menusmysterypotionsui.potion_common = "potion-common";
agario_atlas_Menusmysterypotionsui.potion_epic = "potion-epic";
agario_atlas_Menusmysterypotionsui.potion_exotic = "potion-exotic";
agario_atlas_Menusmysterypotionsui.potion_legendary = "potion-legendary";
agario_atlas_Menusmysterypotionsui.potion_mystical = "potion-mystical";
agario_atlas_Menusmysterypotionsui.potion_mythical = "potion-mythical";
agario_atlas_Menusmysterypotionsui.potion_rare = "potion-rare";
agario_atlas_Menusmysterypotionsui.potion_superior = "potion-superior";
agario_atlas_Menusmysterypotionsui.progressbar_blue = "progressbar_blue";
agario_atlas_Menusmysterypotionsui.progressbar_blue_bg = "progressbar_blue_bg";
agario_atlas_Menusmysterypotionsui.progressbar_blue_full = "progressbar_blue_full";
agario_atlas_Menusmysterypotionsui.progressbar_green = "progressbar_green";
agario_atlas_Menusmysterypotionsui.progressbar_green_full = "progressbar_green_full";
agario_atlas_Menusmysterypotionsui.progressbar_white = "progressbar_white";
agario_atlas_Menusmysterypotionsui.progressbar_white_long = "progressbar_white_long";
agario_atlas_Menusmysterypotionsui.skin_normal = "skin_normal";
agario_atlas_Menusmysterypotionsui.skin_special = "skin_special";
agario_atlas_Menusmysterypotionsui.skinpiece = "skinpiece";
agario_atlas_Menusmysterypotionsui.special_badge = "special_badge";
agario_atlas_Menusmysterypotionsui.stretch_lime = "stretch_lime";
agario_atlas_Menusshopui.ATLAS = "menusShopUI";
agario_atlas_Menusshopui.mass20_icon = "mass20_icon";
agario_atlas_Menusshopui.mass40_icon = "mass40_icon";
agario_atlas_Menusshopui.massboost_2x_shop = "massboost_2x_shop";
agario_atlas_Menusshopui.massboost_3x_shop = "massboost_3x_shop";
agario_atlas_Menusshopui.xpboost_2x_shop = "xpboost_2x_shop";
agario_atlas_Menusshopui.xpboost_3x_shop = "xpboost_3x_shop";
agario_commands_OpenViewCommand.lookupPackages = ["agario.views","agario.module.shop.view"];
agario_config_Assets.INGAME_ATLAS = [{ id : "main_shop", src : "atlas/main_shop.xml"}];
oaktree_ext_ui_views_GenericDialog.DISABLE_CLOSED = "ShopEvent::DISABLE_CLOSED";
oaktree_ext_ui_views_GenericDialog.CLOSE = "close";
oaktree_ext_ui_views_GenericDialog.allowHighDpi = false;
oaktree_ext_ui_views_GenericDialog.initialHighDpiScale = 0.0;
agario_views_LoginElsewhereDialog.OPEN = "LoginElsewhereDialog::openLoginElsewhereDialog";
agario_config_CommandMap.list = [new oaktree_ext_commands_Command("echo",agario_config_EchoCommand),new oaktree_ext_commands_Command(agario_views_LoginElsewhereDialog.OPEN,agario_commands_OpenLoginElsewhereDialogCommand),new oaktree_ext_commands_Command(agario_AgarioEvents.OPEN_VIEW,agario_commands_OpenViewCommand),new oaktree_ext_commands_Command("debug",agario_commands_DebugCommand)];
agario_config_Configs.NOT_FOUND = "__NOT__FOUND__";
agario_config_Configs.properties = (function($this) {
var $r;
var _g = new haxe_ds_StringMap();
if(__map_reserved.xsolla_endpoint != null) _g.setReserved("xsolla_endpoint","https://payments-dev.agario.miniclippt.com"); else _g.h["xsolla_endpoint"] = "https://payments-dev.agario.miniclippt.com";
if(__map_reserved.root_url != null) _g.setReserved("root_url","https://agar.io/"); else _g.h["root_url"] = "https://agar.io/";
if(__map_reserved.config_url != null) _g.setReserved("config_url","https://agario-configurations-web.s3.amazonaws.com/live"); else _g.h["config_url"] = "https://agario-configurations-web.s3.amazonaws.com/live";
if(__map_reserved.gift_object_id != null) _g.setReserved("gift_object_id","1666759370208394"); else _g.h["gift_object_id"] = "1666759370208394";
if(__map_reserved.load_local_configuration != null) _g.setReserved("load_local_configuration","false"); else _g.h["load_local_configuration"] = "false";
$r = _g;
return $r;
}(this));
agario_config_GameStates.STATE_MAIN_SCREEN = "state_main_screen";
agario_config_GameStates.STATE_SHOP_DIALOG = "state_shop_dialog";
agario_config_GameStates.STATE_SHOP_CURRENCY = "state_shop_currency_dialog";
agario_config_GameStates.STATE_SHOP_SKINS = "state_shop_skins_dialog";
agario_config_GameStates.STATE_SHOP_MASS = "state_shop_mass_dialog";
agario_config_GameStates.STATE_SHOP_BOOST = "state_shop_boost_dialog";
agario_config_GameStates.STATE_XSOLLA_PAYMENT_WINDOW = "state_xsolla_iframe";
agario_config_GameStates.STATE_FB_PAYMENT_WINDOW = "state_fb_iframe";
agario_config_GameStates.STATE_OFFERWALL_WINDOW = "state_offerwall_window";
agario_config_GameStates.STATE_VIDEO_WINDOW = "state_video_window";
agario_config_GameStates.STATE_FREE_COINS_DIALOG = "state_free_coins_dialog";
agario_config_GameStates.STATE_PROFILE_DIALOG = "state_profile_dialog";
agario_config_GameStates.STATE_GUEST_LOGIN_DIALOG = "state_guest_login_dialog";
agario_config_GameStates.STATE_FREE_COINS_COLLECT_DIALOG = "stateFreeCoinsCollect";
agario_config_GameStates.STATE_GDPR_REVOKE_DIALOG = "stateGDPRRevokeDialog";
agario_config_GameStates.PURCHASE_COMPLETE_DIALOG = "purchaseCompleteDialog";
agario_config_GameStates.PURCHASE_COMPLETE_DIALOG_RESPONSE = "purchaseCompleteDialogResponse";
agario_config_GameStates.PURCHASE_COMPLETE_DIALOG_ERROR = "purchaseCompleteDialogResponseError";
agario_config_GameStates.LEVEL_UP_DIALOG = "levelUpDialog";
agario_config_GameStates.CONNECTION_LOST_DIALOG = "connectionLostDialog";
agario_config_GameStates.GIFT_UNAVAILABLE_DIALOG = "giftUnavailableDialog";
agario_config_GameStates.PRODUCT_USE_DIALOG = "productUseDialog";
agario_config_GameStates.USER_BANNED_DIALOG = "userBannedDialog";
agario_config_GameStates.DEBUG_PROMO_VIEW = "debugPromoView";
agario_config_GameStates.PROMO_DIALOG = "promoDialog";
agario_config_GameStates.DEBUG_VIEW = "debugView";
agario_config_GameStates.LOGIN_ELSEWHERE_DIALOG = "loginElsewhereDialog";
agario_config_GameStates.ELECTION_DIALOG = "electionDialog";
agario_config_GameStates.GIFT_CENTER_DIALOG = "giftCenterDialog";
agario_config_GameStates.STATE_FULLSCREEN_AD = "state_fullscreen_ad";
agario_config_GameStates.QUESTS_DIALOG = "quests_dialog";
agario_config_GameStates.POTIONS_DIALOG = "potions_dialog";
agario_config_GameStates.POTIONS_AWARD_DIALOG = "potions_award_dialog";
agario_config_GameStates.POTIONS_FULL_DIALOG = "potions_full_dialog";
agario_config_GameStates.POTIONS_UPGRADE_DIALOG = "potions_upgrade_dialog";
agario_config_GameStates.POTIONS_UPGRADE_COMPLETE_DIALOG = "potions_upgrade_complete_dialog";
agario_config_GameStates.POTIONS_REWARDS_DIALOG = "potions_rewards_dialog";
agario_config_GameStates.STATE_GAME_OVER = "state_game_over";
agario_config_GameStates.DISCONNECTED_DIALOG = "disconnected_dialog";
agario_config_GameStates.PARTY_CODE_IS_MOBILE_DIALOG = "party_code_is_mobile_dialog";
agario_config_GameStates.PREMIUM_POTION_HELP_DIALOG = "premium_potion_help_dialog";
agario_config_GameStates.OUTDATED_CLIENT_DIALOG = "outdated_client_dialog";
agario_config_GameStates.CURRENCY_CONVERSION_DIALOG = "currency_conversion_dialog";
agario_config_GameStates.LEAGUES_DIALOG = "leagues_dialog";
agario_config_GameStates.GAME_RESULTS = "game_results";
agario_config_GameStates.SKIN_EDITOR_DIALOG = "skin_editor_dialog";
agario_config_GameStates.DELETE_SKIN_DIALOG = "delete_skin_dialog";
agario_display_Color.black = 0;
agario_display_Color.lightBlue = 12907007;
agario_display_Color.blue = 5685729;
agario_display_Color.mediumBlue = 240840;
agario_display_Color.darkBlue = 102826;
agario_display_Color.green = 6343424;
agario_display_Color.darkGreen = 5748225;
agario_display_Color.lightGrey = 15790320;
agario_display_Color.grey = 12566463;
agario_display_Color.darkGrey = 5329233;
agario_display_Color.orange = 16744962;
agario_display_Color.darkOrange = 15166464;
agario_display_Color.white = 16777215;
agario_display_Color.red = 15742775;
agario_display_Color.darkRed = 12783377;
agario_display_Color.magenta = 16711935;
agario_display_Color.pink = 16539040;
agario_display_Color.darkPink = 15081576;
agario_display_Color.lightYellow = 16775095;
agario_display_Color.yellow = 16507144;
agario_display_Color.darkYellow = 12285696;
agario_display_Color.cream = 16768658;
agario_display_Color.facebookBlue = 3625371;
agario_display_Color.googleRed = 14699578;
agario_display_Color.twitterBlue = 110829;
openfl_text_TextField.__missingFontWarning = new haxe_ds_StringMap();
openfl_text_TextField.__regexAlign = new EReg("align=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexColor = new EReg("color=(\"#([^\"]+)\"|'#([^']+)')","i");
openfl_text_TextField.__regexBlockIndent = new EReg("blockindent=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexBreakTag = new EReg("
","gi");
openfl_text_TextField.__regexEntities = [new EReg(""","g"),new EReg("'","g"),new EReg("&","g"),new EReg("<","g"),new EReg(">","g")];
openfl_text_TextField.__regexFace = new EReg("face=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexHref = new EReg("href=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexHTMLTag = new EReg("<.*?>","g");
openfl_text_TextField.__regexIndent = new EReg(" indent=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexLeading = new EReg("leading=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexLeftMargin = new EReg("leftmargin=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexRightMargin = new EReg("rightmargin=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexTabStops = new EReg("tabstops=(\"([^\"]+)\"|'([^']+)')","i");
openfl_text_TextField.__regexSize = new EReg("size=(\"([^\"]+)\"|'([^']+)')","i");
oaktree_ext_ui_Label._textGroups = new haxe_ds_StringMap();
agario_display_SpineNode.EVENT_LOAD_COMPLETE = "load_complete";
agario_display_SpineNode.EVENT_ANIMATION_EVENT = "animation_event";
agario_display_SpineNode.EVENT_ANIMATION_COMPLETE = "animation_complete";
agario_display_SpineNode.EVENT_ANIMATION_START = "animation_start";
agario_display_SpineNode.EVENT_ANIMATION_END = "animation_end";
agario_display_SpineNode.count = 0;
agario_models_DataManager.BONUS_WEBINCENTIVE = "webIncentive";
agario_models_DataManager.BONUS_NEWACCOUNTREALM = "newAccountRealmExtra";
agario_models_VersionModel.MAJOR = "3";
agario_models_VersionModel.MINOR = "11";
agario_models_VersionModel.PATCH = "1";
agario_models_VersionModel.BUILD_NUMBER = "0";
agario_models_VersionModel.VERSION = "" + "3" + "." + "11" + "." + "1";
agario_models_VersionModel.SERVER_VERSION = "";
agario_models_VersionModel.SERVERS_VERSION = "";
agario_models_VersionModel.CONFIG_NUMBER = "0";
agario_module_dom_CanvasManager.BOTTOM_AD_SPACE = 90;
agario_module_dom_GameMode.FFA = ":ffa";
agario_module_dom_GameMode.TEAMS = ":teams";
agario_module_dom_GameMode.TEAMRUSH = ":teamrush";
agario_module_dom_GameMode.EXPERIMENTAL = ":experimental";
agario_module_dom_GameMode.PARTY = ":party";
agario_module_dom_GameMode.BATTLE_ROYALE = ":battleroyale";
agario_module_dom_MainUI.HTML_GAMEMODE = "#gamemode";
agario_module_dom_NetworkUI.__meta__ = { fields : { connected : { isVar : null}, connecting : { isVar : null}}};
agario_module_dom_NetworkUI.STATUS_INVALID_CLIENT = "invalid_client";
agario_module_dom_NetworkUI.STATUS_PARTY_FULL = "party_full";
agario_module_dom_NetworkUI.STATUS_PARTY_OK = "ok";
agario_module_dom_NetworkUI.STATUS_PARTY_CODE_ERROR = "code_error";
agario_module_dom_NetworkUI.CONNECTION_DELAY = 1000;
agario_module_dom_NetworkUI.CONNECTION_MAX_ATTEMPTS = 3;
agario_module_dom_NetworkUI.NO_SERVER_FOUND = "0.0.0.0:0";
agario_module_gift_events_GiftEvent.SHOW_GIFT_REQUESTS = "agario.module.gift.events.ViewEvent.open_gift_requests";
agario_module_gift_events_GiftEvent.SHOW_GIFT_INBOX = "agario.module.gift.events.ViewEvent.open_gift_inbox";
agario_module_gift_events_GiftEvent.REQUEST_GIFTS = "agario.module.gift.events.ViewEvent.request_gifts";
agario_module_gift_events_GiftEvent.REQUEST_FRIENDS = "agario.module.gift.events.ViewEvent.request_friends";
agario_module_gift_events_GiftEvent.REQUEST_FRIENDS_TO_SEND = "agario.module.gift.events.ViewEvent.request_friends_to-send";
agario_module_gift_events_GiftEvent.ON_FRIEND_SELECTED = "agario.module.gift.events.ViewEvent.on_friend_selected";
agario_module_gift_events_GiftEvent.ACCEPT_GIFTS = "agario.module.gift.events.ViewEvent.accept_gifts";
agario_module_gift_events_GiftEvent.ACCEPT_GIFTS_REQUEST = "agario.module.gift.events.ViewEvent.accept_gifts_request";
agario_module_gift_events_GiftEvent.SEND_GIFTS = "agario.module.gift.events.ViewEvent.send_gifts";
agario_module_gift_events_GiftEvent.INBOX_ELEMENT_DISPOSED = "agario.module.gift.events.ViewEvent.post_dispose_inbox";
agario_module_gift_events_GiftEvent.FRIEND_ELEMENT_DISPOSED = "agario.module.gift.events.ViewEvent.post_dispose";
agario_module_gift_events_GiftEvent.ANIMATE_SPLASH = "agario.module.gift.events.ViewEvent.animate_splash";
agario_module_gift_events_GiftEvent.ANIMATE_SHOWER = "agario.module.gift.events.ViewEvent.animate_shower";
agario_module_gift_events_GiftEvent.INVITE_FRIENDS = "agario.module.gift.events.ViewEvent.invite_friends";
agario_module_gift_events_GiftEvent.SEND_GIFTS_COMPLETE = "agario.module.gift.events.ViewEvent.send_gifts_complete";
agario_module_gift_model_proxies_FacebookProxy.ACTION_SEND = "send";
agario_module_gift_model_proxies_FacebookProxy.ACTION_ASKFOR = "askfor";
agario_module_gift_model_proxies_FacebookProxy.ACTION_TURN = "turn";
agario_module_gift_model_proxies_FacebookProxy.ACTION_RECOMMEND = "recommend";
agario_module_gift_model_proxies_FacebookProxy.ACTION_INVITE = "invite";
agario_module_gift_views_GiftCenterDialog.OPEN = "GiftCenterDialog::openGiftCenterDialog";
agario_module_gift_views_component_CategoryCounterTab.CIRCLE_RIGHT_OFFSET = 7;
agario_module_gift_views_component_CoinParticle.COIN_WIDTH = 19;
agario_module_gift_views_component_CoinParticle.COIN_HEIGHT = 19;
agario_module_gift_views_component_FriendElement.WIDTH = 200;
agario_module_gift_views_component_FriendElement.HEIGHT = 70;
agario_module_gift_views_component_InboxElement.WIDTH = 350;
agario_module_gift_views_component_InboxElement.HEIGHT = 70;
agario_module_leagues_model_LeaguesModel.CACHE_KEY = "leaderboards";
agario_module_leagues_model_LeaguesModel.LEAGUE_USER = "league";
agario_module_leagues_model_LeaguesModel.LEAGUE_FRIENDS = "friends";
agario_module_leagues_model_LeaguesModel.LEAGUE_COUNTRY = "country";
agario_module_leagues_model_LeaguesModel.LEAGUE_WORLD = "world";
agario_module_leagues_view_LeaguesDialog.TYPE_MAIN = "leagues_main";
agario_module_leagues_view_LeaguesDialog.TYPE_PASS_UPDATE = "leagues_pass_update";
agario_module_leagues_view_LeaguesDialog.TYPE_WINNER = "leagues_winner";
agario_module_leagues_view_LeaguesDialog.TYPE_PROMOTION = "leagues_promotion";
agario_module_potions_events_PotionsEvent.ON_OPEN_DIALOG = "agario.module.potions.events.PotionsEvent.on_open_dialog";
agario_module_potions_events_PotionsEvent.ON_OPEN_UPGRADE_DIALOG = "agario.module.potions.events.PotionsEvent.on_open_upgrade_dialog";
agario_module_potions_events_PotionsEvent.ON_UPDATE_STATE = "agario.module.potions.events.PotionsEvent.on_update_state";
agario_module_potions_events_PotionsEvent.ON_START_BREWING = "agario.module.potions.events.PotionsEvent.on_start_brewing";
agario_module_potions_events_PotionsEvent.ON_GET_MORE = "agario.module.potions.events.PotionsEvent.on_get_more";
agario_module_potions_events_PotionsEvent.ON_OPEN_POTION = "agario.module.potions.events.PotionsEvent.on_open_potion";
agario_module_potions_events_PotionsEvent.ON_OPEN_POTION_NOW = "agario.module.potions.events.PotionsEvent.on_open_potion_now";
agario_module_potions_events_PotionsEvent.ON_UPGRADE_SKIN = "agario.module.potions.events.PotionsEvent.on_upgrade_skin";
agario_module_potions_events_PotionsEvent.ON_CHECK_SKINS = "agario.module.potions.events.PotionsEvent.on_check_skins";
agario_module_potions_events_PotionsEvent.ON_BUY_POTION = "agario.module.potions.events.PotionsEvent.on_buy_potion";
agario_module_potions_events_PotionsEvent.ON_OPEN_SHOP = "agario.module.potions.events.PotionsEvent.on_open_shop";
agario_module_potions_events_PotionsEvent.ON_GET_REWARDS = "agario.module.potions.events.PotionsEvent.on_get_rewards";
agario_module_potions_events_PotionsEvent.ON_UNLOCK_SKINS = "agario.module.potions.events.PotionsEvent.on_unlock_skins";
agario_module_potions_events_PotionsEvent.ON_BUY_BATTLE_POTION = "agario.module.potions.events.PotionsEvent.on_buy_battle_potion";
agario_module_potions_model_PotionsModel.TIMED_EVENT = "potionSkipBrew";
agario_module_potions_view_PotionsDialog.OPEN = "PotionsDialog::OPEN";
agario_module_potions_view_PotionsDialog.VIEW_MAIN = "MAIN";
agario_module_potions_view_PotionsDialog.VIEW_HELP = "HELP";
agario_module_potions_view_PotionsDialogHelp1.EVENT_SHOP = "PotionsDialogHelp.event_shop";
agario_module_quests_events_QuestsEvent.ON_PLAY_QUEST = "agario.module.quests.events.QuestsEvent.on_play_quest";
agario_module_quests_events_QuestsEvent.ON_SHOW_REWARD = "agario.module.quests.events.QuestsEvent.on_show_reward";
agario_module_quests_events_QuestsEvent.ON_COLLECT_REWARD = "agario.module.quests.events.QuestsEvent.on_collect_reward";
agario_module_quests_events_QuestsEvent.ON_PURCHASE_QUEST = "agario.module.quests.events.QuestsEvent.on_purchase_quest";
agario_module_quests_events_QuestsEvent.UPDATE_REQUEST = "agario.module.quests.events.QuestsEvent.update_request";
agario_module_quests_model_QuestsModel.EVENT_ID = "dailyQuest";
oaktree_core_VO.__rtti = "\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t'???'\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t<_parse set=\"method\" line=\"84\">\n\t\n\t\n\t\n\n\t<_parseClass set=\"method\" line=\"104\">\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t<_parseArray params=\"T\" set=\"method\" line=\"141\">\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{rootCall:false}\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{obj:null}\n\t\n\t\n\t\t\n\t\t\n\t\n";
oaktree_core_VO.classCache = new haxe_ds_StringMap();
agario_module_quests_model_vo_VisualQuestVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_quests_model_vo_VisualQuestVO.TYPE_TIME_TOTAL = "time_total";
agario_module_quests_model_vo_VisualQuestVO.TYPE_TOP_POSITION = "top_position";
agario_module_quests_model_vo_VisualQuestVO.TYPE_EAT_CELLS = "normal_cells_eaten";
agario_module_quests_model_vo_VisualQuestVO.TYPE_FINAL_LEVEL = "final_level";
agario_module_quests_view_QuestsViewReward.IMAGE_WIDTH = 150;
agario_module_quests_view_QuestsViewReward.IMAGE_HEIGHT = 150;
agario_module_quests_view_QuestsViewReward.IMAGE_SPACE = 210;
agario_module_shop_components_MysterySkinProgressBar.BAR_LENGTH = 150;
agario_module_shop_components_MysterySkinProgressBar.BAR_HEIGHT = 20;
agario_module_shop_components_MysterySkinProgressBar.SIDES_PADDING = 10;
agario_module_shop_components_MysterySkinProgressBar.BAR_INIT_SIZE = 22;
agario_module_shop_components_PotionElement.WIDTH = 150;
agario_module_shop_components_PotionElement.HEIGHT = 360;
agario_module_shop_components_PromoPaginationController.BUTTON_CLICKED = "PromoPaginationController::BUTTON_CLICKED";
agario_module_shop_components_SkinElement.WIDTH = 150;
agario_module_shop_components_SkinElement.HEIGHT = 360;
agario_module_shop_components_SkinElement.POSITION_Y = 75;
agario_module_shop_components_SlotControl.WIDTH = 150;
agario_module_shop_components_SlotControl.HEIGHT = 360;
agario_module_shop_events_HintTooltipEvent.OPENED = "HintTooltipEvent::OPENED";
agario_module_shop_events_HintTooltipEvent.CLOSED = "HintTooltipEvent::CLOSED";
agario_module_shop_events_ShopEvent.READY = "ShopEvent::Ready";
agario_module_shop_events_ShopEvent.BUY = "ShopEvent::BUY";
agario_module_shop_events_ShopEvent.USE = "ShopEvent::USE";
agario_module_shop_events_ShopEvent.UNEQUIP = "ShopEvent::UNEQUIP";
agario_module_shop_events_ShopEvent.UPDATE = "ShopEvent::UPDATE";
agario_module_shop_events_ShopEvent.DELETE = "ShopEvent::DELETE";
agario_module_shop_events_ShopEvent.DISABLE_SHOP = "ShopEvent::DISABLE_SHOP";
agario_module_shop_events_ShopEvent.ENABLE_SHOP = "ShopEvent::ENABLE_SHOP";
agario_module_shop_events_ShopEvent.SHOP_ENABLED = "ShopEvent::SHOP_ENABLED";
agario_module_shop_events_ShopEvent.CONFIGURATION_LOADED = "ShopEvent::CONFIGURATION_LOADED";
agario_module_shop_events_ShopEvent.CONNECTION_LOST = "ShopEvent::connectionLost";
agario_module_shop_events_ShopEvent.SHOW_GUEST_CONVERSION_POPUP = "ShopEvent::show_guest_conversion";
agario_module_shop_events_ShopEvent.USE_PRODUCT_RESPONSE = "ShopEvent::useProductResponse";
agario_module_shop_events_ShopEvent.SOFT_PURCHASE_COMPLETE = "ShopEvent::softPurchaseComplete";
agario_module_shop_events_ShopEvent.SOFT_PURCHASE_FAILED = "shopevent::soft_purchase_failed";
agario_module_shop_events_ShopEvent.INAPP_PURCHASE_COMPLETE = "ShopEvent::INAPP_PURCHASE_COMPLETE";
agario_module_shop_events_ShopEvent.FREE_COINS_RESPONSE = "ShopEvent::freeCoinsResponse";
agario_module_shop_events_ShopEvent.CHECK_VIDEOS = "ShopEvent::checkVideos";
agario_module_shop_events_ShopEvent.USE_PRODUCT_FAILED = "ShopEvent::useProductFailed";
agario_module_shop_events_ShopEvent.ALLOW_DISABLE_CLOSE = "shop_event::allow_disable_close";
agario_module_shop_events_ShopEvent.NEW_CONFIG_LOADED = "shop_event::newConfigLoaded";
agario_module_shop_events_ShopEvent.CONFIG_COMPLETE = "shop_event::configComplete";
agario_module_shop_events_ShopEvent.SHOW_GIFT_CENTER = "shop_event::showGiftCenter";
agario_module_shop_events_ShopEvent.SHOW_GIFT_UNAVAILABLE = "shop_event::showGiftUnavailable";
agario_module_shop_events_ShopEvent.OPEN_QUESTS_DIALOG = "shop_event::openQuestsDialog";
agario_module_shop_events_ShopEvent.ON_QUEST_PROGRESS_LABEL_UPDATE = "shop_event::on_quest_progress_label_update";
agario_module_shop_events_ShopEvent.UPDATE_CONNECTING_STATUS = "shop_event::update_connecting_status";
agario_module_shop_events_ShopEvent.UPDATE_MYSTERY_NOTIFICATIONS = "shop_event::update_mystery_notifications";
agario_module_shop_events_ShopEvent.SHOW_GDPR_REVOKE_DIALOG = "shop_event::show_gdpr_revoke_dialog";
agario_module_shop_events_WalletEvent.WALLET_UPDATED = "WalletEvent::UPDATED";
agario_module_shop_models_GameUser.__meta__ = { fields : { isLoggingIn : { isVar : null}, avatarUrl : { isVar : null}}};
agario_module_shop_models_GameUser.GUEST_USER_COIN_VALUE = 100;
agario_module_shop_models_GameUser.GUEST_USER_DNA_VALUE = 20;
agario_module_shop_models_ShopModel.__meta__ = { fields : { achievements : { name : ["Achievements"]}, userSettings : { name : ["Default Settings - User"]}, leaguesSettings : { name : ["Default Settings - Leagues"]}, defaultCommunicationSettings : { name : ["Default Settings - Comm."]}, defaultGamePlaySettings : { name : ["Default Settings - Gameplay"]}, defaultGiftingSettings : { name : ["Default Settings - Gifting"]}, defaultPromoSettings : { name : ["Default Settings - Promos"]}, defaultCustomSkinsSettings : { name : ["Default Settings - Custom Skins"]}, mysterySkinsTypes : { name : ["Mystery Skins - Types"]}, leaguesFriendsPrizes : { name : ["Leagues - Friends Prizes"]}, leaguesPrizes : { name : ["Leagues - Prizes"]}, leaguesTiers : { name : ["Leagues - Tiers"]}, potionsTimers : { name : ["Potions - Timers"]}, potionsPurchaseForSlot : { name : ["Potions - Purchase For Slot"]}, shopCoins : { name : ["Shop - Coins"]}, shopDNA : { name : ["Shop - DNA"]}, shopBoostCategories : { name : ["Shop - Boost Categories"]}, shopBoostItems : { name : ["Shop - Boost Items"]}, shopSkins : { name : ["Shop - Skins"]}, shopSkinGroups : { name : ["Shop - Skin Groups"]}, shopPotions : { name : ["Shop - Potions"]}, shopPriceCurrency : { name : ["Prices - Currencies"]}, shopPriceMatrix : { name : ["Prices - Matrix"]}, visualBundles : { name : ["Visual - Bundles"]}, visualHelpSettings : { name : ["Visual - Help Settings"]}, visualProducts : { name : ["Visual - Products"]}, visualQuests : { name : ["Visual - Quests"]}, shopSkinTabs : { name : ["Visual - Shop Skins Tabs"]}, potionHelps : { name : ["Visual - Potion Help"]}, spineAnimations : { name : ["Visual - Prod. Spine Animations"]}, skinEditorColors : { name : ["Visual - Skin Editor Colors"]}, tabsAssociation : { name : ["Visual - Tabs Associations"]}, walletBonusRewards : { name : ["Wallet - Bonuses and Rewards"]}, walletCurrencyConversion : { name : ["Wallet - Currency Conversion"]}, walletInappPurchases : { name : ["Wallet - In-App Purchases"]}, walletSoftPurchases : { name : ["Wallet - Soft Purchases"]}, walletOfferableBundles : { name : ["Wallet - Offerable Bundles"]}, walletProductBundles : { name : ["Wallet - Product Bundles"]}, walletProductBundleConditions : { name : ["Wallet - Product Bundles Cond."]}, walletProducts : { name : ["Wallet - Products"]}, walletTimeVariablePrices : { name : ["Wallet - Time-Variable Prices"]}, externalSocialStories : { name : ["External - Social Stories"]}, gamePlayBoosts : { name : ["Gameplay - Boosts"]}, gamePlaySkins : { name : ["Gameplay - Equippable Skins"]}, freeSkins : { name : ["Gameplay - Free Skins"]}, xpList : { name : ["Gameplay - XP to Level"]}, giftingFakeUser : { name : ["Gifting - Fake User"]}}};
agario_module_shop_models_ShopModel.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Achievements\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Default Settings - User\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Default Settings - Leagues\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Default Settings - Comm.\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Default Settings - Gameplay\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Default Settings - Gifting\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Default Settings - Promos\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Default Settings - Custom Skins\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Mystery Skins - Types\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Leagues - Friends Prizes\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Leagues - Prizes\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Leagues - Tiers\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Potions - Timers\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Potions - Purchase For Slot\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Shop - Coins\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Shop - DNA\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Shop - Boost Categories\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Shop - Boost Items\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Shop - Skins\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Shop - Skin Groups\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Shop - Potions\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Prices - Currencies\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Prices - Matrix\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Bundles\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Help Settings\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Products\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Quests\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Shop Skins Tabs\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Potion Help\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Prod. Spine Animations\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Skin Editor Colors\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Visual - Tabs Associations\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - Bonuses and Rewards\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - Currency Conversion\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - In-App Purchases\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - Soft Purchases\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - Offerable Bundles\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - Product Bundles\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - Product Bundles Cond.\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - Products\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Wallet - Time-Variable Prices\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"External - Social Stories\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Gameplay - Boosts\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Gameplay - Equippable Skins\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Gameplay - Free Skins\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Gameplay - XP to Level\"\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\"Gifting - Fake User\"\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_WalletModel.CURRENCY_COINS = "ACOINS";
agario_module_shop_models_WalletModel.CURRENCY_DNA = "DNA";
agario_module_shop_models_types_BoostType.XP_BOOST = "xp_boost";
agario_module_shop_models_types_BoostType.MASS_BOOST = "mass_boost";
agario_module_shop_models_types_CurrencyType.NONE = "none";
agario_module_shop_models_types_CurrencyType.COIN = "coin";
agario_module_shop_models_types_CurrencyType.DNA = "dna";
agario_module_shop_models_types_ProductType.NONE = "none";
agario_module_shop_models_types_ProductType.CURRENCY = "currency";
agario_module_shop_models_types_ProductType.BOOST = "boost";
agario_module_shop_models_types_ProductType.SKIN = "skin";
agario_module_shop_models_types_ProductType.RUSHMODE = "rush_boost";
agario_module_shop_models_types_ProductType.QUEST = "quest";
agario_module_shop_models_types_ProductType.SKIN_PIECE = "skin_piece";
agario_module_shop_models_types_ProductType.POTION = "potion";
agario_module_shop_models_types_ProductType.POTION_SKIP_BREW_TOKEN = "PotionSkipBrewToken";
agario_module_shop_models_types_ProductType.TROPHY = "trophy";
agario_module_shop_models_types_ShopItemType.INAPP = "INAPP";
agario_module_shop_models_types_ShopItemType.SOFT = "SOFT";
agario_module_shop_models_types_ShopItemType.REWARD = "REWARD";
agario_module_shop_models_types_ShopItemType.WALLET = "WALLET";
agario_module_shop_models_types_ShopItemType.VETERAN = "VETERAN";
agario_module_shop_models_types_ShopItemType.OFFER = "OFFER";
agario_module_shop_models_types_ShopReferenceSheet.NONE = "none";
agario_module_shop_models_types_ShopReferenceSheet.WALLET_SOFT_PURCHASES = "Wallet - Soft Purchases";
agario_module_shop_models_types_ShopReferenceSheet.WALLET_OFFERABLE_BUNDLES = "Wallet - Offerable Bundles";
agario_module_shop_models_types_ShopReferenceSheet.GAMEPLAY_XP_TO_LEVEL = "Gameplay - XP to Level";
agario_module_shop_models_types_VisualBundlesPopupType.COINS = "coins";
agario_module_shop_models_types_VisualBundlesPopupType.GENERIC = "generic";
agario_module_shop_models_types_VisualBundlesPopupType.SKIN = "skin";
agario_module_shop_models_types_VisualBundlesPopupType.PROMO = "promo";
agario_module_shop_models_types_VisualBundlesPopupType.DNA = "dna";
agario_module_shop_models_vo_AchievementVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_BonusRewardVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_ShopItemVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_CurrencyItemVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_ExchangeRateVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_GamePlayBoostVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_GamePlaySettingVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_GamePlaySkinVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_FreeSkinVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\n\t\n";
agario_module_shop_models_vo_ImageSourceVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_LeaguesPrizeVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_LeaguesFriendsPrizeVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_LeaguesTiersVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_MysterySkinTypeVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_PlayerInfoVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_PotionHelpVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_PotionPurchaseSlotVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_PotionTimerVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_PriceCurrencyVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_PriceTierVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_ServerInfoVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_ShopBoostCategoryVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_ShopBoostItemVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_ShopPotionItemVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_ShopSkinGroupVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_ShopSkinItemVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_ShopSkinTabVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_SkinEditorColorVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_SocialStoryVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_SpineAnimationVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_UserInfoVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_UserSettingVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_UserStatsVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_VisualBundleVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_VisualHelpSettingVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_VisualProductVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_VisualTabsAssociationVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletCurrencyConversionVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletPurchaseVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletInappPurchaseVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletItemVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t<_balance>\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_WalletOfferableBundlesVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletProductBundleCondVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletProductBundleVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletProductVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletSoftPurchaseVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_WalletTimeVariablePricesVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_XPItemVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_models_vo_XsollaShopItemsVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n";
agario_module_shop_models_vo_XsollaShopItemVO.__rtti = "\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\n\t\n";
agario_module_shop_renderers_CurrencyShopItem.MULTIPLIER_LABEL_TEXTGROUP = "currency_shop_item_multiplayer_group";
agario_module_shop_screens_ShopMainScreen.COLUMNS = 3;
agario_module_shop_view_PurchaseCompleteDialog.ITEM_WIDTH = 130;
agario_module_shop_view_PurchaseCompleteDialog.ITEM_HEIGHT = 160;
agario_module_shop_view_PurchaseCompleteDialog.SPRITE_SPACING = 24;
agario_module_shop_view_PurchaseCompleteDialog.SOCIAL_STORY_SKIN_PURCHASE = "ss_skinpurchase";
agario_module_shop_view_ShopSkinsView.SKIN_TYPE_MYSTERY = "MYSTERY";
agario_module_shop_view_ShopSkinsView.SKIN_TYPE_VETERAN = "VETERAN";
agario_module_shop_view_ShopSkinsView.SKIN_TYPE_OWNED = "OWNED";
agario_module_shop_view_ShopSkinsView.SKIN_TYPE_VIP = "VIP_WEEKLY";
agario_module_shop_view_ShopSkinsView.SKIN_TYPE_PREMIUM = "PREMIUM";
agario_module_shop_view_ShopSkinsView.TAB_VIP = "VIP";
agario_module_user_view_LevelUpDialog.LEVELS_PER_SKIN_REWARD = 5;
agario_module_user_view_LevelUpDialog.FB_LEVEL_UP_STORY = "ss_levelup";
agario_module_user_view_LevelUpDialog.FB_SKIN_UNLOCK_STORY = "ss_skinunlock";
agario_proto_activate_$reward_$link_$response_Result_$enum.success = 1;
agario_proto_activate_$reward_$link_$response_Result_$enum.reward_link_already_claimed = 2;
agario_proto_activate_$reward_$link_$response_Result_$enum.reward_link_expired = 3;
agario_proto_activate_$reward_$link_$response_Result_$enum.reward_link_not_found = 4;
agario_proto_activate_$reward_$link_$response_Result_$enum.reward_link_generic_error = 5;
agario_proto_brew_$potion_$for_$slot_$response_Result_$enum.success = 1;
agario_proto_brew_$potion_$for_$slot_$response_Result_$enum.potion_not_collected = 2;
agario_proto_brew_$potion_$for_$slot_$response_Result_$enum.potion_being_brewed = 3;
agario_proto_device_Platform_$enum.ios = 1;
agario_proto_device_Platform_$enum.android = 2;
agario_proto_device_Platform_$enum.web_facebook = 3;
agario_proto_device_Platform_$enum.web_miniclip = 4;
agario_proto_device_Platform_$enum.web_agario = 5;
agario_proto_disconnect_Reason_$enum.incompatible_client = 1;
agario_proto_disconnect_Reason_$enum.packet_not_authorized = 2;
agario_proto_disconnect_Reason_$enum.login_elsewhere = 3;
agario_proto_disconnect_Reason_$enum.server_offline = 4;
agario_proto_disconnect_Reason_$enum.user_banned = 5;
agario_proto_disconnect_Reason_$enum.ping_error = 6;
agario_proto_disconnect_Reason_$enum.unknown_game_type = 7;
agario_proto_disconnect_Reason_$enum.too_many_operations = 8;
agario_proto_disconnect_Reason_$enum.unreachable_realm = 9;
agario_proto_disconnect_Reason_$enum.user_deleted = 10;
agario_proto_disconnect_Reason_$enum.not_authorized_by_realm = 11;
agario_proto_disconnect_Reason_$enum.bad_request = 12;
agario_proto_disconnect_Reason_$enum.reset_by_peer = 13;
agario_proto_disconnect_Reason_$enum.invalid_token = 14;
agario_proto_disconnect_Reason_$enum.expired_token = 15;
agario_proto_disconnect_Reason_$enum.state_transfer_error = 16;
agario_proto_envelope_Content_$type_$enum.uncompressed = 1;
agario_proto_envelope_Content_$type_$enum.compressed = 2;
agario_proto_game_$arena_$cell_$state_Cell_$type_$enum.normal_cell = 1;
agario_proto_game_$arena_$cell_$state_Cell_$type_$enum.virus = 2;
agario_proto_game_$arena_$cell_$state_Cell_$type_$enum.food = 3;
agario_proto_game_$arena_$cell_$state_Cell_$type_$enum.push_virus = 4;
agario_proto_game_$arena_$cell_$state_Cell_$type_$enum.spawn_virus = 5;
agario_proto_game_$arena_$event_Reason_$enum.eaten_by_player = 1;
agario_proto_game_$arena_$event_Reason_$enum.eaten_by_virus = 2;
agario_proto_game_$arena_$event_Reason_$enum.killed_by_arena = 3;
agario_proto_game_$arena_$event_Reason_$enum.left_arena = 4;
agario_proto_game_$battle_$royale_$arena_$phase_Phase_$id_$enum.waiting = 1;
agario_proto_game_$battle_$royale_$arena_$phase_Phase_$id_$enum.starting = 2;
agario_proto_game_$battle_$royale_$arena_$phase_Phase_$id_$enum.initial = 3;
agario_proto_game_$battle_$royale_$arena_$phase_Phase_$id_$enum.countdown = 4;
agario_proto_game_$battle_$royale_$arena_$phase_Phase_$id_$enum.shrink = 5;
agario_proto_game_$continue_$update_$request_Type_$enum.do_continue = 1;
agario_proto_game_$continue_$update_$request_Type_$enum.do_cancel = 2;
agario_proto_game_$enter_$response_Result_$enum.success = 1;
agario_proto_game_$enter_$response_Result_$enum.user_party_full = 2;
agario_proto_game_$lobby_$enter_$response_Result_$enum.success = 1;
agario_proto_game_$lobby_$enter_$response_Result_$enum.insufficient_level = 2;
agario_proto_game_$over_$reason_$enum_Enum.disconnected_by_inactivity = 1;
agario_proto_game_$over_$reason_$enum_Enum.left = 2;
agario_proto_game_$over_$reason_$enum_Enum.eaten = 3;
agario_proto_game_$over_$reason_$enum_Enum.game_ended = 4;
agario_proto_game_$over_$reason_$enum_Enum.server_going_offline = 5;
agario_proto_game_$over_$reason_$enum_Enum.arena_is_offline = 6;
agario_proto_game_$type_$enum_Enum.free_for_all = 1;
agario_proto_game_$type_$enum_Enum.rush_mode = 2;
agario_proto_game_$type_$enum_Enum.party = 3;
agario_proto_game_$type_$enum_Enum.experimental = 4;
agario_proto_game_$type_$enum_Enum.teams = 5;
agario_proto_game_$type_$enum_Enum.battle_royale = 6;
agario_proto_inapp_$purchase_$response_Result_$enum.normal_success = 1;
agario_proto_inapp_$purchase_$response_Result_$enum.subscription_purchased = 2;
agario_proto_inapp_$purchase_$response_Result_$enum.subscription_renewed = 3;
agario_proto_inapp_$purchase_$response_Result_$enum.subscription_expired = 4;
agario_proto_inapp_$purchase_$response_Result_$enum.try_again_later = 5;
agario_proto_inapp_$purchase_$response_Result_$enum.invalid_receipt = 6;
agario_proto_inapp_$purchase_$response_Result_$enum.unknown_purchase_id = 7;
agario_proto_league_$request_$type_$enum_Enum.current = 1;
agario_proto_league_$request_$type_$enum_Enum.previous = 2;
agario_proto_league_$type_$enum_Enum.league = 1;
agario_proto_league_$type_$enum_Enum.country = 2;
agario_proto_league_$type_$enum_Enum.world = 3;
agario_proto_league_$type_$enum_Enum.friends = 4;
agario_proto_lobby_$type_$enum_Enum.rush_mode = 1;
agario_proto_lobby_$type_$enum_Enum.battle_royale = 2;
agario_proto_login_$realm_$enum_Enum.guest = 1;
agario_proto_login_$realm_$enum_Enum.facebook = 2;
agario_proto_login_$realm_$enum_Enum.googleplus = 3;
agario_proto_login_$realm_$enum_Enum.googleplay = 4;
agario_proto_login_$response_Current_$game_$state_$enum.not_playing = 1;
agario_proto_login_$response_Current_$game_$state_$enum.playing = 2;
agario_proto_no_$proper_$response_For_$enum.user_leagues_info_request = 1;
agario_proto_no_$proper_$response_For_$enum.user_party_create_request = 2;
agario_proto_no_$proper_$response_For_$enum.user_party_join_request = 3;
agario_proto_offer_$bundle_$response_Result_$enum.success = 1;
agario_proto_offer_$bundle_$response_Result_$enum.offer_not_active = 2;
agario_proto_offer_$bundle_$response_Result_$enum.preconditions_failed = 3;
agario_proto_open_$potion_$for_$product_$response_Result_$enum.success = 1;
agario_proto_open_$potion_$for_$product_$response_Result_$enum.insufficient_funds = 2;
agario_proto_open_$potion_$for_$slot_$response_Result_$enum.success = 1;
agario_proto_open_$potion_$for_$slot_$response_Result_$enum.potion_not_ready = 2;
agario_proto_product_$update_Origin_$enum.xp_level_up = 1;
agario_proto_product_$update_Origin_$enum.soft_purchase = 2;
agario_proto_product_$update_Origin_$enum.inapp_purchase = 3;
agario_proto_product_$update_Origin_$enum.xp_boost_activation = 4;
agario_proto_product_$update_Origin_$enum.mass_boost_activation = 5;
agario_proto_product_$update_Origin_$enum.hourly_bonus = 6;
agario_proto_product_$update_Origin_$enum.reward_platform = 7;
agario_proto_product_$update_Origin_$enum.payment_platform = 8;
agario_proto_product_$update_Origin_$enum.gifting = 9;
agario_proto_product_$update_Origin_$enum.rush_mass_boost_activation = 10;
agario_proto_product_$update_Origin_$enum.quest_activation = 11;
agario_proto_product_$update_Origin_$enum.quest_reward = 12;
agario_proto_product_$update_Origin_$enum.soft_purchase_refund = 13;
agario_proto_product_$update_Origin_$enum.potion_opened = 14;
agario_proto_product_$update_Origin_$enum.potion_obtained = 15;
agario_proto_product_$update_Origin_$enum.bundle_offer = 16;
agario_proto_product_$update_Origin_$enum.league_reward_for_league = 17;
agario_proto_product_$update_Origin_$enum.league_reward_for_country = 18;
agario_proto_product_$update_Origin_$enum.league_reward_for_world = 19;
agario_proto_product_$update_Origin_$enum.league_reward_for_friends = 20;
agario_proto_product_$update_Origin_$enum.facebook_invitation = 21;
agario_proto_product_$update_Origin_$enum.skins_create = 22;
agario_proto_product_$update_Origin_$enum.skins_delete = 23;
agario_proto_product_$update_Origin_$enum.vip_weekly = 24;
agario_proto_product_$update_Origin_$enum.game_continued = 25;
agario_proto_product_$update_Origin_$enum.slots_full_on_battle = 26;
agario_proto_product_$update_Origin_$enum.progressive_video_reward = 27;
agario_proto_product_$update_Origin_$enum.reward_link = 28;
agario_proto_reconnect_Reconnect_$with_$enum.login_request = 1;
agario_proto_reconnect_Reconnect_$with_$enum.connect_request = 2;
agario_proto_req_Type_$enum.login_request = 10;
agario_proto_req_Type_$enum.login_response = 11;
agario_proto_req_Type_$enum.realm_upgrade_request = 12;
agario_proto_req_Type_$enum.realm_upgrade_response = 13;
agario_proto_req_Type_$enum.connect_request = 14;
agario_proto_req_Type_$enum.connect_response = 15;
agario_proto_req_Type_$enum.device_token_update = 16;
agario_proto_req_Type_$enum.disconnect = 20;
agario_proto_req_Type_$enum.reconnect = 21;
agario_proto_req_Type_$enum.no_proper_response = 22;
agario_proto_req_Type_$enum.ping = 30;
agario_proto_req_Type_$enum.pong = 31;
agario_proto_req_Type_$enum.udp_handshake = 32;
agario_proto_req_Type_$enum.configuration_change = 33;
agario_proto_req_Type_$enum.server_going_offline = 34;
agario_proto_req_Type_$enum.game_enter_request = 40;
agario_proto_req_Type_$enum.game_enter_response = 41;
agario_proto_req_Type_$enum.game_joined = 42;
agario_proto_req_Type_$enum.game_leave = 43;
agario_proto_req_Type_$enum.game_lobby_enter_request = 44;
agario_proto_req_Type_$enum.game_lobby_enter_response = 45;
agario_proto_req_Type_$enum.game_lobby_leave = 46;
agario_proto_req_Type_$enum.game_lobby_queue_update = 47;
agario_proto_req_Type_$enum.game_arena_direction_vector = 50;
agario_proto_req_Type_$enum.game_arena_player_split = 51;
agario_proto_req_Type_$enum.game_arena_player_shoot_mass = 52;
agario_proto_req_Type_$enum.game_arena_player_respawn = 53;
agario_proto_req_Type_$enum.game_continue_update_request = 54;
agario_proto_req_Type_$enum.game_continue_update_response = 55;
agario_proto_req_Type_$enum.game_arena_leaderboard = 60;
agario_proto_req_Type_$enum.game_arena_state = 61;
agario_proto_req_Type_$enum.game_over = 62;
agario_proto_req_Type_$enum.game_arena_party_cell_updates = 63;
agario_proto_req_Type_$enum.game_arena_party_leaderboard_entries_updates = 64;
agario_proto_req_Type_$enum.game_arena_event = 65;
agario_proto_req_Type_$enum.game_arena_current_safe_area = 66;
agario_proto_req_Type_$enum.game_continue_info = 67;
agario_proto_req_Type_$enum.game_battle_royale_arena_phase = 68;
agario_proto_req_Type_$enum.game_session_highest_mass = 69;
agario_proto_req_Type_$enum.soft_purchase_request = 70;
agario_proto_req_Type_$enum.soft_purchase_response = 71;
agario_proto_req_Type_$enum.apple_inapp_purchase_request = 72;
agario_proto_req_Type_$enum.google_inapp_purchase_request = 73;
agario_proto_req_Type_$enum.inapp_purchase_response = 74;
agario_proto_req_Type_$enum.wallet_updates = 75;
agario_proto_req_Type_$enum.purchase_wallet_updates = 76;
agario_proto_req_Type_$enum.offer_bundle_request = 77;
agario_proto_req_Type_$enum.offer_bundle_response = 78;
agario_proto_req_Type_$enum.subscription_wallet_updates = 79;
agario_proto_req_Type_$enum.update_user_settings_request = 80;
agario_proto_req_Type_$enum.update_user_settings_response = 81;
agario_proto_req_Type_$enum.user_stats_request = 82;
agario_proto_req_Type_$enum.user_stats_response = 83;
agario_proto_req_Type_$enum.server_to_server_game_over_wrapper = 90;
agario_proto_req_Type_$enum.claim_gifts_request = 100;
agario_proto_req_Type_$enum.claim_gifts_response = 101;
agario_proto_req_Type_$enum.send_gifts = 102;
agario_proto_req_Type_$enum.consume_requests = 103;
agario_proto_req_Type_$enum.request_gifts = 104;
agario_proto_req_Type_$enum.facebook_invitation_reward_updates = 105;
agario_proto_req_Type_$enum.activate_timed_event_request = 110;
agario_proto_req_Type_$enum.activate_timed_event_response = 111;
agario_proto_req_Type_$enum.activate_boost_request = 112;
agario_proto_req_Type_$enum.activate_boost_response = 113;
agario_proto_req_Type_$enum.activate_quest_request = 114;
agario_proto_req_Type_$enum.activate_quest_response = 115;
agario_proto_req_Type_$enum.user_timed_event_updates = 116;
agario_proto_req_Type_$enum.activate_user_rewards_request = 117;
agario_proto_req_Type_$enum.activate_user_rewards_response = 118;
agario_proto_req_Type_$enum.open_potion_for_product_request = 120;
agario_proto_req_Type_$enum.open_potion_for_product_response = 121;
agario_proto_req_Type_$enum.brew_potion_for_slot_request = 122;
agario_proto_req_Type_$enum.brew_potion_for_slot_response = 123;
agario_proto_req_Type_$enum.open_potion_for_slot_request = 124;
agario_proto_req_Type_$enum.open_potion_for_slot_response = 125;
agario_proto_req_Type_$enum.user_leagues_info_request = 130;
agario_proto_req_Type_$enum.user_leagues_info_response = 131;
agario_proto_req_Type_$enum.user_leagues_pass_update = 132;
agario_proto_req_Type_$enum.user_party_create_request = 140;
agario_proto_req_Type_$enum.user_party_create_response = 141;
agario_proto_req_Type_$enum.user_party_join_request = 142;
agario_proto_req_Type_$enum.user_party_join_response = 143;
agario_proto_req_Type_$enum.user_party_leave = 144;
agario_proto_req_Type_$enum.user_party_membership_update = 145;
agario_proto_req_Type_$enum.user_party_facebook_invite = 146;
agario_proto_req_Type_$enum.user_friend_list_update = 147;
agario_proto_req_Type_$enum.user_skins_create_request = 150;
agario_proto_req_Type_$enum.user_skins_create_response = 151;
agario_proto_req_Type_$enum.user_skins_delete = 152;
agario_proto_req_Type_$enum.automation_request_update = 160;
agario_proto_req_Type_$enum.action_counters_update = 170;
agario_proto_req_Type_$enum.user_ab_test_groups_update = 171;
agario_proto_req_Type_$enum.user_rewards_token_request = 180;
agario_proto_req_Type_$enum.user_rewards_token_response = 181;
agario_proto_req_Type_$enum.user_rewards_updates = 182;
agario_proto_req_Type_$enum.activate_reward_link_request = 183;
agario_proto_req_Type_$enum.activate_reward_link_response = 184;
agario_proto_req_Type_$enum.generic_video_ad_reward_token_request = 185;
agario_proto_req_Type_$enum.generic_video_ad_reward_token_response = 186;
agario_proto_rewards_$for_$enum_Enum.progressive_video = 1;
agario_proto_soft_$purchase_$response_Result_$enum.success = 1;
agario_proto_soft_$purchase_$response_Result_$enum.insufficient_funds = 2;
agario_proto_soft_$purchase_$response_Result_$enum.preconditions_failed = 3;
agario_proto_subscription_$type_$enum_Enum.vip_weekly = 1;
agario_proto_upgrade_$realm_$enum_Enum.facebook = 1;
agario_proto_upgrade_$realm_$enum_Enum.googleplus = 2;
agario_proto_upgrade_$realm_$enum_Enum.googleplay = 3;
agario_proto_user_$friend_Status_$enum.online = 1;
agario_proto_user_$friend_Status_$enum.offline = 2;
agario_proto_user_$party_$join_$response_Result_$enum.success = 1;
agario_proto_user_$party_$join_$response_Result_$enum.expired = 2;
agario_proto_user_$party_$join_$response_Result_$enum.invalid = 3;
agario_proto_user_$party_$join_$response_Result_$enum.full = 4;
agario_proto_user_$party_$join_$response_Result_$enum.incompatible = 5;
agario_proto_user_$party_$membership_$update_Update_$type_$enum.joined = 1;
agario_proto_user_$party_$membership_$update_Update_$type_$enum.left = 2;
agario_proto_user_$party_$membership_$update_Update_$type_$enum.invited_you = 3;
agario_proto_user_$potion_Status_$enum.collected = 1;
agario_proto_user_$potion_Status_$enum.brewing = 2;
agario_proto_user_$potion_Status_$enum.ready = 3;
agario_proto_user_$potion_$slot_$enum_Enum.slot_1 = 1;
agario_proto_user_$potion_$slot_$enum_Enum.slot_2 = 2;
agario_proto_user_$potion_$slot_$enum_Enum.slot_3 = 3;
agario_proto_user_$setting_Key_$enum.selected_skin_id = 1;
agario_proto_user_$setting_Key_$enum.stop_on_release = 2;
agario_proto_user_$setting_Key_$enum.direction_on_touch = 3;
agario_proto_user_$setting_Key_$enum.button_positions = 4;
agario_proto_user_$setting_Key_$enum.show_mass = 5;
agario_proto_user_$setting_Key_$enum.show_arrow = 6;
agario_proto_user_$setting_Key_$enum.dark_background = 7;
agario_proto_user_$setting_Key_$enum.show_level = 8;
agario_proto_user_$setting_Key_$enum.localization_language = 9;
agario_proto_user_$setting_Key_$enum.sounds_on_arena = 10;
agario_proto_user_$setting_Key_$enum.sounds_on_menu = 11;
agario_proto_user_$setting_Key_$enum.ingame_quest_progress = 12;
agario_proto_user_$setting_Key_$enum.show_online_status_to_friends = 13;
agario_proto_user_$setting_Type_$enum.is_string = 1;
agario_proto_user_$setting_Type_$enum.is_int32 = 2;
agario_proto_user_$skins_$create_$response_Result_$enum.success = 1;
agario_proto_user_$skins_$create_$response_Result_$enum.insufficient_funds = 2;
agario_proto_user_$skins_$create_$response_Result_$enum.transient_error = 3;
agario_proto_user_$wallet_$item_Type_$enum.currency = 1;
agario_proto_user_$wallet_$item_Type_$enum.boost = 2;
agario_proto_user_$wallet_$item_Type_$enum.skin = 3;
agario_proto_user_$wallet_$item_Type_$enum.quest = 4;
agario_proto_user_$wallet_$item_Type_$enum.rush_boost = 5;
agario_proto_user_$wallet_$item_Type_$enum.potion = 6;
agario_proto_user_$wallet_$item_Type_$enum.trophy = 7;
agario_proto_user_$wallet_$item_Type_$enum.skin_piece = 8;
agario_proto_user_$wallet_$item_Type_$enum.potion_skip_brew_token = 9;
agario_proto_user_$wallet_$item_Type_$enum.skin_create_token = 10;
agario_proto_user_$wallet_$item_Type_$enum.skin_custom = 11;
agario_proto_user_$wallet_$item_Type_$enum.game_continue_token = 12;
agario_proto_user_$wallet_$item_Type_$enum.ignore = 13;
agario_proto_user_$wallet_$item_Type_$enum.progressive_video_reward_token = 14;
agario_security_AuthenticationService.MAX_LOGIN_ATTEMPTS = 4;
agario_services_ConfigTags.GAME_TIME_KEY = "GAME_TIME_KEY";
agario_services_ConfigTags.CONFIG_TAG_PROMO_BUTTON_MIN_CYCLE_DURATION = "promoButtonMinCycleDuration";
agario_services_ConfigTags.CONFIG_TAG_CROSS_PROMO_BADGE_MIN_CYCLE_DURATION = "crossPromoBadgeMinCycleDuration";
agario_services_ConfigTags.CONFIG_TAG_PROMO_POPUP_COOLDOWN_PERIOD = "promoPopupCooldownPeriod";
agario_services_ConfigTags.CONFIG_TAG_PROMO_STARTER_PACK_TIME = "promoStarterPackTime";
agario_services_ConfigTags.CONFIG_TAG_DYNAMIC_PURCHASE_COMPLETE_THRESHOLD = "dynamicPurchaseCompleteThreshold";
agario_services_ConfigurationService.configID = "-";
agario_services_PaymentEvent.GOT_CURRENCY_CODE = "payment_event::got_currency_code";
agario_services_promo_AgarioPromotionDataAccessProtocol.WEB_DEFAULT = "web";
agario_services_promo_AgarioPromotionDataAccessProtocol.LOGIN_FACEBOOK = "USER_LOGGED_IN_FACEBOOK";
agario_services_promo_AgarioPromotionDataAccessProtocol.LOGIN_MINICLIP = "USER_LOGGED_IN_MINICLIP";
agario_services_promo_AgarioPromotionDataAccessProtocol.LOGIN_GOOGLE = "USER_LOGGED_IN_GOOGLEPLAY";
agario_services_promo_AgarioPromotionDataAccessProtocol.IS_PAYING_USER = "PROMO_IS_PAYING_USER";
agario_services_promo_AgarioPromotionDataAccessProtocol.IS_NONPAYING_USER = "PROMO_IS_NONPAYING_USER";
agario_services_promo_PromoDataActionTags.PROMO_PARAM_SKIN_SHOP_TAB_NAME = "promoParamSkinShopTabName";
agario_services_promo_PromoDataActionTags.PROMO_PARAM_USER_ID = "promoParamUserId";
agario_services_promo_PromoService.SYSTEM_ID_PROMOTIONS = "promotionSystem";
agario_services_promo_PromoService.SYSTEM_ID_FEATURES = "featuresSystem";
agario_services_promo_PromoService.BASE_URL = "../../../assets/configuration";
agario_services_promo_PromoService.RESOURCE_URL = agario_services_promo_PromoService.BASE_URL + "/{config_id}/{resource_name}";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_STARTER_PACK = "STARTER_PACK";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_FINISHED_MATCH_GENERIC = "PROMO_FINISHED_MATCH";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_FINISHED_MATCH_POS = "PROMO_FINISHED_MATCH_LEADERBOARD_POS_%@";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_ACTIVATE_BOOST_GENERIC = "PROMO_ACTIVATE_BOOST";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_ACTIVATE_BOOST_SPECIFIC = "PROMO_ACTIVATE_BOOST_%@";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_SOFT_PURCHASE_GENERIC = "PROMO_SOFT_PURCHASE";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_SOFT_PURCHASE_SPECIFIC = "PROMO_SOFT_PURCHASE_%@";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_IN_APP_GENERIC = "PROMO_IN_APP";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_IN_APP_SPECIFIC = "PROMO_IN_APP_%@";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_LEVEL_UP_GENERIC = "PROMO_LEVEL_UP";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_LEVEL_UP_SPECIFIC = "PROMO_LEVEL_UP_%@";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_SESSION_STARTED = "PROMO_SESSION_STARTED";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_NEW_SESSION_OR_CONFIG_RELOAD = "PROMO_NEW_SESSION_OR_CONFIG_RELOAD";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_IS_PAYING_USER = "PROMO_IS_PAYING_USER";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_IS_NONPAYING_USER = "PROMO_IS_NONPAYING_USER";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_USER_LOGGED_IN_NONE = "PROMO_USER_LOGGED_IN_NONE";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_USER_LOGGED_IN_GUEST = "PROMO_USER_LOGGED_IN_GUEST";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_USER_LOGGED_IN_FACEBOOK = "PROMO_USER_LOGGED_IN_FACEBOOK";
agario_services_promo_PromoSystemEvents.EVENT_PROMO_USER_LOGGED_IN_GOOGLE = "PROMO_USER_LOGGED_IN_GOOGLE";
agario_sounds_GameSounds.sfxPurchase = "AGAR.IO_sfx_MENU_purchase.mp3";
agario_sounds_GameSounds.sfxClick = "AGAR.IO_sfx_MENU_click.mp3";
agario_sounds_GameSounds.sfxCoinShower = "AGAR.IO_sfx_MENU_coinShower.mp3";
agario_sounds_GameSounds.sfxPromo = "AGAR.IO_sfx_MENU_promo.mp3";
agario_sounds_GameSounds.sfxSplitBecauseVirus = "AGAR.IO_sfx_INGAME_splitBecauseVirus.mp3";
agario_sounds_GameSounds.sfxEatCell = "AGAR.IO_sfx_INGAME_eatCell.mp3";
agario_sounds_GameSounds.sfxGameOver = "AGAR.IO_sfx_INGAME_gameOver.mp3";
agario_sounds_GameSounds.sfxSplit = "AGAR.IO_sfx_INGAME_split.mp3";
agario_sounds_GameSounds.sfxShoot = "AGAR.IO_sfx_INGAME_shoot.mp3";
agario_sounds_GameSounds.sfxCoinsToWallet = "AGAR.IO_sfx_MENU_coinsFlyingToWallet.mp3";
agario_sounds_GameSounds.sfxSendRequestGifts = "AGAR.IO_sfx_MENU_sendRequestGifts.mp3";
agario_sounds_GameSounds.sfxCoinsWaterfall = "AGAR.IO_sfx_MENU_coinsWaterfall.mp3";
agario_sounds_GameSounds.sfxRushModeTimeUp = "AGAR.IO_sfx_INGAME_rushMode_timeUp.mp3";
agario_sounds_GameSounds.sfxRushModeResultsScreen = "AGAR.IO_sfx_INGAME_rushMode_resultsScreen.mp3";
agario_sounds_GameSounds.sfxQuestComplete = "AGAR.IO_sfx_MENU_questComplete.mp3";
agario_sounds_GameSounds.sfxQuestCompleteChestImpact = "AGAR.IO_sfx_MENU_questCompleteChestImpact.mp3";
agario_sounds_GameSounds.sfxQuestCompleteChestOpen = "AGAR.IO_sfx_MENU_questCompleteChestOpen.mp3";
agario_sounds_GameSounds.sfxQuestCompleteQuestShake = "AGAR.IO_sfx_MENU_questCompleteChestShake.mp3";
agario_sounds_GameSounds.sfxRewardPopup = "AGAR.IO_sfx_MENU_rewardPopup.mp3";
agario_sounds_GameSounds.sfxEatOwnCell = "AGAR.IO_sfx_INGAME_eatOwnCell.mp3";
agario_sounds_GameSounds.sfxRushModeLoopLastSeconds = "AGAR.IO_sfx_INGAME_rushMode_loopLastSeconds.mp3";
agario_sounds_GameSounds.sfxGenericPopup = "AGAR.IO_sfx_MENU_genericPopup.mp3";
agario_sounds_GameSounds.sfxMenuVeteranSkin = "AGAR.IO_sfx_MENU_veteranSkinGet.mp3";
agario_sounds_GameSounds.sfxMenuLevelUpPellet = "AGAR.IO_sfx_MENU_yellowPelletGet.mp3";
agario_sounds_GameSounds.sfxMenuLevelUpStar = "AGAR.IO_sfx_MENU_levelUpStarGet.mp3";
agario_sounds_GameSounds.sfxRushActivateBoost = "AGAR.IO_sfx_MENU_rushMode_activateBoost.mp3";
agario_sounds_GameSounds.sfxCompleteQuestIngame = "AGAR.IO_sfx_INGAME_completeQuest.mp3";
agario_sounds_GameSounds.sfxStartRush = "AGAR.IO_sfx_MENU_rushMode_pingEnterArena.mp3";
agario_sounds_GameSounds.sfxWinningAPotion = "AGAR.IO_sfx_MENU_potions_youWonAPotion.mp3";
agario_sounds_GameSounds.sfxOpenPotion = "AGAR.IO_sfx_MENU_potions_open.mp3";
agario_sounds_GameSounds.sfxPotionsHop = "AGAR.IO_sfx_MENU_potions_potionHop.mp3";
agario_sounds_GameSounds.sfxPotionsSpurtNoCork = "AGAR.IO_sfx_MENU_potions_potionSpurtNoCork.mp3";
agario_sounds_GameSounds.sfxPotionsSpurtCork = "AGAR.IO_sfx_MENU_potions_potionSpurtWithCork.mp3";
agario_sounds_GameSounds.sfxPotionsGetBoostXP = "AGAR.IO_sfx_MENU_potions_getBoostXP.mp3";
agario_sounds_GameSounds.sfxPotionsGetBoostMass = "AGAR.IO_sfx_MENU_potions_getBoostMass.mp3";
agario_sounds_GameSounds.sfxPotionsGetCoins = "AGAR.IO_sfx_MENU_potions_getCoins.mp3";
agario_sounds_GameSounds.sfxPotionsGetCommonSkinPiece = "AGAR.IO_sfx_MENU_potions_getCommonSkinPiece.mp3";
agario_sounds_GameSounds.sfxPotionsGetTrophies = "AGAR.IO_sfx_MENU_potions_getTrophies.mp3";
agario_sounds_GameSounds.sfxPotionsGetSpecialSkinPiece = "AGAR.IO_sfx_MENU_potions_getSpecialSkinPiece.mp3";
agario_sounds_GameSounds.sfxPotionsGetTotal = "AGAR.IO_sfx_MENU_potions_getTotal.mp3";
agario_sounds_GameSounds.sfxPotionsHelpSkinGlow = "AGAR.IO_sfx_MENU_potions_helpSkinShimmer.mp3";
agario_sounds_GameSounds.sfxPotionsHelpWave = "AGAR.IO_sfx_MENU_potions_helpSkinUnlock.mp3";
agario_sounds_GameSounds.sfxPotionsRewardFadeOut = "AGAR.IO_sfx_MENU_potions_prizeFadeOut.mp3";
agario_sounds_GameSounds.sfxPotionsStartBrewing = "AGAR.IO_sfx_MENU_potions_startBrewing.mp3";
agario_sounds_GameSounds.sfxPotionsUnlockSkin = "AGAR.IO_sfx_MENU_potions_unlockSkin.mp3";
agario_sounds_GameSounds.sfxLeaguesUserPassed = "AGAR.IO_sfx_MENU_leagues_passFriend.mp3";
agario_sounds_GameSounds.sfxLeaguesPopupsIn = "AGAR.IO_sfx_MENU_leagues_popUpsIn.mp3";
agario_sounds_GameSounds.sfxLeaguesResultsPosition = "AGAR.IO_sfx_MENU_leagues_resultsPopUpPosition.mp3";
agario_sounds_GameSounds.sfxLeaguesResultsPrize = "AGAR.IO_sfx_MENU_leagues_resultsPopUpPrize.mp3";
agario_views_DisconnectedDialog.OPEN = "DisconnectedDialog::openDisconnectedDialog";
agario_views_DisconnectedDialog.RETRY = "DisconnectedDialog::retryCoonection";
agario_views_PartyCodeIsMobileDialog.APPSTORE_URL = "https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp";
agario_views_PartyCodeIsMobileDialog.PLAYSTORE_URL = "https://play.google.com/store/apps/details?id=com.miniclip.agar.io";
agario_views_PremiumPotionHelpDialog.PADDING = 30;
agario_views_PremiumPotionHelpDialog.ITEM_WIDTH = 150;
agario_views_PremiumPotionHelpDialog.ITEM_HEIGHT = 60;
agario_views_PremiumPotionHelpDialog.ITEM_ICON_PADDING = 10;
agario_views_ShopDialog.SHOP_MAIN = "shopMain";
agario_views_ShopDialog.SHOP_CURRENCY = "shopCurrency";
agario_views_ShopDialog.SHOP_DNA = "shopDNA";
agario_views_ShopDialog.SHOP_SKINS = "shopSkins";
agario_views_ShopDialog.SHOP_MASS = "shopMass";
agario_views_ShopDialog.SHOP_BOOST = "shopBoost";
agario_views_ShopDialog.SHOP_POTIONS = "shopPotions";
agario_views_ShopDialog.discardNextClose = false;
agario_views_controls_ShopHUD.UPDATE = "shop_hud::update";
agario_views_promoclient_PromoClientUtils.IPAD_CONVERSION_RATIO = 0.732421875;
agario_views_promoclient_PromoClientUtils.BASE_PACK_RATIO = 1.6;
agario_views_promoclient_PromotionDialog.MAX_WIDTH = 596;
agario_views_promoclient_PromotionDialog.MAX_HEIGHT = 396;
assets_manager_SoundManager.cachedSounds = new haxe_ds_StringMap();
assets_manager_loaders_LoaderManager.EVT_FILE_LOAD_COMPLETE = "evtFileLoadComplete";
gamepad_HTML5GamepadManager.epsilon = 0.00002;
haxe_Serializer.USE_CACHE = false;
haxe_Serializer.USE_ENUM_INDEX = false;
haxe_Serializer.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
haxe_Unserializer.DEFAULT_RESOLVER = Type;
haxe_Unserializer.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
haxe_crypto_Base64.CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
haxe_crypto_Base64.BYTES = haxe_io_Bytes.ofString(haxe_crypto_Base64.CHARS);
haxe_ds_ObjectMap.count = 0;
haxe_io_FPHelper.i64tmp = (function($this) {
var $r;
var x = new haxe__$Int64__$_$_$Int64(0,0);
$r = x;
return $r;
}(this));
haxe_io_FPHelper.LN2 = 0.6931471805599453;
haxe_xml_Parser.escapes = (function($this) {
var $r;
var h = new haxe_ds_StringMap();
if(__map_reserved.lt != null) h.setReserved("lt","<"); else h.h["lt"] = "<";
if(__map_reserved.gt != null) h.setReserved("gt",">"); else h.h["gt"] = ">";
if(__map_reserved.amp != null) h.setReserved("amp","&"); else h.h["amp"] = "&";
if(__map_reserved.quot != null) h.setReserved("quot","\""); else h.h["quot"] = "\"";
if(__map_reserved.apos != null) h.setReserved("apos","'"); else h.h["apos"] = "'";
$r = h;
return $r;
}(this));
haxe_zip_InflateImpl.LEN_EXTRA_BITS_TBL = [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,-1,-1];
haxe_zip_InflateImpl.LEN_BASE_VAL_TBL = [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258];
haxe_zip_InflateImpl.DIST_EXTRA_BITS_TBL = [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,-1,-1];
haxe_zip_InflateImpl.DIST_BASE_VAL_TBL = [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];
haxe_zip_InflateImpl.CODE_LENGTHS_POS = [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
js_Boot.__toStr = {}.toString;
js_html_compat_Uint8Array.BYTES_PER_ELEMENT = 1;
lime__$backend_html5_HTML5HTTPRequest.activeRequests = 0;
lime__$backend_html5_HTML5HTTPRequest.requestLimit = 4;
lime__$backend_html5_HTML5HTTPRequest.requestQueue = new List();
lime__$backend_html5_HTML5Window.dummyCharacter = "";
lime__$backend_html5_HTML5Window.windowID = 0;
lime_graphics_Image.__base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.FT_LOAD_FORCE_AUTOHINT = 32;
lime_graphics_opengl_GL.DEPTH_BUFFER_BIT = 256;
lime_graphics_opengl_GL.STENCIL_BUFFER_BIT = 1024;
lime_graphics_opengl_GL.COLOR_BUFFER_BIT = 16384;
lime_graphics_opengl_GL.POINTS = 0;
lime_graphics_opengl_GL.LINES = 1;
lime_graphics_opengl_GL.LINE_LOOP = 2;
lime_graphics_opengl_GL.LINE_STRIP = 3;
lime_graphics_opengl_GL.TRIANGLES = 4;
lime_graphics_opengl_GL.TRIANGLE_STRIP = 5;
lime_graphics_opengl_GL.TRIANGLE_FAN = 6;
lime_graphics_opengl_GL.ZERO = 0;
lime_graphics_opengl_GL.ONE = 1;
lime_graphics_opengl_GL.SRC_COLOR = 768;
lime_graphics_opengl_GL.ONE_MINUS_SRC_COLOR = 769;
lime_graphics_opengl_GL.SRC_ALPHA = 770;
lime_graphics_opengl_GL.ONE_MINUS_SRC_ALPHA = 771;
lime_graphics_opengl_GL.DST_ALPHA = 772;
lime_graphics_opengl_GL.ONE_MINUS_DST_ALPHA = 773;
lime_graphics_opengl_GL.DST_COLOR = 774;
lime_graphics_opengl_GL.ONE_MINUS_DST_COLOR = 775;
lime_graphics_opengl_GL.SRC_ALPHA_SATURATE = 776;
lime_graphics_opengl_GL.FUNC_ADD = 32774;
lime_graphics_opengl_GL.BLEND_EQUATION = 32777;
lime_graphics_opengl_GL.BLEND_EQUATION_RGB = 32777;
lime_graphics_opengl_GL.BLEND_EQUATION_ALPHA = 34877;
lime_graphics_opengl_GL.FUNC_SUBTRACT = 32778;
lime_graphics_opengl_GL.FUNC_REVERSE_SUBTRACT = 32779;
lime_graphics_opengl_GL.BLEND_DST_RGB = 32968;
lime_graphics_opengl_GL.BLEND_SRC_RGB = 32969;
lime_graphics_opengl_GL.BLEND_DST_ALPHA = 32970;
lime_graphics_opengl_GL.BLEND_SRC_ALPHA = 32971;
lime_graphics_opengl_GL.CONSTANT_COLOR = 32769;
lime_graphics_opengl_GL.ONE_MINUS_CONSTANT_COLOR = 32770;
lime_graphics_opengl_GL.CONSTANT_ALPHA = 32771;
lime_graphics_opengl_GL.ONE_MINUS_CONSTANT_ALPHA = 32772;
lime_graphics_opengl_GL.BLEND_COLOR = 32773;
lime_graphics_opengl_GL.ARRAY_BUFFER = 34962;
lime_graphics_opengl_GL.ELEMENT_ARRAY_BUFFER = 34963;
lime_graphics_opengl_GL.ARRAY_BUFFER_BINDING = 34964;
lime_graphics_opengl_GL.ELEMENT_ARRAY_BUFFER_BINDING = 34965;
lime_graphics_opengl_GL.STREAM_DRAW = 35040;
lime_graphics_opengl_GL.STATIC_DRAW = 35044;
lime_graphics_opengl_GL.DYNAMIC_DRAW = 35048;
lime_graphics_opengl_GL.BUFFER_SIZE = 34660;
lime_graphics_opengl_GL.BUFFER_USAGE = 34661;
lime_graphics_opengl_GL.CURRENT_VERTEX_ATTRIB = 34342;
lime_graphics_opengl_GL.FRONT = 1028;
lime_graphics_opengl_GL.BACK = 1029;
lime_graphics_opengl_GL.FRONT_AND_BACK = 1032;
lime_graphics_opengl_GL.CULL_FACE = 2884;
lime_graphics_opengl_GL.BLEND = 3042;
lime_graphics_opengl_GL.DITHER = 3024;
lime_graphics_opengl_GL.STENCIL_TEST = 2960;
lime_graphics_opengl_GL.DEPTH_TEST = 2929;
lime_graphics_opengl_GL.SCISSOR_TEST = 3089;
lime_graphics_opengl_GL.POLYGON_OFFSET_FILL = 32823;
lime_graphics_opengl_GL.SAMPLE_ALPHA_TO_COVERAGE = 32926;
lime_graphics_opengl_GL.SAMPLE_COVERAGE = 32928;
lime_graphics_opengl_GL.NO_ERROR = 0;
lime_graphics_opengl_GL.INVALID_ENUM = 1280;
lime_graphics_opengl_GL.INVALID_VALUE = 1281;
lime_graphics_opengl_GL.INVALID_OPERATION = 1282;
lime_graphics_opengl_GL.OUT_OF_MEMORY = 1285;
lime_graphics_opengl_GL.CW = 2304;
lime_graphics_opengl_GL.CCW = 2305;
lime_graphics_opengl_GL.LINE_WIDTH = 2849;
lime_graphics_opengl_GL.ALIASED_POINT_SIZE_RANGE = 33901;
lime_graphics_opengl_GL.ALIASED_LINE_WIDTH_RANGE = 33902;
lime_graphics_opengl_GL.CULL_FACE_MODE = 2885;
lime_graphics_opengl_GL.FRONT_FACE = 2886;
lime_graphics_opengl_GL.DEPTH_RANGE = 2928;
lime_graphics_opengl_GL.DEPTH_WRITEMASK = 2930;
lime_graphics_opengl_GL.DEPTH_CLEAR_VALUE = 2931;
lime_graphics_opengl_GL.DEPTH_FUNC = 2932;
lime_graphics_opengl_GL.STENCIL_CLEAR_VALUE = 2961;
lime_graphics_opengl_GL.STENCIL_FUNC = 2962;
lime_graphics_opengl_GL.STENCIL_FAIL = 2964;
lime_graphics_opengl_GL.STENCIL_PASS_DEPTH_FAIL = 2965;
lime_graphics_opengl_GL.STENCIL_PASS_DEPTH_PASS = 2966;
lime_graphics_opengl_GL.STENCIL_REF = 2967;
lime_graphics_opengl_GL.STENCIL_VALUE_MASK = 2963;
lime_graphics_opengl_GL.STENCIL_WRITEMASK = 2968;
lime_graphics_opengl_GL.STENCIL_BACK_FUNC = 34816;
lime_graphics_opengl_GL.STENCIL_BACK_FAIL = 34817;
lime_graphics_opengl_GL.STENCIL_BACK_PASS_DEPTH_FAIL = 34818;
lime_graphics_opengl_GL.STENCIL_BACK_PASS_DEPTH_PASS = 34819;
lime_graphics_opengl_GL.STENCIL_BACK_REF = 36003;
lime_graphics_opengl_GL.STENCIL_BACK_VALUE_MASK = 36004;
lime_graphics_opengl_GL.STENCIL_BACK_WRITEMASK = 36005;
lime_graphics_opengl_GL.VIEWPORT = 2978;
lime_graphics_opengl_GL.SCISSOR_BOX = 3088;
lime_graphics_opengl_GL.COLOR_CLEAR_VALUE = 3106;
lime_graphics_opengl_GL.COLOR_WRITEMASK = 3107;
lime_graphics_opengl_GL.UNPACK_ALIGNMENT = 3317;
lime_graphics_opengl_GL.PACK_ALIGNMENT = 3333;
lime_graphics_opengl_GL.MAX_TEXTURE_SIZE = 3379;
lime_graphics_opengl_GL.MAX_VIEWPORT_DIMS = 3386;
lime_graphics_opengl_GL.SUBPIXEL_BITS = 3408;
lime_graphics_opengl_GL.RED_BITS = 3410;
lime_graphics_opengl_GL.GREEN_BITS = 3411;
lime_graphics_opengl_GL.BLUE_BITS = 3412;
lime_graphics_opengl_GL.ALPHA_BITS = 3413;
lime_graphics_opengl_GL.DEPTH_BITS = 3414;
lime_graphics_opengl_GL.STENCIL_BITS = 3415;
lime_graphics_opengl_GL.POLYGON_OFFSET_UNITS = 10752;
lime_graphics_opengl_GL.POLYGON_OFFSET_FACTOR = 32824;
lime_graphics_opengl_GL.TEXTURE_BINDING_2D = 32873;
lime_graphics_opengl_GL.SAMPLE_BUFFERS = 32936;
lime_graphics_opengl_GL.SAMPLES = 32937;
lime_graphics_opengl_GL.SAMPLE_COVERAGE_VALUE = 32938;
lime_graphics_opengl_GL.SAMPLE_COVERAGE_INVERT = 32939;
lime_graphics_opengl_GL.NUM_COMPRESSED_TEXTURE_FORMATS = 34466;
lime_graphics_opengl_GL.COMPRESSED_TEXTURE_FORMATS = 34467;
lime_graphics_opengl_GL.DONT_CARE = 4352;
lime_graphics_opengl_GL.FASTEST = 4353;
lime_graphics_opengl_GL.NICEST = 4354;
lime_graphics_opengl_GL.GENERATE_MIPMAP_HINT = 33170;
lime_graphics_opengl_GL.BYTE = 5120;
lime_graphics_opengl_GL.UNSIGNED_BYTE = 5121;
lime_graphics_opengl_GL.SHORT = 5122;
lime_graphics_opengl_GL.UNSIGNED_SHORT = 5123;
lime_graphics_opengl_GL.INT = 5124;
lime_graphics_opengl_GL.UNSIGNED_INT = 5125;
lime_graphics_opengl_GL.FLOAT = 5126;
lime_graphics_opengl_GL.DEPTH_COMPONENT = 6402;
lime_graphics_opengl_GL.ALPHA = 6406;
lime_graphics_opengl_GL.RGB = 6407;
lime_graphics_opengl_GL.RGBA = 6408;
lime_graphics_opengl_GL.LUMINANCE = 6409;
lime_graphics_opengl_GL.LUMINANCE_ALPHA = 6410;
lime_graphics_opengl_GL.UNSIGNED_SHORT_4_4_4_4 = 32819;
lime_graphics_opengl_GL.UNSIGNED_SHORT_5_5_5_1 = 32820;
lime_graphics_opengl_GL.UNSIGNED_SHORT_5_6_5 = 33635;
lime_graphics_opengl_GL.FRAGMENT_SHADER = 35632;
lime_graphics_opengl_GL.VERTEX_SHADER = 35633;
lime_graphics_opengl_GL.MAX_VERTEX_ATTRIBS = 34921;
lime_graphics_opengl_GL.MAX_VERTEX_UNIFORM_VECTORS = 36347;
lime_graphics_opengl_GL.MAX_VARYING_VECTORS = 36348;
lime_graphics_opengl_GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661;
lime_graphics_opengl_GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660;
lime_graphics_opengl_GL.MAX_TEXTURE_IMAGE_UNITS = 34930;
lime_graphics_opengl_GL.MAX_FRAGMENT_UNIFORM_VECTORS = 36349;
lime_graphics_opengl_GL.SHADER_TYPE = 35663;
lime_graphics_opengl_GL.DELETE_STATUS = 35712;
lime_graphics_opengl_GL.LINK_STATUS = 35714;
lime_graphics_opengl_GL.VALIDATE_STATUS = 35715;
lime_graphics_opengl_GL.ATTACHED_SHADERS = 35717;
lime_graphics_opengl_GL.ACTIVE_UNIFORMS = 35718;
lime_graphics_opengl_GL.ACTIVE_ATTRIBUTES = 35721;
lime_graphics_opengl_GL.SHADING_LANGUAGE_VERSION = 35724;
lime_graphics_opengl_GL.CURRENT_PROGRAM = 35725;
lime_graphics_opengl_GL.NEVER = 512;
lime_graphics_opengl_GL.LESS = 513;
lime_graphics_opengl_GL.EQUAL = 514;
lime_graphics_opengl_GL.LEQUAL = 515;
lime_graphics_opengl_GL.GREATER = 516;
lime_graphics_opengl_GL.NOTEQUAL = 517;
lime_graphics_opengl_GL.GEQUAL = 518;
lime_graphics_opengl_GL.ALWAYS = 519;
lime_graphics_opengl_GL.KEEP = 7680;
lime_graphics_opengl_GL.REPLACE = 7681;
lime_graphics_opengl_GL.INCR = 7682;
lime_graphics_opengl_GL.DECR = 7683;
lime_graphics_opengl_GL.INVERT = 5386;
lime_graphics_opengl_GL.INCR_WRAP = 34055;
lime_graphics_opengl_GL.DECR_WRAP = 34056;
lime_graphics_opengl_GL.VENDOR = 7936;
lime_graphics_opengl_GL.RENDERER = 7937;
lime_graphics_opengl_GL.VERSION = 7938;
lime_graphics_opengl_GL.EXTENSIONS = 7939;
lime_graphics_opengl_GL.NEAREST = 9728;
lime_graphics_opengl_GL.LINEAR = 9729;
lime_graphics_opengl_GL.NEAREST_MIPMAP_NEAREST = 9984;
lime_graphics_opengl_GL.LINEAR_MIPMAP_NEAREST = 9985;
lime_graphics_opengl_GL.NEAREST_MIPMAP_LINEAR = 9986;
lime_graphics_opengl_GL.LINEAR_MIPMAP_LINEAR = 9987;
lime_graphics_opengl_GL.TEXTURE_MAG_FILTER = 10240;
lime_graphics_opengl_GL.TEXTURE_MIN_FILTER = 10241;
lime_graphics_opengl_GL.TEXTURE_WRAP_S = 10242;
lime_graphics_opengl_GL.TEXTURE_WRAP_T = 10243;
lime_graphics_opengl_GL.TEXTURE_2D = 3553;
lime_graphics_opengl_GL.TEXTURE = 5890;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP = 34067;
lime_graphics_opengl_GL.TEXTURE_BINDING_CUBE_MAP = 34068;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_X = 34069;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074;
lime_graphics_opengl_GL.MAX_CUBE_MAP_TEXTURE_SIZE = 34076;
lime_graphics_opengl_GL.TEXTURE0 = 33984;
lime_graphics_opengl_GL.TEXTURE1 = 33985;
lime_graphics_opengl_GL.TEXTURE2 = 33986;
lime_graphics_opengl_GL.TEXTURE3 = 33987;
lime_graphics_opengl_GL.TEXTURE4 = 33988;
lime_graphics_opengl_GL.TEXTURE5 = 33989;
lime_graphics_opengl_GL.TEXTURE6 = 33990;
lime_graphics_opengl_GL.TEXTURE7 = 33991;
lime_graphics_opengl_GL.TEXTURE8 = 33992;
lime_graphics_opengl_GL.TEXTURE9 = 33993;
lime_graphics_opengl_GL.TEXTURE10 = 33994;
lime_graphics_opengl_GL.TEXTURE11 = 33995;
lime_graphics_opengl_GL.TEXTURE12 = 33996;
lime_graphics_opengl_GL.TEXTURE13 = 33997;
lime_graphics_opengl_GL.TEXTURE14 = 33998;
lime_graphics_opengl_GL.TEXTURE15 = 33999;
lime_graphics_opengl_GL.TEXTURE16 = 34000;
lime_graphics_opengl_GL.TEXTURE17 = 34001;
lime_graphics_opengl_GL.TEXTURE18 = 34002;
lime_graphics_opengl_GL.TEXTURE19 = 34003;
lime_graphics_opengl_GL.TEXTURE20 = 34004;
lime_graphics_opengl_GL.TEXTURE21 = 34005;
lime_graphics_opengl_GL.TEXTURE22 = 34006;
lime_graphics_opengl_GL.TEXTURE23 = 34007;
lime_graphics_opengl_GL.TEXTURE24 = 34008;
lime_graphics_opengl_GL.TEXTURE25 = 34009;
lime_graphics_opengl_GL.TEXTURE26 = 34010;
lime_graphics_opengl_GL.TEXTURE27 = 34011;
lime_graphics_opengl_GL.TEXTURE28 = 34012;
lime_graphics_opengl_GL.TEXTURE29 = 34013;
lime_graphics_opengl_GL.TEXTURE30 = 34014;
lime_graphics_opengl_GL.TEXTURE31 = 34015;
lime_graphics_opengl_GL.ACTIVE_TEXTURE = 34016;
lime_graphics_opengl_GL.REPEAT = 10497;
lime_graphics_opengl_GL.CLAMP_TO_EDGE = 33071;
lime_graphics_opengl_GL.MIRRORED_REPEAT = 33648;
lime_graphics_opengl_GL.FLOAT_VEC2 = 35664;
lime_graphics_opengl_GL.FLOAT_VEC3 = 35665;
lime_graphics_opengl_GL.FLOAT_VEC4 = 35666;
lime_graphics_opengl_GL.INT_VEC2 = 35667;
lime_graphics_opengl_GL.INT_VEC3 = 35668;
lime_graphics_opengl_GL.INT_VEC4 = 35669;
lime_graphics_opengl_GL.BOOL = 35670;
lime_graphics_opengl_GL.BOOL_VEC2 = 35671;
lime_graphics_opengl_GL.BOOL_VEC3 = 35672;
lime_graphics_opengl_GL.BOOL_VEC4 = 35673;
lime_graphics_opengl_GL.FLOAT_MAT2 = 35674;
lime_graphics_opengl_GL.FLOAT_MAT3 = 35675;
lime_graphics_opengl_GL.FLOAT_MAT4 = 35676;
lime_graphics_opengl_GL.SAMPLER_2D = 35678;
lime_graphics_opengl_GL.SAMPLER_CUBE = 35680;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_ENABLED = 34338;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_SIZE = 34339;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_STRIDE = 34340;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_TYPE = 34341;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_POINTER = 34373;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975;
lime_graphics_opengl_GL.IMPLEMENTATION_COLOR_READ_TYPE = 35738;
lime_graphics_opengl_GL.IMPLEMENTATION_COLOR_READ_FORMAT = 35739;
lime_graphics_opengl_GL.VERTEX_PROGRAM_POINT_SIZE = 34370;
lime_graphics_opengl_GL.POINT_SPRITE = 34913;
lime_graphics_opengl_GL.COMPILE_STATUS = 35713;
lime_graphics_opengl_GL.LOW_FLOAT = 36336;
lime_graphics_opengl_GL.MEDIUM_FLOAT = 36337;
lime_graphics_opengl_GL.HIGH_FLOAT = 36338;
lime_graphics_opengl_GL.LOW_INT = 36339;
lime_graphics_opengl_GL.MEDIUM_INT = 36340;
lime_graphics_opengl_GL.HIGH_INT = 36341;
lime_graphics_opengl_GL.FRAMEBUFFER = 36160;
lime_graphics_opengl_GL.RENDERBUFFER = 36161;
lime_graphics_opengl_GL.RGBA4 = 32854;
lime_graphics_opengl_GL.RGB5_A1 = 32855;
lime_graphics_opengl_GL.RGB565 = 36194;
lime_graphics_opengl_GL.DEPTH_COMPONENT16 = 33189;
lime_graphics_opengl_GL.STENCIL_INDEX = 6401;
lime_graphics_opengl_GL.STENCIL_INDEX8 = 36168;
lime_graphics_opengl_GL.DEPTH_STENCIL = 34041;
lime_graphics_opengl_GL.RENDERBUFFER_WIDTH = 36162;
lime_graphics_opengl_GL.RENDERBUFFER_HEIGHT = 36163;
lime_graphics_opengl_GL.RENDERBUFFER_INTERNAL_FORMAT = 36164;
lime_graphics_opengl_GL.RENDERBUFFER_RED_SIZE = 36176;
lime_graphics_opengl_GL.RENDERBUFFER_GREEN_SIZE = 36177;
lime_graphics_opengl_GL.RENDERBUFFER_BLUE_SIZE = 36178;
lime_graphics_opengl_GL.RENDERBUFFER_ALPHA_SIZE = 36179;
lime_graphics_opengl_GL.RENDERBUFFER_DEPTH_SIZE = 36180;
lime_graphics_opengl_GL.RENDERBUFFER_STENCIL_SIZE = 36181;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051;
lime_graphics_opengl_GL.COLOR_ATTACHMENT0 = 36064;
lime_graphics_opengl_GL.DEPTH_ATTACHMENT = 36096;
lime_graphics_opengl_GL.STENCIL_ATTACHMENT = 36128;
lime_graphics_opengl_GL.DEPTH_STENCIL_ATTACHMENT = 33306;
lime_graphics_opengl_GL.NONE = 0;
lime_graphics_opengl_GL.FRAMEBUFFER_COMPLETE = 36053;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057;
lime_graphics_opengl_GL.FRAMEBUFFER_UNSUPPORTED = 36061;
lime_graphics_opengl_GL.FRAMEBUFFER_BINDING = 36006;
lime_graphics_opengl_GL.RENDERBUFFER_BINDING = 36007;
lime_graphics_opengl_GL.MAX_RENDERBUFFER_SIZE = 34024;
lime_graphics_opengl_GL.INVALID_FRAMEBUFFER_OPERATION = 1286;
lime_graphics_opengl_GL.UNPACK_FLIP_Y_WEBGL = 37440;
lime_graphics_opengl_GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441;
lime_graphics_opengl_GL.CONTEXT_LOST_WEBGL = 37442;
lime_graphics_opengl_GL.UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443;
lime_graphics_opengl_GL.BROWSER_DEFAULT_WEBGL = 37444;
lime_graphics_opengl_GL.READ_BUFFER = 3074;
lime_graphics_opengl_GL.UNPACK_ROW_LENGTH = 3314;
lime_graphics_opengl_GL.UNPACK_SKIP_ROWS = 3315;
lime_graphics_opengl_GL.UNPACK_SKIP_PIXELS = 3316;
lime_graphics_opengl_GL.PACK_ROW_LENGTH = 3330;
lime_graphics_opengl_GL.PACK_SKIP_ROWS = 3331;
lime_graphics_opengl_GL.PACK_SKIP_PIXELS = 3332;
lime_graphics_opengl_GL.TEXTURE_BINDING_3D = 32874;
lime_graphics_opengl_GL.UNPACK_SKIP_IMAGES = 32877;
lime_graphics_opengl_GL.UNPACK_IMAGE_HEIGHT = 32878;
lime_graphics_opengl_GL.MAX_3D_TEXTURE_SIZE = 32883;
lime_graphics_opengl_GL.MAX_ELEMENTS_VERTICES = 33000;
lime_graphics_opengl_GL.MAX_ELEMENTS_INDICES = 33001;
lime_graphics_opengl_GL.MAX_TEXTURE_LOD_BIAS = 34045;
lime_graphics_opengl_GL.MAX_FRAGMENT_UNIFORM_COMPONENTS = 35657;
lime_graphics_opengl_GL.MAX_VERTEX_UNIFORM_COMPONENTS = 35658;
lime_graphics_opengl_GL.MAX_ARRAY_TEXTURE_LAYERS = 35071;
lime_graphics_opengl_GL.MIN_PROGRAM_TEXEL_OFFSET = 35076;
lime_graphics_opengl_GL.MAX_PROGRAM_TEXEL_OFFSET = 35077;
lime_graphics_opengl_GL.MAX_VARYING_COMPONENTS = 35659;
lime_graphics_opengl_GL.FRAGMENT_SHADER_DERIVATIVE_HINT = 35723;
lime_graphics_opengl_GL.RASTERIZER_DISCARD = 35977;
lime_graphics_opengl_GL.VERTEX_ARRAY_BINDING = 34229;
lime_graphics_opengl_GL.MAX_VERTEX_OUTPUT_COMPONENTS = 37154;
lime_graphics_opengl_GL.MAX_FRAGMENT_INPUT_COMPONENTS = 37157;
lime_graphics_opengl_GL.MAX_SERVER_WAIT_TIMEOUT = 37137;
lime_graphics_opengl_GL.MAX_ELEMENT_INDEX = 36203;
lime_graphics_opengl_GL.RED = 6403;
lime_graphics_opengl_GL.RGB8 = 32849;
lime_graphics_opengl_GL.RGBA8 = 32856;
lime_graphics_opengl_GL.RGB10_A2 = 32857;
lime_graphics_opengl_GL.TEXTURE_3D = 32879;
lime_graphics_opengl_GL.TEXTURE_WRAP_R = 32882;
lime_graphics_opengl_GL.TEXTURE_MIN_LOD = 33082;
lime_graphics_opengl_GL.TEXTURE_MAX_LOD = 33083;
lime_graphics_opengl_GL.TEXTURE_BASE_LEVEL = 33084;
lime_graphics_opengl_GL.TEXTURE_MAX_LEVEL = 33085;
lime_graphics_opengl_GL.TEXTURE_COMPARE_MODE = 34892;
lime_graphics_opengl_GL.TEXTURE_COMPARE_FUNC = 34893;
lime_graphics_opengl_GL.SRGB = 35904;
lime_graphics_opengl_GL.SRGB8 = 35905;
lime_graphics_opengl_GL.SRGB8_ALPHA8 = 35907;
lime_graphics_opengl_GL.COMPARE_REF_TO_TEXTURE = 34894;
lime_graphics_opengl_GL.RGBA32F = 34836;
lime_graphics_opengl_GL.RGB32F = 34837;
lime_graphics_opengl_GL.RGBA16F = 34842;
lime_graphics_opengl_GL.RGB16F = 34843;
lime_graphics_opengl_GL.TEXTURE_2D_ARRAY = 35866;
lime_graphics_opengl_GL.TEXTURE_BINDING_2D_ARRAY = 35869;
lime_graphics_opengl_GL.R11F_G11F_B10F = 35898;
lime_graphics_opengl_GL.RGB9_E5 = 35901;
lime_graphics_opengl_GL.RGBA32UI = 36208;
lime_graphics_opengl_GL.RGB32UI = 36209;
lime_graphics_opengl_GL.RGBA16UI = 36214;
lime_graphics_opengl_GL.RGB16UI = 36215;
lime_graphics_opengl_GL.RGBA8UI = 36220;
lime_graphics_opengl_GL.RGB8UI = 36221;
lime_graphics_opengl_GL.RGBA32I = 36226;
lime_graphics_opengl_GL.RGB32I = 36227;
lime_graphics_opengl_GL.RGBA16I = 36232;
lime_graphics_opengl_GL.RGB16I = 36233;
lime_graphics_opengl_GL.RGBA8I = 36238;
lime_graphics_opengl_GL.RGB8I = 36239;
lime_graphics_opengl_GL.RED_INTEGER = 36244;
lime_graphics_opengl_GL.RGB_INTEGER = 36248;
lime_graphics_opengl_GL.RGBA_INTEGER = 36249;
lime_graphics_opengl_GL.R8 = 33321;
lime_graphics_opengl_GL.RG8 = 33323;
lime_graphics_opengl_GL.R16F = 33325;
lime_graphics_opengl_GL.R32F = 33326;
lime_graphics_opengl_GL.RG16F = 33327;
lime_graphics_opengl_GL.RG32F = 33328;
lime_graphics_opengl_GL.R8I = 33329;
lime_graphics_opengl_GL.R8UI = 33330;
lime_graphics_opengl_GL.R16I = 33331;
lime_graphics_opengl_GL.R16UI = 33332;
lime_graphics_opengl_GL.R32I = 33333;
lime_graphics_opengl_GL.R32UI = 33334;
lime_graphics_opengl_GL.RG8I = 33335;
lime_graphics_opengl_GL.RG8UI = 33336;
lime_graphics_opengl_GL.RG16I = 33337;
lime_graphics_opengl_GL.RG16UI = 33338;
lime_graphics_opengl_GL.RG32I = 33339;
lime_graphics_opengl_GL.RG32UI = 33340;
lime_graphics_opengl_GL.R8_SNORM = 36756;
lime_graphics_opengl_GL.RG8_SNORM = 36757;
lime_graphics_opengl_GL.RGB8_SNORM = 36758;
lime_graphics_opengl_GL.RGBA8_SNORM = 36759;
lime_graphics_opengl_GL.RGB10_A2UI = 36975;
lime_graphics_opengl_GL.TEXTURE_IMMUTABLE_FORMAT = 37167;
lime_graphics_opengl_GL.TEXTURE_IMMUTABLE_LEVELS = 33503;
lime_graphics_opengl_GL.UNSIGNED_INT_2_10_10_10_REV = 33640;
lime_graphics_opengl_GL.UNSIGNED_INT_10F_11F_11F_REV = 35899;
lime_graphics_opengl_GL.UNSIGNED_INT_5_9_9_9_REV = 35902;
lime_graphics_opengl_GL.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269;
lime_graphics_opengl_GL.UNSIGNED_INT_24_8 = 34042;
lime_graphics_opengl_GL.HALF_FLOAT = 5131;
lime_graphics_opengl_GL.RG = 33319;
lime_graphics_opengl_GL.RG_INTEGER = 33320;
lime_graphics_opengl_GL.INT_2_10_10_10_REV = 36255;
lime_graphics_opengl_GL.CURRENT_QUERY = 34917;
lime_graphics_opengl_GL.QUERY_RESULT = 34918;
lime_graphics_opengl_GL.QUERY_RESULT_AVAILABLE = 34919;
lime_graphics_opengl_GL.ANY_SAMPLES_PASSED = 35887;
lime_graphics_opengl_GL.ANY_SAMPLES_PASSED_CONSERVATIVE = 36202;
lime_graphics_opengl_GL.MAX_DRAW_BUFFERS = 34852;
lime_graphics_opengl_GL.DRAW_BUFFER0 = 34853;
lime_graphics_opengl_GL.DRAW_BUFFER1 = 34854;
lime_graphics_opengl_GL.DRAW_BUFFER2 = 34855;
lime_graphics_opengl_GL.DRAW_BUFFER3 = 34856;
lime_graphics_opengl_GL.DRAW_BUFFER4 = 34857;
lime_graphics_opengl_GL.DRAW_BUFFER5 = 34858;
lime_graphics_opengl_GL.DRAW_BUFFER6 = 34859;
lime_graphics_opengl_GL.DRAW_BUFFER7 = 34860;
lime_graphics_opengl_GL.DRAW_BUFFER8 = 34861;
lime_graphics_opengl_GL.DRAW_BUFFER9 = 34862;
lime_graphics_opengl_GL.DRAW_BUFFER10 = 34863;
lime_graphics_opengl_GL.DRAW_BUFFER11 = 34864;
lime_graphics_opengl_GL.DRAW_BUFFER12 = 34865;
lime_graphics_opengl_GL.DRAW_BUFFER13 = 34866;
lime_graphics_opengl_GL.DRAW_BUFFER14 = 34867;
lime_graphics_opengl_GL.DRAW_BUFFER15 = 34868;
lime_graphics_opengl_GL.MAX_COLOR_ATTACHMENTS = 36063;
lime_graphics_opengl_GL.COLOR_ATTACHMENT1 = 36065;
lime_graphics_opengl_GL.COLOR_ATTACHMENT2 = 36066;
lime_graphics_opengl_GL.COLOR_ATTACHMENT3 = 36067;
lime_graphics_opengl_GL.COLOR_ATTACHMENT4 = 36068;
lime_graphics_opengl_GL.COLOR_ATTACHMENT5 = 36069;
lime_graphics_opengl_GL.COLOR_ATTACHMENT6 = 36070;
lime_graphics_opengl_GL.COLOR_ATTACHMENT7 = 36071;
lime_graphics_opengl_GL.COLOR_ATTACHMENT8 = 36072;
lime_graphics_opengl_GL.COLOR_ATTACHMENT9 = 36073;
lime_graphics_opengl_GL.COLOR_ATTACHMENT10 = 36074;
lime_graphics_opengl_GL.COLOR_ATTACHMENT11 = 36075;
lime_graphics_opengl_GL.COLOR_ATTACHMENT12 = 36076;
lime_graphics_opengl_GL.COLOR_ATTACHMENT13 = 36077;
lime_graphics_opengl_GL.COLOR_ATTACHMENT14 = 36078;
lime_graphics_opengl_GL.COLOR_ATTACHMENT15 = 36079;
lime_graphics_opengl_GL.SAMPLER_3D = 35679;
lime_graphics_opengl_GL.SAMPLER_2D_SHADOW = 35682;
lime_graphics_opengl_GL.SAMPLER_2D_ARRAY = 36289;
lime_graphics_opengl_GL.SAMPLER_2D_ARRAY_SHADOW = 36292;
lime_graphics_opengl_GL.SAMPLER_CUBE_SHADOW = 36293;
lime_graphics_opengl_GL.INT_SAMPLER_2D = 36298;
lime_graphics_opengl_GL.INT_SAMPLER_3D = 36299;
lime_graphics_opengl_GL.INT_SAMPLER_CUBE = 36300;
lime_graphics_opengl_GL.INT_SAMPLER_2D_ARRAY = 36303;
lime_graphics_opengl_GL.UNSIGNED_INT_SAMPLER_2D = 36306;
lime_graphics_opengl_GL.UNSIGNED_INT_SAMPLER_3D = 36307;
lime_graphics_opengl_GL.UNSIGNED_INT_SAMPLER_CUBE = 36308;
lime_graphics_opengl_GL.UNSIGNED_INT_SAMPLER_2D_ARRAY = 36311;
lime_graphics_opengl_GL.MAX_SAMPLES = 36183;
lime_graphics_opengl_GL.SAMPLER_BINDING = 35097;
lime_graphics_opengl_GL.PIXEL_PACK_BUFFER = 35051;
lime_graphics_opengl_GL.PIXEL_UNPACK_BUFFER = 35052;
lime_graphics_opengl_GL.PIXEL_PACK_BUFFER_BINDING = 35053;
lime_graphics_opengl_GL.PIXEL_UNPACK_BUFFER_BINDING = 35055;
lime_graphics_opengl_GL.COPY_READ_BUFFER = 36662;
lime_graphics_opengl_GL.COPY_WRITE_BUFFER = 36663;
lime_graphics_opengl_GL.COPY_READ_BUFFER_BINDING = 36662;
lime_graphics_opengl_GL.COPY_WRITE_BUFFER_BINDING = 36663;
lime_graphics_opengl_GL.FLOAT_MAT2x3 = 35685;
lime_graphics_opengl_GL.FLOAT_MAT2x4 = 35686;
lime_graphics_opengl_GL.FLOAT_MAT3x2 = 35687;
lime_graphics_opengl_GL.FLOAT_MAT3x4 = 35688;
lime_graphics_opengl_GL.FLOAT_MAT4x2 = 35689;
lime_graphics_opengl_GL.FLOAT_MAT4x3 = 35690;
lime_graphics_opengl_GL.UNSIGNED_INT_VEC2 = 36294;
lime_graphics_opengl_GL.UNSIGNED_INT_VEC3 = 36295;
lime_graphics_opengl_GL.UNSIGNED_INT_VEC4 = 36296;
lime_graphics_opengl_GL.UNSIGNED_NORMALIZED = 35863;
lime_graphics_opengl_GL.SIGNED_NORMALIZED = 36764;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_INTEGER = 35069;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_DIVISOR = 35070;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_BUFFER_MODE = 35967;
lime_graphics_opengl_GL.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 35968;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_VARYINGS = 35971;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_BUFFER_START = 35972;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_BUFFER_SIZE = 35973;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 35976;
lime_graphics_opengl_GL.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 35978;
lime_graphics_opengl_GL.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 35979;
lime_graphics_opengl_GL.INTERLEAVED_ATTRIBS = 35980;
lime_graphics_opengl_GL.SEPARATE_ATTRIBS = 35981;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_BUFFER = 35982;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_BUFFER_BINDING = 35983;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK = 36386;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_PAUSED = 36387;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_ACTIVE = 36388;
lime_graphics_opengl_GL.TRANSFORM_FEEDBACK_BINDING = 36389;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 33296;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 33297;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_RED_SIZE = 33298;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 33299;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 33300;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 33301;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 33302;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 33303;
lime_graphics_opengl_GL.FRAMEBUFFER_DEFAULT = 33304;
lime_graphics_opengl_GL.DEPTH24_STENCIL8 = 35056;
lime_graphics_opengl_GL.DRAW_FRAMEBUFFER_BINDING = 36006;
lime_graphics_opengl_GL.READ_FRAMEBUFFER = 36008;
lime_graphics_opengl_GL.DRAW_FRAMEBUFFER = 36009;
lime_graphics_opengl_GL.READ_FRAMEBUFFER_BINDING = 36010;
lime_graphics_opengl_GL.RENDERBUFFER_SAMPLES = 36011;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 36052;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 36182;
lime_graphics_opengl_GL.UNIFORM_BUFFER = 35345;
lime_graphics_opengl_GL.UNIFORM_BUFFER_BINDING = 35368;
lime_graphics_opengl_GL.UNIFORM_BUFFER_START = 35369;
lime_graphics_opengl_GL.UNIFORM_BUFFER_SIZE = 35370;
lime_graphics_opengl_GL.MAX_VERTEX_UNIFORM_BLOCKS = 35371;
lime_graphics_opengl_GL.MAX_FRAGMENT_UNIFORM_BLOCKS = 35373;
lime_graphics_opengl_GL.MAX_COMBINED_UNIFORM_BLOCKS = 35374;
lime_graphics_opengl_GL.MAX_UNIFORM_BUFFER_BINDINGS = 35375;
lime_graphics_opengl_GL.MAX_UNIFORM_BLOCK_SIZE = 35376;
lime_graphics_opengl_GL.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 35377;
lime_graphics_opengl_GL.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 35379;
lime_graphics_opengl_GL.UNIFORM_BUFFER_OFFSET_ALIGNMENT = 35380;
lime_graphics_opengl_GL.ACTIVE_UNIFORM_BLOCKS = 35382;
lime_graphics_opengl_GL.UNIFORM_TYPE = 35383;
lime_graphics_opengl_GL.UNIFORM_SIZE = 35384;
lime_graphics_opengl_GL.UNIFORM_BLOCK_INDEX = 35386;
lime_graphics_opengl_GL.UNIFORM_OFFSET = 35387;
lime_graphics_opengl_GL.UNIFORM_ARRAY_STRIDE = 35388;
lime_graphics_opengl_GL.UNIFORM_MATRIX_STRIDE = 35389;
lime_graphics_opengl_GL.UNIFORM_IS_ROW_MAJOR = 35390;
lime_graphics_opengl_GL.UNIFORM_BLOCK_BINDING = 35391;
lime_graphics_opengl_GL.UNIFORM_BLOCK_DATA_SIZE = 35392;
lime_graphics_opengl_GL.UNIFORM_BLOCK_ACTIVE_UNIFORMS = 35394;
lime_graphics_opengl_GL.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 35395;
lime_graphics_opengl_GL.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 35396;
lime_graphics_opengl_GL.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 35398;
lime_graphics_opengl_GL.OBJECT_TYPE = 37138;
lime_graphics_opengl_GL.SYNC_CONDITION = 37139;
lime_graphics_opengl_GL.SYNC_STATUS = 37140;
lime_graphics_opengl_GL.SYNC_FLAGS = 37141;
lime_graphics_opengl_GL.SYNC_FENCE = 37142;
lime_graphics_opengl_GL.SYNC_GPU_COMMANDS_COMPLETE = 37143;
lime_graphics_opengl_GL.UNSIGNALED = 37144;
lime_graphics_opengl_GL.SIGNALED = 37145;
lime_graphics_opengl_GL.ALREADY_SIGNALED = 37146;
lime_graphics_opengl_GL.TIMEOUT_EXPIRED = 37147;
lime_graphics_opengl_GL.CONDITION_SATISFIED = 37148;
lime_graphics_opengl_GL.WAIT_FAILED = 37149;
lime_graphics_opengl_GL.SYNC_FLUSH_COMMANDS_BIT = 1;
lime_graphics_opengl_GL.COLOR = 6144;
lime_graphics_opengl_GL.DEPTH = 6145;
lime_graphics_opengl_GL.STENCIL = 6146;
lime_graphics_opengl_GL.MIN = 32775;
lime_graphics_opengl_GL.MAX = 32776;
lime_graphics_opengl_GL.DEPTH_COMPONENT24 = 33190;
lime_graphics_opengl_GL.STREAM_READ = 35041;
lime_graphics_opengl_GL.STREAM_COPY = 35042;
lime_graphics_opengl_GL.STATIC_READ = 35045;
lime_graphics_opengl_GL.STATIC_COPY = 35046;
lime_graphics_opengl_GL.DYNAMIC_READ = 35049;
lime_graphics_opengl_GL.DYNAMIC_COPY = 35050;
lime_graphics_opengl_GL.DEPTH_COMPONENT32F = 36012;
lime_graphics_opengl_GL.DEPTH32F_STENCIL8 = 36013;
lime_graphics_opengl_GL.INVALID_INDEX = -1;
lime_graphics_opengl_GL.TIMEOUT_IGNORED = -1;
lime_graphics_opengl_GL.MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 37447;
lime_graphics_opengl__$WebGL2Context_WebGL2Context_$Impl_$.__tempPointer = new lime_utils_BytePointerData(null,0);
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__identity = [1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0];
lime_math_Matrix3.__identity = new lime_math_Matrix3();
lime_math__$Matrix4_Matrix4_$Impl_$.__identity = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
lime_media_openal_AL.NONE = 0;
lime_media_openal_AL.FALSE = 0;
lime_media_openal_AL.TRUE = 1;
lime_media_openal_AL.SOURCE_RELATIVE = 514;
lime_media_openal_AL.CONE_INNER_ANGLE = 4097;
lime_media_openal_AL.CONE_OUTER_ANGLE = 4098;
lime_media_openal_AL.PITCH = 4099;
lime_media_openal_AL.POSITION = 4100;
lime_media_openal_AL.DIRECTION = 4101;
lime_media_openal_AL.VELOCITY = 4102;
lime_media_openal_AL.LOOPING = 4103;
lime_media_openal_AL.BUFFER = 4105;
lime_media_openal_AL.GAIN = 4106;
lime_media_openal_AL.MIN_GAIN = 4109;
lime_media_openal_AL.MAX_GAIN = 4110;
lime_media_openal_AL.ORIENTATION = 4111;
lime_media_openal_AL.SOURCE_STATE = 4112;
lime_media_openal_AL.INITIAL = 4113;
lime_media_openal_AL.PLAYING = 4114;
lime_media_openal_AL.PAUSED = 4115;
lime_media_openal_AL.STOPPED = 4116;
lime_media_openal_AL.BUFFERS_QUEUED = 4117;
lime_media_openal_AL.BUFFERS_PROCESSED = 4118;
lime_media_openal_AL.REFERENCE_DISTANCE = 4128;
lime_media_openal_AL.ROLLOFF_FACTOR = 4129;
lime_media_openal_AL.CONE_OUTER_GAIN = 4130;
lime_media_openal_AL.MAX_DISTANCE = 4131;
lime_media_openal_AL.SEC_OFFSET = 4132;
lime_media_openal_AL.SAMPLE_OFFSET = 4133;
lime_media_openal_AL.BYTE_OFFSET = 4134;
lime_media_openal_AL.SOURCE_TYPE = 4135;
lime_media_openal_AL.STATIC = 4136;
lime_media_openal_AL.STREAMING = 4137;
lime_media_openal_AL.UNDETERMINED = 4144;
lime_media_openal_AL.FORMAT_MONO8 = 4352;
lime_media_openal_AL.FORMAT_MONO16 = 4353;
lime_media_openal_AL.FORMAT_STEREO8 = 4354;
lime_media_openal_AL.FORMAT_STEREO16 = 4355;
lime_media_openal_AL.FREQUENCY = 8193;
lime_media_openal_AL.BITS = 8194;
lime_media_openal_AL.CHANNELS = 8195;
lime_media_openal_AL.SIZE = 8196;
lime_media_openal_AL.NO_ERROR = 0;
lime_media_openal_AL.INVALID_NAME = 40961;
lime_media_openal_AL.INVALID_ENUM = 40962;
lime_media_openal_AL.INVALID_VALUE = 40963;
lime_media_openal_AL.INVALID_OPERATION = 40964;
lime_media_openal_AL.OUT_OF_MEMORY = 40965;
lime_media_openal_AL.VENDOR = 45057;
lime_media_openal_AL.VERSION = 45058;
lime_media_openal_AL.RENDERER = 45059;
lime_media_openal_AL.EXTENSIONS = 45060;
lime_media_openal_AL.DOPPLER_FACTOR = 49152;
lime_media_openal_AL.SPEED_OF_SOUND = 49155;
lime_media_openal_AL.DOPPLER_VELOCITY = 49153;
lime_media_openal_AL.DISTANCE_MODEL = 53248;
lime_media_openal_AL.INVERSE_DISTANCE = 53249;
lime_media_openal_AL.INVERSE_DISTANCE_CLAMPED = 53250;
lime_media_openal_AL.LINEAR_DISTANCE = 53251;
lime_media_openal_AL.LINEAR_DISTANCE_CLAMPED = 53252;
lime_media_openal_AL.EXPONENT_DISTANCE = 53253;
lime_media_openal_AL.EXPONENT_DISTANCE_CLAMPED = 53254;
lime_media_openal_ALC.FALSE = 0;
lime_media_openal_ALC.TRUE = 1;
lime_media_openal_ALC.FREQUENCY = 4103;
lime_media_openal_ALC.REFRESH = 4104;
lime_media_openal_ALC.SYNC = 4105;
lime_media_openal_ALC.MONO_SOURCES = 4112;
lime_media_openal_ALC.STEREO_SOURCES = 4113;
lime_media_openal_ALC.NO_ERROR = 0;
lime_media_openal_ALC.INVALID_DEVICE = 40961;
lime_media_openal_ALC.INVALID_CONTEXT = 40962;
lime_media_openal_ALC.INVALID_ENUM = 40963;
lime_media_openal_ALC.INVALID_VALUE = 40964;
lime_media_openal_ALC.OUT_OF_MEMORY = 40965;
lime_media_openal_ALC.ATTRIBUTES_SIZE = 4098;
lime_media_openal_ALC.ALL_ATTRIBUTES = 4099;
lime_media_openal_ALC.DEFAULT_DEVICE_SPECIFIER = 4100;
lime_media_openal_ALC.DEVICE_SPECIFIER = 4101;
lime_media_openal_ALC.EXTENSIONS = 4102;
lime_media_openal_ALC.ENUMERATE_ALL_EXT = 1;
lime_media_openal_ALC.DEFAULT_ALL_DEVICES_SPECIFIER = 4114;
lime_media_openal_ALC.ALL_DEVICES_SPECIFIER = 4115;
lime_system_System.__directories = new haxe_ds_IntMap();
lime_text__$TextDirection_TextDirection_$Impl_$.INVALID = 0;
lime_text__$TextDirection_TextDirection_$Impl_$.LEFT_TO_RIGHT = 4;
lime_text__$TextDirection_TextDirection_$Impl_$.RIGHT_TO_LEFT = 5;
lime_text__$TextDirection_TextDirection_$Impl_$.TOP_TO_BOTTOM = 6;
lime_text__$TextDirection_TextDirection_$Impl_$.BOTTOM_TO_TOP = 7;
lime_text__$TextScript_TextScript_$Impl_$.COMMON = "Zyyy";
lime_text__$TextScript_TextScript_$Impl_$.INHERITED = "Zinh";
lime_text__$TextScript_TextScript_$Impl_$.UNKNOWN = "Zzzz";
lime_text__$TextScript_TextScript_$Impl_$.ARABIC = "Arab";
lime_text__$TextScript_TextScript_$Impl_$.ARMENIAN = "Armn";
lime_text__$TextScript_TextScript_$Impl_$.BENGALI = "Beng";
lime_text__$TextScript_TextScript_$Impl_$.CYRILLIC = "Cyrl";
lime_text__$TextScript_TextScript_$Impl_$.DEVANAGARI = "Deva";
lime_text__$TextScript_TextScript_$Impl_$.GEORGIAN = "Geor";
lime_text__$TextScript_TextScript_$Impl_$.GREEK = "Grek";
lime_text__$TextScript_TextScript_$Impl_$.GUJARATI = "Gujr";
lime_text__$TextScript_TextScript_$Impl_$.GURMUKHI = "Guru";
lime_text__$TextScript_TextScript_$Impl_$.HANGUL = "Hang";
lime_text__$TextScript_TextScript_$Impl_$.HAN = "Hani";
lime_text__$TextScript_TextScript_$Impl_$.HEBREW = "Hebr";
lime_text__$TextScript_TextScript_$Impl_$.HIRAGANA = "Hira";
lime_text__$TextScript_TextScript_$Impl_$.KANNADA = "Knda";
lime_text__$TextScript_TextScript_$Impl_$.KATAKANA = "Kana";
lime_text__$TextScript_TextScript_$Impl_$.LAO = "Laoo";
lime_text__$TextScript_TextScript_$Impl_$.LATIN = "Latn";
lime_text__$TextScript_TextScript_$Impl_$.MALAYALAM = "Mlym";
lime_text__$TextScript_TextScript_$Impl_$.ORIYA = "Orya";
lime_text__$TextScript_TextScript_$Impl_$.TAMIL = "Taml";
lime_text__$TextScript_TextScript_$Impl_$.TELUGA = "Telu";
lime_text__$TextScript_TextScript_$Impl_$.THAI = "Thai";
lime_text__$TextScript_TextScript_$Impl_$.TIBETAN = "Tibt";
lime_text__$TextScript_TextScript_$Impl_$.BOPOMOFO = "Bopo";
lime_text__$TextScript_TextScript_$Impl_$.BRAILLE = "Brai";
lime_text__$TextScript_TextScript_$Impl_$.CANADIAN_SYLLABICS = "Cans";
lime_text__$TextScript_TextScript_$Impl_$.CHEROKEE = "Cher";
lime_text__$TextScript_TextScript_$Impl_$.ETHIOPIC = "Ethi";
lime_text__$TextScript_TextScript_$Impl_$.KHMER = "Khmr";
lime_text__$TextScript_TextScript_$Impl_$.MONGOLIAN = "Mong";
lime_text__$TextScript_TextScript_$Impl_$.MYANMAR = "Mymr";
lime_text__$TextScript_TextScript_$Impl_$.OGHAM = "Ogam";
lime_text__$TextScript_TextScript_$Impl_$.RUNIC = "Runr";
lime_text__$TextScript_TextScript_$Impl_$.SINHALA = "Sinh";
lime_text__$TextScript_TextScript_$Impl_$.SYRIAC = "Syrc";
lime_text__$TextScript_TextScript_$Impl_$.THAANA = "Thaa";
lime_text__$TextScript_TextScript_$Impl_$.YI = "Yiii";
lime_text__$TextScript_TextScript_$Impl_$.DESERET = "Dsrt";
lime_text__$TextScript_TextScript_$Impl_$.GOTHIC = "Goth";
lime_text__$TextScript_TextScript_$Impl_$.OLD_ITALIC = "Ital";
lime_text__$TextScript_TextScript_$Impl_$.BUHID = "Buhd";
lime_text__$TextScript_TextScript_$Impl_$.HANUNOO = "Hano";
lime_text__$TextScript_TextScript_$Impl_$.TAGALOG = "Tglg";
lime_text__$TextScript_TextScript_$Impl_$.TAGBANWA = "Tagb";
lime_text__$TextScript_TextScript_$Impl_$.CYPRIOT = "Cprt";
lime_text__$TextScript_TextScript_$Impl_$.LIMBU = "Limb";
lime_text__$TextScript_TextScript_$Impl_$.LINEAR_B = "Linb";
lime_text__$TextScript_TextScript_$Impl_$.OSMANYA = "Osma";
lime_text__$TextScript_TextScript_$Impl_$.SHAVIAN = "Shaw";
lime_text__$TextScript_TextScript_$Impl_$.TAI_LE = "Tale";
lime_text__$TextScript_TextScript_$Impl_$.UGARITIC = "Ugar";
lime_text__$TextScript_TextScript_$Impl_$.BUGINESE = "Bugi";
lime_text__$TextScript_TextScript_$Impl_$.COPTIC = "Copt";
lime_text__$TextScript_TextScript_$Impl_$.GLAGOLITIC = "Glag";
lime_text__$TextScript_TextScript_$Impl_$.KHAROSHTHI = "Khar";
lime_text__$TextScript_TextScript_$Impl_$.NEW_TAI_LUE = "Talu";
lime_text__$TextScript_TextScript_$Impl_$.OLD_PERSIAN = "Xpeo";
lime_text__$TextScript_TextScript_$Impl_$.SYLOTI_NAGRI = "Sylo";
lime_text__$TextScript_TextScript_$Impl_$.TIFINAGH = "Tfng";
lime_text__$TextScript_TextScript_$Impl_$.BALINESE = "Bali";
lime_text__$TextScript_TextScript_$Impl_$.CUNEIFORM = "Xsux";
lime_text__$TextScript_TextScript_$Impl_$.NKO = "Nkoo";
lime_text__$TextScript_TextScript_$Impl_$.PHAGS_PA = "Phag";
lime_text__$TextScript_TextScript_$Impl_$.PHOENICIAN = "Phnx";
lime_text__$TextScript_TextScript_$Impl_$.CARIAN = "Cari";
lime_text__$TextScript_TextScript_$Impl_$.CHAM = "Cham";
lime_text__$TextScript_TextScript_$Impl_$.KAYAH_LI = "Kali";
lime_text__$TextScript_TextScript_$Impl_$.LEPCHA = "Lepc";
lime_text__$TextScript_TextScript_$Impl_$.LYCIAN = "Lyci";
lime_text__$TextScript_TextScript_$Impl_$.LYDIAN = "Lydi";
lime_text__$TextScript_TextScript_$Impl_$.OL_CHIKI = "Olck";
lime_text__$TextScript_TextScript_$Impl_$.REJANG = "Rjng";
lime_text__$TextScript_TextScript_$Impl_$.SAURASHTRA = "Saur";
lime_text__$TextScript_TextScript_$Impl_$.SUNDANESE = "Sund";
lime_text__$TextScript_TextScript_$Impl_$.VAI = "Vaii";
lime_text__$TextScript_TextScript_$Impl_$.AVESTAN = "Avst";
lime_text__$TextScript_TextScript_$Impl_$.BAMUM = "Bamu";
lime_text__$TextScript_TextScript_$Impl_$.EGYPTIAN_HIEROGLYPHS = "Egyp";
lime_text__$TextScript_TextScript_$Impl_$.IMPERIAL_ARAMAIC = "Armi";
lime_text__$TextScript_TextScript_$Impl_$.INSCRIPTIONAL_PAHLAVI = "Phli";
lime_text__$TextScript_TextScript_$Impl_$.INSCRIPTIONAL_PARTHIAN = "Prti";
lime_text__$TextScript_TextScript_$Impl_$.JAVANESE = "Java";
lime_text__$TextScript_TextScript_$Impl_$.KAITHI = "Kthi";
lime_text__$TextScript_TextScript_$Impl_$.LISU = "Lisu";
lime_text__$TextScript_TextScript_$Impl_$.MEETEI_MAYEK = "Mtei";
lime_text__$TextScript_TextScript_$Impl_$.OLD_SOUTH_ARABIAN = "Sarb";
lime_text__$TextScript_TextScript_$Impl_$.OLD_TURKIC = "Orkh";
lime_text__$TextScript_TextScript_$Impl_$.SAMARITAN = "Samr";
lime_text__$TextScript_TextScript_$Impl_$.TAI_THAM = "Lana";
lime_text__$TextScript_TextScript_$Impl_$.TAI_VIET = "Tavt";
lime_text__$TextScript_TextScript_$Impl_$.BATAK = "Batk";
lime_text__$TextScript_TextScript_$Impl_$.BRAHMI = "Brah";
lime_text__$TextScript_TextScript_$Impl_$.MANDAIC = "Mand";
lime_text__$TextScript_TextScript_$Impl_$.CHAKMA = "Cakm";
lime_text__$TextScript_TextScript_$Impl_$.MEROITIC_CURSIVE = "Merc";
lime_text__$TextScript_TextScript_$Impl_$.MEROITIC_HIEROGLYPHS = "Mero";
lime_text__$TextScript_TextScript_$Impl_$.MIAO = "Plrd";
lime_text__$TextScript_TextScript_$Impl_$.SHARADA = "Shrd";
lime_text__$TextScript_TextScript_$Impl_$.SORA_SOMPENG = "Sora";
lime_text__$TextScript_TextScript_$Impl_$.TAKRI = "Takr";
lime_text__$TextScript_TextScript_$Impl_$.BASSA_VAH = "Bass";
lime_text__$TextScript_TextScript_$Impl_$.CAUCASIAN_ALBANIAN = "Aghb";
lime_text__$TextScript_TextScript_$Impl_$.DUPLOYAN = "Dupl";
lime_text__$TextScript_TextScript_$Impl_$.ELBASAN = "Elba";
lime_text__$TextScript_TextScript_$Impl_$.GRANTHA = "Gran";
lime_text__$TextScript_TextScript_$Impl_$.KHOJKI = "Khoj";
lime_text__$TextScript_TextScript_$Impl_$.KHUDAWADI = "Sind";
lime_text__$TextScript_TextScript_$Impl_$.LINEAR_A = "Lina";
lime_text__$TextScript_TextScript_$Impl_$.MAHAJANI = "Mahj";
lime_text__$TextScript_TextScript_$Impl_$.MANICHAEAN = "Mani";
lime_text__$TextScript_TextScript_$Impl_$.MENDE_KIKAKUI = "Mend";
lime_text__$TextScript_TextScript_$Impl_$.MODI = "Modi";
lime_text__$TextScript_TextScript_$Impl_$.MRO = "Mroo";
lime_text__$TextScript_TextScript_$Impl_$.NABATAEAN = "Nbat";
lime_text__$TextScript_TextScript_$Impl_$.OLD_NORTH_ARABIAN = "Narb";
lime_text__$TextScript_TextScript_$Impl_$.OLD_PERMIC = "Perm";
lime_text__$TextScript_TextScript_$Impl_$.PAHAWH_HMONG = "Hmng";
lime_text__$TextScript_TextScript_$Impl_$.PALMYRENE = "Palm";
lime_text__$TextScript_TextScript_$Impl_$.PAU_CIN_HAU = "Pauc";
lime_text__$TextScript_TextScript_$Impl_$.PSALTER_PAHLAVI = "Phlp";
lime_text__$TextScript_TextScript_$Impl_$.SIDDHAM = "Sidd";
lime_text__$TextScript_TextScript_$Impl_$.TIRHUTA = "Tirh";
lime_text__$TextScript_TextScript_$Impl_$.WARANG_CITI = "Wara";
lime_tools_helpers_StringHelper.seedNumber = 0;
lime_tools_helpers_StringHelper.base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
lime_tools_helpers_StringHelper.usedFlatNames = new haxe_ds_StringMap();
lime_tools_helpers_StringHelper.uuidChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
lime_ui_Gamepad.devices = new haxe_ds_IntMap();
lime_ui_Gamepad.onConnect = new lime_app__$Event_$lime_$ui_$Gamepad_$Void();
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.LEFT_X = 0;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.LEFT_Y = 1;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.RIGHT_X = 2;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.RIGHT_Y = 3;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.TRIGGER_LEFT = 4;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.TRIGGER_RIGHT = 5;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.A = 0;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.B = 1;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.X = 2;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.Y = 3;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.BACK = 4;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.GUIDE = 5;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.START = 6;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.LEFT_STICK = 7;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.RIGHT_STICK = 8;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.LEFT_SHOULDER = 9;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.RIGHT_SHOULDER = 10;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_UP = 11;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_DOWN = 12;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_LEFT = 13;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_RIGHT = 14;
lime_ui_Joystick.devices = new haxe_ds_IntMap();
lime_ui_Joystick.onConnect = new lime_app__$Event_$lime_$ui_$Joystick_$Void();
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.CENTER = 0;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN = 4;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.LEFT = 8;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.RIGHT = 2;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP = 1;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN_LEFT = 12;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN_RIGHT = 6;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP_LEFT = 9;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP_RIGHT = 3;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNKNOWN = 0;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKSPACE = 8;
lime_ui__$KeyCode_KeyCode_$Impl_$.TAB = 9;
lime_ui__$KeyCode_KeyCode_$Impl_$.RETURN = 13;
lime_ui__$KeyCode_KeyCode_$Impl_$.ESCAPE = 27;
lime_ui__$KeyCode_KeyCode_$Impl_$.SPACE = 32;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXCLAMATION = 33;
lime_ui__$KeyCode_KeyCode_$Impl_$.QUOTE = 34;
lime_ui__$KeyCode_KeyCode_$Impl_$.HASH = 35;
lime_ui__$KeyCode_KeyCode_$Impl_$.DOLLAR = 36;
lime_ui__$KeyCode_KeyCode_$Impl_$.PERCENT = 37;
lime_ui__$KeyCode_KeyCode_$Impl_$.AMPERSAND = 38;
lime_ui__$KeyCode_KeyCode_$Impl_$.SINGLE_QUOTE = 39;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_PARENTHESIS = 40;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_PARENTHESIS = 41;
lime_ui__$KeyCode_KeyCode_$Impl_$.ASTERISK = 42;
lime_ui__$KeyCode_KeyCode_$Impl_$.PLUS = 43;
lime_ui__$KeyCode_KeyCode_$Impl_$.COMMA = 44;
lime_ui__$KeyCode_KeyCode_$Impl_$.MINUS = 45;
lime_ui__$KeyCode_KeyCode_$Impl_$.PERIOD = 46;
lime_ui__$KeyCode_KeyCode_$Impl_$.SLASH = 47;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_0 = 48;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_1 = 49;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_2 = 50;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_3 = 51;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_4 = 52;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_5 = 53;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_6 = 54;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_7 = 55;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_8 = 56;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_9 = 57;
lime_ui__$KeyCode_KeyCode_$Impl_$.COLON = 58;
lime_ui__$KeyCode_KeyCode_$Impl_$.SEMICOLON = 59;
lime_ui__$KeyCode_KeyCode_$Impl_$.LESS_THAN = 60;
lime_ui__$KeyCode_KeyCode_$Impl_$.EQUALS = 61;
lime_ui__$KeyCode_KeyCode_$Impl_$.GREATER_THAN = 62;
lime_ui__$KeyCode_KeyCode_$Impl_$.QUESTION = 63;
lime_ui__$KeyCode_KeyCode_$Impl_$.AT = 64;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_BRACKET = 91;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKSLASH = 92;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_BRACKET = 93;
lime_ui__$KeyCode_KeyCode_$Impl_$.CARET = 94;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNDERSCORE = 95;
lime_ui__$KeyCode_KeyCode_$Impl_$.GRAVE = 96;
lime_ui__$KeyCode_KeyCode_$Impl_$.A = 97;
lime_ui__$KeyCode_KeyCode_$Impl_$.B = 98;
lime_ui__$KeyCode_KeyCode_$Impl_$.C = 99;
lime_ui__$KeyCode_KeyCode_$Impl_$.D = 100;
lime_ui__$KeyCode_KeyCode_$Impl_$.E = 101;
lime_ui__$KeyCode_KeyCode_$Impl_$.F = 102;
lime_ui__$KeyCode_KeyCode_$Impl_$.G = 103;
lime_ui__$KeyCode_KeyCode_$Impl_$.H = 104;
lime_ui__$KeyCode_KeyCode_$Impl_$.I = 105;
lime_ui__$KeyCode_KeyCode_$Impl_$.J = 106;
lime_ui__$KeyCode_KeyCode_$Impl_$.K = 107;
lime_ui__$KeyCode_KeyCode_$Impl_$.L = 108;
lime_ui__$KeyCode_KeyCode_$Impl_$.M = 109;
lime_ui__$KeyCode_KeyCode_$Impl_$.N = 110;
lime_ui__$KeyCode_KeyCode_$Impl_$.O = 111;
lime_ui__$KeyCode_KeyCode_$Impl_$.P = 112;
lime_ui__$KeyCode_KeyCode_$Impl_$.Q = 113;
lime_ui__$KeyCode_KeyCode_$Impl_$.R = 114;
lime_ui__$KeyCode_KeyCode_$Impl_$.S = 115;
lime_ui__$KeyCode_KeyCode_$Impl_$.T = 116;
lime_ui__$KeyCode_KeyCode_$Impl_$.U = 117;
lime_ui__$KeyCode_KeyCode_$Impl_$.V = 118;
lime_ui__$KeyCode_KeyCode_$Impl_$.W = 119;
lime_ui__$KeyCode_KeyCode_$Impl_$.X = 120;
lime_ui__$KeyCode_KeyCode_$Impl_$.Y = 121;
lime_ui__$KeyCode_KeyCode_$Impl_$.Z = 122;
lime_ui__$KeyCode_KeyCode_$Impl_$.DELETE = 127;
lime_ui__$KeyCode_KeyCode_$Impl_$.CAPS_LOCK = 1073741881;
lime_ui__$KeyCode_KeyCode_$Impl_$.F1 = 1073741882;
lime_ui__$KeyCode_KeyCode_$Impl_$.F2 = 1073741883;
lime_ui__$KeyCode_KeyCode_$Impl_$.F3 = 1073741884;
lime_ui__$KeyCode_KeyCode_$Impl_$.F4 = 1073741885;
lime_ui__$KeyCode_KeyCode_$Impl_$.F5 = 1073741886;
lime_ui__$KeyCode_KeyCode_$Impl_$.F6 = 1073741887;
lime_ui__$KeyCode_KeyCode_$Impl_$.F7 = 1073741888;
lime_ui__$KeyCode_KeyCode_$Impl_$.F8 = 1073741889;
lime_ui__$KeyCode_KeyCode_$Impl_$.F9 = 1073741890;
lime_ui__$KeyCode_KeyCode_$Impl_$.F10 = 1073741891;
lime_ui__$KeyCode_KeyCode_$Impl_$.F11 = 1073741892;
lime_ui__$KeyCode_KeyCode_$Impl_$.F12 = 1073741893;
lime_ui__$KeyCode_KeyCode_$Impl_$.PRINT_SCREEN = 1073741894;
lime_ui__$KeyCode_KeyCode_$Impl_$.SCROLL_LOCK = 1073741895;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAUSE = 1073741896;
lime_ui__$KeyCode_KeyCode_$Impl_$.INSERT = 1073741897;
lime_ui__$KeyCode_KeyCode_$Impl_$.HOME = 1073741898;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAGE_UP = 1073741899;
lime_ui__$KeyCode_KeyCode_$Impl_$.END = 1073741901;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAGE_DOWN = 1073741902;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT = 1073741903;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT = 1073741904;
lime_ui__$KeyCode_KeyCode_$Impl_$.DOWN = 1073741905;
lime_ui__$KeyCode_KeyCode_$Impl_$.UP = 1073741906;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUM_LOCK = 1073741907;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DIVIDE = 1073741908;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MULTIPLY = 1073741909;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MINUS = 1073741910;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PLUS = 1073741911;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_ENTER = 1073741912;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_1 = 1073741913;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_2 = 1073741914;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_3 = 1073741915;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_4 = 1073741916;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_5 = 1073741917;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_6 = 1073741918;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_7 = 1073741919;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_8 = 1073741920;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_9 = 1073741921;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_0 = 1073741922;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PERIOD = 1073741923;
lime_ui__$KeyCode_KeyCode_$Impl_$.APPLICATION = 1073741925;
lime_ui__$KeyCode_KeyCode_$Impl_$.POWER = 1073741926;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_EQUALS = 1073741927;
lime_ui__$KeyCode_KeyCode_$Impl_$.F13 = 1073741928;
lime_ui__$KeyCode_KeyCode_$Impl_$.F14 = 1073741929;
lime_ui__$KeyCode_KeyCode_$Impl_$.F15 = 1073741930;
lime_ui__$KeyCode_KeyCode_$Impl_$.F16 = 1073741931;
lime_ui__$KeyCode_KeyCode_$Impl_$.F17 = 1073741932;
lime_ui__$KeyCode_KeyCode_$Impl_$.F18 = 1073741933;
lime_ui__$KeyCode_KeyCode_$Impl_$.F19 = 1073741934;
lime_ui__$KeyCode_KeyCode_$Impl_$.F20 = 1073741935;
lime_ui__$KeyCode_KeyCode_$Impl_$.F21 = 1073741936;
lime_ui__$KeyCode_KeyCode_$Impl_$.F22 = 1073741937;
lime_ui__$KeyCode_KeyCode_$Impl_$.F23 = 1073741938;
lime_ui__$KeyCode_KeyCode_$Impl_$.F24 = 1073741939;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXECUTE = 1073741940;
lime_ui__$KeyCode_KeyCode_$Impl_$.HELP = 1073741941;
lime_ui__$KeyCode_KeyCode_$Impl_$.MENU = 1073741942;
lime_ui__$KeyCode_KeyCode_$Impl_$.SELECT = 1073741943;
lime_ui__$KeyCode_KeyCode_$Impl_$.STOP = 1073741944;
lime_ui__$KeyCode_KeyCode_$Impl_$.AGAIN = 1073741945;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNDO = 1073741946;
lime_ui__$KeyCode_KeyCode_$Impl_$.CUT = 1073741947;
lime_ui__$KeyCode_KeyCode_$Impl_$.COPY = 1073741948;
lime_ui__$KeyCode_KeyCode_$Impl_$.PASTE = 1073741949;
lime_ui__$KeyCode_KeyCode_$Impl_$.FIND = 1073741950;
lime_ui__$KeyCode_KeyCode_$Impl_$.MUTE = 1073741951;
lime_ui__$KeyCode_KeyCode_$Impl_$.VOLUME_UP = 1073741952;
lime_ui__$KeyCode_KeyCode_$Impl_$.VOLUME_DOWN = 1073741953;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_COMMA = 1073741957;
lime_ui__$KeyCode_KeyCode_$Impl_$.ALT_ERASE = 1073741977;
lime_ui__$KeyCode_KeyCode_$Impl_$.SYSTEM_REQUEST = 1073741978;
lime_ui__$KeyCode_KeyCode_$Impl_$.CANCEL = 1073741979;
lime_ui__$KeyCode_KeyCode_$Impl_$.CLEAR = 1073741980;
lime_ui__$KeyCode_KeyCode_$Impl_$.PRIOR = 1073741981;
lime_ui__$KeyCode_KeyCode_$Impl_$.RETURN2 = 1073741982;
lime_ui__$KeyCode_KeyCode_$Impl_$.SEPARATOR = 1073741983;
lime_ui__$KeyCode_KeyCode_$Impl_$.OUT = 1073741984;
lime_ui__$KeyCode_KeyCode_$Impl_$.OPER = 1073741985;
lime_ui__$KeyCode_KeyCode_$Impl_$.CLEAR_AGAIN = 1073741986;
lime_ui__$KeyCode_KeyCode_$Impl_$.CRSEL = 1073741987;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXSEL = 1073741988;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_00 = 1073742000;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_000 = 1073742001;
lime_ui__$KeyCode_KeyCode_$Impl_$.THOUSAND_SEPARATOR = 1073742002;
lime_ui__$KeyCode_KeyCode_$Impl_$.DECIMAL_SEPARATOR = 1073742003;
lime_ui__$KeyCode_KeyCode_$Impl_$.CURRENCY_UNIT = 1073742004;
lime_ui__$KeyCode_KeyCode_$Impl_$.CURRENCY_SUBUNIT = 1073742005;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LEFT_PARENTHESIS = 1073742006;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_RIGHT_PARENTHESIS = 1073742007;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LEFT_BRACE = 1073742008;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_RIGHT_BRACE = 1073742009;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_TAB = 1073742010;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_BACKSPACE = 1073742011;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_A = 1073742012;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_B = 1073742013;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_C = 1073742014;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_D = 1073742015;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_E = 1073742016;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_F = 1073742017;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_XOR = 1073742018;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_POWER = 1073742019;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PERCENT = 1073742020;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LESS_THAN = 1073742021;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_GREATER_THAN = 1073742022;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_AMPERSAND = 1073742023;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DOUBLE_AMPERSAND = 1073742024;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_VERTICAL_BAR = 1073742025;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DOUBLE_VERTICAL_BAR = 1073742026;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_COLON = 1073742027;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_HASH = 1073742028;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_SPACE = 1073742029;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_AT = 1073742030;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_EXCLAMATION = 1073742031;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_STORE = 1073742032;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_RECALL = 1073742033;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_CLEAR = 1073742034;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_ADD = 1073742035;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_SUBTRACT = 1073742036;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_MULTIPLY = 1073742037;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_DIVIDE = 1073742038;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PLUS_MINUS = 1073742039;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_CLEAR = 1073742040;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_CLEAR_ENTRY = 1073742041;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_BINARY = 1073742042;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_OCTAL = 1073742043;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DECIMAL = 1073742044;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_HEXADECIMAL = 1073742045;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_CTRL = 1073742048;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_SHIFT = 1073742049;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_ALT = 1073742050;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_META = 1073742051;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_CTRL = 1073742052;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_SHIFT = 1073742053;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_ALT = 1073742054;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_META = 1073742055;
lime_ui__$KeyCode_KeyCode_$Impl_$.MODE = 1073742081;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_NEXT = 1073742082;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_PREVIOUS = 1073742083;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_STOP = 1073742084;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_PLAY = 1073742085;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_MUTE = 1073742086;
lime_ui__$KeyCode_KeyCode_$Impl_$.MEDIA_SELECT = 1073742087;
lime_ui__$KeyCode_KeyCode_$Impl_$.WWW = 1073742088;
lime_ui__$KeyCode_KeyCode_$Impl_$.MAIL = 1073742089;
lime_ui__$KeyCode_KeyCode_$Impl_$.CALCULATOR = 1073742090;
lime_ui__$KeyCode_KeyCode_$Impl_$.COMPUTER = 1073742091;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_SEARCH = 1073742092;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_HOME = 1073742093;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_BACK = 1073742094;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_FORWARD = 1073742095;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_STOP = 1073742096;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_REFRESH = 1073742097;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_BOOKMARKS = 1073742098;
lime_ui__$KeyCode_KeyCode_$Impl_$.BRIGHTNESS_DOWN = 1073742099;
lime_ui__$KeyCode_KeyCode_$Impl_$.BRIGHTNESS_UP = 1073742100;
lime_ui__$KeyCode_KeyCode_$Impl_$.DISPLAY_SWITCH = 1073742101;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_TOGGLE = 1073742102;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_DOWN = 1073742103;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_UP = 1073742104;
lime_ui__$KeyCode_KeyCode_$Impl_$.EJECT = 1073742105;
lime_ui__$KeyCode_KeyCode_$Impl_$.SLEEP = 1073742106;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.NONE = 0;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_SHIFT = 1;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_SHIFT = 2;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_CTRL = 64;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_CTRL = 128;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_ALT = 256;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_ALT = 512;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_META = 1024;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_META = 2048;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.NUM_LOCK = 4096;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.CAPS_LOCK = 8192;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.MODE = 16384;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.CTRL = 192;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.SHIFT = 3;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.ALT = 768;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.META = 3072;
lime_ui__$ScanCode_ScanCode_$Impl_$.UNKNOWN = 0;
lime_ui__$ScanCode_ScanCode_$Impl_$.BACKSPACE = 42;
lime_ui__$ScanCode_ScanCode_$Impl_$.TAB = 43;
lime_ui__$ScanCode_ScanCode_$Impl_$.RETURN = 40;
lime_ui__$ScanCode_ScanCode_$Impl_$.ESCAPE = 41;
lime_ui__$ScanCode_ScanCode_$Impl_$.SPACE = 44;
lime_ui__$ScanCode_ScanCode_$Impl_$.SINGLE_QUOTE = 52;
lime_ui__$ScanCode_ScanCode_$Impl_$.COMMA = 54;
lime_ui__$ScanCode_ScanCode_$Impl_$.MINUS = 45;
lime_ui__$ScanCode_ScanCode_$Impl_$.PERIOD = 55;
lime_ui__$ScanCode_ScanCode_$Impl_$.SLASH = 56;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_0 = 39;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_1 = 30;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_2 = 31;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_3 = 32;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_4 = 33;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_5 = 34;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_6 = 35;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_7 = 36;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_8 = 37;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMBER_9 = 38;
lime_ui__$ScanCode_ScanCode_$Impl_$.SEMICOLON = 51;
lime_ui__$ScanCode_ScanCode_$Impl_$.EQUALS = 46;
lime_ui__$ScanCode_ScanCode_$Impl_$.LEFT_BRACKET = 47;
lime_ui__$ScanCode_ScanCode_$Impl_$.BACKSLASH = 49;
lime_ui__$ScanCode_ScanCode_$Impl_$.RIGHT_BRACKET = 48;
lime_ui__$ScanCode_ScanCode_$Impl_$.GRAVE = 53;
lime_ui__$ScanCode_ScanCode_$Impl_$.A = 4;
lime_ui__$ScanCode_ScanCode_$Impl_$.B = 5;
lime_ui__$ScanCode_ScanCode_$Impl_$.C = 6;
lime_ui__$ScanCode_ScanCode_$Impl_$.D = 7;
lime_ui__$ScanCode_ScanCode_$Impl_$.E = 8;
lime_ui__$ScanCode_ScanCode_$Impl_$.F = 9;
lime_ui__$ScanCode_ScanCode_$Impl_$.G = 10;
lime_ui__$ScanCode_ScanCode_$Impl_$.H = 11;
lime_ui__$ScanCode_ScanCode_$Impl_$.I = 12;
lime_ui__$ScanCode_ScanCode_$Impl_$.J = 13;
lime_ui__$ScanCode_ScanCode_$Impl_$.K = 14;
lime_ui__$ScanCode_ScanCode_$Impl_$.L = 15;
lime_ui__$ScanCode_ScanCode_$Impl_$.M = 16;
lime_ui__$ScanCode_ScanCode_$Impl_$.N = 17;
lime_ui__$ScanCode_ScanCode_$Impl_$.O = 18;
lime_ui__$ScanCode_ScanCode_$Impl_$.P = 19;
lime_ui__$ScanCode_ScanCode_$Impl_$.Q = 20;
lime_ui__$ScanCode_ScanCode_$Impl_$.R = 21;
lime_ui__$ScanCode_ScanCode_$Impl_$.S = 22;
lime_ui__$ScanCode_ScanCode_$Impl_$.T = 23;
lime_ui__$ScanCode_ScanCode_$Impl_$.U = 24;
lime_ui__$ScanCode_ScanCode_$Impl_$.V = 25;
lime_ui__$ScanCode_ScanCode_$Impl_$.W = 26;
lime_ui__$ScanCode_ScanCode_$Impl_$.X = 27;
lime_ui__$ScanCode_ScanCode_$Impl_$.Y = 28;
lime_ui__$ScanCode_ScanCode_$Impl_$.Z = 29;
lime_ui__$ScanCode_ScanCode_$Impl_$.DELETE = 76;
lime_ui__$ScanCode_ScanCode_$Impl_$.CAPS_LOCK = 57;
lime_ui__$ScanCode_ScanCode_$Impl_$.F1 = 58;
lime_ui__$ScanCode_ScanCode_$Impl_$.F2 = 59;
lime_ui__$ScanCode_ScanCode_$Impl_$.F3 = 60;
lime_ui__$ScanCode_ScanCode_$Impl_$.F4 = 61;
lime_ui__$ScanCode_ScanCode_$Impl_$.F5 = 62;
lime_ui__$ScanCode_ScanCode_$Impl_$.F6 = 63;
lime_ui__$ScanCode_ScanCode_$Impl_$.F7 = 64;
lime_ui__$ScanCode_ScanCode_$Impl_$.F8 = 65;
lime_ui__$ScanCode_ScanCode_$Impl_$.F9 = 66;
lime_ui__$ScanCode_ScanCode_$Impl_$.F10 = 67;
lime_ui__$ScanCode_ScanCode_$Impl_$.F11 = 68;
lime_ui__$ScanCode_ScanCode_$Impl_$.F12 = 69;
lime_ui__$ScanCode_ScanCode_$Impl_$.PRINT_SCREEN = 70;
lime_ui__$ScanCode_ScanCode_$Impl_$.SCROLL_LOCK = 71;
lime_ui__$ScanCode_ScanCode_$Impl_$.PAUSE = 72;
lime_ui__$ScanCode_ScanCode_$Impl_$.INSERT = 73;
lime_ui__$ScanCode_ScanCode_$Impl_$.HOME = 74;
lime_ui__$ScanCode_ScanCode_$Impl_$.PAGE_UP = 75;
lime_ui__$ScanCode_ScanCode_$Impl_$.END = 77;
lime_ui__$ScanCode_ScanCode_$Impl_$.PAGE_DOWN = 78;
lime_ui__$ScanCode_ScanCode_$Impl_$.RIGHT = 79;
lime_ui__$ScanCode_ScanCode_$Impl_$.LEFT = 80;
lime_ui__$ScanCode_ScanCode_$Impl_$.DOWN = 81;
lime_ui__$ScanCode_ScanCode_$Impl_$.UP = 82;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUM_LOCK = 83;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_DIVIDE = 84;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MULTIPLY = 85;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MINUS = 86;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_PLUS = 87;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_ENTER = 88;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_1 = 89;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_2 = 90;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_3 = 91;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_4 = 92;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_5 = 93;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_6 = 94;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_7 = 95;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_8 = 96;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_9 = 97;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_0 = 98;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_PERIOD = 99;
lime_ui__$ScanCode_ScanCode_$Impl_$.APPLICATION = 101;
lime_ui__$ScanCode_ScanCode_$Impl_$.POWER = 102;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_EQUALS = 103;
lime_ui__$ScanCode_ScanCode_$Impl_$.F13 = 104;
lime_ui__$ScanCode_ScanCode_$Impl_$.F14 = 105;
lime_ui__$ScanCode_ScanCode_$Impl_$.F15 = 106;
lime_ui__$ScanCode_ScanCode_$Impl_$.F16 = 107;
lime_ui__$ScanCode_ScanCode_$Impl_$.F17 = 108;
lime_ui__$ScanCode_ScanCode_$Impl_$.F18 = 109;
lime_ui__$ScanCode_ScanCode_$Impl_$.F19 = 110;
lime_ui__$ScanCode_ScanCode_$Impl_$.F20 = 111;
lime_ui__$ScanCode_ScanCode_$Impl_$.F21 = 112;
lime_ui__$ScanCode_ScanCode_$Impl_$.F22 = 113;
lime_ui__$ScanCode_ScanCode_$Impl_$.F23 = 114;
lime_ui__$ScanCode_ScanCode_$Impl_$.F24 = 115;
lime_ui__$ScanCode_ScanCode_$Impl_$.EXECUTE = 116;
lime_ui__$ScanCode_ScanCode_$Impl_$.HELP = 117;
lime_ui__$ScanCode_ScanCode_$Impl_$.MENU = 118;
lime_ui__$ScanCode_ScanCode_$Impl_$.SELECT = 119;
lime_ui__$ScanCode_ScanCode_$Impl_$.STOP = 120;
lime_ui__$ScanCode_ScanCode_$Impl_$.AGAIN = 121;
lime_ui__$ScanCode_ScanCode_$Impl_$.UNDO = 122;
lime_ui__$ScanCode_ScanCode_$Impl_$.CUT = 123;
lime_ui__$ScanCode_ScanCode_$Impl_$.COPY = 124;
lime_ui__$ScanCode_ScanCode_$Impl_$.PASTE = 125;
lime_ui__$ScanCode_ScanCode_$Impl_$.FIND = 126;
lime_ui__$ScanCode_ScanCode_$Impl_$.MUTE = 127;
lime_ui__$ScanCode_ScanCode_$Impl_$.VOLUME_UP = 128;
lime_ui__$ScanCode_ScanCode_$Impl_$.VOLUME_DOWN = 129;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_COMMA = 133;
lime_ui__$ScanCode_ScanCode_$Impl_$.ALT_ERASE = 153;
lime_ui__$ScanCode_ScanCode_$Impl_$.SYSTEM_REQUEST = 154;
lime_ui__$ScanCode_ScanCode_$Impl_$.CANCEL = 155;
lime_ui__$ScanCode_ScanCode_$Impl_$.CLEAR = 156;
lime_ui__$ScanCode_ScanCode_$Impl_$.PRIOR = 157;
lime_ui__$ScanCode_ScanCode_$Impl_$.RETURN2 = 158;
lime_ui__$ScanCode_ScanCode_$Impl_$.SEPARATOR = 159;
lime_ui__$ScanCode_ScanCode_$Impl_$.OUT = 160;
lime_ui__$ScanCode_ScanCode_$Impl_$.OPER = 161;
lime_ui__$ScanCode_ScanCode_$Impl_$.CLEAR_AGAIN = 162;
lime_ui__$ScanCode_ScanCode_$Impl_$.CRSEL = 163;
lime_ui__$ScanCode_ScanCode_$Impl_$.EXSEL = 164;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_00 = 176;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_000 = 177;
lime_ui__$ScanCode_ScanCode_$Impl_$.THOUSAND_SEPARATOR = 178;
lime_ui__$ScanCode_ScanCode_$Impl_$.DECIMAL_SEPARATOR = 179;
lime_ui__$ScanCode_ScanCode_$Impl_$.CURRENCY_UNIT = 180;
lime_ui__$ScanCode_ScanCode_$Impl_$.CURRENCY_SUBUNIT = 181;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_LEFT_PARENTHESIS = 182;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_RIGHT_PARENTHESIS = 183;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_LEFT_BRACE = 184;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_RIGHT_BRACE = 185;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_TAB = 186;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_BACKSPACE = 187;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_A = 188;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_B = 189;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_C = 190;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_D = 191;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_E = 192;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_F = 193;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_XOR = 194;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_POWER = 195;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_PERCENT = 196;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_LESS_THAN = 197;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_GREATER_THAN = 198;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_AMPERSAND = 199;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_DOUBLE_AMPERSAND = 200;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_VERTICAL_BAR = 201;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_DOUBLE_VERTICAL_BAR = 202;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_COLON = 203;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_HASH = 204;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_SPACE = 205;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_AT = 206;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_EXCLAMATION = 207;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MEM_STORE = 208;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MEM_RECALL = 209;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MEM_CLEAR = 210;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MEM_ADD = 211;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MEM_SUBTRACT = 212;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MEM_MULTIPLY = 213;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_MEM_DIVIDE = 214;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_PLUS_MINUS = 215;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_CLEAR = 216;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_CLEAR_ENTRY = 217;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_BINARY = 218;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_OCTAL = 219;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_DECIMAL = 220;
lime_ui__$ScanCode_ScanCode_$Impl_$.NUMPAD_HEXADECIMAL = 221;
lime_ui__$ScanCode_ScanCode_$Impl_$.LEFT_CTRL = 224;
lime_ui__$ScanCode_ScanCode_$Impl_$.LEFT_SHIFT = 225;
lime_ui__$ScanCode_ScanCode_$Impl_$.LEFT_ALT = 226;
lime_ui__$ScanCode_ScanCode_$Impl_$.LEFT_META = 227;
lime_ui__$ScanCode_ScanCode_$Impl_$.RIGHT_CTRL = 228;
lime_ui__$ScanCode_ScanCode_$Impl_$.RIGHT_SHIFT = 229;
lime_ui__$ScanCode_ScanCode_$Impl_$.RIGHT_ALT = 230;
lime_ui__$ScanCode_ScanCode_$Impl_$.RIGHT_META = 231;
lime_ui__$ScanCode_ScanCode_$Impl_$.MODE = 257;
lime_ui__$ScanCode_ScanCode_$Impl_$.AUDIO_NEXT = 258;
lime_ui__$ScanCode_ScanCode_$Impl_$.AUDIO_PREVIOUS = 259;
lime_ui__$ScanCode_ScanCode_$Impl_$.AUDIO_STOP = 260;
lime_ui__$ScanCode_ScanCode_$Impl_$.AUDIO_PLAY = 261;
lime_ui__$ScanCode_ScanCode_$Impl_$.AUDIO_MUTE = 262;
lime_ui__$ScanCode_ScanCode_$Impl_$.MEDIA_SELECT = 263;
lime_ui__$ScanCode_ScanCode_$Impl_$.WWW = 264;
lime_ui__$ScanCode_ScanCode_$Impl_$.MAIL = 265;
lime_ui__$ScanCode_ScanCode_$Impl_$.CALCULATOR = 266;
lime_ui__$ScanCode_ScanCode_$Impl_$.COMPUTER = 267;
lime_ui__$ScanCode_ScanCode_$Impl_$.APP_CONTROL_SEARCH = 268;
lime_ui__$ScanCode_ScanCode_$Impl_$.APP_CONTROL_HOME = 269;
lime_ui__$ScanCode_ScanCode_$Impl_$.APP_CONTROL_BACK = 270;
lime_ui__$ScanCode_ScanCode_$Impl_$.APP_CONTROL_FORWARD = 271;
lime_ui__$ScanCode_ScanCode_$Impl_$.APP_CONTROL_STOP = 272;
lime_ui__$ScanCode_ScanCode_$Impl_$.APP_CONTROL_REFRESH = 273;
lime_ui__$ScanCode_ScanCode_$Impl_$.APP_CONTROL_BOOKMARKS = 274;
lime_ui__$ScanCode_ScanCode_$Impl_$.BRIGHTNESS_DOWN = 275;
lime_ui__$ScanCode_ScanCode_$Impl_$.BRIGHTNESS_UP = 276;
lime_ui__$ScanCode_ScanCode_$Impl_$.DISPLAY_SWITCH = 277;
lime_ui__$ScanCode_ScanCode_$Impl_$.BACKLIGHT_TOGGLE = 278;
lime_ui__$ScanCode_ScanCode_$Impl_$.BACKLIGHT_DOWN = 279;
lime_ui__$ScanCode_ScanCode_$Impl_$.BACKLIGHT_UP = 280;
lime_ui__$ScanCode_ScanCode_$Impl_$.EJECT = 281;
lime_ui__$ScanCode_ScanCode_$Impl_$.SLEEP = 282;
lime_ui_Touch.onEnd = new lime_app__$Event_$lime_$ui_$Touch_$Void();
lime_ui_Touch.onMove = new lime_app__$Event_$lime_$ui_$Touch_$Void();
lime_ui_Touch.onStart = new lime_app__$Event_$lime_$ui_$Touch_$Void();
lime_utils_Assets.cache = new lime_utils_AssetCache();
lime_utils_Assets.onChange = new lime_app__$Event_$Void_$Void();
lime_utils_Assets.libraries = new haxe_ds_StringMap();
lime_utils_Assets.libraryPaths = new haxe_ds_StringMap();
lime_utils__$Float32Array_Float32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$Float64Array_Float64Array_$Impl_$.BYTES_PER_ELEMENT = 8;
lime_utils__$Int16Array_Int16Array_$Impl_$.BYTES_PER_ELEMENT = 2;
lime_utils__$Int32Array_Int32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$Int8Array_Int8Array_$Impl_$.BYTES_PER_ELEMENT = 1;
lime_utils_Log.throwErrors = true;
lime_utils__$Log_LogLevel_$Impl_$.NONE = 0;
lime_utils__$Log_LogLevel_$Impl_$.ERROR = 1;
lime_utils__$Log_LogLevel_$Impl_$.WARN = 2;
lime_utils__$Log_LogLevel_$Impl_$.INFO = 3;
lime_utils__$Log_LogLevel_$Impl_$.DEBUG = 4;
lime_utils__$Log_LogLevel_$Impl_$.VERBOSE = 5;
lime_utils__$UInt16Array_UInt16Array_$Impl_$.BYTES_PER_ELEMENT = 2;
lime_utils__$UInt32Array_UInt32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$UInt8Array_UInt8Array_$Impl_$.BYTES_PER_ELEMENT = 1;
lime_utils__$UInt8ClampedArray_UInt8ClampedArray_$Impl_$.BYTES_PER_ELEMENT = 1;
miniclip_core_PSDebug.debug = false;
miniclip_core_PromoVO.__rtti = "\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t'???'\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\n\t<_promoSystem>\n\t\n\t<_dataAccessList>\n\t\n\t\n\n\t<_className>\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{avoidAllocations:false}\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t<_parse set=\"method\" line=\"157\">\n\t\n\t\n\t\n\n\t<_parseClass set=\"method\" line=\"184\">\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t<_parseArray params=\"T\" set=\"method\" line=\"206\">\n\t\n\t\n\t\n\t\n\n\t<_parseMap params=\"K:V\" set=\"method\" line=\"228\">\n\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{rootCall:false}\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{depth:0,recursive:false}\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\t\n\t\t\n\t\n";
miniclip_core_PromoVO.classCache = new haxe_ds_StringMap();
miniclip_promotionsystem_core_PromotionDataAccessManager.PROMOTION_DATA_ACCESS_DEFAULT = "default";
miniclip_promotionsystem_core_PromotionSystem.CURRENT_TIMESTAMP_STATE = "currentTimestampState";
miniclip_promotionsystem_core_PromotionSystem.OFFERS_STATE = "offersState";
miniclip_promotionsystem_core_PromotionSystem.ACTIVE_OFFERS_STATE = "activeOffersState";
miniclip_promotionsystem_core_PromotionSystem.OFFER_POP_UP_PRIORITTIZED_QUEUE_STATE = "OfferPopUpPrioritizedQueueState";
miniclip_promotionsystem_core_PromotionSystem.OFFER_POP_UP_QUEUE_STATE = "OfferPopUpQueueState";
miniclip_promotionsystem_core_PromotionSystem.PROMOTION_SYSTEM_BASE_DEFAULT_SAVE_DATA_KEY = "promotionSystemBaseSaveData";
miniclip_promotionsystem_core_interfaces_PromotionClientActionType.TYPE_DISMISS = "dismiss";
miniclip_promotionsystem_core_interfaces_PromotionClientActionType.TYPE_REDIRECT = "redirect";
miniclip_promotionsystem_core_interfaces_PromotionClientActionType.TYPE_PURCHASE = "transaction";
miniclip_promotionsystem_core_interfaces_PromotionClientActionType.TYPE_STORE = "store";
miniclip_promotionsystem_core_interfaces_PromotionClientActionType.TYPE_URL = "url";
miniclip_promotionsystem_core_interfaces_PromotionClientActionParams.PARAM_TARGET = "target";
miniclip_promotionsystem_core_interfaces_PromotionClientActionParams.PARAM_ITEM_ID = "itemId";
miniclip_promotionsystem_core_interfaces_PromotionClientActionParams.PARAM_TRANSACTION_ID = "transactionId";
miniclip_promotionsystem_core_interfaces_PromotionClientActionParams.PARAM_APPID = "appId";
miniclip_promotionsystem_core_interfaces_PromotionClientActionParams.PARAM_URL = "url";
miniclip_promotionsystem_core_model_DataAccessSolver.indirections = { };
miniclip_promotionsystem_core_model_TimeVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_TimeVO.MINUTE_IN_SECONDS = 60;
miniclip_promotionsystem_core_model_TimeVO.HOUR_IN_SECONDS = 3600;
miniclip_promotionsystem_core_model_TimeVO.DAY_IN_SECONDS = 86400;
miniclip_promotionsystem_core_model_TimeVO.WEEK_IN_SECONDS = 604800;
miniclip_promotionsystem_core_model_TimeVO.MONTH_IN_SECONDS = 2678400;
miniclip_promotionsystem_core_model_TimeVO.YEAR_IN_SECONDS = 31536000;
miniclip_promotionsystem_core_model_vo_AssetConfigVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_ButtonConfigurationVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_ColorDataVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t<_r>\n\t<_g>\n\t<_b>\n\t<_a>\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_DateVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_ImageDataVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_ImageEntryVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_ImageEntryVO.CONFIG_IMAGE_TYPE_SPRITE = "Sprite";
miniclip_promotionsystem_core_model_vo_ImageEntryVO.CONFIG_IMAGE_TYPE_FRAMED_SPRITE = "FramedSprite";
miniclip_promotionsystem_core_model_vo_ImageEntryVO.CONFIG_IMAGE_TYPE_HORIZONTAL_STRETCH_FRAME = "HorizontalStretchFrame";
miniclip_promotionsystem_core_model_vo_ImageEntryVO.CONFIG_IMAGE_TYPE_SPECIAL = "Special";
miniclip_promotionsystem_core_model_vo_NotificationDataVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.TARGET_COIN_SHOP = "coinShop";
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.TARGET_CASH_SHOP = "cashShop";
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.TARGET_CUE_SHOP = "cueShop";
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.TARGET_POWER_SHOP = "powerShop";
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.TARGET_MINIGAMES_SHOP = "miniGameShop";
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.TARGET_MATCH_TIERS = "matchTiers";
miniclip_promotionsystem_core_model_vo_PopupActionParametersVO.TARGET_TOURNAMENT_TIERS = "tournamentTiers";
miniclip_promotionsystem_core_model_vo_PopupActionVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_PopupActionVO.ACTION_REDIRECT = "redirect";
miniclip_promotionsystem_core_model_vo_PopupActionVO.ACTION_TRANSACTION = "transaction";
miniclip_promotionsystem_core_model_vo_PopupActionVO.ACTION_DISMISS = "dismiss";
miniclip_promotionsystem_core_model_vo_PopupActionVO.ACTION_STORE = "store";
miniclip_promotionsystem_core_model_vo_PopupActionVO.ACTION_URL = "url";
miniclip_promotionsystem_core_model_vo_PopupActionVO.SUCCESS_TRIGGER_STATE = "successTriggerState";
miniclip_promotionsystem_core_model_vo_PopupActionVO.FAILURE_TRIGGER_STATE = "failureTriggerState";
miniclip_promotionsystem_core_model_vo_PopupCustomData.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_PromotionOffer.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t<_initialized>\n\t\n\t\n\t\n\t\n\t\n\n\t<_startTimestamp>\n\t<_endTimestamp>\n\t<_endOfActivationTimestamp>\n\t<_state>\n\t<_offerType>\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\t\n\t\tpartials.Partials.process()\n\t\tpartials.Partials.process()\n\t\t\n\t\n";
miniclip_promotionsystem_core_model_vo_PromotionOffer.TRIGGER_WaitForEventTrigger = "MCPromoWaitForEventTrigger";
miniclip_promotionsystem_core_model_vo_PromotionOffer.TRIGGER_WaitForTimeTrigger = "MCPromoWaitForTimeTrigger";
miniclip_promotionsystem_core_model_vo_PromotionOffer.TRIGGER_WaitForDeltaTimeTrigger = "MCPromoWaitForDeltaTimeTrigger";
miniclip_promotionsystem_core_model_vo_PromotionOffer.TRIGGER_WaitForNestedTriggersTrigger = "MCPromoWaitForNestedTriggersTrigger";
miniclip_promotionsystem_core_model_vo_PromotionOffer.TRIGGER_WaitForSequenceNestedTriggersTrigger = "MCPromoWaitForSequencedNestedTriggersTrigger";
miniclip_promotionsystem_core_model_vo_PromotionOffer.START_TRIGGER_STATE = "startTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.WAKE_UP_TRIGGER_STATE = "wakeupTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.BADGE_END_TRIGGER_STATE = "badgeEndTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.POP_UP_TRIGGER_STATE = "popUpTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.POP_UP_DISSMISSED_TRIGGER_STATE = "popUpDismissedTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.KILL_TRIGGER_STATE = "killTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.RESET_TRIGGER_STATE = "resetTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.INTERRUPT_TRIGGER_STATE = "interruptTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.RESUME_TRIGGER_STATE = "resumeTriggerState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.LAST_ACTIVATION_TIMESTAMP_STATE = "lastActivation";
miniclip_promotionsystem_core_model_vo_PromotionOffer.PROMOTION_ACTIONS_STATE = "promotionActionsState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.PROMOTION_OFFER_POP_UP_DISMISS_TRIGGER_NAME = "PROMO_OFFER_POP_UP_TRIGGER";
miniclip_promotionsystem_core_model_vo_PromotionOffer.PROMOTION_OFFER_POP_UP_DISMISS_EVENT = "PROMO_OFFER_POP_UP_DISMISS_";
miniclip_promotionsystem_core_model_vo_PromotionOffer.PROMOTION_OFFER_POP_UP_DISMISSED_EVENT = "PROMO_OFFER_POP_UP_DISMISSED_";
miniclip_promotionsystem_core_model_vo_PromotionOffer.PROMOTION_OFFER_ACTION_SUCCESS_EVENT = "PROMO_OFFER_ACTION_SUCCESS_";
miniclip_promotionsystem_core_model_vo_PromotionOffer.PROMOTION_OFFER_ACTION_FAILURE_EVENT = "PROMO_OFFER_ACITON_FAILURE_";
miniclip_promotionsystem_core_model_vo_PromotionOffer.CURRENT_TIMESTAMP_STATE = "currentTimestampState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.PROMOTION_OFFER_STATE = "promotionOfferState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.POP_UP_ACTIVE_STATE = "popupActiveState";
miniclip_promotionsystem_core_model_vo_PromotionOffer.INTERRUPT_PROMOTION_STATE = "interrumptPromotionState";
miniclip_promotionsystem_core_model_vo_ReplaceProductVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_StoreChangeVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_TextEntryVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_TextEntryVO.TEXT_DATA_TYPE_TEXT = "text";
miniclip_promotionsystem_core_model_vo_TextEntryVO.TEXT_DATA_TYPE_OLD_PRICE = "oldPrice";
miniclip_promotionsystem_core_model_vo_TextEntryVO.TEXT_DATA_TYPE_NEW_PRICE = "newPrice";
miniclip_promotionsystem_core_model_vo_TextEntryVO.TEXT_DATA_TYPE_OLD_AMOUNT = "oldAmount";
miniclip_promotionsystem_core_model_vo_TextEntryVO.TEXT_DATA_TYPE_NEW_AMOUNT = "newAmount";
miniclip_promotionsystem_core_model_vo_TextEntryVO.TEXT_DATA_TYPE_DESCRIPTION = "description";
miniclip_promotionsystem_core_model_vo_TextEntryVO.TEXT_DATA_TYPE_JSON_QUERY = "jsonQuery";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBaseVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessABTestVO.TYPE = "MCPromoDataAccessABtest";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessEntryVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_dataAccess_ABTestVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessBoolPropertyVO.TYPE = "MCPromoDataAccessBoolProperty";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectTemplateVO.TYPE = "MCPromoDataAccessIndirectTemplate";
miniclip_promotionsystem_core_model_vo_dataAccess_ReplacementVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessIndirectVO.TYPE = "MCPromoDataAccessIndirect";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessLocalizationVO.TYPE = "MCPromoDataAccessLocalization";
miniclip_promotionsystem_core_model_vo_dataAccess_LanguageVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessNumberPropertyVO.TYPE = "MCPromoDataAccessNumberProperty";
miniclip_promotionsystem_core_model_vo_dataAccess_NumberVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_dataAccess_RangeVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_dataAccess_RangeVO.DEFAULT = "default";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessPlatformVO.TYPE = "MCPromoDataAccessPlatform";
miniclip_promotionsystem_core_model_vo_dataAccess_PlatformVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_dataAccess_DataAccessUserPropertyVO.TYPE = "MCPromoDataAccessUserProperty";
miniclip_promotionsystem_core_model_vo_dataAccess_UserPropertiesVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n";
miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO.SEPARATOR = "_";
miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO.ENABLED_STATE = "enabledState";
miniclip_promotionsystem_core_model_vo_triggers_PromotionMultiEventVO.TRIGGER_EVENTS_STATE = "triggerEventsState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t<_enabled line=\"34\">\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.TRIGGER_WaitForEventTrigger = "MCPromoWaitForEventTrigger";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.TRIGGER_WaitForTimeTrigger = "MCPromoWaitForTimeTrigger";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.TRIGGER_WaitForMultiTimeTrigger = "MCPromoWaitForMultiTimeTrigger";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.TRIGGER_WaitForDeltaTimeTrigger = "MCPromoWaitForDeltaTimeTrigger";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.TRIGGER_WaitForNestedTriggersTrigger = "MCPromoWaitForNestedTriggersTrigger";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.TRIGGER_WaitForSequenceNestedTriggersTrigger = "MCPromoWaitForSequencedNestedTriggersTrigger";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.RESET_EVENT_STATE = "resetEventState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.ENABLE_EVENT_STATE = "enableEventState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.DISABLE_EVENT_STATE = "disableEventState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.RESET_ON_DISABLE_STATE = "resetOnDisableState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.NUM_ACTIVATIONS_STATE = "numActivationsState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.MAX_ACTIVATIONS_STATE = "maxActivations";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.SUPER_CLASS_STATE = "superClassState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.RECEIVED_EVENT = "receivedEvent";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.ENABLED_STATE = "enabledState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerEventVO.TRIGGER_EVENTS_STATE = "triggerEventsState";
miniclip_promotionsystem_core_model_vo_triggers_TriggerParametersVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.LAST_ACTIVATION_STATE = "lastActivationState";
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.START_TIMESTAMP_STATE = "startTimestampState";
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeBaseTrigger.CURRENT_TIMESTAMP_STATE = "currentTimestampState";
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.MINUTE_IN_SECONDS = 60;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.HOUR_IN_SECONDS = 3600;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.DAY_IN_SECONDS = 86400;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.WEEK_IN_SECONDS = 604800;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.MONTH_IN_SECONDS = 2678400;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTrigger.YEAR_IN_SECONDS = 31536000;
miniclip_promotionsystem_core_model_vo_triggers_WaitForDeltaTimeTriggerParameters.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTrigger.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForEventTriggerParameters.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTrigger.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForMultiTimeTriggerParameters.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTrigger.TRIGGERS_MAP = "triggersMapState";
miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTrigger.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForSequencedNestedTriggersTriggerParameters.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForNestedTriggersTriggerParameters.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTrigger.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\n\t\n";
miniclip_promotionsystem_core_model_vo_triggers_WaitForTimeTriggerParameters.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
motion_actuators_SimpleActuator.actuators = [];
motion_actuators_SimpleActuator.actuatorsLength = 0;
motion_actuators_SimpleActuator.addedEvent = false;
motion_Actuate.defaultActuator = motion_actuators_SimpleActuator;
motion_Actuate.defaultEase = motion_easing_Expo.get_easeOut();
motion_Actuate.targetLibraries = new haxe_ds_ObjectMap();
oaktree_OakTree.events = new oaktree_core_events_Dispatcher();
oaktree_OakTree.commands = new oaktree_ext_commands_Commands();
oaktree_OakTree._isInitialized = false;
oaktree_core_Entity._idCounter = 0;
oaktree_core_JobScheduler.DEFAULT_TIME_PER_UPDATE = 8.33333333333333393;
oaktree_core_Log.ALL = 0;
oaktree_core_Log.TRACE = 1;
oaktree_core_Log.DEBUG = 2;
oaktree_core_Log.INFO = 3;
oaktree_core_Log.WARN = 4;
oaktree_core_Log.ERROR = 5;
oaktree_core_Log.FATAL = 6;
oaktree_core_Log.OFF = 7;
oaktree_core_Log._level = 5;
oaktree_core_Log._log_width = 20;
oaktree_core_events_ConnectionEvent.RETRY_ATTEMPTS_ENDED = "retryAttemptsEnded";
oaktree_core_events_UserEvent.USER_LOGGED_IN = "UserEvent::USER_LOGGED";
oaktree_core_events_UserEvent.USER_LOGGED_OUT = "userLoggedOut";
oaktree_core_io_IO._ftypeMapping = new haxe_ds_StringMap();
oaktree_display_AssetsManager.webRegex = new EReg("(\\-web\\b)|(-web)$","g");
openfl_geom_Point.__pool = new lime_utils_ObjectPool_$openfl_$geom_$Point(function() {
return new openfl_geom_Point();
},function(p) {
p.setTo(0,0);
});
oaktree_display_BaseTexture.sOrigin = new openfl_geom_Point();
oaktree_display_GUIInstances.instances = new haxe_ds_StringMap();
openfl_geom_Matrix.__identity = new openfl_geom_Matrix();
openfl_geom_Matrix.__matrix3 = new lime_math_Matrix3();
openfl_geom_Matrix.__pool = new lime_utils_ObjectPool_$openfl_$geom_$Matrix(function() {
return new openfl_geom_Matrix();
},function(m) {
m.identity();
});
oaktree_display_SubTexture._tTexCoords = new openfl_geom_Point();
oaktree_display_SubTexture._tMatrix = new openfl_geom_Matrix();
oaktree_events_StateEvent.STATE_CHANGE = "oaktree.utils.state_change";
oaktree_ext_localization_I18n.biddings = new haxe_ds_StringMap();
oaktree_ext_localization_I18n.onInit = new msignal_Signal0();
oaktree_ext_localization_I18n.initialized = false;
oaktree_objects_FramedSpriteVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\t\n";
oaktree_objects_ManifestVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
oaktree_objects_AssetVO.__rtti = "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n";
openfl__$internal_text_TextEngine.UTF8_TAB = 9;
openfl__$internal_text_TextEngine.UTF8_ENDLINE = 10;
openfl__$internal_text_TextEngine.UTF8_SPACE = 32;
openfl__$internal_text_TextEngine.UTF8_HYPHEN = 45;
openfl__$internal_text_TextEngine.__defaultFonts = new haxe_ds_StringMap();
oaktree_utils_Accounting.codeToSymbolMap = (function($this) {
var $r;
var _g = new haxe_ds_StringMap();
if(__map_reserved.USD != null) _g.setReserved("USD","$"); else _g.h["USD"] = "$";
if(__map_reserved.EUR != null) _g.setReserved("EUR","€"); else _g.h["EUR"] = "€";
if(__map_reserved.GBP != null) _g.setReserved("GBP","£"); else _g.h["GBP"] = "£";
$r = _g;
return $r;
}(this));
oaktree_utils_Accounting.settings = { currency : { symbol : "$", format : "%s%v", decimal : ".", thousand : ",", precision : 2, grouping : 3}, number : { precision : 0, grouping : 3, thousand : ",", decimal : "."}};
oaktree_utils_Slice9Bitmap.POINT_ZERO = new openfl_geom_Point();
oaktree_utils_Slice9Bitmap.SLICES = 9;
oaktree_utils_StringUtility.NUMBER_FORMAT_NUMBER = "#";
oaktree_utils_StringUtility.NUMBER_FORMAT_ZERO = "0";
oaktree_utils_StringUtility.NUMBER_DECIMAL = ".";
oaktree_utils_StringUtility.FORMAT_REGEXP = new EReg("{(\\d+)(:([^}]+))?}","g");
oaktree_utils_StringUtility.stringReg = new EReg("%@","");
oaktree_utils_StringUtility.intReg = new EReg("%i","");
oaktree_utils_Warehouse._store = new oaktree_utils_WarehouseInstance();
openfl_Lib.current = new openfl_display_MovieClip();
openfl_Lib.__sentWarnings = new haxe_ds_StringMap();
openfl__$internal_renderer_DrawCommandBuffer.empty = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_cairo_CairoGraphics.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_cairo_CairoGraphics.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_cairo_CairoGraphics.fillCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_canvas_CanvasGraphics.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_canvas_CanvasGraphics.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_canvas_CanvasGraphics.hitTestCanvas = window.document.createElement("canvas");
openfl__$internal_renderer_canvas_CanvasGraphics.hitTestContext = openfl__$internal_renderer_canvas_CanvasGraphics.hitTestCanvas.getContext("2d");
openfl__$internal_renderer_dom_DOMTextField.__regexColor = new EReg("color=(\"#([^\"]+)\"|'#([^']+)')","i");
openfl__$internal_renderer_dom_DOMTextField.__regexFace = new EReg("face=(\"([^\"]+)\"|'([^']+)')","i");
openfl__$internal_renderer_dom_DOMTextField.__regexFont = new EReg("]+)>","gi");
openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont = new EReg("","gi");
openfl__$internal_renderer_dom_DOMTextField.__regexSize = new EReg("size=(\"([^\"]+)\"|'([^']+)')>","i");
openfl__$internal_stage3D_AGALConverter.limitedProfile = true;
openfl__$internal_stage3D_Context3DStateCache.FLOATS_PER_REGISTER = 4;
openfl__$internal_stage3D_Context3DStateCache.MAX_NUM_REGISTERS = 1024;
openfl__$internal_stage3D_Context3DStateCache.disableCache = true;
openfl__$internal_stage3D_GLUtils.debug = false;
openfl__$internal_swf_SWFLite.instances = new haxe_ds_StringMap();
openfl__$internal_utils_PerlinNoise.P = [151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180];
openfl_display__$BlendMode_BlendMode_$Impl_$.ADD = 0;
openfl_display__$BlendMode_BlendMode_$Impl_$.ALPHA = 1;
openfl_display__$BlendMode_BlendMode_$Impl_$.DARKEN = 2;
openfl_display__$BlendMode_BlendMode_$Impl_$.DIFFERENCE = 3;
openfl_display__$BlendMode_BlendMode_$Impl_$.ERASE = 4;
openfl_display__$BlendMode_BlendMode_$Impl_$.HARDLIGHT = 5;
openfl_display__$BlendMode_BlendMode_$Impl_$.INVERT = 6;
openfl_display__$BlendMode_BlendMode_$Impl_$.LAYER = 7;
openfl_display__$BlendMode_BlendMode_$Impl_$.LIGHTEN = 8;
openfl_display__$BlendMode_BlendMode_$Impl_$.MULTIPLY = 9;
openfl_display__$BlendMode_BlendMode_$Impl_$.NORMAL = 10;
openfl_display__$BlendMode_BlendMode_$Impl_$.OVERLAY = 11;
openfl_display__$BlendMode_BlendMode_$Impl_$.SCREEN = 12;
openfl_display__$BlendMode_BlendMode_$Impl_$.SHADER = 13;
openfl_display__$BlendMode_BlendMode_$Impl_$.SUBTRACT = 14;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.NONE = 0;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.ROUND = 1;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.SQUARE = 2;
openfl_display__$GradientType_GradientType_$Impl_$.LINEAR = 0;
openfl_display__$GradientType_GradientType_$Impl_$.RADIAL = 1;
openfl_display_GraphicsPath.SIN45 = 0.70710678118654752440084436210485;
openfl_display_GraphicsPath.TAN22 = 0.4142135623730950488016887242097;
openfl_display__$GraphicsPathWinding_GraphicsPathWinding_$Impl_$.EVEN_ODD = 0;
openfl_display__$GraphicsPathWinding_GraphicsPathWinding_$Impl_$.NON_ZERO = 1;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.LINEAR_RGB = 0;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.RGB = 1;
openfl_display__$JointStyle_JointStyle_$Impl_$.BEVEL = 0;
openfl_display__$JointStyle_JointStyle_$Impl_$.MITER = 1;
openfl_display__$JointStyle_JointStyle_$Impl_$.ROUND = 2;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.HORIZONTAL = 0;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.NONE = 1;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.NORMAL = 2;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.VERTICAL = 3;
openfl_display_LoaderInfo.__rootURL = window.document.URL;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.ALWAYS = 0;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.AUTO = 1;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.NEVER = 2;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.BOOL = 0;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.BOOL2 = 1;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.BOOL3 = 2;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.BOOL4 = 3;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.FLOAT = 4;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.FLOAT2 = 5;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.FLOAT3 = 6;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.FLOAT4 = 7;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.INT = 8;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.INT2 = 9;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.INT3 = 10;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.INT4 = 11;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX2X2 = 12;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX2X3 = 13;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX2X4 = 14;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX3X2 = 15;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX3X3 = 16;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX3X4 = 17;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX4X2 = 18;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX4X3 = 19;
openfl_display__$ShaderParameterType_ShaderParameterType_$Impl_$.MATRIX4X4 = 20;
openfl_display__$ShaderPrecision_ShaderPrecision_$Impl_$.FAST = 0;
openfl_display__$ShaderPrecision_ShaderPrecision_$Impl_$.FULL = 1;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.PAD = 0;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.REFLECT = 1;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.REPEAT = 2;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM = 0;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM_LEFT = 1;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM_RIGHT = 2;
openfl_display__$StageAlign_StageAlign_$Impl_$.LEFT = 3;
openfl_display__$StageAlign_StageAlign_$Impl_$.RIGHT = 4;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP = 5;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP_LEFT = 6;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP_RIGHT = 7;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.FULL_SCREEN = 0;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.FULL_SCREEN_INTERACTIVE = 1;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.NORMAL = 2;
openfl_display__$StageQuality_StageQuality_$Impl_$.BEST = 0;
openfl_display__$StageQuality_StageQuality_$Impl_$.HIGH = 1;
openfl_display__$StageQuality_StageQuality_$Impl_$.LOW = 2;
openfl_display__$StageQuality_StageQuality_$Impl_$.MEDIUM = 3;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.EXACT_FIT = 0;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.NO_BORDER = 1;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.NO_SCALE = 2;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.SHOW_ALL = 3;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.NEGATIVE = 0;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.NONE = 1;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.POSITIVE = 2;
openfl_display3D_Context3D.supportsVideoTexture = true;
openfl_display3D_Context3D.MAX_SAMPLERS = 8;
openfl_display3D_Context3D.MAX_ATTRIBUTES = 16;
openfl_display3D_Context3D.MAX_PROGRAM_REGISTERS = 128;
openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT = 0;
openfl_display3D_Context3D.DEPTH_STENCIL = 0;
openfl_display3D_Context3D.__stateCache = new openfl__$internal_stage3D_Context3DStateCache();
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.DRAW_CALLS = 0;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.COUNT_INDEX_BUFFER = 1;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.COUNT_VERTEX_BUFFER = 2;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.COUNT_TEXTURE = 3;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.COUNT_TEXTURE_COMPRESSED = 4;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.COUNT_PROGRAM = 5;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.MEM_INDEX_BUFFER = 6;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.MEM_VERTEX_BUFFER = 7;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.MEM_TEXTURE = 8;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.MEM_TEXTURE_COMPRESSED = 9;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.MEM_PROGRAM = 10;
openfl_display3D__$Context3D_Context3DTelemetry_$Impl_$.$length = 11;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.DESTINATION_ALPHA = 0;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.DESTINATION_COLOR = 1;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.ONE = 2;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.ONE_MINUS_DESTINATION_ALPHA = 3;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.ONE_MINUS_DESTINATION_COLOR = 4;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.ONE_MINUS_SOURCE_ALPHA = 5;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.ONE_MINUS_SOURCE_COLOR = 6;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.SOURCE_ALPHA = 7;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.SOURCE_COLOR = 8;
openfl_display3D__$Context3DBlendFactor_Context3DBlendFactor_$Impl_$.ZERO = 9;
openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.DYNAMIC_DRAW = 0;
openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.STATIC_DRAW = 1;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.ALWAYS = 0;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.EQUAL = 1;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.GREATER = 2;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.GREATER_EQUAL = 3;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.LESS = 4;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.LESS_EQUAL = 5;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.NEVER = 6;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.NOT_EQUAL = 7;
openfl_display3D__$Context3DMipFilter_Context3DMipFilter_$Impl_$.MIPLINEAR = 0;
openfl_display3D__$Context3DMipFilter_Context3DMipFilter_$Impl_$.MIPNEAREST = 1;
openfl_display3D__$Context3DMipFilter_Context3DMipFilter_$Impl_$.MIPNONE = 2;
openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$.BASELINE = 0;
openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$.BASELINE_CONSTRAINED = 1;
openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$.BASELINE_EXTENDED = 2;
openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$.STANDARD = 3;
openfl_display3D__$Context3DProfile_Context3DProfile_$Impl_$.STANDARD_CONSTRAINED = 4;
openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.FRAGMENT = 0;
openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.VERTEX = 1;
openfl_display3D__$Context3DRenderMode_Context3DRenderMode_$Impl_$.AUTO = 0;
openfl_display3D__$Context3DRenderMode_Context3DRenderMode_$Impl_$.SOFTWARE = 1;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.DECREMENT_SATURATE = 0;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.DECREMENT_WRAP = 1;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.INCREMENT_SATURATE = 2;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.INCREMENT_WRAP = 3;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.INVERT = 4;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.KEEP = 5;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.SET = 6;
openfl_display3D__$Context3DStencilAction_Context3DStencilAction_$Impl_$.ZERO = 7;
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.ANISOTROPIC16X = 0;
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.ANISOTROPIC2X = 1;
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.ANISOTROPIC4X = 2;
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.ANISOTROPIC8X = 3;
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.LINEAR = 4;
openfl_display3D__$Context3DTextureFilter_Context3DTextureFilter_$Impl_$.NEAREST = 5;
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.BGR_PACKED = 0;
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.BGRA = 1;
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.BGRA_PACKED = 2;
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.COMPRESSED = 3;
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.COMPRESSED_ALPHA = 4;
openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.RGBA_HALF_FLOAT = 5;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.BACK = 0;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.FRONT = 1;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.FRONT_AND_BACK = 2;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.NONE = 3;
openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$.BYTES_4 = 0;
openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$.FLOAT_1 = 1;
openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$.FLOAT_2 = 2;
openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$.FLOAT_3 = 3;
openfl_display3D__$Context3DVertexBufferFormat_Context3DVertexBufferFormat_$Impl_$.FLOAT_4 = 4;
openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$.CLAMP = 0;
openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$.CLAMP_U_REPEAT_V = 1;
openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$.REPEAT = 2;
openfl_display3D__$Context3DWrapMode_Context3DWrapMode_$Impl_$.REPEAT_U_CLAMP_V = 3;
openfl_display3D_Program3D.verbose = lime_utils_Log.level == 5;
openfl_display3D_textures_Texture.__lowMemoryMode = false;
openfl_errors_Error.DEFAULT_TO_STRING = "Error";
openfl_events_ActivityEvent.ACTIVITY = "activity";
openfl_events_TextEvent.LINK = "link";
openfl_events_TextEvent.TEXT_INPUT = "textInput";
openfl_events_ErrorEvent.ERROR = "error";
openfl_events_FocusEvent.FOCUS_IN = "focusIn";
openfl_events_FocusEvent.FOCUS_OUT = "focusOut";
openfl_events_FocusEvent.KEY_FOCUS_CHANGE = "keyFocusChange";
openfl_events_FocusEvent.MOUSE_FOCUS_CHANGE = "mouseFocusChange";
openfl_events_FullScreenEvent.FULL_SCREEN = "fullScreen";
openfl_events_FullScreenEvent.FULL_SCREEN_INTERACTIVE_ACCEPTED = "fullScreenInteractiveAccepted";
openfl_events_GameInputEvent.DEVICE_ADDED = "deviceAdded";
openfl_events_GameInputEvent.DEVICE_REMOVED = "deviceRemoved";
openfl_events_GameInputEvent.DEVICE_UNUSABLE = "deviceUnusable";
openfl_events_HTTPStatusEvent.HTTP_RESPONSE_STATUS = "httpResponseStatus";
openfl_events_HTTPStatusEvent.HTTP_STATUS = "httpStatus";
openfl_events_IOErrorEvent.IO_ERROR = "ioError";
openfl_events_KeyboardEvent.KEY_DOWN = "keyDown";
openfl_events_KeyboardEvent.KEY_UP = "keyUp";
openfl_events_MouseEvent.CLICK = "click";
openfl_events_MouseEvent.DOUBLE_CLICK = "doubleClick";
openfl_events_MouseEvent.MIDDLE_CLICK = "middleClick";
openfl_events_MouseEvent.MIDDLE_MOUSE_DOWN = "middleMouseDown";
openfl_events_MouseEvent.MIDDLE_MOUSE_UP = "middleMouseUp";
openfl_events_MouseEvent.MOUSE_DOWN = "mouseDown";
openfl_events_MouseEvent.MOUSE_MOVE = "mouseMove";
openfl_events_MouseEvent.MOUSE_OUT = "mouseOut";
openfl_events_MouseEvent.MOUSE_OVER = "mouseOver";
openfl_events_MouseEvent.MOUSE_UP = "mouseUp";
openfl_events_MouseEvent.MOUSE_WHEEL = "mouseWheel";
openfl_events_MouseEvent.RIGHT_CLICK = "rightClick";
openfl_events_MouseEvent.RIGHT_MOUSE_DOWN = "rightMouseDown";
openfl_events_MouseEvent.RIGHT_MOUSE_UP = "rightMouseUp";
openfl_events_MouseEvent.ROLL_OUT = "rollOut";
openfl_events_MouseEvent.ROLL_OVER = "rollOver";
openfl_events_NetStatusEvent.NET_STATUS = "netStatus";
openfl_events_ProgressEvent.PROGRESS = "progress";
openfl_events_ProgressEvent.SOCKET_DATA = "socketData";
openfl_events_SecurityErrorEvent.SECURITY_ERROR = "securityError";
openfl_events_TimerEvent.TIMER = "timer";
openfl_events_TimerEvent.TIMER_COMPLETE = "timerComplete";
openfl_events_TouchEvent.TOUCH_BEGIN = "touchBegin";
openfl_events_TouchEvent.TOUCH_END = "touchEnd";
openfl_events_TouchEvent.TOUCH_MOVE = "touchMove";
openfl_events_TouchEvent.TOUCH_OUT = "touchOut";
openfl_events_TouchEvent.TOUCH_OVER = "touchOver";
openfl_events_TouchEvent.TOUCH_ROLL_OUT = "touchRollOut";
openfl_events_TouchEvent.TOUCH_ROLL_OVER = "touchRollOver";
openfl_events_TouchEvent.TOUCH_TAP = "touchTap";
openfl_events_UncaughtErrorEvent.UNCAUGHT_ERROR = "uncaughtError";
openfl_filters_BlurFilter.__blurShader = new openfl_filters__$BlurFilter_BlurShader();
openfl_filters_ColorMatrixFilter.__colorMatrixShader = new openfl_filters__$ColorMatrixFilter_ColorMatrixShader();
openfl_filters_GlowFilter.__glowShader = new openfl_filters__$GlowFilter_GlowShader();
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.AXIS_ANGLE = 0;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.EULER_ANGLES = 1;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.QUATERNION = 2;
openfl_geom_Rectangle.__pool = new lime_utils_ObjectPool_$openfl_$geom_$Rectangle(function() {
return new openfl_geom_Rectangle();
},function(r) {
r.setTo(0,0,0,0);
});
openfl_media_SoundMixer.MAX_ACTIVE_CHANNELS = 32;
openfl_media_SoundMixer.__soundChannels = [];
openfl_media_SoundMixer.__soundTransform = new openfl_media_SoundTransform();
openfl_net_NetConnection.CONNECT_SUCCESS = "connectSuccess";
openfl_net_SharedObject.defaultObjectEncoding = 3;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.FLUSHED = 0;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.PENDING = 1;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.BINARY = 0;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.TEXT = 1;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.VARIABLES = 2;
openfl_system_ApplicationDomain.currentDomain = new openfl_system_ApplicationDomain(null);
openfl_system_SecurityDomain.currentDomain = new openfl_system_SecurityDomain();
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.ADVANCED = 0;
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.NORMAL = 1;
openfl_text_Font.__registeredFonts = [];
openfl_text__$FontStyle_FontStyle_$Impl_$.BOLD = 0;
openfl_text__$FontStyle_FontStyle_$Impl_$.BOLD_ITALIC = 1;
openfl_text__$FontStyle_FontStyle_$Impl_$.ITALIC = 2;
openfl_text__$FontStyle_FontStyle_$Impl_$.REGULAR = 3;
openfl_text__$FontType_FontType_$Impl_$.DEVICE = 0;
openfl_text__$FontType_FontType_$Impl_$.EMBEDDED = 1;
openfl_text__$FontType_FontType_$Impl_$.EMBEDDED_CFF = 2;
openfl_text__$GridFitType_GridFitType_$Impl_$.NONE = 0;
openfl_text__$GridFitType_GridFitType_$Impl_$.PIXEL = 1;
openfl_text__$GridFitType_GridFitType_$Impl_$.SUBPIXEL = 2;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.CENTER = 0;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.LEFT = 1;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.NONE = 2;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.RIGHT = 3;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.DYNAMIC = 0;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.INPUT = 1;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.CENTER = 0;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.END = 1;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.JUSTIFY = 2;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.LEFT = 3;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.RIGHT = 4;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.START = 5;
openfl_ui_GameInput.isSupported = true;
openfl_ui_GameInput.numDevices = 0;
openfl_ui_GameInput.__deviceList = [];
openfl_ui_GameInput.__devices = new haxe_ds_ObjectMap();
openfl_ui_GameInput.__instances = [];
openfl_ui_GameInputDevice.MAX_BUFFER_SIZE = 32000;
openfl_ui_Keyboard.NUMBER_0 = 48;
openfl_ui_Keyboard.NUMBER_1 = 49;
openfl_ui_Keyboard.NUMBER_2 = 50;
openfl_ui_Keyboard.NUMBER_3 = 51;
openfl_ui_Keyboard.NUMBER_4 = 52;
openfl_ui_Keyboard.NUMBER_5 = 53;
openfl_ui_Keyboard.NUMBER_6 = 54;
openfl_ui_Keyboard.NUMBER_7 = 55;
openfl_ui_Keyboard.NUMBER_8 = 56;
openfl_ui_Keyboard.NUMBER_9 = 57;
openfl_ui_Keyboard.A = 65;
openfl_ui_Keyboard.B = 66;
openfl_ui_Keyboard.C = 67;
openfl_ui_Keyboard.D = 68;
openfl_ui_Keyboard.E = 69;
openfl_ui_Keyboard.F = 70;
openfl_ui_Keyboard.G = 71;
openfl_ui_Keyboard.H = 72;
openfl_ui_Keyboard.I = 73;
openfl_ui_Keyboard.J = 74;
openfl_ui_Keyboard.K = 75;
openfl_ui_Keyboard.L = 76;
openfl_ui_Keyboard.M = 77;
openfl_ui_Keyboard.N = 78;
openfl_ui_Keyboard.O = 79;
openfl_ui_Keyboard.P = 80;
openfl_ui_Keyboard.Q = 81;
openfl_ui_Keyboard.R = 82;
openfl_ui_Keyboard.S = 83;
openfl_ui_Keyboard.T = 84;
openfl_ui_Keyboard.U = 85;
openfl_ui_Keyboard.V = 86;
openfl_ui_Keyboard.W = 87;
openfl_ui_Keyboard.X = 88;
openfl_ui_Keyboard.Y = 89;
openfl_ui_Keyboard.Z = 90;
openfl_ui_Keyboard.NUMPAD_0 = 96;
openfl_ui_Keyboard.NUMPAD_1 = 97;
openfl_ui_Keyboard.NUMPAD_2 = 98;
openfl_ui_Keyboard.NUMPAD_3 = 99;
openfl_ui_Keyboard.NUMPAD_4 = 100;
openfl_ui_Keyboard.NUMPAD_5 = 101;
openfl_ui_Keyboard.NUMPAD_6 = 102;
openfl_ui_Keyboard.NUMPAD_7 = 103;
openfl_ui_Keyboard.NUMPAD_8 = 104;
openfl_ui_Keyboard.NUMPAD_9 = 105;
openfl_ui_Keyboard.NUMPAD_MULTIPLY = 106;
openfl_ui_Keyboard.NUMPAD_ADD = 107;
openfl_ui_Keyboard.NUMPAD_ENTER = 108;
openfl_ui_Keyboard.NUMPAD_SUBTRACT = 109;
openfl_ui_Keyboard.NUMPAD_DECIMAL = 110;
openfl_ui_Keyboard.NUMPAD_DIVIDE = 111;
openfl_ui_Keyboard.F1 = 112;
openfl_ui_Keyboard.F2 = 113;
openfl_ui_Keyboard.F3 = 114;
openfl_ui_Keyboard.F4 = 115;
openfl_ui_Keyboard.F5 = 116;
openfl_ui_Keyboard.F6 = 117;
openfl_ui_Keyboard.F7 = 118;
openfl_ui_Keyboard.F8 = 119;
openfl_ui_Keyboard.F9 = 120;
openfl_ui_Keyboard.F10 = 121;
openfl_ui_Keyboard.F11 = 122;
openfl_ui_Keyboard.F12 = 123;
openfl_ui_Keyboard.F13 = 124;
openfl_ui_Keyboard.F14 = 125;
openfl_ui_Keyboard.F15 = 126;
openfl_ui_Keyboard.BACKSPACE = 8;
openfl_ui_Keyboard.TAB = 9;
openfl_ui_Keyboard.ALTERNATE = 18;
openfl_ui_Keyboard.ENTER = 13;
openfl_ui_Keyboard.COMMAND = 15;
openfl_ui_Keyboard.SHIFT = 16;
openfl_ui_Keyboard.CONTROL = 17;
openfl_ui_Keyboard.BREAK = 19;
openfl_ui_Keyboard.CAPS_LOCK = 20;
openfl_ui_Keyboard.NUMPAD = 21;
openfl_ui_Keyboard.ESCAPE = 27;
openfl_ui_Keyboard.SPACE = 32;
openfl_ui_Keyboard.PAGE_UP = 33;
openfl_ui_Keyboard.PAGE_DOWN = 34;
openfl_ui_Keyboard.END = 35;
openfl_ui_Keyboard.HOME = 36;
openfl_ui_Keyboard.LEFT = 37;
openfl_ui_Keyboard.RIGHT = 39;
openfl_ui_Keyboard.UP = 38;
openfl_ui_Keyboard.DOWN = 40;
openfl_ui_Keyboard.INSERT = 45;
openfl_ui_Keyboard.DELETE = 46;
openfl_ui_Keyboard.NUMLOCK = 144;
openfl_ui_Keyboard.SEMICOLON = 186;
openfl_ui_Keyboard.EQUAL = 187;
openfl_ui_Keyboard.COMMA = 188;
openfl_ui_Keyboard.MINUS = 189;
openfl_ui_Keyboard.PERIOD = 190;
openfl_ui_Keyboard.SLASH = 191;
openfl_ui_Keyboard.BACKQUOTE = 192;
openfl_ui_Keyboard.LEFTBRACKET = 219;
openfl_ui_Keyboard.BACKSLASH = 220;
openfl_ui_Keyboard.RIGHTBRACKET = 221;
openfl_ui_Keyboard.QUOTE = 222;
openfl_ui_Mouse.supportsCursor = true;
openfl_ui_Mouse.supportsNativeCursor = true;
openfl_ui_Mouse.__cursor = "auto";
openfl_utils_Assets.cache = new openfl_utils_AssetCache();
openfl_utils_Assets.dispatcher = new openfl_events_EventDispatcher();
openfl_utils__$ByteArray_ByteArray_$Impl_$.__bytePointer = new lime_utils_BytePointerData(null,0);
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.DEFLATE = 0;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.LZMA = 1;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.ZLIB = 2;
openfl_utils__$Endian_Endian_$Impl_$.BIG_ENDIAN = 0;
openfl_utils__$Endian_Endian_$Impl_$.LITTLE_ENDIAN = 1;
org_zamedev_particles_ParticleSystem.EMITTER_TYPE_GRAVITY = 0;
org_zamedev_particles_ParticleSystem.EMITTER_TYPE_RADIAL = 1;
org_zamedev_particles_ParticleSystem.POSITION_TYPE_FREE = 0;
org_zamedev_particles_ParticleSystem.POSITION_TYPE_RELATIVE = 1;
org_zamedev_particles_ParticleSystem.POSITION_TYPE_GROUPED = 2;
org_zamedev_particles_util_MathHelper.EPSILON = 0.00000001;
promhx_base_EventLoop.queue = new List();
protohx_WireType.VARINT = 0;
protohx_WireType.FIXED_64_BIT = 1;
protohx_WireType.LENGTH_DELIMITED = 2;
protohx_WireType.FIXED_32_BIT = 5;
ApplicationMain.main();
})(typeof console != "undefined" ? console : {log:function(){}}, typeof window != "undefined" ? window : exports, typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);