Commits

Peter Hosey committed eeed6d7

Upgrading to Processing.js 0.9.1.

  • Participants
  • Parent commits f43809a

Comments (0)

Files changed (3)

 <html>
 <head>
 <title>BitTorrent visualization in processing.js</title>
-<script src="processing-0.5.packed.js"></script>
+<script src="processing-0.9.1.js"></script>
 <style type="text/css">
 <!--
 body {

processing-0.5.packed.js

-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(G(){u.1Q=G 1Q(6o,1b){if(1a 6o==="2t"){6o=26.9b(6o)}o p=1Q.8M(6o);if(1b){p.6d(1b)}I p};1Q.6r={};o 9P=G(2h){o 6t=18 2B.ek();if(6t){6t.d1("es",2h+"?t="+18 36().5N(),1g);6t.ev(37);I 6t.h7}P{I 1g}};o 6d=G(){o 1v=26.6m(\'1v\');1c(o i=0,l=1v.N;i<l;i++){o 4O=1v[i].3f(\'1d-cK\');if(4O===37){4O=1v[i].3f(\'4O\')}if(4O){1Q(1v[i],9P(4O))}}};o 9l=G(1d){o a0=1g;31{e9;a0=1h}35(e){}I a0===1h?18 e9(1d):18 hu(1d)};o 7Z=[0.5,0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,-0.5,0.5,-0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,0.5,0.5,0.5,0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,0.5,0.5,0.5,0.5];o 9L=[0.5,0.5,0.5,0.5,-0.5,0.5,0.5,0.5,-0.5,0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5];o 2x;o 7y;o 7x;o dl="h8 hb 6H;"+"7T ea 1q;"+"7T 9u 50;"+"7T 9u 4D;"+"7T 9u 3l;"+"7v eb(7v){"+"  hc = 1q;"+"  he = 3l * 4D * 50 * ea(6H, 1.0);"+"}";o dr="7v eb(7v){"+"  ha = hg;"+"}";26.77(\'hh\',G(){6d()},1g);1Q.3A=G(e){};1Q.96=G 96(1b,p){1b=1b.1i(/(\'(.){1}\')/g,"$1.6G(0)");o 5M=[];1b=1b.1i(/(["\'])(\\\\\\1|.)*?(\\1)/g,G(2f){5M.2l(2f);I"<eu "+(5M.N-1)+">"});1b=1b.1i(/\\/\\/.*\\n/g,"\\n");1b=1b.1i(/([^\\s])%([^\\s])/g,"$1 % $2");1b=1b.1i(/(\\s*=\\s*|\\(*\\s*)8g(\\s*\\)+?|\\s*;)/,"$1p.8b$2");1b=1b.1i(/(?:65 )?(\\w+(?:\\[\\])* )(\\w+)\\s*(\\([^\\)]*\\)\\s*\\{)/g,G(2f,3a,1m,21){if(1m==="if"||1m==="1c"||1m==="2T"){I 2f}P{I"5h."+1m+" = G "+1m+21}});1b=1b.1i(/hi\\s+(.+);/g,"");1b=1b.1i(/\\.N\\(\\)/g,".N");1b=1b.1i(/([\\(,]\\s*)(\\w+)((?:\\[\\])+| )\\s*(\\w+\\s*[\\),])/g,"$1$4");1b=1b.1i(/([\\(,]\\s*)(\\w+)((?:\\[\\])+| )\\s*(\\w+\\s*[\\),])/g,"$1$4");1b=1b.1i(/18 (\\w+)((?:\\[([^\\]]*)\\])+)/g,G(2f,1m,21){I"18 6u("+21.1i(/\\[\\]/g,"[0]").1W(1,-1).1H("][").3X(", ")+")"});1b=1b.1i(/(?:65 )?\\w+\\[\\]\\s*(\\w+)\\[?\\]?\\s*=\\s*\\{.*?\\};/g,G(2f){I 2f.1i(/\\{/g,"[").1i(/\\}/g,"]")});o 9N=/(\\n\\s*(?:4R|9t)(?!\\[\\])*(?:\\s*|[^\\(;]*?,\\s*))([a-hk-Z]\\w*)\\s*(,|;)/i;2T(9N.2W(1b)){1b=1b.1i(18 2V(9N),G(2f,3a,1m,7p){I 3a+" "+1m+" = 0"+7p})}1b=1b.1i(/(?:65\\s+)?(?:7Q\\s+)?(\\w+)((?:\\[\\])+| ) *(\\w+)\\[?\\]?(\\s*[=,;])/g,G(2f,3a,3i,1m,7p){if(3a==="I"){I 2f}P{I"o "+1m+7p}});1b=1b.1i(/\\=\\s*\\{((.|\\s)*?)\\};/g,G(2f,1d){I"= ["+1d.1i(/\\{/g,"[").1i(/\\}/g,"]")+"]"});1b=1b.1i(/gW\\(/g,"ef(");o 8w=["4R","9t","61","6f","cQ","hm","hn","6u"];o 90=G(2f,1m,5S,7m,9p){8w.2l(1m);o 9k="";7m=7m.1i(/7Q\\s+o\\s+(\\w+\\s*=\\s*.*?;)/g,G(2f,ee){9k+=" "+1m+"."+ee;I""});I"G "+1m+"() {cs(u){\\n "+(5S?"o eg=u;G ef(){7L(eg,O,"+5S+");}\\n":"")+7m.1i(/\\s*,\\s*/g,";\\n  u.").1i(/\\b(o |7Q |6g )+\\s*/g,"u.").1i(/\\b(o |7Q |6g )+\\s*/g,"u.").1i(/u\\.(\\w+);/g,"u.$1 = 37;")+(5S?"7L(u, "+5S+");\\n":"")+"<cO "+1m+" "+9k+">"+(1a 9p==="2t"?9p:1m+"(")};o 8v=G(1o){o 27=1o,74=0,9Q=1,9e=0;2T(9Q!==9e){o 6c=27.2S("{"),7n=27.2S("}");if(6c<7n&&6c!==-1){9Q++;27=27.1W(6c+1);74+=6c+1}P{9e++;27=27.1W(7n+1);74+=7n+1}}I 1o.1W(0,74-1)};o cU=/(?:6g |da |65 )*cX (\\w+)\\s*(?:cT\\s*(\\w+)\\s*)?\\{\\s*((?:.|\\n)*?)\\b\\1\\s*\\(/g;o cY=/(?:6g |da |65 )*cX (\\w+)\\s*(?:cT\\s*(\\w+)\\s*)?\\{\\s*((?:.|\\n)*?)(5h)/g;1b=1b.1i(cU,90);1b=1b.1i(cY,90);o cP=/<cO (\\w+) (.*?)>/,m;2T((m=1b.42(cP))){o 1N=2V.eo,6e=2V.ep,27=8v(6e),cG=m[1],ca=m[2]||"";6e=6e.1W(27.N+1);27=27.1i(18 2V("\\\\b"+cG+"\\\\(([^\\\\)]*?)\\\\)\\\\s*{","g"),G(2f,21){21=21.1H(/,\\s*?/);if(21[0].42(/^\\s*$/)){21.bx()}o fn="if ( O.N === "+21.N+" ) {\\n";1c(o i=0;i<21.N;i++){fn+=" o "+21[i]+" = O["+i+"];\\n"}I fn});27=27.1i(/(?:6g )?5h.\\w+ = G (\\w+)\\((.*?)\\)/g,G(2f,1m,21){I"el(u, \'"+1m+"\', G("+21+")"});o dF=/el([\\s\\S]*?\\{)/,9X;o 8q="";2T((9X=27.42(dF))){o ci=2V.eo,8s=2V.ep,8t=8v(8s);8q+="6v"+9X[1]+8t+"});";27=ci+8s.1W(8t.N+1)}27=8q+27;1b=1N+27+"\\n}}"+ca+6e}1b=1b.1i(/5h.\\w+ = G 6v/g,"6v");if(1b.42(/28\\((?:.+),(?:.+),\\s*6b\\s*\\);/)){p.3B=1h}1b=1b.1i(/\\(4R\\)/g,"0|");1b=1b.1i(18 2V("\\\\(("+8w.3X("|")+")(\\\\[\\\\])*\\\\)","g"),"");o bP=G(R){o 1r=[];R.1i(/(..)/g,G(R){1r.2l(1G(R,16))});I 1r};1b=1b.1i(/#([a-f0-9]{6})/ig,G(m,2o){o 17=bP(2o);I"aO("+17[0]+","+17[1]+","+17[2]+")"});1b=1b.1i(/(\\d+)f/g,"$1");1c(o i=0;i<5M.N;i++){1b=1b.1i(18 2V("(.*)(<eu "+i+">)(.*)","g"),G(2f,3Y,42,c3){o 9G=2f,5K=1h,7C="",6J=1g;1c(o x=0;x<3Y.N;x++){if(5K){if(3Y.41(x)==="\\""||3Y.41(x)==="\'"){7C=3Y.41(x);5K=1g}}P{if(!6J){if(3Y.41(x)==="\\\\"){6J=1h}P if(3Y.41(x)===7C){5K=1h;7C=""}}P{6J=1g}}}if(5K){9G=3Y+5M[i]+c3}I 9G})}I 1b};1Q.8M=G hR(1D){o p={};o J;p.3B=1g;p.1m=\'1Q.fB hT\';p.3w=U.3w;p.cp=2*p.3w;p.hU=p.3w/2;p.hV=3.ex+38;p.hX=-3.ex+38;p.hY=cj;p.f9=-i0;p.f8=3;p.8i=0;p.6W=1;p.bp=1;p.5P=2;p.eA=2;p.bS=5;p.8m=6;p.8R=7;p.89=8;p.bj=9;p.bl=4;p.7e=3;p.ch=10;p.5J=1h;p.9D=1;p.az=2;p.6b=\'6b\';p.8b=0;p.bC=1h;p.ez=\'am\';p.i3=\'fa\';p.i5=\'f5\';p.i6=\'eW\';p.i9=\'ap\';p.eV=\'ia\';p.bL="2h(\'1d:47/d7;eY,f6///eT==\'), id";p.1C=fg;p.1w=fC;p.1u=gd;p.1A=ik;p.aU=0;p.dC=1<<0;p.dB=1<<1;p.dE=1<<2;p.aX=1<<3;p.dn=1<<4;p.b3=1<<5;p.b4=1<<6;p.b5=1<<7;p.b6=1<<8;p.bd=1<<9;p.b7=1<<10;p.b9=1<<11;p.d4=1<<12;p.bh=1<<13;p.7P=15;p.eC=1<<p.7P;p.im=p.eC-1;p.io=24-p.7P;p.ip=16-p.7P;p.ir=\'1R\';p.iN=\'it\';p.iv=\'c8\';p.iw=\'ix\';p.iy=\'iA\';p.5P=iB;p.c4=iC;p.en=iD;p.a9=iF;p.ej=iG;p.8a=iH;p.9w=[69,70,71,72];o iI=1h,2r=1h,2D=1h,6O=1g,8U=1g,7b=1h,5I=0,3C=p.8i,6C=p.5P,9a=1g,88=1g,64="4t( 5f, 5f, 5f, 1 )",8h=6l,7A=p.ez,aM=26.7F.7B.4E,82=1,2P=p.eA,1Y=0,1S=[],8e=0,2C=Y,3m=Y,3p=Y,3q=Y,3x=1g,39=1g,6V=1g,3L=1g,3j=p.9D,2Q=-1,3o=12,3G="iK",6U=1g,66=18 36().5N(),8d=66,6M=0;o 5A,6B,49,4C,a7,7h,3l,9U=1g,6A=60*(U.3w/91),6I=1D.1f/2,4i=1D.1l/2,46=4i/U.4y(6A/2),ad=46/10,a4=46*10,a5=1D.1f/1D.1l;o 4m,4A,86,87,4a,4j;o 8I=18 1z(0);p.9E="";p.2K={};p.dP=0;p.dR=0;p.9F=0;p.9R=0;p.6E=0;p.c6=1g;p.8E=1J;p.aa=1J;p.a6=1J;p.39=1J;p.8O=1J;p.3L=1J;p.ao=1J;p.4d=1J;p.9i=1J;p.1f=1D.1f-0;p.1l=1D.1l-0;p.bA=0;p.1H=G(R,eB){I R.1H(eB)};p.iM=G(R,5o){if(O.N===1){5o="\\n\\t\\r\\f "}5o="["+5o+"]";o 2g=18 1z(0);o 4v=0;o 1E=R.eD(5o);2T(1E>=0){if(1E===0){R=R.5y(1)}P{2g[4v]=R.5y(0,1E);4v++;R=R.5y(1E)}1E=R.eD(5o)}if(R.N>0){2g[4v]=R}if(2g.N===0){2g=1J}I 2g};p.iO=G(1j,ey){1j[1j.N]=ey;I 1j};p.ah=G ah(eE,eF){I eE.ah(eF)};p.ai=G(1j,7J){o 1r=[];if(1j.N>0){o eG=7J>0?7J:1j.N;1c(o i=0;i<eG;i++){1r.2l(1j[i])}if(1a 1j[0]==="2t"){1r.ai()}P{1r.ai(G(a,b){I a-b})}if(7J>0){1c(o j=1r.N;j<1j.N;j++){1r.2l(1j[j])}}}I 1r};p.7E=G(1j,1I,4v){if(1j.N===0&&1I.N===0){I 1j}if(1I 30 1z){1c(o i=0,j=4v;i<1I.N;j++,i++){1j.7E(j,0,1I[i])}}P{1j.7E(4v,0,1I)}I 1j};p.eI=G(1j,6x,N){if(O.N===2){I p.eI(1j,6x,1j.N-6x)}P if(O.N===3){I 1j.1W(6x,6x+N)}};p.3X=G 3X(1j,eJ){I 1j.3X(eJ)};p.iS=G(2g){o 3F=18 1z(0);o 1M=2g.N;1c(o i=0;i<1M;i++){3F[i]=2g[i]}3F.4I();I 3F};p.iT=G(2g,eK){o 3F=18 1z(0);o 1M=2g.N;1c(o i=0;i<1M;i++){3F[i]=2g[i]}if(O.N===1){3F.N*=2}P if(O.N===2){3F.N=eK}I 3F};p.6u=G 6u(28,aq,7I){o 1j=18 1z(0|28);if(aq){1c(o i=0;i<28;i++){1j[i]=[];1c(o j=0;j<aq;j++){o a=1j[i][j]=7I?18 1z(7I):0;1c(o k=0;k<7I;k++){a[k]=0}}}}P{1c(o l=0;l<28;l++){1j[l]=0}}1j.2R=G(i){I u[i]};1j.eM=G(7S){1c(o j=0;j<u.N;j++){if(7S==u[j]){I 1h}}I 1g};1j.7k=G(7S){I u.2l(7S)};1j.28=G(){I u.N};1j.7t=G(){u.N=0};1j.eN=G(i){I u.7E(i,1)};1j.eO=G(){I!u.N};1j.eP=G(){o a=18 6u(28);1c(o i=0;i<28;i++){a[i]=u[i]}I a};I 1j};p.as=G(1j){I 1j.as()};p.1B=G(1q){o 5C=/\\(([^\\)]+)\\)/.5Y(1q).1W(1,2)[0].1H(\',\');I((5C[3]*Y)<<24)|(5C[0]<<16)|(5C[1]<<8)|(5C[2])};p.4w=G(a,b,f){I a+(((b-a)*f)>>8)};p.1x=G(n){I(n<0)?0:((n>Y)?Y:n)};p.2k={1i:G(a,b){I p.1B(b)},dD:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|p.4w(c1&p.1w,c2&p.1w,f)&p.1w|p.4w(c1&p.1u,c2&p.1u,f)&p.1u|p.4w(c1&p.1A,c2&p.1A,f))},7k:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|U.1P(((c1&p.1w)+((c2&p.1w)>>8)*f),p.1w)&p.1w|U.1P(((c1&p.1u)+((c2&p.1u)>>8)*f),p.1u)&p.1u|U.1P((c1&p.1A)+(((c2&p.1A)*f)>>8),p.1A))},dL:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|U.3z(((c1&p.1w)-((c2&p.1w)>>8)*f),p.1u)&p.1w|U.3z(((c1&p.1u)-((c2&p.1u)>>8)*f),p.1A)&p.1u|U.3z((c1&p.1A)-(((c2&p.1A)*f)>>8),0))},dj:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|U.3z(c1&p.1w,((c2&p.1w)>>8)*f)&p.1w|U.3z(c1&p.1u,((c2&p.1u)>>8)*f)&p.1u|U.3z(c1&p.1A,((c2&p.1A)*f)>>8))},b0:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|p.4w(c1&p.1w,U.1P(c1&p.1w,((c2&p.1w)>>8)*f),f)&p.1w|p.4w(c1&p.1u,U.1P(c1&p.1u,((c2&p.1u)>>8)*f),f)&p.1u|p.4w(c1&p.1A,U.1P(c1&p.1A,((c2&p.1A)*f)>>8),f))},dh:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=(ar>br)?(ar-br):(br-ar);o cg=(ag>bg)?(ag-bg):(bg-ag);o cb=(ab>bb)?(ab-bb):(bb-ab);I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))},dw:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=ar+br-((ar*br)>>7);o cg=ag+bg-((ag*bg)>>7);o cb=ab+bb-((ab*bb)>>7);I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))},de:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=(ar*br)>>8;o cg=(ag*bg)>>8;o cb=(ab*bb)>>8;I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))},dc:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=Y-(((Y-ar)*(Y-br))>>8);o cg=Y-(((Y-ag)*(Y-bg))>>8);o cb=Y-(((Y-ab)*(Y-bb))>>8);I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))},dd:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=(br<4F)?((ar*br)>>7):(Y-(((Y-ar)*(Y-br))>>7));o cg=(bg<4F)?((ag*bg)>>7):(Y-(((Y-ag)*(Y-bg))>>7));o cb=(bb<4F)?((ab*bb)>>7):(Y-(((Y-ab)*(Y-bb))>>7));I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))},ba:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=((ar*br)>>7)+((ar*ar)>>8)-((ar*ar*br)>>15);o cg=((ag*bg)>>7)+((ag*ag)>>8)-((ag*ag*bg)>>15);o cb=((ab*bb)>>7)+((ab*ab)>>8)-((ab*ab*bb)>>15);I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))},d3:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=(ar<4F)?((ar*br)>>7):(Y-(((Y-ar)*(Y-br))>>7));o cg=(ag<4F)?((ag*bg)>>7):(Y-(((Y-ag)*(Y-bg))>>7));o cb=(ab<4F)?((ab*bb)>>7):(Y-(((Y-ab)*(Y-bb))>>7));I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))},bf:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=(br===Y)?Y:p.1x((ar<<8)/(Y-br)); o cg=(bg===Y)?Y:p.1x((ag<<8)/(Y-bg)); o cb=(bb===Y)?Y:p.1x((ab<<8)/(Y-bb)); I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))},bi:G(a,b){o c1=p.1B(a);o c2=p.1B(b);o f=(c2&p.1C)>>>24;o ar=(c1&p.1w)>>16;o ag=(c1&p.1u)>>8;o ab=(c1&p.1A);o br=(c2&p.1w)>>16;o bg=(c2&p.1u)>>8;o bb=(c2&p.1A);o cr=(br===0)?0:Y-p.1x(((Y-ar)<<8)/br); o cg=(bg===0)?0:Y-p.1x(((Y-ag)<<8)/bg); o cb=(bb===0)?0:Y-p.1x(((Y-ab)<<8)/bb); I(U.1P(((c1&p.1C)>>>24)+f,2u)<<24|(p.1x(ar+(((cr-ar)*f)>>8))<<16)|(p.1x(ag+(((cg-ag)*f)>>8))<<8)|(p.1x(ab+(((cb-ab)*f)>>8))))}};p.1q=G 1q(1V,3R,5j,eh){o r,g,b,5p,1F;G aA(h,s,b){h=(h/3m)*92;s=(s/3p)*4U;b=(b/3q)*4U;o br=U.1R(b/4U*Y);if(s===0){I[br,br,br]}P{o 9T=h%92;o f=9T%60;o p=U.1R((b*(4U-s))/f3*Y);o q=U.1R((b*(av-s*f))/aw*Y);o t=U.1R((b*(av-s*(60-f)))/aw*Y);3P(U.2E(9T/60)){W 0:I[br,t,p];W 1:I[q,br,p];W 2:I[p,br,t];W 3:I[p,q,br];W 4:I[t,p,br];W 5:I[br,p,q]}}}G 7z(ay,62){I U.1R(Y*(ay/62))}if(O.N===3){1F=p.1q(1V,3R,5j,2C)}P if(O.N===4){o a=eh/2C;a=8D(a)?1:a;if(3j===p.az){5p=aA(1V,3R,5j);r=5p[0];g=5p[1];b=5p[2]}P{r=7z(1V,3m);g=7z(3R,3p);b=7z(5j,3q)}1F="4t("+r+","+g+","+b+","+a+")"}P if(1a 1V==="2t"){1F=1V;if(O.N===2){o c=1F.1H(",");c[3]=(3R/2C)+")";1F=c.3X(",")}}P if(O.N===2){1F=p.1q(1V,1V,1V,3R)}P if(1a 1V==="1X"&&1V<7Y&&1V>=0){1F=p.1q(1V,1V,1V,2C)}P if(1a 1V==="1X"){o 4z=0;if(1V<0){4z=9O-(1V*-1)}P{4z=1V}o ac=U.2E((4z%9O)/aB);o aD=U.2E((4z%aB)/aC);o gc=U.2E((4z%aC)/7Y);o bc=4z%7Y;1F=p.1q(aD,gc,bc,ac)}P{1F=p.1q(3m,3p,3q,2C)}I 1F};o 5x=G 5x(1F){if(1F.3e===1z){I 1F}P{I p.1q(1F)}};p.hj=G(1F){I 1G(5x(1F).1W(5),10)};p.fb=G(1F){I 1G(5x(1F).1H(",")[1],10)};p.fc=G(1F){I 1G(5x(1F).1H(",")[2],10)};p.fd=G(1F){I 1G(1K(5x(1F).1H(",")[3])*Y,10)};p.aI=G aI(c1,c2,4o){o 5F=p.1q(c1).1H(",");o aK=1G(5F[0].1H("(")[1],10);o g1=1G(5F[1],10);o b1=1G(5F[2],10);o a1=1K(5F[3].1H(")")[0],10);o 5H=p.1q(c2).1H(",");o aL=1G(5H[0].1H("(")[1],10);o g2=1G(5H[1],10);o b2=1G(5H[2],10);o a2=1K(5H[3].1H(")")[0],10);o r=1G(p.5g(aK,aL,4o),10);o g=1G(p.5g(g1,g2,4o),10);o b=1G(p.5g(b1,b2,4o),10);o a=1K(p.5g(a1,a2,4o),10);o 1F="4t("+r+","+g+","+b+","+a+")";I 1F};p.aO=G(1V,3R,5j){o aQ=3j;3j=p.9D;o c=p.1q(1V/Y*3m,3R/ Y * 3p, 5j /Y*3q);3j=aQ;I c};p.af=G af(40,4S,aR,e3,ed){3j=40;if(O.N>=4){3m=4S;3p=aR;3q=e3}if(O.N===5){2C=ed}if(O.N===2){p.af(40,4S,4S,4S,4S)}};p.fk=G(c1,c2,40){o 1q=0;3P(40){W p.aU:1q=p.2k.1i(c1,c2);1k;W p.dC:1q=p.2k.dD(c1,c2);1k;W p.dB:1q=p.2k.7k(c1,c2);1k;W p.dE:1q=p.2k.dL(c1,c2);1k;W p.aX:1q=p.2k.dj(c1,c2);1k;W p.dn:1q=p.2k.b0(c1,c2);1k;W p.b3:1q=p.2k.dh(c1,c2);1k;W p.b4:1q=p.2k.dw(c1,c2);1k;W p.b5:1q=p.2k.de(c1,c2);1k;W p.b6:1q=p.2k.dc(c1,c2);1k;W p.b7:1q=p.2k.dd(c1,c2);1k;W p.b9:1q=p.2k.ba(c1,c2);1k;W p.bd:1q=p.2k.d3(c1,c2);1k;W p.d4:1q=p.2k.bf(c1,c2);1k;W p.bh:1q=p.2k.bi(c1,c2);1k}I 1q};p.2Y=G 2Y(x,y,z){if(p.3B){49.2Y(x,y,z)}P{J.2Y(x,y)}};p.4q=G 4q(x,y){J.4q(x,y||x)};p.6L=G 6L(){if(p.3B){7h.6D(4C)}P{J.4k()}};p.6N=G 6N(){if(p.3B){4C.29(7h.4I())}P{J.6a()}};p.bk=G bk(){49.9z()};p.9B=G(3J){49.9B(3J)};p.7u=G(3J){49.7u(3J)};p.9C=G(3J){49.9C(3J)};p.85=G 85(3J){if(p.3B){49.7u(3J)}P{J.85(3J)}};p.8x=G 8x(){J.4k();p.6L();o bm={\'2r\':2r,\'2D\':2D,\'2Q\':2Q,\'3C\':3C,\'3j\':3j,\'3m\':3m,\'3q\':3q,\'3p\':3p,\'2C\':2C,\'3G\':3G,\'3o\':3o};8I.2l(bm)};p.7U=G 7U(){o 2F=8I.4I();if(2F){J.6a();p.6N();2r=2F.2r;2D=2F.2D;2Q=2F.2Q;3C=2F.fs;3j=2F.3j;3m=2F.3m;3q=2F.3q;3p=2F.3p;2C=2F.2C;3G=2F.3G;3o=2F.3o}P{3E"fu fv 7U() fw fx 8x()"}};p.bo=G bo(){I 18 36().fz()+fA};p.bY=G bY(){I 18 36().fD()};p.bO=G bO(){I 18 36().fE()};p.bs=G bs(){I 18 36().fF()};p.bt=G bt(){I 18 36().fG()};p.bu=G bu(){I 18 36().fH()};p.bv=G bv(){I 18 36().5N()-66};p.bw=G bw(){7b=1g;6O=1g;80(5I)};p.73=G 73(){o 8c=(18 36().5N()-8d)/6l;6M++;o bz=6M/8c;if(8c>0.5){8d=18 36().5N();6M=0;p.8b=bz}p.bA++;88=1h;if(p.3B){J.7t(J.fI|J.fJ);p.6n();p.4d()}P{p.6L();p.4d();p.6N()}88=1g};p.8V=G 8V(){if(6O){I}5I=2B.fL(G(){31{31{p.bC=26.fM()}35(e){}p.73()}35(bD){2B.80(5I);3E bD}},82);7b=1h;6O=1h};p.8g=G 8g(bF){8h=bF;82=6l/8h};p.bH=G bH(){2B.80(5I)};p.4E=G 4E(40){7A=26.7F.7B.4E=40};p.bJ=G bJ(){7A=26.7F.7B.4E=p.bL};p.fP=G(bM,1O){2B.fR=bM};p.aH=G aH(){};p.bN=G bN(){};p.aN=G aN(6r){};o 8j=G(e){e.fS();e.fT()};p.7W=G 7W(){1D.77(\'bT\',8j,1g)};p.bR=G bR(){1D.fU(\'bT\',8j,1g)};G 4H(1I,4s){o 3Z=1;3Z=3Z<<(4s-1);o R="";1c(o i=0;i<4s;i++){R+=(3Z&1I)?"1":"0";3Z=3Z>>>1}I R}p.c9=G(17,4G){o 4s=32;if(1a 17==="2t"&&17.N>1){o c=17.1W(5,-1).1H(",");o 5E=[4H(c[3]*Y,8),4H(c[0],8),4H(c[1],8),4H(c[2],8)];o s=5E[0]+5E[1]+5E[2]+5E[3];if(4G){s=s.bW(-4G)}P{s=s.1i(/^0+$/g,"0");s=s.1i(/^0{1,}1/g,"1")}I s}if(1a 17==="2t"){17=17.6G(0);if(4G){4s=32}P{4s=16}}o R=4H(17,4s);if(4G){R=R.bW(-4G)}I R};p.8l=G 8l(5D){o c0=18 2V("^[0|1]{8}$");o 6Q=0;if(8D(5D)){3E"fV"}P{if(O.N===1||5D.N===8){if(c0.2W(5D)){1c(o i=0;i<8;i++){6Q+=(U.2w(2,i)*1G(5D.41(7-i),10))}I 6Q+""}P{3E"fW: fX 1I fY fZ 8l g0 dg an 8 g3 c9 1X"}}P{3E"g4"}}I 6Q};p.1Z=G(17,1N,1o){o R,1M,2s,4h;if(1a 17==="2b"&&17.3e===1z){R=18 1z(0);1M=17.N;1c(o i=0;i<1M;i++){R[i]=p.1Z(17[i],1N,1o)}}P if(O.N===3){o 6S=17<0?1h:1g;if(1o===0){1o=1}if(1o<0){4h=U.1R(17)}P{4h=U.1R(17*U.2w(10,1o))/U.2w(10,1o)}o 1L=U.3t(4h).4l().1H(".");2s=1N-1L[0].N;1c(;2s>0;2s--){1L[0]="0"+1L[0]}if(1L.N===2||1o>0){1L[1]=1L.N===2?1L[1]:"";2s=1o-1L[1].N;1c(;2s>0;2s--){1L[1]+="0"}R=1L.3X(".")}P{R=1L[0]}R=(6S?"-":" ")+R}P if(O.N===2){R=p.1Z(17,1N,-1)}I R};p.8n=G(17,1N,1o){o R,1M,2s,4h;if(1a 17==="2b"&&17.3e===1z){R=18 1z(0);1M=17.N;1c(o i=0;i<1M;i++){R[i]=p.8n(17[i],1N,1o)}}P if(O.N===3){o 6S=17<0?1h:1g;if(1o===0){1o=1}if(1o<0){4h=U.1R(17)}P{4h=U.1R(17*U.2w(10,1o))/U.2w(10,1o)}o 1L=U.3t(4h).4l().1H(".");2s=1N-1L[0].N;1c(;2s>0;2s--){1L[0]="0"+1L[0]}if(1L.N===2||1o>0){1L[1]=1L.N===2?1L[1]:"";2s=1o-1L[1].N;1c(;2s>0;2s--){1L[1]+="0"}R=1L.3X(".")}P{R=1L[0]}R=(6S?"-":"+")+R}P if(O.N===2){R=p.8n(17,1N,-1)}I R};p.8r=G(17,1o){o R;o 8o=1o>=0?1o:0;if(1a 17==="2b"){R=18 1z(0);1c(o i=0;i<17.N;i++){R[i]=p.8r(17[i],8o)}}P if(O.N===2){o cd=p.1Z(17,0,8o);o 2g=18 1z(0);2g=cd.1H(\'.\');o 5T=2g[0];o ce=2g.N>1?\'.\'+2g[1]:\'\';o 8p=/(\\d+)(\\d{3})/;2T(8p.2W(5T)){5T=5T.1i(8p,\'$1\'+\',\'+\'$2\')}R=5T+ce}P if(O.N===1){R=p.8r(17,0)}I R};o 6T=G 6T(d,3M){3M=1a(3M)==="1J"||3M===37?3M=8:3M;if(d<0){d=g5+d+1}o 2o=g6(d).4l(16).ec();2T(2o.N<3M){2o="0"+2o}if(2o.N>=3M){2o=2o.5y(2o.N-3M,2o.N)}I 2o};p.2o=G 2o(1I,1M){o 6s="";o cf=/^4t?\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3})(,\\d?\\.?\\d*)?\\)$/i;if(O.N===1){6s=2o(1I,8)}P{if(cf.2W(1I)){6s=6T(p.1B(1I),1M)}P{6s=6T(1I,1M)}}I 6s};p.g7=G(R){o 1I=0,5e=1,17=0;o 1M=R.N-1;1c(o i=1M;i>=0;i--){31{3P(R[i]){W"0":17=0;1k;W"1":17=1;1k;W"2":17=2;1k;W"3":17=3;1k;W"4":17=4;1k;W"5":17=5;1k;W"6":17=6;1k;W"7":17=7;1k;W"8":17=8;1k;W"9":17=9;1k;W"A":W"a":17=10;1k;W"B":W"b":17=11;1k;W"C":W"c":17=12;1k;W"D":W"d":17=13;1k;W"E":W"e":17=14;1k;W"F":W"f":17=15;1k;am:I 0}1I+=17*5e;5e*=16}35(e){1Q.3A(e)}if(1I>cj){1I-=9O}}I 1I};p.ck=G ck(2h){I 9P(2h).1H("\\n")};p.76=G(){o R,17,6q,3i,1N,1o,3g,2W,i;if(O.N===2&&1a O[0]===\'1X\'&&1a O[1]===\'1X\'&&(O[0]+"").2S(\'.\')===-1){17=O[0];6q=O[1];3g=17<0;if(3g){17=U.3t(17)}R=""+17;1c(i=6q-R.N;i>0;i--){R="0"+R}if(3g){R="-"+R}}P if(O.N===2&&1a O[0]===\'2b\'&&O[0].3e===1z&&1a O[1]===\'1X\'){3i=O[0];6q=O[1];R=18 1z(3i.N);1c(i=0;i<3i.N&&R!==1J;i++){2W=u.76(3i[i],6q);if(2W===1J){R=1J}P{R[i]=2W}}}P if(O.N===3&&1a O[0]===\'1X\'&&1a O[1]===\'1X\'&&1a O[2]===\'1X\'&&(O[0]+"").2S(\'.\')>=0){17=O[0];1N=O[1];1o=O[2];3g=17<0;if(3g){17=U.3t(17)}if(1o<0&&U.2E(17)%2===1){if((17)-U.2E(17)>=0.5){17=17+1}}R=""+17;1c(i=1N-R.2S(\'.\');i>0;i--){R="0"+R}o 8y=R.N-R.2S(\'.\')-1;if(8y<=1o){1c(i=1o-(R.N-R.2S(\'.\')-1);i>0;i--){R=R+"0"}}P if(1o>0){R=R.5y(0,R.N-(8y-1o))}P if(1o<0){R=R.5y(0,R.2S(\'.\'))}if(3g){R="-"+R}}P if(O.N===3&&1a O[0]===\'2b\'&&O[0].3e===1z&&1a O[1]===\'1X\'&&1a O[2]===\'1X\'){3i=O[0];1N=O[1];1o=O[2];R=18 1z(3i.N);1c(i=0;i<3i.N&&R!==1J;i++){2W=u.76(3i[i],1N,1o);if(2W===1J){R=1J}P{R[i]=2W}}}I R};p.cn=G cn(8z,co){o i=0,3Q=[],3T,3S=18 2V(co,"g");3T=3Q[i]=3S.5Y(8z);2T(3T){i++;3T=3Q[i]=3S.5Y(8z)}I 3Q.1W(0,i)};6f.34.g9=G(cq,1i){I u.1i(18 2V(cq,"g"),1i)};6f.34.ct=G ct(R){o 1r=1h;if(u.N===R.N){1c(o i=0;i<u.N;i++){if(u.41(i)!==R.41(i)){1r=1g;1k}}}P{1r=1g}I 1r};p.42=G(R,3S){I R.42(3S)};p.8B=G 8B(){};p.9x=G 9x(){};p.8C=G 8C(){if(O.cu.cv){o 8A=O.cu.cv.1m.4l();if(O.N>1){p.9E=8A!=="4B"?O:O[0]}P{p.9E=O[0]}if(8A==="4B"){p.9x(O)}P{p.8B()}}};p.R=G R(1n){I 1n+\'\'};p.4B=G 4B(){p.8C(O[0])};p.gb=G(4b){I 4b};p.cw=G(R){o 5X;if(1a R==="2b"&&R.3e===1z){5X=18 1z(0);1c(o i=0;i<R.N;i++){5X[i]=p.cw(R[i])}}P{5X=R.1i(/^\\s*/,\'\').1i(/\\s*$/,\'\').1i(/\\r*$/,\'\')}I 5X};p.cC=G cC(1n){I 1n*1n};p.3c=G 3c(1n){I U.3c(1n)};p.4R=G 4R(1s){o 1r;if((1s||1s===0)&&O.N===1){if(1a 1s===\'1X\'){o 3g=1s<0;if(3g){1s=U.3t(1s)}1r=U.2E(1s);if(3g){1r=-1r}}P if(1a 1s===\'61\'){if(1s===1h){1r=1}P{1r=0}}P if(1a 1s===\'2t\'){if(1s.2S(\' \')>-1){1r=0}P if(1s.N===1){1r=1s.6G(0)}P{1r=1G(1s,10);if(8D(1r)){1r=0}}}P if(1a 1s===\'2b\'&&1s.3e===1z){1r=18 1z(1s.N);1c(o i=0;i<1s.N;i++){if(1a 1s[i]===\'2t\'&&1s[i].2S(\'.\')>-1){1r[i]=0}P{1r[i]=p.4R(1s[i])}}}}I 1r};p.1P=G(){o 2L;if(O.N===1&&1a O[0]===\'2b\'&&O[0].3e===1z){2L=O[0]}P{2L=O}1c(o i=0;i<2L.N;i++){if(1a 2L[i]!==\'1X\'){I 1J}}I U.1P.2j(u,2L)};p.3z=G(){o 2L;if(O.N===1&&1a O[0]===\'2b\'&&O[0].3e===1z){2L=O[0]}P{2L=O}1c(o i=0;i<2L.N;i++){if(1a 2L[i]!==\'1X\'){I 1J}}I U.3z.2j(u,2L)};p.2E=G 2E(1n){I U.2E(1n)};p.9t=G(1n){I 1K(1n)};p.8G=G 8G(1n){I U.8G(1n)};p.1R=G 1R(1n){I U.1R(1n)};p.5g=G 5g(9m,cD,4o){I((cD-9m)*4o)+9m};p.3t=G 3t(1n){I U.3t(1n)};p.3V=G 3V(1n){I U.3V(1n)};p.4n=G 4n(1n){I U.4n(1n)};p.2w=G 2w(1n,dJ){I U.2w(1n,dJ)};p.4y=G 4y(1n){I U.4y(1n)};p.9h=G 9h(1n){I U.9h(1n)};p.6j=G 6j(1n,cH){I U.6j(1n,cH)};p.cI=G cI(3H){I(3H/91)*p.3w};p.4J=G 4J(1n){I U.4J(1n)};p.9g=G 9g(1n){I U.9g(1n)};p.8J=G 8J(1n){I U.8J(1n)};p.6P=G 6P(1n){I U.6P(1n)};p.61=G(1s){o 1r=1g;if(1s&&1a 1s===\'1X\'&&1s!==0){1r=1h}P if(1s&&1a 1s===\'61\'&&1s===1h){1r=1h}P if(1s&&1a 1s===\'2t\'&&1s.gf()===\'1h\'){1r=1h}P if(1s&&1a 1s===\'2b\'&&1s.3e===1z){1r=18 1z(1s.N);1c(o i=0;i<1s.N;i++){1r[i]=p.61(1s[i])}}I 1r};p.7l=G 7l(2O,2J,2q,2p){I U.3c(U.2w(2q-2O,2)+U.2w(2p-2J,2))};p.cL=G cL(1I,99,cN,9d,cM){I 9d+(cM-9d)*((1I-99)/(cN-99))};p.5k=G(a,b,c){if(O.N===2){I U.3c(a*a+b*b)}P if(O.N===3){I U.3c(a*a+b*b+c*c)}};p.gg=G(){o 6Y=1g,8N;u.gh=G(){if(6Y){6Y=1g;I 8N}P{o 2y,2v,s;do{2y=2*p.5b(1)-1;2v=2*p.5b(1)-1;s=2y*2y+2v*2v}2T(s>=1||s===0);o 5e=U.3c(-2*U.4J(s)/s);8N=2v*5e;6Y=1h;I 2y*5e}}};p.cQ=G(1n){I 1n||0};p.cR=G cR(1n,8P,5Q){o 62=5Q-8P;I((1/62)*1n)-((1/62)*8P)};p.5b=G 5b(55,6X){I O.N===2?55+(U.5b()*(6X-55)):U.5b()*55};o 2Z=G 2Z(x,y){o n=x+y*57;n=(n<<13)^n;I U.3t(1.0-(((n*((n*n*gi)+gj)+gk)&gl)/gm.0))};o 5a=G 5a(x,y){o d8=(2Z(x-1,y-1)+2Z(x+1,y-1)+2Z(x-1,y+1)+2Z(x+1,y+1))/16,cV=(2Z(x-1,y)+2Z(x+1,y)+2Z(x,y-1)+2Z(x,y+1))/8,cW=2Z(x,y)/4;I d8+cV+cW};o 63=G 63(a,b,x){o ft=x*p.3w;o f=(1-U.3V(ft))*0.5;I a*(1-f)+b*f};o 8W=G 8W(x,y){o 5d=U.2E(x);o 8T=x-5d;o 59=U.2E(y);o d2=y-59;o 2y=5a(5d,59),2v=5a(5d+1,59),cZ=5a(5d,59+1),d0=5a(5d+1,59+1);o i1=63(2y,2v,8T),i2=63(cZ,d0,8T);I 63(i1,i2,d2)};o 78=G 78(x,y){o 8Y=0,p=0.25,n=3;1c(o i=0;i<=n;i++){o 8X=U.2w(2,i);o d6=U.2w(p,i);8Y+=8W(x*8X,y*8X)*d6}I 8Y};o 8Z=G 8Z(){I 0};p.gr=G(x,y,z){3P(O.N){W 2:I 78(x,y);W 3:I 8Z(x,y,z);W 1:I 78(x,x)}};p.d9=G d9(1n,55,6X){I U.1P(U.3z(1n,55),6X)};p.db=G db(3H){3H=(3H*91)/p.3w;if(3H<0){3H=92+3H}I 3H};p.28=G 28(dM,dN,93){if(93&&93==="6b"){31{if(!J){J=1D.3s("gw-gx")}}35(df){1Q.3A(df)}if(!J){3E"6b 3D 3U is dg gA dm u gB."}P{J.gC(0,0,1D.1f,1D.1l);J.58(5f/Y,5f/Y,5f/Y,1.0);J.aJ(J.gD);o 51=J.dp(J.gE);J.dq(51,dl);J.ds(51);if(!J.dt(51,J.du)){3E J.dv(51)}o 4T=J.dp(J.gG);J.dq(4T,dr);J.ds(4T);if(!J.dt(4T,J.du)){3E J.dv(4T)}2x=J.gI();J.dA(2x,51);J.dA(2x,4T);J.gJ(2x);if(!J.gK(2x,J.gL)){3E"gM gN gO."}P{J.gP(2x)}7y=J.dH();J.8u(J.5U,7y);J.dI(J.5U,9l(7Z),J.dK);7x=J.dH();J.8u(J.5U,7x);J.dI(J.5U,9l(9L),J.dK);p.6n();p.7M();7h=18 4u()}p.2I(0);p.3d(Y)}P{if(1a J==="1J"){J=1D.3s("2d")}}o 7i={2N:J.2N,7o:J.7o,5L:J.5L,81:J.81};1D.1f=p.1f=dM;1D.1l=p.1l=dN;1c(o i in 7i){if(7i){J[i]=7i[i]}}if(8U){p.8Q()}};o 22=G(x,y,z){u.x=x||0;u.y=y||0;u.z=z||0},e0=G(2G){I G(2y,2v){o v=2y.2R();v[2G](2v);I v}},dY=G(2G){I G(2y,2v){I 2y[2G](2v)}},7q="7l 9s 7K".1H(" "),2G=7q.N;22.gR=G(2y,2v){I U.6P(2y.9s(2v)/(2y.5k()*2v.5k()))};22.34={29:G(v,y,z){if(O.N===1){u.29(v.x||v[0],v.y||v[1],v.z||v[2])}P{u.x=v;u.y=y;u.z=z}},2R:G(){I 18 22(u.x,u.y,u.z)},5k:G(){I U.3c(u.x*u.x+u.y*u.y+u.z*u.z)},7k:G(v,y,z){if(O.N===3){u.x+=v;u.y+=y;u.z+=z}P if(O.N===1){u.x+=v.x;u.y+=v.y;u.z+=v.z}},gS:G(v,y,z){if(O.N===3){u.x-=v;u.y-=y;u.z-=z}P if(O.N===1){u.x-=v.x;u.y-=v.y;u.z-=v.z}},5R:G(v){if(1a v===\'1X\'){u.x*=v;u.y*=v;u.z*=v}P if(1a v===\'2b\'){u.x*=v.x;u.y*=v.y;u.z*=v.z}},dW:G(v){if(1a v===\'1X\'){u.x/=v;u.y/=v;u.z/=v}P if(1a v===\'2b\'){u.x/=v.x;u.y/=v.y;u.z/=v.z}},7l:G(v){o dx=u.x-v.x,dy=u.y-v.y,dz=u.z-v.z;I U.3c(dx*dx+dy*dy+dz*dz)},9s:G(v,y,z){o 17;if(O.N===3){17=u.x*v+u.y*y+u.z*z}P if(O.N===1){17=u.x*v.x+u.y*v.y+u.z*v.z}I 17},7K:G(v){o dT=u.y*v.z-v.y*u.z,dU=u.z*v.x-v.z*u.x,dV=u.x*v.y-v.x*u.y;I 18 22(dT,dU,dV)},6z:G(){o m=u.5k();if(m>0){u.dW(m)}},gT:G(5Q){if(u.5k()>5Q){u.6z();u.5R(5Q)}},gV:G(){o 2X=U.6j(-u.y,u.x);I-2X},4l:G(){I"["+u.x+", "+u.y+", "+u.z+"]"},1j:G(){I[u.x,u.y,u.z]}};2T(2G--){22[7q[2G]]=dY(7q[2G])}1c(2G in 22.34){if(22.34.dZ(2G)&&!22.dZ(2G)){22[2G]=e0(2G)}}p.22=22;o 2m=G(){u.9z()};2m.34={29:G(){if(O.N===16){o a=O;u.29([a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]])}P if(O.N===1&&O[0]30 2m){u.K=O[0].1j()}P if(O.N===1&&O[0]30 1z){u.K=O[0].1W()}},2R:G(){o 9y=18 2m();9y.29(u.K);I 9y},9z:G(){u.29([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])},1j:G 1j(){I u.K.1W()},2Y:G(4e,4p,4f){if(1a 4f===\'1J\'){4e=0}u.K[3]+=4e*u.K[0]+4p*u.K[1]+4f*u.K[2];u.K[7]+=4e*u.K[4]+4p*u.K[5]+4f*u.K[6];u.K[11]+=4e*u.K[8]+4p*u.K[9]+4f*u.K[10];u.K[15]+=4e*u.K[12]+4p*u.K[13]+4f*u.K[14]},68:G(){o 2i=u.K.1W();u.K[0]=2i[0];u.K[1]=2i[4];u.K[2]=2i[8];u.K[3]=2i[12];u.K[4]=2i[1];u.K[5]=2i[5];u.K[6]=2i[9];u.K[7]=2i[13];u.K[8]=2i[2];u.K[9]=2i[6];u.K[10]=2i[10];u.K[11]=2i[14];u.K[12]=2i[3];u.K[13]=2i[7];u.K[14]=2i[11];u.K[15]=2i[15]},5R:G(20,1O){o x,y,z,w;if(20 30 22){x=20.x;y=20.y;z=20.z;w=1;if(!1O){1O=18 22()}}P if(20 30 1z){x=20[0];y=20[1];z=20[2];w=20[3]||1;if(!1O||1O.N!==3&&1O.N!==4){1O=[0,0,0]}}if(1O 30 1z){if(1O.N===3){1O[0]=u.K[0]*x+u.K[1]*y+u.K[2]*z+u.K[3];1O[1]=u.K[4]*x+u.K[5]*y+u.K[6]*z+u.K[7];1O[2]=u.K[8]*x+u.K[9]*y+u.K[10]*z+u.K[11]}P if(1O.N===4){1O[0]=u.K[0]*x+u.K[1]*y+u.K[2]*z+u.K[3]*w;1O[1]=u.K[4]*x+u.K[5]*y+u.K[6]*z+u.K[7]*w;1O[2]=u.K[8]*x+u.K[9]*y+u.K[10]*z+u.K[11]*w;1O[3]=u.K[12]*x+u.K[13]*y+u.K[14]*z+u.K[15]*w}}if(1O 30 22){1O.x=u.K[0]*x+u.K[1]*y+u.K[2]*z+u.K[3];1O.y=u.K[4]*x+u.K[5]*y+u.K[6]*z+u.K[7];1O.z=u.K[8]*x+u.K[9]*y+u.K[10]*z+u.K[11]}I 1O},9A:G(){if(O.N===1&&O[0]30 2m){u.9A(O[0].1j())}P if(O.N===16){o a=O;u.9A([a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]])}P if(O.N===1&&O[0]30 1z){o 20=O[0];o 5n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];o e=0;1c(o 2z=0;2z<4;2z++){1c(o 1U=0;1U<4;1U++,e++){5n[e]+=u.K[1U+0]*20[2z*4+0]+u.K[1U+4]*20[2z*4+1]+u.K[1U+8]*20[2z*4+2]+u.K[1U+12]*20[2z*4+3]}}u.K=5n.1W()}},2j:G(){if(O.N===1&&O[0]30 2m){u.2j(O[0].1j())}P if(O.N===16){o a=O;u.2j([a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]])}P if(O.N===1&&O[0]30 1z){o 20=O[0];o 5n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];o e=0;1c(o 2z=0;2z<4;2z++){1c(o 1U=0;1U<4;1U++,e++){5n[e]+=u.K[2z*4+0]*20[1U+0]+u.K[2z*4+1]*20[1U+4]+u.K[2z*4+2]*20[1U+8]+u.K[2z*4+3]*20[1U+12]}}u.K=5n.1W()}},9B:G(2X){o c=p.3V(2X);o s=p.4n(2X);u.2j([1,0,0,0,0,c,-s,0,0,s,c,0,0,0,0,1])},9C:G(2X){o c=p.3V(2X);o s=p.4n(2X);u.2j([c,0,s,0,0,1,0,0,-s,0,c,0,0,0,0,1])},7u:G(2X){o c=U.3V(2X);o s=U.4n(2X);u.2j([c,-s,0,0,s,c,0,0,0,0,1,0,0,0,0,1])},4q:G(3y,3I,3v){if(3y&&!3I&&!3v){3I=3v=3y}P if(3y&&3I&&!3v){3v=1}if(3y&&3I&&3v){u.K[0]*=3y;u.K[1]*=3I;u.K[2]*=3v;u.K[4]*=3y;u.K[5]*=3I;u.K[6]*=3v;u.K[8]*=3y;u.K[9]*=3I;u.K[10]*=3v;u.K[12]*=3y;u.K[13]*=3I;u.K[14]*=3v}},gX:G(){o 1y=[];o 5u=u.K[0]*u.K[5]-u.K[1]*u.K[4];o 5c=u.K[0]*u.K[6]-u.K[2]*u.K[4];o 53=u.K[0]*u.K[7]-u.K[3]*u.K[4];o 5t=u.K[1]*u.K[6]-u.K[2]*u.K[5];o 4W=u.K[1]*u.K[7]-u.K[3]*u.K[5];o 4K=u.K[2]*u.K[7]-u.K[3]*u.K[6];o 5s=u.K[8]*u.K[13]-u.K[9]*u.K[12];o 5r=u.K[8]*u.K[14]-u.K[10]*u.K[12];o 54=u.K[8]*u.K[15]-u.K[11]*u.K[12];o 4N=u.K[9]*u.K[14]-u.K[10]*u.K[13];o 5q=u.K[9]*u.K[15]-u.K[11]*u.K[13];o 56=u.K[10]*u.K[15]-u.K[11]*u.K[14];o 9I=5u*56-5c*5q+53*4N+5t*54-4W*5r+4K*5s;if(U.3t(9I)<=1e-9){I 1g}1y[0]=+u.K[5]*56-u.K[6]*5q+u.K[7]*4N;1y[4]=-u.K[4]*56+u.K[6]*54-u.K[7]*5r;1y[8]=+u.K[4]*5q-u.K[5]*54+u.K[7]*5s;1y[12]=-u.K[4]*4N+u.K[5]*5r-u.K[6]*5s;1y[1]=-u.K[1]*56+u.K[2]*5q-u.K[3]*4N;1y[5]=+u.K[0]*56-u.K[2]*54+u.K[3]*5r;1y[9]=-u.K[0]*5q+u.K[1]*54-u.K[3]*5s;1y[13]=+u.K[0]*4N-u.K[1]*5r+u.K[2]*5s;1y[2]=+u.K[13]*4K-u.K[14]*4W+u.K[15]*5t;1y[6]=-u.K[12]*4K+u.K[14]*53-u.K[15]*5c;1y[10]=+u.K[12]*4W-u.K[13]*53+u.K[15]*5u;1y[14]=-u.K[12]*5t+u.K[13]*5c-u.K[14]*5u;1y[3]=-u.K[9]*4K+u.K[10]*4W-u.K[11]*5t;1y[7]=+u.K[8]*4K-u.K[10]*53+u.K[11]*5c;1y[11]=-u.K[8]*4W+u.K[9]*53-u.K[11]*5u;1y[15]=+u.K[8]*5t-u.K[9]*5c+u.K[10]*5u;o 2e=1.0/9I;1y[0]*=2e;1y[1]*=2e;1y[2]*=2e;1y[3]*=2e;1y[4]*=2e;1y[5]*=2e;1y[6]*=2e;1y[7]*=2e;1y[8]*=2e;1y[9]*=2e;1y[10]*=2e;1y[11]*=2e;1y[12]*=2e;1y[13]*=2e;1y[14]*=2e;1y[15]*=2e;u.K=1y.1W();I 1h},4l:G(){o R="";1c(o i=0;i<15;i++){R+=u.K[i]+", "}R+=u.K[15];I R},4B:G(){o 5i="",2c=3;5i+=p.1Z(u.K[0],2c,4)+" "+p.1Z(u.K[1],2c,4)+" "+p.1Z(u.K[2],2c,4)+" "+p.1Z(u.K[3],2c,4)+"\\n";5i+=p.1Z(u.K[4],2c,4)+" "+p.1Z(u.K[5],2c,4)+" "+p.1Z(u.K[6],2c,4)+" "+p.1Z(u.K[7],2c,4)+"\\n";5i+=p.1Z(u.K[8],2c,4)+" "+p.1Z(u.K[9],2c,4)+" "+p.1Z(u.K[10],2c,4)+" "+p.1Z(u.K[11],2c,4)+"\\n";5i+=p.1Z(u.K[12],2c,4)+" "+p.1Z(u.K[13],2c,4)+" "+p.1Z(u.K[14],2c,4)+" "+p.1Z(u.K[15],2c,4)+"\\n";if(1a 9K===\'2b\'&&1a 9K.4J===\'G\'){9K.4J(5i)}}};G 4u(){u.48=[]};4u.34.6D=G 6D(){o 4r=18 2m();if(O.N===1){4r.29(O[0])}P{4r.29(O)}u.48.2l(4r)};4u.34.2l=G 2l(){u.48.2l(u.9M())};4u.34.4I=G 4I(){I u.48.4I()};4u.34.9M=G 9M(){o 4r=18 2m();4r.29(u.48[u.48.N-1]);I 4r};4u.34.5R=G 5R(3N){u.48[u.48.N-1].2j(3N)};G 9J(3O,44,2n){o 1T=J.9Y(3O,44);if(1T!==-1){if(2n.N===4){J.hp(1T,2n)}P if(2n.N===3){J.hq(1T,2n)}P if(2n.N===2){J.hr(1T,2n)}P{J.hs(1T,2n)}}}G hv(3O,44,2n){o 1T=J.9Y(3O,44);if(1T!==-1){if(2n.N===4){J.hw(1T,2n)}P if(2n.N===3){J.hy(1T,2n)}P if(2n.N===2){J.hz(1T,2n)}P{J.hB(1T,2n)}}}G 6F(3O,44,28,er){o 1T=J.hD(3O,44);if(1T!==-1){J.8u(J.5U,er);J.6F(1T,28,J.hH,1g,0,0);J.hI(1T)}}G 7D(3O,44,68,3N){o 1T=J.9Y(3O,44);if(1T!==-1){if(3N.N===16){J.hN(1T,68,3N)}P if(3N.N===9){J.hO(1T,68,3N)}P{J.hQ(1T,68,3N)}}}p.6n=G 6n(7R,7O,7N,ei,ax,aG,et,au,ew){if(O.N===0){6I=1D.1f/2;4i=1D.1l/2;46=4i/U.4y(6A/2);p.6n(6I,4i,46,6I,4i,0,0,1,0)}P{o z=18 p.22(7R-ei,7O-ax,7N-aG);o y=18 p.22(et,au,ew);o ic,ie,ij;z.6z();o x=p.22.7K(y,z);y=p.22.7K(z,x);x.6z();y.6z();5A=18 2m();5A.29(x.x,x.y,x.z,0,y.x,y.y,y.z,0,z.x,z.y,z.z,0,0,0,0,1);5A.2Y(-7R,-7O,-7N);6B=18 2m();6B.29(x.x,x.y,x.z,0,y.x,y.y,y.z,0,z.x,z.y,z.z,0,0,0,0,1);6B.2Y(7R,7O,7N);4C=18 2m();4C.29(5A);49=4C;a7=18 2m();a7.29(6B)}};p.7M=G 7M(eH,aj,2A,3b){if(O.N===0){4i=1D.1l/2;46=4i/U.4y(6A/2);ad=46/10;a4=46*10;a5=1D.1f/1D.1l;p.7M(6A,a5,ad,a4)}P{o a=O;o 6w,7H,al,ak;6w=2A*U.4y(eH/2);7H=-6w;al=6w*aj;ak=7H*aj;p.a3(ak,al,7H,6w,2A,3b)}};p.a3=G a3(1N,1o,4c,4g,2A,3b){9U=1h;3l=18 2m();3l.29((2*2A)/(1o-1N),0,(1o+1N)/(1o-1N),0,0,(2*2A)/(4g-4c),(4g+4c)/(4g-4c),0,0,0,-(3b+2A)/(3b-2A),-(2*3b*2A)/(3b-2A),0,0,-1,0)};p.7V=G 7V(1N,1o,4c,4g,2A,3b){if(O.N===0){p.7V(0,p.1f,0,p.1l,-10,10)}P{o x=2/(1o-1N);o y=2/(4g-4c);o z=-2/(3b-2A);o 4e=-(1o+1N)/(1o-1N);o 4p=-(4g+4c)/(4g-4c);o 4f=-(3b+2A)/(3b-2A);3l=18 2m();3l.29(x,0,0,4e,0,y,0,4p,0,0,z,4f,0,0,0,1);9U=1g}};p.eZ=G(){3l.4B()};p.f2=G(){5A.4B()};p.f7=G(w,h,d){if(J){if(!h||!d){h=d=w}o 50=18 2m();50.4q(w,h,d);o 4D=18 2m();4D.4q(1,-1,1);4D.2j(4C.1j());7D(2x,"50",1h,50.1j());7D(2x,"4D",1h,4D.1j());7D(2x,"3l",1h,3l.1j());9J(2x,"1q",[0,0,0,1]);6F(2x,"6H",3,7x);J.aW(1);J.aP(J.89,0,9L.N/3);J.aJ(J.aS);J.fe(1,1);9J(2x,"1q",[1,1,1,1]);6F(2x,"6H",3,7y);J.aP(J.8m,0,7Z.N/3);J.fi(J.aS)}};p.3d=G 3d(){2r=1h;J.2N=p.1q.2j(u,O)};p.aT=G aT(){2r=1g};p.2I=G 2I(){2D=1h;J.7o=p.1q.2j(u,O)};p.dG=G dG(){2D=1g};p.aV=G aV(w){J.aW=w};p.aY=G aY(1I){J.5L=1I};p.aZ=G aZ(1I){J.81=1I};p.fo=G(){};p.fp=G(){};p.95=G 95(x,y){u.x=x;u.y=y;u.fq=G(){I 18 95(x,y)}};p.97=G 97(x,y){o 4Q=J.2N;J.2N=J.7o;J.8S(U.1R(x),U.1R(y),1,1);J.2N=4Q};p.5B=G 5B(3a){2P=3a;1Y=0;1S=[]};p.3K=G 3K(be){if(1Y!==0){if(be&&2r){J.33(4m,4A)}if(2r){J.3d()}if(2D){J.2I()}J.45();1Y=0;3x=1g}if(3x){if(2r){J.3d()}if(2D){J.2I()}J.45();1Y=0;3x=1g}};p.2U=G 2U(x,y,2q,2p,3n,3r){if(1Y===0&&2P!==p.8R){3x=1h;J.3k();J.3u(x,y);4m=x;4A=y}P{if(2P===p.8R){p.97(x,y)}P if(O.N===2){if(2P!==p.7e||1Y!==2){J.33(x,y)}if(2P===p.bj){if(1Y===2){p.3K(p.5J);3x=1h;J.3k();J.3u(4a,4j);J.33(x,y);1Y=1}4m=4a;4A=4j}if(2P===p.bl&&1Y===2){p.3K(p.5J);3x=1h;J.3k();J.3u(4m,4A);J.33(x,y);1Y=1}if(2P===p.7e&&1Y===3){J.33(4a,4j);p.3K(p.5J);3x=1h;J.3k();J.3u(4a,4j);J.33(x,y);1Y=1}if(2P===p.7e){4m=86;4A=87;86=4a;87=4j}}P if(O.N===4){if(1Y>1){J.3u(4a,4j);J.8L(4m,4A,x,y);1Y=1}}P if(O.N===6){J.4V(x,y,2q,2p,3n,3r)}}4a=x;4j=y;1Y++;if(2P===p.89&&1Y===2||(2P===p.8m)&&1Y===3||(2P===p.bS)&&1Y===4){p.3K(p.5J)}};p.5O=G(x,y,2q,2p){if(1S.N<3){1S.2l([x,y])}P{o b=[],s=1-8e;1S.2l([x,y]);b[0]=[1S[1][0],1S[1][1]];b[1]=[1S[1][0]+(s*1S[2][0]-s*1S[0][0])/6,1S[1][1]+(s*1S[2][1]-s*1S[0][1])/6];b[2]=[1S[2][0]+(s*1S[1][0]-s*1S[3][0])/6,1S[2][1]+(s*1S[1][1]-s*1S[3][1])/6];b[3]=[1S[2][0],1S[2][1]];if(!3x){p.2U(b[0][0],b[0][1])}P{1Y=1}p.2U(b[1][0],b[1][1],b[2][0],b[2][1],b[3][0],b[3][1]);1S.bx()}};p.by=G by(2O,2J,2q,2p,3n,3r,5z,4Y){p.5B();p.5O(2O,2J);p.5O(2q,2p);p.5O(3n,3r);p.5O(5z,4Y);p.3K()};p.fK=G(bB){8e=bB};p.fN=p.2U;p.bE=G bE(bG){3C=bG};p.fO=G(){};p.bI=G bI(bK){6C=bK};p.7w=G 7w(x,y,1f,1l,66,aE){if(1f<=0){I}if(6C===p.8i){x+=1f/2;y+=1l/2}J.3u(x,y);J.3k();J.7w(x,y,6C===p.bp?1f:1f/2,66,aE,1g);if(2D){J.2I()}J.33(x,y);if(2r){J.3d()}J.45()};p.bQ=G bQ(2O,2J,2q,2p){J.3k();J.3u(2O||0,2J||0);J.33(2q||0,2p||0);J.2I();J.45()};p.aF=G aF(2O,2J,2q,2p,3n,3r,5z,4Y){J.3k();J.3u(2O,2J);J.4V(2q,2p,3n,3r,5z,4Y);J.2I();J.45()};p.bU=G bU(a,b,c,d,t){I(1-t)*(1-t)*(1-t)*a+3*(1-t)*(1-t)*t*b+3*(1-t)*t*t*c+t*t*t*d};p.bV=G bV(a,b,c,d,t){I(3*t*t*(-a+3*b-3*c+d)+6*t*(a-2*b+c)+3*(-a+b))};p.bX=G bX(a,b,c,d,t){I 0.5*((2*b)+(-a+c)*t+(2*a-5*b+4*c-d)*t*t+(-a+3*b-3*c+d)*t*t*t)};p.bZ=G bZ(a,b,c,d,t){I 0.5*((-a+c)+2*(2*a-5*b+4*c-d)*t+3*(-a+3*b-3*c+d)*t*t)};p.c5=G c5(2O,2J,2q,2p,3n,3r){p.5B();p.2U(2O,2J);p.2U(2q,2p);p.2U(3n,3r);p.3K()};p.c7=G c7(2O,2J,2q,2p,3n,3r,5z,4Y){J.5L="c8";p.5B();p.2U(2O,2J);p.2U(2q,2p);p.2U(3n,3r);p.2U(5z,4Y);p.3K()};p.9W=G 9W(x,y,1f,1l){if(!1f&&!1l){I}J.3k();o 5w=0;o 9S=0;if(3C===p.ch){1f-=x;1l-=y}if(3C===p.6W){1f*=2;1l*=2}if(3C===p.5P||3C===p.6W){x-=1f/2;y-=1l/2}J.9W(U.1R(x)-5w,U.1R(y)-5w,U.1R(1f)+9S,U.1R(1l)+9S);if(2r){J.3d()}if(2D){J.2I()}J.45()};p.cl=G cl(x,y,1f,1l){x=x||0;y=y||0;if(1f<=0&&1l<=0){I}J.3k();if(6C===p.6W){1f*=2;1l*=2}o 5w=0;if(1f===1l){J.7w(x-5w,y-5w,1f/2,0,p.cp,1g)}P{o w=1f/2,h=1l/2,C=0.ga;o 6k=C*w,5W=C*h;J.3u(x+w,y);J.4V(x+w,y-5W,x+6k,y-h,x,y-h);J.4V(x-6k,y-h,x-w,y-5W,x-w,y);J.4V(x-w,y+5W,x-6k,y+h,x,y+h);J.4V(x+6k,y+h,x+w,y+5W,x+w,y)}if(2r){J.3d()}if(2D){J.2I()}J.45()};p.4k=G 4k(9c){};o 6Z=G(2a){o 1t=2a.1d,1d=p.94(2a.1f,2a.1l),1M=1t.N;if((5Z.8F&&5Z.cz&&!5Z.cz(1d,"1t").2R)||(1d.8H&&1d.cA&&!1d.cA("1t"))){o 52,9j=G(){if(52){I 52}52=[];1c(o i=0;i<1M;i+=4){52.2l(p.1q(1t[i],1t[i+1],1t[i+2],1t[i+3]))}I 52};if(5Z.8F){5Z.8F(1d,"1t",{2R:9j})}P if(1d.8H){1d.8H("1t",9j)}}P{1d.1t=[];1c(o i=0;i<1M;i+=4){1d.1t.2l(p.1q(1t[i],1t[i+1],1t[i+2],1t[i+3]))}}I 1d};p.cE=G cE(9c,3a,8K){o X=26.6h(\'X\');X.cJ=1g;X.3Z=G(){};X.ge=G(){o h=u.1l,w=u.1f;o 1v=26.6h("1v");1v.1f=w;1v.1l=h;o 3U=1v.3s("2d");3U.6i(u,0,0);u.1d=6Z(3U.7c(0,0,w,h));u.1d.X=X;u.2R=u.1d.2R;u.1t=u.1d.1t;u.cJ=1h;if(8K){8K()}};X.cK=9c;I X};p.2R=G 2R(x,y){if(!O.N){o c=p.9f(p.1f,p.1l);c.47(J,0,0);I c}if(!6U){6U=6Z(J.7c(0,0,p.1f,p.1l))}I 6U.2R(x,y)};p.9f=G 9f(w,h){o 1v=26.6h("1v");o 1r=1Q.8M(1v);1r.28(w,h);1r.1v=1v;I 1r};p.29=G 29(x,y,2a){if(2a&&2a.X){p.47(2a,x,y)}P{o 4Q=J.2N,1q=2a;J.2N=1q;J.8S(U.1R(x),U.1R(y),1,1);J.2N=4Q}};p.di=G(){p.1t=6Z(J.7c(0,0,p.1f,p.1l)).1t};p.dk=G(){o cS=/(\\d+),(\\d+),(\\d+),(\\d+)/,1t={};1t.1f=p.1f;1t.1l=p.1l;1t.1d=[];if(J.4X){1t=J.4X(p.1f,p.1l)}o 1d=1t.1d,1E=0;1c(o i=0,l=p.1t.N;i<l;i++){o c=(p.1t[i]||"4t(0,0,0,1)").42(cS);1d[1E+0]=1G(c[1],10);1d[1E+1]=1G(c[2],10);1d[1E+2]=1G(c[3],10);1d[1E+3]=1K(c[4])*Y;1E+=4}J.9n(1t,0,0)};p.8Q=G 8Q(X){o c,a;if(p.3B){o 1U=O;if(O.N===1){if(1a O[0]==="2t"){c=O[0].1W(5,-1).1H(",");J.58(c[0]/ Y, c[1] /Y,c[2]/Y,c[3])}P if(1a O[0]==="1X"){J.58(1U[0]/ Y, 1U[0] /Y,1U[0]/Y,1.0)}}P if(O.N===2){if(1a O[0]==="2t"){c=O[0].1W(5,-1).1H(",");J.58(c[0]/ Y, c[1] /Y,c[2]/Y,1.0)}P if(1a O[0]==="1X"){c=O[0]/Y;a=1.0;J.58(c,c,c,a)}}P if(O.N===3||O.N===4){J.58(1U[0]/ Y, 1U[1] /Y,1U[2]/Y,1.0)}}P{if(O.N){if(X.1d&&X.1d.X){64=X.1d}P{64=p.1q.2j(u,O)}}if(64.X){p.47(X,0,0)}P{o 4Q=J.2N;J.2N=64+"";J.8S(0,0,p.1f,p.1l);J.2N=4Q}}8U=1h};o 7j=G 7j(X){if(1a X==="2t"){I 26.9b(X)}if(X.X||X.1v){I X.X||X.1v}1c(o i=0,l=X.1t.N;i<l;i++){o 1E=i*4;o c=(X.1t[i]||"4t(0,0,0,1)").1W(5,-1).1H(",");X.1d[1E+0]=1G(c[0],10);X.1d[1E+1]=1G(c[1],10);X.1d[1E+2]=1G(c[2],10);X.1d[1E+3]=1K(c[3])*4U}o 1v=26.6h("1v");1v.1f=X.1f;1v.1l=X.1l;o 3U=1v.3s("2d");3U.9n(X,0,0);X.1v=1v;I 1v};p.go=G(d5,79){u.5V=[];u.1E=0;1c(o i=0;i<79;i++){u.5V.2l(d5+p.76(i,(""+79).N)+".d7")}u.gs=G(x,y){p.9o(u.5V[u.1E],x,y);if(++u.1E>=79){u.1E=0}};u.gt=G(){I 7j(u.5V[0]).1f};u.gu=G(){I 7j(u.5V[0]).1l}};p.94=G 94(w,h,40){o 1d={};1d.1f=w;1d.1l=h;1d.1d=[];if(J.4X){1d=J.4X(w,h)}1d.1t=18 1z(w*h);1d.2R=G(x,y){I u.1t[w*y+x]};1d.5l=37;1d.3Z=G(X){u.5l=X};1d.di=G(){};1d.dk=G(){};I 1d};G 9q(X){if(1a X==="2t"){I 26.9b(X)}if(X.X){I X.X}P if(X.3s||X.1v){if(X.3s(\'2d\').4X){X.1t=X.3s(\'2d\').4X(X.1f,X.1l)}P{X.1t=X.3s(\'2d\').7c(0,0,X.1f,X.1l)}}1c(o i=0,l=X.1t.N;i<l;i++){o 1E=i*4;o c=(X.1t[i]||"4t(0,0,0,1)").1W(5,-1).1H(",");X.1d[1E+0]=1G(c[0],10);X.1d[1E+1]=1G(c[1],10);X.1d[1E+2]=1G(c[2],10);X.1d[1E+3]=1K(c[3])*4U}o 1v=26.6h("1v");1v.1f=X.1f;1v.1l=X.1l;o 3U=1v.3s("2d");3U.9n(X.1t,0,0);X.1v=1v;I X}p.9o=G 9o(X,x,y,w,h){x=x||0;y=y||0;o 2a=9q(X),4L;if(2Q>=0){4L=J.4M;J.4M=2Q/2C}if(O.N===3){J.6i(2a,x,y)}P{J.6i(2a,x,y,w,h)}if(2Q>=0){J.4M=4L}if(X.5l){o 7r=J.5m;J.5m="dX";p.47(X.5l,x,y);J.5m=7r}};p.47=G 47(X,x,y,w,h){if(X.1d||X.1v){x=x||0;y=y||0;o 2a=9q(X.1d||X.1v),4L;if(2Q>=0){4L=J.4M;J.4M=2Q/2C}if(O.N===3){J.6i(2a,x,y)}P{J.6i(2a,x,y,w,h)}if(2Q>=0){J.4M=4L}if(X.5l){o 7r=J.5m;J.5m="dX";p.47(X.5l,x,y);J.5m=7r}}if(1a X===\'2t\'){}};p.7t=G 7t(x,y,1f,1l){if(O.N===0){J.e1(0,0,p.1f,p.1l)}P{J.e1(x,y,1f,1l)}};p.e2=G e2(5p,a){2Q=a};p.e4=G e4(1m){if(1m.2S(".5v")===-1){I{1m:1m,1f:G(R){if(J.e5){I J.e5(1a R==="1X"?6f.dS(R):R)/3o}P{I 0}}}}P{o 19=p.bn(1m);I{1m:1m,3h:1h,4Z:19.4Z,2M:1/19.4Z*19.2M,7d:19.7d,7g:19.7g,1f:G(R){o 1f=0;o 1M=R.N;1c(o i=0;i<1M;i++){31{1f+=1K(p.6K(p.2K[1m],R[i]).2M)}35(e){1Q.3A(e)}}I 1f/p.2K[1m].4Z}}}};p.e7=G e7(1m,28){3G=1m;p.9H(28)};p.9H=G 9H(28){if(28){3o=28}};p.e8=G e8(){};p.6K=G 6K(19,7X){31{3P(7X){W"1":I 19.h4;W"2":I 19.h5;W"3":I 19.h6;W"4":I 19.hd;W"5":I 19.hf;W"6":I 19.hl;W"7":I 19.ho;W"8":I 19.ht;W"9":I 19.hx;W"0":I 19.hA;W" ":I 19.hC;W"$":I 19.hE;W"!":I 19.hG;W\'"\':I 19.hJ;W"#":I 19.hK;W"%":I 19.hM;W"&":I 19.hP;W"\'":I 19.hS;W"(":I 19.hW;W")":I 19.hZ;W"*":I 19.i4;W"+":I 19.i7;W",":I 19.ib;W"-":I 19.ih;W".":I 19.il;W"/":I 19.iq;W"iu":I 19.iz;W":":I 19.iE;W";":I 19.iJ;W"<":I 19.iL;W"=":I 19.iP;W">":I 19.iQ;W"?":I 19.iR;W"@":I 19.at;W"[":I 19.iU;W"\\\\":I 19.eL;W"]":I 19.eQ;W"^":I 19.eR;W"`":I 19.eS;W"{":I 19.eU;W"|":I 19.eX;W"}":I 19.f1;W"~":I 19.f4;am:I 19[7X]}}35(e){1Q.3A(e)}};p.ap=G ap(R,x,y){if(1a R===\'1X\'&&(R+"").2S(\'.\')>=0){if((R*6l)-U.2E(R*6l)===0.5){R=R-0.ff}R=R.fh(3)}P if(R===0){R=R.4l()}if(!3G.3h){if(R&&(J.9r||J.98)){J.4k();J.19=J.fj=3o+"fl "+3G.1m;if(J.9r){J.9r(R,x,y)}P if(J.98){J.2Y(x,y);J.98(R)}J.6a()}}P{o 19=p.2K[3G.1m];J.4k();J.2Y(x,y+3o);o b8=19.4Z,84=1/b8*3o;J.4q(84,84);o 1M=R.N;1c(o i=0;i<1M;i++){31{p.6K(19,R[i]).4d()}35(e){1Q.3A(e)}}J.6a()}};p.bn=G fy(2h){o x,y,cx,cy,43,3W,d,a,67,8k,2M,cc=\'[0-9\\\\-]+\',23;o 6R=G 6R(bq,8f){o i=0,3Q=[],3T,3S=18 2V(bq,"g");3T=3Q[i]=3S.5Y(8f);2T(3T){i++;3T=3Q[i]=3S.5Y(8f)}I 3Q};o 9v=G 9v(d){o c=6R("[A-fQ-z][0-9\\\\- ]+|Z",d);23="o 23={4d:G(){J.3k();J.4k();";x=0;y=0;cx=0;cy=0;43=0;3W=0;d=0;a=0;67="";8k=c.N-1;1c(o j=0;j<8k;j++){o 75=c[j][0],2H=6R(cc,75);3P(75[0]){W"M":x=1K(2H[0][0]);y=1K(2H[1][0]);23+="J.3u("+x+","+(-y)+");";1k;W"L":x=1K(2H[0][0]);y=1K(2H[1][0]);23+="J.33("+x+","+(-y)+");";1k;W"H":x=1K(2H[0][0]);23+="J.33("+x+","+(-y)+");";1k;W"V":y=1K(2H[0][0]);23+="J.33("+x+","+(-y)+");";1k;W"T":43=1K(2H[0][0]);3W=1K(2H[1][0]);if(67==="Q"||67==="T"){d=U.3c(U.2w(x-cx,2)+U.2w(cy-y,2));a=U.3w+U.6j(cx-x,cy-y);cx=x+(U.4n(a)*(d));cy=y+(U.3V(a)*(d))}P{cx=x;cy=y}23+="J.8L("+cx+","+(-cy)+","+43+","+(-3W)+");";x=43;y=3W;1k;W"Q":cx=1K(2H[0][0]);cy=1K(2H[1][0]);43=1K(2H[2][0]);3W=1K(2H[3][0]);23+="J.8L("+cx+","+(-cy)+","+43+","+(-3W)+");";x=43;y=3W;1k;W"Z":23+="J.45();";1k}67=75[0]}23+="2D?J.2I():0;";23+="2r?J.3d():0;";23+="J.6a();";23+="J.2Y("+2M+",0);";23+="}}";I 23};o 9Z=G gv(5v){o 19=5v.6m("19");p.2K[2h].2M=19[0].3f("dO-dQ-x");o 7f=5v.6m("19-gy")[0];p.2K[2h].4Z=1K(7f.3f("gF-gH-em"));p.2K[2h].7d=1K(7f.3f("7d"));p.2K[2h].7g=1K(7f.3f("7g"));o 3h=5v.6m("3h"),1M=3h.N;1c(o i=0;i<1M;i++){o 7s=3h[i].3f("7s");o 1m=3h[i].3f("3h-1m");2M=3h[i].3f("dO-dQ-x");if(2M===37){2M=p.2K[2h].2M}d=3h[i].3f("d");if(d!==1J){23=9v(d);cB(23);p.2K[2h][1m]={1m:1m,7s:7s,2M:2M,4d:23.4d}}}};o ae=G ae(){o 6y;31{6y=26.gY.h0("","",37)}35(e6){1Q.3A(e6.h1);I}31{6y.h2=1g;6y.6D(2h);9Z(6y.6m("5v")[0])}35(a8){1Q.3A(a8);31{o 7G=18 2B.ek();7G.d1("es",2h,1g);7G.ev(37);9Z(7G.i8.ii)}35(e){1Q.3A(a8)}}};p.2K[2h]={};ae(2h);I p.2K[2h]};p.7L=G 7L(2a,21,fn){if(O.N===3){fn.2j(2a,21)}P{21.cm(2a)}};p.6v=G 6v(2b,1m,fn){if(2b[1m]){o 21=fn.N,eq=2b[1m];2b[1m]=G(){if(O.N===21){I fn.2j(u,O)}P{I eq.2j(u,O)}}}P{2b[1m]=fn}};p.6d=G 6d(83){if(83){o cF=1Q.96(83,p);if(!p.3B){J=1D.3s(\'2d\');J.2Y(0.5,0.5);J.5L=\'1R\';p.2I(0);p.3d(Y);p.7W()}1c(o i in 1Q.6r){if(1Q.6r){1Q.6r[i].cm(p)}}(G(5h){cs(5h){cB(cF)}})(p)}if(p.9i){9a=1h;p.9i()}9a=1g;if(p.4d){if(!7b){p.73()}P{p.8V()}}G 4x(7a,3a,fn){if(7a.77){7a.77(3a,fn,1g)}P{7a.gz("dm"+3a,fn)}}4x(1D,"gQ",G(e){p.dP=p.9F;p.dR=p.9R;o 6p=(2B.6p!==37&&1a 2B.6p!==\'1J\')?2B.6p:2B.gU;o 5G=(2B.5G!==37&&1a 2B.5G!==\'1J\')?2B.5G:2B.gZ;p.9F=e.h3-1D.h9+6p;p.9R=e.hF-1D.hL+5G;p.4E(7A);if(p.a6&&!39){p.a6()}if(39&&p.aa){p.aa();p.6V=1h}});4x(1D,"iV",G(e){26.7F.7B.4E=aM});4x(1D,"fm",G(e){39=1h;p.6V=1g;3P(e.fr){W 1:p.6E=p.8a;1k;W 2:p.6E=p.5P;1k;W 3:p.6E=p.a9;1k}p.c6=1h;if(1a p.39==="G"){p.39()}P{p.39=1h}});4x(1D,"g8",G(e){39=1g;if(p.8E&&!p.6V){p.8E()}if(1a p.39!=="G"){p.39=1g}if(p.8O){p.8O()}});4x(26,"gn",G(e){3L=1h;p.4b=e.4P+32;o 9V=1g;1c(o i=0,l=p.9w.N;i<l;i++){if(p.4b===p.9w[i]){9V=1h;3P(p.4b){W 70:p.4P=p.en;1k;W 71:p.4P=p.a9;1k;W 72:p.4P=p.ej;1k;W 69:p.4P=p.8a;1k}p.4b=p.c4}}if(!9V){p.4P=37}if(e.gp){p.4b=6f.dS(p.4b).ec().6G(0)}if(1a p.3L==="G"){p.3L()}P{p.3L=1h}});4x(26,"gq",G(e){3L=1g;if(1a p.3L!=="G"){p.3L=1g}if(p.ao){p.ao()}})};I p}})();',62,1174,'||||||||||||||||||||||||var||||||this||||||||||||function||return|curContext|elements|||length|arguments|else||str|||Math||case|img|255|||||||||num|new|font|typeof|aCode|for|data||width|false|true|replace|array|break|height|name|aNumber|right||color|ret|val|pixels|GREEN_MASK|canvas|RED_MASK|peg|kInv|Array|BLUE_MASK|rgbaToInt|ALPHA_MASK|curElement|pos|aColor|parseInt|split|value|undefined|parseFloat|splitNum|len|left|target|min|Processing|round|curvePoints|varLocation|col|aValue1|slice|number|curShapeCount|nfs|source|args|PVector|path|||document|rest|size|set|obj|object|digits||fInvDet|all|ary|url|temp|apply|modes|push|PMatrix3D|varValue|hex|y2|x2|doFill|formatLength|string|0xff|v2|pow|programObject|v1|row|near|window|opacityRange|doStroke|floor|oldState|method|xy|stroke|y1|glyphTable|numbers|horiz_adv_x|fillStyle|x1|curShape|curTint|get|indexOf|while|vertex|RegExp|test|angle|translate|noiseGen|instanceof|try||lineTo|prototype|catch|Date|null||mousePressed|type|far|sqrt|fill|constructor|getAttribute|isNegative|glyph|arr|curColorMode|beginPath|projection|redRange|x3|curTextSize|greenRange|blueRange|y3|getContext|abs|moveTo|sz|PI|pathOpen|sx|max|debug|use3DContext|curRectMode||throw|newary|curTextFont|aAngle|sy|angleInRadians|endShape|keyPressed|padding|matrix|programObj|switch|results|aValue2|regexp|latest|context|cos|ny|join|quoteStart|mask|mode|charAt|match|nx|varName|closePath|cameraZ|image|matrixStack|forwardTransform|prevX|key|bottom|draw|tx|tz|top|rounded|cameraY|prevY|save|toString|firstX|sin|amt|ty|scale|tmpMatrix|numBitsInValue|rgba|PMatrix3DStack|index|mix|attach|tan|intcolor|firstY|print|modelView|view|cursor|128|numBits|decToBin|pop|log|fA5|oldAlpha|globalAlpha|fB3|datasrc|keyCode|oldFill|int|range1|fragmentShaderObject|100|bezierCurveTo|fA4|createImageData|y4|units_per_em|model|vertexShaderObject|pixelsDone|fA2|fB2|aMin|fB5||clearColor|integer_Y|smoothedNoise|random|fA1|integer_X|multiplier|204|lerp|processing|output|aValue3|mag|_mask|globalCompositeOperation|result|tokens|rgb|fB4|fB1|fB0|fA3|fA0|svg|offsetStart|verifyChannel|substring|x4|cam|beginShape|rgbaAry|binaryString|sbin|colors1|scrollY|colors2|looping|CLOSE|notString|lineCap|strings|getTime|curveVertex|CENTER|high|mult|extend|leftStr|ARRAY_BUFFER|images|c_y|newstr|exec|Object||boolean|range|interpolate|curBackground|static|start|lastCom|transpose||restore|OPENGL|nextLeft|init|allRest|String|public|createElement|drawImage|atan2|c_x|1000|getElementsByTagName|camera|aElement|scrollX|pad|lib|hexstring|AJAX|ArrayList|addMethod|yMax|offset|xmlDoc|normalize|cameraFOV|cameraInv|curEllipseMode|load|mouseButton|vertexAttribPointer|charCodeAt|Vertex|cameraX|escape|glyphLook|pushMatrix|framesSinceLastFPS|popMatrix|loopStarted|acos|addUp|regex|negative|decimalToHex|getLoaded|mouseDragging|RADIUS|aMax|haveNextNextGaussian|buildImageObject||||redraw|position|com|nf|addEventListener|perlinNoise_2D|frames|elem|doLoop|getImageData|ascent|QUAD_STRIP|font_face|descent|userMatrixStack|props|getImage_old|add|dist|vars|nextRight|strokeStyle|sep|simplePVMethods|oldComposite|unicode|clear|rotateZ|void|arc|boxOutlineBuffer|boxBuffer|getColor|curCursor|style|quoteType|uniformMatrix|splice|body|xmlhttp|yMin|size3|numElem|cross|extendClass|perspective|eyeZ|eyeY|PRECISIONB|final|eyeX|item|uniform|popStyle|ortho|disableContextMenu|chr|256|boxVerts|clearInterval|lineJoin|curMsPerFrame|code|newScale|rotate|secondX|secondY|inDraw|LINES|LEFT|FRAME_RATE|sec|timeSinceLastFPS|curTightness|hay|frameRate|curFrameRate|CORNER|contextMenu|lenC|unbinary|TRIANGLES|nfp|decimals|commas|methods|nfc|allNext|next|bindBuffer|nextBrace|classes|pushStyle|numDec|aString|Caller|lnPrinted|println|isNaN|mouseClicked|defineProperty|ceil|__defineGetter__|styleArray|asin|callback|quadraticCurveTo|build|nextNextGaussian|mouseReleased|low|background|POINTS|fillRect|fractional_X|hasBackground|loop|interpolatedNoise|frequency|total|perlinNoise_3D|classReplace|180|360|aMode|createImage|Point|parse|point|mozDrawText|istart|inSetup|getElementById|file|ostart|rightCount|createGraphics|exp|atan|setup|pixelsGetter|staticVar|newWebGLArray|value1|putImageData|image_old|last|getImage|fillText|dot|float|mat4|buildPath|codedKeys|printed|outgoing|reset|preApply|rotateX|rotateY|RGB|ln|mouseX|returnString|textSize|fDet|uniformf|console|boxOutlineVerts|peek|intFloat|4294967296|ajax|leftCount|mouseY|offsetEnd|hue|frustumMode|wasCoded|rect|mc|getUniformLocation|parseSVGFont|WebGLFloatArrayExists|||frustum|cameraFar|cameraAspect|mouseMoved|modelViewInv|e_sf_ch|RIGHT|mouseDragged|||cameraNear|loadXML|colorMode||concat|sort|aspect|xMin|xMax|default||keyReleased|text|size2||reverse||upY|6000|600000|centerY|aValue|HSB|toRGB|16777216|65536|rc|stop|bezier|centerZ|beginDraw|lerpColor|enable|r1|r2|oldCursor|Import|DefaultColor|drawArrays|tmpColorMode|range2|POLYGON_OFFSET_FILL|noFill|REPLACE|strokeWeight|lineWidth|LIGHTEST|strokeCap|strokeJoin|darkest|||DIFFERENCE|EXCLUSION|MULTIPLY|SCREEN|HARD_LIGHT|upem|SOFT_LIGHT|soft_light|||OVERLAY|close|dodge||BURN|burn|TRIANGLE_STRIP|resetMatrix|TRIANGLE_FAN|newState|loadGlyphs|year|CENTER_RADIUS|needle||hour|minute|second|millis|noLoop|shift|curve|fps|frameCount|tightness|focused|e_loop|rectMode|aRate|aRectMode|exit|ellipseMode|noCursor|aEllipseMode|NOCURSOR|href|endDraw|day|toNumbers|line|enableContextMenu|QUADS|contextmenu|bezierPoint|bezierTangent|substr|curvePoint|month|curveTangent|binaryPattern|||quoteEnd|CODED|triangle|mouseDown|quad|square|binary|staticVars||getXY|rawStr|rightStr|patternRGBa||CORNERS|prev|2147483647|loadStrings|ellipse|call|matchAll|aRegExp|TWO_PI|re||with|equals|callee|caller|trim|||getOwnPropertyDescriptor|__lookupGetter__|eval|sq|value2|loadImage|parsedCode|className|aNumber2|radians|loaded|src|map|ostop|istop|CLASS|matchClass|byte|norm|colors|extends|matchClasses|sides|center|class|matchNoCon|v3|v4|open|fractional_Y|overlay|DODGE|prefix|amplitude|gif|corners|constrain|abstract|degrees|screen|hard_light|multiply|e_size|not|difference|loadPixels|lightest|updatePixels|vertexShaderSource|on|DARKEST||createShader|shaderSource|fragmentShaderSource|compileShader|getShaderParameter|COMPILE_STATUS|getShaderInfoLog|exclusion||||attachShader|ADD|BLEND|blend|SUBTRACT|matchMethod|noStroke|createBuffer|bufferData|aExponent|DYNAMIC_DRAW|subtract|aWidth|aHeight|horiz|pmouseX|adv|pmouseY|fromCharCode|crossX|crossY|crossZ|div|darker|createSimplePVectorMethod|hasOwnProperty|createPVectorMethod|clearRect|tint|range3|loadFont|mozMeasureText|e_fx_op|textFont|textAlign|WebGLFloatArray|vec4|main|toUpperCase|range4|setting|superMethod|__self|aValue4|centerX|DOWN|XMLHttpRequest|ADDMETHOD||UP|leftContext|rightContext|oldfn|VBO|GET|upX|STRING|send|upZ|4028235e|element|ARROW|POLYGON|delim|PRECISIONF|search|array1|array2|elemsToCopy|fov|subset|seperator|newSize|backslash|contains|remove|isEmpty|clone|bracketright|asciicircum|grave|wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw|braceleft|WAIT|move|bar|base64|printProjection||braceright|printCamera|10000|asciitilde|pointer|R0lGODlhAQABAIAAAP|box|P3D|MIN_INT|crosshair|green|blue|alpha|polygonOffset|0001|0xff000000|toFixed|disable|mozTextStyle|blendColor|px|mousedown||smooth|noSmooth|copy|which|curRectmode||Too|many|without|enough|loadGlyph|getYear|1900|js|0x00ff0000|getMonth|getDay|getHours|getMinutes|getSeconds|COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT|curveTightness|setInterval|hasFocus|bezierVertex|imageMode|link|Za|location|preventDefault|stopPropagation|removeEventListener|NaN_Err|notBinary|the|passed|into|was|||bit|longErr|0xFFFFFFFF|Number|unhex|mouseup|replaceAll|5522847498307933|char||0x0000ff00|onload|toLowerCase|Random|nextGaussian|15731|789221|1376312589|0x7fffffff|1073741824|keydown|AniSprite|shiftKey|keyup|noise|display|getWidth|getHeight|parseSVGFontse|experimental|webgl|face|attachEvent|supported|browser|viewport|DEPTH_TEST|VERTEX_SHADER|units|FRAGMENT_SHADER|per|createProgram|linkProgram|getProgramParameter|LINK_STATUS|Error|linking|shaders|useProgram|mousemove|angleBetween|sub|limit|pageXOffset|heading2D|super|invert|implementation|pageYOffset|createDocument|message|async|clientX|one|two|three|responseText|attribute|offsetLeft|gl_FragColor|vec3|gl_FrontColor|four|gl_Position|five|gl_Color|DOMContentLoaded|import|red|zA|six|double|long|seven|uniform4fv|uniform3fv|uniform2fv|uniform1f|eight|CanvasFloatArray|uniformi|uniform4iv|nine|uniform3iv|uniform2iv|zero|uniform1i|space|getAttribLocation|dollar|clientY|exclam|FLOAT|enableVertexAttribArray|quotedbl|numbersign|offsetTop|percent|uniformMatrix4fv|uniformMatrix3fv|ampersand|uniformMatrix2fv|buildProcessing|quotesingle|Instance|HALF_PI|MAX_FLOAT|parenleft|MIN_FLOAT|MAX_INT|parenright|2147483648|||CROSS|asterisk|HAND|MOVE|plus|responseXML|TEXT|wait|comma|transX|auto|transY|||hyphen|documentElement|transZ|0x000000ff|period|PREC_MAXVAL||PREC_ALPHA_SHIFT|PREC_RED_SHIFT|slash|ROUND||butt|_|PROJECT|MITER|miter|BEVEL|underscore|bevel|88888880|88888888|88888870|colon|88888871|88888872|88888869|online|semicolon|Arial|less|splitTokens|SQUARE|append|equal|greater|question|shorten|expand|bracketleft|mouseout'.split('|'),0,{}))
-
-

processing-0.9.1.js

+/*
+
+    P R O C E S S I N G . J S - 0.9.1
+    a port of the Processing visualization language
+
+    License       : MIT
+    Developer     : John Resig: http://ejohn.org
+    Web Site      : http://processingjs.org
+    Java Version  : http://processing.org
+    Github Repo.  : http://github.com/jeresig/processing-js
+    Bug Tracking  : http://processing-js.lighthouseapp.com
+    Mozilla POW!  : http://wiki.Mozilla.org/Education/Projects/ProcessingForTheWeb
+    Maintained by : Seneca: http://zenit.senecac.on.ca/wiki/index.php/Processing.js
+                    Hyper-Metrix: http://hyper-metrix.com/#Processing
+                    BuildingSky: http://weare.buildingsky.net/pages/processing-js
+
+ */
+
+(function() {
+
+  var Processing = this.Processing = function Processing(curElement, aCode) {
+
+    var p = this;
+
+    p.pjs = {
+       imageCache: {
+         pending: 0
+       }
+    }; // by default we have an empty imageCache, no more.
+
+    p.name = 'Processing.js Instance'; // Set Processing defaults / environment variables
+    p.use3DContext = false; // default '2d' canvas context
+    p.canvas = curElement;
+
+    // Glyph path storage for textFonts
+    p.glyphTable = {};
+
+    // Global vars for tracking mouse position
+    p.pmouseX = 0;
+    p.pmouseY = 0;
+    p.mouseX = 0;
+    p.mouseY = 0;
+    p.mouseButton = 0;
+    p.mouseDown = false;
+    p.mouseScroll = 0;
+
+    // Undefined event handlers to be replaced by user when needed
+    p.mouseClicked = undefined;
+    p.mouseDragged = undefined;
+    p.mouseMoved = undefined;
+    p.mousePressed = undefined;
+    p.mouseReleased = undefined;
+    p.mouseScrolled = undefined;
+    p.key = undefined;
+    p.keyPressed = undefined;
+    p.keyReleased = undefined;
+    p.keyTyped = undefined;
+    p.draw = undefined;
+    p.setup = undefined;
+
+    // The height/width of the canvas
+    p.width = curElement.width - 0;
+    p.height = curElement.height - 0;
+
+    // The current animation frame
+    p.frameCount = 0;
+
+    // Color modes
+    p.RGB   = 1;
+    p.ARGB  = 2;
+    p.HSB   = 3;
+    p.ALPHA = 4;
+    p.CMYK  = 5;
+
+    // Renderers
+    p.P2D    = 1;
+    p.JAVA2D = 1;
+    p.WEBGL  = 2;
+    p.P3D    = 2;
+    p.OPENGL = 2;
+    p.EPSILON = 0.0001;
+    p.MAX_FLOAT   = 3.4028235e+38;
+    p.MIN_FLOAT   = -3.4028235e+38;
+    p.MAX_INT     = 2147483647;
+    p.MIN_INT     = -2147483648;
+    p.PI          = Math.PI;
+    p.TWO_PI      = 2 * p.PI;
+    p.HALF_PI     = p.PI / 2;
+    p.THIRD_PI    = p.PI / 3;
+    p.QUARTER_PI  = p.PI / 4;
+    p.DEG_TO_RAD  = p.PI / 180;
+    p.RAD_TO_DEG  = 180 / p.PI;
+    p.WHITESPACE  = " \t\n\r\f\u00A0";
+
+    // Filter/convert types
+    p.BLUR      = 11;
+    p.GRAY      = 12;
+    p.INVERT    = 13;
+    p.OPAQUE    = 14;
+    p.POSTERIZE = 15;
+    p.THRESHOLD = 16;
+    p.ERODE     = 17;
+    p.DILATE    = 18;
+
+    // Blend modes
+    p.REPLACE    = 0;
+    p.BLEND      = 1 << 0;
+    p.ADD        = 1 << 1;
+    p.SUBTRACT   = 1 << 2;
+    p.LIGHTEST   = 1 << 3;
+    p.DARKEST    = 1 << 4;
+    p.DIFFERENCE = 1 << 5;
+    p.EXCLUSION  = 1 << 6;
+    p.MULTIPLY   = 1 << 7;
+    p.SCREEN     = 1 << 8;
+    p.OVERLAY    = 1 << 9;
+    p.HARD_LIGHT = 1 << 10;
+    p.SOFT_LIGHT = 1 << 11;
+    p.DODGE      = 1 << 12;
+    p.BURN       = 1 << 13;
+
+    // Color component bit masks
+    p.ALPHA_MASK = 0xff000000;
+    p.RED_MASK   = 0x00ff0000;
+    p.GREEN_MASK = 0x0000ff00;
+    p.BLUE_MASK  = 0x000000ff;
+
+    // Projection matrices
+    p.CUSTOM       = 0;
+    p.ORTHOGRAPHIC = 2;
+    p.PERSPECTIVE  = 3;
+
+    // Shapes
+    p.POINT          = 2;
+    p.POINTS         = 2;
+    p.LINE           = 4;
+    p.LINES          = 4;
+    p.TRIANGLE       = 8;
+    p.TRIANGLES      = 9;
+    p.TRIANGLE_STRIP = 10;
+    p.TRIANGLE_FAN   = 11;
+    p.QUAD           = 16;
+    p.QUADS          = 16;
+    p.QUAD_STRIP     = 17;
+    p.POLYGON        = 20;
+    p.PATH           = 21;
+    p.RECT           = 30;
+    p.ELLIPSE        = 31;
+    p.ARC            = 32;
+    p.SPHERE         = 40;
+    p.BOX            = 41;
+
+    // Shape closing modes
+    p.OPEN  = 1;
+    p.CLOSE = 2;
+
+    // Shape drawing modes
+    p.CORNER          = 0; // Draw mode convention to use (x, y) to (width, height)
+    p.CORNERS         = 1; // Draw mode convention to use (x1, y1) to (x2, y2) coordinates
+    p.RADIUS          = 2; // Draw mode from the center, and using the radius
+    p.CENTER_RADIUS   = 2; // Deprecated! Use RADIUS instead
+    p.CENTER          = 3; // Draw from the center, using second pair of values as the diameter
+    p.DIAMETER        = 3; // Synonym for the CENTER constant. Draw from the center
+    p.CENTER_DIAMETER = 3; // Deprecated! Use DIAMETER instead
+
+    // Text vertical alignment modes
+    p.BASELINE = 0;   // Default vertical alignment for text placement
+    p.TOP      = 101; // Align text to the top
+    p.BOTTOM   = 102; // Align text from the bottom, using the baseline
+
+    // UV Texture coordinate modes
+    p.NORMAL    = 1;
+    p.NORMALIZE = 1;
+    p.IMAGE     = 2;
+
+    // Text placement modes
+    p.MODEL = 4;
+    p.SHAPE = 5;
+
+    // Stroke modes
+    p.SQUARE  = 'butt';
+    p.ROUND   = 'round';
+    p.PROJECT = 'square';
+    p.MITER   = 'miter';
+    p.BEVEL   = 'bevel';
+
+    // Lighting modes
+    p.AMBIENT     = 0;
+    p.DIRECTIONAL = 1;
+    //POINT       = 2; Shared with Shape constant
+    p.SPOT        = 3;
+
+    // Key constants
+
+    // Both key and keyCode will be equal to these values
+    p.BACKSPACE = 8;
+    p.TAB       = 9;
+    p.ENTER     = 10;
+    p.RETURN    = 13;
+    p.ESC       = 27;
+    p.DELETE    = 127;
+    p.CODED     = 0xffff;
+
+    // p.key will be CODED and p.keyCode will be this value
+    p.SHIFT     = 16;
+    p.CONTROL   = 17;
+    p.ALT       = 18;
+    p.UP        = 38;
+    p.RIGHT     = 39;
+    p.DOWN      = 40;
+    p.LEFT      = 37;
+
+    var codedKeys = [p.SHIFT, p.CONTROL, p.ALT, p.UP, p.RIGHT, p.DOWN, p.LEFT];
+
+    // Cursor types
+    p.ARROW    = 'default';
+    p.CROSS    = 'crosshair';
+    p.HAND     = 'pointer';
+    p.MOVE     = 'move';
+    p.TEXT     = 'text';
+    p.WAIT     = 'wait';
+    p.NOCURSOR = "url('data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='), auto";
+
+    // Hints
+    p.DISABLE_OPENGL_2X_SMOOTH    =  1;
+    p.ENABLE_OPENGL_2X_SMOOTH     = -1;
+    p.ENABLE_OPENGL_4X_SMOOTH     =  2;
+    p.ENABLE_NATIVE_FONTS         =  3;
+    p.DISABLE_DEPTH_TEST          =  4;
+    p.ENABLE_DEPTH_TEST           = -4;
+    p.ENABLE_DEPTH_SORT           =  5;
+    p.DISABLE_DEPTH_SORT          = -5;
+    p.DISABLE_OPENGL_ERROR_REPORT =  6;
+    p.ENABLE_OPENGL_ERROR_REPORT  = -6;
+    p.ENABLE_ACCURATE_TEXTURES    =  7;
+    p.DISABLE_ACCURATE_TEXTURES   = -7;
+    p.HINT_COUNT                  = 10;
+
+    // PJS defined constants
+    p.SINCOS_LENGTH      = parseInt(360 / 0.5, 10);
+    p.FRAME_RATE         = 0;
+    p.focused            = true;
+    p.PRECISIONB         = 15; // fixed point precision is limited to 15 bits!!
+    p.PRECISIONF         = 1 << p.PRECISIONB;
+    p.PREC_MAXVAL        = p.PRECISIONF - 1;
+    p.PREC_ALPHA_SHIFT   = 24 - p.PRECISIONB;
+    p.PREC_RED_SHIFT     = 16 - p.PRECISIONB;
+    p.NORMAL_MODE_AUTO   = 0;
+    p.NORMAL_MODE_SHAPE  = 1;
+    p.NORMAL_MODE_VERTEX = 2;
+    p.MAX_LIGHTS         = 8;
+
+    // "Private" variables used to maintain state
+    var curContext,
+        online = true,
+        doFill = true,
+        fillStyle = "rgba( 255, 255, 255, 1 )",
+        doStroke = true,
+        strokeStyle = "rgba( 204, 204, 204, 1 )",
+        lineWidth = 1,
+        loopStarted = false,
+        refreshBackground = function() {},
+        doLoop = true,
+        looping = 0,
+        curRectMode = p.CORNER,
+        curEllipseMode = p.CENTER,
+        normalX = 0,
+        normalY = 0,
+        normalZ = 0,
+        normalMode = p.NORMAL_MODE_AUTO,
+        inDraw = false,
+        curBackground = "rgba( 204, 204, 204, 1 )",
+        curFrameRate = 60,
+        curCursor = p.ARROW,
+        oldCursor = curElement.style.cursor,
+        curMsPerFrame = 1,
+        curShape = p.POLYGON,
+        curShapeCount = 0,
+        curvePoints = [],
+        curTightness = 0,
+        curveDetail = 20,
+        curveInited = false,
+        colorModeA = 255,
+        colorModeX = 255,
+        colorModeY = 255,
+        colorModeZ = 255,
+        pathOpen = false,
+        mousePressed = false,
+        mouseDragging = false,
+        keyPressed = false,
+        curColorMode = p.RGB,
+        curTint = function() {},
+        curTextSize = 12,
+        curTextFont = "Arial",
+        getLoaded = false,
+        start = new Date().getTime(),
+        timeSinceLastFPS = start,
+        framesSinceLastFPS = 0,
+        lastTextPos = [0, 0, 0],
+        curveBasisMatrix,
+        curveToBezierMatrix,
+        curveDrawMatrix,
+        bezierBasisInverse,
+        bezierBasisMatrix,
+        programObject3D,
+        programObject2D,
+        boxBuffer,
+        boxNormBuffer,
+        boxOutlineBuffer,
+        sphereBuffer,
+        lineBuffer,
+        fillBuffer,
+        pointBuffer;
+
+    // User can only have MAX_LIGHTS lights
+    var lightCount = 0;
+
+    //sphere stuff
+    var sphereDetailV = 0,
+        sphereDetailU = 0,
+        sphereX = [],
+        sphereY = [],
+        sphereZ = [],
+        sinLUT = new Array(p.SINCOS_LENGTH),
+        cosLUT = new Array(p.SINCOS_LENGTH),
+        sphereVerts,
+        sphereNorms;
+
+    // Camera defaults and settings
+    var cam,
+        cameraInv,
+        forwardTransform,
+        reverseTransform,
+        modelView,
+        modelViewInv,
+        userMatrixStack,
+        inverseCopy,
+        projection,
+        manipulatingCamera = false,
+        frustumMode = false,
+        cameraFOV = 60 * (Math.PI / 180),
+        cameraX = curElement.width / 2,
+        cameraY = curElement.height / 2,
+        cameraZ = cameraY / Math.tan(cameraFOV / 2),
+        cameraNear = cameraZ / 10,
+        cameraFar = cameraZ * 10,
+        cameraAspect = curElement.width / curElement.height;
+
+    var vertArray = [],
+        isCurve = false,
+        isBezier = false,
+        firstVert = true;
+
+    // Stores states for pushStyle() and popStyle().
+    var styleArray = new Array(0);
+
+    // Vertices are specified in a counter-clockwise order
+    // triangles are in this order: back, front, right, bottom, left, top
+    var boxVerts = [0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5,
+                   -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5,
+                   -0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5, 0.5,
+                    0.5, 0.5, -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, -0.5, 0.5,
+                    0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5,
+                   -0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5,
+                   -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5,
+                   -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, 0.5, 0.5, 0.5, -0.5,
+                   -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, 0.5, 0.5];
+
+    var boxNorms = [0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1,
+                    0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
+                    1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0,
+                    0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0,
+                    -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0,
+                    0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0];
+
+    var boxOutlineVerts = [0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5,
+                          -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5, 0.5,
+                           0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5,
+                          -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
+                           0.5, -0.5, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5,
+                          -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5];
+
+    // Vertex shader for points and lines
+    var vertexShaderSource2D =
+      "attribute vec3 Vertex;" +
+      "uniform vec4 color;" +
+
+      "uniform mat4 model;" +
+      "uniform mat4 view;" +
+      "uniform mat4 projection;" +
+
+      "void main(void) {" +
+      "  gl_FrontColor = color;" +
+      "  gl_Position = projection * view * model * vec4(Vertex, 1.0);" +
+      "}";
+
+    var fragmentShaderSource2D =
+      "void main(void){" +
+      "  gl_FragColor = gl_Color;" +
+      "}";
+
+    // Vertex shader for boxes and spheres
+    var vertexShaderSource3D =
+      "attribute vec3 Vertex;" +
+      "attribute vec3 Normal;" +
+
+      "uniform vec4 color;" +
+
+      "uniform bool usingMat;" +
+      "uniform vec3 specular;" +
+      "uniform vec3 mat_emissive;" +
+      "uniform vec3 mat_ambient;" +
+      "uniform vec3 mat_specular;" +
+      "uniform float shininess;" +
+
+      "uniform mat4 model;" +
+      "uniform mat4 view;" +
+      "uniform mat4 projection;" +
+      "uniform mat4 normalTransform;" +
+
+      "uniform int lightCount;" +
+      "uniform vec3 falloff;" +
+
+      "struct Light {" +
+      "  bool dummy;" +
+      "   int type;" +
+      "   vec3 color;" +
+      "   vec3 position;" +
+      "  vec3 direction;" +
+      "  float angle;" +
+      "  vec3 halfVector;" +
+      "  float concentration;" +
+      "};" +
+      "uniform Light lights[8];" +
+
+      "void AmbientLight( inout vec3 totalAmbient, in vec3 ecPos, in Light light ) {" +
+      // Get the vector from the light to the vertex
+      // Get the distance from the current vector to the light position
+      "  float d = length( light.position - ecPos );" +
+      "  float attenuation = 1.0 / ( falloff[0] + ( falloff[1] * d ) + ( falloff[2] * d * d ));" + "  totalAmbient += light.color * attenuation;" +
+      "}" +
+
+      "void DirectionalLight( inout vec3 col, in vec3 ecPos, inout vec3 spec, in vec3 vertNormal, in Light light ) {" +
+      "  float powerfactor = 0.0;" +
+      "  float nDotVP = max(0.0, dot( vertNormal, light.position ));" +
+      "  float nDotVH = max(0.0, dot( vertNormal, normalize( light.position-ecPos )));" +
+
+      "  if( nDotVP != 0.0 ){" +
+      "    powerfactor = pow( nDotVH, shininess );" +
+      "  }" +
+
+      "  col += light.color * nDotVP;" +
+      "  spec += specular * powerfactor;" +
+      "}" +
+
+      "void PointLight( inout vec3 col, inout vec3 spec, in vec3 vertNormal, in vec3 ecPos, in vec3 eye, in Light light ) {" +
+      "  float powerfactor;" +
+
+      // Get the vector from the light to the vertex
+      "   vec3 VP = light.position - ecPos;" +
+
+      // Get the distance from the current vector to the light position
+      "  float d = length( VP ); " +
+
+      // Normalize the light ray so it can be used in the dot product operation.
+      "  VP = normalize( VP );" +
+
+      "  float attenuation = 1.0 / ( falloff[0] + ( falloff[1] * d ) + ( falloff[2] * d * d ));" +
+
+      "  float nDotVP = max( 0.0, dot( vertNormal, VP ));" +
+      "  vec3 halfVector = normalize( VP + eye );" +
+      "  float nDotHV = max( 0.0, dot( vertNormal, halfVector ));" +
+
+      "  if( nDotVP == 0.0) {" +
+      "    powerfactor = 0.0;" +
+      "  }" +
+      "  else{" +
+      "    powerfactor = pow( nDotHV, shininess );" +
+      "  }" +
+
+      "  spec += specular * powerfactor * attenuation;" +
+      "  col += light.color * nDotVP * attenuation;" +
+      "}" +
+
+      /*
+      */
+      "void SpotLight( inout vec3 col, inout vec3 spec, in vec3 vertNormal, in vec3 ecPos, in vec3 eye, in Light light ) {" +
+      "  float spotAttenuation;" +
+      "  float powerfactor;" +
+
+      // calculate the vector from the current vertex to the light.
+      "  vec3 VP = light.position - ecPos; " +
+      "  vec3 ldir = normalize( light.direction );" +
+
+      // get the distance from the spotlight and the vertex
+      "  float d = length( VP );" +
+      "  VP = normalize( VP );" +
+
+      "  float attenuation = 1.0 / ( falloff[0] + ( falloff[1] * d ) + ( falloff[2] * d * d ) );" +
+
+      // dot product of the vector from vertex to light and light direction.
+      "  float spotDot = dot( VP, ldir );" +
+
+      // if the vertex falls inside the cone
+      "  if( spotDot < cos( light.angle ) ) {" +
+      "    spotAttenuation = pow( spotDot, light.concentration );" +
+      "  }" +
+      "  else{" +
+      "    spotAttenuation = 1.0;" +
+      "  }" +
+      "  attenuation *= spotAttenuation;" +
+
+      "  float nDotVP = max( 0.0, dot( vertNormal, VP ));" +
+      "  vec3 halfVector = normalize( VP + eye );" +
+      "  float nDotHV = max( 0.0, dot( vertNormal, halfVector ));" +
+
+      "  if( nDotVP == 0.0 ) {" +
+      "    powerfactor = 0.0;" +
+      "  }" +
+      "  else {" +
+      "    powerfactor = pow( nDotHV, shininess );" +
+      "  }" +
+
+      "  spec += specular * powerfactor * attenuation;" +
+      "  col += light.color * nDotVP * attenuation;" +
+      "}" +
+
+      "void main(void) {" +
+      "  vec3 finalAmbient = vec3( 0.0, 0.0, 0.0 );" +
+      "  vec3 finalDiffuse = vec3( 0.0, 0.0, 0.0 );" +
+      "  vec3 finalSpecular = vec3( 0.0, 0.0, 0.0 );" +
+
+      "  vec3 norm = vec3( normalTransform * vec4( Normal, 0.0 ) );" +
+
+      "  vec4 ecPos4 = view * model * vec4(Vertex,1.0);" +
+      "  vec3 ecPos = (vec3(ecPos4))/ecPos4.w;" +
+      "  vec3 eye = vec3( 0.0, 0.0, 1.0 );" +
+
+      // If there were no lights this draw call, just use the
+      // assigned fill color of the shape and the specular value
+      "  if( lightCount == 0 ) {" +
+      "    gl_FrontColor = color + vec4(mat_specular,1.0);" +
+      "  }" +
+      "  else {" +
+      "    for( int i = 0; i < lightCount; i++ ) {" +
+      "      if( lights[i].type == 0 ) {" +
+      "        AmbientLight( finalAmbient, ecPos, lights[i] );" +
+      "      }" +
+      "      else if( lights[i].type == 1 ) {" +
+      "        DirectionalLight( finalDiffuse,ecPos, finalSpecular, norm, lights[i] );" +
+      "      }" +
+      "      else if( lights[i].type == 2 ) {" +
+      "        PointLight( finalDiffuse, finalSpecular, norm, ecPos, eye, lights[i] );" +
+      "      }" +
+      "      else if( lights[i].type == 3 ) {" +
+      "        SpotLight( finalDiffuse, finalSpecular, norm, ecPos, eye, lights[i] );" +
+      "      }" +
+      "    }" +
+
+      "   if( usingMat == false ) {" +
+      "    gl_FrontColor = vec4(  " +
+      "      vec3(color) * finalAmbient +" +
+      "      vec3(color) * finalDiffuse +" +
+      "      vec3(color) * finalSpecular," +
+      "      color[3] );" +
+      "   }" +
+      "   else{" +
+      "     gl_FrontColor = vec4( " +
+      "       mat_emissive + " +
+      "       (vec3(color) * mat_ambient * finalAmbient) + " +
+      "       (vec3(color) * finalDiffuse) + " +
+      "       (mat_specular * finalSpecular), " +
+      "       color[3] );" +
+      "    }" +
+      "  }" +
+      "  gl_Position = projection * view * model * vec4( Vertex, 1.0 );" +
+      "}";
+
+    var fragmentShaderSource3D =
+      "void main(void){" +
+      "  gl_FragColor = gl_Color;" +
+      "}";
+
+    // Wrapper to easily deal with array names changes.
+    var newWebGLArray = function(data) {
+      return new WebGLFloatArray(data);
+    };
+
+    var imageModeCorner = function imageModeCorner(x, y, w, h, whAreSizes) {
+      return {
+        x: x,
+        y: y,
+        w: w,
+        h: h
+      };
+    };
+    var imageModeConvert = imageModeCorner;
+
+    var imageModeCorners = function imageModeCorners(x, y, w, h, whAreSizes) {
+      return {
+        x: x,
+        y: y,
+        w: whAreSizes ? w : w - x,
+        h: whAreSizes ? h : h - y
+      };
+    };
+
+    var imageModeCenter = function imageModeCenter(x, y, w, h, whAreSizes) {
+      return {
+        x: x - w / 2,
+        y: y - h / 2,
+        w: w,
+        h: h
+      };
+    };
+
+    var createProgramObject = function(curContext, vetexShaderSource, fragmentShaderSource) {
+      var vertexShaderObject = curContext.createShader(curContext.VERTEX_SHADER);
+      curContext.shaderSource(vertexShaderObject, vetexShaderSource);
+      curContext.compileShader(vertexShaderObject);
+      if (!curContext.getShaderParameter(vertexShaderObject, curContext.COMPILE_STATUS)) {
+        throw curContext.getShaderInfoLog(vertexShaderObject);
+      }
+
+      var fragmentShaderObject = curContext.createShader(curContext.FRAGMENT_SHADER);
+      curContext.shaderSource(fragmentShaderObject, fragmentShaderSource);
+      curContext.compileShader(fragmentShaderObject);
+      if (!curContext.getShaderParameter(fragmentShaderObject, curContext.COMPILE_STATUS)) {
+        throw curContext.getShaderInfoLog(fragmentShaderObject);
+      }
+
+      var programObject = curContext.createProgram();
+      curContext.attachShader(programObject, vertexShaderObject);
+      curContext.attachShader(programObject, fragmentShaderObject);
+      curContext.linkProgram(programObject);
+      if (!curContext.getProgramParameter(programObject, curContext.LINK_STATUS)) {
+        throw "Error linking shaders.";
+      }
+
+      return programObject;
+    };
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Char handling
+    ////////////////////////////////////////////////////////////////////////////
+    var charMap = {};
+
+    var Char = function Char(chr) {
+      if (typeof chr === 'string' && chr.length === 1) {
+        this.code = chr.charCodeAt(0);
+      } else {
+        this.code = NaN;
+      }
+
+      return (typeof charMap[this.code] === 'undefined') ? charMap[this.code] = this : charMap[this.code];
+    };
+
+    Char.prototype.toString = function() {
+      return String.fromCharCode(this.code);
+    };
+
+    Char.prototype.valueOf = function() {
+      return this.code;
+    };
+
+    ////////////////////////////////////////////////////////////////////////////
+    // PVector
+    ////////////////////////////////////////////////////////////////////////////
+    var PVector = function(x, y, z) {
+      this.x = x || 0;
+      this.y = y || 0;
+      this.z = z || 0;
+    },
+    createPVectorMethod = function(method) {
+      return function(v1, v2) {
+        var v = v1.get();
+        v[method](v2);
+        return v;
+      };
+    },
+    createSimplePVectorMethod = function(method) {
+      return function(v1, v2) {
+        return v1[method](v2);
+      };
+    },
+    simplePVMethods = "dist dot cross".split(" "),
+    method = simplePVMethods.length;
+
+    PVector.angleBetween = function(v1, v2) {
+      return Math.acos(v1.dot(v2) / (v1.mag() * v2.mag()));
+    };
+
+    // Common vector operations for PVector
+    PVector.prototype = {
+      set: function(v, y, z) {
+        if (arguments.length === 1) {
+          this.set(v.x || v[0], v.y || v[1], v.z || v[2]);
+        } else {
+          this.x = v;
+          this.y = y;
+          this.z = z;
+        }
+      },
+      get: function() {
+        return new PVector(this.x, this.y, this.z);
+      },
+      mag: function() {
+        return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
+      },
+      add: function(v, y, z) {
+        if (arguments.length === 3) {
+          this.x += v;
+          this.y += y;
+          this.z += z;
+        } else if (arguments.length === 1) {
+          this.x += v.x;
+          this.y += v.y;
+          this.z += v.z;
+        }
+      },
+      sub: function(v, y, z) {
+        if (arguments.length === 3) {
+          this.x -= v;
+          this.y -= y;
+          this.z -= z;
+        } else if (arguments.length === 1) {
+          this.x -= v.x;
+          this.y -= v.y;
+          this.z -= v.z;
+        }
+      },
+      mult: function(v) {
+        if (typeof v === 'number') {
+          this.x *= v;
+          this.y *= v;
+          this.z *= v;
+        } else if (typeof v === 'object') {
+          this.x *= v.x;
+          this.y *= v.y;
+          this.z *= v.z;
+        }
+      },
+      div: function(v) {
+        if (typeof v === 'number') {
+          this.x /= v;
+          this.y /= v;
+          this.z /= v;
+        } else if (typeof v === 'object') {
+          this.x /= v.x;
+          this.y /= v.y;
+          this.z /= v.z;
+        }
+      },
+      dist: function(v) {
+        var dx = this.x - v.x,
+          dy = this.y - v.y,
+          dz = this.z - v.z;
+        return Math.sqrt(dx * dx + dy * dy + dz * dz);
+      },
+      dot: function(v, y, z) {
+        var num;
+        if (arguments.length === 3) {
+          num = this.x * v + this.y * y + this.z * z;
+        } else if (arguments.length === 1) {
+          num = this.x * v.x + this.y * v.y + this.z * v.z;
+        }
+        return num;
+      },
+      cross: function(v) {
+        var
+        crossX = this.y * v.z - v.y * this.z,
+          crossY = this.z * v.x - v.z * this.x,
+          crossZ = this.x * v.y - v.x * this.y;
+        return new PVector(crossX, crossY, crossZ);
+      },
+      normalize: function() {
+        var m = this.mag();
+        if (m > 0) {
+          this.div(m);
+        }
+      },
+      limit: function(high) {
+        if (this.mag() > high) {
+          this.normalize();
+          this.mult(high);
+        }
+      },
+      heading2D: function() {
+        var angle = Math.atan2(-this.y, this.x);
+        return -angle;
+      },
+      toString: function() {
+        return "[" + this.x + ", " + this.y + ", " + this.z + "]";
+      },
+      array: function() {
+        return [this.x, this.y, this.z];
+      }
+    };
+
+    while (method--) {
+      PVector[simplePVMethods[method]] = createSimplePVectorMethod(simplePVMethods[method]);
+    }
+
+    for (method in PVector.prototype) {
+      if (PVector.prototype.hasOwnProperty(method) && !PVector.hasOwnProperty(method)) {
+        PVector[method] = createPVectorMethod(method);
+      }
+    }
+
+    p.PVector = PVector;
+
+    ////////////////////////////////////////////////////////////////////////////
+    // 2D Matrix
+    ////////////////////////////////////////////////////////////////////////////
+
+    /*
+      Helper function for printMatrix(). Finds the largest scalar
+      in the matrix, then number of digits left of the decimal.
+      Call from PMatrix2D and PMatrix3D's print() function.
+    */
+    var printMatrixHelper = function printMatrixHelper(elements) {
+      var big = 0;
+      for (var i = 0; i < elements.length; i++) {
+
+        if (i !== 0) {
+          big = Math.max(big, Math.abs(elements[i]));
+        } else {
+          big = Math.abs(elements[i]);
+        }
+      }
+
+      var digits = (big + "").indexOf(".");
+      if (digits === 0) {
+        digits = 1;
+      } else if (digits === -1) {
+        digits = (big + "").length;
+      }
+
+      return digits;
+    };
+
+    var PMatrix2D = function() {
+      if (arguments.length === 0) {
+        this.reset();
+      } else if (arguments.length === 1 && arguments[0] instanceof PMatrix2D) {
+        this.set(arguments[0].array());
+      } else if (arguments.length === 6) {
+        this.set(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+      }
+    };
+
+    PMatrix2D.prototype = {
+      set: function() {
+        if (arguments.length === 6) {
+          var a = arguments;
+          this.set([a[0], a[1], a[2],
+                    a[3], a[4], a[5]]);
+        } else if (arguments.length === 1 && arguments[0] instanceof PMatrix2D) {
+          this.elements = arguments[0].array();
+        } else if (arguments.length === 1 && arguments[0] instanceof Array) {
+          this.elements = arguments[0].slice();
+        }
+      },
+      get: function() {
+        var outgoing = new PMatrix2D();
+        outgoing.set(this.elements);
+        return outgoing;
+      },
+      reset: function() {
+        this.set([1, 0, 0, 0, 1, 0]);
+      },
+      // Returns a copy of the element values.
+      array: function array() {
+        return this.elements.slice();
+      },
+      translate: function(tx, ty) {
+        this.elements[2] = tx * this.elements[0] + ty * this.elements[1] + this.elements[2];
+        this.elements[5] = tx * this.elements[3] + ty * this.elements[4] + this.elements[5];
+      },
+      // Does nothing in Processing.
+      transpose: function() {
+      },
+      mult: function(source, target) {
+        var x, y;
+        if (source instanceof PVector) {
+          x = source.x;
+          y = source.y;
+          if (!target) {
+            target = new PVector();
+          }
+        } else if (source instanceof Array) {
+          x = source[0];
+          y = source[1];
+          if (!target) {
+            target = [];
+          }
+        }
+        if (target instanceof Array) {
+          target[0] = this.elements[0] * x + this.elements[1] * y + this.elements[2];
+          target[1] = this.elements[3] * x + this.elements[4] * y + this.elements[5];
+        } else if (target instanceof PVector) {
+          target.x = this.elements[0] * x + this.elements[1] * y + this.elements[2];
+          target.y = this.elements[3] * x + this.elements[4] * y + this.elements[5];
+          target.z = 0;
+        }
+        return target;
+      },
+      multX: function(x, y) {
+        return x * this.elements[0] + y * this.elements[1] + this.elements[2];
+      },
+      multY: function(x, y) {
+        return x * this.elements[3] + y * this.elements[4] + this.elements[5];
+      },
+      skewX: function(angle) {
+        this.apply(1, 0, 1, angle, 0, 0);
+      },
+      skewY: function(angle) {
+        this.apply(1, 0, 1, 0, angle, 0);
+      },
+      determinant: function() {
+        return this.elements[0] * this.elements[4] - this.elements[1] * this.elements[3];
+      },
+      invert: function() {
+        var d = this.determinant();
+        if ( Math.abs( d ) > p.FLOAT_MIN ) {
+          var old00 = this.elements[0];
+          var old01 = this.elements[1];
+          var old02 = this.elements[2];
+          var old10 = this.elements[3];
+          var old11 = this.elements[4];
+          var old12 = this.elements[5];
+          this.elements[0] =  old11 / d;
+          this.elements[3] = -old10 / d;
+          this.elements[1] = -old01 / d;
+          this.elements[1] =  old00 / d;
+          this.elements[2] = (old01 * old12 - old11 * old02) / d;
+          this.elements[5] = (old10 * old02 - old00 * old12) / d;
+          return true;
+        }
+        return false;
+      },
+      scale: function(sx, sy) {
+        if (sx && !sy) {
+          sy = sx;
+        }
+        if (sx && sy) {
+          this.elements[0] *= sx;
+          this.elements[1] *= sy;
+          this.elements[3] *= sx;
+          this.elements[4] *= sy;
+        }
+      },
+      apply: function() {
+        if (arguments.length === 1 && arguments[0] instanceof PMatrix2D) {
+          this.apply(arguments[0].array());
+        } else if (arguments.length === 6) {
+          var a = arguments;
+          this.apply([a[0], a[1], a[2],
+                      a[3], a[4], a[5]]);
+        } else if (arguments.length === 1 && arguments[0] instanceof Array) {
+          var source = arguments[0];
+          var result = [0, 0, this.elements[2],
+                        0, 0, this.elements[5]];
+          var e = 0;
+          for (var row = 0; row < 2; row++) {
+            for (var col = 0; col < 3; col++, e++) {
+              result[e] += this.elements[row * 3 + 0] * source[col + 0] + this.elements[row * 3 + 1] * source[col + 3];
+            }
+          }
+          this.elements = result.slice();
+        }
+      },
+      preApply: function() {
+        if (arguments.length === 1 && arguments[0] instanceof PMatrix2D) {
+          this.preApply(arguments[0].array());
+        } else if (arguments.length === 6) {
+          var a = arguments;
+          this.preApply([a[0], a[1], a[2],
+                         a[3], a[4], a[5]]);
+        } else if (arguments.length === 1 && arguments[0] instanceof Array) {
+          var source = arguments[0];
+          var result = [0, 0, source[2],
+                        0, 0, source[5]];
+          result[2]= source[2] + this.elements[2] * source[0] + this.elements[5] * source[1];
+          result[5]= source[5] + this.elements[2] * source[3] + this.elements[5] * source[4];
+          result[0] = this.elements[0] * source[0] + this.elements[3] * source[1];
+          result[3] = this.elements[0] * source[3] + this.elements[3] * source[4];
+          result[1] = this.elements[1] * source[0] + this.elements[4] * source[1];
+          result[4] = this.elements[1] * source[3] + this.elements[4] * source[4];
+          this.elements = result.slice();
+        }
+      },
+      rotate: function(angle) {
+        var c = Math.cos(angle);
+        var s = Math.sin(angle);
+        var temp1 = this.elements[0];
+        var temp2 = this.elements[1];
+        this.elements[0] =  c * temp1 + s * temp2;
+        this.elements[1] = -s * temp1 + c * temp2;
+        temp1 = this.elements[3];
+        temp2 = this.elements[4];
+        this.elements[3] =  c * temp1 + s * temp2;
+        this.elements[4] = -s * temp1 + c * temp2;
+      },
+      rotateZ: function(angle) {
+        this.rotate(angle);
+      },
+      print: function() {
+        var digits = printMatrixHelper(this.elements);
+        var output = "";
+        output += p.nfs(this.elements[0], digits, 4) + " " + p.nfs(this.elements[1], digits, 4) + " " + p.nfs(this.elements[2], digits, 4) + "\n";
+        output += p.nfs(this.elements[3], digits, 4) + " " + p.nfs(this.elements[4], digits, 4) + " " + p.nfs(this.elements[5], digits, 4) + "\n\n";
+        p.println(output);
+      }
+    };
+
+    ////////////////////////////////////////////////////////////////////////////
+    // PMatrix3D
+    ////////////////////////////////////////////////////////////////////////////
+    var PMatrix3D = function PMatrix3D() {
+      //When a matrix is created, it is set to an identity matrix
+      this.reset();
+    };
+
+    PMatrix3D.prototype = {
+      set: function() {
+        if (arguments.length === 16) {
+          var a = arguments;
+          this.set([a[0], a[1], a[2], a[3],
+                    a[4], a[5], a[6], a[7],
+                    a[8], a[9], a[10], a[11],
+                    a[12], a[13], a[14], a[15]]);
+        } else if (arguments.length === 1 && arguments[0] instanceof PMatrix3D) {
+          this.elements = arguments[0].array();
+        } else if (arguments.length === 1 && arguments[0] instanceof Array) {
+          this.elements = arguments[0].slice();
+        }
+      },
+      get: function() {
+        var outgoing = new PMatrix3D();
+        outgoing.set(this.elements);
+        return outgoing;
+      },
+      reset: function() {
+        this.set([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
+      },
+      // Returns a copy of the element values.
+      array: function array() {
+        return this.elements.slice();
+      },
+      translate: function(tx, ty, tz) {
+        if (typeof tz === 'undefined') {
+          tx = 0;
+        }
+
+        this.elements[3] += tx * this.elements[0] + ty * this.elements[1] + tz * this.elements[2];
+        this.elements[7] += tx * this.elements[4] + ty * this.elements[5] + tz * this.elements[6];
+        this.elements[11] += tx * this.elements[8] + ty * this.elements[9] + tz * this.elements[10];
+        this.elements[15] += tx * this.elements[12] + ty * this.elements[13] + tz * this.elements[14];
+      },
+      transpose: function() {
+        var temp = this.elements.slice();
+        this.elements[0] = temp[0];
+        this.elements[1] = temp[4];
+        this.elements[2] = temp[8];
+        this.elements[3] = temp[12];
+        this.elements[4] = temp[1];
+        this.elements[5] = temp[5];
+        this.elements[6] = temp[9];
+        this.elements[7] = temp[13];
+        this.elements[8] = temp[2];
+        this.elements[9] = temp[6];
+        this.elements[10] = temp[10];
+        this.elements[11] = temp[14];
+        this.elements[12] = temp[3];
+        this.elements[13] = temp[7];
+        this.elements[14] = temp[11];
+        this.elements[15] = temp[15];
+      },
+      /*
+        You must either pass in two PVectors or two arrays,
+        don't mix between types. You may also omit a second
+        argument and simply read the result from the return.
+      */
+      mult: function(source, target) {
+        var x, y, z, w;
+        if (source instanceof PVector) {
+          x = source.x;
+          y = source.y;
+          z = source.z;
+          w = 1;
+          if (!target) {
+            target = new PVector();
+          }
+        } else if (source instanceof Array) {
+          x = source[0];
+          y = source[1];
+          z = source[2];
+          w = source[3] || 1;
+
+          if (!target || target.length !== 3 && target.length !== 4) {
+            target = [0, 0, 0];
+          }
+        }
+
+        if (target instanceof Array) {
+          if (target.length === 3) {
+            target[0] = this.elements[0] * x + this.elements[1] * y + this.elements[2] * z + this.elements[3];
+            target[1] = this.elements[4] * x + this.elements[5] * y + this.elements[6] * z + this.elements[7];
+            target[2] = this.elements[8] * x + this.elements[9] * y + this.elements[10] * z + this.elements[11];
+          } else if (target.length === 4) {
+            target[0] = this.elements[0] * x + this.elements[1] * y + this.elements[2] * z + this.elements[3] * w;
+            target[1] = this.elements[4] * x + this.elements[5] * y + this.elements[6] * z + this.elements[7] * w;
+            target[2] = this.elements[8] * x + this.elements[9] * y + this.elements[10] * z + this.elements[11] * w;
+            target[3] = this.elements[12] * x + this.elements[13] * y + this.elements[14] * z + this.elements[15] * w;
+          }
+        }
+        if (target instanceof PVector) {
+          target.x = this.elements[0] * x + this.elements[1] * y + this.elements[2] * z + this.elements[3];
+          target.y = this.elements[4] * x + this.elements[5] * y + this.elements[6] * z + this.elements[7];
+          target.z = this.elements[8] * x + this.elements[9] * y + this.elements[10] * z + this.elements[11];
+        }
+        return target;
+      },
+      preApply: function() {
+        if (arguments.length === 1 && arguments[0] instanceof PMatrix3D) {
+          this.preApply(arguments[0].array());
+        } else if (arguments.length === 16) {
+          var a = arguments;
+          this.preApply([a[0], a[1], a[2], a[3],
+                         a[4], a[5], a[6], a[7],
+                         a[8], a[9], a[10], a[11],
+                         a[12], a[13], a[14], a[15]]);
+        } else if (arguments.length === 1 && arguments[0] instanceof Array) {
+          var source = arguments[0];
+
+          var result = [0, 0, 0, 0,
+                        0, 0, 0, 0,
+                        0, 0, 0, 0,
+                        0, 0, 0, 0];
+          var e = 0;
+          for (var row = 0; row < 4; row++) {
+            for (var col = 0; col < 4; col++, e++) {
+              result[e] += this.elements[col + 0] * source[row * 4 + 0] + this.elements[col + 4] * source[row * 4 + 1] + this.elements[col + 8] * source[row * 4 + 2] + this.elements[col + 12] * source[row * 4 + 3];
+            }
+          }
+          this.elements = result.slice();
+        }
+      },
+      apply: function() {
+        if (arguments.length === 1 && arguments[0] instanceof PMatrix3D) {
+          this.apply(arguments[0].array());
+        } else if (arguments.length === 16) {
+          var a = arguments;
+          this.apply([a[0], a[1], a[2], a[3],
+                      a[4], a[5], a[6], a[7],
+                      a[8], a[9], a[10], a[11],
+                      a[12], a[13], a[14], a[15]]);
+        } else if (arguments.length === 1 && arguments[0] instanceof Array) {
+          var source = arguments[0];
+
+          var result = [0, 0, 0, 0,
+                        0, 0, 0, 0,
+                        0, 0, 0, 0,
+                        0, 0, 0, 0];
+          var e = 0;
+          for (var row = 0; row < 4; row++) {
+            for (var col = 0; col < 4; col++, e++) {
+              result[e] += this.elements[row * 4 + 0] * source[col + 0] + this.elements[row * 4 + 1] * source[col + 4] + this.elements[row * 4 + 2] * source[col + 8] + this.elements[row * 4 + 3] * source[col + 12];
+            }
+          }
+          this.elements = result.slice();
+        }
+      },
+      rotate: function(angle, v0, v1, v2) {
+        if (!v1) {
+          this.rotateZ(angle);
+        } else {
+          // TODO should make sure this vector is normalized
+          var c = p.cos(angle);
+          var s = p.sin(angle);
+          var t = 1.0 - c;
+
+          this.apply((t * v0 * v0) + c, (t * v0 * v1) - (s * v2), (t * v0 * v2) + (s * v1), 0, (t * v0 * v1) + (s * v2), (t * v1 * v1) + c, (t * v1 * v2) - (s * v0), 0, (t * v0 * v2) - (s * v1), (t * v1 * v2) + (s * v0), (t * v2 * v2) + c, 0, 0, 0, 0, 1);
+        }
+      },
+      invApply: function() {
+        if (typeof inverseCopy === "undefined") {
+          inverseCopy = new PMatrix3D();
+        }
+        var a = arguments;
+        inverseCopy.set(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);
+
+        if (!inverseCopy.invert()) {
+          return false;
+        }
+        this.preApply(inverseCopy);
+        return true;
+      },
+      rotateX: function(angle) {
+        var c = p.cos(angle);
+        var s = p.sin(angle);
+        this.apply([1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1]);
+      },
+
+      rotateY: function(angle) {
+        var c = p.cos(angle);
+        var s = p.sin(angle);
+        this.apply([c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1]);
+      },
+      rotateZ: function(angle) {
+        var c = Math.cos(angle);
+        var s = Math.sin(angle);
+        this.apply([c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
+      },
+      // Uniform scaling if only one value passed in
+      scale: function(sx, sy, sz) {
+        if (sx && !sy && !sz) {
+          sy = sz = sx;
+        } else if (sx && sy && !sz) {
+          sz = 1;
+        }
+
+        if (sx && sy && sz) {
+          this.elements[0] *= sx;
+          this.elements[1] *= sy;
+          this.elements[2] *= sz;
+          this.elements[4] *= sx;
+          this.elements[5] *= sy;
+          this.elements[6] *= sz;
+          this.elements[8] *= sx;
+          this.elements[9] *= sy;
+          this.elements[10] *= sz;
+          this.elements[12] *= sx;
+          this.elements[13] *= sy;
+          this.elements[14] *= sz;
+        }
+      },
+      skewX: function(angle) {
+        var t = p.tan(angle);
+        this.apply(1, t, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+      },
+      skewY: function(angle) {
+        var t = Math.tan(angle);
+        this.apply(1, 0, 0, 0, t, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+      },
+      multX: function(x, y, z, w) {
+        if (!z) {
+          return this.elements[0] * x + this.elements[1] * y + this.elements[3];
+        } else if (!w) {
+          return this.elements[0] * x + this.elements[1] * y + this.elements[2] * z + this.elements[3];
+        } else {
+          return this.elements[0] * x + this.elements[1] * y + this.elements[2] * z + this.elements[3] * w;
+        }
+      },
+      multY: function(x, y, z, w) {
+        if (!z) {
+          return this.elements[4] * x + this.elements[5] * y + this.elements[7];
+        } else if (!w) {
+          return this.elements[4] * x + this.elements[5] * y + this.elements[6] * z + this.elements[7];
+        } else {
+          return this.elements[4] * x + this.elements[5] * y + this.elements[6] * z + this.elements[7] * w;
+        }
+      },
+      multZ: function(x, y, z, w) {
+        if (!w) {
+          return this.elements[8] * x + this.elements[9] * y + this.elements[10] * z + this.elements[11];
+        } else {
+          return this.elements[8] * x + this.elements[9] * y + this.elements[10] * z + this.elements[11] * w;
+        }
+      },
+      multW: function(x, y, z, w) {
+        if (!w) {
+          return this.elements[12] * x + this.elements[13] * y + this.elements[14] * z + this.elements[15];
+        } else {
+          return this.elements[12] * x + this.elements[13] * y + this.elements[14] * z + this.elements[15] * w;
+        }
+      },
+      invert: function() {
+        var kInv = [];
+        var fA0 = this.elements[0] * this.elements[5] - this.elements[1] * this.elements[4];
+        var fA1 = this.elements[0] * this.elements[6] - this.elements[2] * this.elements[4];
+        var fA2 = this.elements[0] * this.elements[7] - this.elements[3] * this.elements[4];
+        var fA3 = this.elements[1] * this.elements[6] - this.elements[2] * this.elements[5];
+        var fA4 = this.elements[1] * this.elements[7] - this.elements[3] * this.elements[5];
+        var fA5 = this.elements[2] * this.elements[7] - this.elements[3] * this.elements[6];
+        var fB0 = this.elements[8] * this.elements[13] - this.elements[9] * this.elements[12];
+        var fB1 = this.elements[8] * this.elements[14] - this.elements[10] * this.elements[12];
+        var fB2 = this.elements[8] * this.elements[15] - this.elements[11] * this.elements[12];
+        var fB3 = this.elements[9] * this.elements[14] - this.elements[10] * this.elements[13];
+        var fB4 = this.elements[9] * this.elements[15] - this.elements[11] * this.elements[13];
+        var fB5 = this.elements[10] * this.elements[15] - this.elements[11] * this.elements[14];
+
+        // Determinant
+        var fDet = fA0 * fB5 - fA1 * fB4 + fA2 * fB3 + fA3 * fB2 - fA4 * fB1 + fA5 * fB0;
+
+        // Account for a very small value
+        // return false if not successful.
+        if (Math.abs(fDet) <= 1e-9) {
+          return false;
+        }
+
+        kInv[0] = +this.elements[5] * fB5 - this.elements[6] * fB4 + this.elements[7] * fB3;
+        kInv[4] = -this.elements[4] * fB5 + this.elements[6] * fB2 - this.elements[7] * fB1;
+        kInv[8] = +this.elements[4] * fB4 - this.elements[5] * fB2 + this.elements[7] * fB0;
+        kInv[12] = -this.elements[4] * fB3 + this.elements[5] * fB1 - this.elements[6] * fB0;
+        kInv[1] = -this.elements[1] * fB5 + this.elements[2] * fB4 - this.elements[3] * fB3;
+        kInv[5] = +this.elements[0] * fB5 - this.elements[2] * fB2 + this.elements[3] * fB1;
+        kInv[9] = -this.elements[0] * fB4 + this.elements[1] * fB2 - this.elements[3] * fB0;
+        kInv[13] = +this.elements[0] * fB3 - this.elements[1] * fB1 + this.elements[2] * fB0;
+        kInv[2] = +this.elements[13] * fA5 - this.elements[14] * fA4 + this.elements[15] * fA3;
+        kInv[6] = -this.elements[12] * fA5 + this.elements[14] * fA2 - this.elements[15] * fA1;
+        kInv[10] = +this.elements[12] * fA4 - this.elements[13] * fA2 + this.elements[15] * fA0;
+        kInv[14] = -this.elements[12] * fA3 + this.elements[13] * fA1 - this.elements[14] * fA0;
+        kInv[3] = -this.elements[9] * fA5 + this.elements[10] * fA4 - this.elements[11] * fA3;
+        kInv[7] = +this.elements[8] * fA5 - this.elements[10] * fA2 + this.elements[11] * fA1;
+        kInv[11] = -this.elements[8] * fA4 + this.elements[9] * fA2 - this.elements[11] * fA0;
+        kInv[15] = +this.elements[8] * fA3 - this.elements[9] * fA1 + this.elements[10] * fA0;
+
+        // Inverse using Determinant
+        var fInvDet = 1.0 / fDet;
+        kInv[0] *= fInvDet;
+        kInv[1] *= fInvDet;
+        kInv[2] *= fInvDet;
+        kInv[3] *= fInvDet;
+        kInv[4] *= fInvDet;
+        kInv[5] *= fInvDet;
+        kInv[6] *= fInvDet;
+        kInv[7] *= fInvDet;
+        kInv[8] *= fInvDet;
+        kInv[9] *= fInvDet;
+        kInv[10] *= fInvDet;
+        kInv[11] *= fInvDet;
+        kInv[12] *= fInvDet;
+        kInv[13] *= fInvDet;
+        kInv[14] *= fInvDet;
+        kInv[15] *= fInvDet;
+
+        this.elements = kInv.slice();
+        return true;
+      },
+      toString: function() {
+        var str = "";
+        for (var i = 0; i < 15; i++) {
+          str += this.elements[i] + ", ";
+        }
+        str += this.elements[15];
+        return str;
+      },
+      print: function() {
+        var digits = printMatrixHelper(this.elements);
+
+        var output = "";
+        output += p.nfs(this.elements[0], digits, 4) + " " + p.nfs(this.elements[1], digits, 4) + " " + p.nfs(this.elements[2], digits, 4) + " " + p.nfs(this.elements[3], digits, 4) + "\n";
+        output += p.nfs(this.elements[4], digits, 4) + " " + p.nfs(this.elements[5], digits, 4) + " " + p.nfs(this.elements[6], digits, 4) + " " + p.nfs(this.elements[7], digits, 4) + "\n";
+        output += p.nfs(this.elements[8], digits, 4) + " " + p.nfs(this.elements[9], digits, 4) + " " + p.nfs(this.elements[10], digits, 4) + " " + p.nfs(this.elements[11], digits, 4) + "\n";
+        output += p.nfs(this.elements[12], digits, 4) + " " + p.nfs(this.elements[13], digits, 4) + " " + p.nfs(this.elements[14], digits, 4) + " " + p.nfs(this.elements[15], digits, 4) + "\n\n";
+
+        p.println(output);
+      },
+      invTranslate: function(tx, ty, tz) {
+        this.preApply(1, 0, 0, -tx, 0, 1, 0, -ty, 0, 0, 1, -tz, 0, 0, 0, 1);
+      },
+      invRotateX: function(angle) {
+        var c = p.cos(-angle);
+        var s = p.sin(-angle);
+        this.preApply([1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1]);
+      },
+      invRotateY: function(angle) {
+        var c = p.cos(-angle);
+        var s = p.sin(-angle);
+        this.preApply([c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1]);
+      },
+      invRotateZ: function(angle) {
+        var c = p.cos(-angle);
+        var s = p.sin(-angle);
+        this.preApply([c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
+      },
+      invScale: function(x, y, z) {
+        this.preApply([1 / x, 0, 0, 0, 0, 1 / y, 0, 0, 0, 0, 1 / z, 0, 0, 0, 0, 1]);
+      }
+    };
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Matrix Stack
+    ////////////////////////////////////////////////////////////////////////////
+    var PMatrixStack = function PMatrixStack() {
+      this.matrixStack = [];
+    };
+
+    PMatrixStack.prototype.load = function load() {
+      var tmpMatrix;
+      if (p.use3DContext) {
+        tmpMatrix = new PMatrix3D();
+      } else {
+        tmpMatrix = new PMatrix2D();
+      }
+
+      if (arguments.length === 1) {
+        tmpMatrix.set(arguments[0]);
+      } else {
+        tmpMatrix.set(arguments);
+      }
+      this.matrixStack.push(tmpMatrix);
+    };
+
+    PMatrixStack.prototype.push = function push() {
+      this.matrixStack.push(this.peek());
+    };
+
+    PMatrixStack.prototype.pop = function pop() {
+      return this.matrixStack.pop();
+    };
+
+    PMatrixStack.prototype.peek = function peek() {
+      var tmpMatrix;
+      if (p.use3DContext) {
+        tmpMatrix = new PMatrix3D();
+      } else {
+        tmpMatrix = new PMatrix2D();
+      }
+
+      tmpMatrix.set(this.matrixStack[this.matrixStack.length - 1]);
+      return tmpMatrix;
+    };
+
+    PMatrixStack.prototype.mult = function mult(matrix) {
+      this.matrixStack[this.matrixStack.length - 1].apply(matrix);
+    };
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Array handling
+    ////////////////////////////////////////////////////////////////////////////
+    p.split = function(str, delim) {
+      return str.split(delim);
+    };
+
+    p.splitTokens = function(str, tokens) {
+      if (arguments.length === 1) {
+        tokens = "\n\t\r\f ";
+      }
+
+      tokens = "[" + tokens + "]";
+
+      var ary = new Array(0);
+      var index = 0;
+      var pos = str.search(tokens);
+
+      while (pos >= 0) {
+        if (pos === 0) {
+          str = str.substring(1);
+        } else {
+          ary[index] = str.substring(0, pos);
+          index++;
+          str = str.substring(pos);
+        }
+        pos = str.search(tokens);
+      }
+
+      if (str.length > 0) {
+        ary[index] = str;
+      }
+
+      if (ary.length === 0) {
+        ary = undefined;
+      }
+
+      return ary;
+    };
+
+    p.append = function(array, element) {
+      array[array.length] = element;
+      return array;
+    };
+
+    p.concat = function(array1, array2) {
+      return array1.concat(array2);
+    };
+
+    p.sort = function(array, numElem) {
+      var ret = [];
+
+      // depending on the type used (int, float) or string
+      // we'll need to use a different compare function
+      if (array.length > 0) {
+        // copy since we need to return another array
+        var elemsToCopy = numElem > 0 ? numElem : array.length;
+        for (var i = 0; i < elemsToCopy; i++) {
+          ret.push(array[i]);
+        }
+        if (typeof array[0] === "string") {
+          ret.sort();
+        }
+        // int or float
+        else {
+          ret.sort(function(a, b) {
+            return a - b;
+          });
+        }
+
+        // copy on the rest of the elements that were not sorted in case the user
+        // only wanted a subset of an array to be sorted.
+        if (numElem > 0) {
+          for (var j = ret.length; j < array.length; j++) {
+            ret.push(array[j]);
+          }
+        }
+      }
+      return ret;
+    };
+
+    p.splice = function(array, value, index) {
+      if (array.length === 0 && value.length === 0) {
+        return array;
+      }
+
+      if (value instanceof Array) {
+        for (var i = 0, j = index; i < value.length; j++, i++) {
+          array.splice(j, 0, value[i]);
+        }
+      } else {
+        array.splice(index, 0, value);
+      }
+
+      return array;
+    };
+
+    p.subset = function(array, offset, length) {
+      if (arguments.length === 2) {
+        return p.subset(array, offset, array.length - offset);
+      } else if (arguments.length === 3) {
+        return array.slice(offset, offset + length);
+      }
+    };
+
+    p.join = function(array, seperator) {
+      return array.join(seperator);
+    };
+
+    p.shorten = function(ary) {
+      var newary = new Array(0);
+
+      // copy array into new array
+      var len = ary.length;
+      for (var i = 0; i < len; i++) {
+        newary[i] = ary[i];
+      }
+      newary.pop();
+
+      return newary;
+    };
+
+    p.expand = function(ary, newSize) {
+      var newary = new Array(0);
+
+      var len = ary.length;
+      for (var i = 0; i < len; i++) {
+        newary[i] = ary[i];
+      }
+
+      if (arguments.length === 1) {
+        // double size of array
+        newary.length *= 2;
+      } else if (arguments.length === 2) {
+        // size is newSize
+        newary.length = newSize;
+      }
+
+      return newary;
+    };
+
+    p.arrayCopy = function(src, srcPos, dest, destPos, length) {
+      if (arguments.length === 2) {
+        // recall itself and copy src to dest from start index 0 to 0 of src.length
+        p.arrayCopy(src, 0, srcPos, 0, src.length);
+      } else if (arguments.length === 3) {
+        // recall itself and copy src to dest from start index 0 to 0 of length
+        p.arrayCopy(src, 0, srcPos, 0, dest);
+      } else if (arguments.length === 5) {
+        // copy src to dest from index srcPos to index destPos of length recursivly on objects
+        for (var i = srcPos, j = destPos; i < length + srcPos; i++, j++) {
+          if (src[i] && typeof src[i] === "object") {
+            // src[i] is not null and is another object or array. go recursive
+            p.arrayCopy(src[i], 0, dest[j], 0, src[i].length);
+          } else {
+            // standard type, just copy
+            dest[j] = src[i];
+          }
+        }
+      }
+    };
+
+    p.ArrayList = function() {
+      var createArrayList = function(args){
+        var array = [];
+        for (var i = 0; i < args[0]; i++){
+          array[i] = (args.length > 1 ? createArrayList(args.slice(1)) : 0 );
+        }
+
+        array.get = function(i) {
+          return this[i];
+        };
+        array.contains = function(item) {
+          return this.indexOf(item) !== -1;
+        };
+        array.add = function(item) {
+          return this.push(item);
+        };
+        array.size = function() {
+          return this.length;
+        };
+        array.clear = function() {
+          this.length = 0;
+        };
+        array.remove = function(i) {
+          return this.splice(i, 1)[0];
+        };
+        array.isEmpty = function() {
+          return !this.length;
+        };
+        array.clone = function() {
+          var size = this.length;
+          var a = new p.ArrayList(size);
+          for (var i = 0; i < size; i++) {
+            a[i] = this[i];
+          }
+          return a;
+        };
+
+        return array;
+      };
+      return createArrayList(Array.prototype.slice.call(arguments));
+    };
+
+    p.reverse = function(array) {
+      return array.reverse();
+    };
+
+    ////////////////////////////////////////////////////////////////////////////
+    // HashMap
+    ////////////////////////////////////////////////////////////////////////////
+
+    var virtHashCode = function virtHashCode(obj) {
+      if (obj.constructor === String) {
+        var hash = 0;
+        for (var i = 0; i < obj.length; ++i) {
+          hash = (hash * 31 + obj.charCodeAt(i)) & 0xFFFFFFFF;
+        }
+        return hash;
+      } else if (typeof(obj) !== "object") {
+        return obj & 0xFFFFFFFF;
+      } else if ("hashCode" in obj) {
+        return obj.hashCode.call(obj);
+      } else {
+        if (obj.$id === undefined) {
+          obj.$id = ((Math.floor(Math.random() * 0x10000) - 0x8000) << 16) | Math.floor(Math.random() * 0x10000);
+        }
+        return obj.$id;
+      }
+    };
+
+    var virtEquals = function virtEquals(obj, other) {
+      if (obj === null || other === null) {
+        return (obj === null) && (other === null);
+      } else if (obj.constructor === String) {
+        return obj === other;
+      } else if (typeof(obj) !== "object") {
+        return obj === other;
+      } else if ("equals" in obj) {
+        return obj.equals.call(obj, other);
+      } else {
+        return obj === other;
+      }
+    };
+
+    p.HashMap = function HashMap() {
+      if (arguments.length === 1 && arguments[0].constructor === HashMap) {
+        return arguments[0].clone();
+      }
+
+      var initialCapacity = arguments.length > 0 ? arguments[0] : 16;
+      var loadFactor = arguments.length > 1 ? arguments[1] : 0.75;
+
+      var buckets = new Array(initialCapacity);
+      var count = 0;
+      var hashMap = this;
+
+      function ensureLoad() {
+        if (count <= loadFactor * buckets.length) {
+          return;
+        }
+        var allEntries = [];
+        for (var i = 0; i < buckets.length; ++i) {
+          if (buckets[i] !== undefined) {
+            allEntries = allEntries.concat(buckets[i]);
+          }
+        }
+        buckets = new Array(buckets.length * 2);
+        for (var j = 0; j < allEntries.length; ++j) {
+          var index = virtHashCode(allEntries[j].key) % buckets.length;
+          var bucket = buckets[index];
+          if (bucket === undefined) {
+            buckets[index] = bucket = [];
+          }
+          bucket.push(allEntries[j]);
+        }
+      }
+
+      function Iterator(conversion, removeItem) {
+        var bucketIndex = 0;
+        var itemIndex = -1;
+        var endOfBuckets = false;
+
+        function findNext() {
+          while (!endOfBuckets) {
+            ++itemIndex;
+            if (bucketIndex >= buckets.length) {
+              endOfBuckets = true;
+            } else if (typeof(buckets[bucketIndex]) === 'undefined' || itemIndex >= buckets[bucketIndex].length) {
+              itemIndex = -1;
+              ++bucketIndex;
+            } else {
+              return;
+            }
+          }
+        }
+
+        this.hasNext = function() {
+          return !endOfBuckets;
+        };
+        this.next = function() {
+          var result = conversion(buckets[bucketIndex][itemIndex]);
+          findNext();
+          return result;
+        };
+        this.remove = function() {
+          removeItem(this.next());
+          --itemIndex;
+        };
+
+        findNext();
+      }
+
+      function Set(conversion, isIn, removeItem) {
+        this.clear = function() {
+          hashMap.clear();
+        };
+        this.contains = function(o) {
+          return isIn(o);
+        };
+        this.containsAll = function(o) {
+          var it = o.iterator();
+          while (it.hasNext()) {
+            if (!this.contains(it.next())) {
+              return false;
+            }
+          }
+          return true;
+        };
+        this.isEmpty = function() {
+          return hashMap.isEmpty();
+        };
+        this.iterator = function() {
+          return new Iterator(conversion, removeItem);
+        };
+        this.remove = function(o) {
+          if (this.contains(o)) {
+            removeItem(o);
+            return true;
+          }
+          return false;
+        };
+        this.removeAll = function(c) {
+          var it = c.iterator();
+          var changed = false;
+          while (it.hasNext()) {
+            var item = it.next();
+            if (this.contains(item)) {
+              removeItem(item);
+              changed = true;
+            }
+          }
+          return true;
+        };
+        this.retainAll = function(c) {
+          var it = this.iterator();
+          var toRemove = [];
+          while (it.hasNext()) {
+            var entry = it.next();
+            if (!c.contains(entry)) {
+              toRemove.push(entry);
+            }
+          }
+          for (var i = 0; i < toRemove.length; ++i) {
+            removeItem(toRemove[i]);
+          }
+          return toRemove.length > 0;
+        };
+        this.size = function() {
+          return hashMap.size();
+        };
+        this.toArray = function() {
+          var result = new p.ArrayList(0);
+          var it = this.iterator();
+          while (it.hasNext()) {
+            result.push(it.next());
+          }
+          return result;
+        };
+      }
+
+      function Entry(pair) {
+        this._isIn = function(map) {
+          return map === hashMap && (typeof(pair.removed) === 'undefined');
+        };
+        this.equals = function(o) {
+          return virtEquals(pair.key, o.getKey());
+        };
+        this.getKey = function() {
+          return pair.key;
+        };
+        this.getValue = function() {
+          return pair.value;
+        };
+        this.hashCode = function(o) {
+          return virtHashCode(pair.key);
+        };
+        this.setValue = function(value) {
+          var old = pair.value;
+          pair.value = value;
+          return old;
+        };
+      }
+
+      this.clear = function() {
+        count = 0;
+        buckets = new Array(initialCapacity);
+      };
+      this.clone = function() {
+        var map = new p.HashMap();
+        map.putAll(this);
+        return map;
+      };
+      this.containsKey = function(key) {
+        var index = virtHashCode(key) % buckets.length;
+        var bucket = buckets[index];
+        if (bucket === undefined) {
+          return false;
+        }
+        for (var i = 0; i < bucket.length; ++i) {
+          if (virtEquals(bucket[i].key, key)) {
+            return true;
+          }
+        }
+        return false;
+      };
+      this.containsValue = function(value) {
+        for (var i = 0; i < buckets.length; ++i) {
+          var bucket = buckets[i];
+          if (bucket === undefined) {
+            continue;
+          }
+          for (var j = 0; j < bucket.length; ++j) {
+            if (virtEquals(bucket[j].value, value)) {
+              return true;
+            }
+          }
+        }
+        return false;
+      };
+      this.entrySet = function() {
+        return new Set(
+
+        function(pair) {
+          return new Entry(pair);
+        },
+
+        function(pair) {
+          return pair.constructor === Entry && pair._isIn(hashMap);
+        },
+
+        function(pair) {
+          return hashMap.remove(pair.getKey());
+        });
+      };
+      this.get = function(key) {
+        var index = virtHashCode(key) % buckets.length;
+        var bucket = buckets[index];
+        if (bucket === undefined) {
+          return null;
+        }
+        for (var i = 0; i < bucket.length; ++i) {
+          if (virtEquals(bucket[i].key, key)) {
+            return bucket[i].value;
+          }
+        }
+        return null;
+      };
+      this.isEmpty = function() {
+        return count === 0;
+      };
+      this.keySet = function() {
+        return new Set(
+
+        function(pair) {
+          return pair.key;
+        },
+
+        function(key) {
+          return hashMap.containsKey(key);
+        },
+
+        function(key) {
+          return hashMap.remove(key);
+        });
+      };
+      this.put = function(key, value) {
+        var index = virtHashCode(key) % buckets.length;
+        var bucket = buckets[index];
+        if (bucket === undefined) {
+          ++count;
+          buckets[index] = [{
+            key: key,
+            value: value
+          }];
+          ensureLoad();
+          return null;
+        }
+        for (var i = 0; i < bucket.length; ++i) {
+          if (virtEquals(bucket[i].key, key)) {
+            var previous = bucket[i].value;
+            bucket[i].value = value;
+            return previous;
+          }
+        }++count;
+        bucket.push({
+          key: key,
+          value: value
+        });
+        ensureLoad();
+        return null;
+      };
+      this.putAll = function(m) {
+        var it = m.entrySet().iterator();
+        while (it.hasNext()) {
+          var entry = it.next();
+          this.put(entry.getKey(), entry.getValue());
+        }
+      };
+      this.remove = function(key) {
+        var index = virtHashCode(key) % buckets.length;
+        var bucket = buckets[index];
+        if (bucket === undefined) {
+          return null;
+        }
+        for (var i = 0; i < bucket.length; ++i) {
+          if (virtEquals(bucket[i].key, key)) {
+            --count;
+            var previous = bucket[i].value;
+            bucket[i].removed = true;
+            if (bucket.length > 1) {
+              bucket.splice(i, 1);
+            } else {
+              buckets[index] = undefined;
+            }
+            return previous;
+          }
+        }
+        return null;
+      };
+      this.size = function() {
+        return count;
+      };
+      this.values = function() {
+        var result = new p.ArrayList(0);
+        var it = this.entrySet().iterator();
+        while (it.hasNext()) {
+          var entry = it.next();
+          result.push(entry.getValue());
+        }
+        return result;
+      };
+    };
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Color functions
+    ////////////////////////////////////////////////////////////////////////////
+
+    // helper functions for internal blending modes
+    p.mix = function(a, b, f) {
+      return a + (((b - a) * f) >> 8);
+    };
+
+    p.peg = function(n) {
+      return (n < 0) ? 0 : ((n > 255) ? 255 : n);
+    };
+
+    // blending modes
+    p.modes = {
+      replace: function(c1, c2) {
+        return c2;
+      },
+      blend: function(c1, c2) {
+        var f = (c2 & p.ALPHA_MASK) >>> 24;
+        return (Math.min(((c1 & p.ALPHA_MASK) >>> 24) + f, 0xff) << 24 | p.mix(c1 & p.RED_MASK, c2 & p.RED_MASK, f) & p.RED_MASK | p.mix(c1 & p.GREEN_MASK, c2 & p.GREEN_MASK, f) & p.GREEN_MASK | p.mix(c1 & p.BLUE_MASK, c2 & p.BLUE_MASK, f));
+      },
+      add: function(c1, c2) {
+        var f = (c2 & p.ALPHA_MASK) >>> 24;
+        return (Math.min(((c1 & p.ALPHA_MASK) >>> 24) + f, 0xff) << 24 | Math.min(((c1 & p.RED_MASK) + ((c2 & p.RED_MASK) >> 8) * f), p.RED_MASK) & p.RED_MASK | Math.min(((c1 & p.GREEN_MASK) + ((c2 & p.GREEN_MASK) >> 8) * f), p.GREEN_MASK) & p.GREEN_MASK | Math.min((c1 & p.BLUE_MASK) + (((c2 & p.BLUE_MASK) * f) >> 8), p.BLUE_MASK));
+      },
+      subtract: function(c1, c2) {
+        var f = (c2 & p.ALPHA_MASK) >>> 24;
+        return (Math.min(((c1 & p.ALPHA_MASK) >>> 24) + f, 0xff) << 24 | Math.max(((c1 & p.RED_MASK) - ((c2 & p.RED_MASK) >> 8) * f), p.GREEN_MASK) & p.RED_MASK | Math.max(((c1 & p.GREEN_MASK) - ((c2 & p.GREEN_MASK) >> 8) * f), p.BLUE_MASK) & p.GREEN_MASK | Math.max((c1 & p.BLUE_MASK) - (((c2 & p.BLUE_MASK) * f) >> 8), 0));
+      },
+      lightest: function(c1, c2) {
+        var f = (c2 & p.ALPHA_MASK) >>> 24;
+        return (Math.min(((c1 & p.ALPHA_MASK) >>> 24) + f, 0xff) << 24 | Math.max(c1 & p.RED_MASK, ((c2 & p.RED_MASK) >> 8) * f) & p.RED_MASK | Math.max(c1 & p.GREEN_MASK, ((c2 & p.GREEN_MASK) >> 8) * f) & p.GREEN_MASK | Math.max(c1 & p.BLUE_MASK, ((c2 & p.BLUE_MASK) * f) >> 8));
+      },
+      darkest: function(c1, c2) {
+        var f = (c2 & p.ALPHA_MASK) >>> 24;
+        return (Math.min(((c1 & p.ALPHA_MASK) >>> 24) + f, 0xff) << 24 | p.mix(c1 & p.RED_MASK, Math.min(c1 & p.RED_MASK, ((c2 & p.RED_MASK) >> 8) * f), f) & p.RED_MASK | p.mix(c1 & p.GREEN_MASK, Math.min(c1 & p.GREEN_MASK, ((c2 & p.GREEN_MASK) >> 8) * f), f) & p.GREEN_MASK | p.mix(c1 & p.BLUE_MASK, Math.min(c1 & p.BLUE_MASK, ((c2 & p.BLUE_MASK) * f) >> 8), f));<