-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtako80.min.js
1 lines (1 loc) · 130 KB
/
tako80.min.js
1
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.twgl=r():e.twgl=r()}(this,function(){return function(e){function r(n){if(t[n])return t[n].exports;var a=t[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){var n,a;n=[t(1),t(10),t(11),t(12)],a=function(e,r,t,n){"use strict";return e.m4=r,e.v3=t,e.primitives=n,e}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(2),t(5),t(7),t(6),t(8),t(3),t(9),t(4)],a=function(e,r,t,n,a,o,i,u){"use strict";function f(r){u.copyExistingProperties(r,b),e.setDefaults_(r),a.setDefaults_(r)}function s(e){if(e&&b.enableVertexArrayObjects&&u.isWebGL1(e)){var r=e.getExtension("OES_vertex_array_object");r&&(e.createVertexArray=function(){return r.createVertexArrayOES()},e.deleteVertexArray=function(e){r.deleteVertexArrayOES(e)},e.isVertexArray=function(e){return r.isVertexArrayOES(e)},e.bindVertexArray=function(e){r.bindVertexArrayOES(e)},e.VERTEX_ARRAY_BINDING=r.VERTEX_ARRAY_BINDING_OES)}}function c(e,r){for(var t=["webgl","experimental-webgl"],n=null,a=0;a<t.length&&!(n=e.getContext(t[a],r));++a);return n}function l(e,r){var t=c(e,r);return s(t),t}function m(e,r){for(var t=["webgl2","webgl","experimental-webgl"],n=null,a=0;a<t.length&&!(n=e.getContext(t[a],r));++a);return n}function y(e,r){var t=m(e,r);return s(t),t}function p(e,r){r=r||1,r=Math.max(1,r);var t=e.clientWidth*r|0,n=e.clientHeight*r|0;return(e.width!==t||e.height!==n)&&(e.width=t,e.height=n,!0)}function E(e){return"_"!==e[e.length-1]}function d(e,r){return Object.keys(e).filter(E).forEach(function(t){r[t]=e[t]}),r}var b={enableVertexArrayObjects:!0},v={getContext:y,getWebGLContext:l,isWebGL1:u.isWebGL1,isWebGL2:u.isWebGL2,resizeCanvasToDisplaySize:p,setDefaults:f},h={attributes:e,draw:r,framebuffers:t,programs:n,textures:a,typedArrays:o,vertexArrays:i};return Object.keys(h).forEach(function(e){var r=h[e];d(r,v),v[e]=d(r,{})}),v}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(3),t(4)],a=function(e,r){"use strict";function t(e){T.attribPrefix=e}function n(e){r.copyExistingProperties(e,T)}function a(e,r,t,n,a){e.bindBuffer(r,t),e.bufferData(r,n,a||e.STATIC_DRAW)}function o(e,r,t,n){if(r instanceof WebGLBuffer)return r;t=t||e.ARRAY_BUFFER;var o=e.createBuffer();return a(e,t,o,r,n),o}function i(e){return"indices"===e}function u(e){return e instanceof Int8Array||e instanceof Uint8Array}function f(e){return e===Int8Array||e===Uint8Array}function s(e){return e.length?e:e.data}function c(e,r){var t;if(t=x.test(e)?2:R.test(e)?4:3,r%t>0)throw"Can not guess numComponents for attribute '"+e+"'. Tried "+t+" but "+r+" values is not evenly divisible by "+t+". You should specify it.";return t}function l(e,r){return e.numComponents||e.size||c(r,s(e).length)}function m(r,t){if(e.isArrayBuffer(r))return r;if(e.isArrayBuffer(r.data))return r.data;Array.isArray(r)&&(r={data:r});var n=r.type;return n||(n=i(t)?Uint16Array:Float32Array),new n(r.data)}function y(r,t){var n={};return Object.keys(t).forEach(function(a){if(!i(a)){var s,y,p,E,d,b=t[a],v=b.attrib||b.name||b.attribName||T.attribPrefix+a;if("number"==typeof b||"number"==typeof b.data){d=b.data||b;var h=b.type||Float32Array,A=d*h.BYTES_PER_ELEMENT;y=e.getGLTypeForTypedArrayType(h),p=void 0!==b.normalize?b.normalize:f(h),E=b.numComponents||b.size||c(a,d),s=r.createBuffer(),r.bindBuffer(r.ARRAY_BUFFER,s),r.bufferData(r.ARRAY_BUFFER,A,b.drawType||r.STATIC_DRAW)}else{var x=m(b,a);s=o(r,x,void 0,b.drawType),y=e.getGLTypeForTypedArray(x),p=void 0!==b.normalize?b.normalize:u(x),E=l(b,a),d=x.length}n[v]={buffer:s,numComponents:E,type:y,normalize:p,stride:b.stride||0,offset:b.offset||0,drawType:b.drawType}}}),r.bindBuffer(r.ARRAY_BUFFER,null),n}function p(e,r,t,n){t=m(t),void 0!==n?(e.bindBuffer(e.ARRAY_BUFFER,r.buffer),e.bufferSubData(e.ARRAY_BUFFER,n,t)):a(e,e.ARRAY_BUFFER,r.buffer,t,r.drawType)}function E(e,r){return r===e.BYTE?1:r===e.UNSIGNED_BYTE?1:r===e.SHORT?2:r===e.UNSIGNED_SHORT?2:r===e.INT?4:r===e.UNSIGNED_INT?4:r===e.FLOAT?4:0}function d(e){for(var r,t=0;t<F.length&&(r=F[t],!(r in e));++t);t===F.length&&(r=Object.keys(e)[0]);var n=e[r],a=s(n).length,o=l(n,r),i=a/o;if(a%o>0)throw"numComponents "+o+" not correct for length "+a;return i}function b(e,r){for(var t,n=0;n<F.length&&(t=F[n],!(t in r))&&(t=T.attribPrefix+t,!(t in r));++n);n===F.length&&(t=Object.keys(r)[0]);var a=r[t];e.bindBuffer(e.ARRAY_BUFFER,a.buffer);var o=e.getBufferParameter(e.ARRAY_BUFFER,e.BUFFER_SIZE);e.bindBuffer(e.ARRAY_BUFFER,null);var i=E(e,a.type),u=o/i,f=a.numComponents||a.size,s=u/f;if(s%1!==0)throw"numComponents "+f+" not correct for length "+length;return s}function v(r,t){var n={attribs:y(r,t)},a=t.indices;return a?(a=m(a,"indices"),n.indices=o(r,a,r.ELEMENT_ARRAY_BUFFER),n.numElements=a.length,n.elementType=e.getGLTypeForTypedArray(a)):n.numElements=b(r,n.attribs),n}function h(e,r,t){var n="indices"===t?e.ELEMENT_ARRAY_BUFFER:e.ARRAY_BUFFER,a=m(r,t);return o(e,a,n)}function A(r,t){var n={};return Object.keys(t).forEach(function(e){n[e]=h(r,t[e],e)}),t.indices?(n.numElements=t.indices.length,n.elementType=e.getGLTypeForTypedArray(m(t.indices),"indices")):n.numElements=d(t),n}var T={attribPrefix:""},x=/coord|texture/i,R=/color|colour/i,F=["position","positions","a_position"];return{createAttribsFromArrays:y,createBuffersFromArrays:A,createBufferFromArray:h,createBufferFromTypedArray:o,createBufferInfoFromArrays:v,setAttribInfoBufferFromArray:p,setAttributePrefix:t,setDefaults_:n,getNumComponents_:l,getArray_:s}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[],a=function(){"use strict";function e(e){if(e instanceof Int8Array)return a;if(e instanceof Uint8Array)return o;if(e instanceof Uint8ClampedArray)return o;if(e instanceof Int16Array)return i;if(e instanceof Uint16Array)return u;if(e instanceof Int32Array)return f;if(e instanceof Uint32Array)return s;if(e instanceof Float32Array)return c;throw"unsupported typed array type"}function r(e){if(e===Int8Array)return a;if(e===Uint8Array)return o;if(e===Uint8ClampedArray)return o;if(e===Int16Array)return i;if(e===Uint16Array)return u;if(e===Int32Array)return f;if(e===Uint32Array)return s;if(e===Float32Array)return c;throw"unsupported typed array type"}function t(e){var r=A[e];if(!r)throw"unknown gl type";return r}function n(e){return e&&e.buffer&&e.buffer instanceof ArrayBuffer}var a=5120,o=5121,i=5122,u=5123,f=5124,s=5125,c=5126,l=32819,m=32820,y=33635,p=5131,E=33640,d=35899,b=35902,v=36269,h=34042,A={},T=A;return T[a]=Int8Array,T[o]=Uint8Array,T[i]=Int16Array,T[u]=Uint16Array,T[f]=Int32Array,T[s]=Uint32Array,T[c]=Float32Array,T[l]=Uint16Array,T[m]=Uint16Array,T[y]=Uint16Array,T[p]=Uint16Array,T[E]=Uint32Array,T[d]=Uint32Array,T[b]=Uint32Array,T[v]=Uint32Array,T[h]=Uint32Array,{getGLTypeForTypedArray:e,getGLTypeForTypedArrayType:r,getTypedArrayTypeForGLType:t,isArrayBuffer:n}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[],a=function(){"use strict";function e(e){var r={};return Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function r(e,r,t){e.forEach(function(e){var n=r[e];void 0!==n&&(t[e]=n)})}function t(e,r){Object.keys(r).forEach(function(t){r.hasOwnProperty(t)&&e.hasOwnProperty(t)&&(r[t]=e[t])})}function n(e){return!!e.texStorage2D}function a(e){return!e.texStorage2D}var o=window.console&&window.console.error&&"function"==typeof window.console.error?window.console.error.bind(window.console):function(){},i=window.console&&window.console.warn&&"function"==typeof window.console.warn?window.console.warn.bind(window.console):function(){};return{copyExistingProperties:t,copyNamedProperties:r,shallowCopy:e,isWebGL1:a,isWebGL2:n,error:o,warn:i}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(6)],a=function(e){"use strict";function r(e,r,t,n,a){t=void 0===t?e.TRIANGLES:t;var o=r.indices,i=r.elementType,u=void 0===n?r.numElements:n;a=void 0===a?0:a,i||o?e.drawElements(t,u,void 0===i?e.UNSIGNED_SHORT:r.elementType,a):e.drawArrays(t,a,u)}function t(t,n){var a=null,o=null;n.forEach(function(n){if(n.active!==!1){var i=n.programInfo,u=n.vertexArrayInfo||n.bufferInfo,f=!1,s=void 0===n.type?t.TRIANGLES:n.type;i!==a&&(a=i,t.useProgram(i.program),f=!0),(f||u!==o)&&(o&&o.vertexArrayObject&&!u.vertexArrayObject&&t.bindVertexArray(null),o=u,e.setBuffersAndAttributes(t,i,u)),e.setUniforms(i,n.uniforms),r(t,u,s,n.count,n.offset)}}),o.vertexArrayObject&&t.bindVertexArray(null)}return{drawBufferInfo:r,drawObjectList:t}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(4)],a=function(e){"use strict";function r(e,r){return qe[r].bindPoint}function t(e,r){return function(t){e.uniform1f(r,t)}}function n(e,r){return function(t){e.uniform1fv(r,t)}}function a(e,r){return function(t){e.uniform2fv(r,t)}}function o(e,r){return function(t){e.uniform3fv(r,t)}}function i(e,r){return function(t){e.uniform4fv(r,t)}}function u(e,r){return function(t){e.uniform1i(r,t)}}function f(e,r){return function(t){e.uniform1iv(r,t)}}function s(e,r){return function(t){e.uniform2iv(r,t)}}function c(e,r){return function(t){e.uniform3iv(r,t)}}function l(e,r){return function(t){e.uniform4iv(r,t)}}function m(e,r){return function(t){e.uniform1ui(r,t)}}function y(e,r){return function(t){e.uniform1uiv(r,t)}}function p(e,r){return function(t){e.uniform2uiv(r,t)}}function E(e,r){return function(t){e.uniform3uiv(r,t)}}function d(e,r){return function(t){e.uniform4uiv(r,t)}}function b(e,r){return function(t){e.uniformMatrix2fv(r,!1,t)}}function v(e,r){return function(t){e.uniformMatrix3fv(r,!1,t)}}function h(e,r){return function(t){e.uniformMatrix4fv(r,!1,t)}}function A(e,r){return function(t){e.uniformMatrix2x3fv(r,!1,t)}}function T(e,r){return function(t){e.uniformMatrix3x2fv(r,!1,t)}}function x(e,r){return function(t){e.uniformMatrix2x4fv(r,!1,t)}}function R(e,r){return function(t){e.uniformMatrix4x2fv(r,!1,t)}}function F(e,r){return function(t){e.uniformMatrix3x4fv(r,!1,t)}}function g(e,r){return function(t){e.uniformMatrix4x3fv(r,!1,t)}}function _(t,n,a,o){var i=r(t,n);return e.isWebGL2(t)?function(e){var r=void 0,n=void 0;e instanceof WebGLTexture?(r=e,n=null):(r=e.texture,n=e.sampler),t.uniform1i(o,a),t.activeTexture(t.TEXTURE0+a),t.bindTexture(i,r),t.bindSampler(a,n)}:function(e){t.uniform1i(o,a),t.activeTexture(t.TEXTURE0+a),t.bindTexture(i,e)}}function P(t,n,a,o,i){for(var u=r(t,n),f=new Int32Array(i),s=0;s<i;++s)f[s]=a+s;return e.isWebGL2(t)?function(e){t.uniform1iv(o,f),e.forEach(function(e,r){t.activeTexture(t.TEXTURE0+f[r]);var n=void 0,o=void 0;e instanceof WebGLTexture?(n=e,o=null):(n=e.texture,o=e.sampler),t.bindSampler(a,o),t.bindTexture(u,n)})}:function(e){t.uniform1iv(o,f),e.forEach(function(e,r){t.activeTexture(t.TEXTURE0+f[r]),t.bindTexture(u,e)})}}function U(e,r){return function(t){e.bindBuffer(e.ARRAY_BUFFER,t.buffer),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,t.numComponents||t.size,t.type||e.FLOAT,t.normalize||!1,t.stride||0,t.offset||0)}}function w(e,r){return function(t){e.bindBuffer(e.ARRAY_BUFFER,t.buffer),e.enableVertexAttribArray(r),e.vertexAttribIPointer(r,t.numComponents||t.size,t.type||e.INT,t.stride||0,t.offset||0)}}function B(e,r,t){var n=t.size,a=t.count;return function(t){e.bindBuffer(e.ARRAY_BUFFER,t.buffer);for(var o=t.size||t.numComponents||n,i=o/a,u=t.type||e.FLOAT,f=qe[u],s=f.size*o,c=t.normalize||!1,l=t.offset||0,m=s/a,y=0;y<a;++y)e.enableVertexAttribArray(r+y),e.vertexAttribPointer(r+y,i,u,c,s,l+m*y)}}function I(e,r){return r=r||0,++r,e.split("\n").map(function(e,t){return t+r+": "+e}).join("\n")}function C(e,r,t,n){var a=n||ne,o=e.createShader(t),i=0;$e.test(r)&&(i=1,r=r.replace($e,"")),e.shaderSource(o,r),e.compileShader(o);var u=e.getShaderParameter(o,e.COMPILE_STATUS);if(!u){var f=e.getShaderInfoLog(o);return a(I(r,i)+"\n*** Error compiling shader: "+f),e.deleteShader(o),null}return o}function S(e,r,t){if("function"==typeof r&&(t=r,r=void 0),"function"==typeof e)t=e,e=void 0;else if(e&&!Array.isArray(e)){if(e.errorCallback)return e;var n=e;t=n.errorCallback,e=n.attribLocations;var a=n.transformFeedbackVaryings}var o={errorCallback:t||ne,transformFeedbackVaryings:a};if(e){var i={};Array.isArray(e)?e.forEach(function(e,t){i[e]=r?r[t]:t}):i=e,o.attribLocations=i}return o}function M(e){return e.indexOf("frag")>=0?Qe.FRAGMENT_SHADER:e.indexOf("vert")>=0?Qe.VERTEX_SHADER:void 0}function L(e,r){r.forEach(function(r){e.deleteShader(r)})}function O(e,r,t,n,a){for(var o=S(t,n,a),i=[],u=[],f=0;f<r.length;++f){var s=r[f];if("string"==typeof s){var c=document.getElementById(s),l=c?c.text:s,m=e[Je[f]];c&&c.type&&(m=M(c.type)||m),s=C(e,l,m,o.errorCallback),u.push(s)}s instanceof WebGLShader&&i.push(s)}if(i.length!==r.length)return programOptions.errorCallback("not enough shaders for program"),L(e,u),null;var y=e.createProgram();i.forEach(function(r){e.attachShader(y,r)}),o.attribLocations&&Object.keys(o.attribLocations).forEach(function(r){e.bindAttribLocation(y,o.attribLocations[r],r)});var p=o.transformFeedbackVaryings;p&&(p.attribs&&(p=p.attribs),Array.isArray(p)||(p=Object.keys(p)),e.transformFeedbackVaryings(y,p,o.transformFeedbackMode||e.SEPARATE_ATTRIBS)),e.linkProgram(y);var E=e.getProgramParameter(y,e.LINK_STATUS);if(!E){var d=e.getProgramInfoLog(y);return o.errorCallback("Error in program linking:"+d),e.deleteProgram(y),L(e,u),null}return y}function D(e,r,t,n){var a="",o=document.getElementById(r);if(!o)throw"*** Error: unknown script element"+r;a=o.text;var i=t||M(o.type);if(!i)throw"*** Error: unknown shader type";return C(e,a,i,n)}function N(e,r,t,n,a){for(var o=S(t,n,a),i=[],u=0;u<r.length;++u){var f=D(e,r[u],e[Je[u]],o.errorCallback);if(!f)return null;i.push(f)}return O(e,i,o)}function z(e,r,t,n,a){for(var o=S(t,n,a),i=[],u=0;u<r.length;++u){var f=C(e,r[u],e[Je[u]],o.errorCallback);if(!f)return null;i.push(f)}return O(e,i,o)}function G(e,r){function t(r,t){var a=e.getUniformLocation(r,t.name),o=t.size>1&&"[0]"===t.name.substr(-3),i=t.type,u=qe[i];if(!u)throw"unknown type: 0x"+i.toString(16);var f;if(u.bindPoint){var s=n;n+=t.size,f=o?u.arraySetter(e,i,s,a,t.size):u.setter(e,i,s,a,t.size)}else f=u.arraySetter&&o?u.arraySetter(e,a):u.setter(e,a);return f.location=a,f}for(var n=0,a={},o=e.getProgramParameter(r,e.ACTIVE_UNIFORMS),i=0;i<o;++i){var u=e.getActiveUniform(r,i);if(!u)break;var f=u.name;"[0]"===f.substr(-3)&&(f=f.substr(0,f.length-3));var s=t(r,u);a[f]=s}return a}function k(e,r){for(var t={},n=e.getProgramParameter(r,e.TRANSFORM_FEEDBACK_VARYINGS),a=0;a<n;++a){var o=e.getTransformFeedbackVarying(r,a);t[o.name]={index:a,type:o.type,size:o.size}}return t}function X(e,r,t){r.transformFeedbackInfo&&(r=r.transformFeedbackInfo),t.attribs&&(t=t.attribs);for(var n in t){var a=r[n];if(a){var o=t[n];o.offset?e.bindBufferRange(e.TRANSFORM_FEEDBACK_BUFFER,a.index,o.buffer,o.offset,o.size):e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER,a.index,o.buffer)}}}function V(e,r,t){r.transformFeedbackInfo&&(r=r.transformFeedbackInfo),t.attribs&&(t=t.attribs);for(var n in t){var a=r[n];a&&e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER,a.index,null)}}function Y(e,r,t){var n=e.createTransformFeedback();return e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,n),e.useProgram(r.program),X(e,r,t),e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null),V(e,r,t),n}function W(e,r){for(var t=e.getProgramParameter(r,e.ACTIVE_UNIFORMS),n=[],a=[],o=0;o<t;++o){a.push(o),n.push({});var i=e.getActiveUniform(r,o);if(!i)break;n[o].name=i.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(t){var o=t[0],i=t[1];e.getActiveUniforms(r,a,e[o]).forEach(function(e,r){n[r][i]=e})});var u={},f=e.getProgramParameter(r,e.ACTIVE_UNIFORM_BLOCKS);for(o=0;o<f;++o){var s=e.getActiveUniformBlockName(r,o),c={index:o,usedByVertexShader:e.getActiveUniformBlockParameter(r,o,e.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER),usedByFragmentShader:e.getActiveUniformBlockParameter(r,o,e.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER),size:e.getActiveUniformBlockParameter(r,o,e.UNIFORM_BLOCK_DATA_SIZE),uniformIndices:e.getActiveUniformBlockParameter(r,o,e.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES)};c.used=c.usedByVertexSahder||c.usedByFragmentShader,u[s]=c}return{blockSpecs:u,uniformData:n}}function j(e,r,t,n){var a=t.blockSpecs,o=t.uniformData,i=a[n];if(!i)return ae("no uniform block object named:",n),{name:n,uniforms:{}};var u=new ArrayBuffer(i.size),f=e.createBuffer(),s=i.index;e.bindBuffer(e.UNIFORM_BUFFER,f),e.uniformBlockBinding(r,i.index,s);var c=n+".";er.test(c)&&(c=c.replace(er,"."));var l={};return i.uniformIndices.forEach(function(e){var r=o[e],t=qe[r.type],n=t.Type,a=r.size*t.size,i=r.name;i.substr(0,c.length)===c&&(i=i.substr(c.length)),l[i]=new n(u,r.offset,a/n.BYTES_PER_ELEMENT)}),{name:n,array:u,asFloat:new Float32Array(u),buffer:f,uniforms:l}}function K(e,r,t){return j(e,r.program,r.uniformBlockSpec,t)}function H(e,r,t){var n=r.uniformBlockSpec||r,a=n.blockSpecs[t.name];if(a){var o=a.index;return e.bindBufferRange(e.UNIFORM_BUFFER,o,t.buffer,t.offset||0,t.array.byteLength),!0}return!1}function q(e,r,t){H(e,r,t)&&e.bufferData(e.UNIFORM_BUFFER,t.array,e.DYNAMIC_DRAW)}function Z(e,r){var t=e.uniforms;for(var n in r){var a=t[n];if(a){var o=r[n];o.length?a.set(o):a[0]=o}}}function Q(e,r){for(var t=e.uniformSetters||e,n=arguments.length,a=1;a<n;++a){var o=arguments[a];if(Array.isArray(o))for(var i=o.length,u=0;u<i;++u)Q(t,o[u]);else for(var f in o){var s=t[f];s&&s(o[f])}}}function $(e,r){for(var t={},n=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES),a=0;a<n;++a){var o=e.getActiveAttrib(r,a);if(!o)break;var i=e.getAttribLocation(r,o.name),u=Ze[o.type],f=u.setter(e,i,u);f.location=i,t[o.name]=f}return t}function J(e,r){for(var t in r){var n=e[t];n&&n(r[t])}}function ee(e,r,t){t.vertexArrayObject?e.bindVertexArray(t.vertexArrayObject):(J(r.attribSetters||r,t.attribs),t.indices&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indices))}function re(r,t){var n=G(r,t),a=$(r,t),o={program:t,uniformSetters:n,attribSetters:a};return e.isWebGL2(r)&&(o.uniformBlockSpec=W(r,t),o.transformFeedbackInfo=k(r,t)),o}function te(e,r,t,n,a){var o=S(t,n,a),i=!0;if(r=r.map(function(e){if(e.indexOf("\n")<0){var r=document.getElementById(e);r?e=r.text:(o.errorCallback("no element with id: "+e),i=!1)}return e}),!i)return null;var u=z(e,r,o);return u?re(e,u):null}var ne=e.error,ae=e.warn,oe=5126,ie=35664,ue=35665,fe=35666,se=5124,ce=35667,le=35668,me=35669,ye=35670,pe=35671,Ee=35672,de=35673,be=35674,ve=35675,he=35676,Ae=35678,Te=35680,xe=35679,Re=35682,Fe=35685,ge=35686,_e=35687,Pe=35688,Ue=35689,we=35690,Be=36289,Ie=36292,Ce=36293,Se=5125,Me=36294,Le=36295,Oe=36296,De=36298,Ne=36299,ze=36300,Ge=36303,ke=36306,Xe=36307,Ve=36308,Ye=36311,We=3553,je=34067,Ke=32879,He=35866,qe={};qe[oe]={Type:Float32Array,size:4,setter:t,arraySetter:n},qe[ie]={Type:Float32Array,size:8,setter:a},qe[ue]={Type:Float32Array,size:12,setter:o},qe[fe]={Type:Float32Array,size:16,setter:i},qe[se]={Type:Int32Array,size:4,setter:u,arraySetter:f},qe[ce]={Type:Int32Array,size:8,setter:s},qe[le]={Type:Int32Array,size:12,setter:c},qe[me]={Type:Int32Array,size:16,setter:l},qe[Se]={Type:Uint32Array,size:4,setter:m,arraySetter:y},qe[Me]={Type:Uint32Array,size:8,setter:p},qe[Le]={Type:Uint32Array,size:12,setter:E},qe[Oe]={Type:Uint32Array,size:16,setter:d},qe[ye]={Type:Uint32Array,size:4,setter:u,arraySetter:f},qe[pe]={Type:Uint32Array,size:8,setter:s},qe[Ee]={Type:Uint32Array,size:12,setter:c},qe[de]={Type:Uint32Array,size:16,setter:l},qe[be]={Type:Float32Array,size:16,setter:b},qe[ve]={Type:Float32Array,size:36,setter:v},qe[he]={Type:Float32Array,size:64,setter:h},qe[Fe]={Type:Float32Array,size:24,setter:A},qe[ge]={Type:Float32Array,size:32,setter:x},qe[_e]={Type:Float32Array,size:24,setter:T},qe[Pe]={Type:Float32Array,size:48,setter:F},qe[Ue]={Type:Float32Array,size:32,setter:R},qe[we]={Type:Float32Array,size:48,setter:g},qe[Ae]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:We},qe[Te]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:je},qe[xe]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:Ke},qe[Re]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:We},qe[Be]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:He},qe[Ie]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:He},qe[Ce]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:je},qe[De]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:We},qe[Ne]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:Ke},qe[ze]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:je},qe[Ge]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:He},qe[ke]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:We},qe[Xe]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:Ke},qe[Ve]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:je},qe[Ye]={Type:null,size:0,setter:_,arraySetter:P,bindPoint:He};var Ze={};Ze[oe]={size:4,setter:U},Ze[ie]={size:8,setter:U},Ze[ue]={size:12,setter:U},Ze[fe]={size:16,setter:U},Ze[se]={size:4,setter:w},Ze[ce]={size:8,setter:w},Ze[le]={size:12,setter:w},Ze[me]={size:16,setter:w},Ze[Se]={size:4,setter:w},Ze[Me]={size:8,setter:w},Ze[Le]={size:12,setter:w},Ze[Oe]={size:16,setter:w},Ze[ye]={size:4,setter:w},Ze[pe]={size:8,setter:w},Ze[Ee]={size:12,setter:w},Ze[de]={size:16,setter:w},Ze[be]={size:4,setter:B,count:2},Ze[ve]={size:9,setter:B,count:3},Ze[he]={size:16,setter:B,count:4};var Qe=void 0,$e=/^[ \t]*\n/,Je=["VERTEX_SHADER","FRAGMENT_SHADER"],er=/\[\d+\]\.$/;return{createAttributeSetters:$,createProgram:O,createProgramFromScripts:N,createProgramFromSources:z,createProgramInfo:te,createProgramInfoFromProgram:re,createUniformSetters:G,createUniformBlockSpecFromProgram:W,createUniformBlockInfoFromProgram:j,createUniformBlockInfo:K,createTransformFeedback:Y,createTransformFeedbackInfo:k,bindTransformFeedbackInfo:X,setAttributes:J,setBuffersAndAttributes:ee,setUniforms:Q,setUniformBlock:q,setBlockUniforms:Z,bindUniformBlock:H}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(8),t(4)],a=function(e,r){"use strict";function t(e){return F[e]}function n(e){return g[e]}function a(a,o,i,u){var f=a.FRAMEBUFFER,s=a.createFramebuffer();a.bindFramebuffer(f,s),i=i||a.drawingBufferWidth,u=u||a.drawingBufferHeight,o=o||R;var c=0,l={framebuffer:s,attachments:[],width:i,height:u};return o.forEach(function(o){var s=o.attachment,m=o.format,y=t(m);if(y||(y=b+c++),!s)if(n(m))s=a.createRenderbuffer(),a.bindRenderbuffer(a.RENDERBUFFER,s),a.renderbufferStorage(a.RENDERBUFFER,m,i,u);else{var p=r.shallowCopy(o);p.width=i,p.height=u,void 0===p.auto&&(p.auto=!1,p.min=p.min||p.minMag||a.LINEAR,p.mag=p.mag||p.minMag||a.LINEAR,p.wrapS=p.wrapS||p.wrap||a.CLAMP_TO_EDGE,p.wrapT=p.wrapT||p.wrap||a.CLAMP_TO_EDGE),s=e.createTexture(a,p)}if(s instanceof WebGLRenderbuffer)a.framebufferRenderbuffer(f,y,a.RENDERBUFFER,s);else{if(!(s instanceof WebGLTexture))throw"unknown attachment type";a.framebufferTexture2D(f,y,o.texTarget||a.TEXTURE_2D,s,o.level||0)}l.attachments.push(s)}),l}function o(r,t,n,a,o){a=a||r.drawingBufferWidth,o=o||r.drawingBufferHeight,t.width=a,t.height=o,n=n||R,n.forEach(function(n,i){var u=t.attachments[i],f=n.format;if(u instanceof WebGLRenderbuffer)r.bindRenderbuffer(r.RENDERBUFFER,u),r.renderbufferStorage(r.RENDERBUFFER,f,a,o);else{if(!(u instanceof WebGLTexture))throw"unknown attachment type";e.resizeTexture(r,u,n,a,o)}})}function i(e,r,t){t=t||e.FRAMEBUFFER,r?(e.bindFramebuffer(t,r.framebuffer),e.viewport(0,0,r.width,r.height)):(e.bindFramebuffer(t,null),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight))}var u=5121,f=6402,s=6408,c=32854,l=32855,m=36194,y=33189,p=6401,E=36168,d=34041,b=36064,v=36096,h=36128,A=33306,T=33071,x=9729,R=[{format:s,type:u,min:x,wrap:T},{format:d}],F={};F[d]=A,F[p]=h,F[E]=h,F[f]=v,F[y]=v;var g={};return g[c]=!0,g[l]=!0,g[m]=!0,g[d]=!0,g[y]=!0,g[p]=!0,g[E]=!0,{bindFramebufferInfo:i,createFramebufferInfo:a,resizeFramebufferInfo:o}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(3),t(4)],a=function(e,r){"use strict";function t(e,r){var t=br[e];if(!t)throw"unknown internal format";var n=t.bytesPerElementMap[r];if(void 0===n)throw"unknown internal format";return n}function n(e){var r=br[e];if(!r)throw"unknown internal format";return{format:r.e,type:Array.isArray(r.type)?r.type[0]:r.type}}function a(e){return 0===(e&e-1)}function o(e,t,n,o){if(!r.isWebGL2(e))return a(t)&&a(n);var i=br[o];if(!i)throw"unknown internal format";return i.r&&i.t}function i(e){var r=br[e];if(!r)throw"unknown internal format";return r.t}function u(e){var r=Er[e];if(!r)throw"unknown format: "+e;return r.n}function f(r,t,n){return D(t)?e.getGLTypeForTypedArray(t):n||r.UNSIGNED_BYTE}function s(e,r,t,n,a){if(a%1!==0)throw"can't guess dimensions";if(t||n){if(n){if(!t&&(t=a/n,t%1))throw"can't guess dimensions"}else if(n=a/t,n%1)throw"can't guess dimensions"}else{var o=Math.sqrt(a/(r===e.TEXTURE_CUBE_MAP?6:1));o%1===0?(t=o,n=o):(t=a,n=1)}return{width:t,height:n}}function c(e){O.textureColor=new Uint8Array([255*e[0],255*e[1],255*e[2],255*e[3]])}function l(e){r.copyExistingProperties(e,O),e.textureColor&&c(e.textureColor)}function m(e,r){void 0!==r.colorspaceConversion&&(hr.colorspaceConversion=e.getParameter(e.UNPACK_COLORSPACE_CONVERSION_WEBGL),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,r.colorspaceConversion)),void 0!==r.premultiplyAlpha&&(hr.premultiplyAlpha=e.getParameter(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha)),void 0!==r.flipY&&(hr.flipY=e.getParameter(e.UNPACK_FLIP_Y_WEBGL),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY))}function y(e,r){void 0!==r.colorspaceConversion&&e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,hr.colorspaceConversion),void 0!==r.premultiplyAlpha&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,hr.premultiplyAlpha),void 0!==r.flipY&&e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,hr.flipY)}function p(e,r,t,n){n.minMag&&(t.call(e,r,e.TEXTURE_MIN_FILTER,n.minMag),t.call(e,r,e.TEXTURE_MAG_FILTER,n.minMag)),n.min&&t.call(e,r,e.TEXTURE_MIN_FILTER,n.min),n.mag&&t.call(e,r,e.TEXTURE_MAG_FILTER,n.mag),n.wrap&&(t.call(e,r,e.TEXTURE_WRAP_S,n.wrap),t.call(e,r,e.TEXTURE_WRAP_T,n.wrap),(r===e.TEXTURE_3D||r instanceof Ar)&&t.call(e,r,e.TEXTURE_WRAP_R,n.wrap)),n.wrapR&&t.call(e,r,e.TEXTURE_WRAP_R,n.wrapR),n.wrapS&&t.call(e,r,e.TEXTURE_WRAP_S,n.wrapS),n.wrapT&&t.call(e,r,e.TEXTURE_WRAP_T,n.wrapT),n.minLod&&t.call(e,r,e.TEXTURE_MIN_LOD,n.minLod),n.maxLod&&t.call(e,r,e.TEXTURE_MAX_LOD,n.maxLod),n.baseLevel&&t.call(e,r,e.TEXTURE_BASE_LEVEL,n.baseLevel),n.maxLevel&&t.call(e,r,e.TEXTURE_MAX_LEVEL,n.maxLevel)}function E(e,r,t){var n=t.target||e.TEXTURE_2D;e.bindTexture(n,r),p(e,n,e.texParameteri,t)}function d(e,r,t){p(e,r,e.samplerParameteri,t)}function b(e,r){var t=e.createSampler();return d(e,t,r),t}function v(e,r){var t={};return Object.keys(r).forEach(function(n){t[n]=b(e,r[n])}),t}function h(e){return e=e||O.textureColor,D(e)?e:new Uint8Array([255*e[0],255*e[1],255*e[2],255*e[3]])}function A(e,r,t,n,a,u,f){t=t||O.textureOptions,u=u||e.RGBA,f=f||e.UNSIGNED_BYTE;var s=t.target||e.TEXTURE_2D;if(n=n||t.width,a=a||t.height,e.bindTexture(s,r),o(e,n,a,u,f))e.generateMipmap(s);else{var c=i(u,f)?e.LINEAR:e.NEAREST;e.texParameteri(s,e.TEXTURE_MIN_FILTER,c),e.texParameteri(s,e.TEXTURE_MAG_FILTER,c),e.texParameteri(s,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(s,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}}function T(e,r){return r=r||{},r.cubeFaceOrder||[e.TEXTURE_CUBE_MAP_POSITIVE_X,e.TEXTURE_CUBE_MAP_NEGATIVE_X,e.TEXTURE_CUBE_MAP_POSITIVE_Y,e.TEXTURE_CUBE_MAP_NEGATIVE_Y,e.TEXTURE_CUBE_MAP_POSITIVE_Z,e.TEXTURE_CUBE_MAP_NEGATIVE_Z]}function x(e,r){var t=T(e,r),n=t.map(function(e,r){return{face:e,ndx:r}});return n.sort(function(e,r){return e.face-r.face}),n}function R(e,r,t,a){a=a||O.textureOptions;var o=a.target||e.TEXTURE_2D,i=t.width,u=t.height,f=a.internalFormat||a.format||e.RGBA,s=n(f),c=a.format||s.format,l=a.type||s.type;if(m(e,a),e.bindTexture(o,r),o===e.TEXTURE_CUBE_MAP){var p,d,b=t.width,v=t.height;if(b/6===v)p=v,d=[0,0,1,0,2,0,3,0,4,0,5,0];else if(v/6===b)p=b,d=[0,0,0,1,0,2,0,3,0,4,0,5];else if(b/3===v/2)p=b/3,d=[0,0,1,0,2,0,0,1,1,1,2,1];else{if(b/2!==v/3)throw"can't figure out cube map from element: "+(t.src?t.src:t.nodeName);p=b/2,d=[0,0,1,0,0,1,1,1,0,2,1,2]}N.canvas.width=p,N.canvas.height=p,i=p,u=p,x(e,a).forEach(function(r){var n=d[2*r.ndx+0]*p,a=d[2*r.ndx+1]*p;N.drawImage(t,n,a,p,p,0,0,p,p),e.texImage2D(r.face,0,f,c,l,N.canvas)}),N.canvas.width=1,N.canvas.height=1}else if(o===e.TEXTURE_3D){var h=Math.min(t.width,t.height),T=Math.max(t.width,t.height),R=T/h;if(R%1!==0)throw"can not compute 3D dimensions of element";var F=t.width===T?1:0,g=t.height===T?1:0;e.texImage3D(o,0,f,h,h,h,0,c,l,null),N.canvas.width=h,N.canvas.height=h;for(var _=0;_<R;++_){var P=_*h*F,U=_*h*g,w=h,B=h,I=0,C=0,S=h,M=h;N.drawImage(t,P,U,w,B,I,C,S,M),e.texSubImage3D(o,0,0,0,_,h,h,1,c,l,N.canvas)}N.canvas.width=0,N.canvas.height=0}else e.texImage2D(o,0,f,c,l,t);y(e,a),a.auto!==!1&&A(e,r,a,i,u,f,l),E(e,r,a)}function F(){}function g(e,t,n){function a(){u.removeEventListener("error",o),u.removeEventListener("load",i),u=null}function o(){var t="couldn't load image: "+e;r.error(t),n(t,u),a()}function i(){n(null,u),a()}n=n||F;var u=new Image;return t=void 0!==t?t:O.crossOrigin,void 0!==t&&(u.crossOrigin=t),u.addEventListener("error",o),u.addEventListener("load",i),u.src=e,u}function _(e,r,t){t=t||O.textureOptions;var n=t.target||e.TEXTURE_2D;if(e.bindTexture(n,r),t.color!==!1){var a=h(t.color);if(n===e.TEXTURE_CUBE_MAP)for(var o=0;o<6;++o)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a);else n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY?e.texImage3D(n,0,e.RGBA,1,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a):e.texImage2D(n,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a)}}function P(e,t,n,a){a=a||F,n=n||O.textureOptions,_(e,t,n),n=r.shallowCopy(n);var o=g(n.src,n.crossOrigin,function(r,o){r?a(r,t,o):(R(e,t,o,n),a(null,t,o))});return o}function U(e,t,a,o){function i(r){return function(n,i){--d,n?b.push(n):i.width!==i.height?b.push("cubemap face img is not a square: "+i.src):(m(e,a),e.bindTexture(p,t),5===d?T(e).forEach(function(r){e.texImage2D(r,0,f,c,l,i)}):e.texImage2D(r,0,f,c,l,i),y(e,a),e.generateMipmap(p)),0===d&&o(b.length?b:void 0,E,t)}}o=o||F;var u=a.src;if(6!==u.length)throw"there must be 6 urls for a cubemap";var f=a.internalFormat||a.format||e.RGBA,s=n(f),c=a.format||s.format,l=a.type||e.UNSIGNED_BYTE,p=a.target||e.TEXTURE_2D;if(p!==e.TEXTURE_CUBE_MAP)throw"target must be TEXTURE_CUBE_MAP";_(e,t,a),a=r.shallowCopy(a);var E,d=6,b=[],v=T(e,a);E=u.map(function(e,r){return g(e,a.crossOrigin,i(v[r]))})}function w(e,t,a,o){function i(r){return function(n,i){if(--d,n)b.push(n);else{if(m(e,a),e.bindTexture(p,t),T){T=!1,v=a.width||i.width,h=a.height||i.height,e.texImage3D(p,0,f,v,h,A,0,c,l,null);for(var u=0;u<A;++u)e.texSubImage3D(p,0,0,0,u,v,h,1,c,l,i)}else{var s=i;i.width===v&&i.height===h||(s=N.canvas,N.canvas.width=v,N.canvas.height=h,N.drawImage(i,0,0,v,h)),e.texSubImage3D(p,0,0,0,r,v,h,1,c,l,s),s===N.canvas&&(N.canvas.width=0,N.canvas.height=0)}y(e,a),e.generateMipmap(p)}0===d&&o(b.length?b:void 0,E,t)}}o=o||F;var u=a.src,f=a.internalFormat||a.format||e.RGBA,s=n(f),c=a.format||s.format,l=a.type||e.UNSIGNED_BYTE,p=a.target||e.TEXTURE_2D_ARRAY;if(p!==e.TEXTURE_3D&&p!==e.TEXTURE_2D_ARRAY)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";_(e,t,a),a=r.shallowCopy(a);var E,d=u.length,b=[],v=a.width,h=a.height,A=u.length,T=!0;E=u.map(function(e,r){return g(e,a.crossOrigin,i(r))})}function B(r,a,o,i){i=i||O.textureOptions;var u=i.target||r.TEXTURE_2D;r.bindTexture(u,a);var c=i.width,l=i.height,p=i.depth,E=i.internalFormat||i.format||r.RGBA,d=n(E),b=i.format||d.format,v=i.type||f(r,o,d.type);if(D(o))o instanceof Uint8ClampedArray&&(o=new Uint8Array(o.buffer));else{var h=e.getTypedArrayTypeForGLType(v);o=new h(o)}var A=t(E,v),T=o.byteLength/A;if(T%1)throw"length wrong size for format: "+vr(r,b);var R;if(u===r.TEXTURE_3D)if(c||l||p)!c||l&&p?!l||c&&p?(R=s(r,u,c,l,T/p),c=R.width,l=R.height):(R=s(r,u,c,p,T/l),c=R.width,p=R.height):(R=s(r,u,l,p,T/c),l=R.width,p=R.height);else{var F=Math.cbrt(T);if(F%1!==0)throw"can't guess cube size of array of numElements: "+T;c=F,l=F,p=F}else R=s(r,u,c,l,T),c=R.width,l=R.height;return r.pixelStorei(r.UNPACK_ALIGNMENT,i.unpackAlignment||1),m(r,i),u===r.TEXTURE_CUBE_MAP?!function(){var e=A/o.BYTES_PER_ELEMENT,t=T/6*e;x(r,i).forEach(function(e){var n=t*e.ndx,a=o.subarray(n,n+t);r.texImage2D(e.face,0,E,c,l,0,b,v,a)})}():u===r.TEXTURE_3D?r.texImage3D(u,0,E,c,l,p,0,b,v,o):r.texImage2D(u,0,E,c,l,0,b,v,o),y(r,i),{width:c,height:l,depth:p,type:v}}function I(e,r,t){var a=t.target||e.TEXTURE_2D;e.bindTexture(a,r);var o=t.internalFormat||t.format||e.RGBA,i=n(o),u=t.format||i.format,f=t.type||i.type;if(m(e,t),a===e.TEXTURE_CUBE_MAP)for(var s=0;s<6;++s)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,o,t.width,t.height,0,u,f,null);else a===e.TEXTURE_3D?e.texImage3D(a,0,o,t.width,t.height,t.depth,0,u,f,null):e.texImage2D(a,0,o,t.width,t.height,0,u,f,null);y(e,t)}function C(e,r,t){t=t||F,r=r||O.textureOptions;var a=e.createTexture(),o=r.target||e.TEXTURE_2D,i=r.width||1,u=r.height||1,f=r.internalFormat||e.RGBA,s=n(f),c=r.type||s.type;e.bindTexture(o,a),o===e.TEXTURE_CUBE_MAP&&(e.texParameteri(o,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(o,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE));var l=r.src;if(l)if("function"==typeof l&&(l=l(e,r)),"string"==typeof l)P(e,a,r,t);else if(D(l)||Array.isArray(l)&&("number"==typeof l[0]||Array.isArray(l[0])||D(l[0]))){var m=B(e,a,l,r);i=m.width,u=m.height,c=m.type}else if(Array.isArray(l)&&"string"==typeof l[0])o===e.TEXTURE_CUBE_MAP?U(e,a,r,t):w(e,a,r,t);else{if(!(l instanceof HTMLElement))throw"unsupported src type";R(e,a,l,r),i=l.width,u=l.height}else I(e,a,r);return r.auto!==!1&&A(e,a,r,i,u,f,c),E(e,a,r),a}function S(e,r,t,a,o){a=a||t.width,o=o||t.height;var i=t.target||e.TEXTURE_2D;e.bindTexture(i,r);var u,s=t.internalFormat||t.format||e.RGBA,c=n(s),l=t.format||c.format,m=t.src;if(u=m&&(D(m)||Array.isArray(m)&&"number"==typeof m[0])?t.type||f(e,m,c.type):t.type||c.type,i===e.TEXTURE_CUBE_MAP)for(var y=0;y<6;++y)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+y,0,l,a,o,0,l,u,null);else e.texImage2D(i,0,l,a,o,0,l,u,null)}function M(e){return"string"==typeof e||Array.isArray(e)&&"string"==typeof e[0]}function L(e,r,t){function n(){0===a&&setTimeout(function(){t(o.length?o:void 0,i,u)},0)}t=t||F;var a=0,o=[],i={},u={};return Object.keys(r).forEach(function(t){var f,s=r[t];M(s.src)&&(f=function(e,r,i){u[t]=i,--a,e&&o.push(e),n()},++a),i[t]=C(e,s,f)}),n(),i}var O={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},D=e.isArrayBuffer,N=document.createElement("canvas").getContext("2d"),z=6406,G=6407,k=6408,X=6409,V=6410,Y=6402,W=34041,j=33321,K=36756,H=33325,q=33326,Z=33330,Q=33329,$=33338,J=33337,ee=33340,re=33339,te=33323,ne=36757,ae=33327,oe=33328,ie=33336,ue=33335,fe=33332,se=33331,ce=33334,le=33333,me=32849,ye=35905,pe=36194,Ee=36758,de=35898,be=35901,ve=34843,he=34837,Ae=36221,Te=36239,xe=36215,Re=36233,Fe=36209,ge=36227,_e=32856,Pe=35907,Ue=36759,we=32855,Be=32854,Ie=32857,Ce=34842,Se=34836,Me=36220,Le=36238,Oe=36975,De=36214,Ne=36232,ze=36226,Ge=36208,ke=33189,Xe=33190,Ve=36012,Ye=36013,We=35056,je=5120,Ke=5121,He=5122,qe=5123,Ze=5124,Qe=5125,$e=5126,Je=32819,er=32820,rr=33635,tr=5131,nr=36193,ar=33640,or=35899,ir=35902,ur=36269,fr=34042,sr=33319,cr=33320,lr=6403,mr=36244,yr=36248,pr=36249,Er={},dr=Er;dr[z]={n:1},dr[X]={n:1},dr[V]={n:2},dr[G]={n:3},dr[k]={n:4},dr[lr]={n:1},dr[mr]={n:1},dr[sr]={n:2},dr[cr]={n:2},dr[G]={n:3},dr[yr]={n:3},dr[k]={n:4},dr[pr]={n:4},dr[Y]={n:1},dr[W]={n:2};var br={};!function(){var e=br;e[z]={e:z,r:!0,t:!0,a:[1,2,2,4],type:[Ke,tr,nr,$e]},e[X]={e:X,r:!0,t:!0,a:[1,2,2,4],type:[Ke,tr,nr,$e]},e[V]={e:V,r:!0,t:!0,a:[2,4,4,8],type:[Ke,tr,nr,$e]},e[G]={e:G,r:!0,t:!0,a:[3,6,6,12,2],type:[Ke,tr,nr,$e,rr]},e[k]={e:k,r:!0,t:!0,a:[4,8,8,16,2,2],type:[Ke,tr,nr,$e,Je,er]},e[j]={e:lr,r:!0,t:!0,a:1,type:Ke},e[K]={e:lr,r:!1,t:!0,a:1,type:je},e[H]={e:lr,r:!1,t:!0,a:[4,2],type:[$e,tr]},e[q]={e:lr,r:!1,t:!1,a:4,type:$e},e[Z]={e:mr,r:!0,t:!1,a:1,type:Ke},e[Q]={e:mr,r:!0,t:!1,a:1,type:je},e[fe]={e:mr,r:!0,t:!1,a:2,type:qe},e[se]={e:mr,r:!0,t:!1,a:2,type:He},e[ce]={e:mr,r:!0,t:!1,a:4,type:Qe},e[le]={e:mr,r:!0,t:!1,a:4,type:Ze},e[te]={e:sr,r:!0,t:!0,a:2,type:Ke},e[ne]={e:sr,r:!1,t:!0,a:2,type:je},e[ae]={e:sr,r:!1,t:!0,a:[8,4],type:[$e,tr]},e[oe]={e:sr,r:!1,t:!1,a:8,type:$e},e[ie]={e:cr,r:!0,t:!1,a:2,type:Ke},e[ue]={e:cr,r:!0,t:!1,a:2,type:je},e[$]={e:cr,r:!0,t:!1,a:4,type:qe},e[J]={e:cr,r:!0,t:!1,a:4,type:He},e[ee]={e:cr,r:!0,t:!1,a:8,type:Qe},e[re]={e:cr,r:!0,t:!1,a:8,type:Ze},e[me]={e:G,r:!0,t:!0,a:3,type:Ke},e[ye]={e:G,r:!1,t:!0,a:3,type:Ke},e[pe]={e:G,r:!0,t:!0,a:[3,2],type:[Ke,rr]},e[Ee]={e:G,r:!1,t:!0,a:3,type:je},e[de]={e:G,r:!1,t:!0,a:[12,6,4],type:[$e,tr,or]},e[be]={e:G,r:!1,t:!0,a:[12,6,4],type:[$e,tr,ir]},e[ve]={e:G,r:!1,t:!0,a:[12,6],type:[$e,tr]},e[he]={e:G,r:!1,t:!1,a:12,type:$e},e[Ae]={e:yr,r:!1,t:!1,a:3,type:Ke},e[Te]={e:yr,r:!1,t:!1,a:3,type:je},e[xe]={e:yr,r:!1,t:!1,a:6,type:qe},e[Re]={e:yr,r:!1,t:!1,a:6,type:He},e[Fe]={e:yr,r:!1,t:!1,a:12,type:Qe},e[ge]={e:yr,r:!1,t:!1,a:12,type:Ze},e[_e]={e:k,r:!0,t:!0,a:4,type:Ke},e[Pe]={e:k,r:!0,t:!0,a:4,type:Ke},e[Ue]={e:k,r:!1,t:!0,a:4,type:je},e[we]={e:k,r:!0,t:!0,a:[4,2,4],type:[Ke,er,ar]},e[Be]={e:k,r:!0,t:!0,a:[4,2],type:[Ke,Je]},e[Ie]={e:k,r:!0,t:!0,a:4,type:ar},e[Ce]={e:k,r:!1,t:!0,a:[16,8],type:[$e,tr]},e[Se]={e:k,r:!1,t:!1,a:16,type:$e},e[Me]={e:pr,r:!0,t:!1,a:4,type:Ke},e[Le]={e:pr,r:!0,t:!1,a:4,type:je},e[Oe]={e:pr,r:!0,t:!1,a:4,type:ar},e[De]={e:pr,r:!0,t:!1,a:8,type:qe},e[Ne]={e:pr,r:!0,t:!1,a:8,type:He},e[ze]={e:pr,r:!0,t:!1,a:16,type:Ze},e[Ge]={e:pr,r:!0,t:!1,a:16,type:Qe},e[ke]={e:Y,r:!0,t:!1,a:[2,4],type:[qe,Qe]},e[Xe]={e:Y,r:!0,t:!1,a:4,type:Qe},e[Ve]={e:Y,r:!0,t:!1,a:4,type:$e},e[We]={e:W,r:!0,t:!1,a:4,type:fr},e[Ye]={e:W,r:!0,t:!1,a:4,type:ur},Object.keys(e).forEach(function(r){var t=e[r];if(t.bytesPerElementMap={},Array.isArray(t.a))t.a.forEach(function(e,r){var n=t.type[r];t.bytesPerElementMap[n]=e});else{var n=t.type;t.bytesPerElementMap[n]=t.a}})}();var vr=function(){function e(e){if(!r){r={};for(var t in e)"number"==typeof e[t]&&(r[e[t]]=t)}}var r;return function(t,n){return e(t),r[n]||"0x"+n.toString(16)}}(),hr={},Ar=window.WebGLSampler||function(){};return{setDefaults_:l,createSampler:b,createSamplers:v,setSamplerParameters:d,createTexture:C,setEmptyTexture:I,setTextureFromArray:B,loadTextureFromUrl:P,setTextureFromElement:R,setTextureFilteringForSize:A,setTextureParameters:E,setDefaultTextureColor:c,createTextures:L,resizeTexture:S,getNumComponentsForFormat:u,getBytesPerElementForInternalFormat:t}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(6)],a=function(e){"use strict";function r(r,t,n){var a=r.createVertexArray();return r.bindVertexArray(a),t.length||(t=[t]),t.forEach(function(t){e.setBuffersAndAttributes(r,t,n)}),r.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:a}}function t(r,t,n,a){var o=r.createVertexArray();return r.bindVertexArray(o),e.setAttributes(t,n),a&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,a),r.bindVertexArray(null),o}function n(e,r,n){return t(e,r.attribSetters||r,n.attribs,n.indices)}return{createVertexArrayInfo:r,createVAOAndSetAttributes:t,createVAOFromBufferInfo:n}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(11)],a=function(e){"use strict";function r(e){var r=I;return I=e,r}function t(e,r){return r=r||new I(16),r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=-e[3],r[4]=-e[4],r[5]=-e[5],r[6]=-e[6],r[7]=-e[7],r[8]=-e[8],r[9]=-e[9],r[10]=-e[10],r[11]=-e[11],r[12]=-e[12],r[13]=-e[13],r[14]=-e[14],r[15]=-e[15],r}function n(e,r){return r=r||new I(16),r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function a(e){return e=e||new I(16),e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function o(e,r){if(r=r||new I(16),r===e){var t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,r}var n=e[0],a=e[1],o=e[2],i=e[3],u=e[4],f=e[5],s=e[6],c=e[7],l=e[8],m=e[9],y=e[10],p=e[11],E=e[12],d=e[13],b=e[14],v=e[15];return r[0]=n,r[1]=u,r[2]=l,r[3]=E,r[4]=a,r[5]=f,r[6]=m,r[7]=d,r[8]=o,r[9]=s,r[10]=y,r[11]=b,r[12]=i,r[13]=c,r[14]=p,r[15]=v,r}function i(e,r){r=r||new I(16);var t=e[0],n=e[1],a=e[2],o=e[3],i=e[4],u=e[5],f=e[6],s=e[7],c=e[8],l=e[9],m=e[10],y=e[11],p=e[12],E=e[13],d=e[14],b=e[15],v=m*b,h=d*y,A=f*b,T=d*s,x=f*y,R=m*s,F=a*b,g=d*o,_=a*y,P=m*o,U=a*s,w=f*o,B=c*E,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,t[8]=n*P+u*U+l*w+E*B,t[9]=a*P+f*U+m*w+d*B,t[10]=o*P+s*U+y*w+b*B,t[11]=i*P+c*U+p*w+v*B,t[12]=n*C+u*S+l*M+E*L,t[13]=a*C+f*S+m*M+d*L,t[14]=o*C+s*S+y*M+b*L,t[15]=i*C+c*S+p*M+v*L,t}function f(e,r,t){return t=t||a(),e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11]),t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function s(r,t){return t=t||e.create(),t[0]=r[12],t[1]=r[13],t[2]=r[14],t}function c(r,t,n){n=n||e.create();var a=4*t;return n[0]=r[a+0],n[1]=r[a+1],n[2]=r[a+2],n}function l(e,r,t,a){a!==e&&(a=n(e,a));var o=4*t;return a[o+0]=r[0],a[o+1]=r[1],a[o+2]=r[2],a}function m(e,r,t,n,a){a=a||new I(16);var o=Math.tan(.5*Math.PI-.5*e),i=1/(t-n);return a[0]=o/r,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=o,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=(t+n)*i,a[11]=-1,a[12]=0,a[13]=0,a[14]=t*n*i*2,a[15]=0,a}function y(e,r,t,n,a,o,i){return i=i||new I(16),i[0]=2/(r-e),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2/(n-t),i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=-1/(o-a),i[11]=0,i[12]=(r+e)/(e-r),i[13]=(n+t)/(t-n),i[14]=-a/(a-o),i[15]=1,i}function p(e,r,t,n,a,o,i){i=i||new I(16);var u=r-e,f=n-t,s=a-o;return i[0]=2*a/u,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*a/f,i[6]=0,i[7]=0,i[8]=(e+r)/u,i[9]=(n+t)/f,i[10]=o/s,i[11]=-1,i[12]=0,i[13]=0,i[14]=a*o/s,i[15]=0,i}function E(r,t,n,a){a=a||new I(16);var o=C,i=S,u=M;return e.normalize(e.subtract(r,t,u),u),e.normalize(e.cross(n,u,o),o),e.normalize(e.cross(u,o,i),i),a[0]=o[0],a[1]=o[1],a[2]=o[2],a[3]=0,a[4]=i[0],a[5]=i[1],a[6]=i[2],a[7]=0,a[8]=u[0],a[9]=u[1],a[10]=u[2],a[11]=0,a[12]=r[0],a[13]=r[1],a[14]=r[2],a[15]=1,a}function d(e,r){return r=r||new I(16),r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=e[0],r[13]=e[1],r[14]=e[2],r[15]=1,r}function b(e,r,t){t=t||new I(16);var n=r[0],a=r[1],o=r[2],i=e[0],u=e[1],f=e[2],s=e[3],c=e[4],l=e[5],m=e[6],y=e[7],p=e[8],E=e[9],d=e[10],b=e[11],v=e[12],h=e[13],A=e[14],T=e[15];return e!==t&&(t[0]=i,t[1]=u,t[2]=f,t[3]=s,t[4]=c,t[5]=l,t[6]=m,t[7]=y,t[8]=p,t[9]=E,t[10]=d,t[11]=b),t[12]=i*n+c*a+p*o+v,t[13]=u*n+l*a+E*o+h,t[14]=f*n+m*a+d*o+A,t[15]=s*n+y*a+b*o+T,t}function v(e,r){r=r||new I(16);var t=Math.cos(e),n=Math.sin(e);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=t,r[6]=n,r[7]=0,r[8]=0,r[9]=-n,r[10]=t,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function h(e,r,t){t=t||new I(16);var n=e[4],a=e[5],o=e[6],i=e[7],u=e[8],f=e[9],s=e[10],c=e[11],l=Math.cos(r),m=Math.sin(r);return t[4]=l*n+m*u,t[5]=l*a+m*f,t[6]=l*o+m*s,t[7]=l*i+m*c,t[8]=l*u-m*n,t[9]=l*f-m*a,t[10]=l*s-m*o,t[11]=l*c-m*i,e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t}function A(e,r){r=r||new I(16);var t=Math.cos(e),n=Math.sin(e);return r[0]=t,r[1]=0,r[2]=-n,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=n,r[9]=0,r[10]=t,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function T(e,r,t){t=t||new I(16);var n=e[0],a=e[1],o=e[2],i=e[3],u=e[8],f=e[9],s=e[10],c=e[11],l=Math.cos(r),m=Math.sin(r);return t[0]=l*n-m*u,t[1]=l*a-m*f,t[2]=l*o-m*s,t[3]=l*i-m*c,t[8]=l*u+m*n,t[9]=l*f+m*a,t[10]=l*s+m*o,t[11]=l*c+m*i,e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t}function x(e,r){r=r||new I(16);var t=Math.cos(e),n=Math.sin(e);return r[0]=t,r[1]=n,r[2]=0,r[3]=0,r[4]=-n,r[5]=t,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function R(e,r,t){t=t||new I(16);var n=e[0],a=e[1],o=e[2],i=e[3],u=e[4],f=e[5],s=e[6],c=e[7],l=Math.cos(r),m=Math.sin(r);return t[0]=l*n+m*u,t[1]=l*a+m*f,t[2]=l*o+m*s,t[3]=l*i+m*c,t[4]=l*u-m*n,t[5]=l*f-m*a,t[6]=l*s-m*o,t[7]=l*c-m*i,e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t}function F(e,r,t){t=t||new I(16);var n=e[0],a=e[1],o=e[2],i=Math.sqrt(n*n+a*a+o*o);n/=i,a/=i,o/=i;var u=n*n,f=a*a,s=o*o,c=Math.cos(r),l=Math.sin(r),m=1-c;return t[0]=u+(1-u)*c,t[1]=n*a*m+o*l,t[2]=n*o*m-a*l,t[3]=0,t[4]=n*a*m-o*l,t[5]=f+(1-f)*c,t[6]=a*o*m+n*l,t[7]=0,t[8]=n*o*m+a*l,t[9]=a*o*m-n*l,t[10]=s+(1-s)*c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(e,r,t,n){n=n||new I(16);var a=r[0],o=r[1],i=r[2],u=Math.sqrt(a*a+o*o+i*i);a/=u,o/=u,i/=u;var f=a*a,s=o*o,c=i*i,l=Math.cos(t),m=Math.sin(t),y=1-l,p=f+(1-f)*l,E=a*o*y+i*m,d=a*i*y-o*m,b=a*o*y-i*m,v=s+(1-s)*l,h=o*i*y+a*m,A=a*i*y+o*m,T=o*i*y-a*m,x=c+(1-c)*l,R=e[0],F=e[1],g=e[2],_=e[3],P=e[4],U=e[5],w=e[6],B=e[7],C=e[8],S=e[9],M=e[10],L=e[11];return n[0]=p*R+E*P+d*C,n[1]=p*F+E*U+d*S,n[2]=p*g+E*w+d*M,n[3]=p*_+E*B+d*L,n[4]=b*R+v*P+h*C,n[5]=b*F+v*U+h*S,n[6]=b*g+v*w+h*M,n[7]=b*_+v*B+h*L,n[8]=A*R+T*P+x*C,n[9]=A*F+T*U+x*S,n[10]=A*g+T*w+x*M,n[11]=A*_+T*B+x*L,e!==n&&(n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n}function _(e,r){return r=r||new I(16),r[0]=e[0],r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=e[1],r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=e[2],r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function P(e,r,t){t=t||new I(16);var n=r[0],a=r[1],o=r[2];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=n*e[3],t[4]=a*e[4],t[5]=a*e[5],t[6]=a*e[6],t[7]=a*e[7],t[8]=o*e[8],t[9]=o*e[9],t[10]=o*e[10],t[11]=o*e[11],e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t}function U(r,t,n){n=n||e.create();var a=t[0],o=t[1],i=t[2],u=a*r[3]+o*r[7]+i*r[11]+r[15];return n[0]=(a*r[0]+o*r[4]+i*r[8]+r[12])/u,n[1]=(a*r[1]+o*r[5]+i*r[9]+r[13])/u,n[2]=(a*r[2]+o*r[6]+i*r[10]+r[14])/u,n}function w(r,t,n){n=n||e.create();var a=t[0],o=t[1],i=t[2];return n[0]=a*r[0]+o*r[4]+i*r[8],n[1]=a*r[1]+o*r[5]+i*r[9],n[2]=a*r[2]+o*r[6]+i*r[10],n}function B(r,t,n){n=n||e.create();var a=i(r),o=t[0],u=t[1],f=t[2];return n[0]=o*a[0]+u*a[1]+f*a[2],n[1]=o*a[4]+u*a[5]+f*a[6],n[2]=o*a[8]+u*a[9]+f*a[10],n}var I=Float32Array,C=e.create(),S=e.create(),M=e.create();return{axisRotate:g,axisRotation:F,create:a,copy:n,frustum:p,getAxis:c,getTranslation:s,identity:a,inverse:i,lookAt:E,multiply:u,negate:t,ortho:y,perspective:m,rotateX:h,rotateY:T,rotateZ:R,rotateAxis:g,rotationX:v,rotationY:A,rotationZ:x,scale:P,scaling:_,setAxis:l,setDefaultType:r,setTranslation:f,transformDirection:w,transformNormal:B,transformPoint:U,translate:b,translation:d,transpose:o}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[],a=function(){"use strict";function e(e){var r=v;return v=e,r}function r(e,r,t){var n=new v(3);return e&&(n[0]=e),r&&(n[1]=r),t&&(n[2]=t),n}function t(e,r,t){return t=t||new v(3),t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function n(e,r,t){return t=t||new v(3),t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function a(e,r,t,n){return n=n||new v(3),n[0]=(1-t)*e[0]+t*r[0],n[1]=(1-t)*e[1]+t*r[1],n[2]=(1-t)*e[2]+t*r[2],n}function o(e,r,t){return t=t||new v(3),t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function i(e,r,t){return t=t||new v(3),t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r,t}function u(e,r,t){t=t||new v(3);var n=e[2]*r[0]-e[0]*r[2],a=e[0]*r[1]-e[1]*r[0];return t[0]=e[1]*r[2]-e[2]*r[1],t[1]=n,t[2]=a,t}function f(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]}function s(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])}function c(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]}function l(e,r){var t=e[0]-r[0],n=e[1]-r[1],a=e[2]-r[2];return Math.sqrt(t*t+n*n+a*a)}function m(e,r){var t=e[0]-r[0],n=e[1]-r[1],a=e[2]-r[2];return t*t+n*n+a*a}function y(e,r){r=r||new v(3);var t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=Math.sqrt(t);return n>1e-5?(r[0]=e[0]/n,r[1]=e[1]/n,r[2]=e[2]/n):(r[0]=0,r[1]=0,r[2]=0),r}function p(e,r){return r=r||new v(3),r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r}function E(e,r){return r=r||new v(3),r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function d(e,r,t){return t=t||new v(3),t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function b(e,r,t){return t=t||new v(3),t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}var v=Float32Array;return{add:t,copy:E,create:r,cross:u,distance:l,distanceSq:m,divide:b,divScalar:i,dot:f,lerp:a,length:s,lengthSq:c,mulScalar:o,multiply:d,negate:p,normalize:y,setDefaultType:e,subtract:n}}.apply(r,n),!(void 0!==a&&(e.exports=a))},function(e,r,t){var n,a;n=[t(2),t(4),t(10),t(11)],a=function(e,r,t,n){"use strict";function a(e,r){var t=0;return e.push=function(){for(var r=0;r<arguments.length;++r){var n=arguments[r];if(n instanceof Array||n.buffer&&n.buffer instanceof ArrayBuffer)for(var a=0;a<n.length;++a)e[t++]=n[a];else e[t++]=n}},e.reset=function(e){t=e||0},e.numComponents=r,Object.defineProperty(e,"numElements",{get:function(){return this.length/this.numComponents|0}}),e}function o(e,r,t){var n=t||Float32Array;return a(new n(e*r),e)}function i(e){return"indices"!==e}function u(e){function r(r){for(var i=e[r],u=i.numComponents,f=o(u,a,i.constructor),s=0;s<a;++s)for(var c=t[s],l=c*u,m=0;m<u;++m)f.push(i[l+m]);n[r]=f}var t=e.indices,n={},a=t.length;return Object.keys(e).filter(i).forEach(r),n}function f(e){if(e.indices)throw"can't flatten normals of indexed vertices. deindex them first";for(var r=e.normal,t=r.length,n=0;n<t;n+=9){var a=r[n+0],o=r[n+1],i=r[n+2],u=r[n+3],f=r[n+4],s=r[n+5],c=r[n+6],l=r[n+7],m=r[n+8],y=a+u+c,p=o+f+l,E=i+s+m,d=Math.sqrt(y*y+p*p+E*E);y/=d,p/=d,E/=d,r[n+0]=y,r[n+1]=p,r[n+2]=E,r[n+3]=y,r[n+4]=p,r[n+5]=E,r[n+6]=y,r[n+7]=p,r[n+8]=E}return e}function s(e,r,t){for(var n=e.length,a=new Float32Array(3),o=0;o<n;o+=3)t(r,[e[o],e[o+1],e[o+2]],a),e[o]=a[0],e[o+1]=a[1],e[o+2]=a[2]}function c(e,r,t){t=t||n.create();var a=r[0],o=r[1],i=r[2];return t[0]=a*e[0]+o*e[1]+i*e[2],t[1]=a*e[4]+o*e[5]+i*e[6],t[2]=a*e[8]+o*e[9]+i*e[10],t}function l(e,r){return s(e,r,t.transformDirection),e}function m(e,r){return s(e,t.inverse(r),c),e}function y(e,r){return s(e,r,t.transformPoint),e}function p(e,r){return Object.keys(e).forEach(function(t){var n=e[t];t.indexOf("pos")>=0?y(n,r):t.indexOf("tan")>=0||t.indexOf("binorm")>=0?l(n,r):t.indexOf("norm")>=0&&m(n,r)}),e}function E(e,r,t){return e=e||2,r=r||0,t=t||0,e*=.5,{position:{numComponents:2,data:[r+-1*e,t+-1*e,r+1*e,t+-1*e,r+-1*e,t+1*e,r+1*e,t+1*e]},normal:[0,0,1,0,0,1,0,0,1,0,0,1],texcoord:[0,0,1,0,0,1,1,1],indices:[0,1,2,2,1,3]}}function d(e,r,n,a,i){e=e||1,r=r||1,n=n||1,a=a||1,i=i||t.identity();for(var u=(n+1)*(a+1),f=o(3,u),s=o(3,u),c=o(2,u),l=0;l<=a;l++)for(var m=0;m<=n;m++){var y=m/n,E=l/a;f.push(e*y-.5*e,0,r*E-.5*r),s.push(0,1,0),c.push(y,E)}for(var d=n+1,b=o(3,n*a*2,Uint16Array),l=0;l<a;l++)for(var m=0;m<n;m++)b.push((l+0)*d+m,(l+1)*d+m,(l+0)*d+m+1),b.push((l+1)*d+m,(l+1)*d+m+1,(l+0)*d+m+1);var v=p({position:f,normal:s,texcoord:c,indices:b},i);return v}function b(e,r,t,n,a,i,u){if(r<=0||t<=0)throw Error("subdivisionAxis and subdivisionHeight must be > 0");n=n||0,a=a||Math.PI,i=i||0,u=u||2*Math.PI;for(var f=a-n,s=u-i,c=(r+1)*(t+1),l=o(3,c),m=o(3,c),y=o(2,c),p=0;p<=t;p++)for(var E=0;E<=r;E++){var d=E/r,b=p/t,v=s*d,h=f*b,A=Math.sin(v),T=Math.cos(v),x=Math.sin(h),R=Math.cos(h),F=T*x,g=R,_=A*x;l.push(e*F,e*g,e*_),m.push(F,g,_),y.push(1-d,b)}for(var P=r+1,U=o(3,r*t*2,Uint16Array),E=0;E<r;E++)for(var p=0;p<t;p++)U.push((p+0)*P+E,(p+0)*P+E+1,(p+1)*P+E),U.push((p+1)*P+E,(p+0)*P+E+1,(p+1)*P+E+1);return{position:l,normal:m,texcoord:y,indices:U}}function v(e){e=e||1;for(var r=e/2,t=[[-r,-r,-r],[+r,-r,-r],[-r,+r,-r],[+r,+r,-r],[-r,-r,+r],[+r,-r,+r],[-r,+r,+r],[+r,+r,+r]],n=[[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]],a=[[1,0],[0,0],[0,1],[1,1]],i=24,u=o(3,i),f=o(3,i),s=o(2,i),c=o(3,12,Uint16Array),l=0;l<6;++l){for(var m=O[l],y=0;y<4;++y){var p=t[m[y]],E=n[l],d=a[y];u.push(p),f.push(E),s.push(d)}var b=4*l;c.push(b+0,b+1,b+2),c.push(b+0,b+2,b+3)}return{position:u,normal:f,texcoord:s,indices:c}}function h(e,r,t,n,a,i,u){if(n<3)throw Error("radialSubdivisions must be 3 or greater");if(a<1)throw Error("verticalSubdivisions must be 1 or greater");for(var f=void 0===i||i,s=void 0===u||u,c=(f?2:0)+(s?2:0),l=(n+1)*(a+1+c),m=o(3,l),y=o(3,l),p=o(2,l),E=o(3,n*(a+c)*2,Uint16Array),d=n+1,b=Math.atan2(e-r,t),v=Math.cos(b),h=Math.sin(b),A=f?-2:0,T=a+(s?2:0),x=A;x<=T;++x){var R,F=x/a,g=t*F;x<0?(g=0,F=1,R=e):x>a?(g=t,F=1,R=r):R=e+(r-e)*(x/a),x!==-2&&x!==a+2||(R=0,F=0),g-=t/2;for(var _=0;_<d;++_){var P=Math.sin(_*Math.PI*2/n),U=Math.cos(_*Math.PI*2/n);m.push(P*R,g,U*R),y.push(x<0||x>a?0:P*v,x<0?-1:x>a?1:h,x<0||x>a?0:U*v),p.push(_/n,1-F)}}for(var x=0;x<a+c;++x)for(var _=0;_<n;++_)E.push(d*(x+0)+0+_,d*(x+0)+1+_,d*(x+1)+1+_),E.push(d*(x+0)+0+_,d*(x+1)+1+_,d*(x+1)+0+_);return{position:m,normal:y,texcoord:p,indices:E}}function A(e,r){r=r||[];for(var t=[],n=0;n<e.length;n+=4){var a=e[n],o=e.slice(n+1,n+4);o.push.apply(o,r);for(var i=0;i<a;++i)t.push.apply(t,o)}return t}function T(){var e=[0,0,0,0,150,0,30,0,0,0,150,0,30,150,0,30,0,0,30,0,0,30,30,0,100,0,0,30,30,0,100,30,0,100,0,0,30,60,0,30,90,0,67,60,0,30,90,0,67,90,0,67,60,0,0,0,30,30,0,30,0,150,30,0,150,30,30,0,30,30,150,30,30,0,30,100,0,30,30,30,30,30,30,30,100,0,30,100,30,30,30,60,30,67,60,30,30,90,30,30,90,30,67,60,30,67,90,30,0,0,0,100,0,0,100,0,30,0,0,0,100,0,30,0,0,30,100,0,0,100,30,0,100,30,30,100,0,0,100,30,30,100,0,30,30,30,0,30,30,30,100,30,30,30,30,0,100,30,30,100,30,0,30,30,0,30,60,30,30,30,30,30,30,0,30,60,0,30,60,30,30,60,0,67,60,30,30,60,30,30,60,0,67,60,0,67,60,30,67,60,0,67,90,30,67,60,30,67,60,0,67,90,0,67,90,30,30,90,0,30,90,30,67,90,30,30,90,0,67,90,30,67,90,0,30,90,0,30,150,30,30,90,30,30,90,0,30,150,0,30,150,30,0,150,0,0,150,30,30,150,30,0,150,0,30,150,30,30,150,0,0,0,0,0,0,30,0,150,30,0,0,0,0,150,30,0,150,0],r=[.22,.19,.22,.79,.34,.19,.22,.79,.34,.79,.34,.19,.34,.19,.34,.31,.62,.19,.34,.31,.62,.31,.62,.19,.34,.43,.34,.55,.49,.43,.34,.55,.49,.55,.49,.43,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0],t=A([18,0,0,1,18,0,0,-1,6,0,1,0,6,1,0,0,6,0,-1,0,6,1,0,0,6,0,1,0,6,1,0,0,6,0,-1,0,6,1,0,0,6,0,-1,0,6,-1,0,0]),n=A([18,200,70,120,18,80,70,200,6,70,200,210,6,200,200,70,6,210,100,70,6,210,160,70,6,70,180,210,6,100,70,210,6,76,210,100,6,140,210,80,6,90,130,110,6,160,160,220],[255]),a=e.length/3,i={position:o(3,a),texcoord:o(2,a),normal:o(3,a),color:o(4,a,Uint8Array),indices:o(3,a/3,Uint16Array)};i.position.push(e),i.texcoord.push(r),i.normal.push(t),i.color.push(n);for(var u=0;u<a;++u)i.indices.push(u);return i}function x(e,r,t,a,i,u,f){function s(e,r,t){return e+(r-e)*t}function c(r,t,o,f,c,l){for(var p=0;p<=i;p++){var v=t/(m-1),h=p/i,A=2*(v-.5),T=(u+h*y)*Math.PI,x=Math.sin(T),R=Math.cos(T),F=s(e,r,x),g=A*a,_=R*e,P=x*F;E.push(g,_,P);var U=n.add(n.multiply([0,x,R],o),f);d.push(U),b.push(v*c+l,h)}}function l(e,r){for(var t=0;t<i;++t)A.push(e+t+0,e+t+1,r+t+0),A.push(e+t+1,r+t+1,r+t+0)}if(i<=0)throw Error("subdivisionDown must be > 0");u=u||0,f=f||1;for(var m=2,y=f-u,p=2*(i+1)*(2+m),E=o(3,p),d=o(3,p),b=o(2,p),v=0;v<m;v++){var h=2*(v/(m-1)-.5);c(r,v,[1,1,1],[0,0,0],1,0),c(r,v,[0,0,0],[h,0,0],0,0),c(t,v,[1,1,1],[0,0,0],1,0),c(t,v,[0,0,0],[h,0,0],0,1)}var A=o(3,2*i*(2+m),Uint16Array),T=i+1;return l(0*T,4*T),l(5*T,7*T),l(6*T,2*T),l(3*T,1*T),{position:E,normal:d,texcoord:b,indices:A}}function R(e,r,t,n,a,o){return h(e,e,r,t,n,a,o)}function F(e,r,t,n,a,i){if(t<3)throw Error("radialSubdivisions must be 3 or greater");if(n<3)throw Error("verticalSubdivisions must be 3 or greater");a=a||0,i=i||2*Math.PI;for(var u=i-a,f=t+1,s=n+1,c=f*s,l=o(3,c),m=o(3,c),y=o(2,c),p=o(3,t*n*2,Uint16Array),E=0;E<s;++E)for(var d=E/n,b=d*Math.PI*2,v=Math.sin(b),h=e+v*r,A=Math.cos(b),T=A*r,x=0;x<f;++x){var R=x/t,F=a+R*u,g=Math.sin(F),_=Math.cos(F),P=g*h,U=_*h,w=g*v,B=_*v;l.push(P,T,U),m.push(w,A,B),y.push(R,1-d)}for(var E=0;E<n;++E)for(var x=0;x<t;++x){var I=1+x,C=1+E;p.push(f*E+x,f*C+x,f*E+I),p.push(f*C+x,f*C+I,f*E+I)}return{position:l,normal:m,texcoord:y,indices:p}}function g(e,r,t,n,a){if(r<3)throw Error("divisions must be at least 3");t=t?t:1,a=a?a:1,n=n?n:0;for(var i=(r+1)*(t+1),u=o(3,i),f=o(3,i),s=o(2,i),c=o(3,t*r*2,Uint16Array),l=0,m=e-n,y=r+1,p=0;p<=t;++p){for(var E=n+m*Math.pow(p/t,a),d=0;d<=r;++d){var b=2*Math.PI*d/r,v=E*Math.cos(b),h=E*Math.sin(b);if(u.push(v,0,h),f.push(0,1,0),s.push(1-d/r,p/t),p>0&&d!==r){var A=l+(d+1),T=l+d,x=l+d-y,R=l+(d+1)-y;c.push(A,T,x),c.push(A,x,R)}}l+=r+1}return{position:u,normal:f,texcoord:s,indices:c}}function _(e){return Math.random()*e|0}function P(e,r){r=r||{};var t=e.position.numElements,n=o(4,t,Uint8Array),a=r.rand||function(e,r){return r<3?_(256):255};if(e.color=n,e.indices)for(var i=0;i<t;++i)n.push(a(i,0),a(i,1),a(i,2),a(i,3));else for(var u=r.vertsPerColor||3,f=t/u,i=0;i<f;++i)for(var s=[a(i,0),a(i,1),a(i,2),a(i,3)],c=0;c<u;++c)n.push(s);return e}function U(r){return function(t){var n=r.apply(this,Array.prototype.slice.call(arguments,1));return e.createBuffersFromArrays(t,n)}}function w(r){return function(t){var n=r.apply(null,Array.prototype.slice.call(arguments,1));return e.createBufferInfoFromArrays(t,n)}}function B(e,r,t,n){n=n||0;for(var a=e.length,o=0;o<a;++o)r[t+o]=e[o]+n}function I(e,t){var n=M(e),o=new n.constructor(t),i=o;return n.numComponents&&n.numElements&&a(o,n.numComponents),e.data&&(i={data:o},r.copyNamedProperties(D,e,i)),i}function C(e){function r(r){for(var t,n=0,a=0;a<e.length;++a){var o=e[a],i=o[r],u=M(i);n+=u.length,t&&!i.data||(t=i)}return{length:n,spec:t}}function t(r,t,n){for(var a=0,o=0,i=0;i<e.length;++i){var u=e[i],f=u[r],s=M(f);"indices"===r?(B(s,n,o,a),a+=t[i]):B(s,n,o),o+=s.length}}for(var n,a={},o=0;o<e.length;++o){var i=e[o];Object.keys(i).forEach(function(e){a[e]||(a[e]=[]),n||"indices"===e||(n=e);var r=i[e],t=L(r,e),o=M(r),u=o.length/t;a[e].push(u)})}var u=a[n],f={};return Object.keys(a).forEach(function(e){var n=r(e),a=I(n.spec,n.length);t(e,u,M(a)),f[e]=a}),f}function S(e){var r={};return Object.keys(e).forEach(function(t){var n=e[t],a=M(n),o=I(n,a.length);B(a,M(o),0),r[t]=o}),r}var M=e.getArray_,L=e.getNumComponents_,O=[[3,7,5,1],[6,2,0,4],[6,7,3,2],[0,1,5,4],[7,6,4,5],[2,3,1,0]],D=["numComponents","size","type","normalize","stride","offset","attrib","name","attribName"];return{create3DFBufferInfo:w(T),create3DFBuffers:U(T),create3DFVertices:T,createAugmentedTypedArray:o,createCubeBufferInfo:w(v),createCubeBuffers:U(v),createCubeVertices:v,createPlaneBufferInfo:w(d),createPlaneBuffers:U(d),createPlaneVertices:d,createSphereBufferInfo:w(b),createSphereBuffers:U(b),createSphereVertices:b,createTruncatedConeBufferInfo:w(h),createTruncatedConeBuffers:U(h),createTruncatedConeVertices:h,createXYQuadBufferInfo:w(E),createXYQuadBuffers:U(E),createXYQuadVertices:E,createCresentBufferInfo:w(x),createCresentBuffers:U(x),createCresentVertices:x,createCylinderBufferInfo:w(R),createCylinderBuffers:U(R),createCylinderVertices:R,createTorusBufferInfo:w(F),createTorusBuffers:U(F),createTorusVertices:F,createDiscBufferInfo:w(g),createDiscBuffers:U(g),createDiscVertices:g,deindexVertices:u,flattenNormals:f,makeRandomVertexColors:P,reorientDirections:l,reorientNormals:m,reorientPositions:y,reorientVertices:p,concatVertices:C,duplicateVertices:S}}.apply(r,n),!(void 0!==a&&(e.exports=a))}])});function Modplayer(){this.supportedformats=new Array("mod","s3m","xm");this.url="";this.format="s3m";this.state="initializing..";this.request=null;this.loading=false;this.playing=false;this.paused=false;this.repeat=false;this.separation=1;this.mixval=8;this.amiga500=false;this.filter=false;this.endofsong=false;this.autostart=false;this.bufferstodelay=4;this.delayfirst=0;this.delayload=0;this.onReady=function(){};this.onPlay=function(){};this.onStop=function(){};this.buffer=0;this.mixerNode=0;this.context=null;this.samplerate=44100;this.bufferlen=4096;this.chvu=new Float32Array(32);this.player=null;this.title="";this.signature="....";this.songlen=0;this.channels=0;this.patterns=0;this.samplenames=new Array}Modplayer.prototype.load=function(url,format){var ext=format;if(url instanceof Uint8Array){this.format=ext}else{this.url=url;ext=url.split(".").pop().toLowerCase().trim();if(this.supportedformats.indexOf(ext)==-1){ext=url.split("/").pop().split(".").shift().toLowerCase().trim();if(this.supportedformats.indexOf(ext)==-1){return false}}this.format=ext}switch(ext){case"mod":this.player=new Protracker;break;case"s3m":this.player=new Screamtracker;break;case"xm":this.player=new Fasttracker;break}this.player.onReady=this.loadSuccess;this.state="loading..";var asset=this;function doLoad(buffer){this.state="parsing..";if(asset.player.parse(buffer)){asset.title=asset.player.title;asset.signature=asset.player.signature;asset.songlen=asset.player.songlen;asset.channels=asset.player.channels;asset.patterns=asset.player.patterns;asset.filter=asset.player.filter;if(asset.context)asset.setfilter(asset.filter);asset.mixval=asset.player.mixval;asset.samplenames=new Array(32);for(i=0;i<32;i++)asset.samplenames[i]="";if(asset.format=="xm"||asset.format=="it"){for(i=0;i<asset.player.instrument.length;i++)asset.samplenames[i]=asset.player.instrument[i].name}else{for(i=0;i<asset.player.sample.length;i++)asset.samplenames[i]=asset.player.sample[i].name}asset.state="ready.";asset.loading=false;asset.onReady();if(asset.autostart)asset.play()}else{asset.state="error!";asset.loading=false}}if(url instanceof Uint8Array){doLoad(url)}else{var request=new XMLHttpRequest;request.open("GET",this.url,true);request.responseType="arraybuffer";this.request=request;this.loading=true;request.onprogress=function(oe){asset.state="loading ("+Math.floor(100*oe.loaded/oe.total)+"%).."};request.onload=function(){var buffer=new Uint8Array(request.response);doLoad(buffer)};request.send()}return true};Modplayer.prototype.play=function(){if(this.loading)return false;if(this.player){if(this.context==null)this.createContext();this.player.samplerate=this.samplerate;if(this.context)this.setfilter(this.player.filter);if(this.player.paused){this.player.paused=false;return true}this.endofsong=false;this.player.endofsong=false;this.player.paused=false;this.player.initialize();this.player.flags=1+2;this.player.playing=true;this.playing=true;this.chvu=new Float32Array(this.player.channels);for(i=0;i<this.player.channels;i++)this.chvu[i]=0;this.onPlay();this.player.delayfirst=this.bufferstodelay;return true}else{return false}};Modplayer.prototype.pause=function(){if(this.player){if(!this.player.paused){this.player.paused=true}else{this.player.paused=false}}};Modplayer.prototype.stop=function(){this.paused=false;this.playing=false;if(this.player){this.player.paused=false;this.player.playing=false;this.player.delayload=1}this.onStop()};Modplayer.prototype.stopaudio=function(st){if(this.player){this.player.playing=st}};Modplayer.prototype.jump=function(step){if(this.player){this.player.tick=0;this.player.row=0;this.player.position+=step;this.player.flags=1+2;if(this.player.position<0)this.player.position=0;if(this.player.position>=this.player.songlen)this.stop()}this.position=this.player.position;this.row=this.player.row};Modplayer.prototype.setrepeat=function(rep){this.repeat=rep;if(this.player)this.player.repeat=rep};Modplayer.prototype.setseparation=function(sep){this.separation=sep;if(this.player)this.player.separation=sep};Modplayer.prototype.setautostart=function(st){this.autostart=st};Modplayer.prototype.setamigamodel=function(amiga){if(amiga=="600"||amiga=="1200"||amiga=="4000"){this.amiga500=false;if(this.filterNode)this.filterNode.frequency.value=22050}else{this.amiga500=true;if(this.filterNode)this.filterNode.frequency.value=6e3}};Modplayer.prototype.setfilter=function(f){if(f){this.lowpassNode.frequency.value=3275}else{this.lowpassNode.frequency.value=28867}this.filter=f;if(this.player)this.player.filter=f};Modplayer.prototype.hassyncevents=function(){if(this.player)return this.player.syncqueue.length!=0;return false};Modplayer.prototype.popsyncevent=function(){if(this.player)return this.player.syncqueue.pop()};Modplayer.prototype.currentpattern=function(){if(this.player)return this.player.patterntable[this.player.position]};Modplayer.prototype.patterndata=function(pn){var i,c,patt;if(this.format=="mod"){patt=new Uint8Array(this.player.pattern_unpack[pn]);for(i=0;i<64;i++)for(c=0;c<this.player.channels;c++){if(patt[i*5*this.channels+c*5+3]==0&&patt[i*5*this.channels+c*5+4]==0){patt[i*5*this.channels+c*5+3]=46}else{patt[i*5*this.channels+c*5+3]+=55;if(patt[i*5*this.channels+c*5+3]<65)patt[i*5*this.channels+c*5+3]-=7}}}else if(this.format=="s3m"){patt=new Uint8Array(this.player.pattern[pn]);for(i=0;i<64;i++)for(c=0;c<this.player.channels;c++){if(patt[i*5*this.channels+c*5+3]==255)patt[i*5*this.channels+c*5+3]=46;else patt[i*5*this.channels+c*5+3]+=64}}else if(this.format=="xm"){patt=new Uint8Array(this.player.pattern[pn]);for(i=0;i<this.player.patternlen[pn];i++)for(c=0;c<this.player.channels;c++){if(patt[i*5*this.channels+c*5+0]<97)patt[i*5*this.channels+c*5+0]=patt[i*5*this.channels+c*5+0]%12|Math.floor(patt[i*5*this.channels+c*5+0]/12)<<4;if(patt[i*5*this.channels+c*5+3]==255)patt[i*5*this.channels+c*5+3]=46;else{if(patt[i*5*this.channels+c*5+3]<10){patt[i*5*this.channels+c*5+3]+=48}else{patt[i*5*this.channels+c*5+3]+=65-10}}}}return patt};Modplayer.prototype.noteon=function(ch){if(ch>=this.channels)return 0;return this.player.channel[ch].noteon};Modplayer.prototype.currentsample=function(ch){if(ch>=this.channels)return 0;if(this.format=="xm"||this.format=="it")return this.player.channel[ch].instrument;return this.player.channel[ch].sample};Modplayer.prototype.currentpattlen=function(){if(this.format=="mod"||this.format=="s3m")return 64;return this.player.patternlen[this.player.patterntable[this.player.position]]};Modplayer.prototype.createContext=function(){if(typeof AudioContext!=="undefined"){this.context=new AudioContext}else{this.context=new webkitAudioContext}this.samplerate=this.context.sampleRate;this.bufferlen=this.samplerate>44100?4096:2048;this.filterNode=this.context.createBiquadFilter();if(this.amiga500){this.filterNode.frequency.value=6e3}else{this.filterNode.frequency.value=22050}this.lowpassNode=this.context.createBiquadFilter();this.setfilter(this.filter);if(typeof this.context.createJavaScriptNode==="function"){this.mixerNode=this.context.createJavaScriptNode(this.bufferlen,1,2)}else{this.mixerNode=this.context.createScriptProcessor(this.bufferlen,1,2)}this.mixerNode.module=this;this.mixerNode.onaudioprocess=Modplayer.prototype.mix;this.mixerNode.connect(this.filterNode);this.filterNode.connect(this.lowpassNode);this.lowpassNode.connect(this.context.destination)};Modplayer.prototype.mix=function(ape){var mod;if(ape.srcElement){mod=ape.srcElement.module}else{mod=this.module}if(mod.player&&mod.delayfirst==0){mod.player.repeat=mod.repeat;var bufs=new Array(ape.outputBuffer.getChannelData(0),ape.outputBuffer.getChannelData(1));var buflen=ape.outputBuffer.length;mod.player.mix(mod.player,bufs,buflen);var outp=new Float32Array(2);for(var s=0;s<buflen;s++){outp[0]=bufs[0][s];outp[1]=bufs[1][s];if(mod.separation){t=outp[0];if(mod.separation==2){outp[0]=outp[0]*.5+outp[1]*.5;outp[1]=outp[1]*.5+t*.5}else{outp[0]=outp[0]*.65+outp[1]*.35;outp[1]=outp[1]*.65+t*.35}}outp[0]/=mod.mixval;outp[0]=.5*(Math.abs(outp[0]+.975)-Math.abs(outp[0]-.975));outp[1]/=mod.mixval;outp[1]=.5*(Math.abs(outp[1]+.975)-Math.abs(outp[1]-.975));bufs[0][s]=outp[0];bufs[1][s]=outp[1]}mod.row=mod.player.row;mod.position=mod.player.position;mod.speed=mod.player.speed;mod.bpm=mod.player.bpm;mod.endofsong=mod.player.endofsong;if(mod.player.filter!=mod.filter){mod.setfilter(mod.player.filter)}if(mod.endofsong&&mod.playing)mod.stop();if(mod.delayfirst>0)mod.delayfirst--;mod.delayload=0;for(var i=0;i<mod.player.channels;i++){mod.chvu[i]=mod.chvu[i]*.25+mod.player.chvu[i]*.75;mod.player.chvu[i]=0}}};function Protracker(){var i,t;this.clearsong();this.initialize();this.playing=false;this.paused=false;this.repeat=false;this.filter=false;this.mixval=4;this.syncqueue=[];this.samplerate=44100;this.baseperiodtable=new Float32Array([856,808,762,720,678,640,604,570,538,508,480,453,428,404,381,360,339,320,302,285,269,254,240,226,214,202,190,180,170,160,151,143,135,127,120,113]);this.finetunetable=new Float32Array(16);for(t=0;t<16;t++)this.finetunetable[t]=Math.pow(2,(t-8)/12/8);this.vibratotable=new Array;for(t=0;t<4;t++){this.vibratotable[t]=new Float32Array(64);for(i=0;i<64;i++){switch(t){case 0:this.vibratotable[t][i]=127*Math.sin(Math.PI*2*(i/64));break;case 1:this.vibratotable[t][i]=127-4*i;break;case 2:this.vibratotable[t][i]=i<32?127:-127;break;case 3:this.vibratotable[t][i]=(1-2*Math.random())*127;break}}}this.effects_t0=new Array(this.effect_t0_0,this.effect_t0_1,this.effect_t0_2,this.effect_t0_3,this.effect_t0_4,this.effect_t0_5,this.effect_t0_6,this.effect_t0_7,this.effect_t0_8,this.effect_t0_9,this.effect_t0_a,this.effect_t0_b,this.effect_t0_c,this.effect_t0_d,this.effect_t0_e,this.effect_t0_f);this.effects_t0_e=new Array(this.effect_t0_e0,this.effect_t0_e1,this.effect_t0_e2,this.effect_t0_e3,this.effect_t0_e4,this.effect_t0_e5,this.effect_t0_e6,this.effect_t0_e7,this.effect_t0_e8,this.effect_t0_e9,this.effect_t0_ea,this.effect_t0_eb,this.effect_t0_ec,this.effect_t0_ed,this.effect_t0_ee,this.effect_t0_ef);this.effects_t1=new Array(this.effect_t1_0,this.effect_t1_1,this.effect_t1_2,this.effect_t1_3,this.effect_t1_4,this.effect_t1_5,this.effect_t1_6,this.effect_t1_7,this.effect_t1_8,this.effect_t1_9,this.effect_t1_a,this.effect_t1_b,this.effect_t1_c,this.effect_t1_d,this.effect_t1_e,this.effect_t1_f);this.effects_t1_e=new Array(this.effect_t1_e0,this.effect_t1_e1,this.effect_t1_e2,this.effect_t1_e3,this.effect_t1_e4,this.effect_t1_e5,this.effect_t1_e6,this.effect_t1_e7,this.effect_t1_e8,this.effect_t1_e9,this.effect_t1_ea,this.effect_t1_eb,this.effect_t1_ec,this.effect_t1_ed,this.effect_t1_ee,this.effect_t1_ef)}Protracker.prototype.clearsong=function(){this.title="";this.signature="";this.songlen=1;this.repeatpos=0;this.patterntable=new ArrayBuffer(128);for(i=0;i<128;i++)this.patterntable[i]=0;this.channels=4;this.sample=new Array;this.samples=31;for(i=0;i<31;i++){this.sample[i]=new Object;this.sample[i].name="";this.sample[i].length=0;this.sample[i].finetune=0;this.sample[i].volume=64;this.sample[i].loopstart=0;this.sample[i].looplength=0;this.sample[i].data=0}this.patterns=0;this.pattern=new Array;this.note=new Array;this.pattern_unpack=new Array;this.looprow=0;this.loopstart=0;this.loopcount=0;this.patterndelay=0;this.patternwait=0};Protracker.prototype.initialize=function(){this.syncqueue=[];this.tick=0;this.position=0;this.row=0;this.offset=0;this.flags=0;this.speed=6;this.bpm=125;this.breakrow=0;this.patternjump=0;this.patterndelay=0;this.patternwait=0;this.endofsong=false;this.channel=new Array;for(i=0;i<this.channels;i++){this.channel[i]=new Object;this.channel[i].sample=0;this.channel[i].period=214;this.channel[i].voiceperiod=214;this.channel[i].note=24;this.channel[i].volume=64;this.channel[i].command=0;this.channel[i].data=0;this.channel[i].samplepos=0;this.channel[i].samplespeed=0;this.channel[i].flags=0;this.channel[i].noteon=0;this.channel[i].slidespeed=0;this.channel[i].slideto=214;this.channel[i].slidetospeed=0;this.channel[i].arpeggio=0;this.channel[i].semitone=12;this.channel[i].vibratospeed=0;this.channel[i].vibratodepth=0;this.channel[i].vibratopos=0;this.channel[i].vibratowave=0}};Protracker.prototype.parse=function(buffer){var i,j,c;for(i=0;i<4;i++)this.signature+=String.fromCharCode(buffer[1080+i]);switch(this.signature){case"M.K.":case"M!K!":case"4CHN":case"FLT4":break;case"6CHN":this.channels=6;break;case"8CHN":case"FLT8":this.channels=8;break;case"28CH":this.channels=28;break;default:return false}this.chvu=new Array;for(i=0;i<this.channels;i++)this.chvu[i]=0;i=0;while(buffer[i]&&i<20)this.title=this.title+String.fromCharCode(buffer[i++]);for(i=0;i<this.samples;i++){var st=20+i*30;j=0;while(buffer[st+j]&&j<22){this.sample[i].name+=buffer[st+j]>31&&buffer[st+j]<127?String.fromCharCode(buffer[st+j]):" ";j++}this.sample[i].length=2*(buffer[st+22]*256+buffer[st+23]);this.sample[i].finetune=buffer[st+24];if(this.sample[i].finetune>7)this.sample[i].finetune=this.sample[i].finetune-16;this.sample[i].volume=buffer[st+25];this.sample[i].loopstart=2*(buffer[st+26]*256+buffer[st+27]);this.sample[i].looplength=2*(buffer[st+28]*256+buffer[st+29]);if(this.sample[i].looplength==2)this.sample[i].looplength=0;if(this.sample[i].loopstart>this.sample[i].length){this.sample[i].loopstart=0;this.sample[i].looplength=0}}this.songlen=buffer[950];if(buffer[951]!=127)this.repeatpos=buffer[951];for(i=0;i<128;i++){this.patterntable[i]=buffer[952+i];if(this.patterntable[i]>this.patterns)this.patterns=this.patterntable[i]}this.patterns+=1;var patlen=4*64*this.channels;this.pattern=new Array;this.note=new Array;this.pattern_unpack=new Array;for(i=0;i<this.patterns;i++){this.pattern[i]=new Uint8Array(patlen);this.note[i]=new Uint8Array(this.channels*64);this.pattern_unpack[i]=new Uint8Array(this.channels*64*5);for(j=0;j<patlen;j++)this.pattern[i][j]=buffer[1084+i*patlen+j];for(j=0;j<64;j++)for(c=0;c<this.channels;c++){this.note[i][j*this.channels+c]=0;var n=(this.pattern[i][j*4*this.channels+c*4]&15)<<8|this.pattern[i][j*4*this.channels+c*4+1];for(var np=0;np<this.baseperiodtable.length;np++)if(n==this.baseperiodtable[np])this.note[i][j*this.channels+c]=np}for(j=0;j<64;j++){for(c=0;c<this.channels;c++){var pp=j*4*this.channels+c*4;var ppu=j*5*this.channels+c*5;var n=(this.pattern[i][pp]&15)<<8|this.pattern[i][pp+1];if(n){n=this.note[i][j*this.channels+c];n=n%12|Math.floor(n/12)+2<<4}this.pattern_unpack[i][ppu+0]=n?n:255;this.pattern_unpack[i][ppu+1]=this.pattern[i][pp+0]&240|this.pattern[i][pp+2]>>4;this.pattern_unpack[i][ppu+2]=255;this.pattern_unpack[i][ppu+3]=this.pattern[i][pp+2]&15;this.pattern_unpack[i][ppu+4]=this.pattern[i][pp+3]}}}var sst=1084+this.patterns*patlen;for(i=0;i<this.samples;i++){this.sample[i].data=new Float32Array(this.sample[i].length);for(j=0;j<this.sample[i].length;j++){var q=buffer[sst+j];if(q<128){q=q/128}else{q=(q-128)/128-1}this.sample[i].data[j]=q}sst+=this.sample[i].length}this.filter=false;for(var ch=0;ch<this.channels;ch++){p=this.patterntable[0];pp=ch*4;var cmd=this.pattern[p][pp+2]&15,data=this.pattern[p][pp+3];if(cmd==14&&(data&240)==0){if(!(data&1)){this.filter=true}else{this.filter=false}}}if(this.context){if(this.filter){this.lowpassNode.frequency.value=3275}else{this.lowpassNode.frequency.value=28867}}this.chvu=new Float32Array(this.channels);for(i=0;i<this.channels;i++)this.chvu[i]=0;return true};Protracker.prototype.advance=function(mod){var spd=mod.samplerate*60/mod.bpm/4/6;if(mod.offset>spd){mod.tick++;mod.offset=0;mod.flags|=1}if(mod.tick>=mod.speed){if(mod.patterndelay){if(mod.tick<(mod.patternwait+1)*mod.speed){mod.patternwait++}else{mod.row++;mod.tick=0;mod.flags|=2;mod.patterndelay=0}}else{if(mod.flags&16+32+64){if(mod.flags&64){mod.row=mod.looprow;mod.flags&=161;mod.flags|=2}else{if(mod.flags&16){mod.position=mod.patternjump;mod.row=mod.breakrow;mod.patternjump=0;mod.breakrow=0;mod.flags&=225;mod.flags|=2}}mod.tick=0}else{mod.row++;mod.tick=0;mod.flags|=2}}}if(mod.row>=64){mod.position++;mod.row=0;mod.flags|=4}if(mod.position>=mod.songlen){if(mod.repeat){mod.position=0}else{this.endofsong=true}return}};Protracker.prototype.mix=function(mod,bufs,buflen){var f;var p,pp,n,nn;var outp=new Float32Array(2);for(var s=0;s<buflen;s++){outp[0]=0;outp[1]=0;if(!mod.paused&&!mod.endofsong&&mod.playing){mod.advance(mod);var och=0;for(var ch=0;ch<mod.channels;ch++){p=mod.patterntable[mod.position];pp=mod.row*4*mod.channels+ch*4;if(mod.flags&2){mod.channel[ch].command=mod.pattern[p][pp+2]&15;mod.channel[ch].data=mod.pattern[p][pp+3];if(!(mod.channel[ch].command==14&&(mod.channel[ch].data&240)==208)){n=(mod.pattern[p][pp]&15)<<8|mod.pattern[p][pp+1];if(n){if(mod.channel[ch].command!=3&&mod.channel[ch].command!=5){mod.channel[ch].period=n;mod.channel[ch].samplepos=0;if(mod.channel[ch].vibratowave>3)mod.channel[ch].vibratopos=0;mod.channel[ch].flags|=3;mod.channel[ch].noteon=1}mod.channel[ch].slideto=n}nn=mod.pattern[p][pp+0]&240|mod.pattern[p][pp+2]>>4;if(nn){mod.channel[ch].sample=nn-1;mod.channel[ch].volume=mod.sample[nn-1].volume;if(!n&&mod.channel[ch].samplepos>mod.sample[nn-1].length)mod.channel[ch].samplepos=0}}}mod.channel[ch].voiceperiod=mod.channel[ch].period;if(!mod.sample[mod.channel[ch].sample].length)mod.channel[ch].noteon=0;if(mod.flags&1){if(!mod.tick){mod.effects_t0[mod.channel[ch].command](mod,ch)}else{mod.effects_t1[mod.channel[ch].command](mod,ch)}}if(mod.channel[ch].flags&2){for(var np=0;np<mod.baseperiodtable.length;np++)if(mod.baseperiodtable[np]>=mod.channel[ch].period)mod.channel[ch].note=np;mod.channel[ch].semitone=7;if(mod.channel[ch].period>=120)mod.channel[ch].semitone=mod.baseperiodtable[mod.channel[ch].note]-mod.baseperiodtable[mod.channel[ch].note+1]}if((mod.channel[ch].flags&1||mod.flags&2)&&mod.channel[ch].voiceperiod)mod.channel[ch].samplespeed=7093789.2/(mod.channel[ch].voiceperiod*2)*mod.finetunetable[mod.sample[mod.channel[ch].sample].finetune+8]/mod.samplerate;if(mod.flags&1){mod.channel[ch].vibratopos+=mod.channel[ch].vibratospeed;mod.channel[ch].vibratopos&=63}och=och^ch&1;f=0;if(mod.channel[ch].noteon){if(mod.sample[mod.channel[ch].sample].length>mod.channel[ch].samplepos)f=mod.sample[mod.channel[ch].sample].data[Math.floor(mod.channel[ch].samplepos)]*mod.channel[ch].volume/64;outp[och]+=f;mod.channel[ch].samplepos+=mod.channel[ch].samplespeed}mod.chvu[ch]=Math.max(mod.chvu[ch],Math.abs(f));if(mod.channel[ch].noteon){if(mod.sample[mod.channel[ch].sample].loopstart||mod.sample[mod.channel[ch].sample].looplength){if(mod.channel[ch].samplepos>=mod.sample[mod.channel[ch].sample].loopstart+mod.sample[mod.channel[ch].sample].looplength){mod.channel[ch].samplepos-=mod.sample[mod.channel[ch].sample].looplength}}else{if(mod.channel[ch].samplepos>=mod.sample[mod.channel[ch].sample].length){mod.channel[ch].noteon=0}}}mod.channel[ch].flags=0}mod.offset++;mod.flags&=112}bufs[0][s]=outp[0];bufs[1][s]=outp[1]}};Protracker.prototype.effect_t0_0=function(mod,ch){mod.channel[ch].arpeggio=mod.channel[ch].data};Protracker.prototype.effect_t0_1=function(mod,ch){if(mod.channel[ch].data)mod.channel[ch].slidespeed=mod.channel[ch].data};Protracker.prototype.effect_t0_2=function(mod,ch){if(mod.channel[ch].data)mod.channel[ch].slidespeed=mod.channel[ch].data};Protracker.prototype.effect_t0_3=function(mod,ch){if(mod.channel[ch].data)mod.channel[ch].slidetospeed=mod.channel[ch].data};Protracker.prototype.effect_t0_4=function(mod,ch){if(mod.channel[ch].data&15&&mod.channel[ch].data&240){mod.channel[ch].vibratodepth=mod.channel[ch].data&15;mod.channel[ch].vibratospeed=(mod.channel[ch].data&240)>>4}mod.effects_t1[4](mod,ch)};Protracker.prototype.effect_t0_5=function(mod,ch){};Protracker.prototype.effect_t0_6=function(mod,ch){};Protracker.prototype.effect_t0_7=function(mod,ch){};Protracker.prototype.effect_t0_8=function(mod,ch){mod.syncqueue.unshift(mod.channel[ch].data&15)};Protracker.prototype.effect_t0_9=function(mod,ch){mod.channel[ch].samplepos=mod.channel[ch].data*256};Protracker.prototype.effect_t0_a=function(mod,ch){};Protracker.prototype.effect_t0_b=function(mod,ch){mod.breakrow=0;mod.patternjump=mod.channel[ch].data;mod.flags|=16};Protracker.prototype.effect_t0_c=function(mod,ch){mod.channel[ch].volume=mod.channel[ch].data};Protracker.prototype.effect_t0_d=function(mod,ch){mod.breakrow=((mod.channel[ch].data&240)>>4)*10+(mod.channel[ch].data&15);if(!(mod.flags&16))mod.patternjump=mod.position+1;mod.flags|=16};Protracker.prototype.effect_t0_e=function(mod,ch){var i=(mod.channel[ch].data&240)>>4;mod.effects_t0_e[i](mod,ch)};Protracker.prototype.effect_t0_f=function(mod,ch){if(mod.channel[ch].data>32){mod.bpm=mod.channel[ch].data}else{if(mod.channel[ch].data)mod.speed=mod.channel[ch].data}};Protracker.prototype.effect_t0_e0=function(mod,ch){if(mod.channels>4)return;if(mod.channel[ch].data&1){mod.filter=false}else{mod.filter=true}};Protracker.prototype.effect_t0_e1=function(mod,ch){mod.channel[ch].period-=mod.channel[ch].data&15;if(mod.channel[ch].period<113)mod.channel[ch].period=113};Protracker.prototype.effect_t0_e2=function(mod,ch){mod.channel[ch].period+=mod.channel[ch].data&15;if(mod.channel[ch].period>856)mod.channel[ch].period=856;mod.channel[ch].flags|=1};Protracker.prototype.effect_t0_e3=function(mod,ch){};Protracker.prototype.effect_t0_e4=function(mod,ch){mod.channel[ch].vibratowave=mod.channel[ch].data&7};Protracker.prototype.effect_t0_e5=function(mod,ch){};Protracker.prototype.effect_t0_e6=function(mod,ch){if(mod.channel[ch].data&15){if(mod.loopcount){mod.loopcount--}else{mod.loopcount=mod.channel[ch].data&15}if(mod.loopcount)mod.flags|=64}else{mod.looprow=mod.row}};Protracker.prototype.effect_t0_e7=function(mod,ch){};Protracker.prototype.effect_t0_e8=function(mod,ch){mod.syncqueue.unshift(mod.channel[ch].data&15)};Protracker.prototype.effect_t0_e9=function(mod,ch){};Protracker.prototype.effect_t0_ea=function(mod,ch){mod.channel[ch].volume+=mod.channel[ch].data&15;if(mod.channel[ch].volume>64)mod.channel[ch].volume=64};Protracker.prototype.effect_t0_eb=function(mod,ch){mod.channel[ch].volume-=mod.channel[ch].data&15;if(mod.channel[ch].volume<0)mod.channel[ch].volume=0};Protracker.prototype.effect_t0_ec=function(mod,ch){};Protracker.prototype.effect_t0_ed=function(mod,ch){if(mod.tick==(mod.channel[ch].data&15)){var p=mod.patterntable[mod.position];var pp=mod.row*4*mod.channels+ch*4;n=(mod.pattern[p][pp]&15)<<8|mod.pattern[p][pp+1];if(n){mod.channel[ch].period=n;mod.channel[ch].voiceperiod=mod.channel[ch].period;mod.channel[ch].samplepos=0;if(mod.channel[ch].vibratowave>3)mod.channel[ch].vibratopos=0;mod.channel[ch].flags|=3;mod.channel[ch].noteon=1}n=mod.pattern[p][pp+0]&240|mod.pattern[p][pp+2]>>4;if(n){mod.channel[ch].sample=n-1;mod.channel[ch].volume=mod.sample[n-1].volume}}};Protracker.prototype.effect_t0_ee=function(mod,ch){mod.patterndelay=mod.channel[ch].data&15;mod.patternwait=0};Protracker.prototype.effect_t0_ef=function(mod,ch){};Protracker.prototype.effect_t1_0=function(mod,ch){if(mod.channel[ch].data){var apn=mod.channel[ch].note;if(mod.tick%3==1)apn+=mod.channel[ch].arpeggio>>4;if(mod.tick%3==2)apn+=mod.channel[ch].arpeggio&15;if(apn>=0&&apn<=mod.baseperiodtable.length)mod.channel[ch].voiceperiod=mod.baseperiodtable[apn];mod.channel[ch].flags|=1}};Protracker.prototype.effect_t1_1=function(mod,ch){mod.channel[ch].period-=mod.channel[ch].slidespeed;if(mod.channel[ch].period<113)mod.channel[ch].period=113;mod.channel[ch].flags|=3};Protracker.prototype.effect_t1_2=function(mod,ch){mod.channel[ch].period+=mod.channel[ch].slidespeed;if(mod.channel[ch].period>856)mod.channel[ch].period=856;mod.channel[ch].flags|=3};Protracker.prototype.effect_t1_3=function(mod,ch){if(mod.channel[ch].period<mod.channel[ch].slideto){mod.channel[ch].period+=mod.channel[ch].slidetospeed;if(mod.channel[ch].period>mod.channel[ch].slideto)mod.channel[ch].period=mod.channel[ch].slideto}if(mod.channel[ch].period>mod.channel[ch].slideto){mod.channel[ch].period-=mod.channel[ch].slidetospeed;if(mod.channel[ch].period<mod.channel[ch].slideto)mod.channel[ch].period=mod.channel[ch].slideto}mod.channel[ch].flags|=3};Protracker.prototype.effect_t1_4=function(mod,ch){var waveform=mod.vibratotable[mod.channel[ch].vibratowave&3][mod.channel[ch].vibratopos]/63;var a=mod.channel[ch].vibratodepth*waveform;mod.channel[ch].voiceperiod+=a;mod.channel[ch].flags|=1};Protracker.prototype.effect_t1_5=function(mod,ch){mod.effect_t1_3(mod,ch);mod.effect_t1_a(mod,ch)};Protracker.prototype.effect_t1_6=function(mod,ch){mod.effect_t1_4(mod,ch);mod.effect_t1_a(mod,ch)};Protracker.prototype.effect_t1_7=function(mod,ch){};Protracker.prototype.effect_t1_8=function(mod,ch){};Protracker.prototype.effect_t1_9=function(mod,ch){};Protracker.prototype.effect_t1_a=function(mod,ch){if(!(mod.channel[ch].data&15)){mod.channel[ch].volume+=mod.channel[ch].data>>4;if(mod.channel[ch].volume>64)mod.channel[ch].volume=64}if(!(mod.channel[ch].data&240)){mod.channel[ch].volume-=mod.channel[ch].data&15;if(mod.channel[ch].volume<0)mod.channel[ch].volume=0}};Protracker.prototype.effect_t1_b=function(mod,ch){};Protracker.prototype.effect_t1_c=function(mod,ch){};Protracker.prototype.effect_t1_d=function(mod,ch){};Protracker.prototype.effect_t1_e=function(mod,ch){var i=(mod.channel[ch].data&240)>>4;mod.effects_t1_e[i](mod,ch)};Protracker.prototype.effect_t1_f=function(mod,ch){};Protracker.prototype.effect_t1_e0=function(mod,ch){};Protracker.prototype.effect_t1_e1=function(mod,ch){};Protracker.prototype.effect_t1_e2=function(mod,ch){};Protracker.prototype.effect_t1_e3=function(mod,ch){};Protracker.prototype.effect_t1_e4=function(mod,ch){};Protracker.prototype.effect_t1_e5=function(mod,ch){};Protracker.prototype.effect_t1_e6=function(mod,ch){};Protracker.prototype.effect_t1_e7=function(mod,ch){};Protracker.prototype.effect_t1_e8=function(mod,ch){};Protracker.prototype.effect_t1_e9=function(mod,ch){if(mod.tick%(mod.channel[ch].data&15)==0)mod.channel[ch].samplepos=0};Protracker.prototype.effect_t1_ea=function(mod,ch){};Protracker.prototype.effect_t1_eb=function(mod,ch){};Protracker.prototype.effect_t1_ec=function(mod,ch){if(mod.tick==(mod.channel[ch].data&15))mod.channel[ch].volume=0};Protracker.prototype.effect_t1_ed=function(mod,ch){mod.effect_t0_ed(mod,ch)};Protracker.prototype.effect_t1_ee=function(mod,ch){};Protracker.prototype.effect_t1_ef=function(mod,ch){}(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=0)})([function(module,exports,__webpack_require__){(function(){function boot(){let WIDTH=160;let HEIGHT=144;let PIXEL_WIDTH=4;const{SYSTEM_FONT_DATA:SYSTEM_FONT_DATA,LOGO_DATA:LOGO_DATA,INTRO_WAV_DATA:INTRO_WAV_DATA,INTRO_LOGO_DATA:INTRO_LOGO_DATA}=__webpack_require__(1);const INTRO_DURATION=3e3;const GL_VERTEX_SHADER_SOURCE=`\n attribute vec4 a_position;\n varying vec2 v_texcoord;\n void main() {\n gl_Position = a_position;\n\n // assuming a unit quad for position we\n // can just use that for texcoords. Flip Y though so we get the top at 0\n v_texcoord = a_position.xy * vec2(0.5, -0.5) + 0.5;\n }\n `;const GL_FRAGMENT_SHADER_SOURCE=`\n precision mediump float;\n varying vec2 v_texcoord;\n uniform sampler2D u_image;\n uniform sampler2D u_palette;\n\n vec4 color;\n\n void main() {\n float index = texture2D(u_image, v_texcoord).a * 255.0;\n\n color = texture2D(u_palette, vec2((index + 0.5) / 256.0, 0.5));\n\n // CRT effect\n // color -= abs(sin(v_texcoord.y * 100.0 * 5.0)) * 0.08; // (1)\n // color -= abs(sin(v_texcoord.y * 300.0 * 10.0)) * 0.05; // (2)\n\n gl_FragColor = color;\n }\n `;const PALETTE=__webpack_require__(2).PALETTE;let COLORS=PALETTE.slice();let palette=new Uint8Array(COLORS.length*4);makePalette();let gl;let image;const _images={0:{id:0,data:new Uint8Array,width:0,height:0,masks:{}}};const _sfx={};const _mods={};const _maps={};let _color=15;let _layer=0;let _camera=[0,0];let _colorize=null;let _status="paused";let _sshot=false;let _sshotfn=null;const _fps={running:false,lastTime:new Date,fps:0,lastFps:0};const _btns={};const _btnsp={};const publicFunctions=[color,colorize,layer,layern,mask,camera,pset,pget,line,rect,rectfill,circ,circfill,cp,sprset,sprcp,print,sfx,play,stop,volume,cls,draw,run,pause,runcart,stopcart,fps,btn,btnp,map,mapn,mget,mset,pal,tri,trifill,sshot,sin,cos,atan2,rnd,rndseed];let _rndSeed=(new Date).getTime();function makePalette(){for(var i=0;i<COLORS.length;i++){palette[i*4+0]=COLORS[i][0];palette[i*4+1]=COLORS[i][1];palette[i*4+2]=COLORS[i][2];palette[i*4+3]=COLORS[i][3]}}function rgb2palette(imageData,width,height){function getNearestColor(color_r,color_g,color_b,a){if(a!==255)return 0;if(color_r&&color_g===undefined){const result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color_r);[color_r,color_g,color_b]=[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]}Array.min=(array=>Math.min.apply(Math,array));const differenceArray=PALETTE.map(c=>{return Math.sqrt((color_r-c[0])*(color_r-c[0])+(color_g-c[1])*(color_g-c[1])+(color_b-c[2])*(color_b-c[2]))});const lowest=Array.min(differenceArray);return differenceArray.indexOf(lowest)}const paletteImage=new Uint8Array(imageData.length/4);for(var i=0,ii=0;i<imageData.length;i+=4,ii++){let[color_r,color_g,color_b,a]=[imageData[i],imageData[i+1],imageData[i+2],imageData[i+3]];paletteImage[ii]=getNearestColor(color_r,color_g,color_b,a);if(paletteImage[ii]===0&&a===255){paletteImage[ii]=1}}return paletteImage}function init(container,assets={}){const canvas=document.createElement("canvas");canvas.width=WIDTH*PIXEL_WIDTH;canvas.height=HEIGHT*PIXEL_WIDTH;canvas.tabIndex=1;canvas.style.outline="none";container.style.width=canvas.width+"px";container.style.height=canvas.height+"px";container.appendChild(canvas);canvas.focus();gl=canvas.getContext("webgl",{alpha:false});const glProgramInfo=twgl.createProgramInfo(gl,[GL_VERTEX_SHADER_SOURCE,GL_FRAGMENT_SHADER_SOURCE]);gl.useProgram(glProgramInfo.program);const imageLoc=gl.getUniformLocation(glProgramInfo.program,"u_image");const paletteLoc=gl.getUniformLocation(glProgramInfo.program,"u_palette");gl.uniform1i(imageLoc,0);gl.uniform1i(paletteLoc,1);const positions=[1,1,-1,1,-1,-1,1,1,-1,-1,1,-1];const vertBuffer=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,vertBuffer);gl.bufferData(gl.ARRAY_BUFFER,new Float32Array(positions),gl.STATIC_DRAW);gl.enableVertexAttribArray(0);gl.vertexAttribPointer(0,2,gl.FLOAT,false,0,0);_images[0].data=new Uint8Array(WIDTH*HEIGHT);_images[0].width=WIDTH;_images[0].height=HEIGHT;layer();cls();gl.activeTexture(gl.TEXTURE0);const imageTex=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,imageTex);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST);gl.texImage2D(gl.TEXTURE_2D,0,gl.ALPHA,WIDTH,HEIGHT,0,gl.ALPHA,gl.UNSIGNED_BYTE,_images[0].data);gl.activeTexture(gl.TEXTURE1);const paletteTex=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,paletteTex);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST);gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,COLORS.length,1,0,gl.RGBA,gl.UNSIGNED_BYTE,palette);gl.drawArrays(gl.TRIANGLES,0,positions.length/2);canvas.addEventListener("keydown",function(evt){const pressedKey=evt.key.toLowerCase();const key=["arrowup","arrowright","arrowdown","arrowleft","a","s","z","x"].indexOf(pressedKey);if(key!==-1){evt.preventDefault();evt.stopPropagation();_btns[pressedKey]=true;if(_btnsp[pressedKey]===undefined){_btnsp[pressedKey]=0}}});canvas.addEventListener("keyup",function(evt){const pressedKey=evt.key.toLowerCase();try{delete _btns[pressedKey];delete _btnsp[pressedKey]}catch(e){}});return new Promise(resolve=>{assets.images.font=SYSTEM_FONT_DATA;const assetsToLoad=Object.keys(assets.images||{}).length+Object.keys(assets.mods||{}).length+Object.keys(assets.maps||{}).length;function checkLoadingDone(){const loadedAssets=Object.keys(_images).length+Object.keys(_mods).length+Object.keys(_maps).length-1;if(loadedAssets===assetsToLoad){sprset(5,6,"font");resolve()}}if(assets.images){for(let img in assets.images){const newImage=document.createElement("img");newImage.onload=function(){const canvas=document.createElement("canvas");const context=canvas.getContext("2d");canvas.width=newImage.width;canvas.height=newImage.height;context.drawImage(newImage,0,0);const imageData=context.getImageData(0,0,newImage.width,newImage.height);_images[img]={id:img,data:rgb2palette(new Uint8Array(imageData.data)),width:newImage.width,height:newImage.height,masks:{}};checkLoadingDone()};if(assets.images[img]instanceof Uint8Array){newImage.src="data:image/png;base64,"+btoa(String.fromCharCode.apply(null,assets.images[img]))}else{if(assets.images[img].startsWith("data:image/png;base64,")){newImage.src=assets.images[img]}else{newImage.src=assets.images[img]}}}}if(assets.sfx){for(let sound in assets.sfx){if(assets.sfx[sound]instanceof Uint8Array){const dataUri="data:audio/wav;base64,"+btoa(String.fromCharCode.apply(null,assets.sfx[sound]));_sfx[sound]=new Audio(dataUri)}else{_sfx[sound]=new Audio(assets.sfx[sound])}}}if(assets.mods){for(let mod in assets.mods){_mods[mod]=new Modplayer;_mods[mod].setrepeat(true);if(assets.mods[mod]instanceof Uint8Array){_mods[mod].load(assets.mods[mod],"mod")}else{_mods[mod].load(assets.mods[mod])}_mods[mod].onReady=function(){checkLoadingDone()}}}if(assets.maps){for(let map in assets.maps){if(assets.maps[map]instanceof Uint8Array){const json=JSON.parse(new TextDecoder("utf-8").decode(assets.maps[map]));_maps[map]={width:json.width,height:json.height,data:json.layers[0].data};checkLoadingDone()}else{window.fetch(assets.maps[map]).then(response=>{response.json().then(json=>{_maps[map]={width:json.width,height:json.height,data:json.layers[0].data};checkLoadingDone()})})}}}if(Object.keys(assets.images).length===0&&Object.keys(assets.sfx).length===0&&Object.keys(assets.mods).length===0&&Object.keys(assets.maps).length===0){checkLoadingDone()}})}function pset(x,y){x-=_camera[0];y-=_camera[1];if(x<0||y<0||x>=WIDTH||y>=HEIGHT)return;try{x=Math.floor(x);y=Math.floor(y);const currentLayer=_layer;const layerMasks=_layer.masks;for(let m in layerMasks){layer(m);if(layerMasks[m]){if(pget(x,y)!==0){_layer=currentLayer;return}}else{if(pget(x,y)===0){_layer=currentLayer;return}}}_layer=currentLayer;if(_color===0)return;let index=y*_layer.width+x;_layer.data[index]=_color}catch(e){}}function pget(x,y){try{x=Math.floor(x);y=Math.floor(y);let index=y*_layer.width+x;return _layer.data[index]}catch(e){}}function color(c=15){_color=c}function colorize(c=null){_colorize=c}function layer(l=0){_layer=_images[l]}function layern(l,w=0,h=0){if(w===0)w=WIDTH;if(h===0)h=HEIGHT;_images[l]={id:l,data:new Uint8Array(w*h),width:w,height:h,masks:{}}}function sprset(w,h,l){l=l||_layer.id;if(_images[l].width%w!==0||_images[l].height%h!==0)throw"Width and height of the layer must be multiple of the sprites' width and height";_images[l].sprw=w;_images[l].sprh=h}function camera(x=0,y=0){_camera=[x,y]}function line(x1,y1,x2,y2){x1=Math.floor(x1);y1=Math.floor(y1);x2=Math.floor(x2);y2=Math.floor(y2);let dx=Math.abs(x2-x1);let dy=Math.abs(y2-y1);let sx=x1<x2?1:-1;let sy=y1<y2?1:-1;let err=dx-dy;while(true){pset(x1,y1);if(x1===x2&&y1===y2)break;let e2=2*err;if(e2>-dy){err-=dy;x1+=sx}if(e2<dx){err+=dx;y1+=sy}}}function rect(x,y,w,h){let x0=Math.min(x,x+w);let x1=Math.max(x,x+w);let y0=Math.min(y,y+h);let y1=Math.max(y,y+h);line(x0,y0,x1,y0);line(x1,y0,x1,y1);line(x1,y1,x0,y1);line(x0,y1,x0,y0)}function rectfill(x,y,w,h){let x0=Math.floor(Math.min(x,x+w));let x1=Math.floor(Math.max(x,x+w));let y0=Math.floor(Math.min(y,y+h));let y1=Math.floor(Math.max(y,y+h));for(let yy=y0;yy<y1;yy++){for(let xx=x0;xx<x1;xx++){pset(xx,yy)}}}function circ(x,y,rd,a1=0,a2=360){let xx=rd;let yy=0;let radiusError=1-xx;function inAngle(x1,y1){const deltaY=y1-y;const deltaX=x1-x;const angleInDegrees=Math.atan2(deltaY,deltaX)*180/Math.PI+180;if(a2>a1){return angleInDegrees>=a1&&angleInDegrees<=a2}else{return angleInDegrees>=a1||angleInDegrees<=a2}}if(a1!==undefined){a1=(a1+90)%360;a2=(a2+90)%360}while(xx>=yy){if(a1===undefined){pset(xx+x,yy+y);pset(yy+x,xx+y);pset(-xx+x,yy+y);pset(-yy+x,xx+y);pset(-xx+x,-yy+y);pset(-yy+x,-xx+y);pset(xx+x,-yy+y);pset(yy+x,-xx+y)}else{if(inAngle(xx+x,yy+y))pset(xx+x,yy+y);if(inAngle(yy+x,xx+y))pset(yy+x,xx+y);if(inAngle(-xx+x,yy+y))pset(-xx+x,yy+y);if(inAngle(-yy+x,xx+y))pset(-yy+x,xx+y);if(inAngle(-xx+x,-yy+y))pset(-xx+x,-yy+y);if(inAngle(-yy+x,-xx+y))pset(-yy+x,-xx+y);if(inAngle(xx+x,-yy+y))pset(xx+x,-yy+y);if(inAngle(yy+x,-xx+y))pset(yy+x,-xx+y)}yy++;if(radiusError<0){radiusError+=2*yy+1}else{xx--;radiusError+=2*(yy-xx+1)}}}function circfill(x,y,rd){let xx=rd;let yy=0;let radiusError=1-xx;while(xx>=yy){line(xx+x,yy+y,-xx+x,yy+y);line(yy+x,xx+y,-yy+x,xx+y);line(-xx+x,-yy+y,xx+x,-yy+y);line(-yy+x,-xx+y,yy+x,-xx+y);yy++;if(radiusError<0){radiusError+=2*yy+1}else{xx--;radiusError+=2*(yy-xx+1)}}}function tri(x1,y1,x2,y2,x3,y3){line(x1,y1,x2,y2);line(x2,y2,x3,y3);line(x3,y3,x1,y1)}function trifill(x1,y1,x2,y2,x3,y3){if(y2>y3){[x2,x3]=[x3,x2];[y2,y3]=[y3,y2]}if(y1>y2){[x1,x2]=[x2,x1];[y1,y2]=[y2,y1]}if(y2>y3){[x2,x3]=[x3,x2];[y2,y3]=[y3,y2]}tri(x1,y1,x2,y2,x3,y3);const x4=x1+(y2-y1)/(y3-y1)*(x3-x1);const y4=y2;let invslope1=(x2-x1)/(y2-y1);let invslope2=(x4-x1)/(y4-y1);let curx1=x1;let curx2=x1;for(let sy=y1;sy<=y2;sy++){line(curx1,sy,curx2,sy);curx1+=invslope1;curx2+=invslope2}invslope1=(x3-x2)/(y3-y2);invslope2=(x3-x4)/(y3-y4);curx1=x3;curx2=x3;for(let sy=y3;sy>y2;sy--){line(curx1,sy,curx2,sy);curx1-=invslope1;curx2-=invslope2}}function cp(l,dx=0,dy=0,sx=0,sy=0,sw=0,sh=0,dw=0,dh=0,fh=false,fv=false,a=0){let currentLayerId=_layer.id;let currentColor=_color;layer(l);sw=sw===0?_layer.width-sx:sw;sh=sh===0?_layer.height-sy:sh;dw=dw===0?sw:dw;dh=dh===0?sh:dh;rw=dw/sw;rh=dh/sh;let cx=dx+dw/2;let cy=dy+dh/2;function rotate(x,y){if(a===0)return[x,y];const radians=Math.PI/180*-a;const cos=Math.cos(radians);const sin=Math.sin(radians);const nx=cos*(x-cx)+sin*(y-cy)+cx;const ny=cos*(y-cy)-sin*(x-cx)+cy;return[nx,ny]}let step=a===0?1:.5;for(let x=0;x<dw;x+=step){for(let y=0;y<dh;y+=step){layer(l);let _x=x/rw+sx;let _y=y/rh+sy;const pixelColor=pget(_x,_y);if(_colorize!==null){if(pixelColor===0)continue;color(_colorize)}else{color(pixelColor)}[_x,_y]=rotate(x+dx,y+dy);if(fh){_x=dw+dx*2-_x-1}if(fv){_y=dh+dy*2-_y-1}layer(currentLayerId);pset(_x,_y)}}layer(currentLayerId);_color=currentColor}function sprcp(l,s,x=0,y=0,sw=1,sh=1,w=0,h=0,fh=false,fv=false,a=0){if(!_images[l].sprw||!_images[l].sprh)throw"The selected layer is not a spritesheet";if(x-_camera[0]<0-_images[l].sprw||x-_camera[0]>WIDTH||y-_camera[1]<0-_images[l].sprh||y-_camera[1]>HEIGHT)return;let sprw=_images[l].sprw;let sprh=_images[l].sprh;if(!sprw)sprw=_images[l].width;if(!sprh)sprh=_images[l].height;w=w===0?sprw*sw:w;h=h===0?sprh*sh:h;let spritesPerRow=_images[l].width/sprw;let spriteX=s%spritesPerRow;let spriteY=Math.floor(s/spritesPerRow);cp(l,x,y,spriteX*sprw,spriteY*sprh,sprw*sw,sprh*sh,w,h,fh,fv,a)}function print(text,x=0,y=0,l="font"){text=text.toString();if(!_images[l].sprw||!_images[l].sprh)throw"The selected layer is not a spritesheet";if(_images[l].width/_images[l].sprw*(_images[l].height/_images[l].sprh)!==96)throw"A font spritesheet must have exactly 96 sprites";for(var i=0;i<text.length;i++){const sprIdx=text.charCodeAt(i)-32;sprcp(l,sprIdx,x+i*_images[l].sprw,y)}}function sfx(s){_sfx[s].play()}function play(m){_mods[m].play()}function stop(m){_mods[m].stop()}function volume(m,v){if(v===0){v=0}else if(v>=1&&v<=10){v=11-v}else if(v>=11&&v<=19){v=(20-v)/10}else if(v===20){v=.5}else{v=8}_mods[m].mixval=v}function draw(){const positions=[1,1,-1,1,-1,-1,1,1,-1,-1,1,-1];gl.activeTexture(gl.TEXTURE0);gl.texImage2D(gl.TEXTURE_2D,0,gl.ALPHA,WIDTH,HEIGHT,0,gl.ALPHA,gl.UNSIGNED_BYTE,_images[0].data);gl.drawArrays(gl.TRIANGLES,0,6)}function cls(c=1){_layer.data.fill(c)}function sshot(fn){_sshotfn=fn;_sshot=true}function run(container,assets,updatefn,initfn,dev=true){if(!dev){assets.sfx=assets.sfx||{};assets.images=assets.images||{};assets.sfx.tako80Intro=INTRO_WAV_DATA;assets.images.tako80Logo=INTRO_LOGO_DATA}init(container,assets).then(function(){if(dev){for(let f of publicFunctions){window[f.name]=f}}_status="running";if(!updatefn)return;function runfn(){if(_status==="running")updatefn();if(_sshot){_sshotfn(canvas.toDataURL());_sshot=false}for(let btn in _btnsp){_btnsp[btn]=1}_fps.fps++;if(new Date-_fps.lastTime>=1e3){_fps.lastTime=new Date;_fps.lastFps=_fps.fps;_fps.fps=0}if(_fps.running){const currentLayer=_layer;const currentCamera=_camera;camera(0,0);layer();const layerMasks=_layer.masks;mask();print(_fps.lastFps,1,1);_layer.masks=layerMasks;draw();_layer=currentLayer;_camera=currentCamera}window.requestAnimationFrame(runfn)}if(!dev){sfx("tako80Intro");let introFnRunning=true;let takoIntroStep1=70;let takoIntroStep2=71;let takoIntroStep=1;function introFn(){cls();cp("tako80Logo",25,50);color(1);if(takoIntroStep<4){const stepX=takoIntroStep;const stepY=takoIntroStep;for(var x=0;x<160;x+=stepX){for(var y=0;y<144;y+=stepX){pset(x,y)}}takoIntroStep+=.03}color(1);rectfill(0,0,160,takoIntroStep1);rectfill(0,takoIntroStep2,160,144);color(86);line(0,takoIntroStep1,160,takoIntroStep1);line(0,takoIntroStep2,160,takoIntroStep2);takoIntroStep1-=.7;takoIntroStep2+=.7;takoIntroStep+=.005;draw();if(introFnRunning)window.requestAnimationFrame(introFn)}introFn();setTimeout(function(){introFnRunning=false;if(initfn)initfn();runfn()},INTRO_DURATION)}else{if(initfn)initfn();runfn()}})}function runcart(container,cart){function searchArray(array,searchElements,fromIndex=0){let index=Array.prototype.indexOf.call(array,searchElements[0],fromIndex);if(searchElements.length===1||index===-1){return index}let i;for(i=index,j=0;j<searchElements.length&&i<array.length;i++,j++){if(array[i]!==searchElements[j]){return searchArray(array,searchElements,index+1)}}return index}function splitArray(array,searchElements){const arr=[];let prevIdx=0;let idx=searchArray(array,searchElements);while(idx!==-1){arr.push(array.subarray(prevIdx,idx));prevIdx=idx+searchElements.length;idx=searchArray(array,searchElements,prevIdx)}return arr}if(cart.tagName==="IMG"){fetch(cart.src).then(response=>{return response.blob()}).then(cartData=>{const fileReader=new FileReader;fileReader.onload=function(){const data=new Uint8Array(this.result);const endOfPng=[69,78,68,174,66,96,130];const splitBuf=new TextEncoder("utf-8").encode("***TAKO80-SEPARATOR***");const splitBufSub=new TextEncoder("utf-8").encode("***TAKO80-SUB-SEPARATOR***");const cartDataIdx=searchArray(data,endOfPng)+endOfPng.length;const cartData=data.subarray(cartDataIdx);const splittedcartData=splitArray(cartData,splitBuf);const takoFunctions=[];let code=new TextDecoder("utf-8").decode(splittedcartData[0]);const cartInitFnName=`tako80cartInit${(new Date).getTime()}`;const cartUpdateFnName=`tako80cartUpdate${(new Date).getTime()}`;const cartFnName=`tako80cart${(new Date).getTime()}`;code=code.replace(/function\s+update\s+\(\)/,`window.${cartUpdateFnName} = function ()`);code=code.replace(/function\s+init\s+\(\)/,`window.${cartInitFnName} = function ()`);code=`\n window.${cartFnName} = function (${publicFunctions.map(f=>f.name).join(", ")}) {\n ${code}\n };\n `;eval(code);window[cartFnName].apply(this,publicFunctions);const assets={images:{},sfx:{},mods:{},maps:{}};const imagesData=splitArray(splittedcartData[1],splitBufSub);for(let imgData of imagesData){const imgName=new TextDecoder("utf-8").decode(imgData.subarray(0,100)).trim();const imageData=imgData.subarray(100);assets.images[imgName]=imageData}const sfxData=splitArray(splittedcartData[2],splitBufSub);for(let sData of sfxData){const sfxName=new TextDecoder("utf-8").decode(sData.subarray(0,100)).trim();const soundData=sData.subarray(100);assets.sfx[sfxName]=soundData}const modsData=splitArray(splittedcartData[3],splitBufSub);for(let modData of modsData){const modName=new TextDecoder("utf-8").decode(modData.subarray(0,100)).trim();const moduleData=modData.subarray(100);assets.mods[modName]=moduleData}const mapsData=splitArray(splittedcartData[4],splitBufSub);for(let mapData of mapsData){const mapName=new TextDecoder("utf-8").decode(mapData.subarray(0,100)).trim();const tilemapData=mapData.subarray(100);assets.maps[mapName]=tilemapData}const initfn=window[cartInitFnName]?window[cartInitFnName]:function(){};run(container,assets,window[cartUpdateFnName],initfn,false)};fileReader.readAsArrayBuffer(cartData)})}}function stopcart(){pause();for(m in _mods){stop(m)}}function fps(f=false){_fps.running=f}function pause(paused=true){_status=paused?"paused":"running"}function btn(k){switch(k){case"up":k="arrowup";break;case"down":k="arrowdown";break;case"left":k="arrowleft";break;case"right":k="arrowright";break}return _btns[k.toLowerCase()]===true}function btnp(k){switch(k){case"up":k="arrowup";break;case"down":k="arrowdown";break;case"left":k="arrowleft";break;case"right":k="arrowright";break}return _btnsp[k.toLowerCase()]===0}function map(m,l,x=0,y=0,sx=0,sy=0,sw=0,sh=0){sw=sw===0?_maps[m].width:sw-sx;sh=sh===0?_maps[m].height:sh-sy;for(var xx=sx;xx<sw;xx++){for(var yy=sy;yy<sh;yy++){const tileIdx=yy*_maps[m].width+xx;if(_maps[m].data[tileIdx]===0)continue;const tile=_maps[m].data[tileIdx]-1;const _xx=xx*_images[l].sprw+x;const _yy=yy*_images[l].sprh+y;sprcp(l,tile,_xx,_yy)}}}function mapn(m,w,h){_maps[m]={width:w,height:h,data:new Array(w*h)};_maps[m].data.fill(0)}function mget(m,x,y){let index=y*_maps[m].width+x;return _maps[m].data[index]-1}function mset(m,x,y,t){let index=y*_maps[m].width+x;_maps[m].data[index]=t+1}function pal(c1,c2){if(c1===undefined){COLORS=PALETTE.slice()}else{COLORS[c1]=COLORS[c2]}palette=new Uint8Array(COLORS.length*4);makePalette();gl.activeTexture(gl.TEXTURE1);gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,COLORS.length,1,0,gl.RGBA,gl.UNSIGNED_BYTE,palette)}function mask(l,i=false){if(l===undefined){_layer.masks={}}else{_layer.masks[l]=i}}function sin(x){return Math.sin(-(x||0)*(Math.PI*2))}function cos(x){return Math.cos((x||0)*(Math.PI*2))}function atan2(dx,dy){function angle(a){return((a-Math.PI)/(Math.PI*2)+.25)%1}return angle(Math.atan2(dy,dx))}function rnd(min=0,max=1,int=true){let x=Math.sin(_rndSeed++)*1e4;x-=Math.floor(x);x=x*(max-min)+min;if(int)x=Math.round(x);return x}function rndseed(s){if(s===undefined)s=(new Date).getTime();_rndSeed=s}return publicFunctions.reduce((acc,f)=>{acc[f.name]=f;return acc},{})}window.tako80={run:function(container,assets,updatefn,initfn,dev=true){const tako80env=boot();tako80env.run(container,assets,updatefn,initfn);return tako80env},runcart:function(container,cart){const tako80env=boot();tako80env.runcart(container,cart,tako80env);return tako80env},stopcart:function(tako80env){tako80env.stopcart();return tako80env}}})()},function(module,exports){module.exports={SYSTEM_FONT_DATA:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAkCAYAAAAeor16AAACh0lEQVRoge1Y0Y7jMAjEVf//l70v64rQGXswiXZbZaRTNxwxhBAGaL13I+hm1sC1lzPZgKLnbSC7qgzZuAq9tdbMzB5nHEbkjfy9OksJ3jgzvix2/5k42MgEsIXfKI/X0XElMyqZ08Mvk7F7u6D3hlkAM1kzux4yJYsqQC+YvfRos7l/KcwCqD4Yy0DkjBJsdL7yUjrRVUsCwvIrahMSuTHBL4fY0zhr+mtb6EVZhpk9MjaiLItVJkr+PfzFwilUIzJ1Q9FlOqqMfepIFpMjkggrBwe7T3A4A/vWM04PJ2ayig0l0CizmH3UGh3sZvtAloWKjppFzK5ynhJolFmsjWHBfsmeThEZZdFnvR5DJnsretkmfNUxLOU3C2/Cs7DZ/DtfMR/LyjPPU1kdydj87qF2Im/yRzDikSnIqE4sGQzI2HnMD2XqqCA+x1vws5NIZdOhMql6b8au4vPWc/kAqr3g7sNkWFj5GjJ2Lyv0D2dAMcJaAnWhsGNjpoM2Lwq2Ni/u3puFqxgsPEhEyaKZXswEJItnXiFjvkR/ETK6L7BZWGVmxJpXsKECddphNVGNwQEjgBk2RIaurANoHh12IypdArLrfyF8BqpDd2w6Kw4rrQ3KBNXfy8H6QHXWHdmnNL6sHOw8NMt6tY6xhYJq96V7s/AmPAubXVvDvhpjmZAZ1tUlwc4yIbMQqNx76jIh3siuGdRlAjtTXZaie5T2qUIupy8T/moWrpQY1efyMkE5MMN8u/2i2uRG3XsW/iREFv5mZOb8NL59mTCgkhLCNC6fsExQZ2E23mWgbHIOcZk10sxpFKxKQV7JMrOwGfZPRbqlYssEFhjUF/33WdiIbP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ihYr9G+5MbwhJrfpjdtup7VVXQ7ZNybpImiPm3/KRi1PKhibZshuajPp5jhQWF4qlfO4JxEJGzEYOWC72eNC7gEoQ416tqiXX2icrXDbWHJjrmP+VHx+cfKvQkpSbMt6nj0fqhu9USaxRFkZWB+yL5cnJenZA/+FzIipX/eqV2sSG/rTgkq4FtefFPhAJdhjS0zaOjo2DsAFAURSOb/FhEd4UF1c9UDR8++VYsWi6UbYAizlrtXUnzM8UfhKxUf2L3yTYN2RPuimfWhFryOjti2SbtIVJyxi1j1xhPp83Y63Kr/VqLPJpx/qoLrViLVJ0pueRpyIT6GRvyc46TRtmySLf2tpBNP9v8eKx9TCoUsL1TWnLj6bS1p+q2mjQsseZluZZY3XwRM0tpAfB/nZZgQ+3+gEIy1h4msiIvG7xuT8Hyo+9yVVX9s8Lii11s7qnriPq1/M31p7JN8LjZONIE385eA2gkDpkZF1p10q7/58gIQiTdFc+MHfdy30+92mmFBYfiyrW5q64mDdgSBmwzT0iU9lXZWsDuf51pAJoVQZVQdhknnXol65Na7N6VkvEhOpavFFJ+hLxdbO4aj7+fAuEyrPtaZNbkSYaJfGg/JWbG6ekpAOhA9YRY7egoY+lYvlLo6mcXm9m6VVWRyFv7fi6hoXaNp7PLbam8v78PBS3ImaDs431CZxc7u/jpXZeI8DC7Jf9uJ9DHev+0GesD0L4O/PsXwMzDp6ePAvufp7NLPJ1dAoB8t/pDfdLu4z+cdEhy69j5KwAAAABJRU5ErkJggg=="}},function(module,exports){module.exports={PALETTE:[[0,0,0,0],[0,0,0,255],[37,37,37,255],[52,52,52,255],[78,78,78,255],[104,104,104,255],[117,117,117,255],[142,142,142,255],[164,164,164,255],[184,184,184,255],[197,197,197,255],[208,208,208,255],[215,215,215,255],[225,225,225,255],[234,234,234,255],[255,255,255,255],[66,32,0,255],[85,40,0,255],[119,55,0,255],[155,80,0,255],[197,104,0,255],[230,123,0,255],[255,146,0,255],[255,172,0,255],[255,198,0,255],[255,209,33,255],[255,217,59,255],[255,232,64,255],[255,246,68,255],[255,251,101,255],[255,255,137,255],[255,255,165,255],[70,25,1,255],[115,29,11,255],[161,34,24,255],[181,57,23,255],[202,81,17,255],[229,105,6,255],[254,129,0,255],[255,140,0,255],[255,153,16,255],[255,175,35,255],[255,186,55,255],[255,192,68,255],[255,199,101,255],[255,214,129,255],[255,229,147,255],[255,231,167,255],[94,31,7,255],[123,35,5,255],[154,43,0,255],[178,46,0,255],[193,53,27,255],[213,77,32,255],[233,97,54,255],[245,110,67,255],[255,120,78,255],[255,138,101,255],[255,152,120,255],[255,164,136,255],[255,179,156,255],[255,194,176,255],[255,208,194,255],[255,218,207,255],[75,23,0,255],[115,30,0,255],[170,16,0,255],[202,30,0,255],[226,34,0,255],[239,57,20,255],[253,81,44,255],[255,96,65,255],[255,111,90,255],[255,125,123,255],[255,142,141,255],[255,156,156,255],[255,171,172,255],[255,185,188,255],[255,199,206,255],[255,201,222,255],[74,0,55,255],[103,0,76,255],[129,0,96,255],[151,1,117,255],[172,26,137,255],[188,56,154,255],[204,73,170,255],[217,86,183,255],[230,99,196,255],[241,110,208,255],[253,123,220,255],[255,138,227,255],[255,155,230,255],[255,163,232,255],[255,173,235,255],[255,182,237,255],[73,0,110,255],[93,0,138,255],[102,0,146,255],[124,24,170,255],[148,52,194,255],[158,62,204,255],[168,73,214,255],[179,84,225,255],[190,96,236,255],[198,104,244,255],[207,113,253,255],[214,127,255,255],[219,140,255,255],[223,153,255,255],[227,167,255,255],[231,180,255,255],[2,24,131,255],[1,30,168,255],[0,37,206,255],[35,53,216,255],[67,69,226,255],[78,84,240,255],[88,98,255,255],[100,112,255,255],[112,127,255,255],[127,142,255,255],[143,158,255,255],[150,167,255,255],[158,176,255,255],[174,189,255,255],[191,202,255,255],[205,210,255,255],[9,0,123,255],[31,20,145,255],[52,43,166,255],[69,61,183,255],[86,79,200,255],[96,89,210,255],[109,101,222,255],[123,115,236,255],[137,130,250,255],[145,138,255,255],[156,149,255,255],[167,162,255,255],[178,173,255,255],[187,182,255,255],[195,192,255,255],[211,208,255,255],[28,39,91,255],[27,54,120,255],[26,70,148,255],[23,90,175,255],[20,111,201,255],[44,132,210,255],[67,154,219,255],[73,167,239,255],[79,181,255,255],[100,201,255,255],[112,202,255,255],[127,210,255,255],[138,217,255,255],[157,211,255,255],[178,226,255,255],[191,235,255,255],[0,75,90,255],[0,93,111,255],[0,111,133,255],[0,132,157,255],[0,152,193,255],[0,171,204,255],[0,188,224,255],[0,208,247,255],[0,220,255,255],[47,225,255,255],[93,231,255,255],[113,234,255,255],[135,237,255,255],[151,239,255,255],[175,243,255,255],[198,246,255,255],[0,73,0,255],[0,85,0,255],[0,108,0,255],[1,119,0,255],[14,129,10,255],[31,147,29,255],[48,166,46,255],[73,187,72,255],[75,207,73,255],[110,220,109,255],[120,230,119,255],[129,239,128,255],[150,244,149,255],[177,248,176,255],[193,250,193,255],[204,253,203,255],[20,65,0,255],[25,84,0,255],[32,103,0,255],[36,121,0,255],[41,141,0,255],[53,153,0,255],[67,167,0,255],[77,177,13,255],[88,188,30,255],[110,209,55,255],[130,229,77,255],[138,237,85,255],[148,247,96,255],[157,255,105,255],[175,255,132,255],[186,255,149,255],[44,54,0,255],[56,69,0,255],[68,83,0,255],[73,87,0,255],[96,114,0,255],[108,128,0,255],[121,142,0,255],[139,160,0,255],[158,179,29,255],[171,193,46,255],[184,206,61,255],[194,216,72,255],[205,227,70,255],[219,241,98,255],[232,254,112,255],[242,255,167,255],[70,58,3,255],[77,64,2,255],[84,70,0,255],[109,89,0,255],[145,119,0,255],[172,140,0,255],[194,162,0,255],[209,177,24,255],[223,191,44,255],[231,199,53,255],[238,206,61,255],[246,217,87,255],[252,227,110,255],[253,239,147,255],[253,244,165,255],[253,244,187,255],[65,26,0,255],[89,31,0,255],[113,36,0,255],[142,58,8,255],[173,81,20,255],[183,100,29,255],[193,119,38,255],[210,134,48,255],[227,148,58,255],[239,161,69,255],[251,174,79,255],[254,184,83,255],[255,194,87,255],[255,203,96,255],[255,208,120,255],[255,219,145,255]]}}]);